Date
July 17, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.506431] ================================================================== [ 15.506496] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 15.506652] Read of size 1 at addr fff00000c7891da8 by task kunit_try_catch/189 [ 15.506706] [ 15.506755] CPU: 0 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.507094] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.507220] Hardware name: linux,dummy-virt (DT) [ 15.507255] Call trace: [ 15.507317] show_stack+0x20/0x38 (C) [ 15.507410] dump_stack_lvl+0x8c/0xd0 [ 15.507632] print_report+0x118/0x5d0 [ 15.507713] kasan_report+0xdc/0x128 [ 15.507870] __asan_report_load1_noabort+0x20/0x30 [ 15.507938] kmalloc_uaf2+0x3f4/0x468 [ 15.507998] kunit_try_run_case+0x170/0x3f0 [ 15.508046] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.508099] kthread+0x328/0x630 [ 15.508142] ret_from_fork+0x10/0x20 [ 15.508188] [ 15.508206] Allocated by task 189: [ 15.508234] kasan_save_stack+0x3c/0x68 [ 15.508273] kasan_save_track+0x20/0x40 [ 15.508311] kasan_save_alloc_info+0x40/0x58 [ 15.508351] __kasan_kmalloc+0xd4/0xd8 [ 15.508388] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.508429] kmalloc_uaf2+0xc4/0x468 [ 15.508463] kunit_try_run_case+0x170/0x3f0 [ 15.508500] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.508543] kthread+0x328/0x630 [ 15.508573] ret_from_fork+0x10/0x20 [ 15.508676] [ 15.508700] Freed by task 189: [ 15.508728] kasan_save_stack+0x3c/0x68 [ 15.509189] kasan_save_track+0x20/0x40 [ 15.509249] kasan_save_free_info+0x4c/0x78 [ 15.509463] __kasan_slab_free+0x6c/0x98 [ 15.509541] kfree+0x214/0x3c8 [ 15.509631] kmalloc_uaf2+0x134/0x468 [ 15.509745] kunit_try_run_case+0x170/0x3f0 [ 15.509879] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.510053] kthread+0x328/0x630 [ 15.510109] ret_from_fork+0x10/0x20 [ 15.510366] [ 15.510406] The buggy address belongs to the object at fff00000c7891d80 [ 15.510406] which belongs to the cache kmalloc-64 of size 64 [ 15.510624] The buggy address is located 40 bytes inside of [ 15.510624] freed 64-byte region [fff00000c7891d80, fff00000c7891dc0) [ 15.510739] [ 15.510802] The buggy address belongs to the physical page: [ 15.510960] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107891 [ 15.511148] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.511328] page_type: f5(slab) [ 15.511414] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 15.511519] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 15.511631] page dumped because: kasan: bad access detected [ 15.511727] [ 15.511797] Memory state around the buggy address: [ 15.511832] fff00000c7891c80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.512212] fff00000c7891d00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.512307] >fff00000c7891d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.512463] ^ [ 15.512555] fff00000c7891e00: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 15.512681] fff00000c7891e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.512795] ==================================================================
[ 13.348540] ================================================================== [ 13.348995] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 13.349266] Read of size 1 at addr ffff8881025cf3a8 by task kunit_try_catch/205 [ 13.349652] [ 13.349779] CPU: 1 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.349822] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.350262] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.350282] Call Trace: [ 13.350294] <TASK> [ 13.350309] dump_stack_lvl+0x73/0xb0 [ 13.350338] print_report+0xd1/0x610 [ 13.350361] ? __virt_addr_valid+0x1db/0x2d0 [ 13.350384] ? kmalloc_uaf2+0x4a8/0x520 [ 13.350403] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.350427] ? kmalloc_uaf2+0x4a8/0x520 [ 13.350447] kasan_report+0x141/0x180 [ 13.350468] ? kmalloc_uaf2+0x4a8/0x520 [ 13.350493] __asan_report_load1_noabort+0x18/0x20 [ 13.350527] kmalloc_uaf2+0x4a8/0x520 [ 13.350547] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 13.350585] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 13.350616] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 13.350640] kunit_try_run_case+0x1a5/0x480 [ 13.350666] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.350689] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.350713] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.350737] ? __kthread_parkme+0x82/0x180 [ 13.350758] ? preempt_count_sub+0x50/0x80 [ 13.350783] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.350807] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.350832] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.350857] kthread+0x337/0x6f0 [ 13.350876] ? trace_preempt_on+0x20/0xc0 [ 13.350899] ? __pfx_kthread+0x10/0x10 [ 13.350919] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.350941] ? calculate_sigpending+0x7b/0xa0 [ 13.350967] ? __pfx_kthread+0x10/0x10 [ 13.350988] ret_from_fork+0x116/0x1d0 [ 13.351006] ? __pfx_kthread+0x10/0x10 [ 13.351027] ret_from_fork_asm+0x1a/0x30 [ 13.351058] </TASK> [ 13.351068] [ 13.358534] Allocated by task 205: [ 13.358794] kasan_save_stack+0x45/0x70 [ 13.358988] kasan_save_track+0x18/0x40 [ 13.359196] kasan_save_alloc_info+0x3b/0x50 [ 13.359660] __kasan_kmalloc+0xb7/0xc0 [ 13.359854] __kmalloc_cache_noprof+0x189/0x420 [ 13.360084] kmalloc_uaf2+0xc6/0x520 [ 13.360310] kunit_try_run_case+0x1a5/0x480 [ 13.360536] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.360770] kthread+0x337/0x6f0 [ 13.360892] ret_from_fork+0x116/0x1d0 [ 13.361101] ret_from_fork_asm+0x1a/0x30 [ 13.361296] [ 13.361391] Freed by task 205: [ 13.361681] kasan_save_stack+0x45/0x70 [ 13.361826] kasan_save_track+0x18/0x40 [ 13.361962] kasan_save_free_info+0x3f/0x60 [ 13.362109] __kasan_slab_free+0x56/0x70 [ 13.362294] kfree+0x222/0x3f0 [ 13.362453] kmalloc_uaf2+0x14c/0x520 [ 13.362672] kunit_try_run_case+0x1a5/0x480 [ 13.362879] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.363256] kthread+0x337/0x6f0 [ 13.363441] ret_from_fork+0x116/0x1d0 [ 13.363586] ret_from_fork_asm+0x1a/0x30 [ 13.363725] [ 13.363822] The buggy address belongs to the object at ffff8881025cf380 [ 13.363822] which belongs to the cache kmalloc-64 of size 64 [ 13.364568] The buggy address is located 40 bytes inside of [ 13.364568] freed 64-byte region [ffff8881025cf380, ffff8881025cf3c0) [ 13.365073] [ 13.365183] The buggy address belongs to the physical page: [ 13.365513] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025cf [ 13.365860] flags: 0x200000000000000(node=0|zone=2) [ 13.366093] page_type: f5(slab) [ 13.366232] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 13.366672] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 13.366984] page dumped because: kasan: bad access detected [ 13.367154] [ 13.367223] Memory state around the buggy address: [ 13.367378] ffff8881025cf280: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.367785] ffff8881025cf300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.368111] >ffff8881025cf380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.368520] ^ [ 13.368683] ffff8881025cf400: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 13.368899] ffff8881025cf480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.369183] ==================================================================