mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: syzbot <syzbot+76a43f2b4d34cfc53548@syzkaller.appspotmail.com>,
	akpm@osdl.org, deepa.kernel@gmail.com, hch@infradead.org,
	jlayton@kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, lkundrak@v3.sk,
	syzkaller-bugs@googlegroups.com, tklauser@nuerscht.ch,
	trond.myklebust@fys.uio.no
Subject: Re: KASAN: use-after-free Read in mnt_warn_timestamp_expiry
Date: Wed, 16 Oct 2019 19:27:05 -0700	[thread overview]
Message-ID: <20191017022705.GB1552@sol.localdomain> (raw)
In-Reply-To: <20191017015853.GR26530@ZenIV.linux.org.uk>

On Thu, Oct 17, 2019 at 02:58:53AM +0100, Al Viro wrote:
> On Wed, Oct 16, 2019 at 06:47:55PM -0700, Eric Biggers wrote:
> > On Wed, Oct 16, 2019 at 06:42:11PM -0700, syzbot wrote:
> > > ==================================================================
> > > BUG: KASAN: use-after-free in mnt_warn_timestamp_expiry+0x4a/0x250
> > > fs/namespace.c:2471
> > > Read of size 8 at addr ffff888099937328 by task syz-executor.1/18510
> > > 
> > 
> > Looks like a duplicate of this:
> > 
> > #syz dup: KASAN: use-after-free Read in do_mount
> > 
> > See the existing thread and proposed fix here:
> > https://lkml.kernel.org/linux-fsdevel/000000000000805e5505945a234b@google.com/T/#u
> 
> FWIW, I'd go with your "move mnt_warn_timestamp_expiry() up".  However,
> I'd probably turn the message into something like
> 	foofs filesystem getting mounted at /mnt/barf supports...
> And s/mounted/reconfigured/ if mnt_has_parent(mnt) is already true.
> 
> Objections?
> 

How about the following?

	pr_warn("%s filesystem being %s at %s supports timestamps until %04ld (0x%llx)\n",
		sb->s_type->name,
		is_mounted(mnt) ? "remounted" : "mounted",
		mntpath,
		tm.tm_year+1900, (unsigned long long)sb->s_time_max);

I think more people would understand "remounted" than "reconfigured".  Also,
is_mounted(mnt) seems like a better choice than mnt_has_parent(real_mount(mnt)).

- Eric

  reply	other threads:[~2019-10-17  2:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17  1:42 syzbot
2019-10-17  1:47 ` Eric Biggers
2019-10-17  1:58   ` Al Viro
2019-10-17  2:27     ` Eric Biggers [this message]
2019-10-17  2:37       ` Al Viro
2019-10-17  2:50         ` Eric Biggers

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=20191017022705.GB1552@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=akpm@osdl.org \
    --cc=deepa.kernel@gmail.com \
    --cc=hch@infradead.org \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=syzbot+76a43f2b4d34cfc53548@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tklauser@nuerscht.ch \
    --cc=trond.myklebust@fys.uio.no \
    --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

all inboxes | Powered by JetHome®