Date
July 12, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.500912] ================================================================== [ 17.501095] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 17.501231] Read of size 1 at addr fff00000c78ac000 by task kunit_try_catch/213 [ 17.501326] [ 17.501419] CPU: 1 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.501506] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.501535] Hardware name: linux,dummy-virt (DT) [ 17.501834] Call trace: [ 17.501959] show_stack+0x20/0x38 (C) [ 17.502118] dump_stack_lvl+0x8c/0xd0 [ 17.502187] print_report+0x118/0x5d0 [ 17.502234] kasan_report+0xdc/0x128 [ 17.502344] __asan_report_load1_noabort+0x20/0x30 [ 17.502399] kmem_cache_rcu_uaf+0x388/0x468 [ 17.502444] kunit_try_run_case+0x170/0x3f0 [ 17.502724] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.502837] kthread+0x328/0x630 [ 17.502939] ret_from_fork+0x10/0x20 [ 17.502992] [ 17.503009] Allocated by task 213: [ 17.503069] kasan_save_stack+0x3c/0x68 [ 17.503407] kasan_save_track+0x20/0x40 [ 17.503654] kasan_save_alloc_info+0x40/0x58 [ 17.503824] __kasan_slab_alloc+0xa8/0xb0 [ 17.503892] kmem_cache_alloc_noprof+0x10c/0x398 [ 17.504021] kmem_cache_rcu_uaf+0x12c/0x468 [ 17.504204] kunit_try_run_case+0x170/0x3f0 [ 17.504266] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.504466] kthread+0x328/0x630 [ 17.504506] ret_from_fork+0x10/0x20 [ 17.504692] [ 17.504791] Freed by task 0: [ 17.504925] kasan_save_stack+0x3c/0x68 [ 17.505014] kasan_save_track+0x20/0x40 [ 17.505105] kasan_save_free_info+0x4c/0x78 [ 17.505152] __kasan_slab_free+0x6c/0x98 [ 17.505201] slab_free_after_rcu_debug+0xd4/0x2f8 [ 17.505255] rcu_core+0x9f4/0x1e20 [ 17.505294] rcu_core_si+0x18/0x30 [ 17.505338] handle_softirqs+0x374/0xb28 [ 17.505386] __do_softirq+0x1c/0x28 [ 17.505430] [ 17.505450] Last potentially related work creation: [ 17.505478] kasan_save_stack+0x3c/0x68 [ 17.505525] kasan_record_aux_stack+0xb4/0xc8 [ 17.505566] kmem_cache_free+0x120/0x468 [ 17.505603] kmem_cache_rcu_uaf+0x16c/0x468 [ 17.505642] kunit_try_run_case+0x170/0x3f0 [ 17.505680] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.505723] kthread+0x328/0x630 [ 17.505755] ret_from_fork+0x10/0x20 [ 17.505799] [ 17.505817] The buggy address belongs to the object at fff00000c78ac000 [ 17.505817] which belongs to the cache test_cache of size 200 [ 17.505878] The buggy address is located 0 bytes inside of [ 17.505878] freed 200-byte region [fff00000c78ac000, fff00000c78ac0c8) [ 17.505953] [ 17.505974] The buggy address belongs to the physical page: [ 17.506009] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078ac [ 17.506078] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.506133] page_type: f5(slab) [ 17.506191] raw: 0bfffe0000000000 fff00000c4715c80 dead000000000122 0000000000000000 [ 17.506642] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 17.506833] page dumped because: kasan: bad access detected [ 17.506987] [ 17.507011] Memory state around the buggy address: [ 17.507338] fff00000c78abf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 17.507944] fff00000c78abf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 17.508121] >fff00000c78ac000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.508302] ^ [ 17.508343] fff00000c78ac080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 17.508547] fff00000c78ac100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.508660] ==================================================================
[ 13.790329] ================================================================== [ 13.790933] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.791555] Read of size 1 at addr ffff888103a5e000 by task kunit_try_catch/230 [ 13.792183] [ 13.792427] CPU: 0 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.792483] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.792496] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.792519] Call Trace: [ 13.792533] <TASK> [ 13.792551] dump_stack_lvl+0x73/0xb0 [ 13.792584] print_report+0xd1/0x610 [ 13.792607] ? __virt_addr_valid+0x1db/0x2d0 [ 13.792632] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.792655] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.792679] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.792702] kasan_report+0x141/0x180 [ 13.792724] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.792751] __asan_report_load1_noabort+0x18/0x20 [ 13.792777] kmem_cache_rcu_uaf+0x3e3/0x510 [ 13.792800] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 13.792824] ? finish_task_switch.isra.0+0x153/0x700 [ 13.792849] ? __switch_to+0x47/0xf50 [ 13.792878] ? __pfx_read_tsc+0x10/0x10 [ 13.792900] ? ktime_get_ts64+0x86/0x230 [ 13.792925] kunit_try_run_case+0x1a5/0x480 [ 13.793190] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.793215] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.793241] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.793278] ? __kthread_parkme+0x82/0x180 [ 13.793300] ? preempt_count_sub+0x50/0x80 [ 13.793322] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.793348] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.793374] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.793400] kthread+0x337/0x6f0 [ 13.793419] ? trace_preempt_on+0x20/0xc0 [ 13.793444] ? __pfx_kthread+0x10/0x10 [ 13.793465] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.793487] ? calculate_sigpending+0x7b/0xa0 [ 13.793513] ? __pfx_kthread+0x10/0x10 [ 13.793535] ret_from_fork+0x116/0x1d0 [ 13.793554] ? __pfx_kthread+0x10/0x10 [ 13.793575] ret_from_fork_asm+0x1a/0x30 [ 13.793607] </TASK> [ 13.793618] [ 13.801636] Allocated by task 230: [ 13.801773] kasan_save_stack+0x45/0x70 [ 13.801922] kasan_save_track+0x18/0x40 [ 13.802154] kasan_save_alloc_info+0x3b/0x50 [ 13.802370] __kasan_slab_alloc+0x91/0xa0 [ 13.802558] kmem_cache_alloc_noprof+0x123/0x3f0 [ 13.802774] kmem_cache_rcu_uaf+0x155/0x510 [ 13.802968] kunit_try_run_case+0x1a5/0x480 [ 13.803210] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.803444] kthread+0x337/0x6f0 [ 13.803609] ret_from_fork+0x116/0x1d0 [ 13.803767] ret_from_fork_asm+0x1a/0x30 [ 13.803964] [ 13.804118] Freed by task 0: [ 13.804283] kasan_save_stack+0x45/0x70 [ 13.804467] kasan_save_track+0x18/0x40 [ 13.804648] kasan_save_free_info+0x3f/0x60 [ 13.804801] __kasan_slab_free+0x56/0x70 [ 13.804940] slab_free_after_rcu_debug+0xe4/0x310 [ 13.805100] rcu_core+0x66f/0x1c40 [ 13.805228] rcu_core_si+0x12/0x20 [ 13.805364] handle_softirqs+0x209/0x730 [ 13.805561] __irq_exit_rcu+0xc9/0x110 [ 13.805786] irq_exit_rcu+0x12/0x20 [ 13.805964] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.806195] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.806449] [ 13.806545] Last potentially related work creation: [ 13.806793] kasan_save_stack+0x45/0x70 [ 13.806986] kasan_record_aux_stack+0xb2/0xc0 [ 13.807154] kmem_cache_free+0x131/0x420 [ 13.807558] kmem_cache_rcu_uaf+0x194/0x510 [ 13.807776] kunit_try_run_case+0x1a5/0x480 [ 13.808051] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.808344] kthread+0x337/0x6f0 [ 13.808466] ret_from_fork+0x116/0x1d0 [ 13.808601] ret_from_fork_asm+0x1a/0x30 [ 13.808741] [ 13.808831] The buggy address belongs to the object at ffff888103a5e000 [ 13.808831] which belongs to the cache test_cache of size 200 [ 13.809878] The buggy address is located 0 bytes inside of [ 13.809878] freed 200-byte region [ffff888103a5e000, ffff888103a5e0c8) [ 13.810586] [ 13.810672] The buggy address belongs to the physical page: [ 13.810907] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a5e [ 13.811619] flags: 0x200000000000000(node=0|zone=2) [ 13.811854] page_type: f5(slab) [ 13.812083] raw: 0200000000000000 ffff888103a56280 dead000000000122 0000000000000000 [ 13.812413] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 13.812719] page dumped because: kasan: bad access detected [ 13.812945] [ 13.813085] Memory state around the buggy address: [ 13.813291] ffff888103a5df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.813582] ffff888103a5df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.813870] >ffff888103a5e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.814213] ^ [ 13.814379] ffff888103a5e080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 13.814660] ffff888103a5e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.814957] ==================================================================