rust-secure-code / safety-dance

Auditing crates for unsafe code which can be safely replaced

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audit `http`

thomcc opened this issue · comments

This is a very popular crate (10k downloads / day, >2M all time), and is also a potential attack target, due to the fact that it is intended to be exposed directly to the network.

It does some tricky stuff with unsafe that's I've always felt was worth a close look at. In particular the HeaderMap and related code is quite complex and uses a lot of unsafe. The rest of the crate uses less, but still some.

See also #5

I started looking into the code, and I'm about halfway done; I will open issues about my finding and keep this thread updated.

Reported hyperium/http#352, hyperium/http#353, hyperium/http#354, and hyperium/http#355. I don't have enough time to work on PRs in the mean time, so I would appreciate it if someone else can take care of theese issues.

Nice job, I'll see if I have the time to tackle these

Wow, you've even found a double free! Great job!

The bugs you've found are now showcased in the safety-dance trophy case in README. Thanks again!

Sounds good, thank you!