general protection fault in cdev_del

22 views
Skip to first unread message

syzbot

unread,
Dec 3, 2019, 10:14:09 PM12/3/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: fbc5fe7a Linux 4.14.157
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11c4f97ee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=253d29a660cb0d
dashboard link: https://syzkaller.appspot.com/bug?extid=3ed778aa210a888794e3
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13261b7ae00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13fceca6e00000

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

RBP: 00007ffd5d7933d0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7041 Comm: syz-executor468 Not tainted 4.14.157-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff888093fd2140 task.stack: ffff88807b630000
RIP: 0010:cdev_del+0x28/0xa0 fs/char_dev.c:602
RSP: 0018:ffff88807b637b10 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff888218e1e100 RCX: 0000000000000000
RDX: 000000000000000c RSI: ffff888093fd29e8 RDI: 0000000000000064
RBP: ffff88807b637b20 R08: ffff888093fd2140 R09: ffff888093fd2a08
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000008 R14: ffff888218e50ac8 R15: ffff888089959728
FS: 0000000000fee880(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f406a72c000 CR3: 00000000a680b000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tty_unregister_device drivers/tty/tty_io.c:3041 [inline]
tty_unregister_device+0x106/0x1a0 drivers/tty/tty_io.c:3036
gsmld_detach_gsm drivers/tty/n_gsm.c:2299 [inline]
gsmld_close+0xb2/0x178 drivers/tty/n_gsm.c:2368
tty_ldisc_close.isra.0+0x99/0xd0 drivers/tty/tty_ldisc.c:498
tty_ldisc_kill+0x4b/0xc0 drivers/tty/tty_ldisc.c:644
tty_ldisc_release+0xb6/0x230 drivers/tty/tty_ldisc.c:811
tty_release_struct+0x1b/0x50 drivers/tty/tty_io.c:1603
tty_release+0xaa3/0xd60 drivers/tty/tty_io.c:1776
__fput+0x275/0x7a0 fs/file_table.c:210
____fput+0x16/0x20 fs/file_table.c:244
task_work_run+0x114/0x190 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x7df/0x2ce0 kernel/exit.c:874
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x43fdb8
RSP: 002b:00007ffd5d793378 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043fdb8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004bfaf0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d2180 R14: 0000000000000000 R15: 0000000000000000
Code: ff eb dd 55 48 89 e5 41 54 49 89 fc 48 83 ec 08 e8 8e ea cc ff 49 8d
7c 24 64 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02
48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 55
RIP: cdev_del+0x28/0xa0 fs/char_dev.c:602 RSP: ffff88807b637b10
---[ end trace c6470828c66c35dc ]---


---
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,
Dec 8, 2019, 10:59:10 PM12/8/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: fb683b5e Linux 4.19.88
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12a4ae41e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=aa0c39a6a0078b1c
dashboard link: https://syzkaller.appspot.com/bug?extid=66f836eb7f735883cb17
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+66f836...@syzkaller.appspotmail.com

SELinux: unrecognized netlink message: protocol=0 nlmsg_type=8
sclass=netlink_route_socket pig=17304 comm=syz-executor.3
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=8
sclass=netlink_route_socket pig=17331 comm=syz-executor.3
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 17311 Comm: syz-executor.1 Not tainted 4.19.88-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:cdev_del+0x28/0xa0 fs/char_dev.c:602
Code: 00 00 55 48 89 e5 41 54 49 89 fc 48 83 ec 08 e8 4e c6 bd ff 49 8d 7c
24 64 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48
89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 55 49
RSP: 0018:ffff8880a5b8f9b0 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff8880a45d5600 RCX: ffffc9000862d000
RDX: 000000000000000c RSI: ffffffff81ad7cf2 RDI: 0000000000000064
RBP: ffff8880a5b8f9c0 R08: ffff888053214540 R09: ffff888053214e08
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000008 R14: ffff8880a405e088 R15: ffff888083c8a5a8
FS: 00007f61e7b77700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8d6f0cb000 CR3: 0000000095a8c000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tty_unregister_device drivers/tty/tty_io.c:3049 [inline]
tty_unregister_device+0x117/0x1b0 drivers/tty/tty_io.c:3044
gsmld_detach_gsm drivers/tty/n_gsm.c:2285 [inline]
gsmld_close+0xb2/0x188 drivers/tty/n_gsm.c:2354
tty_ldisc_close.isra.0+0xaf/0xe0 drivers/tty/tty_ldisc.c:486
tty_ldisc_kill+0x4b/0xc0 drivers/tty/tty_ldisc.c:632
tty_ldisc_release+0xc6/0x280 drivers/tty/tty_ldisc.c:799
tty_release_struct+0x1b/0x50 drivers/tty/tty_io.c:1611
tty_release+0xbcb/0xe90 drivers/tty/tty_io.c:1784
__fput+0x2dd/0x8b0 fs/file_table.c:278
____fput+0x16/0x20 fs/file_table.c:309
task_work_run+0x145/0x1c0 kernel/task_work.c:113
get_signal+0x1baa/0x1fc0 kernel/signal.c:2389
do_signal+0x95/0x1960 arch/x86/kernel/signal.c:821
exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x53d/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a6f9
Code: ad b6 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 b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f61e7b76c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: 0000000000000000 RBX: 00007f61e7b76c90 RCX: 000000000045a6f9
RDX: 0000000020000000 RSI: 0000000000005423 RDI: 0000000000000007
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f61e7b776d4
R13: 00000000004c5b94 R14: 00000000004dbec8 R15: 0000000000000008
Modules linked in:
---[ end trace 583a212aa1e962e4 ]---
RIP: 0010:cdev_del+0x28/0xa0 fs/char_dev.c:602
Code: 00 00 55 48 89 e5 41 54 49 89 fc 48 83 ec 08 e8 4e c6 bd ff 49 8d 7c
24 64 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48
89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 55 49
RSP: 0018:ffff8880a5b8f9b0 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff8880a45d5600 RCX: ffffc9000862d000
RDX: 000000000000000c RSI: ffffffff81ad7cf2 RDI: 0000000000000064
RBP: ffff8880a5b8f9c0 R08: ffff888053214540 R09: ffff888053214e08
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000008 R14: ffff8880a405e088 R15: ffff888083c8a5a8
FS: 00007f61e7b77700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8d6f0cb000 CR3: 0000000095a8c000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


syzbot

unread,
Dec 12, 2019, 8:13:09 PM12/12/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: fb683b5e Linux 4.19.88
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14646deae00000
kernel config: https://syzkaller.appspot.com/x/.config?x=aa0c39a6a0078b1c
dashboard link: https://syzkaller.appspot.com/bug?extid=66f836eb7f735883cb17
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10f4ce46e00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16ac0cfae00000

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

RBP: 00007ffc559005e0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 7839 Comm: syz-executor017 Not tainted 4.19.88-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:cdev_del+0x28/0xa0 fs/char_dev.c:602
Code: 00 00 55 48 89 e5 41 54 49 89 fc 48 83 ec 08 e8 4e c6 bd ff 49 8d 7c
24 64 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48
89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 55 49
RSP: 0018:ffff88808ec7fb10 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff888219266f00 RCX: ffffffff83a82d06
RDX: 000000000000000c RSI: ffffffff81ad7cf2 RDI: 0000000000000064
RBP: ffff88808ec7fb20 R08: ffff88807e2100c0 R09: ffff88807e210988
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000008 R14: ffff8882192ea948 R15: ffff8880a40b14a8
FS: 0000000001dc9880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000049f6d0 CR3: 00000000999d2000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tty_unregister_device drivers/tty/tty_io.c:3049 [inline]
tty_unregister_device+0x117/0x1b0 drivers/tty/tty_io.c:3044
gsmld_detach_gsm drivers/tty/n_gsm.c:2285 [inline]
gsmld_close+0xb2/0x188 drivers/tty/n_gsm.c:2354
tty_ldisc_close.isra.0+0xaf/0xe0 drivers/tty/tty_ldisc.c:486
tty_ldisc_kill+0x4b/0xc0 drivers/tty/tty_ldisc.c:632
tty_ldisc_release+0xc6/0x280 drivers/tty/tty_ldisc.c:799
tty_release_struct+0x1b/0x50 drivers/tty/tty_io.c:1611
tty_release+0xbcb/0xe90 drivers/tty/tty_io.c:1784
__fput+0x2dd/0x8b0 fs/file_table.c:278
____fput+0x16/0x20 fs/file_table.c:309
task_work_run+0x145/0x1c0 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x994/0x3080 kernel/exit.c:876
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43ff18
Code: ff 74 5f 89 d8 4c 8d 4c 24 30 4c 8d 05 79 bf 00 00 f7 d8 b9 00 04 00
00 ba 01 00 00 00 89 44 24 08 48 8d 84 24 30 08 00 00 be <00> 04 00 00 48
89 ef 48 89 04 24 31 c0 e8 46 b0 fc ff e9 58 ff ff
RSP: 002b:00007ffc55900588 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ff18
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004bfc50 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d21a0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 42473496a43055c8 ]---
RIP: 0010:cdev_del+0x28/0xa0 fs/char_dev.c:602
Code: 00 00 55 48 89 e5 41 54 49 89 fc 48 83 ec 08 e8 4e c6 bd ff 49 8d 7c
24 64 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48
89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 55 49
RSP: 0018:ffff88808ec7fb10 EFLAGS: 00010207
RAX: dffffc0000000000 RBX: ffff888219266f00 RCX: ffffffff83a82d06
RDX: 000000000000000c RSI: ffffffff81ad7cf2 RDI: 0000000000000064
RBP: ffff88808ec7fb20 R08: ffff88807e2100c0 R09: ffff88807e210988
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000008 R14: ffff8882192ea948 R15: ffff8880a40b14a8
FS: 0000000001dc9880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000049f6d0 CR3: 00000000999d2000 CR4: 00000000001406e0
Reply all
Reply to author
Forward
0 new messages