================================================================== BUG: KASAN: stack-out-of-bounds in fixup_exception+0xa7/0x1cc0 arch/x86/mm/extable.c:320 Read of size 8 at addr ffffc90004a1fb58 by task syz.2.16/5365 CPU: 1 UID: 0 PID: 5365 Comm: syz.2.16 Not tainted 6.11.0-rc4-next-20240822-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __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 fixup_exception+0xa7/0x1cc0 arch/x86/mm/extable.c:320 kernelmode_fixup_or_oops+0x66/0xf0 arch/x86/mm/fault.c:728 __bad_area_nosemaphore+0x118/0x770 arch/x86/mm/fault.c:785 handle_page_fault arch/x86/mm/fault.c:1479 [inline] exc_page_fault+0x5c8/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0010:0xffff88801873a904 Code: 00 00 00 00 01 00 ff ff ff ff ff ff ff ff 4b ce e2 81 ff ff ff ff 20 02 f2 1d 80 88 ff ff 00 00 00 00 00 00 00 00 f7 84 05 00 <00> 00 00 00 46 fc 51 be e8 4a b2 76 73 77 cb 81 ff ff ff ff e0 9a RSP: 0018:ffffc90004a1fb80 EFLAGS: 00010046 RAX: ffff88807e15bc00 RBX: ffff88801873a900 RCX: 1ffff92000943f30 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90004a1fd00 R08: ffffffff81324818 R09: 1ffff110030e73c0 R10: dffffc0000000000 R11: ffffed10030e73c1 R12: 0000000000000028 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to stack of task syz.2.16/5365 and is located at offset 376 in frame: __bad_area_nosemaphore+0x0/0x770 This frame has 1 object: [32, 40) 'flags.i.i.i' The buggy address belongs to the virtual mapping at [ffffc90004a18000, ffffc90004a21000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2203 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880793dee58 pfn:0x793de memcg:ffff88802c286882 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff8880793dee58 0000000000000000 00000001ffffffff ffff88802c286882 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 935, tgid 935 (kworker/u8:5), ts 65619217165, free_ts 65606694939 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+0x3131/0x3280 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:2203 kernel_clone+0x226/0x8f0 kernel/fork.c:2784 user_mode_thread+0x132/0x1a0 kernel/fork.c:2862 call_usermodehelper_exec_sync kernel/umh.c:133 [inline] call_usermodehelper_exec_work+0x9b/0x230 kernel/umh.c:164 process_one_work kernel/workqueue.c:3232 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3313 worker_thread+0x86d/0xd10 kernel/workqueue.c:3390 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 5340 tgid 5337 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 discard_slab mm/slub.c:2630 [inline] __put_partials+0xeb/0x130 mm/slub.c:3098 put_cpu_partial+0x17c/0x250 mm/slub.c:3173 __slab_free+0x2ea/0x3d0 mm/slub.c:4391 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_number_perm+0x23a/0x880 security/tomoyo/file.c:723 security_file_ioctl+0xc6/0x2a0 security/security.c:2937 __do_sys_ioctl fs/ioctl.c:901 [inline] __se_sys_ioctl+0x47/0x170 fs/ioctl.c:893 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: ffffc90004a1fa00: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90004a1fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90004a1fb00: 00 00 00 00 00 f2 f2 f2 00 f2 f2 f2 00 f2 f2 f2 ^ ffffc90004a1fb80: 00 f2 f2 f2 00 f2 f2 f2 00 f2 f2 f2 00 f2 f2 f2 ffffc90004a1fc00: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== kernel tried to execute NX-protected page - exploit attempt? (uid: 0) BUG: unable to handle page fault for address: ffff88801873a904 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0011) - permissions violation PGD 15401067 P4D 15401067 PUD 15402067 PMD 80000000186000e3 Oops: Oops: 0011 [#1] PREEMPT SMP KASAN PTI CPU: 1 UID: 0 PID: 5365 Comm: syz.2.16 Tainted: G B 6.11.0-rc4-next-20240822-syzkaller #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:0xffff88801873a904 Code: 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 4b ce e2 81 ff ff ff ff 20 02 f2 1d 80 88 ff ff 00 00 00 00 00 00 00 00 f7 84 05 00 <00> 00 00 00 46 fc 51 be e8 4a b2 76 73 77 cb 81 ff ff ff ff e0 9a RSP: 0018:ffffc90004a1fb80 EFLAGS: 00010046 RAX: ffff88807e15bc00 RBX: ffff88801873a900 RCX: 1ffff92000943f30 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90004a1fd00 R08: ffffffff81324818 R09: 1ffff110030e73c0 R10: dffffc0000000000 R11: ffffed10030e73c1 R12: 0000000000000028 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 000055556dbb9500(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88801873a904 CR3: 000000007e394000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: Modules linked in: CR2: ffff88801873a904 ---[ end trace 0000000000000000 ]--- RIP: 0010:0xffff88801873a904 Code: 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 4b ce e2 81 ff ff ff ff 20 02 f2 1d 80 88 ff ff 00 00 00 00 00 00 00 00 f7 84 05 00 <00> 00 00 00 46 fc 51 be e8 4a b2 76 73 77 cb 81 ff ff ff ff e0 9a RSP: 0018:ffffc90004a1fb80 EFLAGS: 00010046 RAX: ffff88807e15bc00 RBX: ffff88801873a900 RCX: 1ffff92000943f30 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90004a1fd00 R08: ffffffff81324818 R09: 1ffff110030e73c0 R10: dffffc0000000000 R11: ffffed10030e73c1 R12: 0000000000000028 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 000055556dbb9500(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88801873a904 CR3: 000000007e394000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400