From: Al Viro <viro@ZenIV.linux.org.uk>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] exit: move exit_task_namespaces() after exit_task_work()
Date: Thu, 14 Dec 2017 21:08:17 +0000 [thread overview]
Message-ID: <20171214210817.GF21978@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20171214201757.5393-1-xiyou.wangcong@gmail.com>
On Thu, Dec 14, 2017 at 12:17:57PM -0800, Cong Wang wrote:
> syzbot reported we have a use-after-free when mqueue_evict_inode()
> is called on __cleanup_mnt() path, where the ipc ns is already
> freed by the previous exit_task_namespaces(). We can just move
> it after after exit_task_work() to avoid this use-after-free.
What's to prevent somebody else holding a reference to the same
inode past the exit(2)? IOW, I don't believe that this is fixing
anything - in the best case, your patch papers over a specific
reproducer.
next prev parent reply other threads:[~2017-12-14 21:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 20:17 [PATCH] exit: move exit_task_namespaces() after exit_task_work() Cong Wang
2017-12-14 21:08 ` Al Viro [this message]
2017-12-15 23:59 ` Cong Wang
2017-12-16 22:04 ` Giuseppe Scrivano
2017-12-15 6:56 ` Eric W. Biederman
2017-12-15 7:35 ` Dmitry Vyukov
2017-12-15 8:00 ` Dmitry Vyukov
2017-12-16 0:00 ` Cong Wang
2017-12-16 7:40 ` Dmitry Vyukov
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=20171214210817.GF21978@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=xiyou.wangcong@gmail.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.