From: David Howells <dhowells@redhat.com>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: dhowells@redhat.com,
Linus Torvalds <torvalds@linux-foundation.org>,
syzbot <syzbot+6455648abc28dbdd1e7f@syzkaller.appspotmail.com>,
aou@eecs.berkeley.edu,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
James Morris James Morris <jmorris@namei.org>,
keyrings@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-riscv@lists.infradead.org,
LSM List <linux-security-module@vger.kernel.org>,
Palmer Dabbelt <palmer@sifive.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: WARNING: refcount bug in find_key_to_update
Date: Tue, 22 Oct 2019 14:17:36 +0100 [thread overview]
Message-ID: <24777.1571750256@warthog.procyon.org.uk> (raw)
In-Reply-To: <11434.1571740533@warthog.procyon.org.uk>
Okay, I managed to catch a backtrace for this line:
encrypted_key: key user:syz not found (-126)
looking like:
CPU: 0 PID: 8878 Comm: syz-executor.0 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
dump_stack+0x172/0x1f0
request_master_key.isra.0.cold+0x62/0xc3
encrypted_read+0x221/0x830
? get_derived_key+0xf0/0xf0
? keyctl_read_key+0x1c2/0x2b0
? __kasan_check_write+0x14/0x20
? down_read+0x109/0x430
? security_key_permission+0x8d/0xc0
? down_read_killable+0x490/0x490
? key_task_permission+0x1b5/0x3a0
keyctl_read_key+0x231/0x2b0
__x64_sys_keyctl+0x171/0x470
do_syscall_64+0xfa/0x760
entry_SYSCALL_64_after_hwframe+0x49/0xbe
So something somewhere is calling keyctl_read() in userspace on the encrypted
key and that is then referring across to the user key added.
Also, the encrypted key is being given the following payload:
ENCRYPTED: 'new default user:syz 04096'
in at least one of the cases that encrypted_update() being called.
David
next prev parent reply other threads:[~2019-10-22 13:17 UTC|newest]
Thread overview: 12+ 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 2:42 ` syzbot
2019-10-17 15:53 ` Linus Torvalds
2019-10-17 16:00 ` Eric Biggers
2019-10-18 10:54 ` Tetsuo Handa
2019-10-18 16:45 ` David Howells
2019-10-18 16:38 ` David Howells
2019-10-22 10:35 ` David Howells
2019-10-22 13:17 ` David Howells [this message]
2019-10-21 15:59 ` David Howells
2019-10-21 16:05 ` Dmitry Vyukov
[not found] <20191017092428.7336-1-hdanton@sina.com>
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=24777.1571750256@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=aou@eecs.berkeley.edu \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-security-module@vger.kernel.org \
--cc=palmer@sifive.com \
--cc=serge@hallyn.com \
--cc=syzbot+6455648abc28dbdd1e7f@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=torvalds@linux-foundation.org \
--cc=zohar@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).