Date
July 2, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.450393] ================================================================== [ 20.450447] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 20.450494] Read of size 1 at addr fff00000c58a9390 by task kunit_try_catch/259 [ 20.450547] [ 20.450592] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.451030] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.451080] Hardware name: linux,dummy-virt (DT) [ 20.451209] Call trace: [ 20.451237] show_stack+0x20/0x38 (C) [ 20.451291] dump_stack_lvl+0x8c/0xd0 [ 20.451342] print_report+0x118/0x608 [ 20.451971] kasan_report+0xdc/0x128 [ 20.452278] __asan_report_load1_noabort+0x20/0x30 [ 20.452677] strnlen+0x80/0x88 [ 20.452913] kasan_strings+0x478/0xb00 [ 20.453510] kunit_try_run_case+0x170/0x3f0 [ 20.453944] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.454244] kthread+0x328/0x630 [ 20.454348] ret_from_fork+0x10/0x20 [ 20.454529] [ 20.454609] Allocated by task 259: [ 20.454935] kasan_save_stack+0x3c/0x68 [ 20.455323] kasan_save_track+0x20/0x40 [ 20.455479] kasan_save_alloc_info+0x40/0x58 [ 20.455650] __kasan_kmalloc+0xd4/0xd8 [ 20.455762] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.455852] kasan_strings+0xc8/0xb00 [ 20.455916] kunit_try_run_case+0x170/0x3f0 [ 20.456016] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.456266] kthread+0x328/0x630 [ 20.456401] ret_from_fork+0x10/0x20 [ 20.456623] [ 20.456720] Freed by task 259: [ 20.456751] kasan_save_stack+0x3c/0x68 [ 20.456941] kasan_save_track+0x20/0x40 [ 20.457104] kasan_save_free_info+0x4c/0x78 [ 20.457266] __kasan_slab_free+0x6c/0x98 [ 20.457314] kfree+0x214/0x3c8 [ 20.457352] kasan_strings+0x24c/0xb00 [ 20.457390] kunit_try_run_case+0x170/0x3f0 [ 20.457572] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.457973] kthread+0x328/0x630 [ 20.458097] ret_from_fork+0x10/0x20 [ 20.458263] [ 20.458450] The buggy address belongs to the object at fff00000c58a9380 [ 20.458450] which belongs to the cache kmalloc-32 of size 32 [ 20.458776] The buggy address is located 16 bytes inside of [ 20.458776] freed 32-byte region [fff00000c58a9380, fff00000c58a93a0) [ 20.459177] [ 20.459268] The buggy address belongs to the physical page: [ 20.459451] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058a9 [ 20.459564] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.459736] page_type: f5(slab) [ 20.459906] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.460166] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.460283] page dumped because: kasan: bad access detected [ 20.460322] [ 20.460343] Memory state around the buggy address: [ 20.460651] fff00000c58a9280: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.460877] fff00000c58a9300: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.460958] >fff00000c58a9380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.461186] ^ [ 20.461451] fff00000c58a9400: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.461547] fff00000c58a9480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.461614] ==================================================================
[ 13.440813] ================================================================== [ 13.441395] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 13.441984] Read of size 1 at addr ffff888103988590 by task kunit_try_catch/278 [ 13.442640] [ 13.442862] CPU: 1 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.442908] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.442920] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.442941] Call Trace: [ 13.442957] <TASK> [ 13.442975] dump_stack_lvl+0x73/0xb0 [ 13.443002] print_report+0xd1/0x650 [ 13.443026] ? __virt_addr_valid+0x1db/0x2d0 [ 13.443068] ? strnlen+0x73/0x80 [ 13.443086] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.443107] ? strnlen+0x73/0x80 [ 13.443124] kasan_report+0x141/0x180 [ 13.443145] ? strnlen+0x73/0x80 [ 13.443166] __asan_report_load1_noabort+0x18/0x20 [ 13.443190] strnlen+0x73/0x80 [ 13.443207] kasan_strings+0x615/0xe80 [ 13.443227] ? trace_hardirqs_on+0x37/0xe0 [ 13.443249] ? __pfx_kasan_strings+0x10/0x10 [ 13.443268] ? finish_task_switch.isra.0+0x153/0x700 [ 13.443289] ? __switch_to+0x47/0xf50 [ 13.443314] ? __schedule+0x10cc/0x2b60 [ 13.443335] ? __pfx_read_tsc+0x10/0x10 [ 13.443367] ? ktime_get_ts64+0x86/0x230 [ 13.443390] kunit_try_run_case+0x1a5/0x480 [ 13.443413] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.443434] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.443458] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.443479] ? __kthread_parkme+0x82/0x180 [ 13.443500] ? preempt_count_sub+0x50/0x80 [ 13.443521] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.443545] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.443567] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.443590] kthread+0x337/0x6f0 [ 13.443610] ? trace_preempt_on+0x20/0xc0 [ 13.443633] ? __pfx_kthread+0x10/0x10 [ 13.443653] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.443677] ? calculate_sigpending+0x7b/0xa0 [ 13.443701] ? __pfx_kthread+0x10/0x10 [ 13.443721] ret_from_fork+0x116/0x1d0 [ 13.443759] ? __pfx_kthread+0x10/0x10 [ 13.443781] ret_from_fork_asm+0x1a/0x30 [ 13.443810] </TASK> [ 13.443820] [ 13.452724] Allocated by task 278: [ 13.452933] kasan_save_stack+0x45/0x70 [ 13.453154] kasan_save_track+0x18/0x40 [ 13.453328] kasan_save_alloc_info+0x3b/0x50 [ 13.453488] __kasan_kmalloc+0xb7/0xc0 [ 13.453656] __kmalloc_cache_noprof+0x189/0x420 [ 13.454056] kasan_strings+0xc0/0xe80 [ 13.454244] kunit_try_run_case+0x1a5/0x480 [ 13.454458] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.454675] kthread+0x337/0x6f0 [ 13.454954] ret_from_fork+0x116/0x1d0 [ 13.455148] ret_from_fork_asm+0x1a/0x30 [ 13.455351] [ 13.455458] Freed by task 278: [ 13.455621] kasan_save_stack+0x45/0x70 [ 13.455851] kasan_save_track+0x18/0x40 [ 13.456062] kasan_save_free_info+0x3f/0x60 [ 13.456267] __kasan_slab_free+0x56/0x70 [ 13.456419] kfree+0x222/0x3f0 [ 13.456544] kasan_strings+0x2aa/0xe80 [ 13.456749] kunit_try_run_case+0x1a5/0x480 [ 13.456955] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.457221] kthread+0x337/0x6f0 [ 13.457408] ret_from_fork+0x116/0x1d0 [ 13.457543] ret_from_fork_asm+0x1a/0x30 [ 13.457756] [ 13.457905] The buggy address belongs to the object at ffff888103988580 [ 13.457905] which belongs to the cache kmalloc-32 of size 32 [ 13.458474] The buggy address is located 16 bytes inside of [ 13.458474] freed 32-byte region [ffff888103988580, ffff8881039885a0) [ 13.458989] [ 13.459063] The buggy address belongs to the physical page: [ 13.459236] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103988 [ 13.459603] flags: 0x200000000000000(node=0|zone=2) [ 13.459984] page_type: f5(slab) [ 13.460167] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.460426] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.460654] page dumped because: kasan: bad access detected [ 13.460879] [ 13.460971] Memory state around the buggy address: [ 13.461237] ffff888103988480: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.461564] ffff888103988500: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 13.461903] >ffff888103988580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.462118] ^ [ 13.462246] ffff888103988600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.462484] ffff888103988680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.462829] ==================================================================