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, Mar 18, 1:31 AM
Unknown Object (File)
Wed, Mar 18, 1:26 AM
Unknown Object (File)
Sat, Mar 14, 1:37 PM
Unknown Object (File)
Fri, Mar 6, 4:08 AM
Unknown Object (File)
Feb 9 2026, 2:08 AM
Unknown Object (File)
Dec 18 2025, 4:11 PM
Unknown Object (File)
Dec 18 2025, 4:10 PM
Unknown Object (File)
Nov 28 2025, 2:49 AM
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