News for hackers. Stuff that matters.
Re:Fuzzing ping(8) and finding a 24 year old bug by charcircuit on Sunday December 11, 2022 @12:04AM (#33940301)
Is this even a bug? An invalid length is already being checked by the kernel.

https://github.com/openbsd/src/blob/4628c0e6cf9bd4a6d679c314...

Sure his fix made it more robust, but the problem only showed up because he had his fuzzer bypass validation that was being done outside of the function.

Re:Fuzzing ping(8) and finding a 24 year old bug by noAnswer on Sunday December 11, 2022 @08:03AM (#33942800)
It's called "Defence in depth".

There could be an unintentional or flawed kernel change. Someone could use the code on a different OS with a different behaving or buggy kernel.

Re:Fuzzing ping(8) and finding a 24 year old bug by readthenotes1 on Sunday December 11, 2022 @07:29PM (#33949301)
You could also consider it high coupling between two completely different code bases.

Or, the crime of making someone understand everything in order to understand some thing...

Re:Fuzzing ping(8) and finding a 24 year old bug by jiveturkey on Sunday December 11, 2022 @02:00AM (#33940848)
> We also need to get rid of the validation of the data packet

yep, he recognizes this also. strange to call this a bug then

i also find it strange that …

> As someone who has done a lot of work on ping(8)

… ping has a lot of work done to it

Re:Fuzzing ping(8) and finding a 24 year old bug by swinglock on Sunday December 11, 2022 @03:06AM (#33941226)
Although not exploitable, the bug is still an issue. Here are reasons to fix it.

* Puts burden on readers to know or find out if something else already protects the bug from being exploitable, instead of just having a check in the code. That's trivia masquerading as an optimization.

* A bug or change in behavior in one program (the kernel) could cause a bug in another program (ping) due to assumptions, which may not even have been documented as never changing guarantees. Could make a bug somewhere grow into a worse bug elsewhere, as well as being harder to debug.

* It allows the program to be fuzzed or statically analyzed for any bugs without having to constrain what inputs are considered valid enough, adding maintenance costs and opening for accidentally limiting too much and hiding exploitable bugs.

* Another option to be clear that this is impossible and thus correct code would have been to assert that the user data never looks like this. A failed assert is better than an infinite loop, so this is an improvement. However this would make it blindingly clear that user input is trusted, making it too obvious to ignore the next improvement; to check and handle the issue, even if that input passed through another program first.