Date
July 16, 2025, 3:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.770269] ================================================================== [ 16.770569] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 16.770629] Read of size 1 at addr fff00000c6adf928 by task kunit_try_catch/188 [ 16.770686] [ 16.770945] CPU: 1 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 16.771046] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.771074] Hardware name: linux,dummy-virt (DT) [ 16.771125] Call trace: [ 16.771164] show_stack+0x20/0x38 (C) [ 16.771216] dump_stack_lvl+0x8c/0xd0 [ 16.771308] print_report+0x118/0x5d0 [ 16.771420] kasan_report+0xdc/0x128 [ 16.771548] __asan_report_load1_noabort+0x20/0x30 [ 16.771650] kmalloc_uaf2+0x3f4/0x468 [ 16.771727] kunit_try_run_case+0x170/0x3f0 [ 16.771800] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.771927] kthread+0x328/0x630 [ 16.772015] ret_from_fork+0x10/0x20 [ 16.772136] [ 16.772175] Allocated by task 188: [ 16.772201] kasan_save_stack+0x3c/0x68 [ 16.772242] kasan_save_track+0x20/0x40 [ 16.772279] kasan_save_alloc_info+0x40/0x58 [ 16.772320] __kasan_kmalloc+0xd4/0xd8 [ 16.772356] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.772466] kmalloc_uaf2+0xc4/0x468 [ 16.772509] kunit_try_run_case+0x170/0x3f0 [ 16.772548] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.772592] kthread+0x328/0x630 [ 16.772695] ret_from_fork+0x10/0x20 [ 16.772780] [ 16.772798] Freed by task 188: [ 16.772858] kasan_save_stack+0x3c/0x68 [ 16.773003] kasan_save_track+0x20/0x40 [ 16.773145] kasan_save_free_info+0x4c/0x78 [ 16.773211] __kasan_slab_free+0x6c/0x98 [ 16.773250] kfree+0x214/0x3c8 [ 16.773299] kmalloc_uaf2+0x134/0x468 [ 16.773334] kunit_try_run_case+0x170/0x3f0 [ 16.773371] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.773413] kthread+0x328/0x630 [ 16.773578] ret_from_fork+0x10/0x20 [ 16.773669] [ 16.773698] The buggy address belongs to the object at fff00000c6adf900 [ 16.773698] which belongs to the cache kmalloc-64 of size 64 [ 16.773815] The buggy address is located 40 bytes inside of [ 16.773815] freed 64-byte region [fff00000c6adf900, fff00000c6adf940) [ 16.773928] [ 16.773997] The buggy address belongs to the physical page: [ 16.774088] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106adf [ 16.774154] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.774485] page_type: f5(slab) [ 16.774596] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 16.774669] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 16.774722] page dumped because: kasan: bad access detected [ 16.774753] [ 16.774772] Memory state around the buggy address: [ 16.774802] fff00000c6adf800: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 16.774846] fff00000c6adf880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.775027] >fff00000c6adf900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.775098] ^ [ 16.775189] fff00000c6adf980: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 16.775322] fff00000c6adfa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.775435] ==================================================================
[ 12.883377] ================================================================== [ 12.884161] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 12.884732] Read of size 1 at addr ffff88810306b128 by task kunit_try_catch/205 [ 12.885223] [ 12.885639] CPU: 0 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.885821] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.885834] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.885855] Call Trace: [ 12.885868] <TASK> [ 12.885884] dump_stack_lvl+0x73/0xb0 [ 12.885918] print_report+0xd1/0x610 [ 12.885942] ? __virt_addr_valid+0x1db/0x2d0 [ 12.885987] ? kmalloc_uaf2+0x4a8/0x520 [ 12.886007] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.886032] ? kmalloc_uaf2+0x4a8/0x520 [ 12.886052] kasan_report+0x141/0x180 [ 12.886074] ? kmalloc_uaf2+0x4a8/0x520 [ 12.886098] __asan_report_load1_noabort+0x18/0x20 [ 12.886123] kmalloc_uaf2+0x4a8/0x520 [ 12.886144] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 12.886163] ? finish_task_switch.isra.0+0x153/0x700 [ 12.886188] ? __switch_to+0x47/0xf50 [ 12.886214] ? __schedule+0x10cc/0x2b60 [ 12.886237] ? __pfx_read_tsc+0x10/0x10 [ 12.886259] ? ktime_get_ts64+0x86/0x230 [ 12.886284] kunit_try_run_case+0x1a5/0x480 [ 12.886309] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.886332] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.886357] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.886381] ? __kthread_parkme+0x82/0x180 [ 12.886402] ? preempt_count_sub+0x50/0x80 [ 12.886440] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.886465] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.886490] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.886515] kthread+0x337/0x6f0 [ 12.886535] ? trace_preempt_on+0x20/0xc0 [ 12.886561] ? __pfx_kthread+0x10/0x10 [ 12.886582] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.886603] ? calculate_sigpending+0x7b/0xa0 [ 12.886628] ? __pfx_kthread+0x10/0x10 [ 12.886649] ret_from_fork+0x116/0x1d0 [ 12.886668] ? __pfx_kthread+0x10/0x10 [ 12.886689] ret_from_fork_asm+0x1a/0x30 [ 12.886720] </TASK> [ 12.886731] [ 12.898348] Allocated by task 205: [ 12.898752] kasan_save_stack+0x45/0x70 [ 12.899240] kasan_save_track+0x18/0x40 [ 12.899574] kasan_save_alloc_info+0x3b/0x50 [ 12.899906] __kasan_kmalloc+0xb7/0xc0 [ 12.900299] __kmalloc_cache_noprof+0x189/0x420 [ 12.900579] kmalloc_uaf2+0xc6/0x520 [ 12.900777] kunit_try_run_case+0x1a5/0x480 [ 12.900978] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.901223] kthread+0x337/0x6f0 [ 12.901379] ret_from_fork+0x116/0x1d0 [ 12.901531] ret_from_fork_asm+0x1a/0x30 [ 12.901716] [ 12.902363] Freed by task 205: [ 12.902663] kasan_save_stack+0x45/0x70 [ 12.903182] kasan_save_track+0x18/0x40 [ 12.903532] kasan_save_free_info+0x3f/0x60 [ 12.903858] __kasan_slab_free+0x56/0x70 [ 12.904264] kfree+0x222/0x3f0 [ 12.904575] kmalloc_uaf2+0x14c/0x520 [ 12.904889] kunit_try_run_case+0x1a5/0x480 [ 12.905284] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.905527] kthread+0x337/0x6f0 [ 12.905709] ret_from_fork+0x116/0x1d0 [ 12.905895] ret_from_fork_asm+0x1a/0x30 [ 12.906067] [ 12.906167] The buggy address belongs to the object at ffff88810306b100 [ 12.906167] which belongs to the cache kmalloc-64 of size 64 [ 12.906650] The buggy address is located 40 bytes inside of [ 12.906650] freed 64-byte region [ffff88810306b100, ffff88810306b140) [ 12.907872] [ 12.908184] The buggy address belongs to the physical page: [ 12.908559] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10306b [ 12.909094] flags: 0x200000000000000(node=0|zone=2) [ 12.909407] page_type: f5(slab) [ 12.909703] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.910248] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.910718] page dumped because: kasan: bad access detected [ 12.911318] [ 12.911423] Memory state around the buggy address: [ 12.911838] ffff88810306b000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.912348] ffff88810306b080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.912809] >ffff88810306b100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.913325] ^ [ 12.913687] ffff88810306b180: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 12.914170] ffff88810306b200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.914602] ==================================================================