Date
June 2, 2025, 2:13 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.824741] ================================================================== [ 20.825800] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 20.826346] Read of size 1 at addr fff00000c3f46150 by task kunit_try_catch/249 [ 20.826805] [ 20.827027] CPU: 1 UID: 0 PID: 249 Comm: kunit_try_catch Tainted: G B N 6.14.10-rc1 #1 [ 20.827131] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.827179] Hardware name: linux,dummy-virt (DT) [ 20.827223] Call trace: [ 20.827253] show_stack+0x20/0x38 (C) [ 20.827319] dump_stack_lvl+0x8c/0xd0 [ 20.827378] print_report+0x118/0x608 [ 20.827438] kasan_report+0xdc/0x128 [ 20.827494] __asan_report_load1_noabort+0x20/0x30 [ 20.827553] strcmp+0xc0/0xc8 [ 20.827602] kasan_strings+0x228/0x8d8 [ 20.827655] kunit_try_run_case+0x170/0x3f0 [ 20.827709] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.827770] kthread+0x318/0x620 [ 20.827824] ret_from_fork+0x10/0x20 [ 20.827883] [ 20.831831] Allocated by task 249: [ 20.832163] kasan_save_stack+0x3c/0x68 [ 20.832511] kasan_save_track+0x20/0x40 [ 20.832752] kasan_save_alloc_info+0x40/0x58 [ 20.833024] __kasan_kmalloc+0xd4/0xd8 [ 20.833680] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.834039] kasan_strings+0xb0/0x8d8 [ 20.834639] kunit_try_run_case+0x170/0x3f0 [ 20.835013] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.835470] kthread+0x318/0x620 [ 20.835776] ret_from_fork+0x10/0x20 [ 20.836099] [ 20.836245] Freed by task 249: [ 20.836431] kasan_save_stack+0x3c/0x68 [ 20.836737] kasan_save_track+0x20/0x40 [ 20.836965] kasan_save_free_info+0x4c/0x78 [ 20.837282] __kasan_slab_free+0x6c/0x98 [ 20.837596] kfree+0x214/0x3c8 [ 20.837851] kasan_strings+0x124/0x8d8 [ 20.838116] kunit_try_run_case+0x170/0x3f0 [ 20.838697] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.839012] kthread+0x318/0x620 [ 20.839230] ret_from_fork+0x10/0x20 [ 20.839448] [ 20.839593] The buggy address belongs to the object at fff00000c3f46140 [ 20.839593] which belongs to the cache kmalloc-32 of size 32 [ 20.840051] The buggy address is located 16 bytes inside of [ 20.840051] freed 32-byte region [fff00000c3f46140, fff00000c3f46160) [ 20.840482] [ 20.840618] The buggy address belongs to the physical page: [ 20.840852] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f46 [ 20.841763] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.842599] page_type: f5(slab) [ 20.842866] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.843120] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.843379] page dumped because: kasan: bad access detected [ 20.843572] [ 20.843678] Memory state around the buggy address: [ 20.843862] fff00000c3f46000: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.844098] fff00000c3f46080: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.844351] >fff00000c3f46100: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.844605] ^ [ 20.845046] fff00000c3f46180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.845471] fff00000c3f46200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.845958] ==================================================================
[ 14.588653] ================================================================== [ 14.591041] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 14.591764] Read of size 1 at addr ffff888101bf5750 by task kunit_try_catch/267 [ 14.592467] [ 14.592713] CPU: 1 UID: 0 PID: 267 Comm: kunit_try_catch Tainted: G B N 6.14.10-rc1 #1 [ 14.592756] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.592769] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.592789] Call Trace: [ 14.592803] <TASK> [ 14.592819] dump_stack_lvl+0x73/0xb0 [ 14.592844] print_report+0xd1/0x650 [ 14.592866] ? __virt_addr_valid+0x1db/0x2d0 [ 14.592887] ? strcmp+0xb0/0xc0 [ 14.592905] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.592929] ? strcmp+0xb0/0xc0 [ 14.592947] kasan_report+0x140/0x180 [ 14.592968] ? strcmp+0xb0/0xc0 [ 14.593010] __asan_report_load1_noabort+0x18/0x20 [ 14.593044] strcmp+0xb0/0xc0 [ 14.593063] kasan_strings+0x2d3/0xb60 [ 14.593084] ? __pfx_kasan_strings+0x10/0x10 [ 14.593103] ? __schedule+0xce8/0x2840 [ 14.593126] ? __pfx_read_tsc+0x10/0x10 [ 14.593146] ? ktime_get_ts64+0x86/0x230 [ 14.593172] kunit_try_run_case+0x1a6/0x480 [ 14.593194] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.593214] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 14.593237] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.593260] ? __kthread_parkme+0x82/0x160 [ 14.593281] ? preempt_count_sub+0x50/0x80 [ 14.593306] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.593328] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.593353] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.593379] kthread+0x324/0x6e0 [ 14.593399] ? trace_preempt_on+0x20/0xc0 [ 14.593422] ? __pfx_kthread+0x10/0x10 [ 14.593443] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.593464] ? calculate_sigpending+0x7b/0xa0 [ 14.593485] ? __pfx_kthread+0x10/0x10 [ 14.593508] ret_from_fork+0x41/0x80 [ 14.593525] ? __pfx_kthread+0x10/0x10 [ 14.593547] ret_from_fork_asm+0x1a/0x30 [ 14.593578] </TASK> [ 14.593588] [ 14.606318] Allocated by task 267: [ 14.606459] kasan_save_stack+0x45/0x70 [ 14.606698] kasan_save_track+0x18/0x40 [ 14.607155] kasan_save_alloc_info+0x3b/0x50 [ 14.607578] __kasan_kmalloc+0xb7/0xc0 [ 14.608031] __kmalloc_cache_noprof+0x18a/0x420 [ 14.608533] kasan_strings+0xb9/0xb60 [ 14.608942] kunit_try_run_case+0x1a6/0x480 [ 14.609393] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.609952] kthread+0x324/0x6e0 [ 14.610265] ret_from_fork+0x41/0x80 [ 14.610673] ret_from_fork_asm+0x1a/0x30 [ 14.611127] [ 14.611344] Freed by task 267: [ 14.611552] kasan_save_stack+0x45/0x70 [ 14.611870] kasan_save_track+0x18/0x40 [ 14.612307] kasan_save_free_info+0x3f/0x60 [ 14.612783] __kasan_slab_free+0x56/0x70 [ 14.613090] kfree+0x224/0x3f0 [ 14.613388] kasan_strings+0x13c/0xb60 [ 14.613670] kunit_try_run_case+0x1a6/0x480 [ 14.613964] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.614184] kthread+0x324/0x6e0 [ 14.614306] ret_from_fork+0x41/0x80 [ 14.614429] ret_from_fork_asm+0x1a/0x30 [ 14.614563] [ 14.614681] The buggy address belongs to the object at ffff888101bf5740 [ 14.614681] which belongs to the cache kmalloc-32 of size 32 [ 14.615893] The buggy address is located 16 bytes inside of [ 14.615893] freed 32-byte region [ffff888101bf5740, ffff888101bf5760) [ 14.617112] [ 14.617276] The buggy address belongs to the physical page: [ 14.617823] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101bf5 [ 14.618549] flags: 0x200000000000000(node=0|zone=2) [ 14.619074] page_type: f5(slab) [ 14.619420] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.620229] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.620982] page dumped because: kasan: bad access detected [ 14.621476] [ 14.621636] Memory state around the buggy address: [ 14.622077] ffff888101bf5600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.622381] ffff888101bf5680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.623085] >ffff888101bf5700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.623736] ^ [ 14.623988] ffff888101bf5780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.624786] ffff888101bf5800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.625470] ==================================================================