Date
June 17, 2025, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.244757] ================================================================== [ 19.244890] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 19.245488] Read of size 1 at addr fff00000c5211590 by task kunit_try_catch/268 [ 19.245550] [ 19.245591] CPU: 1 UID: 0 PID: 268 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT [ 19.245679] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.245708] Hardware name: linux,dummy-virt (DT) [ 19.245742] Call trace: [ 19.245767] show_stack+0x20/0x38 (C) [ 19.245821] dump_stack_lvl+0x8c/0xd0 [ 19.245870] print_report+0x118/0x608 [ 19.245919] kasan_report+0xdc/0x128 [ 19.245979] __asan_report_load1_noabort+0x20/0x30 [ 19.246036] strlen+0xa8/0xb0 [ 19.246081] kasan_strings+0x418/0xb00 [ 19.246130] kunit_try_run_case+0x170/0x3f0 [ 19.246180] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.246236] kthread+0x328/0x630 [ 19.246281] ret_from_fork+0x10/0x20 [ 19.246331] [ 19.246351] Allocated by task 268: [ 19.246379] kasan_save_stack+0x3c/0x68 [ 19.246423] kasan_save_track+0x20/0x40 [ 19.246461] kasan_save_alloc_info+0x40/0x58 [ 19.246500] __kasan_kmalloc+0xd4/0xd8 [ 19.246539] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.246581] kasan_strings+0xc8/0xb00 [ 19.246617] kunit_try_run_case+0x170/0x3f0 [ 19.246657] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.246703] kthread+0x328/0x630 [ 19.246738] ret_from_fork+0x10/0x20 [ 19.246775] [ 19.246794] Freed by task 268: [ 19.246823] kasan_save_stack+0x3c/0x68 [ 19.246861] kasan_save_track+0x20/0x40 [ 19.246900] kasan_save_free_info+0x4c/0x78 [ 19.246947] __kasan_slab_free+0x6c/0x98 [ 19.246988] kfree+0x214/0x3c8 [ 19.247022] kasan_strings+0x24c/0xb00 [ 19.247059] kunit_try_run_case+0x170/0x3f0 [ 19.247097] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.247143] kthread+0x328/0x630 [ 19.247177] ret_from_fork+0x10/0x20 [ 19.247216] [ 19.247235] The buggy address belongs to the object at fff00000c5211580 [ 19.247235] which belongs to the cache kmalloc-32 of size 32 [ 19.247295] The buggy address is located 16 bytes inside of [ 19.247295] freed 32-byte region [fff00000c5211580, fff00000c52115a0) [ 19.247360] [ 19.247380] The buggy address belongs to the physical page: [ 19.247413] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105211 [ 19.247468] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.247519] page_type: f5(slab) [ 19.247560] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.247613] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.247657] page dumped because: kasan: bad access detected [ 19.247690] [ 19.247709] Memory state around the buggy address: [ 19.247742] fff00000c5211480: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.247788] fff00000c5211500: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 19.247835] >fff00000c5211580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.247874] ^ [ 19.247906] fff00000c5211600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.248062] fff00000c5211680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.248106] ==================================================================
[ 20.902931] ================================================================== [ 20.903889] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 20.904510] Read of size 1 at addr ffff88810383f710 by task kunit_try_catch/286 [ 20.905385] [ 20.905665] CPU: 1 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) [ 20.905793] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.905851] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 20.905929] Call Trace: [ 20.906006] <TASK> [ 20.906054] dump_stack_lvl+0x73/0xb0 [ 20.906140] print_report+0xd1/0x650 [ 20.906216] ? __virt_addr_valid+0x1db/0x2d0 [ 20.906461] ? strlen+0x8f/0xb0 [ 20.906538] ? kasan_complete_mode_report_info+0x64/0x200 [ 20.906610] ? strlen+0x8f/0xb0 [ 20.906676] kasan_report+0x141/0x180 [ 20.906750] ? strlen+0x8f/0xb0 [ 20.906871] __asan_report_load1_noabort+0x18/0x20 [ 20.906956] strlen+0x8f/0xb0 [ 20.907028] kasan_strings+0x57b/0xe80 [ 20.907095] ? trace_hardirqs_on+0x37/0xe0 [ 20.907171] ? __pfx_kasan_strings+0x10/0x10 [ 20.907266] ? finish_task_switch.isra.0+0x153/0x700 [ 20.907396] ? __switch_to+0x47/0xf50 [ 20.907485] ? __schedule+0x10cc/0x2b60 [ 20.907569] ? __pfx_read_tsc+0x10/0x10 [ 20.907642] ? ktime_get_ts64+0x86/0x230 [ 20.907715] kunit_try_run_case+0x1a5/0x480 [ 20.907752] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.907785] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 20.907817] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 20.907882] ? __kthread_parkme+0x82/0x180 [ 20.907912] ? preempt_count_sub+0x50/0x80 [ 20.907945] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.907979] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.908012] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 20.908045] kthread+0x337/0x6f0 [ 20.908071] ? trace_preempt_on+0x20/0xc0 [ 20.908103] ? __pfx_kthread+0x10/0x10 [ 20.908132] ? _raw_spin_unlock_irq+0x47/0x80 [ 20.908165] ? calculate_sigpending+0x7b/0xa0 [ 20.908200] ? __pfx_kthread+0x10/0x10 [ 20.908228] ret_from_fork+0x116/0x1d0 [ 20.908254] ? __pfx_kthread+0x10/0x10 [ 20.908282] ret_from_fork_asm+0x1a/0x30 [ 20.908323] </TASK> [ 20.908337] [ 20.928828] Allocated by task 286: [ 20.929166] kasan_save_stack+0x45/0x70 [ 20.929820] kasan_save_track+0x18/0x40 [ 20.930578] kasan_save_alloc_info+0x3b/0x50 [ 20.930906] __kasan_kmalloc+0xb7/0xc0 [ 20.931365] __kmalloc_cache_noprof+0x189/0x420 [ 20.931969] kasan_strings+0xc0/0xe80 [ 20.932524] kunit_try_run_case+0x1a5/0x480 [ 20.932998] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.933452] kthread+0x337/0x6f0 [ 20.933908] ret_from_fork+0x116/0x1d0 [ 20.934307] ret_from_fork_asm+0x1a/0x30 [ 20.934638] [ 20.934858] Freed by task 286: [ 20.935153] kasan_save_stack+0x45/0x70 [ 20.935497] kasan_save_track+0x18/0x40 [ 20.936050] kasan_save_free_info+0x3f/0x60 [ 20.936466] __kasan_slab_free+0x56/0x70 [ 20.936858] kfree+0x222/0x3f0 [ 20.937113] kasan_strings+0x2aa/0xe80 [ 20.937433] kunit_try_run_case+0x1a5/0x480 [ 20.937704] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.939006] kthread+0x337/0x6f0 [ 20.941276] ret_from_fork+0x116/0x1d0 [ 20.941623] ret_from_fork_asm+0x1a/0x30 [ 20.942037] [ 20.942520] The buggy address belongs to the object at ffff88810383f700 [ 20.942520] which belongs to the cache kmalloc-32 of size 32 [ 20.943803] The buggy address is located 16 bytes inside of [ 20.943803] freed 32-byte region [ffff88810383f700, ffff88810383f720) [ 20.944502] [ 20.944630] The buggy address belongs to the physical page: [ 20.946168] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10383f [ 20.948976] flags: 0x200000000000000(node=0|zone=2) [ 20.950201] page_type: f5(slab) [ 20.950975] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 20.952879] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.954620] page dumped because: kasan: bad access detected [ 20.955070] [ 20.955234] Memory state around the buggy address: [ 20.955636] ffff88810383f600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.956245] ffff88810383f680: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.956887] >ffff88810383f700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.957488] ^ [ 20.957849] ffff88810383f780: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.959005] ffff88810383f800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.959639] ==================================================================