Date
June 16, 2025, 7:07 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.203449] ================================================================== [ 19.203592] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 19.203722] Read of size 16 at addr fff00000c6397180 by task kunit_try_catch/177 [ 19.204349] [ 19.204605] CPU: 0 UID: 0 PID: 177 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250616 #1 PREEMPT [ 19.205548] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.205628] Hardware name: linux,dummy-virt (DT) [ 19.205728] Call trace: [ 19.205790] show_stack+0x20/0x38 (C) [ 19.205941] dump_stack_lvl+0x8c/0xd0 [ 19.206051] print_report+0x118/0x608 [ 19.206164] kasan_report+0xdc/0x128 [ 19.206438] __asan_report_load16_noabort+0x20/0x30 [ 19.206573] kmalloc_uaf_16+0x3bc/0x438 [ 19.206684] kunit_try_run_case+0x170/0x3f0 [ 19.206798] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.206920] kthread+0x328/0x630 [ 19.207160] ret_from_fork+0x10/0x20 [ 19.207311] [ 19.207359] Allocated by task 177: [ 19.207443] kasan_save_stack+0x3c/0x68 [ 19.207597] kasan_save_track+0x20/0x40 [ 19.207723] kasan_save_alloc_info+0x40/0x58 [ 19.208080] __kasan_kmalloc+0xd4/0xd8 [ 19.208277] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.208395] kmalloc_uaf_16+0x140/0x438 [ 19.208486] kunit_try_run_case+0x170/0x3f0 [ 19.208577] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.208688] kthread+0x328/0x630 [ 19.208773] ret_from_fork+0x10/0x20 [ 19.208886] [ 19.208937] Freed by task 177: [ 19.209006] kasan_save_stack+0x3c/0x68 [ 19.209101] kasan_save_track+0x20/0x40 [ 19.209194] kasan_save_free_info+0x4c/0x78 [ 19.209284] __kasan_slab_free+0x6c/0x98 [ 19.209375] kfree+0x214/0x3c8 [ 19.209455] kmalloc_uaf_16+0x190/0x438 [ 19.209539] kunit_try_run_case+0x170/0x3f0 [ 19.210313] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.210539] kthread+0x328/0x630 [ 19.210716] ret_from_fork+0x10/0x20 [ 19.210913] [ 19.211158] The buggy address belongs to the object at fff00000c6397180 [ 19.211158] which belongs to the cache kmalloc-16 of size 16 [ 19.211300] The buggy address is located 0 bytes inside of [ 19.211300] freed 16-byte region [fff00000c6397180, fff00000c6397190) [ 19.211445] [ 19.211494] The buggy address belongs to the physical page: [ 19.211563] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106397 [ 19.211705] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.211873] page_type: f5(slab) [ 19.212004] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 19.212159] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.212284] page dumped because: kasan: bad access detected [ 19.212379] [ 19.212433] Memory state around the buggy address: [ 19.212525] fff00000c6397080: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc [ 19.212634] fff00000c6397100: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 19.212769] >fff00000c6397180: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.212898] ^ [ 19.212966] fff00000c6397200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.213081] fff00000c6397280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.213167] ==================================================================
[ 11.440592] ================================================================== [ 11.441432] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 11.442073] Read of size 16 at addr ffff888102539460 by task kunit_try_catch/193 [ 11.442991] [ 11.443362] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) [ 11.443413] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.443425] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.443651] Call Trace: [ 11.443670] <TASK> [ 11.443695] dump_stack_lvl+0x73/0xb0 [ 11.443729] print_report+0xd1/0x650 [ 11.443751] ? __virt_addr_valid+0x1db/0x2d0 [ 11.443773] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.443792] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.443813] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.443832] kasan_report+0x141/0x180 [ 11.443853] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.443877] __asan_report_load16_noabort+0x18/0x20 [ 11.443900] kmalloc_uaf_16+0x47b/0x4c0 [ 11.443920] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 11.443949] ? __schedule+0x10cc/0x2b60 [ 11.443969] ? __pfx_read_tsc+0x10/0x10 [ 11.443991] ? ktime_get_ts64+0x86/0x230 [ 11.444016] kunit_try_run_case+0x1a5/0x480 [ 11.444040] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.444061] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.444081] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.444102] ? __kthread_parkme+0x82/0x180 [ 11.444121] ? preempt_count_sub+0x50/0x80 [ 11.444144] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.444166] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.444187] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.444208] kthread+0x337/0x6f0 [ 11.444227] ? trace_preempt_on+0x20/0xc0 [ 11.444252] ? __pfx_kthread+0x10/0x10 [ 11.444271] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.444290] ? calculate_sigpending+0x7b/0xa0 [ 11.444313] ? __pfx_kthread+0x10/0x10 [ 11.444333] ret_from_fork+0x116/0x1d0 [ 11.444350] ? __pfx_kthread+0x10/0x10 [ 11.444369] ret_from_fork_asm+0x1a/0x30 [ 11.444432] </TASK> [ 11.444444] [ 11.455016] Allocated by task 193: [ 11.455383] kasan_save_stack+0x45/0x70 [ 11.455860] kasan_save_track+0x18/0x40 [ 11.456262] kasan_save_alloc_info+0x3b/0x50 [ 11.456839] __kasan_kmalloc+0xb7/0xc0 [ 11.457214] __kmalloc_cache_noprof+0x189/0x420 [ 11.457374] kmalloc_uaf_16+0x15b/0x4c0 [ 11.457504] kunit_try_run_case+0x1a5/0x480 [ 11.457641] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.458222] kthread+0x337/0x6f0 [ 11.458660] ret_from_fork+0x116/0x1d0 [ 11.459029] ret_from_fork_asm+0x1a/0x30 [ 11.459400] [ 11.459625] Freed by task 193: [ 11.459901] kasan_save_stack+0x45/0x70 [ 11.460045] kasan_save_track+0x18/0x40 [ 11.460171] kasan_save_free_info+0x3f/0x60 [ 11.460308] __kasan_slab_free+0x56/0x70 [ 11.460738] kfree+0x222/0x3f0 [ 11.461041] kmalloc_uaf_16+0x1d6/0x4c0 [ 11.461412] kunit_try_run_case+0x1a5/0x480 [ 11.461839] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.462319] kthread+0x337/0x6f0 [ 11.462723] ret_from_fork+0x116/0x1d0 [ 11.462949] ret_from_fork_asm+0x1a/0x30 [ 11.463083] [ 11.463149] The buggy address belongs to the object at ffff888102539460 [ 11.463149] which belongs to the cache kmalloc-16 of size 16 [ 11.463833] The buggy address is located 0 bytes inside of [ 11.463833] freed 16-byte region [ffff888102539460, ffff888102539470) [ 11.465010] [ 11.465176] The buggy address belongs to the physical page: [ 11.465743] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102539 [ 11.466324] flags: 0x200000000000000(node=0|zone=2) [ 11.466554] page_type: f5(slab) [ 11.466897] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 11.467461] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.468066] page dumped because: kasan: bad access detected [ 11.468240] [ 11.468306] Memory state around the buggy address: [ 11.468909] ffff888102539300: 00 06 fc fc 00 06 fc fc fa fb fc fc fa fb fc fc [ 11.469651] ffff888102539380: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.470287] >ffff888102539400: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 11.470805] ^ [ 11.471015] ffff888102539480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.471224] ffff888102539500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.471605] ==================================================================