[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <182621f8dca.1e0e6161130907.1470656861897824669@siddh.me>
Date: Wed, 03 Aug 2022 10:43:31 +0530
From: Siddh Raman Pant <code@...dh.me>
To: "Eric Biggers" <ebiggers@...nel.org>
Cc: "David Howells" <dhowells@...hat.com>,
"Christophe JAILLET" <christophe.jaillet@...adoo.fr>,
"Eric Dumazet" <edumazet@...gle.com>,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>,
"linux-security-modules" <linux-security-module@...r.kernel.org>,
"linux-kernel" <linux-kernel@...r.kernel.org>,
"linux-kernel-mentees"
<linux-kernel-mentees@...ts.linuxfoundation.org>,
"syzbot+c70d87ac1d001f29a058"
<syzbot+c70d87ac1d001f29a058@...kaller.appspotmail.com>
Subject: Re: [PATCH v3] kernel/watch_queue: Make pipe NULL while clearing
watch_queue
On Wed, 03 Aug 2022 09:42:28 +0530 Eric Biggers <ebiggers@...nel.org> wrote:
> Under what circumstances is the pipe pointer still being dereferenced after the
> pipe has been freed? I don't see how it can be; see my explanation above.
It really didn't fix the crash. It caused the same crash reported here, which
I was already locally getting:
https://syzkaller.appspot.com/bug?extid=03d7b43290037d1f87ca
(It's same because __post_watch_notification calls post_one_notification, and
this patch seems to stop that crash too, as was verified by Dipanjan here).
While it has been fixed by e64ab2dbd882 ("watch_queue: Fix missing locking in
add_watch_to_object()"), it just shows there can be paths leading to it. (Also,
I posted this patch (v1, v2, v3) before that even landed, so I had no way of
knowing about it).
There is a null check in post_one_notification for the pipe, most probably
because it *expects* the pointer to be NULL'd. Also, there is no reason to have
a dangling pointer stay, it's just a recipe for further bugs.
Thanks,
Siddh
Powered by blists - more mailing lists