Date
July 18, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.540552] ================================================================== [ 15.540812] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 15.541108] Read of size 1 at addr fff00000c3f548a8 by task kunit_try_catch/188 [ 15.541174] [ 15.541211] CPU: 1 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.541460] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.541531] Hardware name: linux,dummy-virt (DT) [ 15.541693] Call trace: [ 15.541755] show_stack+0x20/0x38 (C) [ 15.541889] dump_stack_lvl+0x8c/0xd0 [ 15.541946] print_report+0x118/0x5d0 [ 15.541995] kasan_report+0xdc/0x128 [ 15.542042] __asan_report_load1_noabort+0x20/0x30 [ 15.542095] kmalloc_uaf2+0x3f4/0x468 [ 15.542723] kunit_try_run_case+0x170/0x3f0 [ 15.543161] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.543545] kthread+0x328/0x630 [ 15.544039] ret_from_fork+0x10/0x20 [ 15.544312] [ 15.544611] Allocated by task 188: [ 15.544796] kasan_save_stack+0x3c/0x68 [ 15.545201] kasan_save_track+0x20/0x40 [ 15.545652] kasan_save_alloc_info+0x40/0x58 [ 15.545786] __kasan_kmalloc+0xd4/0xd8 [ 15.545903] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.545983] kmalloc_uaf2+0xc4/0x468 [ 15.546080] kunit_try_run_case+0x170/0x3f0 [ 15.546160] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.546308] kthread+0x328/0x630 [ 15.546406] ret_from_fork+0x10/0x20 [ 15.546499] [ 15.546521] Freed by task 188: [ 15.546549] kasan_save_stack+0x3c/0x68 [ 15.546604] kasan_save_track+0x20/0x40 [ 15.546942] kasan_save_free_info+0x4c/0x78 [ 15.547066] __kasan_slab_free+0x6c/0x98 [ 15.547155] kfree+0x214/0x3c8 [ 15.547617] kmalloc_uaf2+0x134/0x468 [ 15.547656] kunit_try_run_case+0x170/0x3f0 [ 15.547706] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.547759] kthread+0x328/0x630 [ 15.547818] ret_from_fork+0x10/0x20 [ 15.547879] [ 15.547903] The buggy address belongs to the object at fff00000c3f54880 [ 15.547903] which belongs to the cache kmalloc-64 of size 64 [ 15.547963] The buggy address is located 40 bytes inside of [ 15.547963] freed 64-byte region [fff00000c3f54880, fff00000c3f548c0) [ 15.548026] [ 15.548061] The buggy address belongs to the physical page: [ 15.548111] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f54 [ 15.548165] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.548213] page_type: f5(slab) [ 15.548258] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 15.548309] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 15.548600] page dumped because: kasan: bad access detected [ 15.548867] [ 15.548922] Memory state around the buggy address: [ 15.548974] fff00000c3f54780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.549043] fff00000c3f54800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.549416] >fff00000c3f54880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.549740] ^ [ 15.549961] fff00000c3f54900: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 15.550084] fff00000c3f54980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.550177] ==================================================================
[ 12.480894] ================================================================== [ 12.481517] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 12.481785] Read of size 1 at addr ffff8881029d4828 by task kunit_try_catch/207 [ 12.482083] [ 12.482190] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.482243] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.482254] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.482274] Call Trace: [ 12.482343] <TASK> [ 12.482358] dump_stack_lvl+0x73/0xb0 [ 12.482388] print_report+0xd1/0x610 [ 12.482410] ? __virt_addr_valid+0x1db/0x2d0 [ 12.482432] ? kmalloc_uaf2+0x4a8/0x520 [ 12.482451] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.482483] ? kmalloc_uaf2+0x4a8/0x520 [ 12.482503] kasan_report+0x141/0x180 [ 12.482524] ? kmalloc_uaf2+0x4a8/0x520 [ 12.482558] __asan_report_load1_noabort+0x18/0x20 [ 12.482582] kmalloc_uaf2+0x4a8/0x520 [ 12.482601] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 12.482631] ? finish_task_switch.isra.0+0x153/0x700 [ 12.482653] ? __switch_to+0x47/0xf50 [ 12.482679] ? __schedule+0x10cc/0x2b60 [ 12.482701] ? __pfx_read_tsc+0x10/0x10 [ 12.482720] ? ktime_get_ts64+0x86/0x230 [ 12.482743] kunit_try_run_case+0x1a5/0x480 [ 12.482766] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.482788] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.482811] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.482833] ? __kthread_parkme+0x82/0x180 [ 12.482863] ? preempt_count_sub+0x50/0x80 [ 12.482885] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.482908] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.482942] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.482966] kthread+0x337/0x6f0 [ 12.482984] ? trace_preempt_on+0x20/0xc0 [ 12.483006] ? __pfx_kthread+0x10/0x10 [ 12.483063] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.483085] ? calculate_sigpending+0x7b/0xa0 [ 12.483108] ? __pfx_kthread+0x10/0x10 [ 12.483129] ret_from_fork+0x116/0x1d0 [ 12.483147] ? __pfx_kthread+0x10/0x10 [ 12.483167] ret_from_fork_asm+0x1a/0x30 [ 12.483207] </TASK> [ 12.483218] [ 12.492140] Allocated by task 207: [ 12.492340] kasan_save_stack+0x45/0x70 [ 12.492835] kasan_save_track+0x18/0x40 [ 12.493182] kasan_save_alloc_info+0x3b/0x50 [ 12.493434] __kasan_kmalloc+0xb7/0xc0 [ 12.493613] __kmalloc_cache_noprof+0x189/0x420 [ 12.493821] kmalloc_uaf2+0xc6/0x520 [ 12.493990] kunit_try_run_case+0x1a5/0x480 [ 12.494175] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.494418] kthread+0x337/0x6f0 [ 12.495257] ret_from_fork+0x116/0x1d0 [ 12.495753] ret_from_fork_asm+0x1a/0x30 [ 12.496017] [ 12.496377] Freed by task 207: [ 12.496714] kasan_save_stack+0x45/0x70 [ 12.496904] kasan_save_track+0x18/0x40 [ 12.497525] kasan_save_free_info+0x3f/0x60 [ 12.497813] __kasan_slab_free+0x56/0x70 [ 12.498194] kfree+0x222/0x3f0 [ 12.498371] kmalloc_uaf2+0x14c/0x520 [ 12.498979] kunit_try_run_case+0x1a5/0x480 [ 12.499268] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.499582] kthread+0x337/0x6f0 [ 12.499740] ret_from_fork+0x116/0x1d0 [ 12.499908] ret_from_fork_asm+0x1a/0x30 [ 12.500529] [ 12.500742] The buggy address belongs to the object at ffff8881029d4800 [ 12.500742] which belongs to the cache kmalloc-64 of size 64 [ 12.501706] The buggy address is located 40 bytes inside of [ 12.501706] freed 64-byte region [ffff8881029d4800, ffff8881029d4840) [ 12.502422] [ 12.502737] The buggy address belongs to the physical page: [ 12.503356] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029d4 [ 12.504048] flags: 0x200000000000000(node=0|zone=2) [ 12.504743] page_type: f5(slab) [ 12.505002] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.505862] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.506552] page dumped because: kasan: bad access detected [ 12.506802] [ 12.506891] Memory state around the buggy address: [ 12.507384] ffff8881029d4700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.507847] ffff8881029d4780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.508550] >ffff8881029d4800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.508853] ^ [ 12.509421] ffff8881029d4880: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 12.509902] ffff8881029d4900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.510256] ==================================================================