Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.831288] ================================================================== [ 19.831422] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 19.831685] Read of size 1 at addr fff00000c6191548 by task kunit_try_catch/184 [ 19.831979] [ 19.832066] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.832246] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.832304] Hardware name: linux,dummy-virt (DT) [ 19.832369] Call trace: [ 19.832412] show_stack+0x20/0x38 (C) [ 19.832526] dump_stack_lvl+0x8c/0xd0 [ 19.832668] print_report+0x118/0x608 [ 19.832943] kasan_report+0xdc/0x128 [ 19.833170] __asan_report_load1_noabort+0x20/0x30 [ 19.833357] kmalloc_uaf+0x300/0x338 [ 19.833649] kunit_try_run_case+0x170/0x3f0 [ 19.834347] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.835065] kthread+0x328/0x630 [ 19.835722] ret_from_fork+0x10/0x20 [ 19.836264] [ 19.836644] Allocated by task 184: [ 19.836907] kasan_save_stack+0x3c/0x68 [ 19.837007] kasan_save_track+0x20/0x40 [ 19.838103] kasan_save_alloc_info+0x40/0x58 [ 19.838196] __kasan_kmalloc+0xd4/0xd8 [ 19.838285] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.838377] kmalloc_uaf+0xb8/0x338 [ 19.838653] kunit_try_run_case+0x170/0x3f0 [ 19.838846] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.838990] kthread+0x328/0x630 [ 19.839111] ret_from_fork+0x10/0x20 [ 19.839222] [ 19.839264] Freed by task 184: [ 19.839315] kasan_save_stack+0x3c/0x68 [ 19.839404] kasan_save_track+0x20/0x40 [ 19.839478] kasan_save_free_info+0x4c/0x78 [ 19.839556] __kasan_slab_free+0x6c/0x98 [ 19.839629] kfree+0x214/0x3c8 [ 19.839696] kmalloc_uaf+0x11c/0x338 [ 19.840046] kunit_try_run_case+0x170/0x3f0 [ 19.840139] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.840233] kthread+0x328/0x630 [ 19.840311] ret_from_fork+0x10/0x20 [ 19.840500] [ 19.840668] The buggy address belongs to the object at fff00000c6191540 [ 19.840668] which belongs to the cache kmalloc-16 of size 16 [ 19.840990] The buggy address is located 8 bytes inside of [ 19.840990] freed 16-byte region [fff00000c6191540, fff00000c6191550) [ 19.841185] [ 19.841239] The buggy address belongs to the physical page: [ 19.841358] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106191 [ 19.841487] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.841595] page_type: f5(slab) [ 19.841714] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 19.841821] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.842147] page dumped because: kasan: bad access detected [ 19.842245] [ 19.842347] Memory state around the buggy address: [ 19.842430] fff00000c6191400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.842524] fff00000c6191480: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.842711] >fff00000c6191500: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 19.842795] ^ [ 19.842873] fff00000c6191580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.843134] fff00000c6191600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.843193] ==================================================================
[ 11.783949] ================================================================== [ 11.784730] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 11.785167] Read of size 1 at addr ffff8881019d1b28 by task kunit_try_catch/201 [ 11.785661] [ 11.785764] CPU: 1 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.785810] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.785822] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.785844] Call Trace: [ 11.785856] <TASK> [ 11.785874] dump_stack_lvl+0x73/0xb0 [ 11.785902] print_report+0xd1/0x650 [ 11.785923] ? __virt_addr_valid+0x1db/0x2d0 [ 11.785945] ? kmalloc_uaf+0x320/0x380 [ 11.785964] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.785984] ? kmalloc_uaf+0x320/0x380 [ 11.786002] kasan_report+0x141/0x180 [ 11.786022] ? kmalloc_uaf+0x320/0x380 [ 11.786046] __asan_report_load1_noabort+0x18/0x20 [ 11.786068] kmalloc_uaf+0x320/0x380 [ 11.786086] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.786106] ? __schedule+0x10cc/0x2b60 [ 11.786139] ? __pfx_read_tsc+0x10/0x10 [ 11.786159] ? ktime_get_ts64+0x86/0x230 [ 11.786183] kunit_try_run_case+0x1a5/0x480 [ 11.786206] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.786226] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.786247] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.786268] ? __kthread_parkme+0x82/0x180 [ 11.786287] ? preempt_count_sub+0x50/0x80 [ 11.786355] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.786379] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.786400] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.786433] kthread+0x337/0x6f0 [ 11.786452] ? trace_preempt_on+0x20/0xc0 [ 11.786474] ? __pfx_kthread+0x10/0x10 [ 11.786493] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.786520] ? calculate_sigpending+0x7b/0xa0 [ 11.786543] ? __pfx_kthread+0x10/0x10 [ 11.786563] ret_from_fork+0x116/0x1d0 [ 11.786580] ? __pfx_kthread+0x10/0x10 [ 11.786600] ret_from_fork_asm+0x1a/0x30 [ 11.786629] </TASK> [ 11.786639] [ 11.798928] Allocated by task 201: [ 11.799097] kasan_save_stack+0x45/0x70 [ 11.799598] kasan_save_track+0x18/0x40 [ 11.799936] kasan_save_alloc_info+0x3b/0x50 [ 11.800460] __kasan_kmalloc+0xb7/0xc0 [ 11.800711] __kmalloc_cache_noprof+0x189/0x420 [ 11.801116] kmalloc_uaf+0xaa/0x380 [ 11.801481] kunit_try_run_case+0x1a5/0x480 [ 11.801908] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.802372] kthread+0x337/0x6f0 [ 11.802628] ret_from_fork+0x116/0x1d0 [ 11.803043] ret_from_fork_asm+0x1a/0x30 [ 11.803485] [ 11.803582] Freed by task 201: [ 11.803727] kasan_save_stack+0x45/0x70 [ 11.803910] kasan_save_track+0x18/0x40 [ 11.804088] kasan_save_free_info+0x3f/0x60 [ 11.804579] __kasan_slab_free+0x56/0x70 [ 11.804951] kfree+0x222/0x3f0 [ 11.805449] kmalloc_uaf+0x12c/0x380 [ 11.805634] kunit_try_run_case+0x1a5/0x480 [ 11.805824] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.806050] kthread+0x337/0x6f0 [ 11.806534] ret_from_fork+0x116/0x1d0 [ 11.806998] ret_from_fork_asm+0x1a/0x30 [ 11.807404] [ 11.807504] The buggy address belongs to the object at ffff8881019d1b20 [ 11.807504] which belongs to the cache kmalloc-16 of size 16 [ 11.807992] The buggy address is located 8 bytes inside of [ 11.807992] freed 16-byte region [ffff8881019d1b20, ffff8881019d1b30) [ 11.809141] [ 11.809417] The buggy address belongs to the physical page: [ 11.810227] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1019d1 [ 11.811012] flags: 0x200000000000000(node=0|zone=2) [ 11.811491] page_type: f5(slab) [ 11.811662] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.811977] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.812605] page dumped because: kasan: bad access detected [ 11.813084] [ 11.813469] Memory state around the buggy address: [ 11.813865] ffff8881019d1a00: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc [ 11.814644] ffff8881019d1a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.815470] >ffff8881019d1b00: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 11.815936] ^ [ 11.816456] ffff8881019d1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.817002] ffff8881019d1c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.817807] ==================================================================