Repository navigation
Conversation
An array closed by '}' made the parser loop forever and deep nesting exhausted the stack.
Without a limit, a stream without a terminator grows the string until the stream ends.
…ng that ends in $
…or a missing parameter It inserted an empty value into the const message instead.
…n hour or minute A rotation time that is never reached made the constructor loop forever.
…() when HOME is unset getpwuid() returns storage that concurrent lookups overwrite.
…to the caller Unwinding through Expat kept its handler call depth above zero, so XML_ParserFree() leaked the parser.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5510 (review of the Poco fork embedded in ClickHouse). This is the last group of security fixes from that review; one commit per fix, please merge without squashing.
Several readers trusted hostile input:
Var::parse,BinaryReader::readCString(),Unicode::properties(),Logger::format()and the Redis reply reader could recurse without limit, loop, read out of bounds or allocate memory that a peer only declared.DialogSocketsent CR and LF in caller text unchanged (SMTP, POP3 and FTP command injection), andXMLWriterwrote]]>inside CDATA unchanged.AsyncChannelworker survives target exceptions;RotateAtTimeStrategyrejects out-of-range times;Path::home()usesgetpwuid_r(); the constMessage::operator[]throws as documented.DialogSocketrejects CR and LF;IPAddressrejects malformed IPv6 text;TCPServerpauses after an accept that fails for lack of resources; DNS reportsEAI_SYSTEMwitherrno;MultipartReaderthrows instead of asserting on an empty boundary.XMLWritersplits]]>in CDATA;XMLStreamParserpasses callback exceptions to the caller and frees the parser.Tests: every fix has a test that fails without it, except
XMLStreamParser(it would need a globaloperator newreplacement, against CODING_STYLE Rules 71 and 73; verified by hand under ASan/LSan). Run on macOS, Linux (release,ENABLE_TRACE, ASan/UBSan, TSan) and Windows; Redis also against a Redis 7 server.Follow-ups: pre-existing issues found in the review, to be listed in #5510.