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

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
rGe846a3e0168f: ctl: Use ctl_io_sbuf in ctl_process_done
Branches
Unknown
Tags
Unknown