[PATCH] SMB2 Compound related chain handling when generation of FileId has failed

anubhav rakshit anubhav.rakshit at gmail.com
Tue May 19 11:08:38 UTC 2020


On Tue, May 19, 2020 at 4:01 AM Jeremy Allison <jra at samba.org> wrote:

> On Mon, May 18, 2020 at 06:06:14PM +0200, Ralph Boehme via samba-technical
> wrote:
> > Am 5/18/20 um 6:00 PM schrieb anubhav rakshit:
> > >
> > >
> > > On Mon, May 18, 2020 at 8:37 PM Ralph Boehme <slow at samba.org
> > > <mailto:slow at samba.org>> wrote:
> > >
> > >     Am 5/18/20 um 5:02 PM schrieb anubhav rakshit:
> > >     > Hi Ralph,
> > >     > I am attaching additional test case that would verify
> > >     > Create(RO)->Read->Write->Read->Close chain. As expected we see
> Write
> > >     > failing with ACCESS DENIED.
> > >
> > >     yes, that's as expected. WHat about the read?
> > >
> > > Both the Reads succeed.
> >
> > cool, slow: 1, metze: 0: :)))
> >
> > >     Also, CI fails with the new code:
> > >
> > >     https://gitlab.com/samba-team/devel/samba/-/jobs/557045164
> > >
> > >     I have no clue to offer atm why this fails in an unrelated test.
> Sorry!
> > >
> > > Let me triage the failure.
>
> Ah, I think I've found the problem.
>
> In smbd_smb2_request_dispatch() when
> file_fsp_smb2() fails to find a file
> handle you're unconditionally checking
> and returning req->compound_create_err
> if it's not NULL. You should only check
> and return that if it's in a compound
> request (req->compound_related == true).
>
>
Thats a good catch! Thanks for looking.


> I have an updated patchset that fixes
> this (attached). I'm running in gitlab-ci
> now.
>
> Before we proceed, have you filled in
> the Samba copyright policy form here:
>
> https://www.samba.org/samba/devel/copyright-policy.html
>
> If not, email it in - that way we know we've
> got the rights to integrate the code !
>
> Cheers,
>
>         Jeremy.
>


More information about the samba-technical mailing list