HomeFreeBSD

nfsclient: Avoid copying uninitialized bytes into statfs

Description

nfsclient: Avoid copying uninitialized bytes into statfs

hst will be nul-terminated but the remaining space in the buffer is left
uninitialized. Avoid copying the entire buffer to ensure that
uninitialized bytes are not leaked via statfs(2).

Reported by: KMSAN
Reviewed by: rmacklem
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 44de1834b53f4654cc2f6d76406f5705f8167927)

Details

Provenance
markjAuthored on Jul 15 2021, 4:18 PM
Parents
rGe504e98ab5e6: arm64: Print CPU features slightly earlier
Branches
Unknown
Tags
Unknown