general protection fault in del_gendisk (7)

4 views
Skip to first unread message

syzbot

unread,
Dec 22, 2022, 6:51:48 PM12/22/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 003c389455eb Merge 5.10.160 into android12-5.10-lts
git tree: android12-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=15293ed8480000
kernel config: https://syzkaller.appspot.com/x/.config?x=ce128396c79a61d9
dashboard link: https://syzkaller.appspot.com/bug?extid=f6a2e26c6c36039ed200
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=103f5450480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=179c218c480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/722a669278a6/disk-003c3894.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f7a09169d423/vmlinux-003c3894.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4c5efdf62a59/bzImage-003c3894.xz

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

RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 00007fff5a8dc090 R11: 0000000000000246 R12: 00007fff5a8dc62c
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
---[ end trace 925785ac800712bc ]---
general protection fault, probably for non-canonical address 0xdffffc000000001a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000000d0-0x00000000000000d7]
CPU: 0 PID: 376 Comm: syz-executor330 Tainted: G W 5.10.160-syzkaller-01321-g003c389455eb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:kill_device drivers/base/core.c:3362 [inline]
RIP: 0010:device_del+0xdf/0xf00 drivers/base/core.c:3390
Code: 20 42 80 3c 28 00 74 08 48 89 df e8 6b aa df fe 4c 89 7c 24 48 41 bf d0 00 00 00 48 89 5c 24 18 4c 03 3b 4d 89 fc 49 c1 ec 03 <43> 8a 04 2c 84 c0 0f 85 0d 0d 00 00 41 0f b6 1f 89 de 83 e6 01 31
RSP: 0018:ffffc90000a2fb60 EFLAGS: 00010202
RAX: 1ffff11020c7b81a RBX: ffff8881063dc0d0 RCX: ffff8881065862c0
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000a2fae0
RBP: ffffc90000a2fc50 R08: dffffc0000000000 R09: fffff52000145f5d
R10: fffff52000145f5d R11: 1ffff92000145f5c R12: 000000000000001a
R13: dffffc0000000000 R14: ffff8881063dc108 R15: 00000000000000d0
FS: 00005555558e4300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f56f37d1290 CR3: 000000011df95000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
del_gendisk+0xbf2/0xe20 block/genhd.c:953
loop_remove+0x46/0xb0 drivers/block/loop.c:2190
loop_control_ioctl+0x67f/0x740 drivers/block/loop.c:2289
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0x115/0x190 fs/ioctl.c:739
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7f56f375d069
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff5a8dc618 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000004bc9 RCX: 00007f56f375d069
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 00007fff5a8dc090 R11: 0000000000000246 R12: 00007fff5a8dc62c
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 925785ac800712bd ]---
RIP: 0010:kill_device drivers/base/core.c:3362 [inline]
RIP: 0010:device_del+0xdf/0xf00 drivers/base/core.c:3390
Code: 20 42 80 3c 28 00 74 08 48 89 df e8 6b aa df fe 4c 89 7c 24 48 41 bf d0 00 00 00 48 89 5c 24 18 4c 03 3b 4d 89 fc 49 c1 ec 03 <43> 8a 04 2c 84 c0 0f 85 0d 0d 00 00 41 0f b6 1f 89 de 83 e6 01 31
RSP: 0018:ffffc90000a2fb60 EFLAGS: 00010202
RAX: 1ffff11020c7b81a RBX: ffff8881063dc0d0 RCX: ffff8881065862c0
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000a2fae0
RBP: ffffc90000a2fc50 R08: dffffc0000000000 R09: fffff52000145f5d
R10: fffff52000145f5d R11: 1ffff92000145f5c R12: 000000000000001a
R13: dffffc0000000000 R14: ffff8881063dc108 R15: 00000000000000d0
FS: 00005555558e4300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f56f37d1290 CR3: 000000011df95000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 20 42 80 and %al,-0x80(%rdx)
3: 3c 28 cmp $0x28,%al
5: 00 74 08 48 add %dh,0x48(%rax,%rcx,1)
9: 89 df mov %ebx,%edi
b: e8 6b aa df fe callq 0xfedfaa7b
10: 4c 89 7c 24 48 mov %r15,0x48(%rsp)
15: 41 bf d0 00 00 00 mov $0xd0,%r15d
1b: 48 89 5c 24 18 mov %rbx,0x18(%rsp)
20: 4c 03 3b add (%rbx),%r15
23: 4d 89 fc mov %r15,%r12
26: 49 c1 ec 03 shr $0x3,%r12
* 2a: 43 8a 04 2c mov (%r12,%r13,1),%al <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 0d 0d 00 00 jne 0xd43
36: 41 0f b6 1f movzbl (%r15),%ebx
3a: 89 de mov %ebx,%esi
3c: 83 e6 01 and $0x1,%esi
3f: 31 .byte 0x31


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages