Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: "Aurélien Aptel" <aaptel@suse.com>
Cc: sfrench@samba.org, linux-cifs@vger.kernel.org
Subject: Re: v5.1-rc1 cifs bug: underflow; use-after-free.
Date: Tue, 26 Mar 2019 08:18:19 +0100	[thread overview]
Message-ID: <20190326071819.GA10639@light.dominikbrodowski.net> (raw)
In-Reply-To: <871s316bqi.fsf@suse.com>

On Wed, Mar 20, 2019 at 12:12:21PM +0100, Aurélien Aptel wrote:
> Dominik Brodowski <linux@dominikbrodowski.net> writes:
> > Thanks for taking a look at this issue. Fortunately, it is easily
> > reproducable (at least for me).
> 
> Which server are you doing this against? I couldn't reproduce against
> Windows Server 2016.

Had to find that out first, as I'm merely a user here: It's OES 2015 with
Samba version 3.6.3.

> >> If you enable verbose debugging [1], if my theory is correct you should
> >> see a lease break messsage followed by "clear cached root file handle"
> >> message before the warning.
> >
> > Hm, no.
> 
> Ok well I'm not sure what is happening then. But the final points still
> stand:
> 
> - since we don't free anything in the release function, there is no
>   use-after-free.
> - the access to the kref is already protected by crfid.fid_mutex so we
>   could replace it with a regular int and avoid the warning generated by
>   kref_put() that you see.  

If you have a patch ready, I can easily test that.

Thanks,
	Dominik

  reply	other threads:[~2019-03-26  7:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 11:51 v5.1-rc1 cifs bug: underflow; use-after-free Dominik Brodowski
2019-03-19 15:26 ` Aurélien Aptel
2019-03-19 15:47   ` Aurélien Aptel
2019-03-19 16:26   ` Dominik Brodowski
2019-03-20 11:12     ` Aurélien Aptel
2019-03-26  7:18       ` Dominik Brodowski [this message]
2019-03-26 12:39         ` [PATCH v1] CIFS: prevent refcount underflow Aurelien Aptel
2019-03-26 15:46           ` Dominik Brodowski
2019-03-26 16:53             ` Aurélien Aptel
2019-03-26 16:53               ` Dominik Brodowski
2019-03-27 22:36           ` Pavel Shilovsky
2019-03-27 23:44             ` ronnie sahlberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190326071819.GA10639@light.dominikbrodowski.net \
    --to=linux@dominikbrodowski.net \
    --cc=aaptel@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox