Page MenuHomeFreeBSD

dummynet: Avoid an out-of-bounds read in do_config()
ClosedPublic

Authored by markj on Nov 26 2021, 4:01 PM.
Tags
None
Referenced Files
F159779301: D33132.diff
Thu, Jun 18, 4:00 AM
Unknown Object (File)
May 3 2026, 6:53 PM
Unknown Object (File)
May 2 2026, 4:01 PM
Unknown Object (File)
May 1 2026, 9:17 AM
Unknown Object (File)
Apr 27 2026, 3:25 PM
Unknown Object (File)
Apr 24 2026, 8:57 AM
Unknown Object (File)
Apr 21 2026, 10:01 PM
Unknown Object (File)
Apr 21 2026, 8:32 AM

Details

Summary

do_config() processes a buffer of variable-length dummynet commands.
The loop which processes this buffer loads the fixed-length header
before checking whether there are any bytes left to read, so it performs
a 4-byte read past the end of the buffer before terminating.

Restructure the loop to avoid this.

Reported by: Jenkins (KASAN job)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable