Skip to content
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

[Bug]: atty potential unaligned read #6

Open
sebastienrousseau opened this issue Sep 8, 2023 · 1 comment
Open

[Bug]: atty potential unaligned read #6

sebastienrousseau opened this issue Sep 8, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sebastienrousseau
Copy link

What happened?

Hi 👋

xtaskops seems to have a dependency on using clap v3.2.25 which has triggered a dependabot alert https://github.com/sebastienrousseau/shokunin/security/dependabot/8

On windows, atty dereferences a potentially unaligned pointer.

In practice however, the pointer won't be unaligned unless a custom global allocator is used.

In particular, the System allocator on windows uses HeapAlloc, which guarantees a large enough alignment.

[[package]]
name = "clap"
version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
 "atty",
 "bitflags 1.3.2",
 "clap_lex 0.2.4",
 "indexmap 1.9.3",
 "strsim",
 "termcolor",
 "textwrap",
]

I believe this has been solved by clap in subsequent versions:

clap-rs/clap#5028

What type of Operating System?

Windows

Steps to produce this issue.

Please refer to my security alert:

https://github.com/sebastienrousseau/shokunin/security/dependabot/8

You can see the details in my [Cargo.lock](https://github.com/sebastienrousseau/shokunin/blob/main/Cargo.lock)
@sebastienrousseau sebastienrousseau added the bug Something isn't working label Sep 8, 2023
@yonas
Copy link

yonas commented Nov 27, 2024

Checkout #9 for a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants