================================================================== BUG: KASAN: slab-use-after-free in notifier_call_chain+0x3bf/0x410 kernel/notifier.c:75 Read of size 8 at addr ffff888079ec18d0 by task init/10031 CPU: 0 UID: 0 PID: 10031 Comm: init Not tainted 6.13.0-syzkaller-01005-gb9d8a295ed6b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 notifier_call_chain+0x3bf/0x410 kernel/notifier.c:75 blocking_notifier_call_chain kernel/notifier.c:380 [inline] blocking_notifier_call_chain+0x69/0xa0 kernel/notifier.c:368 kernel_shutdown_prepare kernel/reboot.c:299 [inline] kernel_power_off+0x1c/0xb0 kernel/reboot.c:702 __do_sys_reboot+0x376/0x3e0 kernel/reboot.c:777 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f16b8c208b4 Code: f0 ff ff 73 01 c3 48 8b 0d 71 55 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 89 fa be 69 19 12 28 bf ad de e1 fe b8 a9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 45 55 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffd643fab38 EFLAGS: 00000246 ORIG_RAX: 00000000000000a9 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f16b8c208b4 RDX: 000000004321fedc RSI: 0000000028121969 RDI: 00000000fee1dead RBP: 000000004321fedc R08: 0000000000000000 R09: 0000000000000000 R10: 00007ffd643fab10 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd643fab98 R14: 0000558c495e8169 R15: 00007f16b8dfea80 Allocated by task 9906: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0xcb3/0x2170 security/tomoyo/audit.c:264 tomoyo_supervisor+0x30c/0xea0 security/tomoyo/common.c:2089 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x193/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xe8e/0x2070 security/tomoyo/domain.c:881 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12e/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x1b9/0x1e0 security/security.c:1296 search_binary_handler fs/exec.c:1757 [inline] exec_binprm fs/exec.c:1799 [inline] bprm_execve fs/exec.c:1851 [inline] bprm_execve+0x63e/0x1550 fs/exec.c:1827 do_execveat_common.isra.0+0x4a2/0x610 fs/exec.c:1958 do_execve fs/exec.c:2032 [inline] __do_sys_execve fs/exec.c:2108 [inline] __se_sys_execve fs/exec.c:2103 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2103 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 9906: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4613 [inline] kfree+0x14f/0x4b0 mm/slub.c:4761 tomoyo_init_log+0x1531/0x2170 security/tomoyo/audit.c:293 tomoyo_supervisor+0x30c/0xea0 security/tomoyo/common.c:2089 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x193/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xe8e/0x2070 security/tomoyo/domain.c:881 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12e/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x1b9/0x1e0 security/security.c:1296 search_binary_handler fs/exec.c:1757 [inline] exec_binprm fs/exec.c:1799 [inline] bprm_execve fs/exec.c:1851 [inline] bprm_execve+0x63e/0x1550 fs/exec.c:1827 do_execveat_common.isra.0+0x4a2/0x610 fs/exec.c:1958 do_execve fs/exec.c:2032 [inline] __do_sys_execve fs/exec.c:2108 [inline] __se_sys_execve fs/exec.c:2103 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2103 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888079ec0000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 6352 bytes inside of freed 8192-byte region [ffff888079ec0000, ffff888079ec2000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79ec0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b042280 ffffea0000952c00 dead000000000002 raw: 0000000000000000 0000000000020002 00000001f5000000 0000000000000000 head: 00fff00000000040 ffff88801b042280 ffffea0000952c00 dead000000000002 head: 0000000000000000 0000000000020002 00000001f5000000 0000000000000000 head: 00fff00000000003 ffffea0001e7b001 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 11, tgid 11 (kworker/u8:0), ts 79439730945, free_ts 76905984232 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3476 __alloc_pages_noprof+0x221/0x2470 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x2c8/0x620 mm/mempolicy.c:2269 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2589 [inline] new_slab+0x2c9/0x410 mm/slub.c:2642 ___slab_alloc+0xd75/0x17a0 mm/slub.c:3830 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] __do_kmalloc_node mm/slub.c:4297 [inline] __kmalloc_noprof+0x2ec/0x510 mm/slub.c:4310 kmalloc_noprof include/linux/slab.h:905 [inline] n_hdlc_tty_receive+0x223/0x280 drivers/tty/n_hdlc.c:393 tty_ldisc_receive_buf+0x153/0x190 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x70/0xb0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:445 [inline] flush_to_ldisc+0x264/0x780 drivers/tty/tty_buffer.c:495 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3398 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 page last free pid 6691 tgid 6691 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0x1080 mm/page_alloc.c:2659 __folio_put+0x32a/0x450 mm/swap.c:112 folio_put include/linux/mm.h:1489 [inline] put_page+0x21e/0x280 include/linux/mm.h:1561 skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x4d7/0x730 net/core/skbuff.c:1119 skb_release_all net/core/skbuff.c:1190 [inline] kfree_skb_add_bulk net/core/skbuff.c:1263 [inline] kfree_skb_list_reason+0x2c6/0x4c0 net/core/skbuff.c:1285 skb_release_data+0x553/0x730 net/core/skbuff.c:1123