Date
July 17, 2025, 10:12 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 29.666530] ================================================================== [ 29.666595] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 29.666653] Read of size 1 at addr fff00000c7ac9368 by task kunit_try_catch/215 [ 29.666704] [ 29.666736] CPU: 1 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT [ 29.666832] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.666888] Hardware name: linux,dummy-virt (DT) [ 29.666923] Call trace: [ 29.666948] show_stack+0x20/0x38 (C) [ 29.666997] dump_stack_lvl+0x8c/0xd0 [ 29.667046] print_report+0x118/0x5d0 [ 29.667112] kasan_report+0xdc/0x128 [ 29.667156] __asan_report_load1_noabort+0x20/0x30 [ 29.667205] kmalloc_uaf+0x300/0x338 [ 29.667249] kunit_try_run_case+0x170/0x3f0 [ 29.667304] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.667355] kthread+0x328/0x630 [ 29.667396] ret_from_fork+0x10/0x20 [ 29.667442] [ 29.667460] Allocated by task 215: [ 29.667489] kasan_save_stack+0x3c/0x68 [ 29.667527] kasan_save_track+0x20/0x40 [ 29.667562] kasan_save_alloc_info+0x40/0x58 [ 29.667600] __kasan_kmalloc+0xd4/0xd8 [ 29.667633] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.667673] kmalloc_uaf+0xb8/0x338 [ 29.667707] kunit_try_run_case+0x170/0x3f0 [ 29.667762] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.667815] kthread+0x328/0x630 [ 29.667848] ret_from_fork+0x10/0x20 [ 29.667883] [ 29.667903] Freed by task 215: [ 29.667934] kasan_save_stack+0x3c/0x68 [ 29.667970] kasan_save_track+0x20/0x40 [ 29.668004] kasan_save_free_info+0x4c/0x78 [ 29.668040] __kasan_slab_free+0x6c/0x98 [ 29.668411] kfree+0x214/0x3c8 [ 29.668628] kmalloc_uaf+0x11c/0x338 [ 29.668683] kunit_try_run_case+0x170/0x3f0 [ 29.668723] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.669301] kthread+0x328/0x630 [ 29.669590] ret_from_fork+0x10/0x20 [ 29.669935] [ 29.670304] The buggy address belongs to the object at fff00000c7ac9360 [ 29.670304] which belongs to the cache kmalloc-16 of size 16 [ 29.670681] The buggy address is located 8 bytes inside of [ 29.670681] freed 16-byte region [fff00000c7ac9360, fff00000c7ac9370) [ 29.670943] [ 29.671063] The buggy address belongs to the physical page: [ 29.671104] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107ac9 [ 29.671200] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 29.671314] page_type: f5(slab) [ 29.671403] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122 [ 29.671803] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 29.671886] page dumped because: kasan: bad access detected [ 29.672314] [ 29.672408] Memory state around the buggy address: [ 29.672468] fff00000c7ac9200: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 29.672536] fff00000c7ac9280: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.672593] >fff00000c7ac9300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.672849] ^ [ 29.673316] fff00000c7ac9380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.673373] fff00000c7ac9400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.673414] ==================================================================
[ 25.892164] ================================================================== [ 25.892822] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 25.893112] Read of size 1 at addr ffff8881048d1ae8 by task kunit_try_catch/233 [ 25.893397] [ 25.893498] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) [ 25.893625] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.893638] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.893658] Call Trace: [ 25.893669] <TASK> [ 25.893683] dump_stack_lvl+0x73/0xb0 [ 25.893711] print_report+0xd1/0x610 [ 25.893732] ? __virt_addr_valid+0x1db/0x2d0 [ 25.893755] ? kmalloc_uaf+0x320/0x380 [ 25.893774] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.893798] ? kmalloc_uaf+0x320/0x380 [ 25.893818] kasan_report+0x141/0x180 [ 25.893839] ? kmalloc_uaf+0x320/0x380 [ 25.893862] __asan_report_load1_noabort+0x18/0x20 [ 25.893886] kmalloc_uaf+0x320/0x380 [ 25.893905] ? __pfx_kmalloc_uaf+0x10/0x10 [ 25.893932] ? __schedule+0x10c6/0x2b60 [ 25.893955] ? __pfx_read_tsc+0x10/0x10 [ 25.893975] ? ktime_get_ts64+0x86/0x230 [ 25.893999] kunit_try_run_case+0x1a5/0x480 [ 25.894021] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.894042] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.894064] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.894096] ? __kthread_parkme+0x82/0x180 [ 25.894120] ? preempt_count_sub+0x50/0x80 [ 25.894142] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.894165] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.894186] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.894208] kthread+0x337/0x6f0 [ 25.894226] ? trace_preempt_on+0x20/0xc0 [ 25.894249] ? __pfx_kthread+0x10/0x10 [ 25.894268] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.894290] ? calculate_sigpending+0x7b/0xa0 [ 25.894312] ? __pfx_kthread+0x10/0x10 [ 25.894333] ret_from_fork+0x116/0x1d0 [ 25.894350] ? __pfx_kthread+0x10/0x10 [ 25.894370] ret_from_fork_asm+0x1a/0x30 [ 25.894400] </TASK> [ 25.894461] [ 25.901235] Allocated by task 233: [ 25.901359] kasan_save_stack+0x45/0x70 [ 25.901495] kasan_save_track+0x18/0x40 [ 25.901621] kasan_save_alloc_info+0x3b/0x50 [ 25.901760] __kasan_kmalloc+0xb7/0xc0 [ 25.901883] __kmalloc_cache_noprof+0x189/0x420 [ 25.902035] kmalloc_uaf+0xaa/0x380 [ 25.902161] kunit_try_run_case+0x1a5/0x480 [ 25.902297] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.902460] kthread+0x337/0x6f0 [ 25.902571] ret_from_fork+0x116/0x1d0 [ 25.902693] ret_from_fork_asm+0x1a/0x30 [ 25.902861] [ 25.902944] Freed by task 233: [ 25.903097] kasan_save_stack+0x45/0x70 [ 25.903278] kasan_save_track+0x18/0x40 [ 25.903575] kasan_save_free_info+0x3f/0x60 [ 25.903728] __kasan_slab_free+0x56/0x70 [ 25.903857] kfree+0x222/0x3f0 [ 25.903965] kmalloc_uaf+0x12c/0x380 [ 25.904099] kunit_try_run_case+0x1a5/0x480 [ 25.904237] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.904401] kthread+0x337/0x6f0 [ 25.904677] ret_from_fork+0x116/0x1d0 [ 25.904864] ret_from_fork_asm+0x1a/0x30 [ 25.905056] [ 25.905150] The buggy address belongs to the object at ffff8881048d1ae0 [ 25.905150] which belongs to the cache kmalloc-16 of size 16 [ 25.905656] The buggy address is located 8 bytes inside of [ 25.905656] freed 16-byte region [ffff8881048d1ae0, ffff8881048d1af0) [ 25.906111] [ 25.906194] The buggy address belongs to the physical page: [ 25.906455] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1048d1 [ 25.906722] flags: 0x200000000000000(node=0|zone=2) [ 25.906949] page_type: f5(slab) [ 25.907103] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 25.907459] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 25.907740] page dumped because: kasan: bad access detected [ 25.907947] [ 25.908025] Memory state around the buggy address: [ 25.908215] ffff8881048d1980: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 25.908523] ffff8881048d1a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 25.908730] >ffff8881048d1a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 25.908935] ^ [ 25.909134] ffff8881048d1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.909342] ffff8881048d1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.909547] ==================================================================