================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff88801c236324 by task udevd/4508 CPU: 1 PID: 4508 Comm: udevd Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x50 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0x9b/0x13d0 kernel/sched/core.c:4253 call_timer_fn+0x193/0x590 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x759/0xaa0 kernel/time/timer.c:2038 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2051 __do_softirq+0x21a/0x8de kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu kernel/softirq.c:632 [inline] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x70 kernel/locking/spinlock.c:194 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 c6 ba d9 f6 48 89 df e8 be 32 da f6 f7 c5 00 02 00 00 75 1f 9c 58 f6 c4 02 75 2f 01 00 00 00 e8 c5 d2 cb f6 65 8b 05 96 17 75 75 85 c0 74 12 5b RSP: 0018:ffffc90002ea7850 EFLAGS: 00000246 RAX: 0000000000000046 RBX: ffff88813fffad40 RCX: 1ffffffff1e758d3 RDX: 0000000000000000 RSI: ffffffff8b2f8d40 RDI: ffffffff8a8eaafe RBP: 0000000000000246 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff8f3a92d7 R11: dffffc0000000000 R12: ffff88813fffa740 R13: 000000000000003f R14: ffff88813fffad38 R15: ffff8880b9942bc0 free_unref_page_commit+0x4e9/0xf30 mm/page_alloc.c:2466 free_unref_page+0x1d0/0x3c0 mm/page_alloc.c:2509 __put_partials+0x14c/0x160 mm/slub.c:2922 qlink_free mm/kasan/quarantine.c:160 [inline] qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc+0x136/0x320 mm/slub.c:3867 kmem_cache_zalloc include/linux/slab.h:701 [inline] lsm_file_alloc security/security.c:648 [inline] security_file_alloc+0x41/0x250 security/security.c:2681 init_file+0x99/0x250 fs/file_table.c:153 alloc_empty_file+0x91/0x1d0 fs/file_table.c:207 path_openat+0xdc/0x2990 fs/namei.c:3784 do_filp_open+0x1de/0x430 fs/namei.c:3825 do_sys_openat2+0x176/0x1e0 fs/open.c:1404 do_sys_open fs/open.c:1419 [inline] __do_sys_openat fs/open.c:1435 [inline] __se_sys_openat fs/open.c:1430 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1430 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f70edd169a4 Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc5ee00070 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00005572b2b5f040 RCX: 00007f70edd169a4 RDX: 0000000000080141 RSI: 00005572b2b420d8 RDI: 00000000ffffff9c RBP: 00005572b2b420d8 R08: 00000000ffffffff R09: 0000000000000000 R10: 00000000000001a4 R11: 0000000000000246 R12: 0000000000080141 R13: ffffffffffffffff R14: 00000000ffffffff R15: 00000000ffffffff Allocated by task 2: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 kernel_thread+0xc0/0x100 kernel/fork.c:2963 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x4fb/0x7d0 kernel/kthread.c:764 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Freed by task 22: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x129/0x350 mm/slub.c:4363 put_task_struct include/linux/sched/task.h:138 [inline] put_task_struct include/linux/sched/task.h:125 [inline] delayed_put_task_struct+0x21b/0x2c0 kernel/exit.c:229 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:580 __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683 put_task_struct_rcu_user kernel/exit.c:235 [inline] put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:232 context_switch kernel/sched/core.c:5403 [inline] __schedule+0xf1a/0x5c00 kernel/sched/core.c:6727 __schedule_loop kernel/sched/core.c:6802 [inline] schedule+0xe9/0x270 kernel/sched/core.c:6817 nilfs_segctor_kill_thread fs/nilfs2/segment.c:2680 [inline] nilfs_segctor_destroy fs/nilfs2/segment.c:2762 [inline] nilfs_detach_log_writer+0x2f8/0xa90 fs/nilfs2/segment.c:2851 nilfs_put_super+0x43/0x1b0 fs/nilfs2/super.c:499 generic_shutdown_super+0x159/0x3d0 fs/super.c:646 kill_block_super+0x3b/0x90 fs/super.c:1680 deactivate_locked_super+0xbc/0x1a0 fs/super.c:477 deactivate_super+0xde/0x100 fs/super.c:510 cleanup_mnt+0x222/0x450 fs/namespace.c:1267 task_work_run+0x14d/0x240 kernel/task_work.c:180 ptrace_notify+0x10d/0x130 kernel/signal.c:2390 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:167 [inline] syscall_exit_to_user_mode_prepare+0x126/0x230 kernel/entry/common.c:194 __syscall_exit_to_user_mode_work kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0x11/0x2b0 kernel/entry/common.c:212 do_syscall_64+0xe0/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88801c235940 which belongs to the cache task_struct of size 7360 The buggy address is located 2532 bytes inside of freed 7360-byte region [ffff88801c235940, ffff88801c237600) The buggy address belongs to the physical page: page:ffffea0000708c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c230 head:ffffea0000708c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff8880146a1500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 59, tgid 59 (kworker/u4:4), ts 5212165817, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmem_cache_alloc_node+0x10a/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 user_mode_thread+0xb4/0xf0 kernel/fork.c:2979 call_usermodehelper_exec_work kernel/umh.c:172 [inline] call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 page_owner free stack trace missing Memory state around the buggy address: ffff88801c236200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801c236300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801c236380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:87 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x27f/0x2b0 kernel/locking/spinlock_debug.c:115 Read of size 8 at addr ffff88801c236330 by task udevd/4508 CPU: 1 PID: 4508 Comm: udevd Tainted: G B 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 debug_spin_lock_before kernel/locking/spinlock_debug.c:87 [inline] do_raw_spin_lock+0x27f/0x2b0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x50 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0x9b/0x13d0 kernel/sched/core.c:4253 call_timer_fn+0x193/0x590 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x759/0xaa0 kernel/time/timer.c:2038 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2051 __do_softirq+0x21a/0x8de kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu kernel/softirq.c:632 [inline] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x70 kernel/locking/spinlock.c:194 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 c6 ba d9 f6 48 89 df e8 be 32 da f6 f7 c5 00 02 00 00 75 1f 9c 58 f6 c4 02 75 2f 01 00 00 00 e8 c5 d2 cb f6 65 8b 05 96 17 75 75 85 c0 74 12 5b RSP: 0018:ffffc90002ea7850 EFLAGS: 00000246 RAX: 0000000000000046 RBX: ffff88813fffad40 RCX: 1ffffffff1e758d3 RDX: 0000000000000000 RSI: ffffffff8b2f8d40 RDI: ffffffff8a8eaafe RBP: 0000000000000246 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff8f3a92d7 R11: dffffc0000000000 R12: ffff88813fffa740 R13: 000000000000003f R14: ffff88813fffad38 R15: ffff8880b9942bc0 free_unref_page_commit+0x4e9/0xf30 mm/page_alloc.c:2466 free_unref_page+0x1d0/0x3c0 mm/page_alloc.c:2509 __put_partials+0x14c/0x160 mm/slub.c:2922 qlink_free mm/kasan/quarantine.c:160 [inline] qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc+0x136/0x320 mm/slub.c:3867 kmem_cache_zalloc include/linux/slab.h:701 [inline] lsm_file_alloc security/security.c:648 [inline] security_file_alloc+0x41/0x250 security/security.c:2681 init_file+0x99/0x250 fs/file_table.c:153 alloc_empty_file+0x91/0x1d0 fs/file_table.c:207 path_openat+0xdc/0x2990 fs/namei.c:3784 do_filp_open+0x1de/0x430 fs/namei.c:3825 do_sys_openat2+0x176/0x1e0 fs/open.c:1404 do_sys_open fs/open.c:1419 [inline] __do_sys_openat fs/open.c:1435 [inline] __se_sys_openat fs/open.c:1430 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1430 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f70edd169a4 Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc5ee00070 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00005572b2b5f040 RCX: 00007f70edd169a4 RDX: 0000000000080141 RSI: 00005572b2b420d8 RDI: 00000000ffffff9c RBP: 00005572b2b420d8 R08: 00000000ffffffff R09: 0000000000000000 R10: 00000000000001a4 R11: 0000000000000246 R12: 0000000000080141 R13: ffffffffffffffff R14: 00000000ffffffff R15: 00000000ffffffff Allocated by task 2: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 kernel_thread+0xc0/0x100 kernel/fork.c:2963 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x4fb/0x7d0 kernel/kthread.c:764 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Freed by task 22: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x129/0x350 mm/slub.c:4363 put_task_struct include/linux/sched/task.h:138 [inline] put_task_struct include/linux/sched/task.h:125 [inline] delayed_put_task_struct+0x21b/0x2c0 kernel/exit.c:229 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:580 __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683 put_task_struct_rcu_user kernel/exit.c:235 [inline] put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:232 context_switch kernel/sched/core.c:5403 [inline] __schedule+0xf1a/0x5c00 kernel/sched/core.c:6727 __schedule_loop kernel/sched/core.c:6802 [inline] schedule+0xe9/0x270 kernel/sched/core.c:6817 nilfs_segctor_kill_thread fs/nilfs2/segment.c:2680 [inline] nilfs_segctor_destroy fs/nilfs2/segment.c:2762 [inline] nilfs_detach_log_writer+0x2f8/0xa90 fs/nilfs2/segment.c:2851 nilfs_put_super+0x43/0x1b0 fs/nilfs2/super.c:499 generic_shutdown_super+0x159/0x3d0 fs/super.c:646 kill_block_super+0x3b/0x90 fs/super.c:1680 deactivate_locked_super+0xbc/0x1a0 fs/super.c:477 deactivate_super+0xde/0x100 fs/super.c:510 cleanup_mnt+0x222/0x450 fs/namespace.c:1267 task_work_run+0x14d/0x240 kernel/task_work.c:180 ptrace_notify+0x10d/0x130 kernel/signal.c:2390 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:167 [inline] syscall_exit_to_user_mode_prepare+0x126/0x230 kernel/entry/common.c:194 __syscall_exit_to_user_mode_work kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0x11/0x2b0 kernel/entry/common.c:212 do_syscall_64+0xe0/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88801c235940 which belongs to the cache task_struct of size 7360 The buggy address is located 2544 bytes inside of freed 7360-byte region [ffff88801c235940, ffff88801c237600) The buggy address belongs to the physical page: page:ffffea0000708c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c230 head:ffffea0000708c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff8880146a1500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 59, tgid 59 (kworker/u4:4), ts 5212165817, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmem_cache_alloc_node+0x10a/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 user_mode_thread+0xb4/0xf0 kernel/fork.c:2979 call_usermodehelper_exec_work kernel/umh.c:172 [inline] call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 page_owner free stack trace missing Memory state around the buggy address: ffff88801c236200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801c236300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801c236380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:88 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x265/0x2b0 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff88801c236328 by task udevd/4508 CPU: 1 PID: 4508 Comm: udevd Tainted: G B 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 debug_spin_lock_before kernel/locking/spinlock_debug.c:88 [inline] do_raw_spin_lock+0x265/0x2b0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x50 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0x9b/0x13d0 kernel/sched/core.c:4253 call_timer_fn+0x193/0x590 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x759/0xaa0 kernel/time/timer.c:2038 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2051 __do_softirq+0x21a/0x8de kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu kernel/softirq.c:632 [inline] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x70 kernel/locking/spinlock.c:194 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 c6 ba d9 f6 48 89 df e8 be 32 da f6 f7 c5 00 02 00 00 75 1f 9c 58 f6 c4 02 75 2f 01 00 00 00 e8 c5 d2 cb f6 65 8b 05 96 17 75 75 85 c0 74 12 5b RSP: 0018:ffffc90002ea7850 EFLAGS: 00000246 RAX: 0000000000000046 RBX: ffff88813fffad40 RCX: 1ffffffff1e758d3 RDX: 0000000000000000 RSI: ffffffff8b2f8d40 RDI: ffffffff8a8eaafe RBP: 0000000000000246 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff8f3a92d7 R11: dffffc0000000000 R12: ffff88813fffa740 R13: 000000000000003f R14: ffff88813fffad38 R15: ffff8880b9942bc0 free_unref_page_commit+0x4e9/0xf30 mm/page_alloc.c:2466 free_unref_page+0x1d0/0x3c0 mm/page_alloc.c:2509 __put_partials+0x14c/0x160 mm/slub.c:2922 qlink_free mm/kasan/quarantine.c:160 [inline] qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc+0x136/0x320 mm/slub.c:3867 kmem_cache_zalloc include/linux/slab.h:701 [inline] lsm_file_alloc security/security.c:648 [inline] security_file_alloc+0x41/0x250 security/security.c:2681 init_file+0x99/0x250 fs/file_table.c:153 alloc_empty_file+0x91/0x1d0 fs/file_table.c:207 path_openat+0xdc/0x2990 fs/namei.c:3784 do_filp_open+0x1de/0x430 fs/namei.c:3825 do_sys_openat2+0x176/0x1e0 fs/open.c:1404 do_sys_open fs/open.c:1419 [inline] __do_sys_openat fs/open.c:1435 [inline] __se_sys_openat fs/open.c:1430 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1430 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f70edd169a4 Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc5ee00070 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00005572b2b5f040 RCX: 00007f70edd169a4 RDX: 0000000000080141 RSI: 00005572b2b420d8 RDI: 00000000ffffff9c RBP: 00005572b2b420d8 R08: 00000000ffffffff R09: 0000000000000000 R10: 00000000000001a4 R11: 0000000000000246 R12: 0000000000080141 R13: ffffffffffffffff R14: 00000000ffffffff R15: 00000000ffffffff Allocated by task 2: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 kernel_thread+0xc0/0x100 kernel/fork.c:2963 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x4fb/0x7d0 kernel/kthread.c:764 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Freed by task 22: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x129/0x350 mm/slub.c:4363 put_task_struct include/linux/sched/task.h:138 [inline] put_task_struct include/linux/sched/task.h:125 [inline] delayed_put_task_struct+0x21b/0x2c0 kernel/exit.c:229 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:580 __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683 put_task_struct_rcu_user kernel/exit.c:235 [inline] put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:232 context_switch kernel/sched/core.c:5403 [inline] __schedule+0xf1a/0x5c00 kernel/sched/core.c:6727 __schedule_loop kernel/sched/core.c:6802 [inline] schedule+0xe9/0x270 kernel/sched/core.c:6817 nilfs_segctor_kill_thread fs/nilfs2/segment.c:2680 [inline] nilfs_segctor_destroy fs/nilfs2/segment.c:2762 [inline] nilfs_detach_log_writer+0x2f8/0xa90 fs/nilfs2/segment.c:2851 nilfs_put_super+0x43/0x1b0 fs/nilfs2/super.c:499 generic_shutdown_super+0x159/0x3d0 fs/super.c:646 kill_block_super+0x3b/0x90 fs/super.c:1680 deactivate_locked_super+0xbc/0x1a0 fs/super.c:477 deactivate_super+0xde/0x100 fs/super.c:510 cleanup_mnt+0x222/0x450 fs/namespace.c:1267 task_work_run+0x14d/0x240 kernel/task_work.c:180 ptrace_notify+0x10d/0x130 kernel/signal.c:2390 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:167 [inline] syscall_exit_to_user_mode_prepare+0x126/0x230 kernel/entry/common.c:194 __syscall_exit_to_user_mode_work kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0x11/0x2b0 kernel/entry/common.c:212 do_syscall_64+0xe0/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88801c235940 which belongs to the cache task_struct of size 7360 The buggy address is located 2536 bytes inside of freed 7360-byte region [ffff88801c235940, ffff88801c237600) The buggy address belongs to the physical page: page:ffffea0000708c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c230 head:ffffea0000708c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff8880146a1500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 59, tgid 59 (kworker/u4:4), ts 5212165817, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmem_cache_alloc_node+0x10a/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 user_mode_thread+0xb4/0xf0 kernel/fork.c:2979 call_usermodehelper_exec_work kernel/umh.c:172 [inline] call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 page_owner free stack trace missing Memory state around the buggy address: ffff88801c236200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801c236300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801c236380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1294 [inline] BUG: KASAN: slab-use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x11f/0x2b0 kernel/locking/spinlock_debug.c:116 Write of size 4 at addr ffff88801c236320 by task udevd/4508 CPU: 1 PID: 4508 Comm: udevd Tainted: G B 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x190 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1294 [inline] queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] do_raw_spin_lock+0x11f/0x2b0 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x50 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0x9b/0x13d0 kernel/sched/core.c:4253 call_timer_fn+0x193/0x590 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x759/0xaa0 kernel/time/timer.c:2038 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2051 __do_softirq+0x21a/0x8de kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu kernel/softirq.c:632 [inline] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x70 kernel/locking/spinlock.c:194 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 c6 ba d9 f6 48 89 df e8 be 32 da f6 f7 c5 00 02 00 00 75 1f 9c 58 f6 c4 02 75 2f 01 00 00 00 e8 c5 d2 cb f6 65 8b 05 96 17 75 75 85 c0 74 12 5b RSP: 0018:ffffc90002ea7850 EFLAGS: 00000246 RAX: 0000000000000046 RBX: ffff88813fffad40 RCX: 1ffffffff1e758d3 RDX: 0000000000000000 RSI: ffffffff8b2f8d40 RDI: ffffffff8a8eaafe RBP: 0000000000000246 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff8f3a92d7 R11: dffffc0000000000 R12: ffff88813fffa740 R13: 000000000000003f R14: ffff88813fffad38 R15: ffff8880b9942bc0 free_unref_page_commit+0x4e9/0xf30 mm/page_alloc.c:2466 free_unref_page+0x1d0/0x3c0 mm/page_alloc.c:2509 __put_partials+0x14c/0x160 mm/slub.c:2922 qlink_free mm/kasan/quarantine.c:160 [inline] qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc+0x136/0x320 mm/slub.c:3867 kmem_cache_zalloc include/linux/slab.h:701 [inline] lsm_file_alloc security/security.c:648 [inline] security_file_alloc+0x41/0x250 security/security.c:2681 init_file+0x99/0x250 fs/file_table.c:153 alloc_empty_file+0x91/0x1d0 fs/file_table.c:207 path_openat+0xdc/0x2990 fs/namei.c:3784 do_filp_open+0x1de/0x430 fs/namei.c:3825 do_sys_openat2+0x176/0x1e0 fs/open.c:1404 do_sys_open fs/open.c:1419 [inline] __do_sys_openat fs/open.c:1435 [inline] __se_sys_openat fs/open.c:1430 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1430 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f70edd169a4 Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc5ee00070 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00005572b2b5f040 RCX: 00007f70edd169a4 RDX: 0000000000080141 RSI: 00005572b2b420d8 RDI: 00000000ffffff9c RBP: 00005572b2b420d8 R08: 00000000ffffffff R09: 0000000000000000 R10: 00000000000001a4 R11: 0000000000000246 R12: 0000000000080141 R13: ffffffffffffffff R14: 00000000ffffffff R15: 00000000ffffffff Allocated by task 2: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 kernel_thread+0xc0/0x100 kernel/fork.c:2963 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x4fb/0x7d0 kernel/kthread.c:764 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Freed by task 22: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x129/0x350 mm/slub.c:4363 put_task_struct include/linux/sched/task.h:138 [inline] put_task_struct include/linux/sched/task.h:125 [inline] delayed_put_task_struct+0x21b/0x2c0 kernel/exit.c:229 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:580 __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683 put_task_struct_rcu_user kernel/exit.c:235 [inline] put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:232 context_switch kernel/sched/core.c:5403 [inline] __schedule+0xf1a/0x5c00 kernel/sched/core.c:6727 __schedule_loop kernel/sched/core.c:6802 [inline] schedule+0xe9/0x270 kernel/sched/core.c:6817 nilfs_segctor_kill_thread fs/nilfs2/segment.c:2680 [inline] nilfs_segctor_destroy fs/nilfs2/segment.c:2762 [inline] nilfs_detach_log_writer+0x2f8/0xa90 fs/nilfs2/segment.c:2851 nilfs_put_super+0x43/0x1b0 fs/nilfs2/super.c:499 generic_shutdown_super+0x159/0x3d0 fs/super.c:646 kill_block_super+0x3b/0x90 fs/super.c:1680 deactivate_locked_super+0xbc/0x1a0 fs/super.c:477 deactivate_super+0xde/0x100 fs/super.c:510 cleanup_mnt+0x222/0x450 fs/namespace.c:1267 task_work_run+0x14d/0x240 kernel/task_work.c:180 ptrace_notify+0x10d/0x130 kernel/signal.c:2390 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:167 [inline] syscall_exit_to_user_mode_prepare+0x126/0x230 kernel/entry/common.c:194 __syscall_exit_to_user_mode_work kernel/entry/common.c:199 [inline] syscall_exit_to_user_mode+0x11/0x2b0 kernel/entry/common.c:212 do_syscall_64+0xe0/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88801c235940 which belongs to the cache task_struct of size 7360 The buggy address is located 2528 bytes inside of freed 7360-byte region [ffff88801c235940, ffff88801c237600) The buggy address belongs to the physical page: page:ffffea0000708c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1c230 head:ffffea0000708c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff8880146a1500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffffff 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 59, tgid 59 (kworker/u4:4), ts 5212165817, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmem_cache_alloc_node+0x10a/0x340 mm/slub.c:3903 alloc_task_struct_node kernel/fork.c:174 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x44f/0x97b0 kernel/fork.c:2326 kernel_clone+0xfd/0x930 kernel/fork.c:2901 user_mode_thread+0xb4/0xf0 kernel/fork.c:2979 call_usermodehelper_exec_work kernel/umh.c:172 [inline] call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 page_owner free stack trace missing Memory state around the buggy address: ffff88801c236200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801c236300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801c236380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801c236400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: f5 cmc 1: 53 push %rbx 2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 7: 48 89 fb mov %rdi,%rbx a: 48 83 c7 18 add $0x18,%rdi e: e8 c6 ba d9 f6 call 0xf6d9bad9 13: 48 89 df mov %rbx,%rdi 16: e8 be 32 da f6 call 0xf6da32d9 1b: f7 c5 00 02 00 00 test $0x200,%ebp 21: 75 1f jne 0x42 23: 9c pushf 24: 58 pop %rax 25: f6 c4 02 test $0x2,%ah 28: 75 2f jne 0x59 * 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2f: e8 c5 d2 cb f6 call 0xf6cbd2f9 34: 65 8b 05 96 17 75 75 mov %gs:0x75751796(%rip),%eax # 0x757517d1 3b: 85 c0 test %eax,%eax 3d: 74 12 je 0x51 3f: 5b pop %rbx