Skip to content

Commit 6519a8f

Browse files
committed
NFSv4: Fix memory leak in nfs4_set_security_label
jira LE-1907 cve CVE-2024-41076 Rebuild_History Non-Buildable kernel-5.14.0-427.33.1.el9_4 commit-author Dmitry Mastykin <mastichi@gmail.com> commit aad1147 We leak nfs_fattr and nfs4_label every time we set a security xattr. Signed-off-by: Dmitry Mastykin <mastichi@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> (cherry picked from commit aad1147) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 7074060 commit 6519a8f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6243,6 +6243,7 @@ nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen)
62436243
if (status == 0)
62446244
nfs_setsecurity(inode, fattr);
62456245

6246+
nfs_free_fattr(fattr);
62466247
return status;
62476248
}
62486249
#endif /* CONFIG_NFS_V4_SECURITY_LABEL */

0 commit comments

Comments
 (0)