Date
July 10, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.288893] ================================================================== [ 18.288948] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 18.288998] Read of size 1 at addr fff00000c63569d0 by task kunit_try_catch/259 [ 18.289050] [ 18.289097] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 18.289793] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.290222] Hardware name: linux,dummy-virt (DT) [ 18.290258] Call trace: [ 18.290293] show_stack+0x20/0x38 (C) [ 18.290355] dump_stack_lvl+0x8c/0xd0 [ 18.290661] print_report+0x118/0x608 [ 18.290901] kasan_report+0xdc/0x128 [ 18.291094] __asan_report_load1_noabort+0x20/0x30 [ 18.291157] strnlen+0x80/0x88 [ 18.291499] kasan_strings+0x478/0xb00 [ 18.291686] kunit_try_run_case+0x170/0x3f0 [ 18.292023] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.292367] kthread+0x328/0x630 [ 18.292596] ret_from_fork+0x10/0x20 [ 18.293166] [ 18.293228] Allocated by task 259: [ 18.293500] kasan_save_stack+0x3c/0x68 [ 18.293846] kasan_save_track+0x20/0x40 [ 18.293909] kasan_save_alloc_info+0x40/0x58 [ 18.294261] __kasan_kmalloc+0xd4/0xd8 [ 18.294349] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.294464] kasan_strings+0xc8/0xb00 [ 18.294793] kunit_try_run_case+0x170/0x3f0 [ 18.294988] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.295144] kthread+0x328/0x630 [ 18.295307] ret_from_fork+0x10/0x20 [ 18.295532] [ 18.295585] Freed by task 259: [ 18.295800] kasan_save_stack+0x3c/0x68 [ 18.295887] kasan_save_track+0x20/0x40 [ 18.296056] kasan_save_free_info+0x4c/0x78 [ 18.296198] __kasan_slab_free+0x6c/0x98 [ 18.296263] kfree+0x214/0x3c8 [ 18.296332] kasan_strings+0x24c/0xb00 [ 18.296631] kunit_try_run_case+0x170/0x3f0 [ 18.296817] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.296933] kthread+0x328/0x630 [ 18.297321] ret_from_fork+0x10/0x20 [ 18.297402] [ 18.297528] The buggy address belongs to the object at fff00000c63569c0 [ 18.297528] which belongs to the cache kmalloc-32 of size 32 [ 18.297627] The buggy address is located 16 bytes inside of [ 18.297627] freed 32-byte region [fff00000c63569c0, fff00000c63569e0) [ 18.297853] [ 18.297977] The buggy address belongs to the physical page: [ 18.298113] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106356 [ 18.298318] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.298637] page_type: f5(slab) [ 18.298714] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.298781] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.298835] page dumped because: kasan: bad access detected [ 18.298882] [ 18.298911] Memory state around the buggy address: [ 18.298954] fff00000c6356880: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.299010] fff00000c6356900: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 18.299057] >fff00000c6356980: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 18.299283] ^ [ 18.299593] fff00000c6356a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.299856] fff00000c6356a80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 18.300119] ==================================================================
[ 14.669312] ================================================================== [ 14.669974] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.670209] Read of size 1 at addr ffff8881039ba750 by task kunit_try_catch/277 [ 14.670446] [ 14.670680] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.670722] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.670735] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.670753] Call Trace: [ 14.670766] <TASK> [ 14.670780] dump_stack_lvl+0x73/0xb0 [ 14.670808] print_report+0xd1/0x650 [ 14.670831] ? __virt_addr_valid+0x1db/0x2d0 [ 14.670853] ? strnlen+0x73/0x80 [ 14.670870] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.670894] ? strnlen+0x73/0x80 [ 14.670911] kasan_report+0x141/0x180 [ 14.670933] ? strnlen+0x73/0x80 [ 14.670955] __asan_report_load1_noabort+0x18/0x20 [ 14.670980] strnlen+0x73/0x80 [ 14.670999] kasan_strings+0x615/0xe80 [ 14.671021] ? __pfx_kasan_strings+0x10/0x10 [ 14.671042] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 14.671073] ? __pfx_kasan_strings+0x10/0x10 [ 14.671099] kunit_try_run_case+0x1a5/0x480 [ 14.671123] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.671146] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.671170] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.671195] ? __kthread_parkme+0x82/0x180 [ 14.671215] ? preempt_count_sub+0x50/0x80 [ 14.671238] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.671263] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.671288] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.671313] kthread+0x337/0x6f0 [ 14.671332] ? trace_preempt_on+0x20/0xc0 [ 14.671368] ? __pfx_kthread+0x10/0x10 [ 14.671400] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.671432] ? calculate_sigpending+0x7b/0xa0 [ 14.671456] ? __pfx_kthread+0x10/0x10 [ 14.671477] ret_from_fork+0x116/0x1d0 [ 14.671497] ? __pfx_kthread+0x10/0x10 [ 14.671517] ret_from_fork_asm+0x1a/0x30 [ 14.671548] </TASK> [ 14.671559] [ 14.678720] Allocated by task 277: [ 14.678900] kasan_save_stack+0x45/0x70 [ 14.679104] kasan_save_track+0x18/0x40 [ 14.679299] kasan_save_alloc_info+0x3b/0x50 [ 14.679526] __kasan_kmalloc+0xb7/0xc0 [ 14.679714] __kmalloc_cache_noprof+0x189/0x420 [ 14.680010] kasan_strings+0xc0/0xe80 [ 14.680177] kunit_try_run_case+0x1a5/0x480 [ 14.680532] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.680726] kthread+0x337/0x6f0 [ 14.680848] ret_from_fork+0x116/0x1d0 [ 14.681033] ret_from_fork_asm+0x1a/0x30 [ 14.681173] [ 14.681242] Freed by task 277: [ 14.681364] kasan_save_stack+0x45/0x70 [ 14.681501] kasan_save_track+0x18/0x40 [ 14.681636] kasan_save_free_info+0x3f/0x60 [ 14.681813] __kasan_slab_free+0x56/0x70 [ 14.682012] kfree+0x222/0x3f0 [ 14.682176] kasan_strings+0x2aa/0xe80 [ 14.682376] kunit_try_run_case+0x1a5/0x480 [ 14.682580] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.682838] kthread+0x337/0x6f0 [ 14.683008] ret_from_fork+0x116/0x1d0 [ 14.683197] ret_from_fork_asm+0x1a/0x30 [ 14.683574] [ 14.683670] The buggy address belongs to the object at ffff8881039ba740 [ 14.683670] which belongs to the cache kmalloc-32 of size 32 [ 14.684286] The buggy address is located 16 bytes inside of [ 14.684286] freed 32-byte region [ffff8881039ba740, ffff8881039ba760) [ 14.684864] [ 14.684944] The buggy address belongs to the physical page: [ 14.685118] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ba [ 14.685372] flags: 0x200000000000000(node=0|zone=2) [ 14.685583] page_type: f5(slab) [ 14.685749] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.686092] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.686437] page dumped because: kasan: bad access detected [ 14.686724] [ 14.686837] Memory state around the buggy address: [ 14.687062] ffff8881039ba600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.687357] ffff8881039ba680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.687804] >ffff8881039ba700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.688076] ^ [ 14.688315] ffff8881039ba780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.688794] ffff8881039ba800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.689019] ==================================================================