Date
July 5, 2025, 11:09 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.935991] ================================================================== [ 21.936108] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 21.936323] Read of size 1 at addr fff00000c79e2910 by task kunit_try_catch/260 [ 21.936478] [ 21.936556] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 21.936737] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.936811] Hardware name: linux,dummy-virt (DT) [ 21.936888] Call trace: [ 21.936942] show_stack+0x20/0x38 (C) [ 21.937056] dump_stack_lvl+0x8c/0xd0 [ 21.937162] print_report+0x118/0x608 [ 21.937272] kasan_report+0xdc/0x128 [ 21.937389] __asan_report_load1_noabort+0x20/0x30 [ 21.937518] strcmp+0xc0/0xc8 [ 21.937621] kasan_strings+0x340/0xb00 [ 21.937724] kunit_try_run_case+0x170/0x3f0 [ 21.937836] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.937959] kthread+0x328/0x630 [ 21.939795] ret_from_fork+0x10/0x20 [ 21.939998] [ 21.940110] Allocated by task 260: [ 21.940190] kasan_save_stack+0x3c/0x68 [ 21.940324] kasan_save_track+0x20/0x40 [ 21.940651] kasan_save_alloc_info+0x40/0x58 [ 21.940760] __kasan_kmalloc+0xd4/0xd8 [ 21.940909] __kmalloc_cache_noprof+0x16c/0x3c0 [ 21.942226] kasan_strings+0xc8/0xb00 [ 21.942419] kunit_try_run_case+0x170/0x3f0 [ 21.942540] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.942657] kthread+0x328/0x630 [ 21.942766] ret_from_fork+0x10/0x20 [ 21.943980] kasan_save_free_info+0x4c/0x78 [ 21.947438] page dumped because: kasan: bad access detected [ 21.951471] print_report+0x118/0x608 [ 21.954629] kasan_save_track+0x20/0x40 [ 21.957815] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 21.960614] [ 21.961565] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.963687] kunit_try_run_case+0x170/0x3f0 [ 21.966630] __kasan_kmalloc+0xd4/0xd8 [ 21.973394] fff00000c79e2a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.973491] ==================================================================
[ 15.787413] ================================================================== [ 15.788721] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 15.789139] Read of size 1 at addr ffff8881038e5fd0 by task kunit_try_catch/277 [ 15.789509] [ 15.789642] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 15.789714] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.789730] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.789759] Call Trace: [ 15.789774] <TASK> [ 15.789797] dump_stack_lvl+0x73/0xb0 [ 15.789830] print_report+0xd1/0x650 [ 15.789875] ? __virt_addr_valid+0x1db/0x2d0 [ 15.789917] ? strcmp+0xb0/0xc0 [ 15.789944] ? kasan_complete_mode_report_info+0x64/0x200 [ 15.789972] ? strcmp+0xb0/0xc0 [ 15.790014] kasan_report+0x141/0x180 [ 15.790039] ? strcmp+0xb0/0xc0 [ 15.790070] __asan_report_load1_noabort+0x18/0x20 [ 15.790099] strcmp+0xb0/0xc0 [ 15.790125] kasan_strings+0x431/0xe80 [ 15.790150] ? trace_hardirqs_on+0x37/0xe0 [ 15.790179] ? __pfx_kasan_strings+0x10/0x10 [ 15.790203] ? finish_task_switch.isra.0+0x153/0x700 [ 15.790230] ? __switch_to+0x47/0xf50 [ 15.790272] ? __schedule+0x10cc/0x2b60 [ 15.790301] ? __pfx_read_tsc+0x10/0x10 [ 15.790340] ? ktime_get_ts64+0x86/0x230 [ 15.790371] kunit_try_run_case+0x1a5/0x480 [ 15.790402] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.790434] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.790461] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.790489] ? __kthread_parkme+0x82/0x180 [ 15.790514] ? preempt_count_sub+0x50/0x80 [ 15.790541] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.790569] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.790597] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.790624] kthread+0x337/0x6f0 [ 15.790670] ? trace_preempt_on+0x20/0xc0 [ 15.790697] ? __pfx_kthread+0x10/0x10 [ 15.790734] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.790760] ? calculate_sigpending+0x7b/0xa0 [ 15.790788] ? __pfx_kthread+0x10/0x10 [ 15.790813] ret_from_fork+0x116/0x1d0 [ 15.790836] ? __pfx_kthread+0x10/0x10 [ 15.790860] ret_from_fork_asm+0x1a/0x30 [ 15.790896] </TASK> [ 15.790909] [ 15.804134] Allocated by task 277: [ 15.804398] kasan_save_stack+0x45/0x70 [ 15.804587] kasan_save_track+0x18/0x40 [ 15.804811] kasan_save_alloc_info+0x3b/0x50 [ 15.805297] __kasan_kmalloc+0xb7/0xc0 [ 15.805891] __kmalloc_cache_noprof+0x189/0x420 [ 15.806417] kasan_strings+0xc0/0xe80 [ 15.806929] kunit_try_run_case+0x1a5/0x480 [ 15.807536] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.807873] kthread+0x337/0x6f0 [ 15.808058] ret_from_fork+0x116/0x1d0 [ 15.808529] ret_from_fork_asm+0x1a/0x30 [ 15.809040] [ 15.809287] Freed by task 277: [ 15.809529] kasan_save_stack+0x45/0x70 [ 15.810177] kasan_save_track+0x18/0x40 [ 15.810356] kasan_save_free_info+0x3f/0x60 [ 15.810538] __kasan_slab_free+0x56/0x70 [ 15.810723] kfree+0x222/0x3f0 [ 15.811026] kasan_strings+0x2aa/0xe80 [ 15.811266] kunit_try_run_case+0x1a5/0x480 [ 15.811476] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.811942] kthread+0x337/0x6f0 [ 15.812145] ret_from_fork+0x116/0x1d0 [ 15.812364] ret_from_fork_asm+0x1a/0x30 [ 15.812531] [ 15.812688] The buggy address belongs to the object at ffff8881038e5fc0 [ 15.812688] which belongs to the cache kmalloc-32 of size 32 [ 15.813387] The buggy address is located 16 bytes inside of [ 15.813387] freed 32-byte region [ffff8881038e5fc0, ffff8881038e5fe0) [ 15.814260] [ 15.814417] The buggy address belongs to the physical page: [ 15.814695] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e5 [ 15.815214] flags: 0x200000000000000(node=0|zone=2) [ 15.815462] page_type: f5(slab) [ 15.815702] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 15.816194] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 15.816542] page dumped because: kasan: bad access detected [ 15.816892] [ 15.817011] Memory state around the buggy address: [ 15.817319] ffff8881038e5e80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 15.817734] ffff8881038e5f00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.818350] >ffff8881038e5f80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.818728] ^ [ 15.819150] ffff8881038e6000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.819499] ffff8881038e6080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.820034] ==================================================================