Date
July 4, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-x86_64 |
[ 13.990843] ================================================================== [ 13.991173] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.991472] Read of size 1 at addr ffff888103994910 by task kunit_try_catch/276 [ 13.991771] [ 13.991891] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.991938] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.991950] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.991972] Call Trace: [ 13.991992] <TASK> [ 13.992015] dump_stack_lvl+0x73/0xb0 [ 13.992042] print_report+0xd1/0x650 [ 13.992066] ? __virt_addr_valid+0x1db/0x2d0 [ 13.992089] ? strlen+0x8f/0xb0 [ 13.992105] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.992128] ? strlen+0x8f/0xb0 [ 13.992144] kasan_report+0x141/0x180 [ 13.992165] ? strlen+0x8f/0xb0 [ 13.992187] __asan_report_load1_noabort+0x18/0x20 [ 13.992210] strlen+0x8f/0xb0 [ 13.992238] kasan_strings+0x57b/0xe80 [ 13.992322] ? trace_hardirqs_on+0x37/0xe0 [ 13.992349] ? __pfx_kasan_strings+0x10/0x10 [ 13.992369] ? finish_task_switch.isra.0+0x153/0x700 [ 13.992390] ? __switch_to+0x47/0xf50 [ 13.992416] ? __schedule+0x10cc/0x2b60 [ 13.992437] ? __pfx_read_tsc+0x10/0x10 [ 13.992458] ? ktime_get_ts64+0x86/0x230 [ 13.992481] kunit_try_run_case+0x1a5/0x480 [ 13.992506] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.992527] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.992550] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.992572] ? __kthread_parkme+0x82/0x180 [ 13.992593] ? preempt_count_sub+0x50/0x80 [ 13.992615] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.992638] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.992660] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.992682] kthread+0x337/0x6f0 [ 13.992701] ? trace_preempt_on+0x20/0xc0 [ 13.992722] ? __pfx_kthread+0x10/0x10 [ 13.992741] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.992762] ? calculate_sigpending+0x7b/0xa0 [ 13.992797] ? __pfx_kthread+0x10/0x10 [ 13.992818] ret_from_fork+0x116/0x1d0 [ 13.992835] ? __pfx_kthread+0x10/0x10 [ 13.992856] ret_from_fork_asm+0x1a/0x30 [ 13.992886] </TASK> [ 13.992897] [ 14.001476] Allocated by task 276: [ 14.001654] kasan_save_stack+0x45/0x70 [ 14.001857] kasan_save_track+0x18/0x40 [ 14.002059] kasan_save_alloc_info+0x3b/0x50 [ 14.002271] __kasan_kmalloc+0xb7/0xc0 [ 14.002424] __kmalloc_cache_noprof+0x189/0x420 [ 14.002639] kasan_strings+0xc0/0xe80 [ 14.002825] kunit_try_run_case+0x1a5/0x480 [ 14.002997] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.003228] kthread+0x337/0x6f0 [ 14.003417] ret_from_fork+0x116/0x1d0 [ 14.003589] ret_from_fork_asm+0x1a/0x30 [ 14.003751] [ 14.003847] Freed by task 276: [ 14.004003] kasan_save_stack+0x45/0x70 [ 14.004170] kasan_save_track+0x18/0x40 [ 14.004387] kasan_save_free_info+0x3f/0x60 [ 14.004561] __kasan_slab_free+0x56/0x70 [ 14.004734] kfree+0x222/0x3f0 [ 14.004908] kasan_strings+0x2aa/0xe80 [ 14.005053] kunit_try_run_case+0x1a5/0x480 [ 14.005198] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.005387] kthread+0x337/0x6f0 [ 14.005509] ret_from_fork+0x116/0x1d0 [ 14.005642] ret_from_fork_asm+0x1a/0x30 [ 14.005839] [ 14.006013] The buggy address belongs to the object at ffff888103994900 [ 14.006013] which belongs to the cache kmalloc-32 of size 32 [ 14.006763] The buggy address is located 16 bytes inside of [ 14.006763] freed 32-byte region [ffff888103994900, ffff888103994920) [ 14.007111] [ 14.007185] The buggy address belongs to the physical page: [ 14.008165] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103994 [ 14.008642] flags: 0x200000000000000(node=0|zone=2) [ 14.008911] page_type: f5(slab) [ 14.009081] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.009654] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.009969] page dumped because: kasan: bad access detected [ 14.010181] [ 14.010349] Memory state around the buggy address: [ 14.010522] ffff888103994800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.010829] ffff888103994880: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.011114] >ffff888103994900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.011473] ^ [ 14.011643] ffff888103994980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.011858] ffff888103994a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.012071] ==================================================================