You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was found by Trail of Bits during the audit of ICS27 Interchain Accounts
Problem Definition
The IsRevisionFormat and IsClientIDFormat regular expressions (regexes) implemented in the 02-client module use the [^-] regex element to ensure that two components are delimited by only a single dash in the respective {chainID}-{revision} and {client-type}-{N} formats. However, this regex element also accepts newline characters, which could cause unwanted “revision” and “client identifier” formats to be accepted.
Proposal
Fix the IsRevisionFormat and IsClientIDFormat regexes by changing the [^-] element to [^\n-] so that newline characters are not accepted before the - delimiter.
Extend the TestParseClientIdentifier and TestParseChainID test cases to check for client and chain IDs that contain newline characters before the - delimiter.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged/assigned
The text was updated successfully, but these errors were encountered:
On second thought the IsRevisionFormat should be updated. I didn't realize we already enforce chainIDs not to have newlines. The proposed change is just ensuring newlines aren't used before the -<revision number>. Since we are already imposing the naming restriction in of no newlines in the chainID to be a valid revision number, we can leave this as so until we receive requests otherwise
Since `SignedHeaders` are gossiped, there is no use for `Commit`
gossiping. Entire related logic should be removed from `p2p.Client` and
node(s).
Closes: cosmos#686
This issue was found by Trail of Bits during the audit of ICS27 Interchain Accounts
Problem Definition
The
IsRevisionFormat
andIsClientIDFormat
regular expressions (regexes) implemented in the 02-client module use the[^-]
regex element to ensure that two components are delimited by only a single dash in the respective{chainID}-{revision}
and{client-type}-{N}
formats. However, this regex element also accepts newline characters, which could cause unwanted “revision” and “client identifier” formats to be accepted.Proposal
IsRevisionFormat
andIsClientIDFormat
regexes by changing the[^-]
element to[^\n-]
so that newline characters are not accepted before the-
delimiter.TestParseClientIdentifier
andTestParseChainID
test cases to check for client and chain IDs that contain newline characters before the-
delimiter.For Admin Use
The text was updated successfully, but these errors were encountered: