Date
July 3, 2025, 3:13 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.826736] ================================================================== [ 16.826863] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 16.826978] Read of size 1 at addr fff00000c78ae000 by task kunit_try_catch/216 [ 16.827031] [ 16.827074] CPU: 1 UID: 0 PID: 216 Comm: kunit_try_catch Tainted: G B N 6.15.5-rc1 #1 PREEMPT [ 16.827175] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.827203] Hardware name: linux,dummy-virt (DT) [ 16.827236] Call trace: [ 16.827262] show_stack+0x20/0x38 (C) [ 16.827315] dump_stack_lvl+0x8c/0xd0 [ 16.827368] print_report+0x118/0x608 [ 16.827413] kasan_report+0xdc/0x128 [ 16.827456] __asan_report_load1_noabort+0x20/0x30 [ 16.827506] kmem_cache_rcu_uaf+0x388/0x468 [ 16.827553] kunit_try_run_case+0x170/0x3f0 [ 16.827605] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.827659] kthread+0x328/0x630 [ 16.827704] ret_from_fork+0x10/0x20 [ 16.827754] [ 16.827773] Allocated by task 216: [ 16.827802] kasan_save_stack+0x3c/0x68 [ 16.827842] kasan_save_track+0x20/0x40 [ 16.827878] kasan_save_alloc_info+0x40/0x58 [ 16.827916] __kasan_slab_alloc+0xa8/0xb0 [ 16.827963] kmem_cache_alloc_noprof+0x10c/0x398 [ 16.828004] kmem_cache_rcu_uaf+0x12c/0x468 [ 16.828044] kunit_try_run_case+0x170/0x3f0 [ 16.828082] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.828126] kthread+0x328/0x630 [ 16.828163] ret_from_fork+0x10/0x20 [ 16.828201] [ 16.828219] Freed by task 0: [ 16.828248] kasan_save_stack+0x3c/0x68 [ 16.828283] kasan_save_track+0x20/0x40 [ 16.828319] kasan_save_free_info+0x4c/0x78 [ 16.828356] __kasan_slab_free+0x6c/0x98 [ 16.828393] slab_free_after_rcu_debug+0xd4/0x2f8 [ 16.828431] rcu_core+0x9f4/0x1e20 [ 16.828467] rcu_core_si+0x18/0x30 [ 16.828499] handle_softirqs+0x374/0xb28 [ 16.828536] __do_softirq+0x1c/0x28 [ 16.828568] [ 16.828588] Last potentially related work creation: [ 16.828615] kasan_save_stack+0x3c/0x68 [ 16.828651] kasan_record_aux_stack+0xb4/0xc8 [ 16.828690] kmem_cache_free+0x120/0x468 [ 16.828724] kmem_cache_rcu_uaf+0x16c/0x468 [ 16.828763] kunit_try_run_case+0x170/0x3f0 [ 16.828801] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.828846] kthread+0x328/0x630 [ 16.828883] ret_from_fork+0x10/0x20 [ 16.828918] [ 16.828938] The buggy address belongs to the object at fff00000c78ae000 [ 16.828938] which belongs to the cache test_cache of size 200 [ 16.829004] The buggy address is located 0 bytes inside of [ 16.829004] freed 200-byte region [fff00000c78ae000, fff00000c78ae0c8) [ 16.829065] [ 16.829086] The buggy address belongs to the physical page: [ 16.829119] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078ae [ 16.829174] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.829227] page_type: f5(slab) [ 16.829268] raw: 0bfffe0000000000 fff00000c78a7280 dead000000000122 0000000000000000 [ 16.829318] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 16.829358] page dumped because: kasan: bad access detected [ 16.829390] [ 16.829407] Memory state around the buggy address: [ 16.829440] fff00000c78adf00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc [ 16.829485] fff00000c78adf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.829528] >fff00000c78ae000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.829568] ^ [ 16.829595] fff00000c78ae080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 16.829637] fff00000c78ae100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.829677] ==================================================================
[ 11.945653] ================================================================== [ 11.946133] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.946646] Read of size 1 at addr ffff888102dda000 by task kunit_try_catch/232 [ 11.947320] [ 11.947899] CPU: 1 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G B N 6.15.5-rc1 #1 PREEMPT(voluntary) [ 11.948230] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.948254] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.948280] Call Trace: [ 11.948296] <TASK> [ 11.948318] dump_stack_lvl+0x73/0xb0 [ 11.948355] print_report+0xd1/0x650 [ 11.948380] ? __virt_addr_valid+0x1db/0x2d0 [ 11.948404] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.948425] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.948448] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.948467] kasan_report+0x141/0x180 [ 11.948490] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.948515] __asan_report_load1_noabort+0x18/0x20 [ 11.948536] kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.948557] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 11.948796] ? finish_task_switch.isra.0+0x153/0x700 [ 11.948832] ? __switch_to+0x5d9/0xf60 [ 11.948856] ? dequeue_task_fair+0x166/0x4e0 [ 11.948884] ? __pfx_read_tsc+0x10/0x10 [ 11.948905] ? ktime_get_ts64+0x86/0x230 [ 11.948931] kunit_try_run_case+0x1a5/0x480 [ 11.948958] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.948981] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.949007] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.949031] ? __kthread_parkme+0x82/0x180 [ 11.949054] ? preempt_count_sub+0x50/0x80 [ 11.949078] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.949121] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.949145] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.949168] kthread+0x337/0x6f0 [ 11.949185] ? trace_preempt_on+0x20/0xc0 [ 11.949210] ? __pfx_kthread+0x10/0x10 [ 11.949229] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.949267] ? calculate_sigpending+0x7b/0xa0 [ 11.949290] ? __pfx_kthread+0x10/0x10 [ 11.949308] ret_from_fork+0x41/0x80 [ 11.949330] ? __pfx_kthread+0x10/0x10 [ 11.949348] ret_from_fork_asm+0x1a/0x30 [ 11.949379] </TASK> [ 11.949391] [ 11.960193] Allocated by task 232: [ 11.960687] kasan_save_stack+0x45/0x70 [ 11.960945] kasan_save_track+0x18/0x40 [ 11.961168] kasan_save_alloc_info+0x3b/0x50 [ 11.961532] __kasan_slab_alloc+0x91/0xa0 [ 11.961762] kmem_cache_alloc_noprof+0x123/0x3f0 [ 11.961976] kmem_cache_rcu_uaf+0x155/0x510 [ 11.962121] kunit_try_run_case+0x1a5/0x480 [ 11.962406] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.962751] kthread+0x337/0x6f0 [ 11.962979] ret_from_fork+0x41/0x80 [ 11.963153] ret_from_fork_asm+0x1a/0x30 [ 11.963304] [ 11.963404] Freed by task 0: [ 11.963723] kasan_save_stack+0x45/0x70 [ 11.963916] kasan_save_track+0x18/0x40 [ 11.964053] kasan_save_free_info+0x3f/0x60 [ 11.964268] __kasan_slab_free+0x56/0x70 [ 11.964541] slab_free_after_rcu_debug+0xe4/0x310 [ 11.965107] rcu_core+0x66c/0x1c30 [ 11.965272] rcu_core_si+0x12/0x20 [ 11.965584] handle_softirqs+0x209/0x730 [ 11.965819] __irq_exit_rcu+0xc9/0x110 [ 11.965961] irq_exit_rcu+0x12/0x20 [ 11.966147] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.966621] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.966875] [ 11.966976] Last potentially related work creation: [ 11.967231] kasan_save_stack+0x45/0x70 [ 11.967518] kasan_record_aux_stack+0xb2/0xc0 [ 11.967762] kmem_cache_free+0x131/0x420 [ 11.967934] kmem_cache_rcu_uaf+0x194/0x510 [ 11.968076] kunit_try_run_case+0x1a5/0x480 [ 11.968241] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.968593] kthread+0x337/0x6f0 [ 11.968895] ret_from_fork+0x41/0x80 [ 11.969027] ret_from_fork_asm+0x1a/0x30 [ 11.969166] [ 11.969524] The buggy address belongs to the object at ffff888102dda000 [ 11.969524] which belongs to the cache test_cache of size 200 [ 11.970384] The buggy address is located 0 bytes inside of [ 11.970384] freed 200-byte region [ffff888102dda000, ffff888102dda0c8) [ 11.971165] [ 11.971606] The buggy address belongs to the physical page: [ 11.972116] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102dda [ 11.972570] flags: 0x200000000000000(node=0|zone=2) [ 11.973023] page_type: f5(slab) [ 11.973205] raw: 0200000000000000 ffff888101ac53c0 dead000000000122 0000000000000000 [ 11.974072] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 11.974620] page dumped because: kasan: bad access detected [ 11.974998] [ 11.975077] Memory state around the buggy address: [ 11.975490] ffff888102dd9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.975919] ffff888102dd9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.976413] >ffff888102dda000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.976897] ^ [ 11.977155] ffff888102dda080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 11.977751] ffff888102dda100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.978162] ==================================================================