From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
syzbot <syzbot+6455648abc28dbdd1e7f@syzkaller.appspotmail.com>,
keyrings@vger.kernel.org,
LSM List <linux-security-module@vger.kernel.org>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: WARNING: refcount bug in find_key_to_update
Date: Fri, 18 Oct 2019 10:54:07 +0000 [thread overview]
Message-ID: <b211005b-75de-7936-c97a-817f7100415a@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20191017160028.GA726@sol.localdomain>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="maccentraleurope", Size: 1338 bytes --]
On 2019/10/18 1:00, Eric Biggers wrote:
> The key is supposed to have refcount >= 1 since it's in a keyring.
> So some bug is causing it to have refcount 0. Perhaps some place calling
> key_put() too many times.
>
> Unfortunately I can't get the reproducer to work locally.
>
> Note that there are 2 other syzbot reports that look related.
> No reproducers for them, though:
>
> Title: KASAN: use-after-free Read in key_put
> Last occurred: 1 day ago
> Reported: 28 days ago
> Branches: Mainline
> Dashboard link: https://syzkaller.appspot.com/bug?idñ3750b1124e01191250cf930086dcc40740fa30
> Original thread: https://lore.kernel.org/lkml/0000000000008c3e590592cf4b7f@google.com/T/#u
>
> Title: KASAN: use-after-free Read in keyring_compare_object
> Last occurred: 49 days ago
> Reported: 84 days ago
> Branches: Mainline
> Dashboard link: https://syzkaller.appspot.com/bug?idR9ab6a98286c2a97c445988a62760a58d4a1d4b
> Original thread: https://lore.kernel.org/lkml/000000000000038ef6058e6f3592@google.com/T/#u
>
I don't know about keys, but I rather suspect lack of serialization locks between
"looking up for checking existing keys" versus "looking up for garbage collection".
Can we dump locks held by current thread when panic() is called?
WARNING: multiple messages have this Message-ID (diff)
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
syzbot <syzbot+6455648abc28dbdd1e7f@syzkaller.appspotmail.com>,
keyrings@vger.kernel.org,
LSM List <linux-security-module@vger.kernel.org>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: WARNING: refcount bug in find_key_to_update
Date: Fri, 18 Oct 2019 19:54:07 +0900 [thread overview]
Message-ID: <b211005b-75de-7936-c97a-817f7100415a@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <20191017160028.GA726@sol.localdomain>
On 2019/10/18 1:00, Eric Biggers wrote:
> The key is supposed to have refcount >= 1 since it's in a keyring.
> So some bug is causing it to have refcount 0. Perhaps some place calling
> key_put() too many times.
>
> Unfortunately I can't get the reproducer to work locally.
>
> Note that there are 2 other syzbot reports that look related.
> No reproducers for them, though:
>
> Title: KASAN: use-after-free Read in key_put
> Last occurred: 1 day ago
> Reported: 28 days ago
> Branches: Mainline
> Dashboard link: https://syzkaller.appspot.com/bug?id=f13750b1124e01191250cf930086dcc40740fa30
> Original thread: https://lore.kernel.org/lkml/0000000000008c3e590592cf4b7f@google.com/T/#u
>
> Title: KASAN: use-after-free Read in keyring_compare_object
> Last occurred: 49 days ago
> Reported: 84 days ago
> Branches: Mainline
> Dashboard link: https://syzkaller.appspot.com/bug?id=529ab6a98286c2a97c445988a62760a58d4a1d4b
> Original thread: https://lore.kernel.org/lkml/000000000000038ef6058e6f3592@google.com/T/#u
>
I don't know about keys, but I rather suspect lack of serialization locks between
"looking up for checking existing keys" versus "looking up for garbage collection".
Can we dump locks held by current thread when panic() is called?
next prev parent reply other threads:[~2019-10-18 10:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 1:42 WARNING: refcount bug in find_key_to_update syzbot
2019-10-17 1:42 ` syzbot
2019-10-17 2:42 ` syzbot
2019-10-17 2:42 ` syzbot
2019-10-17 2:42 ` syzbot
2019-10-17 15:53 ` Linus Torvalds
2019-10-17 15:53 ` Linus Torvalds
2019-10-17 15:53 ` Linus Torvalds
2019-10-17 16:00 ` Eric Biggers
2019-10-17 16:00 ` Eric Biggers
2019-10-17 16:00 ` Eric Biggers
2019-10-18 10:54 ` Tetsuo Handa [this message]
2019-10-18 10:54 ` Tetsuo Handa
2019-10-18 16:45 ` David Howells
2019-10-18 16:45 ` David Howells
2019-10-18 16:38 ` David Howells
2019-10-18 16:38 ` David Howells
2019-10-18 16:38 ` David Howells
2019-10-22 10:35 ` David Howells
2019-10-22 10:35 ` David Howells
2019-10-22 10:35 ` David Howells
2019-10-22 13:17 ` David Howells
2019-10-22 13:17 ` David Howells
2019-10-22 13:17 ` David Howells
2019-10-21 15:59 ` David Howells
2019-10-21 15:59 ` David Howells
2019-10-21 16:05 ` Dmitry Vyukov
2019-10-21 16:05 ` Dmitry Vyukov
[not found] <20191017092428.7336-1-hdanton@sina.com>
2019-10-18 16:46 ` David Howells
2019-10-18 16:46 ` David Howells
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=b211005b-75de-7936-c97a-817f7100415a@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=ebiggers@kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=syzbot+6455648abc28dbdd1e7f@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=torvalds@linux-foundation.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.