All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] io_uring: fix a use after free in io_async_task_func()
Date: Thu, 9 Jul 2020 12:47:37 +0300	[thread overview]
Message-ID: <20a7ee28-e08b-23a7-e090-da75e71b64c0@gmail.com> (raw)
In-Reply-To: <20200708195632.GW25523@casper.infradead.org>

On 08/07/2020 22:56, Matthew Wilcox wrote:
> On Wed, Jul 08, 2020 at 10:28:51PM +0300, Pavel Begunkov wrote:
>> On 08/07/2020 22:15, Jens Axboe wrote:
>>> On 7/8/20 12:47 PM, Dan Carpenter wrote:
>>>> The "apoll" variable is freed and then used on the next line.  We need
>>>> to move the free down a few lines.
>>>
>>> Thanks for spotting this Dan, applied.
>>
>> I wonder why gcc can't find it... It shouldn't be hard to do after
>> marking free-like functions with an attribute.
>>
>> Are there such tools for the kernel?
> 
> GCC doesn't have an __attribute__((free)) yet.  Martin Sebor is working on
> it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87736
> also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94527
> 
> (I just confirmed with him on IRC that he's still working on it; it's
> part of an ongoing larger project)

Good to know. It looks broader indeed, hence won't probably be here too soon.

-- 
Pavel Begunkov

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Begunkov <asml.silence@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] io_uring: fix a use after free in io_async_task_func()
Date: Thu, 09 Jul 2020 09:47:37 +0000	[thread overview]
Message-ID: <20a7ee28-e08b-23a7-e090-da75e71b64c0@gmail.com> (raw)
In-Reply-To: <20200708195632.GW25523@casper.infradead.org>

On 08/07/2020 22:56, Matthew Wilcox wrote:
> On Wed, Jul 08, 2020 at 10:28:51PM +0300, Pavel Begunkov wrote:
>> On 08/07/2020 22:15, Jens Axboe wrote:
>>> On 7/8/20 12:47 PM, Dan Carpenter wrote:
>>>> The "apoll" variable is freed and then used on the next line.  We need
>>>> to move the free down a few lines.
>>>
>>> Thanks for spotting this Dan, applied.
>>
>> I wonder why gcc can't find it... It shouldn't be hard to do after
>> marking free-like functions with an attribute.
>>
>> Are there such tools for the kernel?
> 
> GCC doesn't have an __attribute__((free)) yet.  Martin Sebor is working on
> it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id‡736
> also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id”527
> 
> (I just confirmed with him on IRC that he's still working on it; it's
> part of an ongoing larger project)

Good to know. It looks broader indeed, hence won't probably be here too soon.

-- 
Pavel Begunkov

  reply	other threads:[~2020-07-09  9:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 18:47 [PATCH] io_uring: fix a use after free in io_async_task_func() Dan Carpenter
2020-07-08 18:47 ` Dan Carpenter
2020-07-08 19:01 ` Pavel Begunkov
2020-07-08 19:01   ` Pavel Begunkov
2020-07-08 19:14   ` Jens Axboe
2020-07-08 19:14     ` Jens Axboe
2020-07-08 19:15 ` Jens Axboe
2020-07-08 19:15   ` Jens Axboe
2020-07-08 19:28   ` Pavel Begunkov
2020-07-08 19:28     ` Pavel Begunkov
2020-07-08 19:56     ` Matthew Wilcox
2020-07-08 19:56       ` Matthew Wilcox
2020-07-09  9:47       ` Pavel Begunkov [this message]
2020-07-09  9:47         ` Pavel Begunkov

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=20a7ee28-e08b-23a7-e090-da75e71b64c0@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=dan.carpenter@oracle.com \
    --cc=io-uring@vger.kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=willy@infradead.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 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.