-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[dfsan] sscanf function incorrectly ignores ordinary characters in the format string #94769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
thurstond
added a commit
to thurstond/llvm-project
that referenced
this issue
Jun 7, 2024
DFSan's sscanf is incorrect (llvm#94769), which results in erroneous matches when scraping RSS /proc/maps. This patch works around the issue by using strstr as a secondary check. It also adds a loose validity check for the initial RSS, to guard against future regressions in get_rss_kb(). Fixes llvm#91287
thurstond
added a commit
that referenced
this issue
Jun 8, 2024
DFSan's sscanf is incorrect (#94769), which results in erroneous matches when scraping RSS from /proc/maps. This patch works around the issue by using strstr as a secondary check. It also adds a loose validity check for the initial RSS measurement, to guard against regressions in get_rss_kb(). Fixes #91287
nekoshirro
pushed a commit
to nekoshirro/Alchemist-LLVM
that referenced
this issue
Jun 9, 2024
DFSan's sscanf is incorrect (llvm#94769), which results in erroneous matches when scraping RSS from /proc/maps. This patch works around the issue by using strstr as a secondary check. It also adds a loose validity check for the initial RSS measurement, to guard against regressions in get_rss_kb(). Fixes llvm#91287 Signed-off-by: Hafidz Muzakky <[email protected]>
browneee
added a commit
that referenced
this issue
Jun 13, 2024
EthanLuisMcDonough
pushed a commit
to EthanLuisMcDonough/llvm-project
that referenced
this issue
Aug 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example
Illustrated in #94700:
Implications
can behas been fixed by filtering the sscanf matches e.g., by using strstr to check for 'Rss: ' ([dfsan] Fix release_shadow_space.c #94770).Relevant code in DFSan's scan_buffer:
The text was updated successfully, but these errors were encountered: