[Android 5.10] general protection fault in kernfs_find_ns

6 views
Skip to first unread message

syzbot

unread,
Sep 9, 2023, 2:30:54 PM9/9/23
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a27512601c2d Merge 5.10.194 into android13-5.10-lts
git tree: android13-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=155cbf14680000
kernel config: https://syzkaller.appspot.com/x/.config?x=c1c2ce51f851d2f6
dashboard link: https://syzkaller.appspot.com/bug?extid=c03842d041f269840123
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=126c20a0680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1014aac7a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/da4c10f4a7cd/disk-a2751260.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4d65589a1227/vmlinux-a2751260.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a8c5b14df758/bzImage-a2751260.xz

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

RBP: 0000000000005ee3 R08: 00000000000000a0 R09: 00000000000000a0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd2a50167c
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
---[ end trace 08aad3ffe8ebf0da ]---
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: 302 Comm: syz-executor294 Tainted: G W 5.10.194-syzkaller-00508-ga27512601c2d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:strlen+0x2c/0x70 lib/string.c:568
Code: 89 e5 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 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:ffffc90000b37ba8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: dffffc0000000001
RDX: ffff8881075e3b40 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b37bc8 R08: ffffffff81d2b6cb R09: fffff52000166f79
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 0000555556607380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd2a501568 CR3: 000000011ea89000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kernfs_name_hash fs/kernfs/dir.c:310 [inline]
kernfs_find_ns+0x95/0x4a0 fs/kernfs/dir.c:851
kernfs_remove_by_name_ns+0x3a/0x110 fs/kernfs/dir.c:1523
kernfs_remove_by_name include/linux/kernfs.h:608 [inline]
sysfs_remove_link+0x50/0x60 fs/sysfs/symlink.c:152
del_gendisk+0x87b/0xa90 block/genhd.c:951
loop_remove+0x46/0xb0 drivers/block/loop.c:2210
loop_control_ioctl+0x564/0x620 drivers/block/loop.c:2309
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0x114/0x190 fs/ioctl.c:739
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
do_syscall_64+0x34/0x70
entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7f3e1deb8d39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd2a501668 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3e1deb8d39
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 0000000000005ee3 R08: 00000000000000a0 R09: 00000000000000a0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd2a50167c
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
Modules linked in:
---[ end trace 08aad3ffe8ebf0db ]---
RIP: 0010:strlen+0x2c/0x70 lib/string.c:568
Code: 89 e5 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 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:ffffc90000b37ba8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: dffffc0000000001
RDX: ffff8881075e3b40 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000b37bc8 R08: ffffffff81d2b6cb R09: fffff52000166f79
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 0000555556607380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd2a501568 CR3: 000000011ea89000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 89 e5 mov %esp,%ebp
2: 41 57 push %r15
4: 41 56 push %r14
6: 41 54 push %r12
8: 53 push %rbx
9: 49 89 fe mov %rdi,%r14
c: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax
13: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
1a: fc ff df
1d: 48 89 fb mov %rdi,%rbx
20: 49 89 c4 mov %rax,%r12
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 75 12 jne 0x45
33: 48 ff c3 inc %rbx
36: 49 8d 44 24 01 lea 0x1(%r12),%rax
3b: 43 rex.XB
3c: 80 .byte 0x80
3d: 7c 26 jl 0x65
3f: 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.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages