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: <CAH2r5mukVacAnksOjDE7k4UOSwzkkkA4PXEaKZAzZcFz78YBgQ@mail.gmail.com>
Date: Wed, 19 Mar 2025 14:37:19 -0500
From: Steve French <smfrench@...il.com>
To: Alexandra Diupina <adiupina@...ralinux.ru>
Cc: Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.com>, 
	Ronnie Sahlberg <ronniesahlberg@...il.com>, Shyam Prasad N <sprasad@...rosoft.com>, 
	Tom Talpey <tom@...pey.com>, Bharath SM <bharathsm@...rosoft.com>, 
	Pavel Shilovsky <pshilov@...rosoft.com>, linux-cifs@...r.kernel.org, 
	samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org, 
	lvc-project@...uxtesting.org, Aurélien Aptel <aaptel@...ba.org>
Subject: Re: [PATCH v2] cifs: avoid NULL pointer dereference in dbg call

Added to cifs-2.6.git for-next

On Wed, Mar 19, 2025 at 10:00 AM Alexandra Diupina
<adiupina@...ralinux.ru> wrote:
>
> cifs_server_dbg() implies server to be non-NULL so
> move call under condition to avoid NULL pointer dereference.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: e79b0332ae06 ("cifs: ignore cached share root handle closing errors")
> Signed-off-by: Alexandra Diupina <adiupina@...ralinux.ru>
> ---
> v2: fix indentation
>  fs/smb/client/smb2misc.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/fs/smb/client/smb2misc.c b/fs/smb/client/smb2misc.c
> index f3c4b70b77b9..c02aab58aade 100644
> --- a/fs/smb/client/smb2misc.c
> +++ b/fs/smb/client/smb2misc.c
> @@ -816,11 +816,12 @@ smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid,
>                 WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative");
>                 spin_unlock(&cifs_tcp_ses_lock);
>
> -               if (tcon->ses)
> +               if (tcon->ses) {
>                         server = tcon->ses->server;
> -
> -               cifs_server_dbg(FYI, "tid=0x%x: tcon is closing, skipping async close retry of fid %llu %llu\n",
> -                               tcon->tid, persistent_fid, volatile_fid);
> +                       cifs_server_dbg(FYI,
> +                                       "tid=0x%x: tcon is closing, skipping async close retry of fid %llu %llu\n",
> +                                       tcon->tid, persistent_fid, volatile_fid);
> +               }
>
>                 return 0;
>         }
> --
> 2.30.2
>
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ