Date
June 23, 2025, 1:39 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 28.155075] ================================================================== [ 28.155260] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 28.155375] Read of size 1 at addr fff00000c7043110 by task kunit_try_catch/261 [ 28.155518] [ 28.155589] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc1 #1 PREEMPT [ 28.155782] Tainted: [B]=BAD_PAGE, [N]=TEST [ 28.155969] Hardware name: linux,dummy-virt (DT) [ 28.156049] Call trace: [ 28.156109] show_stack+0x20/0x38 (C) [ 28.156228] dump_stack_lvl+0x8c/0xd0 [ 28.156346] print_report+0x118/0x608 [ 28.156487] kasan_report+0xdc/0x128 [ 28.156604] __asan_report_load1_noabort+0x20/0x30 [ 28.156724] strnlen+0x80/0x88 [ 28.156837] kasan_strings+0x478/0xb00 [ 28.156954] kunit_try_run_case+0x170/0x3f0 [ 28.157071] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 28.157222] kthread+0x328/0x630 [ 28.157338] ret_from_fork+0x10/0x20 [ 28.157483] [ 28.157542] Allocated by task 261: [ 28.157675] kasan_save_stack+0x3c/0x68 [ 28.157862] kasan_save_track+0x20/0x40 [ 28.158009] kasan_save_alloc_info+0x40/0x58 [ 28.158131] __kasan_kmalloc+0xd4/0xd8 [ 28.158240] __kmalloc_cache_noprof+0x16c/0x3c0 [ 28.158401] kasan_strings+0xc8/0xb00 [ 28.158626] kunit_try_run_case+0x170/0x3f0 [ 28.158981] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 28.159141] kthread+0x328/0x630 [ 28.159254] ret_from_fork+0x10/0x20 [ 28.159385] [ 28.159455] Freed by task 261: [ 28.159523] kasan_save_stack+0x3c/0x68 [ 28.159625] kasan_save_track+0x20/0x40 [ 28.159723] kasan_save_free_info+0x4c/0x78 [ 28.159938] __kasan_slab_free+0x6c/0x98 [ 28.160094] kfree+0x214/0x3c8 [ 28.160289] kasan_strings+0x24c/0xb00 [ 28.160426] kunit_try_run_case+0x170/0x3f0 [ 28.160534] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 28.160648] kthread+0x328/0x630 [ 28.160737] ret_from_fork+0x10/0x20 [ 28.160834] [ 28.160889] The buggy address belongs to the object at fff00000c7043100 [ 28.160889] which belongs to the cache kmalloc-32 of size 32 [ 28.161050] The buggy address is located 16 bytes inside of [ 28.161050] freed 32-byte region [fff00000c7043100, fff00000c7043120) [ 28.161223] [ 28.161275] The buggy address belongs to the physical page: [ 28.161402] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107043 [ 28.161534] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 28.161657] page_type: f5(slab) [ 28.161747] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 28.161879] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 28.162006] page dumped because: kasan: bad access detected [ 28.162120] [ 28.162191] Memory state around the buggy address: [ 28.162292] fff00000c7043000: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 28.162581] fff00000c7043080: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 28.162721] >fff00000c7043100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 28.162830] ^ [ 28.162925] fff00000c7043180: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 28.163043] fff00000c7043200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 28.163178] ==================================================================
[ 20.261850] ================================================================== [ 20.262980] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 20.263530] Read of size 1 at addr ffff88810a08ac10 by task kunit_try_catch/280 [ 20.264145] [ 20.264460] CPU: 1 UID: 0 PID: 280 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc1 #1 PREEMPT(voluntary) [ 20.264620] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.264659] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 20.264711] Call Trace: [ 20.264768] <TASK> [ 20.264809] dump_stack_lvl+0x73/0xb0 [ 20.264911] print_report+0xd1/0x650 [ 20.264976] ? __virt_addr_valid+0x1db/0x2d0 [ 20.265012] ? strnlen+0x73/0x80 [ 20.265041] ? kasan_complete_mode_report_info+0x64/0x200 [ 20.265076] ? strnlen+0x73/0x80 [ 20.265123] kasan_report+0x141/0x180 [ 20.265199] ? strnlen+0x73/0x80 [ 20.265329] __asan_report_load1_noabort+0x18/0x20 [ 20.265405] strnlen+0x73/0x80 [ 20.265530] kasan_strings+0x615/0xe80 [ 20.265600] ? trace_hardirqs_on+0x37/0xe0 [ 20.265691] ? __pfx_kasan_strings+0x10/0x10 [ 20.265743] ? finish_task_switch.isra.0+0x153/0x700 [ 20.265790] ? __switch_to+0x5d9/0xf60 [ 20.265821] ? dequeue_task_fair+0x166/0x4e0 [ 20.265857] ? __schedule+0x10cc/0x2b60 [ 20.265892] ? __pfx_read_tsc+0x10/0x10 [ 20.265920] ? ktime_get_ts64+0x86/0x230 [ 20.265956] kunit_try_run_case+0x1a5/0x480 [ 20.265993] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.266028] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 20.266064] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 20.266100] ? __kthread_parkme+0x82/0x180 [ 20.266131] ? preempt_count_sub+0x50/0x80 [ 20.266167] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.266204] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.266281] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 20.266320] kthread+0x337/0x6f0 [ 20.266345] ? trace_preempt_on+0x20/0xc0 [ 20.266378] ? __pfx_kthread+0x10/0x10 [ 20.266405] ? _raw_spin_unlock_irq+0x47/0x80 [ 20.266438] ? calculate_sigpending+0x7b/0xa0 [ 20.266469] ? __pfx_kthread+0x10/0x10 [ 20.266495] ret_from_fork+0x41/0x80 [ 20.266525] ? __pfx_kthread+0x10/0x10 [ 20.266549] ret_from_fork_asm+0x1a/0x30 [ 20.266594] </TASK> [ 20.266628] [ 20.285353] Allocated by task 280: [ 20.285687] kasan_save_stack+0x45/0x70 [ 20.286139] kasan_save_track+0x18/0x40 [ 20.286527] kasan_save_alloc_info+0x3b/0x50 [ 20.286948] __kasan_kmalloc+0xb7/0xc0 [ 20.287394] __kmalloc_cache_noprof+0x189/0x420 [ 20.287858] kasan_strings+0xc0/0xe80 [ 20.288276] kunit_try_run_case+0x1a5/0x480 [ 20.288639] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.289174] kthread+0x337/0x6f0 [ 20.289594] ret_from_fork+0x41/0x80 [ 20.290015] ret_from_fork_asm+0x1a/0x30 [ 20.290498] [ 20.290743] Freed by task 280: [ 20.291036] kasan_save_stack+0x45/0x70 [ 20.291391] kasan_save_track+0x18/0x40 [ 20.291814] kasan_save_free_info+0x3f/0x60 [ 20.292284] __kasan_slab_free+0x56/0x70 [ 20.292721] kfree+0x222/0x3f0 [ 20.293046] kasan_strings+0x2aa/0xe80 [ 20.293434] kunit_try_run_case+0x1a5/0x480 [ 20.293888] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.294335] kthread+0x337/0x6f0 [ 20.294635] ret_from_fork+0x41/0x80 [ 20.295029] ret_from_fork_asm+0x1a/0x30 [ 20.295506] [ 20.295764] The buggy address belongs to the object at ffff88810a08ac00 [ 20.295764] which belongs to the cache kmalloc-32 of size 32 [ 20.298093] The buggy address is located 16 bytes inside of [ 20.298093] freed 32-byte region [ffff88810a08ac00, ffff88810a08ac20) [ 20.299152] [ 20.299830] The buggy address belongs to the physical page: [ 20.300178] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a08a [ 20.301155] flags: 0x200000000000000(node=0|zone=2) [ 20.301924] page_type: f5(slab) [ 20.302536] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 20.303177] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.303809] page dumped because: kasan: bad access detected [ 20.304208] [ 20.304412] Memory state around the buggy address: [ 20.304830] ffff88810a08ab00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.305419] ffff88810a08ab80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.306006] >ffff88810a08ac00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.306667] ^ [ 20.306962] ffff88810a08ac80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.307598] ffff88810a08ad00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.308093] ==================================================================