Date
July 16, 2025, 12:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.731026] ================================================================== [ 30.731088] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 30.731140] Read of size 1 at addr fff00000c63602e8 by task kunit_try_catch/215 [ 30.731191] [ 30.731236] CPU: 0 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250716 #1 PREEMPT [ 30.731325] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.731353] Hardware name: linux,dummy-virt (DT) [ 30.731386] Call trace: [ 30.731407] show_stack+0x20/0x38 (C) [ 30.731455] dump_stack_lvl+0x8c/0xd0 [ 30.731501] print_report+0x118/0x5d0 [ 30.731557] kasan_report+0xdc/0x128 [ 30.731609] __asan_report_load1_noabort+0x20/0x30 [ 30.731672] kmalloc_uaf+0x300/0x338 [ 30.731717] kunit_try_run_case+0x170/0x3f0 [ 30.731982] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.732127] kthread+0x328/0x630 [ 30.732184] ret_from_fork+0x10/0x20 [ 30.732447] [ 30.732471] Allocated by task 215: [ 30.732518] kasan_save_stack+0x3c/0x68 [ 30.732727] kasan_save_track+0x20/0x40 [ 30.732890] kasan_save_alloc_info+0x40/0x58 [ 30.733043] __kasan_kmalloc+0xd4/0xd8 [ 30.733169] __kmalloc_cache_noprof+0x16c/0x3c0 [ 30.733372] kmalloc_uaf+0xb8/0x338 [ 30.733434] kunit_try_run_case+0x170/0x3f0 [ 30.733733] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.733824] kthread+0x328/0x630 [ 30.733983] ret_from_fork+0x10/0x20 [ 30.734193] [ 30.734267] Freed by task 215: [ 30.734566] kasan_save_stack+0x3c/0x68 [ 30.734736] kasan_save_track+0x20/0x40 [ 30.734884] kasan_save_free_info+0x4c/0x78 [ 30.734995] __kasan_slab_free+0x6c/0x98 [ 30.735190] kfree+0x214/0x3c8 [ 30.735448] kmalloc_uaf+0x11c/0x338 [ 30.735640] kunit_try_run_case+0x170/0x3f0 [ 30.735783] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.735866] kthread+0x328/0x630 [ 30.735942] ret_from_fork+0x10/0x20 [ 30.735996] [ 30.736133] The buggy address belongs to the object at fff00000c63602e0 [ 30.736133] which belongs to the cache kmalloc-16 of size 16 [ 30.736232] The buggy address is located 8 bytes inside of [ 30.736232] freed 16-byte region [fff00000c63602e0, fff00000c63602f0) [ 30.736447] [ 30.736470] The buggy address belongs to the physical page: [ 30.736725] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106360 [ 30.736878] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.736983] page_type: f5(slab) [ 30.737051] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 30.737172] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 30.737258] page dumped because: kasan: bad access detected [ 30.737348] [ 30.737446] Memory state around the buggy address: [ 30.737481] fff00000c6360180: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 30.737761] fff00000c6360200: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 30.737824] >fff00000c6360280: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 30.738207] ^ [ 30.738465] fff00000c6360300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.738571] fff00000c6360380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.738615] ==================================================================
[ 23.502598] ================================================================== [ 23.503151] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 23.503565] Read of size 1 at addr ffff888105376d68 by task kunit_try_catch/233 [ 23.504084] [ 23.504183] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) [ 23.504530] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.504545] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.504578] Call Trace: [ 23.504592] <TASK> [ 23.504612] dump_stack_lvl+0x73/0xb0 [ 23.504646] print_report+0xd1/0x610 [ 23.504669] ? __virt_addr_valid+0x1db/0x2d0 [ 23.504694] ? kmalloc_uaf+0x320/0x380 [ 23.504713] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.504738] ? kmalloc_uaf+0x320/0x380 [ 23.504757] kasan_report+0x141/0x180 [ 23.504778] ? kmalloc_uaf+0x320/0x380 [ 23.504804] __asan_report_load1_noabort+0x18/0x20 [ 23.504827] kmalloc_uaf+0x320/0x380 [ 23.504846] ? __pfx_kmalloc_uaf+0x10/0x10 [ 23.504915] ? __schedule+0x10c6/0x2b60 [ 23.504941] ? __pfx_read_tsc+0x10/0x10 [ 23.504962] ? ktime_get_ts64+0x86/0x230 [ 23.504988] kunit_try_run_case+0x1a5/0x480 [ 23.505012] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.505034] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 23.505055] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.505077] ? __kthread_parkme+0x82/0x180 [ 23.505097] ? preempt_count_sub+0x50/0x80 [ 23.505120] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.505143] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.505168] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.505194] kthread+0x337/0x6f0 [ 23.505213] ? trace_preempt_on+0x20/0xc0 [ 23.505236] ? __pfx_kthread+0x10/0x10 [ 23.505256] ? _raw_spin_unlock_irq+0x47/0x80 [ 23.505288] ? calculate_sigpending+0x7b/0xa0 [ 23.505312] ? __pfx_kthread+0x10/0x10 [ 23.505332] ret_from_fork+0x116/0x1d0 [ 23.505351] ? __pfx_kthread+0x10/0x10 [ 23.505371] ret_from_fork_asm+0x1a/0x30 [ 23.505401] </TASK> [ 23.505413] [ 23.514810] Allocated by task 233: [ 23.515339] kasan_save_stack+0x45/0x70 [ 23.515548] kasan_save_track+0x18/0x40 [ 23.515925] kasan_save_alloc_info+0x3b/0x50 [ 23.516134] __kasan_kmalloc+0xb7/0xc0 [ 23.516314] __kmalloc_cache_noprof+0x189/0x420 [ 23.516519] kmalloc_uaf+0xaa/0x380 [ 23.516664] kunit_try_run_case+0x1a5/0x480 [ 23.517135] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.517361] kthread+0x337/0x6f0 [ 23.517675] ret_from_fork+0x116/0x1d0 [ 23.517820] ret_from_fork_asm+0x1a/0x30 [ 23.518057] [ 23.518146] Freed by task 233: [ 23.518368] kasan_save_stack+0x45/0x70 [ 23.518542] kasan_save_track+0x18/0x40 [ 23.519164] kasan_save_free_info+0x3f/0x60 [ 23.519394] __kasan_slab_free+0x56/0x70 [ 23.519566] kfree+0x222/0x3f0 [ 23.519734] kmalloc_uaf+0x12c/0x380 [ 23.519883] kunit_try_run_case+0x1a5/0x480 [ 23.520346] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.520601] kthread+0x337/0x6f0 [ 23.520746] ret_from_fork+0x116/0x1d0 [ 23.520898] ret_from_fork_asm+0x1a/0x30 [ 23.521318] [ 23.521416] The buggy address belongs to the object at ffff888105376d60 [ 23.521416] which belongs to the cache kmalloc-16 of size 16 [ 23.522118] The buggy address is located 8 bytes inside of [ 23.522118] freed 16-byte region [ffff888105376d60, ffff888105376d70) [ 23.522728] [ 23.522831] The buggy address belongs to the physical page: [ 23.523300] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105376 [ 23.523752] flags: 0x200000000000000(node=0|zone=2) [ 23.523968] page_type: f5(slab) [ 23.524338] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 23.524631] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 23.525397] page dumped because: kasan: bad access detected [ 23.525634] [ 23.525724] Memory state around the buggy address: [ 23.526178] ffff888105376c00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 23.526494] ffff888105376c80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 23.526963] >ffff888105376d00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 23.527259] ^ [ 23.527552] ffff888105376d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.528114] ffff888105376e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.528381] ==================================================================