Date
June 24, 2025, 11:37 a.m.
Environment | |
---|---|
dragonboard-845c | |
qemu-arm64 | |
qemu-x86_64 |
[ 44.523252] ================================================================== [ 44.535033] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 44.542284] Read of size 1 at addr ffff000083324000 by task kunit_try_catch/311 [ 44.549699] [ 44.551238] CPU: 1 UID: 0 PID: 311 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250624 #1 PREEMPT [ 44.551275] Tainted: [B]=BAD_PAGE, [N]=TEST [ 44.551284] Hardware name: Thundercomm Dragonboard 845c (DT) [ 44.551301] Call trace: [ 44.551309] show_stack+0x20/0x38 (C) [ 44.551335] dump_stack_lvl+0x8c/0xd0 [ 44.551359] print_report+0x118/0x608 [ 44.551382] kasan_report+0xdc/0x128 [ 44.551401] __asan_report_load1_noabort+0x20/0x30 [ 44.551421] kmem_cache_rcu_uaf+0x388/0x468 [ 44.551440] kunit_try_run_case+0x170/0x3f0 [ 44.551465] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 44.551490] kthread+0x328/0x630 [ 44.551509] ret_from_fork+0x10/0x20 [ 44.551531] [ 44.617225] Allocated by task 311: [ 44.620691] kasan_save_stack+0x3c/0x68 [ 44.624601] kasan_save_track+0x20/0x40 [ 44.628512] kasan_save_alloc_info+0x40/0x58 [ 44.632851] __kasan_slab_alloc+0xa8/0xb0 [ 44.636936] kmem_cache_alloc_noprof+0x10c/0x398 [ 44.641639] kmem_cache_rcu_uaf+0x12c/0x468 [ 44.645896] kunit_try_run_case+0x170/0x3f0 [ 44.650150] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 44.655719] kthread+0x328/0x630 [ 44.659005] ret_from_fork+0x10/0x20 [ 44.662644] [ 44.664179] Freed by task 0: [ 44.667114] kasan_save_stack+0x3c/0x68 [ 44.671014] kasan_save_track+0x20/0x40 [ 44.674924] kasan_save_free_info+0x4c/0x78 [ 44.679176] __kasan_slab_free+0x6c/0x98 [ 44.683172] slab_free_after_rcu_debug+0xd4/0x2f8 [ 44.687954] rcu_core+0x9f4/0x1e20 [ 44.691429] rcu_core_si+0x18/0x30 [ 44.694896] handle_softirqs+0x374/0xb28 [ 44.698895] __do_softirq+0x1c/0x28 [ 44.702446] [ 44.703983] Last potentially related work creation: [ 44.708932] kasan_save_stack+0x3c/0x68 [ 44.712842] kasan_record_aux_stack+0xb4/0xc8 [ 44.717270] kmem_cache_free+0x120/0x468 [ 44.721265] kmem_cache_rcu_uaf+0x16c/0x468 [ 44.725521] kunit_try_run_case+0x170/0x3f0 [ 44.729777] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 44.735348] kthread+0x328/0x630 [ 44.738644] ret_from_fork+0x10/0x20 [ 44.742283] [ 44.743817] The buggy address belongs to the object at ffff000083324000 [ 44.743817] which belongs to the cache test_cache of size 200 [ 44.756392] The buggy address is located 0 bytes inside of [ 44.756392] freed 200-byte region [ffff000083324000, ffff0000833240c8) [ 44.768619] [ 44.770153] The buggy address belongs to the physical page: [ 44.775800] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103324 [ 44.783909] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 44.791674] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 44.798743] page_type: f5(slab) [ 44.801954] raw: 0bfffe0000000040 ffff000083320140 dead000000000122 0000000000000000 [ 44.809803] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000 [ 44.817651] head: 0bfffe0000000040 ffff000083320140 dead000000000122 0000000000000000 [ 44.825586] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000 [ 44.833518] head: 0bfffe0000000001 fffffdffc20cc901 00000000ffffffff 00000000ffffffff [ 44.841451] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 44.849381] page dumped because: kasan: bad access detected [ 44.855034] [ 44.856568] Memory state around the buggy address: [ 44.861435] ffff000083323f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 44.868751] ffff000083323f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 44.876068] >ffff000083324000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.883381] ^ [ 44.886673] ffff000083324080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 44.893988] ffff000083324100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 44.901301] ==================================================================
[ 34.557555] ================================================================== [ 34.557660] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 34.557749] Read of size 1 at addr fff00000c77d9000 by task kunit_try_catch/224 [ 34.557809] [ 34.557854] CPU: 0 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250624 #1 PREEMPT [ 34.558671] Tainted: [B]=BAD_PAGE, [N]=TEST [ 34.558907] Hardware name: linux,dummy-virt (DT) [ 34.558997] Call trace: [ 34.559057] show_stack+0x20/0x38 (C) [ 34.559190] dump_stack_lvl+0x8c/0xd0 [ 34.559314] print_report+0x118/0x608 [ 34.559430] kasan_report+0xdc/0x128 [ 34.559544] __asan_report_load1_noabort+0x20/0x30 [ 34.559664] kmem_cache_rcu_uaf+0x388/0x468 [ 34.559780] kunit_try_run_case+0x170/0x3f0 [ 34.560460] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.560626] kthread+0x328/0x630 [ 34.560753] ret_from_fork+0x10/0x20 [ 34.560911] [ 34.560960] Allocated by task 224: [ 34.561394] kasan_save_stack+0x3c/0x68 [ 34.561614] kasan_save_track+0x20/0x40 [ 34.562250] kasan_save_alloc_info+0x40/0x58 [ 34.562363] __kasan_slab_alloc+0xa8/0xb0 [ 34.562459] kmem_cache_alloc_noprof+0x10c/0x398 [ 34.562565] kmem_cache_rcu_uaf+0x12c/0x468 [ 34.562655] kunit_try_run_case+0x170/0x3f0 [ 34.562767] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.562878] kthread+0x328/0x630 [ 34.562980] ret_from_fork+0x10/0x20 [ 34.563090] [ 34.563227] Freed by task 0: [ 34.563296] kasan_save_stack+0x3c/0x68 [ 34.563396] kasan_save_track+0x20/0x40 [ 34.563495] kasan_save_free_info+0x4c/0x78 [ 34.563776] __kasan_slab_free+0x6c/0x98 [ 34.563878] slab_free_after_rcu_debug+0xd4/0x2f8 [ 34.564197] rcu_core+0x9f4/0x1e20 [ 34.564387] rcu_core_si+0x18/0x30 [ 34.564491] handle_softirqs+0x374/0xb28 [ 34.564639] __do_softirq+0x1c/0x28 [ 34.564749] [ 34.564802] Last potentially related work creation: [ 34.564865] kasan_save_stack+0x3c/0x68 [ 34.564985] kasan_record_aux_stack+0xb4/0xc8 [ 34.565830] kmem_cache_free+0x120/0x468 [ 34.565947] kmem_cache_rcu_uaf+0x16c/0x468 [ 34.566079] kunit_try_run_case+0x170/0x3f0 [ 34.566180] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.566487] kthread+0x328/0x630 [ 34.566626] ret_from_fork+0x10/0x20 [ 34.566777] [ 34.566824] The buggy address belongs to the object at fff00000c77d9000 [ 34.566824] which belongs to the cache test_cache of size 200 [ 34.567015] The buggy address is located 0 bytes inside of [ 34.567015] freed 200-byte region [fff00000c77d9000, fff00000c77d90c8) [ 34.567221] [ 34.567515] The buggy address belongs to the physical page: [ 34.567899] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077d9 [ 34.568192] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 34.568333] page_type: f5(slab) [ 34.568607] raw: 0bfffe0000000000 fff00000c77d6000 dead000000000122 0000000000000000 [ 34.568765] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 34.568869] page dumped because: kasan: bad access detected [ 34.568969] [ 34.569013] Memory state around the buggy address: [ 34.569119] fff00000c77d8f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.569242] fff00000c77d8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.569384] >fff00000c77d9000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.569780] ^ [ 34.570010] fff00000c77d9080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 34.570216] fff00000c77d9100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.570326] ==================================================================
[ 30.176405] ================================================================== [ 30.177011] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 30.177989] Read of size 1 at addr ffff888102de7000 by task kunit_try_catch/243 [ 30.178966] [ 30.179215] CPU: 0 UID: 0 PID: 243 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250624 #1 PREEMPT(voluntary) [ 30.179334] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.179366] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 30.179413] Call Trace: [ 30.179443] <TASK> [ 30.179477] dump_stack_lvl+0x73/0xb0 [ 30.179569] print_report+0xd1/0x650 [ 30.179624] ? __virt_addr_valid+0x1db/0x2d0 [ 30.179687] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 30.179743] ? kasan_complete_mode_report_info+0x64/0x200 [ 30.179799] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 30.179857] kasan_report+0x141/0x180 [ 30.179904] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 30.179961] __asan_report_load1_noabort+0x18/0x20 [ 30.180014] kmem_cache_rcu_uaf+0x3e3/0x510 [ 30.180062] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 30.180111] ? finish_task_switch.isra.0+0x153/0x700 [ 30.180161] ? __switch_to+0x47/0xf50 [ 30.180222] ? __pfx_read_tsc+0x10/0x10 [ 30.180269] ? ktime_get_ts64+0x86/0x230 [ 30.180323] kunit_try_run_case+0x1a5/0x480 [ 30.180383] ? __pfx_kunit_try_run_case+0x10/0x10 [ 30.180439] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 30.180504] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 30.180621] ? __kthread_parkme+0x82/0x180 [ 30.180674] ? preempt_count_sub+0x50/0x80 [ 30.180734] ? __pfx_kunit_try_run_case+0x10/0x10 [ 30.180796] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 30.180857] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 30.180892] kthread+0x337/0x6f0 [ 30.180919] ? trace_preempt_on+0x20/0xc0 [ 30.180951] ? __pfx_kthread+0x10/0x10 [ 30.180977] ? _raw_spin_unlock_irq+0x47/0x80 [ 30.181006] ? calculate_sigpending+0x7b/0xa0 [ 30.181035] ? __pfx_kthread+0x10/0x10 [ 30.181083] ret_from_fork+0x116/0x1d0 [ 30.181126] ? __pfx_kthread+0x10/0x10 [ 30.181170] ret_from_fork_asm+0x1a/0x30 [ 30.181215] </TASK> [ 30.181230] [ 30.200600] Allocated by task 243: [ 30.201415] kasan_save_stack+0x45/0x70 [ 30.201936] kasan_save_track+0x18/0x40 [ 30.202434] kasan_save_alloc_info+0x3b/0x50 [ 30.203037] __kasan_slab_alloc+0x91/0xa0 [ 30.203652] kmem_cache_alloc_noprof+0x123/0x3f0 [ 30.203931] kmem_cache_rcu_uaf+0x155/0x510 [ 30.204560] kunit_try_run_case+0x1a5/0x480 [ 30.205461] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 30.205791] kthread+0x337/0x6f0 [ 30.206268] ret_from_fork+0x116/0x1d0 [ 30.206759] ret_from_fork_asm+0x1a/0x30 [ 30.207436] [ 30.207585] Freed by task 0: [ 30.208210] kasan_save_stack+0x45/0x70 [ 30.208860] kasan_save_track+0x18/0x40 [ 30.209444] kasan_save_free_info+0x3f/0x60 [ 30.209862] __kasan_slab_free+0x56/0x70 [ 30.210614] slab_free_after_rcu_debug+0xe4/0x310 [ 30.211358] rcu_core+0x66f/0x1c40 [ 30.211625] rcu_core_si+0x12/0x20 [ 30.212014] handle_softirqs+0x209/0x730 [ 30.212627] __irq_exit_rcu+0xc9/0x110 [ 30.213272] irq_exit_rcu+0x12/0x20 [ 30.214135] sysvec_apic_timer_interrupt+0x81/0x90 [ 30.214532] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 30.214804] [ 30.215317] Last potentially related work creation: [ 30.215713] kasan_save_stack+0x45/0x70 [ 30.216240] kasan_record_aux_stack+0xb2/0xc0 [ 30.216954] kmem_cache_free+0x131/0x420 [ 30.217408] kmem_cache_rcu_uaf+0x194/0x510 [ 30.217778] kunit_try_run_case+0x1a5/0x480 [ 30.218508] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 30.218857] kthread+0x337/0x6f0 [ 30.219111] ret_from_fork+0x116/0x1d0 [ 30.219444] ret_from_fork_asm+0x1a/0x30 [ 30.220273] [ 30.220491] The buggy address belongs to the object at ffff888102de7000 [ 30.220491] which belongs to the cache test_cache of size 200 [ 30.221528] The buggy address is located 0 bytes inside of [ 30.221528] freed 200-byte region [ffff888102de7000, ffff888102de70c8) [ 30.222835] [ 30.223360] The buggy address belongs to the physical page: [ 30.224089] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102de7 [ 30.224755] flags: 0x200000000000000(node=0|zone=2) [ 30.225211] page_type: f5(slab) [ 30.225433] raw: 0200000000000000 ffff888101060dc0 dead000000000122 0000000000000000 [ 30.226066] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 30.226733] page dumped because: kasan: bad access detected [ 30.227590] [ 30.227785] Memory state around the buggy address: [ 30.228398] ffff888102de6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.228988] ffff888102de6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.229797] >ffff888102de7000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.230500] ^ [ 30.230878] ffff888102de7080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 30.231422] ffff888102de7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.231929] ==================================================================