mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: syzbot <syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com>
Cc: gscrivan@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	viro@zeniv.linux.org.uk
Subject: Re: KASAN: null-ptr-deref Read in filp_close
Date: Thu, 17 Dec 2020 17:44:29 +0100	[thread overview]
Message-ID: <20201217164429.ms6c5csz6wl5ruzg@wittgenstein> (raw)
In-Reply-To: <000000000000a3962305b6ab0077@google.com>

On Thu, Dec 17, 2020 at 07:54:09AM -0800, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    5e60366d Merge tag 'fallthrough-fixes-clang-5.11-rc1' of g..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=15f15413500000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=db720fe37a6a41d8
> dashboard link: https://syzkaller.appspot.com/bug?extid=96cfd2b22b3213646a93
> compiler:       gcc (GCC) 10.1.0-syz 20200507
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10e1a00b500000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1128e41f500000
> 
> The issue was bisected to:
> 
> commit 582f1fb6b721facf04848d2ca57f34468da1813e
> Author: Giuseppe Scrivano <gscrivan@redhat.com>
> Date:   Wed Nov 18 10:47:45 2020 +0000
> 
>     fs, close_range: add flag CLOSE_RANGE_CLOEXEC
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=16e85613500000
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=15e85613500000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11e85613500000
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com
> Fixes: 582f1fb6b721 ("fs, close_range: add flag CLOSE_RANGE_CLOEXEC")

Ok, I think the bug is simply that max_fd is not correctly updated when
CLOSE_RANGE_UNSHARE is combined with CLOSE_RANGE_CLOEXEC.
I'll write a patch for syszbot to chew on.

Christian

      reply	other threads:[~2020-12-17 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 15:54 syzbot
2020-12-17 16:44 ` Christian Brauner [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=20201217164429.ms6c5csz6wl5ruzg@wittgenstein \
    --to=christian.brauner@ubuntu.com \
    --cc=gscrivan@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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

all inboxes | Powered by JetHome®