syzbot


general protection fault in debug_locks_off

Status: closed as invalid on 2024/09/13 10:29
Subsystems: kernel
[Documentation on labels]
First crash: 161d, last: 161d

Sample crash report:
Oops: general protection fault, maybe for address 0x1: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5364 Comm: syz.3.14 Not tainted 6.11.0-rc4-next-20240820-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0046:debug_locks_off+0x83/0x90 lib/debug_locks.c:48
RSP: 0000:b6cff8e828317b00 EFLAGS: 00010087
==================================================================
BUG: KASAN: stack-out-of-bounds in __show_regs+0x4f/0x610 arch/x86/kernel/process_64.c:78
Read of size 8 at addr ffffc900044272f0 by task syz.3.14/5364

CPU: 1 UID: 0 PID: 5364 Comm: syz.3.14 Not tainted 6.11.0-rc4-next-20240820-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:377 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:488
 kasan_report+0x143/0x180 mm/kasan/report.c:601
 __show_regs+0x4f/0x610 arch/x86/kernel/process_64.c:78
 show_regs arch/x86/kernel/dumpstack.c:472 [inline]
 __die_body+0x3c/0xb0 arch/x86/kernel/dumpstack.c:420
 die_addr+0xb0/0xe0 arch/x86/kernel/dumpstack.c:460
 __exc_general_protection arch/x86/kernel/traps.c:748 [inline]
 exc_general_protection+0x3dd/0x5d0 arch/x86/kernel/traps.c:693
 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617
RIP: 0046:debug_locks_off+0x83/0x90 lib/debug_locks.c:48
RSP: 0000:b6cff8e828317b00 EFLAGS: 00010087 ORIG_RAX: ffffffff817172e0
RAX: ffffffff8e0382cc RBX: dffffc0000000000 RCX: ffffffff814074e0
RDX: ffff8880b903ea40 RSI: 0000000045e0360e RDI: ffffffff8e0415d9
RBP: ffffffff8140766a R08: 0000000041b58ab3 R09: ffff8880b903ea40
R10: 0000000304427370 R11: ffffc90004427300 R12: ffff88823ffe1840
R13: dffffc0000000000 R14: 0000000000000008 R15: 0000000000000010
 </TASK>

The buggy address belongs to stack of task syz.3.14/5364
 and is located at offset 48 in frame:
 kvm_wait+0x0/0x2c0

This frame has 2 objects:
 [32, 40) 'flags.i.i.i'
 [64, 72) 'flags.i.i'

The buggy address belongs to the virtual mapping at
 [ffffc90004420000, ffffc90004429000) created by:
 copy_process+0x5d1/0x3d50 kernel/fork.c:2206

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801f083e88 pfn:0x1f083
memcg:ffff888029845782
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff88801f083e88 0000000000000000 00000001ffffffff ffff888029845782
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 5362, tgid 5362 (syz.3.14), ts 66718281171, free_ts 66552726740
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1517
 prep_new_page mm/page_alloc.c:1525 [inline]
 get_page_from_freelist+0x3004/0x30c0 mm/page_alloc.c:3476
 __alloc_pages_noprof+0x29e/0x780 mm/page_alloc.c:4743
 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
 vm_area_alloc_pages mm/vmalloc.c:3600 [inline]
 __vmalloc_area_node mm/vmalloc.c:3669 [inline]
 __vmalloc_node_range_noprof+0xa40/0x1400 mm/vmalloc.c:3850
 alloc_thread_stack_node kernel/fork.c:314 [inline]
 dup_task_struct+0x444/0x8c0 kernel/fork.c:1115
 copy_process+0x5d1/0x3d50 kernel/fork.c:2206
 kernel_clone+0x226/0x8f0 kernel/fork.c:2787
 __do_sys_clone3 kernel/fork.c:3091 [inline]
 __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3070
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5247 tgid 5247 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1098 [inline]
 free_unref_page+0xc07/0xd90 mm/page_alloc.c:2651
 __slab_free+0x31b/0x3d0 mm/slub.c:4432
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:250 [inline]
 slab_post_alloc_hook mm/slub.c:4036 [inline]
 slab_alloc_node mm/slub.c:4085 [inline]
 __do_kmalloc_node mm/slub.c:4205 [inline]
 __kmalloc_noprof+0x1a6/0x400 mm/slub.c:4218
 kmalloc_noprof include/linux/slab.h:685 [inline]
 tomoyo_realpath_from_path+0xcf/0x5e0 security/tomoyo/realpath.c:251
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_perm+0x2b7/0x740 security/tomoyo/file.c:822
 security_inode_getattr+0xd8/0x130 security/security.c:2282
 vfs_getattr+0x45/0x430 fs/stat.c:242
 vfs_fstat fs/stat.c:267 [inline]
 vfs_fstatat+0xe4/0x190 fs/stat.c:376
 __do_sys_newfstatat fs/stat.c:543 [inline]
 __se_sys_newfstatat fs/stat.c:537 [inline]
 __x64_sys_newfstatat+0x11d/0x1a0 fs/stat.c:537
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffffc90004427180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90004427200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90004427280: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2
                                                             ^
 ffffc90004427300: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90004427380: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 01 f2
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/20 22:21 linux-next bb1b0acdcd66 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in debug_locks_off
* Struck through repros no longer work on HEAD.