Page MenuHomeFreeBSD

bsdinstall partedit: Avoid potential buffer overflow in newfs_command
ClosedPublic

Authored by jhb on Oct 16 2023, 10:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 22, 9:25 PM
Unknown Object (File)
Tue, Apr 21, 7:32 PM
Unknown Object (File)
Mon, Apr 20, 2:27 AM
Unknown Object (File)
Wed, Apr 15, 12:06 PM
Unknown Object (File)
Tue, Apr 14, 8:46 AM
Unknown Object (File)
Mar 18 2026, 1:31 AM
Unknown Object (File)
Mar 18 2026, 1:26 AM
Unknown Object (File)
Mar 14 2026, 1:37 PM
Subscribers

Details

Summary

Allocate the buffer holding the newfs command string dynamically
(building the string via open_memstream) rather than storing the
command into a caller-supplied buffer of unknown length.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable