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
Unknown Object (File)
Tue, Mar 31, 11:38 PM
Unknown Object (File)
Sun, Mar 22, 8:52 PM
Unknown Object (File)
Tue, Mar 17, 7:51 AM
Unknown Object (File)
Mon, Mar 16, 12:09 AM
Unknown Object (File)
Tue, Mar 3, 7:15 PM
Unknown Object (File)
Mar 1 2026, 7:54 PM
Unknown Object (File)
Feb 8 2026, 5:41 AM
Unknown Object (File)
Feb 7 2026, 7:12 PM

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