general protection fault in kernfs_name_hash

5 views
Skip to first unread message

syzbot

unread,
Apr 17, 2022, 10:06:19 PM4/17/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 414e6c8e941c ANDROID: fix up abi issue with struct snd_pcm..
git tree: android12-5.10-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=14dee7e0f00000
kernel config: https://syzkaller.appspot.com/x/.config?x=19b81eb0d2d939d9
dashboard link: https://syzkaller.appspot.com/bug?extid=dfe5ac05099017d9d483
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=136b8b68f00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1559db68f00000

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

RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000005
RBP: 00007ffd7ec02be0 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
---[ end trace e94b7b9cb0473a1e ]---
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 378 Comm: syz-executor127 Tainted: G W 5.10.109-syzkaller-00693-g414e6c8e941c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:strlen+0x3a/0x80 lib/string.c:568
Code: c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffffc90000b87b68 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881067ecf00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b87b88 R08: ffffffff81d12c3c R09: fffff52000170f75
R10: fffff52000170f75 R11: 1ffff92000170f74 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00005555558dd300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2317984144 CR3: 0000000106bb1000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kernfs_name_hash+0x21/0x240 fs/kernfs/dir.c:302
kernfs_find_ns+0x72/0x280 fs/kernfs/dir.c:841
kernfs_remove_by_name_ns+0x36/0x90 fs/kernfs/dir.c:1514
kernfs_remove_by_name include/linux/kernfs.h:608 [inline]
sysfs_remove_link+0x50/0x60 fs/sysfs/symlink.c:152
del_gendisk+0xbe0/0xe20 block/genhd.c:951
loop_remove+0x46/0xb0 drivers/block/loop.c:2185
loop_control_ioctl+0x67f/0x740 drivers/block/loop.c:2284
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+0x44/0xa9
RIP: 0033:0x7f231792c0c9
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:00007ffd7ec02bc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f231792c0c9
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000005
RBP: 00007ffd7ec02be0 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace e94b7b9cb0473a1f ]---
RIP: 0010:strlen+0x3a/0x80 lib/string.c:568
Code: c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffffc90000b87b68 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881067ecf00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b87b88 R08: ffffffff81d12c3c R09: fffff52000170f75
R10: fffff52000170f75 R11: 1ffff92000170f74 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00005555558dd300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2317984144 CR3: 0000000106bb1000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 5 bytes skipped:
0: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
7: fc ff df
a: 48 89 fb mov %rdi,%rbx
d: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1)
14: 00 00 00 00
18: 0f 1f 00 nopl (%rax)
1b: 49 89 c4 mov %rax,%r12
1e: 48 89 d8 mov %rbx,%rax
21: 48 c1 e8 03 shr $0x3,%rax
* 25: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax <-- trapping instruction
2a: 84 c0 test %al,%al
2c: 75 12 jne 0x40
2e: 48 ff c3 inc %rbx
31: 49 8d 44 24 01 lea 0x1(%r12),%rax
36: 43 rex.XB
37: 80 .byte 0x80
38: 7c 26 jl 0x60
3a: 01 .byte 0x1


---
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

syzbot

unread,
Apr 18, 2022, 3:28:07 AM4/18/22
to syzkaller-a...@googlegroups.com
syzbot has bisected this issue to:

commit bda49ad0602e5250a9d3dd61deda19d3e5615c54
Author: Bart Van Assche <bvana...@google.com>
Date: Mon Aug 2 17:05:29 2021 +0000

FROMGIT: loop: Select I/O scheduler 'none' from inside add_disk()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1792adc0f00000
start commit: 414e6c8e941c ANDROID: fix up abi issue with struct snd_pcm..
git tree: android12-5.10-lts
final oops: https://syzkaller.appspot.com/x/report.txt?x=1452adc0f00000
console output: https://syzkaller.appspot.com/x/log.txt?x=1052adc0f00000
Reported-by: syzbot+dfe5ac...@syzkaller.appspotmail.com
Fixes: bda49ad0602e ("FROMGIT: loop: Select I/O scheduler 'none' from inside add_disk()")

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

Tadeusz Struk

unread,
Apr 18, 2022, 6:15:54 PM4/18/22
to syzbot, syzkaller-a...@googlegroups.com

Tadeusz Struk

unread,
Apr 18, 2022, 7:23:12 PM4/18/22
to syzbot, syzkaller-a...@googlegroups.com
On 4/17/22 19:06, syzbot wrote:
#syz test: https://android.googlesource.com/kernel/common android12-5.10

syzbot

unread,
Apr 19, 2022, 2:30:15 AM4/19/22
to syzkaller-a...@googlegroups.com, tadeus...@linaro.org
Hello,

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

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

Tested on:

commit: 6c8e5cb2 Linux 5.10.111
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.10.y
kernel config: https://syzkaller.appspot.com/x/.config?x=9780e67f7c35251c
dashboard link: https://syzkaller.appspot.com/bug?extid=dfe5ac05099017d9d483
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

syzbot

unread,
Apr 19, 2022, 2:38:08 AM4/19/22
to syzkaller-a...@googlegroups.com, tadeus...@linaro.org
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in del_gendisk

RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000005
RBP: 00007fffbe45ec50 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
---[ end trace b5b9770382a38182 ]---
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: 422 Comm: syz-executor257 Tainted: G W 5.10.101-syzkaller-00009-g0dcfc2c03655 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kill_device drivers/base/core.c:3361 [inline]
RIP: 0010:device_del+0xdf/0xf00 drivers/base/core.c:3389
Code: 20 42 80 3c 28 00 74 08 48 89 df e8 eb 42 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:ffffc9000039fb60 EFLAGS: 00010202
RAX: 1ffff1102150f81a RBX: ffff88810a87c0d0 RCX: ffffffff8491bca6
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc9000039fae0
RBP: ffffc9000039fc50 R08: dffffc0000000000 R09: fffff52000073f5d
R10: fffff52000073f5d R11: 1ffff92000073f5c R12: 000000000000001a
R13: dffffc0000000000 R14: ffff88810a87c108 R15: 00000000000000d0
FS: 000055555555a300(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe86b1339e0 CR3: 000000010c5ee000 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:2185
loop_control_ioctl+0x67f/0x740 drivers/block/loop.c:2284
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+0x44/0xa9
RIP: 0033:0x7fe86b1040a9
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:00007fffbe45ec38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fe86b1040a9
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000005
RBP: 00007fffbe45ec50 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace b5b9770382a38183 ]---
RIP: 0010:kill_device drivers/base/core.c:3361 [inline]
RIP: 0010:device_del+0xdf/0xf00 drivers/base/core.c:3389
Code: 20 42 80 3c 28 00 74 08 48 89 df e8 eb 42 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:ffffc9000039fb60 EFLAGS: 00010202
RAX: 1ffff1102150f81a RBX: ffff88810a87c0d0 RCX: ffffffff8491bca6
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc9000039fae0
RBP: ffffc9000039fc50 R08: dffffc0000000000 R09: fffff52000073f5d
R10: fffff52000073f5d R11: 1ffff92000073f5c R12: 000000000000001a
R13: dffffc0000000000 R14: ffff88810a87c108 R15: 00000000000000d0
FS: 000055555555a300(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe86b1339e0 CR3: 000000010c5ee000 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 eb 42 df fe callq 0xfedf42fb
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


Tested on:

commit: 0dcfc2c0 ANDROID: GKI: Update symbols to symbol list
git tree: https://android.googlesource.com/kernel/common android12-5.10
console output: https://syzkaller.appspot.com/x/log.txt?x=140bb00cf00000
kernel config: https://syzkaller.appspot.com/x/.config?x=97fcf0b9b4761f62
dashboard link: https://syzkaller.appspot.com/bug?extid=dfe5ac05099017d9d483
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2

Tadeusz Struk

unread,
Apr 19, 2022, 9:36:10 AM4/19/22
to syzbot, syzkaller-a...@googlegroups.com
On 4/17/22 19:06, syzbot wrote:

syzbot

unread,
Apr 19, 2022, 9:45:12 AM4/19/22
to syzkaller-a...@googlegroups.com, tadeus...@linaro.org
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in del_gendisk

Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6497a13168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6497baff60 RCX: 00007f6497a9d0e9
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000004
RBP: 00007f6497af708d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdca8dce8f R14: 00007f6497a13300 R15: 0000000000022000
---[ end trace da48805da5d4376a ]---
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: 460 Comm: syz-executor.5 Tainted: G W 5.10.101-syzkaller-00009-g0dcfc2c03655 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kill_device drivers/base/core.c:3361 [inline]
RIP: 0010:device_del+0xdf/0xf00 drivers/base/core.c:3389
Code: 20 42 80 3c 28 00 74 08 48 89 df e8 eb 42 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:ffffc90001097b60 EFLAGS: 00010202
RAX: 1ffff110242db01a RBX: ffff8881216d80d0 RCX: ffffffff8491bca6
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90001097ae0
RBP: ffffc90001097c50 R08: dffffc0000000000 R09: fffff52000212f5d
R10: fffff52000212f5d R11: 1ffff92000212f5c R12: 000000000000001a
R13: dffffc0000000000 R14: ffff8881216d8108 R15: 00000000000000d0
FS: 00007f6497a13700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa5ff8ab718 CR3: 000000010f764000 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:2185
loop_control_ioctl+0x67f/0x740 drivers/block/loop.c:2284
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+0x44/0xa9
RIP: 0033:0x7f6497a9d0e9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6497a13168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6497baff60 RCX: 00007f6497a9d0e9
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000004
RBP: 00007f6497af708d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdca8dce8f R14: 00007f6497a13300 R15: 0000000000022000
Modules linked in:
---[ end trace da48805da5d4376b ]---
RIP: 0010:kill_device drivers/base/core.c:3361 [inline]
RIP: 0010:device_del+0xdf/0xf00 drivers/base/core.c:3389
Code: 20 42 80 3c 28 00 74 08 48 89 df e8 eb 42 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:ffffc90001097b60 EFLAGS: 00010202
RAX: 1ffff110242db01a RBX: ffff8881216d80d0 RCX: ffffffff8491bca6
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90001097ae0
RBP: ffffc90001097c50 R08: dffffc0000000000 R09: fffff52000212f5d
R10: fffff52000212f5d R11: 1ffff92000212f5c R12: 000000000000001a
R13: dffffc0000000000 R14: ffff8881216d8108 R15: 00000000000000d0
FS: 00007f6497a13700(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa5ff8ab718 CR3: 000000010f764000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
0: ff c3 inc %ebx
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 40 00 nopl 0x0(%rax)
10: 48 89 f8 mov %rdi,%rax
13: 48 89 f7 mov %rsi,%rdi
16: 48 89 d6 mov %rdx,%rsi
19: 48 89 ca mov %rcx,%rdx
1c: 4d 89 c2 mov %r8,%r10
1f: 4d 89 c8 mov %r9,%r8
22: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
27: 0f 05 syscall
* 29: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
2f: 73 01 jae 0x32
31: c3 retq
32: 48 c7 c1 b8 ff ff ff mov $0xffffffffffffffb8,%rcx
39: f7 d8 neg %eax
3b: 64 89 01 mov %eax,%fs:(%rcx)
3e: 48 rex.W


Tested on:

commit: 0dcfc2c0 ANDROID: GKI: Update symbols to symbol list
git tree: https://android.googlesource.com/kernel/common android12-5.10
console output: https://syzkaller.appspot.com/x/log.txt?x=1305f948f00000
kernel config: https://syzkaller.appspot.com/x/.config?x=97fcf0b9b4761f62
dashboard link: https://syzkaller.appspot.com/bug?extid=dfe5ac05099017d9d483
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2

Tadeusz Struk

unread,
Apr 19, 2022, 10:32:27 AM4/19/22
to syzbot, syzkaller-a...@googlegroups.com
On 4/17/22 19:06, syzbot wrote:

syzbot

unread,
Apr 19, 2022, 11:14:11 AM4/19/22
to syzkaller-a...@googlegroups.com, tadeus...@linaro.org
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in kernfs_name_hash

RSP: 002b:00007f86ea2f8168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f86ea494f60 RCX: 00007f86ea3820e9
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000004
RBP: 00007f86ea3dc08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdd4e66e2f R14: 00007f86ea2f8300 R15: 0000000000022000
---[ end trace 1a1e5e36d1a6c775 ]---
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 443 Comm: syz-executor.2 Tainted: G W 5.10.101-syzkaller-00009-g0dcfc2c03655 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:strlen+0x3a/0x80 lib/string.c:568
Code: c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffffc900010b7b68 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88810c5762c0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900010b7b88 R08: ffffffff81d1256c R09: fffff52000216f75
R10: fffff52000216f75 R11: 1ffff92000216f74 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00007f86ea2f8700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f86ea2f7ff8 CR3: 0000000121ae6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kernfs_name_hash+0x21/0x240 fs/kernfs/dir.c:302
kernfs_find_ns+0x72/0x280 fs/kernfs/dir.c:841
kernfs_remove_by_name_ns+0x36/0x90 fs/kernfs/dir.c:1514
kernfs_remove_by_name include/linux/kernfs.h:608 [inline]
sysfs_remove_link+0x50/0x60 fs/sysfs/symlink.c:152
del_gendisk+0xbe0/0xe20 block/genhd.c:951
loop_remove+0x46/0xb0 drivers/block/loop.c:2185
loop_control_ioctl+0x67f/0x740 drivers/block/loop.c:2284
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+0x44/0xa9
RIP: 0033:0x7f86ea3820e9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f86ea2f8168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f86ea494f60 RCX: 00007f86ea3820e9
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000004
RBP: 00007f86ea3dc08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdd4e66e2f R14: 00007f86ea2f8300 R15: 0000000000022000
Modules linked in:
---[ end trace 1a1e5e36d1a6c776 ]---
RIP: 0010:strlen+0x3a/0x80 lib/string.c:568
Code: c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffffc900010b7b68 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88810c5762c0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900010b7b88 R08: ffffffff81d1256c R09: fffff52000216f75
R10: fffff52000216f75 R11: 1ffff92000216f74 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00007f86ea2f8700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f86ea2f7ff8 CR3: 0000000121ae6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 5 bytes skipped:
0: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
7: fc ff df
a: 48 89 fb mov %rdi,%rbx
d: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1)
14: 00 00 00 00
18: 0f 1f 00 nopl (%rax)
1b: 49 89 c4 mov %rax,%r12
1e: 48 89 d8 mov %rbx,%rax
21: 48 c1 e8 03 shr $0x3,%rax
* 25: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax <-- trapping instruction
2a: 84 c0 test %al,%al
2c: 75 12 jne 0x40
2e: 48 ff c3 inc %rbx
31: 49 8d 44 24 01 lea 0x1(%r12),%rax
36: 43 rex.XB
37: 80 .byte 0x80
38: 7c 26 jl 0x60
3a: 01 .byte 0x1


Tested on:

commit: 0dcfc2c0 ANDROID: GKI: Update symbols to symbol list
git tree: https://android.googlesource.com/kernel/common android12-5.10
console output: https://syzkaller.appspot.com/x/log.txt?x=12c1697cf00000
kernel config: https://syzkaller.appspot.com/x/.config?x=97fcf0b9b4761f62
dashboard link: https://syzkaller.appspot.com/bug?extid=dfe5ac05099017d9d483
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2

Reply all
Reply to author
Forward
0 new messages