All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: alexandre.belloni@bootlin.com, andreyknvl@google.com,
	arnd@arndb.de, gregkh@linuxfoundation.org,
	herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	lvivier@redhat.com, mchehab+samsung@kernel.org, mpm@selenic.com,
	syzbot <syzbot+6d8505fcdf25f00ac276@syzkaller.appspotmail.com>,
	syzkaller-bugs@googlegroups.com, tytso@mit.edu
Subject: Re: KASAN: use-after-free Read in chaoskey_disconnect
Date: Fri, 15 Nov 2019 10:19:20 -0800	[thread overview]
Message-ID: <5dceec29.1c69fb81.4c2d0.e24d@mx.google.com> (raw)
In-Reply-To: <0000000000006062280596203360@google.com>

Quoting syzbot (2019-10-30 05:52:08)
> Hello,
> 
> syzbot found the following crash on:
> 
> HEAD commit:    ff6409a6 usb-fuzzer: main usb gadget fuzzer driver
> git tree:       https://github.com/google/kasan.git usb-fuzzer
> console output: https://syzkaller.appspot.com/x/log.txt?x=15e1ba24e00000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=3230c37d442895b7
> dashboard link: https://syzkaller.appspot.com/bug?extid=6d8505fcdf25f00ac276
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=169b8904e00000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=166f3104e00000
> 
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+6d8505fcdf25f00ac276@syzkaller.appspotmail.com
> 

Ok, let's try that again

#syz test: https://github.com/google/kasan.git ff6409a6

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 5b799aa973a3..c487709499fc 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -2440,8 +2440,8 @@ void add_hwgenerator_randomness(const char *buffer, size_t count,
 	 * We'll be woken up again once below random_write_wakeup_thresh,
 	 * or when the calling thread is about to terminate.
 	 */
-	wait_event_freezable(random_write_wait,
-			kthread_should_stop() ||
+	wait_event_interruptible(random_write_wait,
+			kthread_should_stop() || freezing(current) ||
 			ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits);
 	mix_pool_bytes(poolp, buffer, count);
 	credit_entropy_bits(poolp, entropy);

  reply	other threads:[~2019-11-15 18:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 12:52 KASAN: use-after-free Read in chaoskey_disconnect syzbot
2019-11-15 18:19 ` Stephen Boyd [this message]
2019-11-16  5:55   ` syzbot
2019-11-18 12:58 ` Oliver Neukum
2019-11-19  8:59   ` syzbot
2020-06-18 12:12 ` Andrey Konovalov

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=5dceec29.1c69fb81.4c2d0.e24d@mx.google.com \
    --to=swboyd@chromium.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andreyknvl@google.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=mpm@selenic.com \
    --cc=syzbot+6d8505fcdf25f00ac276@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tytso@mit.edu \
    /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.