Date
May 26, 2025, 9:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.322326] ================================================================== [ 20.322508] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00 [ 20.322635] Read of size 1 at addr fff00000c7896b90 by task kunit_try_catch/259 [ 20.322813] [ 20.322871] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT [ 20.322966] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.322996] Hardware name: linux,dummy-virt (DT) [ 20.323030] Call trace: [ 20.323058] show_stack+0x20/0x38 (C) [ 20.323111] dump_stack_lvl+0x8c/0xd0 [ 20.323161] print_report+0x118/0x608 [ 20.323209] kasan_report+0xdc/0x128 [ 20.323256] __asan_report_load1_noabort+0x20/0x30 [ 20.323308] kasan_strings+0x95c/0xb00 [ 20.323400] kunit_try_run_case+0x170/0x3f0 [ 20.323500] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.323612] kthread+0x328/0x630 [ 20.324102] ret_from_fork+0x10/0x20 [ 20.324223] [ 20.324264] Allocated by task 259: [ 20.324476] kasan_save_stack+0x3c/0x68 [ 20.324644] kasan_save_track+0x20/0x40 [ 20.325144] kasan_save_alloc_info+0x40/0x58 [ 20.325240] __kasan_kmalloc+0xd4/0xd8 [ 20.325512] __kmalloc_cache_noprof+0x15c/0x3c0 [ 20.325981] kasan_strings+0xc8/0xb00 [ 20.326067] kunit_try_run_case+0x170/0x3f0 [ 20.326181] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.326392] kthread+0x328/0x630 [ 20.326843] ret_from_fork+0x10/0x20 [ 20.327117] [ 20.327181] Freed by task 259: [ 20.327473] kasan_save_stack+0x3c/0x68 [ 20.327598] kasan_save_track+0x20/0x40 [ 20.327697] kasan_save_free_info+0x4c/0x78 [ 20.327774] __kasan_slab_free+0x6c/0x98 [ 20.327993] kfree+0x214/0x3c8 [ 20.328138] kasan_strings+0x24c/0xb00 [ 20.328341] kunit_try_run_case+0x170/0x3f0 [ 20.328460] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.328651] kthread+0x328/0x630 [ 20.328739] ret_from_fork+0x10/0x20 [ 20.328847] [ 20.328917] The buggy address belongs to the object at fff00000c7896b80 [ 20.328917] which belongs to the cache kmalloc-32 of size 32 [ 20.329054] The buggy address is located 16 bytes inside of [ 20.329054] freed 32-byte region [fff00000c7896b80, fff00000c7896ba0) [ 20.329209] [ 20.329280] The buggy address belongs to the physical page: [ 20.329369] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107896 [ 20.329495] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.329608] page_type: f5(slab) [ 20.329700] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.329865] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.330005] page dumped because: kasan: bad access detected [ 20.330106] [ 20.330171] Memory state around the buggy address: [ 20.330271] fff00000c7896a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.330384] fff00000c7896b00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.330477] >fff00000c7896b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.330565] ^ [ 20.331074] fff00000c7896c00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.331173] fff00000c7896c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.331256] ==================================================================
[ 12.961214] ================================================================== [ 12.961517] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80 [ 12.961871] Read of size 1 at addr ffff8881039b9850 by task kunit_try_catch/277 [ 12.962180] [ 12.962823] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) [ 12.962894] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.962909] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.962934] Call Trace: [ 12.962950] <TASK> [ 12.962968] dump_stack_lvl+0x73/0xb0 [ 12.963005] print_report+0xd1/0x650 [ 12.963029] ? __virt_addr_valid+0x1db/0x2d0 [ 12.963051] ? kasan_strings+0xcbc/0xe80 [ 12.963072] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.963096] ? kasan_strings+0xcbc/0xe80 [ 12.963118] kasan_report+0x141/0x180 [ 12.963141] ? kasan_strings+0xcbc/0xe80 [ 12.963168] __asan_report_load1_noabort+0x18/0x20 [ 12.963188] kasan_strings+0xcbc/0xe80 [ 12.963207] ? trace_hardirqs_on+0x37/0xe0 [ 12.963230] ? __pfx_kasan_strings+0x10/0x10 [ 12.963250] ? finish_task_switch.isra.0+0x153/0x700 [ 12.963273] ? __switch_to+0x47/0xf50 [ 12.963299] ? __schedule+0x10cc/0x2b60 [ 12.963323] ? __pfx_read_tsc+0x10/0x10 [ 12.963343] ? ktime_get_ts64+0x86/0x230 [ 12.963367] kunit_try_run_case+0x1a5/0x480 [ 12.963398] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.963438] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.963462] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.963487] ? __kthread_parkme+0x82/0x180 [ 12.963506] ? preempt_count_sub+0x50/0x80 [ 12.963529] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.963550] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.963574] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.963598] kthread+0x337/0x6f0 [ 12.963617] ? trace_preempt_on+0x20/0xc0 [ 12.963639] ? __pfx_kthread+0x10/0x10 [ 12.963659] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.963681] ? calculate_sigpending+0x7b/0xa0 [ 12.963705] ? __pfx_kthread+0x10/0x10 [ 12.963733] ret_from_fork+0x116/0x1d0 [ 12.963752] ? __pfx_kthread+0x10/0x10 [ 12.963772] ret_from_fork_asm+0x1a/0x30 [ 12.963803] </TASK> [ 12.963813] [ 12.977388] Allocated by task 277: [ 12.977715] kasan_save_stack+0x45/0x70 [ 12.978169] kasan_save_track+0x18/0x40 [ 12.978359] kasan_save_alloc_info+0x3b/0x50 [ 12.978524] __kasan_kmalloc+0xb7/0xc0 [ 12.978661] __kmalloc_cache_noprof+0x189/0x420 [ 12.979010] kasan_strings+0xc0/0xe80 [ 12.979528] kunit_try_run_case+0x1a5/0x480 [ 12.979937] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.980571] kthread+0x337/0x6f0 [ 12.980934] ret_from_fork+0x116/0x1d0 [ 12.981322] ret_from_fork_asm+0x1a/0x30 [ 12.981840] [ 12.981961] Freed by task 277: [ 12.982129] kasan_save_stack+0x45/0x70 [ 12.982495] kasan_save_track+0x18/0x40 [ 12.982859] kasan_save_free_info+0x3f/0x60 [ 12.983120] __kasan_slab_free+0x56/0x70 [ 12.983618] kfree+0x222/0x3f0 [ 12.983792] kasan_strings+0x2aa/0xe80 [ 12.983971] kunit_try_run_case+0x1a5/0x480 [ 12.984423] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.984758] kthread+0x337/0x6f0 [ 12.984883] ret_from_fork+0x116/0x1d0 [ 12.985097] ret_from_fork_asm+0x1a/0x30 [ 12.985466] [ 12.985627] The buggy address belongs to the object at ffff8881039b9840 [ 12.985627] which belongs to the cache kmalloc-32 of size 32 [ 12.986725] The buggy address is located 16 bytes inside of [ 12.986725] freed 32-byte region [ffff8881039b9840, ffff8881039b9860) [ 12.987503] [ 12.987585] The buggy address belongs to the physical page: [ 12.987786] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039b9 [ 12.988541] flags: 0x200000000000000(node=0|zone=2) [ 12.989094] page_type: f5(slab) [ 12.989411] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.990154] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.990667] page dumped because: kasan: bad access detected [ 12.990918] [ 12.991078] Memory state around the buggy address: [ 12.991664] ffff8881039b9700: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 12.992428] ffff8881039b9780: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 12.992776] >ffff8881039b9800: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 12.992995] ^ [ 12.993595] ffff8881039b9880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.994269] ffff8881039b9900: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 12.994649] ==================================================================