Date
July 4, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.992891] ================================================================== [ 31.993082] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 31.993144] Read of size 1 at addr fff00000c5ad9b50 by task kunit_try_catch/292 [ 31.993354] [ 31.993408] CPU: 1 UID: 0 PID: 292 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250704 #1 PREEMPT [ 31.993584] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.993619] Hardware name: linux,dummy-virt (DT) [ 31.993654] Call trace: [ 31.993680] show_stack+0x20/0x38 (C) [ 31.993776] dump_stack_lvl+0x8c/0xd0 [ 31.993872] print_report+0x118/0x608 [ 31.993945] kasan_report+0xdc/0x128 [ 31.993995] __asan_report_load1_noabort+0x20/0x30 [ 31.994083] strcmp+0xc0/0xc8 [ 31.994127] kasan_strings+0x340/0xb00 [ 31.994176] kunit_try_run_case+0x170/0x3f0 [ 31.994225] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.994281] kthread+0x328/0x630 [ 31.994326] ret_from_fork+0x10/0x20 [ 31.994572] [ 31.994679] Allocated by task 292: [ 31.994747] kasan_save_stack+0x3c/0x68 [ 31.994839] kasan_save_track+0x20/0x40 [ 31.995004] kasan_save_alloc_info+0x40/0x58 [ 31.995204] __kasan_kmalloc+0xd4/0xd8 [ 31.995366] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.995412] kasan_strings+0xc8/0xb00 [ 31.995658] kunit_try_run_case+0x170/0x3f0 [ 31.995739] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.995880] kthread+0x328/0x630 [ 31.996065] ret_from_fork+0x10/0x20 [ 31.996132] [ 31.996331] Freed by task 292: [ 31.996416] kasan_save_stack+0x3c/0x68 [ 31.996459] kasan_save_track+0x20/0x40 [ 31.996699] kasan_save_free_info+0x4c/0x78 [ 31.996747] __kasan_slab_free+0x6c/0x98 [ 31.996846] kfree+0x214/0x3c8 [ 31.996892] kasan_strings+0x24c/0xb00 [ 31.997062] kunit_try_run_case+0x170/0x3f0 [ 31.997116] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.997323] kthread+0x328/0x630 [ 31.997571] ret_from_fork+0x10/0x20 [ 31.998017] [ 31.998046] The buggy address belongs to the object at fff00000c5ad9b40 [ 31.998046] which belongs to the cache kmalloc-32 of size 32 [ 31.998123] The buggy address is located 16 bytes inside of [ 31.998123] freed 32-byte region [fff00000c5ad9b40, fff00000c5ad9b60) [ 31.998208] [ 31.998234] The buggy address belongs to the physical page: [ 31.998266] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ad9 [ 31.998471] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.998657] page_type: f5(slab) [ 31.998706] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.998793] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.998847] page dumped because: kasan: bad access detected [ 31.998974] [ 31.999027] Memory state around the buggy address: [ 31.999063] fff00000c5ad9a00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.999270] fff00000c5ad9a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.999316] >fff00000c5ad9b00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.999394] ^ [ 31.999468] fff00000c5ad9b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.999599] fff00000c5ad9c00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.999873] ==================================================================
[ 27.044556] ================================================================== [ 27.045719] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 27.046043] Read of size 1 at addr ffff888105abca90 by task kunit_try_catch/308 [ 27.046497] [ 27.046639] CPU: 0 UID: 0 PID: 308 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) [ 27.046703] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.046720] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.046748] Call Trace: [ 27.046765] <TASK> [ 27.046789] dump_stack_lvl+0x73/0xb0 [ 27.046822] print_report+0xd1/0x650 [ 27.046857] ? __virt_addr_valid+0x1db/0x2d0 [ 27.046889] ? strcmp+0xb0/0xc0 [ 27.046913] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.046944] ? strcmp+0xb0/0xc0 [ 27.046968] kasan_report+0x141/0x180 [ 27.046995] ? strcmp+0xb0/0xc0 [ 27.047024] __asan_report_load1_noabort+0x18/0x20 [ 27.047052] strcmp+0xb0/0xc0 [ 27.047076] kasan_strings+0x431/0xe80 [ 27.047100] ? trace_hardirqs_on+0x37/0xe0 [ 27.047128] ? __pfx_kasan_strings+0x10/0x10 [ 27.047200] ? finish_task_switch.isra.0+0x153/0x700 [ 27.047232] ? __switch_to+0x47/0xf50 [ 27.047265] ? __schedule+0x10cc/0x2b60 [ 27.047294] ? __pfx_read_tsc+0x10/0x10 [ 27.047321] ? ktime_get_ts64+0x86/0x230 [ 27.047352] kunit_try_run_case+0x1a5/0x480 [ 27.047385] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.047428] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.047457] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.047486] ? __kthread_parkme+0x82/0x180 [ 27.047512] ? preempt_count_sub+0x50/0x80 [ 27.047539] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.047569] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.047597] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.047626] kthread+0x337/0x6f0 [ 27.047650] ? trace_preempt_on+0x20/0xc0 [ 27.047675] ? __pfx_kthread+0x10/0x10 [ 27.047700] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.047726] ? calculate_sigpending+0x7b/0xa0 [ 27.047755] ? __pfx_kthread+0x10/0x10 [ 27.047780] ret_from_fork+0x116/0x1d0 [ 27.047804] ? __pfx_kthread+0x10/0x10 [ 27.047829] ret_from_fork_asm+0x1a/0x30 [ 27.047866] </TASK> [ 27.047881] [ 27.056418] Allocated by task 308: [ 27.056847] kasan_save_stack+0x45/0x70 [ 27.057026] kasan_save_track+0x18/0x40 [ 27.057386] kasan_save_alloc_info+0x3b/0x50 [ 27.057652] __kasan_kmalloc+0xb7/0xc0 [ 27.057882] __kmalloc_cache_noprof+0x189/0x420 [ 27.058137] kasan_strings+0xc0/0xe80 [ 27.058344] kunit_try_run_case+0x1a5/0x480 [ 27.058736] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.059072] kthread+0x337/0x6f0 [ 27.059207] ret_from_fork+0x116/0x1d0 [ 27.059355] ret_from_fork_asm+0x1a/0x30 [ 27.059528] [ 27.059609] Freed by task 308: [ 27.059733] kasan_save_stack+0x45/0x70 [ 27.059881] kasan_save_track+0x18/0x40 [ 27.060029] kasan_save_free_info+0x3f/0x60 [ 27.060189] __kasan_slab_free+0x56/0x70 [ 27.060346] kfree+0x222/0x3f0 [ 27.060531] kasan_strings+0x2aa/0xe80 [ 27.060738] kunit_try_run_case+0x1a5/0x480 [ 27.060968] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.061415] kthread+0x337/0x6f0 [ 27.061617] ret_from_fork+0x116/0x1d0 [ 27.061824] ret_from_fork_asm+0x1a/0x30 [ 27.062094] [ 27.062232] The buggy address belongs to the object at ffff888105abca80 [ 27.062232] which belongs to the cache kmalloc-32 of size 32 [ 27.062783] The buggy address is located 16 bytes inside of [ 27.062783] freed 32-byte region [ffff888105abca80, ffff888105abcaa0) [ 27.063515] [ 27.063624] The buggy address belongs to the physical page: [ 27.063896] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105abc [ 27.064404] flags: 0x200000000000000(node=0|zone=2) [ 27.064606] page_type: f5(slab) [ 27.064746] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.065013] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.065384] page dumped because: kasan: bad access detected [ 27.065659] [ 27.066159] Memory state around the buggy address: [ 27.066458] ffff888105abc980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.066818] ffff888105abca00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 27.067182] >ffff888105abca80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.067575] ^ [ 27.067748] ffff888105abcb00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.068094] ffff888105abcb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.068505] ==================================================================