aws / s2n-quic

An implementation of the IETF QUIC protocol
https://crates.io/crates/s2n-quic
Apache License 2.0
1.13k stars 118 forks source link

RUSTSEC-2021-0145: Potential unaligned read #2170

Open github-actions[bot] opened 5 months ago

github-actions[bot] commented 5 months ago

Potential unaligned read

Details
Status unsound
Package atty
Version 0.2.14
URL https://github.com/softprops/atty/issues/50
Date 2021-07-04

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.

atty is Unmaintained

A Pull Request with a fix has been provided over a year ago but the maintainer seems to be unreachable.

Last release of atty was almost 3 years ago.

Possible Alternative(s)

The below list has not been vetted in any way and may or may not contain alternatives;

See advisory page for additional details.

toidiu commented 5 months ago

We should migrate away from structopt and use clap directly.

cargo tree output shows that atty is only used in tests and comes from two dependencies. structopt has a 2.33 dependency on clap which is preventing us from updating clap. However, structopt is in maintenance mode and clap is the recommended path forward.

➜  s2n-quic git:(main) cargo tree -p atty -i
atty v0.2.14
├── clap v2.34.0
│   └── structopt v0.3.26
│       ├── s2n-quic-qns v0.1.0 (/Users/apoorvko/projects/s2n-quic/quic/s2n-quic-qns)
│       └── s2n-quic-sim v0.1.0 (/Users/apoorvko/projects/s2n-quic/quic/s2n-quic-sim)
└── criterion v0.4.0
    └── s2n-quic-bench v0.1.0 (/Users/apoorvko/projects/s2n-quic/quic/s2n-quic-bench)