Date
July 19, 2025, 11:12 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.339426] ================================================================== [ 15.339605] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 15.339659] Read of size 1 at addr fff00000c77cb9a8 by task kunit_try_catch/188 [ 15.339723] [ 15.339791] CPU: 1 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.339995] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.340083] Hardware name: linux,dummy-virt (DT) [ 15.340165] Call trace: [ 15.340224] show_stack+0x20/0x38 (C) [ 15.340326] dump_stack_lvl+0x8c/0xd0 [ 15.340375] print_report+0x118/0x5d0 [ 15.340439] kasan_report+0xdc/0x128 [ 15.340856] __asan_report_load1_noabort+0x20/0x30 [ 15.340957] kmalloc_uaf2+0x3f4/0x468 [ 15.341057] kunit_try_run_case+0x170/0x3f0 [ 15.341119] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.341209] kthread+0x328/0x630 [ 15.341464] ret_from_fork+0x10/0x20 [ 15.341679] [ 15.341790] Allocated by task 188: [ 15.341861] kasan_save_stack+0x3c/0x68 [ 15.341940] kasan_save_track+0x20/0x40 [ 15.342047] kasan_save_alloc_info+0x40/0x58 [ 15.342169] __kasan_kmalloc+0xd4/0xd8 [ 15.342286] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.342464] kmalloc_uaf2+0xc4/0x468 [ 15.342636] kunit_try_run_case+0x170/0x3f0 [ 15.342786] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.342911] kthread+0x328/0x630 [ 15.343017] ret_from_fork+0x10/0x20 [ 15.343104] [ 15.343170] Freed by task 188: [ 15.343278] kasan_save_stack+0x3c/0x68 [ 15.343371] kasan_save_track+0x20/0x40 [ 15.343523] kasan_save_free_info+0x4c/0x78 [ 15.343575] __kasan_slab_free+0x6c/0x98 [ 15.343611] kfree+0x214/0x3c8 [ 15.343879] kmalloc_uaf2+0x134/0x468 [ 15.343998] kunit_try_run_case+0x170/0x3f0 [ 15.344132] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.344208] kthread+0x328/0x630 [ 15.344344] ret_from_fork+0x10/0x20 [ 15.344430] [ 15.344577] The buggy address belongs to the object at fff00000c77cb980 [ 15.344577] which belongs to the cache kmalloc-64 of size 64 [ 15.344747] The buggy address is located 40 bytes inside of [ 15.344747] freed 64-byte region [fff00000c77cb980, fff00000c77cb9c0) [ 15.344834] [ 15.344861] The buggy address belongs to the physical page: [ 15.344894] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077cb [ 15.344972] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.345022] page_type: f5(slab) [ 15.345098] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 15.345293] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 15.345348] page dumped because: kasan: bad access detected [ 15.345381] [ 15.345398] Memory state around the buggy address: [ 15.345438] fff00000c77cb880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.345489] fff00000c77cb900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.345551] >fff00000c77cb980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.345603] ^ [ 15.345636] fff00000c77cba00: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 15.345679] fff00000c77cba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.345730] ==================================================================
[ 12.329979] ================================================================== [ 12.331392] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 12.331996] Read of size 1 at addr ffff8881027e72a8 by task kunit_try_catch/205 [ 12.332777] [ 12.332957] CPU: 1 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.333020] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.333032] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.333053] Call Trace: [ 12.333064] <TASK> [ 12.333078] dump_stack_lvl+0x73/0xb0 [ 12.333109] print_report+0xd1/0x610 [ 12.333130] ? __virt_addr_valid+0x1db/0x2d0 [ 12.333176] ? kmalloc_uaf2+0x4a8/0x520 [ 12.333195] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.333231] ? kmalloc_uaf2+0x4a8/0x520 [ 12.333263] kasan_report+0x141/0x180 [ 12.333284] ? kmalloc_uaf2+0x4a8/0x520 [ 12.333321] __asan_report_load1_noabort+0x18/0x20 [ 12.333351] kmalloc_uaf2+0x4a8/0x520 [ 12.333370] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 12.333389] ? finish_task_switch.isra.0+0x153/0x700 [ 12.333411] ? __switch_to+0x47/0xf50 [ 12.333436] ? __schedule+0x10cc/0x2b60 [ 12.333458] ? __pfx_read_tsc+0x10/0x10 [ 12.333479] ? ktime_get_ts64+0x86/0x230 [ 12.333500] kunit_try_run_case+0x1a5/0x480 [ 12.333523] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.333544] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.333568] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.333590] ? __kthread_parkme+0x82/0x180 [ 12.333610] ? preempt_count_sub+0x50/0x80 [ 12.333633] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.333656] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.333678] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.333701] kthread+0x337/0x6f0 [ 12.333720] ? trace_preempt_on+0x20/0xc0 [ 12.333742] ? __pfx_kthread+0x10/0x10 [ 12.333761] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.333781] ? calculate_sigpending+0x7b/0xa0 [ 12.333804] ? __pfx_kthread+0x10/0x10 [ 12.333825] ret_from_fork+0x116/0x1d0 [ 12.333842] ? __pfx_kthread+0x10/0x10 [ 12.333861] ret_from_fork_asm+0x1a/0x30 [ 12.333892] </TASK> [ 12.333902] [ 12.348027] Allocated by task 205: [ 12.348397] kasan_save_stack+0x45/0x70 [ 12.348888] kasan_save_track+0x18/0x40 [ 12.349428] kasan_save_alloc_info+0x3b/0x50 [ 12.349588] __kasan_kmalloc+0xb7/0xc0 [ 12.349720] __kmalloc_cache_noprof+0x189/0x420 [ 12.349877] kmalloc_uaf2+0xc6/0x520 [ 12.350017] kunit_try_run_case+0x1a5/0x480 [ 12.350579] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.351184] kthread+0x337/0x6f0 [ 12.351557] ret_from_fork+0x116/0x1d0 [ 12.351979] ret_from_fork_asm+0x1a/0x30 [ 12.352361] [ 12.352618] Freed by task 205: [ 12.353016] kasan_save_stack+0x45/0x70 [ 12.353468] kasan_save_track+0x18/0x40 [ 12.353967] kasan_save_free_info+0x3f/0x60 [ 12.354326] __kasan_slab_free+0x56/0x70 [ 12.354485] kfree+0x222/0x3f0 [ 12.354857] kmalloc_uaf2+0x14c/0x520 [ 12.355215] kunit_try_run_case+0x1a5/0x480 [ 12.355720] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.356140] kthread+0x337/0x6f0 [ 12.356264] ret_from_fork+0x116/0x1d0 [ 12.356451] ret_from_fork_asm+0x1a/0x30 [ 12.356877] [ 12.357089] The buggy address belongs to the object at ffff8881027e7280 [ 12.357089] which belongs to the cache kmalloc-64 of size 64 [ 12.358304] The buggy address is located 40 bytes inside of [ 12.358304] freed 64-byte region [ffff8881027e7280, ffff8881027e72c0) [ 12.358983] [ 12.359079] The buggy address belongs to the physical page: [ 12.359251] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027e7 [ 12.359549] flags: 0x200000000000000(node=0|zone=2) [ 12.359928] page_type: f5(slab) [ 12.360335] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.360734] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.361089] page dumped because: kasan: bad access detected [ 12.361312] [ 12.361401] Memory state around the buggy address: [ 12.361657] ffff8881027e7180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.361993] ffff8881027e7200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.362297] >ffff8881027e7280: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.362604] ^ [ 12.362831] ffff8881027e7300: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 12.363169] ffff8881027e7380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.363616] ==================================================================