HomeFreeBSD

bsdinstall partedit: Avoid potential buffer overflow in newfs_command

Description

bsdinstall partedit: Avoid potential buffer overflow in newfs_command

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.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D42237

(cherry picked from commit ae2fc74fe76ca8b89c5ef0081ef3f4008f83de41)

Details

Provenance
jhbAuthored on Oct 16 2023, 11:25 PM
Reviewer
emaste
Differential Revision
D42237: bsdinstall partedit: Avoid potential buffer overflow in newfs_command
Parents
rGc81bdb499868: bsdinstall partedit: Apply changes from scripted installs
Branches
Unknown
Tags
Unknown