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
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31167

Details

Provenance
markjAuthored on Jul 15 2021, 4:18 PM
Reviewer
rmacklem
Differential Revision
D31167: nfsclient: Avoid copying uninitialized bytes into statfs
Parents
rG81f95106b8c1: pf: Constify tag name and queue name helper functions
Branches
Unknown
Tags
Unknown