WARNING in md_ioctl

21 views
Skip to first unread message

syzbot

unread,
Apr 16, 2019, 5:27:05 AM4/16/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 1ec8f1f0 Linux 4.14.111
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17ef9c23200000
kernel config: https://syzkaller.appspot.com/x/.config?x=fdadf290ea9fc6f9
dashboard link: https://syzkaller.appspot.com/bug?extid=a900780b9d4ede83ea17
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

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

md: md0 stopped.
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2747 at drivers/md/md.c:7165 md_ioctl+0x34bd/0x4bf0
drivers/md/md.c:7165
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 2747 Comm: syz-executor.3 Not tainted 4.14.111 #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
panic+0x1f2/0x438 kernel/panic.c:182
__warn.cold+0x2f/0x34 kernel/panic.c:546
report_bug+0x216/0x254 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:177 [inline]
fixup_bug arch/x86/kernel/traps.c:172 [inline]
do_error_trap+0x1bb/0x310 arch/x86/kernel/traps.c:295
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:944
RIP: 0010:md_ioctl+0x34bd/0x4bf0 drivers/md/md.c:7165
RSP: 0018:ffff8880467b7a20 EFLAGS: 00010216
RAX: 0000000000040000 RBX: 0000000000000932 RCX: ffffc90009c6c000
RDX: 00000000000000a6 RSI: ffffffff844a87fd RDI: 0000000000000001
RBP: ffff8880467b7c68 R08: ffff888215d9ca48 R09: ffffffff88c82498
R10: ffff8880467b7a10 R11: ffff88805fba8000 R12: ffff888215d9ca40
R13: ffff88821a3c5740 R14: ffff888215d9ca68 R15: ffff888215d9cc08
__blkdev_driver_ioctl block/ioctl.c:297 [inline]
blkdev_ioctl+0x983/0x1880 block/ioctl.c:594
block_ioctl+0xde/0x120 fs/block_dev.c:1881
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x7b9/0x1070 fs/ioctl.c:684
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x458c29
RSP: 002b:00007fb18a706c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458c29
RDX: 0000000000000000 RSI: 0000000000000932 RDI: 0000000000000003
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb18a7076d4
R13: 00000000004c0049 R14: 00000000004d2408 R15: 00000000ffffffff
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#status for how to communicate with syzbot.

syzbot

unread,
Apr 16, 2019, 5:37:06 AM4/16/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 1ec8f1f0 Linux 4.14.111
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1504bddd200000
kernel config: https://syzkaller.appspot.com/x/.config?x=fdadf290ea9fc6f9
dashboard link: https://syzkaller.appspot.com/bug?extid=a900780b9d4ede83ea17
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1274598f200000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12d46baf200000

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

audit: type=1400 audit(1555407132.210:36): avc: denied { map } for
pid=7029 comm="syz-executor376" path="/root/syz-executor376908528"
dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
md: md0 stopped.
md: md0 stopped.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 7056 at drivers/md/md.c:7165 md_ioctl+0x34bd/0x4bf0
drivers/md/md.c:7165
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 7056 Comm: syz-executor376 Not tainted 4.14.111 #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
panic+0x1f2/0x438 kernel/panic.c:182
__warn.cold+0x2f/0x34 kernel/panic.c:546
report_bug+0x216/0x254 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:177 [inline]
fixup_bug arch/x86/kernel/traps.c:172 [inline]
do_error_trap+0x1bb/0x310 arch/x86/kernel/traps.c:295
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:944
RIP: 0010:md_ioctl+0x34bd/0x4bf0 drivers/md/md.c:7165
RSP: 0018:ffff888093857a20 EFLAGS: 00010297
RAX: ffff888089d926c0 RBX: 0000000000000932 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: ffff888093857c68 R08: ffff88809b76c088 R09: ffffffff88cab060
R10: ffff888093857a10 R11: ffff888089d926c0 R12: ffff88809b76c080
R13: ffff8880a4554140 R14: ffff88809b76c0a8 R15: ffff88809b76c248
__blkdev_driver_ioctl block/ioctl.c:297 [inline]
blkdev_ioctl+0x983/0x1880 block/ioctl.c:594
block_ioctl+0xde/0x120 fs/block_dev.c:1881
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x7b9/0x1070 fs/ioctl.c:684
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x446749
RSP: 002b:00007f9a4cf8bdb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446749
RDX: 0000000000000000 RSI: 0000000000000932 RDI: 0000000000000003
RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c
R13: 00007ffce65d34bf R14: 00007f9a4cf8c9c0 R15: 000000000000002d

syzbot

unread,
Apr 19, 2019, 5:49:05 PM4/19/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 4b0e041c Linux 4.19.35
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15cf0c47200000
kernel config: https://syzkaller.appspot.com/x/.config?x=bb1bcac868b1655e
dashboard link: https://syzkaller.appspot.com/bug?extid=38cc117962dd2878f09d
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a06980a00000

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

hrtimer: interrupt took 64659 ns
md: md0 stopped.
IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready
8021q: adding VLAN 0 to HW filter on device batadv0
8021q: adding VLAN 0 to HW filter on device batadv0
WARNING: CPU: 1 PID: 7912 at drivers/md/md.c:7219 md_ioctl+0x4023/0x59a0
drivers/md/md.c:7219
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 7912 Comm: syz-executor.0 Not tainted 4.19.35 #3
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+0x172/0x1f0 lib/dump_stack.c:113
panic+0x263/0x51d kernel/panic.c:185
__warn.cold+0x20/0x54 kernel/panic.c:540
kobject: 'loop5' (000000005ae4f1a6): kobject_uevent_env
report_bug+0x263/0x2b0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x204/0x360 arch/x86/kernel/traps.c:296
kobject: 'loop5' (000000005ae4f1a6): fill_kobj_path: path
= '/devices/virtual/block/loop5'
kobject: 'loop2' (000000007afde3f4): kobject_uevent_env
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
kobject: 'loop2' (000000007afde3f4): fill_kobj_path: path
= '/devices/virtual/block/loop2'
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:997
RIP: 0010:md_ioctl+0x4023/0x59a0 drivers/md/md.c:7219
Code: fd ff ff c7 80 40 01 00 00 00 00 00 00 e9 dd eb ff ff 48 8d 85 38 fe
ff ff 48 89 85 b8 fd ff ff e9 f5 da ff ff e8 7d 1d a0 fc <0f> 0b e9 f8 cc
ff ff e8 71 1d a0 fc 89 de bf 23 09 48 40 e8 e5 1e
RSP: 0018:ffff8880a593f950 EFLAGS: 00010293
kobject: 'loop1' (00000000680947af): kobject_uevent_env
RAX: ffff88809bbaa100 RBX: 0000000000000932 RCX: ffffffff84cae482
RDX: 0000000000000000 RSI: ffffffff84cb1793 RDI: 0000000000000007
RBP: ffff8880a593fbc0 R08: ffff88809bbaa100 R09: ffffed100fc239a2
R10: ffff8880a593f940 R11: ffff88807e11cd0f R12: 0000000000000932
R13: ffff88808fcd5600 R14: ffff88807e11cb68 R15: ffff88807e11cd08
kobject: 'loop1' (00000000680947af): fill_kobj_path: path
= '/devices/virtual/block/loop1'
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0xc4b/0x1ae0 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1891
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458c29
Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fbe91821c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458c29
RDX: 0000000020000080 RSI: 0000000000000932 RDI: 0000000000000004
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbe918226d4
R13: 00000000004c0049 R14: 00000000004d2408 R15: 00000000ffffffff
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#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Apr 21, 2019, 1:11:05 AM4/21/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: c98875d9 Linux 4.19.36
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15724257200000
kernel config: https://syzkaller.appspot.com/x/.config?x=5e40ac5fbcc6366d
dashboard link: https://syzkaller.appspot.com/bug?extid=38cc117962dd2878f09d
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14711c57200000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13d881cb200000

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

audit: type=1400 audit(1555823253.478:36): avc: denied { map } for
pid=7666 comm="syz-executor357" path="/root/syz-executor357262845"
dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
md: md0 stopped.
WARNING: CPU: 1 PID: 7685 at drivers/md/md.c:7219 md_ioctl+0x4023/0x59a0
drivers/md/md.c:7219
Kernel panic - not syncing: panic_on_warn set ...

hrtimer: interrupt took 49176 ns
CPU: 1 PID: 7685 Comm: syz-executor357 Not tainted 4.19.36 #4
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+0x172/0x1f0 lib/dump_stack.c:113
panic+0x263/0x51d kernel/panic.c:185
__warn.cold+0x20/0x54 kernel/panic.c:540
report_bug+0x263/0x2b0 lib/bug.c:186
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x204/0x360 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:997
RIP: 0010:md_ioctl+0x4023/0x59a0 drivers/md/md.c:7219
Code: fd ff ff c7 80 40 01 00 00 00 00 00 00 e9 dd eb ff ff 48 8d 85 38 fe
ff ff 48 89 85 b8 fd ff ff e9 f5 da ff ff e8 ed 0f a0 fc <0f> 0b e9 f8 cc
ff ff e8 e1 0f a0 fc 89 de bf 23 09 48 40 e8 55 11
RSP: 0018:ffff8880a45e7950 EFLAGS: 00010293
RAX: ffff88808fb9a580 RBX: 0000000000000932 RCX: ffffffff84cb0212
RDX: 0000000000000000 RSI: ffffffff84cb3523 RDI: 0000000000000007
RBP: ffff8880a45e7bc0 R08: ffff88808fb9a580 R09: ffffed10135d4852
R10: ffff8880a45e7940 R11: ffff88809aea428f R12: 0000000000000932
R13: ffff8880a6d1a040 R14: ffff88809aea40e8 R15: ffff88809aea4288
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0xc4b/0x1ae0 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1891
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x44a569
Code: e8 0c e8 ff ff 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 7b cb fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f8442797db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dbc38 RCX: 000000000044a569
RDX: 0000000000000000 RSI: 0000000000000932 RDI: 0000000000000004
RBP: 00000000006dbc30 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc3c
R13: 00007ffdd813c34f R14: 00007f84427989c0 R15: 0000000000000000

syzbot

unread,
Jan 26, 2021, 6:49:05 AM1/26/21
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit b85abab5913d89ee78bc5bb08231acb578677898
Author: Dae R. Jeong <dae.r...@kaist.ac.kr>
Date: Thu Oct 22 01:21:28 2020 +0000

md: fix a warning caused by a race between concurrent md_ioctl()s

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14754e1cd00000
start commit: 4abf2685 Linux 4.19.162
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=38565839aa6b0d25
dashboard link: https://syzkaller.appspot.com/bug?extid=38cc117962dd2878f09d
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1593246b500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=104ff86b500000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: md: fix a warning caused by a race between concurrent md_ioctl()s

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages