Date
July 18, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.525086] ================================================================== [ 15.525148] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x170/0x310 [ 15.525205] Write of size 33 at addr fff00000c3f54700 by task kunit_try_catch/186 [ 15.525259] [ 15.525879] CPU: 1 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.526002] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.526352] Hardware name: linux,dummy-virt (DT) [ 15.526461] Call trace: [ 15.526568] show_stack+0x20/0x38 (C) [ 15.526678] dump_stack_lvl+0x8c/0xd0 [ 15.526854] print_report+0x118/0x5d0 [ 15.526988] kasan_report+0xdc/0x128 [ 15.527051] kasan_check_range+0x100/0x1a8 [ 15.527135] __asan_memset+0x34/0x78 [ 15.527397] kmalloc_uaf_memset+0x170/0x310 [ 15.527603] kunit_try_run_case+0x170/0x3f0 [ 15.527713] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.527898] kthread+0x328/0x630 [ 15.527969] ret_from_fork+0x10/0x20 [ 15.528049] [ 15.528221] Allocated by task 186: [ 15.528498] kasan_save_stack+0x3c/0x68 [ 15.528604] kasan_save_track+0x20/0x40 [ 15.528698] kasan_save_alloc_info+0x40/0x58 [ 15.528762] __kasan_kmalloc+0xd4/0xd8 [ 15.528802] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.528843] kmalloc_uaf_memset+0xb8/0x310 [ 15.528880] kunit_try_run_case+0x170/0x3f0 [ 15.528938] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.528994] kthread+0x328/0x630 [ 15.529035] ret_from_fork+0x10/0x20 [ 15.529072] [ 15.529091] Freed by task 186: [ 15.529119] kasan_save_stack+0x3c/0x68 [ 15.529159] kasan_save_track+0x20/0x40 [ 15.529197] kasan_save_free_info+0x4c/0x78 [ 15.529236] __kasan_slab_free+0x6c/0x98 [ 15.529274] kfree+0x214/0x3c8 [ 15.529307] kmalloc_uaf_memset+0x11c/0x310 [ 15.529585] kunit_try_run_case+0x170/0x3f0 [ 15.529820] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.529872] kthread+0x328/0x630 [ 15.530099] ret_from_fork+0x10/0x20 [ 15.530288] [ 15.530428] The buggy address belongs to the object at fff00000c3f54700 [ 15.530428] which belongs to the cache kmalloc-64 of size 64 [ 15.530525] The buggy address is located 0 bytes inside of [ 15.530525] freed 64-byte region [fff00000c3f54700, fff00000c3f54740) [ 15.530711] [ 15.530751] The buggy address belongs to the physical page: [ 15.530788] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f54 [ 15.530925] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.531012] page_type: f5(slab) [ 15.531248] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 15.531561] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 15.531664] page dumped because: kasan: bad access detected [ 15.531832] [ 15.531911] Memory state around the buggy address: [ 15.531971] fff00000c3f54600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.532282] fff00000c3f54680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.532504] >fff00000c3f54700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.532630] ^ [ 15.532669] fff00000c3f54780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.532781] fff00000c3f54800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.532882] ==================================================================
[ 12.457171] ================================================================== [ 12.457788] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x1a3/0x360 [ 12.458097] Write of size 33 at addr ffff8881029d4700 by task kunit_try_catch/205 [ 12.458433] [ 12.458641] CPU: 0 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.458683] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.458694] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.458725] Call Trace: [ 12.458738] <TASK> [ 12.458752] dump_stack_lvl+0x73/0xb0 [ 12.458780] print_report+0xd1/0x610 [ 12.458801] ? __virt_addr_valid+0x1db/0x2d0 [ 12.458834] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.458854] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.458876] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.458907] kasan_report+0x141/0x180 [ 12.458929] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.458954] kasan_check_range+0x10c/0x1c0 [ 12.458976] __asan_memset+0x27/0x50 [ 12.458995] kmalloc_uaf_memset+0x1a3/0x360 [ 12.459015] ? __pfx_kmalloc_uaf_memset+0x10/0x10 [ 12.459046] ? __pfx_queued_spin_lock_slowpath+0x10/0x10 [ 12.459071] ? __pfx_read_tsc+0x10/0x10 [ 12.459091] ? ktime_get_ts64+0x86/0x230 [ 12.459124] kunit_try_run_case+0x1a5/0x480 [ 12.459148] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.459169] ? _raw_spin_lock_irqsave+0xf9/0x100 [ 12.459200] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.459223] ? __kthread_parkme+0x82/0x180 [ 12.459242] ? preempt_count_sub+0x50/0x80 [ 12.459264] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.459307] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.459330] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.459354] kthread+0x337/0x6f0 [ 12.459372] ? trace_preempt_on+0x20/0xc0 [ 12.459404] ? __pfx_kthread+0x10/0x10 [ 12.459423] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.459443] ? calculate_sigpending+0x7b/0xa0 [ 12.459477] ? __pfx_kthread+0x10/0x10 [ 12.459497] ret_from_fork+0x116/0x1d0 [ 12.459515] ? __pfx_kthread+0x10/0x10 [ 12.459534] ret_from_fork_asm+0x1a/0x30 [ 12.459564] </TASK> [ 12.459574] [ 12.466760] Allocated by task 205: [ 12.466885] kasan_save_stack+0x45/0x70 [ 12.467024] kasan_save_track+0x18/0x40 [ 12.467158] kasan_save_alloc_info+0x3b/0x50 [ 12.467345] __kasan_kmalloc+0xb7/0xc0 [ 12.467545] __kmalloc_cache_noprof+0x189/0x420 [ 12.467765] kmalloc_uaf_memset+0xa9/0x360 [ 12.467963] kunit_try_run_case+0x1a5/0x480 [ 12.468163] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.468420] kthread+0x337/0x6f0 [ 12.468741] ret_from_fork+0x116/0x1d0 [ 12.468924] ret_from_fork_asm+0x1a/0x30 [ 12.469122] [ 12.469194] Freed by task 205: [ 12.469328] kasan_save_stack+0x45/0x70 [ 12.469580] kasan_save_track+0x18/0x40 [ 12.469755] kasan_save_free_info+0x3f/0x60 [ 12.469904] __kasan_slab_free+0x56/0x70 [ 12.470040] kfree+0x222/0x3f0 [ 12.470156] kmalloc_uaf_memset+0x12b/0x360 [ 12.470308] kunit_try_run_case+0x1a5/0x480 [ 12.470454] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.470706] kthread+0x337/0x6f0 [ 12.470870] ret_from_fork+0x116/0x1d0 [ 12.471051] ret_from_fork_asm+0x1a/0x30 [ 12.471317] [ 12.471432] The buggy address belongs to the object at ffff8881029d4700 [ 12.471432] which belongs to the cache kmalloc-64 of size 64 [ 12.472058] The buggy address is located 0 bytes inside of [ 12.472058] freed 64-byte region [ffff8881029d4700, ffff8881029d4740) [ 12.472490] [ 12.472584] The buggy address belongs to the physical page: [ 12.472864] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029d4 [ 12.473246] flags: 0x200000000000000(node=0|zone=2) [ 12.473576] page_type: f5(slab) [ 12.473743] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.474052] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.474288] page dumped because: kasan: bad access detected [ 12.474549] [ 12.474641] Memory state around the buggy address: [ 12.474891] ffff8881029d4600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.475237] ffff8881029d4680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.475562] >ffff8881029d4700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.475875] ^ [ 12.476035] ffff8881029d4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.476346] ffff8881029d4800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.476676] ==================================================================