Date
July 10, 2025, 6:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.017817] ================================================================== [ 17.018044] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 17.018145] Read of size 1 at addr fff00000c4498e68 by task kunit_try_catch/184 [ 17.018637] [ 17.018700] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.018929] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.019164] Hardware name: linux,dummy-virt (DT) [ 17.019214] Call trace: [ 17.019237] show_stack+0x20/0x38 (C) [ 17.019449] dump_stack_lvl+0x8c/0xd0 [ 17.019668] print_report+0x118/0x608 [ 17.019724] kasan_report+0xdc/0x128 [ 17.019771] __asan_report_load1_noabort+0x20/0x30 [ 17.019822] kmalloc_uaf+0x300/0x338 [ 17.019917] kunit_try_run_case+0x170/0x3f0 [ 17.019985] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.020040] kthread+0x328/0x630 [ 17.020092] ret_from_fork+0x10/0x20 [ 17.020149] [ 17.020180] Allocated by task 184: [ 17.020208] kasan_save_stack+0x3c/0x68 [ 17.020250] kasan_save_track+0x20/0x40 [ 17.020298] kasan_save_alloc_info+0x40/0x58 [ 17.020351] __kasan_kmalloc+0xd4/0xd8 [ 17.020388] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.020440] kmalloc_uaf+0xb8/0x338 [ 17.020481] kunit_try_run_case+0x170/0x3f0 [ 17.020546] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.020592] kthread+0x328/0x630 [ 17.020631] ret_from_fork+0x10/0x20 [ 17.020666] [ 17.020699] Freed by task 184: [ 17.020739] kasan_save_stack+0x3c/0x68 [ 17.020778] kasan_save_track+0x20/0x40 [ 17.020813] kasan_save_free_info+0x4c/0x78 [ 17.020859] __kasan_slab_free+0x6c/0x98 [ 17.020905] kfree+0x214/0x3c8 [ 17.020947] kmalloc_uaf+0x11c/0x338 [ 17.020981] kunit_try_run_case+0x170/0x3f0 [ 17.021029] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.021077] kthread+0x328/0x630 [ 17.021109] ret_from_fork+0x10/0x20 [ 17.021145] [ 17.021176] The buggy address belongs to the object at fff00000c4498e60 [ 17.021176] which belongs to the cache kmalloc-16 of size 16 [ 17.021240] The buggy address is located 8 bytes inside of [ 17.021240] freed 16-byte region [fff00000c4498e60, fff00000c4498e70) [ 17.021300] [ 17.021481] The buggy address belongs to the physical page: [ 17.021649] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104498 [ 17.022140] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.022442] page_type: f5(slab) [ 17.022498] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 17.022805] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.023046] page dumped because: kasan: bad access detected [ 17.023092] [ 17.023139] Memory state around the buggy address: [ 17.023490] fff00000c4498d00: fa fb fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc [ 17.023694] fff00000c4498d80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.023879] >fff00000c4498e00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.023964] ^ [ 17.024149] fff00000c4498e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.024389] fff00000c4498f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.024471] ==================================================================
[ 12.735128] ================================================================== [ 12.735640] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 12.736255] Read of size 1 at addr ffff888101debe68 by task kunit_try_catch/201 [ 12.736616] [ 12.736734] CPU: 0 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.736777] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.736788] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.736806] Call Trace: [ 12.736818] <TASK> [ 12.736832] dump_stack_lvl+0x73/0xb0 [ 12.736862] print_report+0xd1/0x650 [ 12.736884] ? __virt_addr_valid+0x1db/0x2d0 [ 12.736926] ? kmalloc_uaf+0x320/0x380 [ 12.736959] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.737095] ? kmalloc_uaf+0x320/0x380 [ 12.737122] kasan_report+0x141/0x180 [ 12.737144] ? kmalloc_uaf+0x320/0x380 [ 12.737168] __asan_report_load1_noabort+0x18/0x20 [ 12.737193] kmalloc_uaf+0x320/0x380 [ 12.737213] ? __pfx_kmalloc_uaf+0x10/0x10 [ 12.737233] ? __schedule+0x10cc/0x2b60 [ 12.737255] ? __pfx_read_tsc+0x10/0x10 [ 12.737277] ? ktime_get_ts64+0x86/0x230 [ 12.737300] kunit_try_run_case+0x1a5/0x480 [ 12.737325] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.737347] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.737371] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.737394] ? __kthread_parkme+0x82/0x180 [ 12.737414] ? preempt_count_sub+0x50/0x80 [ 12.737438] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.737461] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.737485] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.737510] kthread+0x337/0x6f0 [ 12.737528] ? trace_preempt_on+0x20/0xc0 [ 12.737551] ? __pfx_kthread+0x10/0x10 [ 12.737571] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.737592] ? calculate_sigpending+0x7b/0xa0 [ 12.737615] ? __pfx_kthread+0x10/0x10 [ 12.737636] ret_from_fork+0x116/0x1d0 [ 12.737654] ? __pfx_kthread+0x10/0x10 [ 12.737675] ret_from_fork_asm+0x1a/0x30 [ 12.737705] </TASK> [ 12.737714] [ 12.745386] Allocated by task 201: [ 12.745540] kasan_save_stack+0x45/0x70 [ 12.745768] kasan_save_track+0x18/0x40 [ 12.746145] kasan_save_alloc_info+0x3b/0x50 [ 12.746395] __kasan_kmalloc+0xb7/0xc0 [ 12.746603] __kmalloc_cache_noprof+0x189/0x420 [ 12.746830] kmalloc_uaf+0xaa/0x380 [ 12.747154] kunit_try_run_case+0x1a5/0x480 [ 12.747352] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.747634] kthread+0x337/0x6f0 [ 12.747802] ret_from_fork+0x116/0x1d0 [ 12.748072] ret_from_fork_asm+0x1a/0x30 [ 12.748273] [ 12.748365] Freed by task 201: [ 12.748521] kasan_save_stack+0x45/0x70 [ 12.748705] kasan_save_track+0x18/0x40 [ 12.748871] kasan_save_free_info+0x3f/0x60 [ 12.749096] __kasan_slab_free+0x56/0x70 [ 12.749355] kfree+0x222/0x3f0 [ 12.749471] kmalloc_uaf+0x12c/0x380 [ 12.749598] kunit_try_run_case+0x1a5/0x480 [ 12.750153] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.750636] kthread+0x337/0x6f0 [ 12.750897] ret_from_fork+0x116/0x1d0 [ 12.751119] ret_from_fork_asm+0x1a/0x30 [ 12.751352] [ 12.751448] The buggy address belongs to the object at ffff888101debe60 [ 12.751448] which belongs to the cache kmalloc-16 of size 16 [ 12.752062] The buggy address is located 8 bytes inside of [ 12.752062] freed 16-byte region [ffff888101debe60, ffff888101debe70) [ 12.752446] [ 12.752516] The buggy address belongs to the physical page: [ 12.752848] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101deb [ 12.753519] flags: 0x200000000000000(node=0|zone=2) [ 12.753766] page_type: f5(slab) [ 12.753956] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.754541] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.754854] page dumped because: kasan: bad access detected [ 12.755025] [ 12.755106] Memory state around the buggy address: [ 12.755328] ffff888101debd00: 00 05 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc [ 12.755773] ffff888101debd80: 00 02 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.756199] >ffff888101debe00: 00 05 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.756481] ^ [ 12.756706] ffff888101debe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.757302] ffff888101debf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.757763] ==================================================================