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)
Mar 7 2024, 5:56 PM
Unknown Object (File)
Feb 13 2024, 12:48 PM
Unknown Object (File)
Jan 12 2024, 11:31 PM
Unknown Object (File)
Dec 7 2023, 4:58 AM
Unknown Object (File)
Nov 3 2023, 3:20 PM
Unknown Object (File)
Sep 21 2023, 9:05 PM
Unknown Object (File)
Sep 17 2023, 7:47 AM
Unknown Object (File)
Sep 12 2023, 4:52 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