Date
July 9, 2025, 2:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.464899] ================================================================== [ 19.464975] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 19.465180] Read of size 1 at addr fff00000c7753290 by task kunit_try_catch/259 [ 19.465242] [ 19.465546] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc5 #1 PREEMPT [ 19.465728] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 19.466074] Hardware name: linux,dummy-virt (DT) [ 19.466123] Call trace: [ 19.466154] show_stack+0x20/0x38 (C) [ 19.466214] dump_stack_lvl+0x8c/0xd0 [ 19.466585] print_report+0x118/0x608 [ 19.466786] kasan_report+0xdc/0x128 [ 19.466903] __asan_report_load1_noabort+0x20/0x30 [ 19.467255] strcmp+0xc0/0xc8 [ 19.467365] kasan_strings+0x340/0xb00 [ 19.467520] kunit_try_run_case+0x170/0x3f0 [ 19.467719] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.467813] kthread+0x328/0x630 [ 19.468168] ret_from_fork+0x10/0x20 [ 19.468285] [ 19.468373] Allocated by task 259: [ 19.468883] kasan_save_stack+0x3c/0x68 [ 19.468989] kasan_save_track+0x20/0x40 [ 19.469283] kasan_save_alloc_info+0x40/0x58 [ 19.469421] __kasan_kmalloc+0xd4/0xd8 [ 19.469540] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.469609] kasan_strings+0xc8/0xb00 [ 19.469749] kunit_try_run_case+0x170/0x3f0 [ 19.469808] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.469867] kthread+0x328/0x630 [ 19.470167] ret_from_fork+0x10/0x20 [ 19.470512] [ 19.470577] Freed by task 259: [ 19.470705] kasan_save_stack+0x3c/0x68 [ 19.470799] kasan_save_track+0x20/0x40 [ 19.470922] kasan_save_free_info+0x4c/0x78 [ 19.471116] __kasan_slab_free+0x6c/0x98 [ 19.471271] kfree+0x214/0x3c8 [ 19.471381] kasan_strings+0x24c/0xb00 [ 19.471584] kunit_try_run_case+0x170/0x3f0 [ 19.471761] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.471816] kthread+0x328/0x630 [ 19.471876] ret_from_fork+0x10/0x20 [ 19.471925] [ 19.471947] The buggy address belongs to the object at fff00000c7753280 [ 19.471947] which belongs to the cache kmalloc-32 of size 32 [ 19.472050] The buggy address is located 16 bytes inside of [ 19.472050] freed 32-byte region [fff00000c7753280, fff00000c77532a0) [ 19.472142] [ 19.472198] The buggy address belongs to the physical page: [ 19.472235] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107753 [ 19.472313] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.472368] page_type: f5(slab) [ 19.472426] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.472486] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.472544] page dumped because: kasan: bad access detected [ 19.472588] [ 19.472608] Memory state around the buggy address: [ 19.472656] fff00000c7753180: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.472707] fff00000c7753200: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.472770] >fff00000c7753280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.472816] ^ [ 19.472850] fff00000c7753300: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.472923] fff00000c7753380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.472969] ==================================================================
[ 14.648298] ================================================================== [ 14.649237] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 14.649508] Read of size 1 at addr ffff8881029cc7d0 by task kunit_try_catch/276 [ 14.649793] [ 14.649886] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.649933] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.649945] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.649966] Call Trace: [ 14.649977] <TASK> [ 14.649994] dump_stack_lvl+0x73/0xb0 [ 14.650021] print_report+0xd1/0x650 [ 14.650045] ? __virt_addr_valid+0x1db/0x2d0 [ 14.650070] ? strcmp+0xb0/0xc0 [ 14.650087] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.650110] ? strcmp+0xb0/0xc0 [ 14.650127] kasan_report+0x141/0x180 [ 14.650148] ? strcmp+0xb0/0xc0 [ 14.650169] __asan_report_load1_noabort+0x18/0x20 [ 14.650194] strcmp+0xb0/0xc0 [ 14.650212] kasan_strings+0x431/0xe80 [ 14.650232] ? trace_hardirqs_on+0x37/0xe0 [ 14.650257] ? __pfx_kasan_strings+0x10/0x10 [ 14.650277] ? finish_task_switch.isra.0+0x153/0x700 [ 14.650301] ? __switch_to+0x47/0xf50 [ 14.650328] ? __schedule+0x10cc/0x2b60 [ 14.650350] ? __pfx_read_tsc+0x10/0x10 [ 14.650372] ? ktime_get_ts64+0x86/0x230 [ 14.650396] kunit_try_run_case+0x1a5/0x480 [ 14.650420] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.650443] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.650467] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.650491] ? __kthread_parkme+0x82/0x180 [ 14.650513] ? preempt_count_sub+0x50/0x80 [ 14.650536] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.650561] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.650586] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.650674] kthread+0x337/0x6f0 [ 14.650693] ? trace_preempt_on+0x20/0xc0 [ 14.650715] ? __pfx_kthread+0x10/0x10 [ 14.650736] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.650758] ? calculate_sigpending+0x7b/0xa0 [ 14.650793] ? __pfx_kthread+0x10/0x10 [ 14.650858] ret_from_fork+0x116/0x1d0 [ 14.650877] ? __pfx_kthread+0x10/0x10 [ 14.650898] ret_from_fork_asm+0x1a/0x30 [ 14.650928] </TASK> [ 14.650938] [ 14.659179] Allocated by task 276: [ 14.659318] kasan_save_stack+0x45/0x70 [ 14.659468] kasan_save_track+0x18/0x40 [ 14.659693] kasan_save_alloc_info+0x3b/0x50 [ 14.660184] __kasan_kmalloc+0xb7/0xc0 [ 14.660532] __kmalloc_cache_noprof+0x189/0x420 [ 14.660951] kasan_strings+0xc0/0xe80 [ 14.661094] kunit_try_run_case+0x1a5/0x480 [ 14.661244] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.661429] kthread+0x337/0x6f0 [ 14.661645] ret_from_fork+0x116/0x1d0 [ 14.662165] ret_from_fork_asm+0x1a/0x30 [ 14.662636] [ 14.662803] Freed by task 276: [ 14.663232] kasan_save_stack+0x45/0x70 [ 14.663616] kasan_save_track+0x18/0x40 [ 14.664058] kasan_save_free_info+0x3f/0x60 [ 14.664475] __kasan_slab_free+0x56/0x70 [ 14.664907] kfree+0x222/0x3f0 [ 14.665029] kasan_strings+0x2aa/0xe80 [ 14.665163] kunit_try_run_case+0x1a5/0x480 [ 14.665310] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.665488] kthread+0x337/0x6f0 [ 14.665622] ret_from_fork+0x116/0x1d0 [ 14.666292] ret_from_fork_asm+0x1a/0x30 [ 14.666675] [ 14.666846] The buggy address belongs to the object at ffff8881029cc7c0 [ 14.666846] which belongs to the cache kmalloc-32 of size 32 [ 14.667661] The buggy address is located 16 bytes inside of [ 14.667661] freed 32-byte region [ffff8881029cc7c0, ffff8881029cc7e0) [ 14.668780] [ 14.668975] The buggy address belongs to the physical page: [ 14.669470] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029cc [ 14.670037] flags: 0x200000000000000(node=0|zone=2) [ 14.670305] page_type: f5(slab) [ 14.670633] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.670973] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.671623] page dumped because: kasan: bad access detected [ 14.671963] [ 14.672032] Memory state around the buggy address: [ 14.672189] ffff8881029cc680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.672406] ffff8881029cc700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.672666] >ffff8881029cc780: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.673301] ^ [ 14.673838] ffff8881029cc800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.674446] ffff8881029cc880: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.675107] ==================================================================