Date
July 8, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.510575] ================================================================== [ 19.510639] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 19.510691] Read of size 1 at addr fff00000c58c2b48 by task kunit_try_catch/184 [ 19.510741] [ 19.510954] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 19.511592] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.511901] Hardware name: linux,dummy-virt (DT) [ 19.511992] Call trace: [ 19.512062] show_stack+0x20/0x38 (C) [ 19.512118] dump_stack_lvl+0x8c/0xd0 [ 19.512178] print_report+0x118/0x608 [ 19.512256] kasan_report+0xdc/0x128 [ 19.512301] __asan_report_load1_noabort+0x20/0x30 [ 19.512375] kmalloc_uaf+0x300/0x338 [ 19.512633] kunit_try_run_case+0x170/0x3f0 [ 19.512748] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.512987] kthread+0x328/0x630 [ 19.513030] ret_from_fork+0x10/0x20 [ 19.513125] [ 19.513144] Allocated by task 184: [ 19.513184] kasan_save_stack+0x3c/0x68 [ 19.513226] kasan_save_track+0x20/0x40 [ 19.513265] kasan_save_alloc_info+0x40/0x58 [ 19.513305] __kasan_kmalloc+0xd4/0xd8 [ 19.513342] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.513422] kmalloc_uaf+0xb8/0x338 [ 19.513603] kunit_try_run_case+0x170/0x3f0 [ 19.513640] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.513690] kthread+0x328/0x630 [ 19.513751] ret_from_fork+0x10/0x20 [ 19.514134] [ 19.514170] Freed by task 184: [ 19.514502] kasan_save_stack+0x3c/0x68 [ 19.514579] kasan_save_track+0x20/0x40 [ 19.514777] kasan_save_free_info+0x4c/0x78 [ 19.514817] __kasan_slab_free+0x6c/0x98 [ 19.514856] kfree+0x214/0x3c8 [ 19.514894] kmalloc_uaf+0x11c/0x338 [ 19.515174] kunit_try_run_case+0x170/0x3f0 [ 19.515369] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.515418] kthread+0x328/0x630 [ 19.515450] ret_from_fork+0x10/0x20 [ 19.515593] [ 19.515667] The buggy address belongs to the object at fff00000c58c2b40 [ 19.515667] which belongs to the cache kmalloc-16 of size 16 [ 19.515728] The buggy address is located 8 bytes inside of [ 19.515728] freed 16-byte region [fff00000c58c2b40, fff00000c58c2b50) [ 19.515787] [ 19.515808] The buggy address belongs to the physical page: [ 19.515858] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058c2 [ 19.515949] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.516252] page_type: f5(slab) [ 19.516299] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 19.516393] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.516434] page dumped because: kasan: bad access detected [ 19.516635] [ 19.516655] Memory state around the buggy address: [ 19.516892] fff00000c58c2a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.517028] fff00000c58c2a80: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.517086] >fff00000c58c2b00: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 19.517123] ^ [ 19.517170] fff00000c58c2b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.517213] fff00000c58c2c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.517251] ==================================================================
[ 12.740936] ================================================================== [ 12.741695] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 12.742393] Read of size 1 at addr ffff8881026260a8 by task kunit_try_catch/202 [ 12.743266] [ 12.743573] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.743637] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.743649] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.743672] Call Trace: [ 12.743686] <TASK> [ 12.743706] dump_stack_lvl+0x73/0xb0 [ 12.743741] print_report+0xd1/0x650 [ 12.743765] ? __virt_addr_valid+0x1db/0x2d0 [ 12.743790] ? kmalloc_uaf+0x320/0x380 [ 12.743810] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.743833] ? kmalloc_uaf+0x320/0x380 [ 12.743853] kasan_report+0x141/0x180 [ 12.743874] ? kmalloc_uaf+0x320/0x380 [ 12.743899] __asan_report_load1_noabort+0x18/0x20 [ 12.743923] kmalloc_uaf+0x320/0x380 [ 12.743942] ? __pfx_kmalloc_uaf+0x10/0x10 [ 12.743963] ? __schedule+0x10cc/0x2b60 [ 12.743985] ? __pfx_read_tsc+0x10/0x10 [ 12.744006] ? ktime_get_ts64+0x86/0x230 [ 12.744033] kunit_try_run_case+0x1a5/0x480 [ 12.744058] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.744080] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.744105] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.744128] ? __kthread_parkme+0x82/0x180 [ 12.744150] ? preempt_count_sub+0x50/0x80 [ 12.744175] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.744210] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.744234] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.744270] kthread+0x337/0x6f0 [ 12.744289] ? trace_preempt_on+0x20/0xc0 [ 12.744313] ? __pfx_kthread+0x10/0x10 [ 12.744332] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.744353] ? calculate_sigpending+0x7b/0xa0 [ 12.744377] ? __pfx_kthread+0x10/0x10 [ 12.744398] ret_from_fork+0x116/0x1d0 [ 12.744416] ? __pfx_kthread+0x10/0x10 [ 12.744435] ret_from_fork_asm+0x1a/0x30 [ 12.744468] </TASK> [ 12.744479] [ 12.756790] Allocated by task 202: [ 12.756982] kasan_save_stack+0x45/0x70 [ 12.757380] kasan_save_track+0x18/0x40 [ 12.757793] kasan_save_alloc_info+0x3b/0x50 [ 12.758252] __kasan_kmalloc+0xb7/0xc0 [ 12.758678] __kmalloc_cache_noprof+0x189/0x420 [ 12.759159] kmalloc_uaf+0xaa/0x380 [ 12.759351] kunit_try_run_case+0x1a5/0x480 [ 12.759811] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.760199] kthread+0x337/0x6f0 [ 12.760326] ret_from_fork+0x116/0x1d0 [ 12.760457] ret_from_fork_asm+0x1a/0x30 [ 12.760723] [ 12.760894] Freed by task 202: [ 12.761220] kasan_save_stack+0x45/0x70 [ 12.761840] kasan_save_track+0x18/0x40 [ 12.762283] kasan_save_free_info+0x3f/0x60 [ 12.762789] __kasan_slab_free+0x56/0x70 [ 12.763347] kfree+0x222/0x3f0 [ 12.763551] kmalloc_uaf+0x12c/0x380 [ 12.763849] kunit_try_run_case+0x1a5/0x480 [ 12.764293] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.764737] kthread+0x337/0x6f0 [ 12.764858] ret_from_fork+0x116/0x1d0 [ 12.765149] ret_from_fork_asm+0x1a/0x30 [ 12.765537] [ 12.765736] The buggy address belongs to the object at ffff8881026260a0 [ 12.765736] which belongs to the cache kmalloc-16 of size 16 [ 12.766988] The buggy address is located 8 bytes inside of [ 12.766988] freed 16-byte region [ffff8881026260a0, ffff8881026260b0) [ 12.767514] [ 12.767594] The buggy address belongs to the physical page: [ 12.767778] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102626 [ 12.768275] flags: 0x200000000000000(node=0|zone=2) [ 12.768795] page_type: f5(slab) [ 12.769156] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.769980] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.770775] page dumped because: kasan: bad access detected [ 12.771472] [ 12.771668] Memory state around the buggy address: [ 12.771829] ffff888102625f80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.772378] ffff888102626000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.773156] >ffff888102626080: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 12.773679] ^ [ 12.773834] ffff888102626100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.774097] ffff888102626180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.774801] ==================================================================