Date
July 16, 2025, 3:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.835826] ================================================================== [ 18.835883] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 18.836091] Read of size 1 at addr fff00000c595c710 by task kunit_try_catch/259 [ 18.836172] [ 18.836525] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 18.836897] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.836951] Hardware name: linux,dummy-virt (DT) [ 18.837132] Call trace: [ 18.837247] show_stack+0x20/0x38 (C) [ 18.837308] dump_stack_lvl+0x8c/0xd0 [ 18.837360] print_report+0x118/0x5d0 [ 18.837614] kasan_report+0xdc/0x128 [ 18.838449] __asan_report_load1_noabort+0x20/0x30 [ 18.838534] strlen+0xa8/0xb0 [ 18.838603] kasan_strings+0x418/0xb00 [ 18.838654] kunit_try_run_case+0x170/0x3f0 [ 18.838747] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.838872] kthread+0x328/0x630 [ 18.838937] ret_from_fork+0x10/0x20 [ 18.839065] [ 18.839087] Allocated by task 259: [ 18.839116] kasan_save_stack+0x3c/0x68 [ 18.839188] kasan_save_track+0x20/0x40 [ 18.839411] kasan_save_alloc_info+0x40/0x58 [ 18.839640] __kasan_kmalloc+0xd4/0xd8 [ 18.839847] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.840030] kasan_strings+0xc8/0xb00 [ 18.840067] kunit_try_run_case+0x170/0x3f0 [ 18.840108] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.840154] kthread+0x328/0x630 [ 18.840187] ret_from_fork+0x10/0x20 [ 18.840227] [ 18.840317] Freed by task 259: [ 18.840356] kasan_save_stack+0x3c/0x68 [ 18.840397] kasan_save_track+0x20/0x40 [ 18.840437] kasan_save_free_info+0x4c/0x78 [ 18.840486] __kasan_slab_free+0x6c/0x98 [ 18.840527] kfree+0x214/0x3c8 [ 18.840571] kasan_strings+0x24c/0xb00 [ 18.840610] kunit_try_run_case+0x170/0x3f0 [ 18.840648] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.840700] kthread+0x328/0x630 [ 18.840747] ret_from_fork+0x10/0x20 [ 18.840784] [ 18.840814] The buggy address belongs to the object at fff00000c595c700 [ 18.840814] which belongs to the cache kmalloc-32 of size 32 [ 18.840879] The buggy address is located 16 bytes inside of [ 18.840879] freed 32-byte region [fff00000c595c700, fff00000c595c720) [ 18.840948] [ 18.840989] The buggy address belongs to the physical page: [ 18.841038] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10595c [ 18.841096] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.841149] page_type: f5(slab) [ 18.841197] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.841266] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.841309] page dumped because: kasan: bad access detected [ 18.841344] [ 18.841371] Memory state around the buggy address: [ 18.841404] fff00000c595c600: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.841467] fff00000c595c680: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 18.841514] >fff00000c595c700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.841556] ^ [ 18.841587] fff00000c595c780: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.841633] fff00000c595c800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.841682] ==================================================================
[ 14.576587] ================================================================== [ 14.577180] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 14.577467] Read of size 1 at addr ffff888103a5c550 by task kunit_try_catch/276 [ 14.577952] [ 14.578127] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 14.578173] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.578185] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.578206] Call Trace: [ 14.578221] <TASK> [ 14.578237] dump_stack_lvl+0x73/0xb0 [ 14.578266] print_report+0xd1/0x610 [ 14.578290] ? __virt_addr_valid+0x1db/0x2d0 [ 14.578313] ? strlen+0x8f/0xb0 [ 14.578332] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.578357] ? strlen+0x8f/0xb0 [ 14.578376] kasan_report+0x141/0x180 [ 14.578399] ? strlen+0x8f/0xb0 [ 14.578423] __asan_report_load1_noabort+0x18/0x20 [ 14.578460] strlen+0x8f/0xb0 [ 14.578478] kasan_strings+0x57b/0xe80 [ 14.578499] ? trace_hardirqs_on+0x37/0xe0 [ 14.578524] ? __pfx_kasan_strings+0x10/0x10 [ 14.578549] ? finish_task_switch.isra.0+0x153/0x700 [ 14.578574] ? __switch_to+0x47/0xf50 [ 14.578600] ? __schedule+0x10cc/0x2b60 [ 14.578624] ? __pfx_read_tsc+0x10/0x10 [ 14.578647] ? ktime_get_ts64+0x86/0x230 [ 14.578672] kunit_try_run_case+0x1a5/0x480 [ 14.578697] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.578722] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.578747] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.578785] ? __kthread_parkme+0x82/0x180 [ 14.578807] ? preempt_count_sub+0x50/0x80 [ 14.578833] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.578859] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.578884] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.578911] kthread+0x337/0x6f0 [ 14.578930] ? trace_preempt_on+0x20/0xc0 [ 14.578952] ? __pfx_kthread+0x10/0x10 [ 14.578974] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.578997] ? calculate_sigpending+0x7b/0xa0 [ 14.579023] ? __pfx_kthread+0x10/0x10 [ 14.579044] ret_from_fork+0x116/0x1d0 [ 14.579064] ? __pfx_kthread+0x10/0x10 [ 14.579086] ret_from_fork_asm+0x1a/0x30 [ 14.579118] </TASK> [ 14.579127] [ 14.587306] Allocated by task 276: [ 14.587448] kasan_save_stack+0x45/0x70 [ 14.587662] kasan_save_track+0x18/0x40 [ 14.587904] kasan_save_alloc_info+0x3b/0x50 [ 14.588181] __kasan_kmalloc+0xb7/0xc0 [ 14.588368] __kmalloc_cache_noprof+0x189/0x420 [ 14.588869] kasan_strings+0xc0/0xe80 [ 14.589233] kunit_try_run_case+0x1a5/0x480 [ 14.589444] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.589674] kthread+0x337/0x6f0 [ 14.589826] ret_from_fork+0x116/0x1d0 [ 14.589963] ret_from_fork_asm+0x1a/0x30 [ 14.590165] [ 14.590261] Freed by task 276: [ 14.590419] kasan_save_stack+0x45/0x70 [ 14.590694] kasan_save_track+0x18/0x40 [ 14.590870] kasan_save_free_info+0x3f/0x60 [ 14.591047] __kasan_slab_free+0x56/0x70 [ 14.591307] kfree+0x222/0x3f0 [ 14.591476] kasan_strings+0x2aa/0xe80 [ 14.591645] kunit_try_run_case+0x1a5/0x480 [ 14.591811] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.591991] kthread+0x337/0x6f0 [ 14.592113] ret_from_fork+0x116/0x1d0 [ 14.592283] ret_from_fork_asm+0x1a/0x30 [ 14.592485] [ 14.592582] The buggy address belongs to the object at ffff888103a5c540 [ 14.592582] which belongs to the cache kmalloc-32 of size 32 [ 14.593277] The buggy address is located 16 bytes inside of [ 14.593277] freed 32-byte region [ffff888103a5c540, ffff888103a5c560) [ 14.593776] [ 14.593871] The buggy address belongs to the physical page: [ 14.594074] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a5c [ 14.594315] flags: 0x200000000000000(node=0|zone=2) [ 14.594688] page_type: f5(slab) [ 14.594872] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.595219] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.595491] page dumped because: kasan: bad access detected [ 14.595748] [ 14.595828] Memory state around the buggy address: [ 14.595985] ffff888103a5c400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.596308] ffff888103a5c480: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.596662] >ffff888103a5c500: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.596968] ^ [ 14.597159] ffff888103a5c580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.597376] ffff888103a5c600: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.597600] ==================================================================