mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
parse_mw_buf() copies option names from privileged sysctl input into
eight-byte stack buffers. Unbounded %s conversions permit option tokens
longer than seven bytes to write past those buffers before the parser
validates them.
Limit each conversion to seven characters, leaving space for the
terminating NUL.
Signed-off-by: Yudi Yang <[email protected]>
Fixes: 96f556f504 ("NTB Tool: Test driver for NTB hardware drivers.")
Reviewed by: markj
MFC after: 1 week