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: <CAH2r5mu2FkMGNKrbU+Kt3BeutzM4AyKZFjbWXg+zioPzQofDSw@mail.gmail.com>
Date: Fri, 9 Aug 2024 10:46:52 -0500
From: Steve French <smfrench@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Su Hui <suhui@...china.com>, David Howells <dhowells@...hat.com>, sfrench@...ba.org, 
	pc@...guebit.com, ronniesahlberg@...il.com, sprasad@...rosoft.com, 
	tom@...pey.com, bharathsm@...rosoft.com, nathan@...nel.org, 
	ndesaulniers@...gle.com, morbo@...gle.com, justinstitt@...gle.com, 
	linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org, 
	linux-kernel@...r.kernel.org, llvm@...ts.linux.dev, 
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] smb/client: avoid possible NULL dereference in cifs_free_subrequest()

Updated patch to change Fixes tag and Cc: David


On Fri, Aug 9, 2024 at 10:42 AM Steve French <smfrench@...il.com> wrote:
>
> On Fri, Aug 9, 2024 at 10:11 AM Dan Carpenter <dan.carpenter@...aro.org> wrote:
> >
> > On Fri, Aug 09, 2024 at 06:00:26PM +0300, Dan Carpenter wrote:
> > > On Thu, Aug 08, 2024 at 08:23:32PM +0800, Su Hui wrote:
> > > > Clang static checker (scan-build) warning:
> > > >     cifsglob.h:line 890, column 3
> > > >     Access to field 'ops' results in a dereference of a null pointer.
> > > >
> > > > Commit 519be989717c ("cifs: Add a tracepoint to track credits involved in
> > > > R/W requests") adds a check for 'rdata->server', and let clang throw this
> > > > warning about NULL dereference.
> > > >
> > > > When 'rdata->credits.value != 0 && rdata->server == NULL' happens,
> > > > add_credits_and_wake_if() will call rdata->server->ops->add_credits().
> > > > This will cause NULL dereference problem. Add a check for 'rdata->server'
> > > > to avoid NULL dereference.
> > > >
> > > > Signed-off-by: Su Hui <suhui@...china.com>
> > >
> > > Needs a Fixes tag.
> > >
> > > Also when you add a Fixes tag, then get_maintainer will add the David Howells
> > > automatically.  I've added him manually.
> > >
> >
> > Actually, David should have been CC'd but the fixes tag wouldn't have pointed
> > to his patch.
> >
> > This is an inconsistent NULL checking warning.  It's not clear to me if the NULL
> > checks should be removed or more added.  If David were trying to fix a NULL
> > pointer dereference and accidentally left one unchecked dereference out then the
> > Fixes tag would point to his patch.  Since David was doing something unrelated
>
> Looks like (if this is even possible for server to to be null) then I
> will need to change
> the fixes to commit 69c3c023af25. I will update the tag in the current
> patch in for-next
>
> Author: David Howells <dhowells@...hat.com>
> Date:   Fri Oct 6 18:16:15 2023 +0100
>
>     cifs: Implement netfslib hooks
>
>     Provide implementation of the netfslib hooks that will be used by netfslib
>     to ask cifs to set up and perform operations.
> --
> Thanks,
>
> Steve



-- 
Thanks,

Steve

View attachment "0001-smb-client-avoid-possible-NULL-dereference-in-cifs_f.patch" of type "text/x-patch" (2025 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ