nfssvc: Zero the buffer copied out when NFSSVC_DUMPMNTOPTS is set
Reported by: KMSAN MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
2e5f615295
commit
7a9bc8a82e
@ -1312,7 +1312,8 @@ nfssvc_nfscl(struct thread *td, struct nfssvc_args *uap)
|
||||
error = EINVAL;
|
||||
}
|
||||
if (error == 0) {
|
||||
buf = malloc(dumpmntopts.ndmnt_blen, M_TEMP, M_WAITOK);
|
||||
buf = malloc(dumpmntopts.ndmnt_blen, M_TEMP, M_WAITOK |
|
||||
M_ZERO);
|
||||
nfscl_retopts(VFSTONFS(nd.ni_vp->v_mount), buf,
|
||||
dumpmntopts.ndmnt_blen);
|
||||
vput(nd.ni_vp);
|
||||
|
Loading…
Reference in New Issue
Block a user