Date
June 23, 2025, 1:39 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 24.898122] ================================================================== [ 24.898384] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 24.899030] Read of size 1 at addr fff00000c5e9ddc8 by task kunit_try_catch/186 [ 24.899155] [ 24.899326] CPU: 0 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc1 #1 PREEMPT [ 24.899653] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.899855] Hardware name: linux,dummy-virt (DT) [ 24.899976] Call trace: [ 24.900038] show_stack+0x20/0x38 (C) [ 24.900272] dump_stack_lvl+0x8c/0xd0 [ 24.900410] print_report+0x118/0x608 [ 24.900524] kasan_report+0xdc/0x128 [ 24.900630] __asan_report_load1_noabort+0x20/0x30 [ 24.900766] kmalloc_uaf+0x300/0x338 [ 24.900885] kunit_try_run_case+0x170/0x3f0 [ 24.901021] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.901189] kthread+0x328/0x630 [ 24.901306] ret_from_fork+0x10/0x20 [ 24.901835] [ 24.901916] Allocated by task 186: [ 24.902378] kasan_save_stack+0x3c/0x68 [ 24.902597] kasan_save_track+0x20/0x40 [ 24.902662] kasan_save_alloc_info+0x40/0x58 [ 24.902763] __kasan_kmalloc+0xd4/0xd8 [ 24.902817] __kmalloc_cache_noprof+0x16c/0x3c0 [ 24.902866] kmalloc_uaf+0xb8/0x338 [ 24.902908] kunit_try_run_case+0x170/0x3f0 [ 24.903000] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.903255] kthread+0x328/0x630 [ 24.903418] ret_from_fork+0x10/0x20 [ 24.903509] [ 24.903558] Freed by task 186: [ 24.903621] kasan_save_stack+0x3c/0x68 [ 24.903855] kasan_save_track+0x20/0x40 [ 24.904115] kasan_save_free_info+0x4c/0x78 [ 24.904356] __kasan_slab_free+0x6c/0x98 [ 24.904467] kfree+0x214/0x3c8 [ 24.904559] kmalloc_uaf+0x11c/0x338 [ 24.904820] kunit_try_run_case+0x170/0x3f0 [ 24.905100] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.905221] kthread+0x328/0x630 [ 24.905305] ret_from_fork+0x10/0x20 [ 24.905479] [ 24.905535] The buggy address belongs to the object at fff00000c5e9ddc0 [ 24.905535] which belongs to the cache kmalloc-16 of size 16 [ 24.905678] The buggy address is located 8 bytes inside of [ 24.905678] freed 16-byte region [fff00000c5e9ddc0, fff00000c5e9ddd0) [ 24.905831] [ 24.905879] The buggy address belongs to the physical page: [ 24.905956] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105e9d [ 24.906093] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 24.906224] page_type: f5(slab) [ 24.906331] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 24.906479] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 24.906587] page dumped because: kasan: bad access detected [ 24.906672] [ 24.906723] Memory state around the buggy address: [ 24.906806] fff00000c5e9dc80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 24.906920] fff00000c5e9dd00: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 24.907032] >fff00000c5e9dd80: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 24.907218] ^ [ 24.907317] fff00000c5e9de00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.907675] fff00000c5e9de80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.907779] ==================================================================
[ 17.606020] ================================================================== [ 17.606979] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 17.607744] Read of size 1 at addr ffff8881025ebc48 by task kunit_try_catch/205 [ 17.608371] [ 17.608901] CPU: 0 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc1 #1 PREEMPT(voluntary) [ 17.609029] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.609099] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 17.609162] Call Trace: [ 17.609233] <TASK> [ 17.609282] dump_stack_lvl+0x73/0xb0 [ 17.609360] print_report+0xd1/0x650 [ 17.609430] ? __virt_addr_valid+0x1db/0x2d0 [ 17.609502] ? kmalloc_uaf+0x320/0x380 [ 17.609568] ? kasan_complete_mode_report_info+0x64/0x200 [ 17.609740] ? kmalloc_uaf+0x320/0x380 [ 17.609826] kasan_report+0x141/0x180 [ 17.609899] ? kmalloc_uaf+0x320/0x380 [ 17.609953] __asan_report_load1_noabort+0x18/0x20 [ 17.609985] kmalloc_uaf+0x320/0x380 [ 17.610017] ? __pfx_kmalloc_uaf+0x10/0x10 [ 17.610051] ? __pfx_kmalloc_uaf+0x10/0x10 [ 17.610089] kunit_try_run_case+0x1a5/0x480 [ 17.610129] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.610163] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 17.610200] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 17.610262] ? __kthread_parkme+0x82/0x180 [ 17.610299] ? preempt_count_sub+0x50/0x80 [ 17.610338] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.610373] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.610406] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 17.610440] kthread+0x337/0x6f0 [ 17.610462] ? trace_preempt_on+0x20/0xc0 [ 17.610497] ? __pfx_kthread+0x10/0x10 [ 17.610522] ? _raw_spin_unlock_irq+0x47/0x80 [ 17.610553] ? calculate_sigpending+0x7b/0xa0 [ 17.610585] ? __pfx_kthread+0x10/0x10 [ 17.610665] ret_from_fork+0x41/0x80 [ 17.610705] ? __pfx_kthread+0x10/0x10 [ 17.610731] ret_from_fork_asm+0x1a/0x30 [ 17.610776] </TASK> [ 17.610793] [ 17.627537] Allocated by task 205: [ 17.627966] kasan_save_stack+0x45/0x70 [ 17.628409] kasan_save_track+0x18/0x40 [ 17.629204] kasan_save_alloc_info+0x3b/0x50 [ 17.629880] __kasan_kmalloc+0xb7/0xc0 [ 17.630330] __kmalloc_cache_noprof+0x189/0x420 [ 17.630904] kmalloc_uaf+0xaa/0x380 [ 17.631365] kunit_try_run_case+0x1a5/0x480 [ 17.631977] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.632430] kthread+0x337/0x6f0 [ 17.632953] ret_from_fork+0x41/0x80 [ 17.633412] ret_from_fork_asm+0x1a/0x30 [ 17.634273] [ 17.634513] Freed by task 205: [ 17.634922] kasan_save_stack+0x45/0x70 [ 17.635432] kasan_save_track+0x18/0x40 [ 17.635968] kasan_save_free_info+0x3f/0x60 [ 17.636482] __kasan_slab_free+0x56/0x70 [ 17.636900] kfree+0x222/0x3f0 [ 17.637451] kmalloc_uaf+0x12c/0x380 [ 17.637976] kunit_try_run_case+0x1a5/0x480 [ 17.638512] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.639429] kthread+0x337/0x6f0 [ 17.639902] ret_from_fork+0x41/0x80 [ 17.640473] ret_from_fork_asm+0x1a/0x30 [ 17.641083] [ 17.641330] The buggy address belongs to the object at ffff8881025ebc40 [ 17.641330] which belongs to the cache kmalloc-16 of size 16 [ 17.642455] The buggy address is located 8 bytes inside of [ 17.642455] freed 16-byte region [ffff8881025ebc40, ffff8881025ebc50) [ 17.643564] [ 17.644276] The buggy address belongs to the physical page: [ 17.644788] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025eb [ 17.645736] flags: 0x200000000000000(node=0|zone=2) [ 17.646200] page_type: f5(slab) [ 17.646749] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 17.647414] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.648162] page dumped because: kasan: bad access detected [ 17.648898] [ 17.649164] Memory state around the buggy address: [ 17.649887] ffff8881025ebb00: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc [ 17.650506] ffff8881025ebb80: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc [ 17.651259] >ffff8881025ebc00: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 17.651984] ^ [ 17.652194] ffff8881025ebc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.652766] ffff8881025ebd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.653442] ==================================================================