Date
July 23, 2025, 2:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.734392] ================================================================== [ 17.734658] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 17.734801] Read of size 1 at addr fff00000c3f8c510 by task kunit_try_catch/259 [ 17.734990] [ 17.735089] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT [ 17.735189] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.735219] Hardware name: linux,dummy-virt (DT) [ 17.735280] Call trace: [ 17.735583] show_stack+0x20/0x38 (C) [ 17.735654] dump_stack_lvl+0x8c/0xd0 [ 17.736002] print_report+0x118/0x5d0 [ 17.736188] kasan_report+0xdc/0x128 [ 17.736389] __asan_report_load1_noabort+0x20/0x30 [ 17.736568] strnlen+0x80/0x88 [ 17.736956] kasan_strings+0x478/0xb00 [ 17.737116] kunit_try_run_case+0x170/0x3f0 [ 17.737232] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.737396] kthread+0x328/0x630 [ 17.737634] ret_from_fork+0x10/0x20 [ 17.737943] [ 17.737988] Allocated by task 259: [ 17.738106] kasan_save_stack+0x3c/0x68 [ 17.738224] kasan_save_track+0x20/0x40 [ 17.738445] kasan_save_alloc_info+0x40/0x58 [ 17.738768] __kasan_kmalloc+0xd4/0xd8 [ 17.738932] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.739116] kasan_strings+0xc8/0xb00 [ 17.739163] kunit_try_run_case+0x170/0x3f0 [ 17.739494] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.739780] kthread+0x328/0x630 [ 17.739939] ret_from_fork+0x10/0x20 [ 17.740053] [ 17.740115] Freed by task 259: [ 17.740343] kasan_save_stack+0x3c/0x68 [ 17.740505] kasan_save_track+0x20/0x40 [ 17.740651] kasan_save_free_info+0x4c/0x78 [ 17.740778] __kasan_slab_free+0x6c/0x98 [ 17.740933] kfree+0x214/0x3c8 [ 17.741012] kasan_strings+0x24c/0xb00 [ 17.741280] kunit_try_run_case+0x170/0x3f0 [ 17.741454] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.741597] kthread+0x328/0x630 [ 17.741769] ret_from_fork+0x10/0x20 [ 17.741847] [ 17.741981] The buggy address belongs to the object at fff00000c3f8c500 [ 17.741981] which belongs to the cache kmalloc-32 of size 32 [ 17.742268] The buggy address is located 16 bytes inside of [ 17.742268] freed 32-byte region [fff00000c3f8c500, fff00000c3f8c520) [ 17.742639] [ 17.742957] The buggy address belongs to the physical page: [ 17.743089] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f8c [ 17.743186] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.743373] page_type: f5(slab) [ 17.743421] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.743477] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.743719] page dumped because: kasan: bad access detected [ 17.743762] [ 17.743785] Memory state around the buggy address: [ 17.744017] fff00000c3f8c400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.744074] fff00000c3f8c480: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 17.744172] >fff00000c3f8c500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.744238] ^ [ 17.744283] fff00000c3f8c580: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.744329] fff00000c3f8c600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.744371] ==================================================================
[ 14.556146] ================================================================== [ 14.557320] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.557877] Read of size 1 at addr ffff8881025e0a90 by task kunit_try_catch/276 [ 14.558528] [ 14.558721] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT(voluntary) [ 14.558765] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.558777] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.558798] Call Trace: [ 14.558827] <TASK> [ 14.558842] dump_stack_lvl+0x73/0xb0 [ 14.558871] print_report+0xd1/0x610 [ 14.558893] ? __virt_addr_valid+0x1db/0x2d0 [ 14.558915] ? strnlen+0x73/0x80 [ 14.558932] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.558955] ? strnlen+0x73/0x80 [ 14.558973] kasan_report+0x141/0x180 [ 14.558995] ? strnlen+0x73/0x80 [ 14.559019] __asan_report_load1_noabort+0x18/0x20 [ 14.559044] strnlen+0x73/0x80 [ 14.559065] kasan_strings+0x615/0xe80 [ 14.559086] ? trace_hardirqs_on+0x37/0xe0 [ 14.559112] ? __pfx_kasan_strings+0x10/0x10 [ 14.559134] ? finish_task_switch.isra.0+0x153/0x700 [ 14.559155] ? __switch_to+0x47/0xf50 [ 14.559181] ? __schedule+0x10c6/0x2b60 [ 14.559204] ? __pfx_read_tsc+0x10/0x10 [ 14.559224] ? ktime_get_ts64+0x86/0x230 [ 14.559248] kunit_try_run_case+0x1a5/0x480 [ 14.559273] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.559296] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.559321] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.559346] ? __kthread_parkme+0x82/0x180 [ 14.559366] ? preempt_count_sub+0x50/0x80 [ 14.559388] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.559412] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.559436] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.559460] kthread+0x337/0x6f0 [ 14.559479] ? trace_preempt_on+0x20/0xc0 [ 14.559501] ? __pfx_kthread+0x10/0x10 [ 14.559521] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.559543] ? calculate_sigpending+0x7b/0xa0 [ 14.559566] ? __pfx_kthread+0x10/0x10 [ 14.559587] ret_from_fork+0x116/0x1d0 [ 14.559605] ? __pfx_kthread+0x10/0x10 [ 14.559625] ret_from_fork_asm+0x1a/0x30 [ 14.559655] </TASK> [ 14.559665] [ 14.571297] Allocated by task 276: [ 14.571607] kasan_save_stack+0x45/0x70 [ 14.571962] kasan_save_track+0x18/0x40 [ 14.572339] kasan_save_alloc_info+0x3b/0x50 [ 14.572719] __kasan_kmalloc+0xb7/0xc0 [ 14.573075] __kmalloc_cache_noprof+0x189/0x420 [ 14.573480] kasan_strings+0xc0/0xe80 [ 14.573827] kunit_try_run_case+0x1a5/0x480 [ 14.574270] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.574766] kthread+0x337/0x6f0 [ 14.575077] ret_from_fork+0x116/0x1d0 [ 14.575419] ret_from_fork_asm+0x1a/0x30 [ 14.575780] [ 14.575996] Freed by task 276: [ 14.576304] kasan_save_stack+0x45/0x70 [ 14.576666] kasan_save_track+0x18/0x40 [ 14.576865] kasan_save_free_info+0x3f/0x60 [ 14.577012] __kasan_slab_free+0x56/0x70 [ 14.577228] kfree+0x222/0x3f0 [ 14.577513] kasan_strings+0x2aa/0xe80 [ 14.577852] kunit_try_run_case+0x1a5/0x480 [ 14.578281] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.578764] kthread+0x337/0x6f0 [ 14.579067] ret_from_fork+0x116/0x1d0 [ 14.579413] ret_from_fork_asm+0x1a/0x30 [ 14.579741] [ 14.579822] The buggy address belongs to the object at ffff8881025e0a80 [ 14.579822] which belongs to the cache kmalloc-32 of size 32 [ 14.580357] The buggy address is located 16 bytes inside of [ 14.580357] freed 32-byte region [ffff8881025e0a80, ffff8881025e0aa0) [ 14.581398] [ 14.581588] The buggy address belongs to the physical page: [ 14.582072] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025e0 [ 14.582624] flags: 0x200000000000000(node=0|zone=2) [ 14.582793] page_type: f5(slab) [ 14.582927] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.583286] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.583936] page dumped because: kasan: bad access detected [ 14.584464] [ 14.584622] Memory state around the buggy address: [ 14.585045] ffff8881025e0980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.585654] ffff8881025e0a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.586289] >ffff8881025e0a80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.586896] ^ [ 14.587028] ffff8881025e0b00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.587544] ffff8881025e0b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.588224] ==================================================================