Date
July 18, 2025, 1:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.670424] ================================================================== [ 31.670501] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 31.670555] Read of size 1 at addr fff00000c9a42428 by task kunit_try_catch/219 [ 31.670671] [ 31.670705] CPU: 0 UID: 0 PID: 219 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT [ 31.670790] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.670832] Hardware name: linux,dummy-virt (DT) [ 31.671168] Call trace: [ 31.671209] show_stack+0x20/0x38 (C) [ 31.671497] dump_stack_lvl+0x8c/0xd0 [ 31.671596] print_report+0x118/0x5e8 [ 31.671702] kasan_report+0xdc/0x128 [ 31.671804] __asan_report_load1_noabort+0x20/0x30 [ 31.671884] kmalloc_uaf2+0x3f4/0x468 [ 31.672000] kunit_try_run_case+0x170/0x3f0 [ 31.672063] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.672284] kthread+0x328/0x630 [ 31.672430] ret_from_fork+0x10/0x20 [ 31.672642] [ 31.672702] Allocated by task 219: [ 31.672841] kasan_save_stack+0x3c/0x68 [ 31.672930] kasan_save_track+0x20/0x40 [ 31.673108] kasan_save_alloc_info+0x40/0x58 [ 31.673197] __kasan_kmalloc+0xd4/0xd8 [ 31.673596] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.673659] kmalloc_uaf2+0xc4/0x468 [ 31.673791] kunit_try_run_case+0x170/0x3f0 [ 31.673869] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.674043] kthread+0x328/0x630 [ 31.674123] ret_from_fork+0x10/0x20 [ 31.674247] [ 31.674284] Freed by task 219: [ 31.674311] kasan_save_stack+0x3c/0x68 [ 31.674363] kasan_save_track+0x20/0x40 [ 31.674400] kasan_save_free_info+0x4c/0x78 [ 31.674725] __kasan_slab_free+0x6c/0x98 [ 31.674796] kfree+0x214/0x3c8 [ 31.674960] kmalloc_uaf2+0x134/0x468 [ 31.675048] kunit_try_run_case+0x170/0x3f0 [ 31.675124] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.675537] kthread+0x328/0x630 [ 31.675626] ret_from_fork+0x10/0x20 [ 31.675690] [ 31.675781] The buggy address belongs to the object at fff00000c9a42400 [ 31.675781] which belongs to the cache kmalloc-64 of size 64 [ 31.675868] The buggy address is located 40 bytes inside of [ 31.675868] freed 64-byte region [fff00000c9a42400, fff00000c9a42440) [ 31.676013] [ 31.676071] The buggy address belongs to the physical page: [ 31.676124] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a42 [ 31.676180] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.676228] page_type: f5(slab) [ 31.676265] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 31.676636] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 31.676736] page dumped because: kasan: bad access detected [ 31.676800] [ 31.676819] Memory state around the buggy address: [ 31.676853] fff00000c9a42300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 31.676942] fff00000c9a42380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 31.676993] >fff00000c9a42400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 31.677032] ^ [ 31.677074] fff00000c9a42480: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 31.677127] fff00000c9a42500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.677164] ==================================================================
[ 25.137232] ================================================================== [ 25.138443] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 25.139051] Read of size 1 at addr ffff8881053b82a8 by task kunit_try_catch/236 [ 25.139501] [ 25.139594] CPU: 0 UID: 0 PID: 236 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) [ 25.139644] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.139655] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.139677] Call Trace: [ 25.139690] <TASK> [ 25.139706] dump_stack_lvl+0x73/0xb0 [ 25.139739] print_report+0xd1/0x640 [ 25.139760] ? __virt_addr_valid+0x1db/0x2d0 [ 25.139784] ? kmalloc_uaf2+0x4a8/0x520 [ 25.139850] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.139875] ? kmalloc_uaf2+0x4a8/0x520 [ 25.139894] kasan_report+0x141/0x180 [ 25.139941] ? kmalloc_uaf2+0x4a8/0x520 [ 25.139965] __asan_report_load1_noabort+0x18/0x20 [ 25.139988] kmalloc_uaf2+0x4a8/0x520 [ 25.140007] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 25.140027] ? __kasan_check_write+0x18/0x20 [ 25.140049] ? queued_spin_lock_slowpath+0x116/0xb40 [ 25.140083] ? irqentry_exit+0x2a/0x60 [ 25.140122] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 25.140146] ? trace_hardirqs_on+0x37/0xe0 [ 25.140170] ? __pfx_read_tsc+0x10/0x10 [ 25.140191] ? ktime_get_ts64+0x86/0x230 [ 25.140227] kunit_try_run_case+0x1a5/0x480 [ 25.140252] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.140274] ? queued_spin_lock_slowpath+0x116/0xb40 [ 25.140307] ? __kthread_parkme+0x82/0x180 [ 25.140327] ? preempt_count_sub+0x50/0x80 [ 25.140351] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.140373] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.140395] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.140416] kthread+0x337/0x6f0 [ 25.140435] ? trace_preempt_on+0x20/0xc0 [ 25.140456] ? __pfx_kthread+0x10/0x10 [ 25.140475] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.140504] ? calculate_sigpending+0x7b/0xa0 [ 25.140527] ? __pfx_kthread+0x10/0x10 [ 25.140547] ret_from_fork+0x116/0x1d0 [ 25.140565] ? __pfx_kthread+0x10/0x10 [ 25.140585] ret_from_fork_asm+0x1a/0x30 [ 25.140614] </TASK> [ 25.140626] [ 25.151849] Allocated by task 236: [ 25.151981] kasan_save_stack+0x45/0x70 [ 25.152336] kasan_save_track+0x18/0x40 [ 25.152513] kasan_save_alloc_info+0x3b/0x50 [ 25.152707] __kasan_kmalloc+0xb7/0xc0 [ 25.152877] __kmalloc_cache_noprof+0x189/0x420 [ 25.153076] kmalloc_uaf2+0xc6/0x520 [ 25.154075] kunit_try_run_case+0x1a5/0x480 [ 25.154363] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.154791] kthread+0x337/0x6f0 [ 25.155150] ret_from_fork+0x116/0x1d0 [ 25.155547] ret_from_fork_asm+0x1a/0x30 [ 25.155931] [ 25.156149] Freed by task 236: [ 25.156429] kasan_save_stack+0x45/0x70 [ 25.156732] kasan_save_track+0x18/0x40 [ 25.157006] kasan_save_free_info+0x3f/0x60 [ 25.157195] __kasan_slab_free+0x56/0x70 [ 25.157378] kfree+0x222/0x3f0 [ 25.157519] kmalloc_uaf2+0x14c/0x520 [ 25.157680] kunit_try_run_case+0x1a5/0x480 [ 25.158375] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.158678] kthread+0x337/0x6f0 [ 25.159227] ret_from_fork+0x116/0x1d0 [ 25.159375] ret_from_fork_asm+0x1a/0x30 [ 25.159570] [ 25.159651] The buggy address belongs to the object at ffff8881053b8280 [ 25.159651] which belongs to the cache kmalloc-64 of size 64 [ 25.160189] The buggy address is located 40 bytes inside of [ 25.160189] freed 64-byte region [ffff8881053b8280, ffff8881053b82c0) [ 25.160659] [ 25.160726] The buggy address belongs to the physical page: [ 25.160949] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053b8 [ 25.161252] flags: 0x200000000000000(node=0|zone=2) [ 25.161522] page_type: f5(slab) [ 25.161678] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 25.162076] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 25.162346] page dumped because: kasan: bad access detected [ 25.162594] [ 25.162686] Memory state around the buggy address: [ 25.162874] ffff8881053b8180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.163096] ffff8881053b8200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.163475] >ffff8881053b8280: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.163783] ^ [ 25.164018] ffff8881053b8300: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 25.164292] ffff8881053b8380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.164561] ==================================================================