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: <CAH2r5mue1Xgx+rotMta_Em03-E=wij-w_-i3eoj9rQsA-R9DPg@mail.gmail.com>
Date: Fri, 9 Feb 2024 23:46:00 -0600
From: Steve French <smfrench@...il.com>
To: Fullway Wang <fullwaywang@...look.com>
Cc: sfrench@...ba.org, pc@...guebit.com, lsahlber@...hat.com, 
	sprasad@...rosoft.com, linux-cifs@...r.kernel.org, 
	linux-kernel@...r.kernel.org, fullwaywang@...cent.com
Subject: Re: [PATCH] fs: smb: client: Reset password pointer to NULL

On Thu, Jan 18, 2024 at 1:44 AM Fullway Wang <fullwaywang@...look.com> wrote:
>
> ctx->password was freed but not reset to NULL, which may lead to double
> free and secrets leak issues.

But no one else could use this pointer to double free this since it is
allocated in this function, and exits a few lines after it is freed
(and its parent is freed on the next line so the pointer could not be
accessed either)


> This is similar to CVE-2023-5345, which was fixed in commit e6e43b8.
>
> Signed-off-by: Fullway Wang <fullwaywang@...look.com>
> ---
>  fs/smb/client/connect.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
> index 3052a208c6ca..fb96a234b9b1 100644
> --- a/fs/smb/client/connect.c
> +++ b/fs/smb/client/connect.c
> @@ -4028,6 +4028,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid)
>  out:
>         kfree(ctx->username);
>         kfree_sensitive(ctx->password);
> +       ctx->password = NULL;
>         kfree(ctx);
>
>         return tcon;
> --
> 2.39.3 (Apple Git-145)
>
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ