-
Notifications
You must be signed in to change notification settings - Fork 363
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
atty
potential unaligned read
#1457
Comments
Hey thanks :) Would you mind filing a PR with To me it also looks like it's not maintained so we can go with that too 👍 |
People also at Wg-unsafe-guidelines agree that this indeed is unsound Thanks to @thomcc who had picked up when this was being ported to std and pointed to: Also thanks to @digama0 to also confirm this |
Resolved via #1462 |
1151: Replace atty with is-terminal. r=Emilgardis a=Alexhuszagh Although this doesn't affect cross (since we do not use custom allocators), this address [rustsec-1457](rustsec/advisory-db#1457). Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
Refs: - softprops/atty#57 - clap-rs/clap#4249 - rustsec/advisory-db#1457 - rust-lang/rust#98070 Signed-off-by: Konstantin Shabanov <mail@etehtsea.me>
I found some discussions on a potential unaligned read in
atty
(10,564,450 recent downloads; 3 years since the last release). I think it legitimately looks like a soundness bug (though I guess it won't cause issues with the usual global allocators?). The issue was filed more than a year ago.If I understand correctly,
FILE_NAME_INFO
boils down to a struct likewhich has align 4 (playground). The vector
name_info_bytes
in https://github.com/softprops/atty/blob/7b5df17888997d57c2c1c8f91da1db5691f49953/src/lib.rs#L131-L141 need not be 4 byte aligned (though with any sane allocator it will be?).Links:
atty
clap
atty
maintenance status issueThe text was updated successfully, but these errors were encountered: