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)
Fri, Sep 11, 4:50 AM
Unknown Object (File)
Wed, Sep 9, 12:54 AM
Unknown Object (File)
Sat, Sep 5, 3:14 PM
Unknown Object (File)
Sat, Sep 5, 8:20 AM
Unknown Object (File)
Sat, Sep 5, 4:31 AM
Unknown Object (File)
Sat, Sep 5, 1:34 AM
Unknown Object (File)
Fri, Sep 4, 5:10 PM
Unknown Object (File)
Fri, Sep 4, 7:35 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