Date
July 20, 2025, 8:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.490657] ================================================================== [ 17.490767] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 17.490820] Read of size 1 at addr fff00000c767da50 by task kunit_try_catch/260 [ 17.491005] [ 17.491163] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 17.491286] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.491315] Hardware name: linux,dummy-virt (DT) [ 17.491349] Call trace: [ 17.491588] show_stack+0x20/0x38 (C) [ 17.491685] dump_stack_lvl+0x8c/0xd0 [ 17.491743] print_report+0x118/0x5d0 [ 17.491992] kasan_report+0xdc/0x128 [ 17.492180] __asan_report_load1_noabort+0x20/0x30 [ 17.492276] strnlen+0x80/0x88 [ 17.492322] kasan_strings+0x478/0xb00 [ 17.492410] kunit_try_run_case+0x170/0x3f0 [ 17.492463] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.492535] kthread+0x328/0x630 [ 17.492589] ret_from_fork+0x10/0x20 [ 17.492867] [ 17.492965] Allocated by task 260: [ 17.493115] kasan_save_stack+0x3c/0x68 [ 17.493163] kasan_save_track+0x20/0x40 [ 17.493558] kasan_save_alloc_info+0x40/0x58 [ 17.493679] __kasan_kmalloc+0xd4/0xd8 [ 17.493760] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.493801] kasan_strings+0xc8/0xb00 [ 17.494062] kunit_try_run_case+0x170/0x3f0 [ 17.494225] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.494595] kthread+0x328/0x630 [ 17.494669] ret_from_fork+0x10/0x20 [ 17.494936] [ 17.495044] Freed by task 260: [ 17.495371] kasan_save_stack+0x3c/0x68 [ 17.495483] kasan_save_track+0x20/0x40 [ 17.495558] kasan_save_free_info+0x4c/0x78 [ 17.495604] __kasan_slab_free+0x6c/0x98 [ 17.495997] kfree+0x214/0x3c8 [ 17.496077] kasan_strings+0x24c/0xb00 [ 17.496118] kunit_try_run_case+0x170/0x3f0 [ 17.496456] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.496590] kthread+0x328/0x630 [ 17.496649] ret_from_fork+0x10/0x20 [ 17.496731] [ 17.497230] The buggy address belongs to the object at fff00000c767da40 [ 17.497230] which belongs to the cache kmalloc-32 of size 32 [ 17.497382] The buggy address is located 16 bytes inside of [ 17.497382] freed 32-byte region [fff00000c767da40, fff00000c767da60) [ 17.497485] [ 17.497559] The buggy address belongs to the physical page: [ 17.497638] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10767d [ 17.497722] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.497872] page_type: f5(slab) [ 17.497935] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.498321] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.498428] page dumped because: kasan: bad access detected [ 17.498508] [ 17.498624] Memory state around the buggy address: [ 17.498711] fff00000c767d900: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.498794] fff00000c767d980: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.499120] >fff00000c767da00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 17.499211] ^ [ 17.499267] fff00000c767da80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.499393] fff00000c767db00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 17.499483] ==================================================================
[ 14.954912] ================================================================== [ 14.955294] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.955566] Read of size 1 at addr ffff8881038b6250 by task kunit_try_catch/277 [ 14.955922] [ 14.956032] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 14.956119] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.956132] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.956153] Call Trace: [ 14.956167] <TASK> [ 14.956182] dump_stack_lvl+0x73/0xb0 [ 14.956211] print_report+0xd1/0x610 [ 14.956236] ? __virt_addr_valid+0x1db/0x2d0 [ 14.956260] ? strnlen+0x73/0x80 [ 14.956279] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.956303] ? strnlen+0x73/0x80 [ 14.956322] kasan_report+0x141/0x180 [ 14.956345] ? strnlen+0x73/0x80 [ 14.956371] __asan_report_load1_noabort+0x18/0x20 [ 14.956396] strnlen+0x73/0x80 [ 14.956416] kasan_strings+0x615/0xe80 [ 14.956437] ? trace_hardirqs_on+0x37/0xe0 [ 14.956461] ? __pfx_kasan_strings+0x10/0x10 [ 14.956496] ? finish_task_switch.isra.0+0x153/0x700 [ 14.956519] ? __switch_to+0x47/0xf50 [ 14.956547] ? __schedule+0x10c6/0x2b60 [ 14.956572] ? __pfx_read_tsc+0x10/0x10 [ 14.956594] ? ktime_get_ts64+0x86/0x230 [ 14.956621] kunit_try_run_case+0x1a5/0x480 [ 14.956647] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.956671] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.956696] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.956720] ? __kthread_parkme+0x82/0x180 [ 14.956742] ? preempt_count_sub+0x50/0x80 [ 14.956767] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.956793] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.956817] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.956842] kthread+0x337/0x6f0 [ 14.956862] ? trace_preempt_on+0x20/0xc0 [ 14.956886] ? __pfx_kthread+0x10/0x10 [ 14.956908] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.956931] ? calculate_sigpending+0x7b/0xa0 [ 14.956957] ? __pfx_kthread+0x10/0x10 [ 14.956979] ret_from_fork+0x116/0x1d0 [ 14.956998] ? __pfx_kthread+0x10/0x10 [ 14.957019] ret_from_fork_asm+0x1a/0x30 [ 14.957107] </TASK> [ 14.957118] [ 14.966113] Allocated by task 277: [ 14.966250] kasan_save_stack+0x45/0x70 [ 14.966402] kasan_save_track+0x18/0x40 [ 14.966555] kasan_save_alloc_info+0x3b/0x50 [ 14.966709] __kasan_kmalloc+0xb7/0xc0 [ 14.966842] __kmalloc_cache_noprof+0x189/0x420 [ 14.967000] kasan_strings+0xc0/0xe80 [ 14.967133] kunit_try_run_case+0x1a5/0x480 [ 14.967283] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.967464] kthread+0x337/0x6f0 [ 14.968025] ret_from_fork+0x116/0x1d0 [ 14.968594] ret_from_fork_asm+0x1a/0x30 [ 14.968981] [ 14.969143] Freed by task 277: [ 14.969420] kasan_save_stack+0x45/0x70 [ 14.969776] kasan_save_track+0x18/0x40 [ 14.970758] kasan_save_free_info+0x3f/0x60 [ 14.971221] __kasan_slab_free+0x56/0x70 [ 14.971622] kfree+0x222/0x3f0 [ 14.972368] kasan_strings+0x2aa/0xe80 [ 14.972732] kunit_try_run_case+0x1a5/0x480 [ 14.973427] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.974141] kthread+0x337/0x6f0 [ 14.974617] ret_from_fork+0x116/0x1d0 [ 14.975203] ret_from_fork_asm+0x1a/0x30 [ 14.975827] [ 14.976155] The buggy address belongs to the object at ffff8881038b6240 [ 14.976155] which belongs to the cache kmalloc-32 of size 32 [ 14.977657] The buggy address is located 16 bytes inside of [ 14.977657] freed 32-byte region [ffff8881038b6240, ffff8881038b6260) [ 14.979245] [ 14.979585] The buggy address belongs to the physical page: [ 14.980330] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038b6 [ 14.981292] flags: 0x200000000000000(node=0|zone=2) [ 14.981964] page_type: f5(slab) [ 14.982612] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.983459] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.984015] page dumped because: kasan: bad access detected [ 14.984769] [ 14.985124] Memory state around the buggy address: [ 14.985415] ffff8881038b6100: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.985660] ffff8881038b6180: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc [ 14.986562] >ffff8881038b6200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.987546] ^ [ 14.988572] ffff8881038b6280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.989260] ffff8881038b6300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.989525] ==================================================================