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
F102645501: D33132.diff
Fri, Nov 15, 7:01 AM
Unknown Object (File)
Sep 30 2024, 1:47 AM
Unknown Object (File)
Sep 20 2024, 10:58 AM
Unknown Object (File)
Sep 18 2024, 8:14 PM
Unknown Object (File)
Sep 6 2024, 1:28 PM
Unknown Object (File)
Sep 6 2024, 1:55 AM
Unknown Object (File)
Aug 24 2024, 1:44 PM
Unknown Object (File)
Aug 18 2024, 1:10 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42981
Build 39869: arc lint + arc unit