lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <04bcde52ddd657ef9d9380b6e810671c0e763fb9.camel@hammerspace.com>
Date: Wed, 22 May 2024 12:25:05 +0000
From: Trond Myklebust <trondmy@...merspace.com>
To: "anna@...nel.org" <anna@...nel.org>, "linux-nfs@...r.kernel.org"
	<linux-nfs@...r.kernel.org>, "mastichi@...il.com" <mastichi@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] NFSv4: Fix memory leak in nfs4_set_security_label

On Wed, 2024-05-22 at 10:45 +0300, Dmitry Mastykin wrote:
> [You don't often get email from mastichi@...il.com. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> We leak nfs_fattr and nfs4_label every time we set a security xattr.
> 
> Signed-off-by: Dmitry Mastykin <mastichi@...il.com>
> ---
>  fs/nfs/nfs4proc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index ea390db94b62..d400093a2fff 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -6268,6 +6268,7 @@ nfs4_set_security_label(struct inode *inode,
> const void *buf, size_t buflen)
>         if (status == 0)
>                 nfs_setsecurity(inode, fattr);
> 
> +       nfs_free_fattr(fattr);
>         return status;
>  }
>  #endif /* CONFIG_NFS_V4_SECURITY_LABEL */
> --
> 2.30.2
> 

Thanks! For future reference, please note the section on indenting in
the file Documentation/process/coding-style.rst as your patch above was
whitespace-broken and so didn't apply cleanly.
Since this was just a 1-liner, I've fixed it up for now, so no need to
resubmit.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ