WARNING in generic_make_request_checks

38 views
Skip to first unread message

syzbot

unread,
Aug 8, 2018, 11:39:02ā€ÆPM8/8/18
to ax...@kernel.dk, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 60f5a2173632 Merge tag 'usercopy-fix-v4.18-rc8' of git://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15e200e2400000
kernel config: https://syzkaller.appspot.com/x/.config?x=2dc0cd7c2eefb46f
dashboard link: https://syzkaller.appspot.com/bug?extid=21cfe1f803e0e158acf1
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
syzkaller repro:https://syzkaller.appspot.com/x/repro.syz?x=17b87bfc400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=117ccc8c400000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+21cfe1...@syzkaller.appspotmail.com

random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
------------[ cut here ]------------
generic_make_request: Trying to write to read-only block-device loop0
(partno 0)
WARNING: CPU: 1 PID: 4396 at block/blk-core.c:2161 bio_check_ro
block/blk-core.c:2158 [inline]
WARNING: CPU: 1 PID: 4396 at block/blk-core.c:2161
generic_make_request_checks+0x1618/0x24a0 block/blk-core.c:2263
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 4396 Comm: syz-executor533 Not tainted 4.18.0-rc7+ #177
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113
panic+0x238/0x4e7 kernel/panic.c:184
__warn.cold.8+0x163/0x1ba kernel/panic.c:536
report_bug+0x252/0x2d0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:178 [inline]
do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:992
RIP: 0010:bio_check_ro block/blk-core.c:2158 [inline]
RIP: 0010:generic_make_request_checks+0x1618/0x24a0 block/blk-core.c:2263
Code: 8d bd 78 ff ff ff 45 8b b6 d4 04 00 00 48 89 df 4c 89 fe e8 ea 54 07
00 44 89 f2 48 c7 c7 60 16 39 87 48 89 c6 e8 68 30 ff fd <0f> 0b e9 56 ed
ff ff 48 8b bd 50 fd ff ff e8 75 f3 71 fe e9 ca ea
RSP: 0018:ffff8801acc8f640 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff8801ae5e0400 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81632481 RDI: 0000000000000001
RBP: ffff8801acc8f940 R08: ffff8801ace94500 R09: ffffed003b624fc0
R10: ffffed003b624fc0 R11: ffff8801db127e07 R12: ffff8801d3083140
R13: ffff8801ae5e0408 R14: 0000000000000000 R15: ffff8801acc8f8b8
generic_make_request+0x2aa/0x1800 block/blk-core.c:2387
submit_bio+0xba/0x460 block/blk-core.c:2552
submit_bio_wait+0x134/0x1e0 block/bio.c:1004
blkdev_issue_flush+0x204/0x300 block/blk-flush.c:553
blkdev_fsync+0x93/0xd0 fs/block_dev.c:633
vfs_fsync_range+0x140/0x220 fs/sync.c:197
vfs_fsync fs/sync.c:211 [inline]
do_fsync+0x52/0xa0 fs/sync.c:221
__do_sys_fsync fs/sync.c:229 [inline]
__se_sys_fsync fs/sync.c:227 [inline]
__x64_sys_fsync+0x33/0x40 fs/sync.c:227
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x444999
Code: e8 ec b2 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 bb d4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffdc1fbd458 EFLAGS: 00000213 ORIG_RAX: 000000000000004a
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444999
RDX: 0000000000401430 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00000000021eb880 R09: 00000000000000c2
R10: 000000000000000f R11: 0000000000000213 R12: 00000000000074ed
R13: 0000000000402370 R14: 0000000000000000 R15: 0000000000000000
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Nov 22, 2019, 7:05:02ā€ÆAM11/22/19
to 00moses.a...@gmail.com, ax...@kernel.dk, bvana...@acm.org, ha...@suse.com, h...@lst.de, idry...@gmail.com, jose...@linux.alibaba.com, jthum...@suse.de, kees...@chromium.org, linux...@vger.kernel.org, linux-...@vger.kernel.org, ming...@redhat.com, sa...@grimberg.me, sni...@redhat.com, syzkall...@googlegroups.com, t...@kernel.org, torv...@linux-foundation.org, w...@torlan.ru, zkab...@redhat.com
syzbot has bisected this bug to:

commit a32e236eb93e62a0f692e79b7c3c9636689559b9
Author: Linus Torvalds <torv...@linux-foundation.org>
Date: Fri Aug 3 19:22:09 2018 +0000

Partially revert "block: fail op_is_write() requests to read-only
partitions"

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=119503d2e00000
start commit: 60f5a217 Merge tag 'usercopy-fix-v4.18-rc8' of git://git.k..
git tree: upstream
final crash: https://syzkaller.appspot.com/x/report.txt?x=139503d2e00000
console output: https://syzkaller.appspot.com/x/log.txt?x=159503d2e00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17b87bfc400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=117ccc8c400000

Reported-by: syzbot+21cfe1...@syzkaller.appspotmail.com
Fixes: a32e236eb93e ("Partially revert "block: fail op_is_write() requests
to read-only partitions"")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Kees Cook

unread,
Nov 26, 2019, 11:55:01ā€ÆPM11/26/19
to syzbot, 00moses.a...@gmail.com, ax...@kernel.dk, bvana...@acm.org, ha...@suse.com, h...@lst.de, idry...@gmail.com, jose...@linux.alibaba.com, jthum...@suse.de, linux...@vger.kernel.org, linux-...@vger.kernel.org, ming...@redhat.com, sa...@grimberg.me, sni...@redhat.com, syzkall...@googlegroups.com, t...@kernel.org, torv...@linux-foundation.org, w...@torlan.ru, zkab...@redhat.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8b2ded1c94c06f841f8c1612bcfa33c85012a36b

See https://lore.kernel.org/lkml/2019112517...@infradead.org/

--
Kees Cook

syzbot

unread,
Nov 27, 2019, 2:45:01ā€ÆAM11/27/19
to 00moses.a...@gmail.com, ax...@kernel.dk, bvana...@acm.org, ha...@suse.com, h...@lst.de, idry...@gmail.com, jose...@linux.alibaba.com, jthum...@suse.de, kees...@chromium.org, linux...@vger.kernel.org, linux-...@vger.kernel.org, ming...@redhat.com, sa...@grimberg.me, sni...@redhat.com, syzkall...@googlegroups.com, t...@kernel.org, torv...@linux-foundation.org, w...@torlan.ru, zkab...@redhat.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger
crash:

Reported-and-tested-by:
syzbot+21cfe1...@syzkaller.appspotmail.com

Tested on:

commit: 8b2ded1c block: don't warn when doing fsync on read-only d..
git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config: https://syzkaller.appspot.com/x/.config?x=d727e10a28207217
dashboard link: https://syzkaller.appspot.com/bug?extid=21cfe1f803e0e158acf1
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Note: testing is done by a robot and is best-effort only.

Kees Cook

unread,
Nov 27, 2019, 2:26:22ā€ÆPM11/27/19
to syzbot, 00moses.a...@gmail.com, ax...@kernel.dk, bvana...@acm.org, ha...@suse.com, h...@lst.de, idry...@gmail.com, jose...@linux.alibaba.com, jthum...@suse.de, linux...@vger.kernel.org, linux-...@vger.kernel.org, ming...@redhat.com, sa...@grimberg.me, sni...@redhat.com, syzkall...@googlegroups.com, t...@kernel.org, torv...@linux-foundation.org, w...@torlan.ru, zkab...@redhat.com
It seems for successful tests, I still need to tell syzbot that this is
fixed?

#syz fix: block: don't warn when doing fsync on read-only devices

--
Kees Cook

Dmitry Vyukov

unread,
Nov 28, 2019, 3:52:15ā€ÆAM11/28/19
to Kees Cook, syzkaller, syzbot, 00moses.a...@gmail.com, Jens Axboe, Bart Van Assche, Hannes Reinecke, Christoph Hellwig, Ilya Dryomov, jose...@linux.alibaba.com, Johannes Thumshirn, linux-block, LKML, Ming Lei, Sagi Grimberg, Mike Snitzer, syzkaller-bugs, Tejun Heo, Linus Torvalds, w...@torlan.ru, zkab...@redhat.com
+syzkaller mailing list for syzbot discussion

Yes.
You used a commit. But patch testing may work with raw attached
patches, or on trees that are not merged, or it may just a trial run
on HEAD or run with additional debugging only and it may incidentally
succeed; or may be not incidentally but the patch disables part of
functionality just to check if it affects the crash or not, but it's
totally not a fix for the bug.
Nobody ever figured out how all of this could work; allocate time to
write a complete proposal for the workflow and implement this.
So at the moment patch testing functionality is completely unrelated
to the rest of the workflow. It's a convenience feature.


> #syz fix: block: don't warn when doing fsync on read-only devices
>
> --
> Kees Cook
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/201911271124.F01A0B37%40keescook.
Reply all
Reply to author
Forward
0 new messages