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
F137893848: D33132.diff
Wed, Nov 26, 11:26 PM
Unknown Object (File)
Wed, Nov 12, 8:34 PM
Unknown Object (File)
Tue, Nov 4, 8:44 AM
Unknown Object (File)
Tue, Nov 4, 1:17 AM
Unknown Object (File)
Tue, Nov 4, 1:16 AM
Unknown Object (File)
Tue, Nov 4, 1:16 AM
Unknown Object (File)
Tue, Nov 4, 1:15 AM
Unknown Object (File)
Oct 26 2025, 11:02 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42981
Build 39869: arc lint + arc unit