Date
July 9, 2025, 1:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 29.302377] ================================================================== [ 29.302690] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 29.302754] Read of size 16 at addr fff00000c592c8e0 by task kunit_try_catch/200 [ 29.302803] [ 29.303226] CPU: 0 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250709 #1 PREEMPT [ 29.303320] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.303359] Hardware name: linux,dummy-virt (DT) [ 29.303538] Call trace: [ 29.303561] show_stack+0x20/0x38 (C) [ 29.303845] dump_stack_lvl+0x8c/0xd0 [ 29.303916] print_report+0x118/0x5d0 [ 29.303962] kasan_report+0xdc/0x128 [ 29.304270] __asan_report_load16_noabort+0x20/0x30 [ 29.304321] kmalloc_uaf_16+0x3bc/0x438 [ 29.304366] kunit_try_run_case+0x170/0x3f0 [ 29.304482] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.304536] kthread+0x328/0x630 [ 29.304578] ret_from_fork+0x10/0x20 [ 29.304625] [ 29.304700] Allocated by task 200: [ 29.304801] kasan_save_stack+0x3c/0x68 [ 29.305036] kasan_save_track+0x20/0x40 [ 29.305100] kasan_save_alloc_info+0x40/0x58 [ 29.305136] __kasan_kmalloc+0xd4/0xd8 [ 29.305464] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.305510] kmalloc_uaf_16+0x140/0x438 [ 29.305578] kunit_try_run_case+0x170/0x3f0 [ 29.306382] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.306434] kthread+0x328/0x630 [ 29.306674] ret_from_fork+0x10/0x20 [ 29.306710] [ 29.306729] Freed by task 200: [ 29.306953] kasan_save_stack+0x3c/0x68 [ 29.307001] kasan_save_track+0x20/0x40 [ 29.307038] kasan_save_free_info+0x4c/0x78 [ 29.307206] __kasan_slab_free+0x6c/0x98 [ 29.307412] kfree+0x214/0x3c8 [ 29.307447] kmalloc_uaf_16+0x190/0x438 [ 29.307482] kunit_try_run_case+0x170/0x3f0 [ 29.307519] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.307911] kthread+0x328/0x630 [ 29.307955] ret_from_fork+0x10/0x20 [ 29.307991] [ 29.308036] The buggy address belongs to the object at fff00000c592c8e0 [ 29.308036] which belongs to the cache kmalloc-16 of size 16 [ 29.308150] The buggy address is located 0 bytes inside of [ 29.308150] freed 16-byte region [fff00000c592c8e0, fff00000c592c8f0) [ 29.308210] [ 29.308230] The buggy address belongs to the physical page: [ 29.308260] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10592c [ 29.308499] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 29.308631] page_type: f5(slab) [ 29.308672] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 29.309115] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 29.309243] page dumped because: kasan: bad access detected [ 29.309274] [ 29.309292] Memory state around the buggy address: [ 29.309711] fff00000c592c780: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.309989] fff00000c592c800: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc [ 29.310037] >fff00000c592c880: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 29.310087] ^ [ 29.310125] fff00000c592c900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.310166] fff00000c592c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.310202] ==================================================================
[ 24.118645] ================================================================== [ 24.119741] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 24.120131] Read of size 16 at addr ffff88810484f4e0 by task kunit_try_catch/218 [ 24.120843] [ 24.120936] CPU: 1 UID: 0 PID: 218 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) [ 24.120987] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 24.120999] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.121020] Call Trace: [ 24.121033] <TASK> [ 24.121051] dump_stack_lvl+0x73/0xb0 [ 24.121080] print_report+0xd1/0x610 [ 24.121101] ? __virt_addr_valid+0x1db/0x2d0 [ 24.121125] ? kmalloc_uaf_16+0x47b/0x4c0 [ 24.121144] ? kasan_complete_mode_report_info+0x64/0x200 [ 24.121168] ? kmalloc_uaf_16+0x47b/0x4c0 [ 24.121188] kasan_report+0x141/0x180 [ 24.121209] ? kmalloc_uaf_16+0x47b/0x4c0 [ 24.121233] __asan_report_load16_noabort+0x18/0x20 [ 24.121256] kmalloc_uaf_16+0x47b/0x4c0 [ 24.121276] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 24.121297] ? __schedule+0x10cc/0x2b60 [ 24.121320] ? __pfx_read_tsc+0x10/0x10 [ 24.121340] ? ktime_get_ts64+0x86/0x230 [ 24.121365] kunit_try_run_case+0x1a5/0x480 [ 24.121386] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.121406] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.121429] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.121452] ? __kthread_parkme+0x82/0x180 [ 24.121472] ? preempt_count_sub+0x50/0x80 [ 24.121495] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.121516] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.121540] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.121564] kthread+0x337/0x6f0 [ 24.121584] ? trace_preempt_on+0x20/0xc0 [ 24.121606] ? __pfx_kthread+0x10/0x10 [ 24.121626] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.121647] ? calculate_sigpending+0x7b/0xa0 [ 24.121671] ? __pfx_kthread+0x10/0x10 [ 24.121701] ret_from_fork+0x116/0x1d0 [ 24.121720] ? __pfx_kthread+0x10/0x10 [ 24.121739] ret_from_fork_asm+0x1a/0x30 [ 24.121770] </TASK> [ 24.121780] [ 24.135864] Allocated by task 218: [ 24.136239] kasan_save_stack+0x45/0x70 [ 24.136607] kasan_save_track+0x18/0x40 [ 24.136984] kasan_save_alloc_info+0x3b/0x50 [ 24.137418] __kasan_kmalloc+0xb7/0xc0 [ 24.137810] __kmalloc_cache_noprof+0x189/0x420 [ 24.138333] kmalloc_uaf_16+0x15b/0x4c0 [ 24.138720] kunit_try_run_case+0x1a5/0x480 [ 24.139096] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.139315] kthread+0x337/0x6f0 [ 24.139611] ret_from_fork+0x116/0x1d0 [ 24.139975] ret_from_fork_asm+0x1a/0x30 [ 24.140532] [ 24.140703] Freed by task 218: [ 24.140823] kasan_save_stack+0x45/0x70 [ 24.140974] kasan_save_track+0x18/0x40 [ 24.141100] kasan_save_free_info+0x3f/0x60 [ 24.141237] __kasan_slab_free+0x56/0x70 [ 24.141365] kfree+0x222/0x3f0 [ 24.141923] kmalloc_uaf_16+0x1d6/0x4c0 [ 24.142447] kunit_try_run_case+0x1a5/0x480 [ 24.142933] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.143216] kthread+0x337/0x6f0 [ 24.143335] ret_from_fork+0x116/0x1d0 [ 24.143461] ret_from_fork_asm+0x1a/0x30 [ 24.143591] [ 24.143656] The buggy address belongs to the object at ffff88810484f4e0 [ 24.143656] which belongs to the cache kmalloc-16 of size 16 [ 24.144116] The buggy address is located 0 bytes inside of [ 24.144116] freed 16-byte region [ffff88810484f4e0, ffff88810484f4f0) [ 24.144625] [ 24.144739] The buggy address belongs to the physical page: [ 24.145201] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10484f [ 24.145608] flags: 0x200000000000000(node=0|zone=2) [ 24.145880] page_type: f5(slab) [ 24.146072] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 24.146387] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 24.146679] page dumped because: kasan: bad access detected [ 24.147060] [ 24.147157] Memory state around the buggy address: [ 24.147333] ffff88810484f380: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 24.147593] ffff88810484f400: fa fb fc fc fa fb fc fc fa fb fc fc 00 06 fc fc [ 24.148284] >ffff88810484f480: 00 06 fc fc 00 06 fc fc 00 00 fc fc fa fb fc fc [ 24.148929] ^ [ 24.149486] ffff88810484f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.150027] ffff88810484f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.150521] ==================================================================