public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Haimin Zhang <tcs.kernel@gmail.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	David Howells <dhowells@redhat.com>,
	"Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Haimin Zhang <tcs_kernel@tencent.com>,
	TCS Robot <tcs_robot@tencent.com>, Lee Jones <lee@kernel.org>
Subject: Re: [PATCH v2] fs/pipe: Deinitialize the watch_queue when pipe is freed
Date: Tue, 9 Aug 2022 16:38:07 +0100	[thread overview]
Message-ID: <YvJ/XzuyWbZT2dlO@google.com> (raw)
In-Reply-To: <YumdcdmPxqmx3AQc@sol.localdomain>

On Tue, 02 Aug 2022, Eric Biggers wrote:

> On Tue, Jul 19, 2022 at 03:04:41PM +0100, Lee Jones wrote:
> > On Wed, 06 Jul 2022, Lee Jones wrote:
> > 
> > > On Mon, 09 May 2022, Eric Biggers wrote:
> > > 
> > > > On Mon, May 09, 2022 at 09:17:26PM +0800, Haimin Zhang wrote:
> > > > > From: Haimin Zhang <tcs_kernel@tencent.com>
> > > > > 
> > > > > Add a new function call to deinitialize the watch_queue of a freed pipe.
> > > > > When a pipe node is freed, it doesn't make pipe->watch_queue->pipe null.
> > > > > Later when function post_one_notification is called, it will use this
> > > > > field, but it has been freed and watch_queue->pipe is a dangling pointer.
> > > > > It makes a uaf issue.
> > > > > Check wqueu->defunct before pipe check since pipe becomes invalid once all
> > > > > watch queues were cleared.
> > > > > 
> > > > > Reported-by: TCS Robot <tcs_robot@tencent.com>
> > > > > Signed-off-by: Haimin Zhang <tcs_kernel@tencent.com>
> > > > 
> > > > Is this fixing something?  If so it should have a "Fixes" tag.
> > > 
> > > It sure is.
> > > 
> > > Haimin, are you planning a v3?
> > 
> > This patch is set to fix a pretty public / important bug.
> > 
> > Has there been any more activity that I may have missed?
> > 
> > Perhaps it's been superseded?
> 
> I think this was already fixed (correctly, unlike the above patch which is very
> broken) by the following commit:
> 
> 	commit 353f7988dd8413c47718f7ca79c030b6fb62cfe5
> 	Author: Linus Torvalds <torvalds@linux-foundation.org>
> 	Date:   Tue Jul 19 11:09:01 2022 -0700
> 
> 	    watchqueue: make sure to serialize 'wqueue->defunct' properly

Thanks Eric, I'll back-port this one instead.

-- 
DEPRECATED: Please use lee@kernel.org

  reply	other threads:[~2022-08-09 15:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 13:17 [PATCH v2] fs/pipe: Deinitialize the watch_queue when pipe is freed Haimin Zhang
2022-05-09 20:50 ` Eric Biggers
2022-07-06  9:39   ` Lee Jones
2022-07-19 14:04     ` Lee Jones
2022-08-02 21:56       ` Eric Biggers
2022-08-09 15:38         ` Lee Jones [this message]
2022-08-09 18:06           ` Eric Biggers
2022-08-09 18:17             ` Lee Jones
2022-05-10  0:34 ` kernel test robot

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=YvJ/XzuyWbZT2dlO@google.com \
    --to=lee.jones@linaro.org \
    --cc=dhowells@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=fmdefrancesco@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tcs.kernel@gmail.com \
    --cc=tcs_kernel@tencent.com \
    --cc=tcs_robot@tencent.com \
    --cc=viro@zeniv.linux.org.uk \
    /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