All of lore.kernel.org
 help / color / mirror / Atom feed
From: PanBian <bianpan2016@163.com>
To: Chao Yu <yuchao0@huawei.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: read page index before freeing
Date: Tue, 27 Nov 2018 11:22:58 +0800	[thread overview]
Message-ID: <20181127032258.GA127317@bp> (raw)
In-Reply-To: <28fc6dc0-6f91-1551-57bb-769dc18b9f7b@huawei.com>

On Tue, Nov 27, 2018 at 11:12:40AM +0800, Chao Yu wrote:
> On 2018/11/27 8:22, PanBian wrote:
> > On Mon, Nov 26, 2018 at 07:07:08PM +0800, Chao Yu wrote:
> >> On 2018/11/26 18:28, PanBian wrote:
> >>> On Mon, Nov 26, 2018 at 05:13:53PM +0800, Chao Yu wrote:
> >>>> Hi Pan,
> >>>>
> >>>> On 2018/11/22 18:58, Pan Bian wrote:
> >>>>> The function truncate_node frees the page with f2fs_put_page. However,
> >>>>> the page index is read after that. So, the patch reads the index before
> >>>>> freeing the page.
> >>>>
> >>>> I notice that you found another use-after-free bug in ext4, out of
> >>>> curiosity, I'd like to ask how do you find those bugs? by tool or code review?
> >>>
> >>> I found such bugs by the aid of a tool I wrote recently. I designed a method 
> >>> to automatically find paired alloc/free functions. With such functions, I
> >>> wrote two checkers, one to check mismatched alloc/free bugs, the other to
> >>> check use-after-free and double-free bugs.
> >>
> >> Excellent! Do you have any plan to open its source or announce it w/ binary
> >> to linux kernel developers, I think w/ it we can help to improve kernel's
> >> code quality efficiently.
> > 
> > Yes. I am now writing a paper about the method. I will open the source code
> > as soon as I complete the paper and some optimizations.
> 
> Cool, if there is any progress, please let f2fs guys know, thank you in
> advance. :)

No problem. It's my honor to apply my tool to the Linux kernel.

> 
> Thanks,
> 

WARNING: multiple messages have this Message-ID (diff)
From: PanBian <bianpan2016@163.com>
To: Chao Yu <yuchao0@huawei.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: read page index before freeing
Date: Tue, 27 Nov 2018 11:22:58 +0800	[thread overview]
Message-ID: <20181127032258.GA127317@bp> (raw)
In-Reply-To: <28fc6dc0-6f91-1551-57bb-769dc18b9f7b@huawei.com>

On Tue, Nov 27, 2018 at 11:12:40AM +0800, Chao Yu wrote:
> On 2018/11/27 8:22, PanBian wrote:
> > On Mon, Nov 26, 2018 at 07:07:08PM +0800, Chao Yu wrote:
> >> On 2018/11/26 18:28, PanBian wrote:
> >>> On Mon, Nov 26, 2018 at 05:13:53PM +0800, Chao Yu wrote:
> >>>> Hi Pan,
> >>>>
> >>>> On 2018/11/22 18:58, Pan Bian wrote:
> >>>>> The function truncate_node frees the page with f2fs_put_page. However,
> >>>>> the page index is read after that. So, the patch reads the index before
> >>>>> freeing the page.
> >>>>
> >>>> I notice that you found another use-after-free bug in ext4, out of
> >>>> curiosity, I'd like to ask how do you find those bugs? by tool or code review?
> >>>
> >>> I found such bugs by the aid of a tool I wrote recently. I designed a method 
> >>> to automatically find paired alloc/free functions. With such functions, I
> >>> wrote two checkers, one to check mismatched alloc/free bugs, the other to
> >>> check use-after-free and double-free bugs.
> >>
> >> Excellent! Do you have any plan to open its source or announce it w/ binary
> >> to linux kernel developers, I think w/ it we can help to improve kernel's
> >> code quality efficiently.
> > 
> > Yes. I am now writing a paper about the method. I will open the source code
> > as soon as I complete the paper and some optimizations.
> 
> Cool, if there is any progress, please let f2fs guys know, thank you in
> advance. :)

No problem. It's my honor to apply my tool to the Linux kernel.

> 
> Thanks,
> 


  reply	other threads:[~2018-11-27  3:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 10:58 [PATCH] f2fs: read page index before freeing Pan Bian
2018-11-22 11:21 ` Chao Yu
2018-11-22 11:21   ` Chao Yu
2018-11-22 12:02   ` Jaegeuk Kim
2018-11-26  9:13 ` Chao Yu
2018-11-26  9:13   ` Chao Yu
2018-11-26 10:28   ` PanBian
2018-11-26 10:28     ` PanBian
2018-11-26 11:07     ` Chao Yu
2018-11-26 11:07       ` Chao Yu
2018-11-27  0:22       ` PanBian
2018-11-27  3:12         ` Chao Yu
2018-11-27  3:12           ` Chao Yu
2018-11-27  3:22           ` PanBian [this message]
2018-11-27  3:22             ` PanBian

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=20181127032258.GA127317@bp \
    --to=bianpan2016@163.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.