general protection fault in __loop_clr_fd

20 views
Skip to first unread message

syzbot

unread,
Mar 6, 2020, 10:12:12 PM3/6/20
to ax...@kernel.dk, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 770fbb32 Add linux-next specific files for 20200228
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=103aee2de00000
kernel config: https://syzkaller.appspot.com/x/.config?x=576314276bce4ad5
dashboard link: https://syzkaller.appspot.com/bug?extid=3967212746d25888b189
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12fc670de00000

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

general protection fault, probably for non-canonical address 0xdffffc0000000021: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000108-0x000000000000010f]
CPU: 1 PID: 9504 Comm: syz-executor.1 Not tainted 5.6.0-rc3-next-20200228-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:workqueue_sysfs_unregister kernel/workqueue.c:5691 [inline]
RIP: 0010:destroy_workqueue+0x2e/0x6b0 kernel/workqueue.c:4351
Code: 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 8a 6a 26 00 49 8d be 08 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e0 05 00 00 49 8b 9e 08 01 00 00 48 85 db 74 19
RSP: 0018:ffffc90002277cc8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000021 RSI: ffffffff814c2af6 RDI: 0000000000000108
RBP: ffff888218af18f0 R08: ffff88809880e480 R09: fffffbfff185270a
R10: fffffbfff1852709 R11: ffffffff8c29384f R12: ffff888218af1800
R13: ffff888218af1804 R14: 0000000000000000 R15: 0000000000004c01
FS: 00000000027e1940(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa010a7d000 CR3: 0000000088d30000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
loop_unprepare_queue drivers/block/loop.c:891 [inline]
__loop_clr_fd+0x185/0x1280 drivers/block/loop.c:1210
loop_clr_fd drivers/block/loop.c:1335 [inline]
lo_ioctl+0x2b4/0x1460 drivers/block/loop.c:1704
__blkdev_driver_ioctl block/ioctl.c:321 [inline]
blkdev_ioctl+0x25b/0x660 block/ioctl.c:717
block_ioctl+0xe9/0x130 fs/block_dev.c:1983
vfs_ioctl fs/ioctl.c:47 [inline]
ksys_ioctl+0x11a/0x180 fs/ioctl.c:763
__do_sys_ioctl fs/ioctl.c:772 [inline]
__se_sys_ioctl fs/ioctl.c:770 [inline]
__x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:770
do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c317
Code: 48 83 c4 08 48 89 d8 5b 5d c3 66 0f 1f 84 00 00 00 00 00 48 89 e8 48 f7 d8 48 39 c3 0f 92 c0 eb 92 66 90 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 0d b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd75653418 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045c317
RDX: 0000000000000000 RSI: 0000000000004c01 RDI: 0000000000000003
RBP: 0000000000000002 R08: 0000000000000000 R09: 000000000000000a
R10: 0000000000000075 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd75653450 R14: 0000000000016fbc R15: 00007ffd75653460
Modules linked in:
---[ end trace 4ad871aadd3b1dba ]---
RIP: 0010:workqueue_sysfs_unregister kernel/workqueue.c:5691 [inline]
RIP: 0010:destroy_workqueue+0x2e/0x6b0 kernel/workqueue.c:4351
Code: 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 8a 6a 26 00 49 8d be 08 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e0 05 00 00 49 8b 9e 08 01 00 00 48 85 db 74 19
RSP: 0018:ffffc90002277cc8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000021 RSI: ffffffff814c2af6 RDI: 0000000000000108
RBP: ffff888218af18f0 R08: ffff88809880e480 R09: fffffbfff185270a
R10: fffffbfff1852709 R11: ffffffff8c29384f R12: ffff888218af1800
R13: ffff888218af1804 R14: 0000000000000000 R15: 0000000000004c01
FS: 00000000027e1940(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f692de4b110 CR3: 0000000088d30000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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,
Mar 6, 2020, 10:54:15 PM3/6/20
to ax...@kernel.dk, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 770fbb32 Add linux-next specific files for 20200228
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=141e2ae3e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=576314276bce4ad5
dashboard link: https://syzkaller.appspot.com/bug?extid=3967212746d25888b189
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=177ae1fde00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=178fdfa1e00000

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

general protection fault, probably for non-canonical address 0xdffffc0000000021: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000108-0x000000000000010f]
CPU: 0 PID: 10149 Comm: blkid Not tainted 5.6.0-rc3-next-20200228-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:workqueue_sysfs_unregister kernel/workqueue.c:5691 [inline]
RIP: 0010:destroy_workqueue+0x2e/0x6b0 kernel/workqueue.c:4351
Code: 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 8a 6a 26 00 49 8d be 08 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e0 05 00 00 49 8b 9e 08 01 00 00 48 85 db 74 19
RSP: 0018:ffffc90002f27c30 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000021 RSI: ffffffff814c2af6 RDI: 0000000000000108
RBP: ffff8882189978f0 R08: ffff888096c505c0 R09: fffffbfff185270a
R10: fffffbfff1852709 R11: ffffffff8c29384f R12: ffff888218997800
R13: ffff88808dc478a0 R14: 0000000000000000 R15: ffff88808dc47680
FS: 00007fd99f56e740(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3095dcd000 CR3: 00000000a4478000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
loop_unprepare_queue drivers/block/loop.c:891 [inline]
__loop_clr_fd+0x185/0x1280 drivers/block/loop.c:1210
lo_release+0x1ad/0x1e7 drivers/block/loop.c:1928
__blkdev_put+0x509/0x690 fs/block_dev.c:1896
blkdev_close+0x86/0xb0 fs/block_dev.c:1965
__fput+0x2da/0x850 fs/file_table.c:280
task_work_run+0x13f/0x1b0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x2fa/0x360 arch/x86/entry/common.c:165
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
do_syscall_64+0x672/0x790 arch/x86/entry/common.c:305
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fd99ee762b0
Code: 40 75 0b 31 c0 48 83 c4 08 e9 0c ff ff ff 48 8d 3d c5 32 08 00 e8 c0 07 02 00 83 3d 45 a3 2b 00 00 75 10 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ce 8a 01 00 48 89 04 24
RSP: 002b:00007ffc0a7acc98 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fd99ee762b0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000164a030
R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000005
Modules linked in:
---[ end trace 607b7fe0e8c7e1ae ]---
RIP: 0010:workqueue_sysfs_unregister kernel/workqueue.c:5691 [inline]
RIP: 0010:destroy_workqueue+0x2e/0x6b0 kernel/workqueue.c:4351
Code: 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 8a 6a 26 00 49 8d be 08 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e0 05 00 00 49 8b 9e 08 01 00 00 48 85 db 74 19
RSP: 0018:ffffc90002f27c30 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 0000000000000021 RSI: ffffffff814c2af6 RDI: 0000000000000108
RBP: ffff8882189978f0 R08: ffff888096c505c0 R09: fffffbfff185270a
R10: fffffbfff1852709 R11: ffffffff8c29384f R12: ffff888218997800
R13: ffff88808dc478a0 R14: 0000000000000000 R15: ffff88808dc47680
FS: 00007fd99f56e740(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3095dcd000 CR3: 00000000a4478000 CR4: 00000000001406f0

Hillf Danton

unread,
Mar 8, 2020, 4:03:44 AM3/8/20
to syzbot, ax...@kernel.dk, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com

Fri, 06 Mar 2020 19:54:13 -0800
> syzbot has found a reproducer for the following crash on:
>
> HEAD commit: 770fbb32 Add linux-next specific files for 20200228
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=141e2ae3e00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=576314276bce4ad5
> dashboard link: https://syzkaller.appspot.com/bug?extid=3967212746d25888b189
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+396721...@syzkaller.appspotmail.com
>
> general protection fault, probably for non-canonical address 0xdffffc0000000021: 0000 [#1] PREEMPT SMP KASAN
> KASAN: null-ptr-deref in range [0x0000000000000108-0x000000000000010f]
> CPU: 0 PID: 10149 Comm: blkid Not tainted 5.6.0-rc3-next-20200228-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:workqueue_sysfs_unregister kernel/workqueue.c:5691 [inline]
> RIP: 0010:destroy_workqueue+0x2e/0x6b0 kernel/workqueue.c:4351

Have trouble working out what is bridging the gap between workqueue
and loop.

> Code: 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 8a 6a 26 00 49 8d be 08 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e0 05 00 00 49 8b 9e 08 01 00 00 48 85 db 74 19
> RSP: 0018:ffffc90002f27c30 EFLAGS: 00010206
> RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000
> RDX: 0000000000000021 RSI: ffffffff814c2af6 RDI: 0000000000000108
> RBP: ffff8882189978f0 R08: ffff888096c505c0 R09: fffffbfff185270a
> R10: fffffbfff1852709 R11: ffffffff8c29384f R12: ffff888218997800
> R13: ffff88808dc478a0 R14: 0000000000000000 R15: ffff88808dc47680
> FS: 00007fd99f56e740(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f3095dcd000 CR3: 00000000a4478000 CR4: 00000000001406f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> loop_unprepare_queue drivers/block/loop.c:891 [inline]
> __loop_clr_fd+0x185/0x1280 drivers/block/loop.c:1210
> lo_release+0x1ad/0x1e7 drivers/block/loop.c:1928
> __blkdev_put+0x509/0x690 fs/block_dev.c:1896
> blkdev_close+0x86/0xb0 fs/block_dev.c:1965
> __fput+0x2da/0x850 fs/file_table.c:280
> task_work_run+0x13f/0x1b0 kernel/task_work.c:113
> tracehook_notify_resume include/linux/tracehook.h:188 [inline]
> exit_to_usermode_loop+0x2fa/0x360 arch/x86/entry/common.c:165
> prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
> syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
> do_syscall_64+0x672/0x790 arch/x86/entry/common.c:305
> entry_SYSCALL_64_after_hwframe+0x49/0xbe
> RIP: 0033:0x7fd99ee762b0
> Code: 40 75 0b 31 c0 48 83 c4 08 e9 0c ff ff ff 48 8d 3d c5 32 08 00 e8 c0 07 02 00 83 3d 45 a3 2b 00 00 75 10 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ce 8a 01 00 48 89 04 24
> RSP: 002b:00007ffc0a7acc98 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
> RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fd99ee762b0
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
> RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
> R10: 0000000000000000 R11: 0000000000000246 R12: 000000000164a030
> R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000005
> Modules linked in:
> ---[ end trace 607b7fe0e8c7e1ae ]---
> RIP: 0010:workqueue_sysfs_unregister kernel/workqueue.c:5691 [inline]
> RIP: 0010:destroy_workqueue+0x2e/0x6b0 kernel/workqueue.c:4351
> Code: 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 8a 6a 26 00 49 8d be 08 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e0 05 00 00 49 8b 9e 08 01 00 00 48 85 db 74 19
> RSP: 0018:ffffc90002f27c30 EFLAGS: 00010206
> RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000
> RDX: 0000000000000021 RSI: ffffffff814c2af6 RDI: 0000000000000108
> RBP: ffff8882189978f0 R08: ffff888096c505c0 R09: fffffbfff185270a
> R10: fffffbfff1852709 R11: ffffffff8c29384f R12: ffff888218997800
> R13: ffff88808dc478a0 R14: 0000000000000000 R15: ffff88808dc47680
> FS: 00007fd99f56e740(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f3095dcd000 CR3: 00000000a4478000 CR4: 00000000001406f0

Vegard Nossum

unread,
Jan 24, 2022, 1:06:06 PM1/24/22
to syzkaller-bugs
This bug is still listed as "open" on the syzbot dashboard.

I'm pretty sure it was introduced by:


however, this was never merged into mainline, it got


instead. So the bug isn't anywhere anymore. What do we do? Mark it as invalid?


Vegard

Dmitry Vyukov

unread,
May 19, 2022, 7:08:48 AM5/19/22
to Vegard Nossum, syzkaller-bugs, syzbot+396721...@syzkaller.appspotmail.com
Hi Vegard,

Better late than never :)
Thanks for checking the status of this bug.

Adding Reported-by tags to fixed-up commits works, since then one
version of the patch (buggy) can be distinguished from another (fixed
up).

But if it wasn't done at the time of commit, then, yes, marking as
invalid also works.

But since the fixed commit was merged upstream, now we can also say:

#syz fix: loop: use worker per cgroup instead of kworker
Reply all
Reply to author
Forward
0 new messages