From: Al Viro <viro@zeniv.linux.org.uk>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-fsdevel@vger.kernel.org,
Deepa Dinamani <deepa.kernel@gmail.com>,
Arnd Bergmann <arnd@arndb.de>, Jeff Layton <jlayton@kernel.org>
Subject: Re: [PATCH v2] fs/namespace.c: fix use-after-free of mount in mnt_warn_timestamp_expiry()
Date: Thu, 17 Oct 2019 04:15:46 +0100 [thread overview]
Message-ID: <20191017031546.GT26530@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20191017024814.61980-1-ebiggers@kernel.org>
On Wed, Oct 16, 2019 at 07:48:14PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> After do_add_mount() returns success, the caller doesn't hold a
> reference to the 'struct mount' anymore. So it's invalid to access it
> in mnt_warn_timestamp_expiry().
>
> Fix it by calling mnt_warn_timestamp_expiry() before do_add_mount()
> rather than after, and adjusting the warning message accordingly.
>
> Reported-by: syzbot+da4f525235510683d855@syzkaller.appspotmail.com
> Fixes: f8b92ba67c5d ("mount: Add mount warning for impending timestamp expiry")
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied to #fixes and pushed
prev parent reply other threads:[~2019-10-17 3:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 2:48 [PATCH v2] fs/namespace.c: fix use-after-free of mount in mnt_warn_timestamp_expiry() Eric Biggers
2019-10-17 3:15 ` Al Viro [this message]
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=20191017031546.GT26530@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=arnd@arndb.de \
--cc=deepa.kernel@gmail.com \
--cc=ebiggers@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.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.