Skip to content
Commit 75a9b917 authored by Scott Mayhew's avatar Scott Mayhew Committed by Anna Schumaker
Browse files

NFS: Fix leak of ctx->nfs_server.hostname



If userspace passes an nfs_mount_data struct in the data argument of
mount(2), then nfs23_parse_monolithic() or nfs4_parse_monolithic()
will allocate memory for ctx->nfs_server.hostname.  This needs to be
freed in nfs_parse_source(), which also allocates memory for
ctx->nfs_server.hostname, otherwise a leak will occur.

Reported-by: default avatar <syzbot+193c375dcddb4f345091@syzkaller.appspotmail.com>
Fixes: f2aedb71 ("NFS: Add fs_context support.")
Signed-off-by: default avatarScott Mayhew <smayhew@redhat.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 1821b26a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment