Date
May 26, 2025, 9:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.692539] ================================================================== [ 17.692676] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 17.692796] Read of size 1 at addr fff00000c3eeb5a8 by task kunit_try_catch/184 [ 17.692906] [ 17.692981] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT [ 17.693170] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.693223] Hardware name: linux,dummy-virt (DT) [ 17.693292] Call trace: [ 17.693356] show_stack+0x20/0x38 (C) [ 17.693479] dump_stack_lvl+0x8c/0xd0 [ 17.693626] print_report+0x118/0x608 [ 17.693880] kasan_report+0xdc/0x128 [ 17.694468] __asan_report_load1_noabort+0x20/0x30 [ 17.694844] kmalloc_uaf+0x300/0x338 [ 17.694952] kunit_try_run_case+0x170/0x3f0 [ 17.695063] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.695180] kthread+0x328/0x630 [ 17.695270] ret_from_fork+0x10/0x20 [ 17.696138] [ 17.696213] Allocated by task 184: [ 17.696306] kasan_save_stack+0x3c/0x68 [ 17.696480] kasan_save_track+0x20/0x40 [ 17.696608] kasan_save_alloc_info+0x40/0x58 [ 17.696708] __kasan_kmalloc+0xd4/0xd8 [ 17.696788] __kmalloc_cache_noprof+0x15c/0x3c0 [ 17.696891] kmalloc_uaf+0xb8/0x338 [ 17.697006] kunit_try_run_case+0x170/0x3f0 [ 17.697131] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.697266] kthread+0x328/0x630 [ 17.697398] ret_from_fork+0x10/0x20 [ 17.697523] [ 17.697568] Freed by task 184: [ 17.697634] kasan_save_stack+0x3c/0x68 [ 17.697720] kasan_save_track+0x20/0x40 [ 17.697804] kasan_save_free_info+0x4c/0x78 [ 17.697894] __kasan_slab_free+0x6c/0x98 [ 17.697974] kfree+0x214/0x3c8 [ 17.698049] kmalloc_uaf+0x11c/0x338 [ 17.698122] kunit_try_run_case+0x170/0x3f0 [ 17.698216] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.698347] kthread+0x328/0x630 [ 17.698410] ret_from_fork+0x10/0x20 [ 17.698480] [ 17.698519] The buggy address belongs to the object at fff00000c3eeb5a0 [ 17.698519] which belongs to the cache kmalloc-16 of size 16 [ 17.698933] The buggy address is located 8 bytes inside of [ 17.698933] freed 16-byte region [fff00000c3eeb5a0, fff00000c3eeb5b0) [ 17.699068] [ 17.699115] The buggy address belongs to the physical page: [ 17.699380] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103eeb [ 17.699498] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.699626] page_type: f5(slab) [ 17.699718] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 17.699818] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.699908] page dumped because: kasan: bad access detected [ 17.699981] [ 17.700022] Memory state around the buggy address: [ 17.700095] fff00000c3eeb480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.700191] fff00000c3eeb500: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.700283] >fff00000c3eeb580: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 17.700379] ^ [ 17.700474] fff00000c3eeb600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.700572] fff00000c3eeb680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.700928] ==================================================================
[ 11.239748] ================================================================== [ 11.240581] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 11.240890] Read of size 1 at addr ffff888101e622e8 by task kunit_try_catch/202 [ 11.241199] [ 11.241291] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) [ 11.241336] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.241348] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.241368] Call Trace: [ 11.241392] <TASK> [ 11.241407] dump_stack_lvl+0x73/0xb0 [ 11.241433] print_report+0xd1/0x650 [ 11.241456] ? __virt_addr_valid+0x1db/0x2d0 [ 11.241477] ? kmalloc_uaf+0x320/0x380 [ 11.241497] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.241519] ? kmalloc_uaf+0x320/0x380 [ 11.241539] kasan_report+0x141/0x180 [ 11.241561] ? kmalloc_uaf+0x320/0x380 [ 11.241586] __asan_report_load1_noabort+0x18/0x20 [ 11.241606] kmalloc_uaf+0x320/0x380 [ 11.241626] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.241647] ? __schedule+0x10cc/0x2b60 [ 11.241671] ? __pfx_read_tsc+0x10/0x10 [ 11.241691] ? ktime_get_ts64+0x86/0x230 [ 11.241725] kunit_try_run_case+0x1a5/0x480 [ 11.241745] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.241764] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.241788] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.241812] ? __kthread_parkme+0x82/0x180 [ 11.241832] ? preempt_count_sub+0x50/0x80 [ 11.241854] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.241875] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.241898] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.241922] kthread+0x337/0x6f0 [ 11.241940] ? trace_preempt_on+0x20/0xc0 [ 11.241963] ? __pfx_kthread+0x10/0x10 [ 11.241983] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.242005] ? calculate_sigpending+0x7b/0xa0 [ 11.242035] ? __pfx_kthread+0x10/0x10 [ 11.242055] ret_from_fork+0x116/0x1d0 [ 11.242073] ? __pfx_kthread+0x10/0x10 [ 11.242093] ret_from_fork_asm+0x1a/0x30 [ 11.242123] </TASK> [ 11.242133] [ 11.248804] Allocated by task 202: [ 11.248937] kasan_save_stack+0x45/0x70 [ 11.249141] kasan_save_track+0x18/0x40 [ 11.249347] kasan_save_alloc_info+0x3b/0x50 [ 11.249563] __kasan_kmalloc+0xb7/0xc0 [ 11.249790] __kmalloc_cache_noprof+0x189/0x420 [ 11.249965] kmalloc_uaf+0xaa/0x380 [ 11.250097] kunit_try_run_case+0x1a5/0x480 [ 11.250240] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.250424] kthread+0x337/0x6f0 [ 11.250599] ret_from_fork+0x116/0x1d0 [ 11.250890] ret_from_fork_asm+0x1a/0x30 [ 11.251095] [ 11.251196] Freed by task 202: [ 11.251357] kasan_save_stack+0x45/0x70 [ 11.251558] kasan_save_track+0x18/0x40 [ 11.251797] kasan_save_free_info+0x3f/0x60 [ 11.252005] __kasan_slab_free+0x56/0x70 [ 11.252203] kfree+0x222/0x3f0 [ 11.252341] kmalloc_uaf+0x12c/0x380 [ 11.252481] kunit_try_run_case+0x1a5/0x480 [ 11.252627] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.252809] kthread+0x337/0x6f0 [ 11.252938] ret_from_fork+0x116/0x1d0 [ 11.253127] ret_from_fork_asm+0x1a/0x30 [ 11.253501] [ 11.253600] The buggy address belongs to the object at ffff888101e622e0 [ 11.253600] which belongs to the cache kmalloc-16 of size 16 [ 11.254138] The buggy address is located 8 bytes inside of [ 11.254138] freed 16-byte region [ffff888101e622e0, ffff888101e622f0) [ 11.254686] [ 11.254759] The buggy address belongs to the physical page: [ 11.254929] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101e62 [ 11.255193] flags: 0x200000000000000(node=0|zone=2) [ 11.255434] page_type: f5(slab) [ 11.255604] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.256124] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.256392] page dumped because: kasan: bad access detected [ 11.256650] [ 11.256761] Memory state around the buggy address: [ 11.256952] ffff888101e62180: 00 00 fc fc 00 02 fc fc 00 02 fc fc 00 06 fc fc [ 11.257247] ffff888101e62200: 00 06 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.257551] >ffff888101e62280: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.257918] ^ [ 11.258173] ffff888101e62300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.258427] ffff888101e62380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.258681] ==================================================================