Date
July 10, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.988006] ================================================================== [ 17.988120] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340 [ 17.988201] Read of size 1 at addr fff00000c5a29c00 by task kunit_try_catch/227 [ 17.988251] [ 17.988318] CPU: 0 UID: 0 PID: 227 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.988430] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.988619] Hardware name: linux,dummy-virt (DT) [ 17.988685] Call trace: [ 17.988711] show_stack+0x20/0x38 (C) [ 17.988775] dump_stack_lvl+0x8c/0xd0 [ 17.988850] print_report+0x118/0x608 [ 17.988900] kasan_report+0xdc/0x128 [ 17.989040] __asan_report_load1_noabort+0x20/0x30 [ 17.989199] mempool_uaf_helper+0x314/0x340 [ 17.989267] mempool_kmalloc_uaf+0xc4/0x120 [ 17.989332] kunit_try_run_case+0x170/0x3f0 [ 17.989385] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.989440] kthread+0x328/0x630 [ 17.989522] ret_from_fork+0x10/0x20 [ 17.989572] [ 17.989590] Allocated by task 227: [ 17.989638] kasan_save_stack+0x3c/0x68 [ 17.989987] kasan_save_track+0x20/0x40 [ 17.990091] kasan_save_alloc_info+0x40/0x58 [ 17.990159] __kasan_mempool_unpoison_object+0x11c/0x180 [ 17.990232] remove_element+0x130/0x1f8 [ 17.990274] mempool_alloc_preallocated+0x58/0xc0 [ 17.990314] mempool_uaf_helper+0xa4/0x340 [ 17.990352] mempool_kmalloc_uaf+0xc4/0x120 [ 17.990391] kunit_try_run_case+0x170/0x3f0 [ 17.990554] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.990699] kthread+0x328/0x630 [ 17.990814] ret_from_fork+0x10/0x20 [ 17.990881] [ 17.990933] Freed by task 227: [ 17.991015] kasan_save_stack+0x3c/0x68 [ 17.991110] kasan_save_track+0x20/0x40 [ 17.991197] kasan_save_free_info+0x4c/0x78 [ 17.991281] __kasan_mempool_poison_object+0xc0/0x150 [ 17.991324] mempool_free+0x28c/0x328 [ 17.991373] mempool_uaf_helper+0x104/0x340 [ 17.991692] mempool_kmalloc_uaf+0xc4/0x120 [ 17.991827] kunit_try_run_case+0x170/0x3f0 [ 17.991918] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.991982] kthread+0x328/0x630 [ 17.992017] ret_from_fork+0x10/0x20 [ 17.992053] [ 17.992115] The buggy address belongs to the object at fff00000c5a29c00 [ 17.992115] which belongs to the cache kmalloc-128 of size 128 [ 17.992180] The buggy address is located 0 bytes inside of [ 17.992180] freed 128-byte region [fff00000c5a29c00, fff00000c5a29c80) [ 17.992250] [ 17.992272] The buggy address belongs to the physical page: [ 17.992307] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a29 [ 17.992362] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.992426] page_type: f5(slab) [ 17.992476] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 17.992535] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 17.992576] page dumped because: kasan: bad access detected [ 17.992625] [ 17.992643] Memory state around the buggy address: [ 17.992677] fff00000c5a29b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.992720] fff00000c5a29b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.992763] >fff00000c5a29c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.992800] ^ [ 17.992828] fff00000c5a29c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.992878] fff00000c5a29d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 17.992918] ================================================================== [ 18.012792] ================================================================== [ 18.012868] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340 [ 18.013181] Read of size 1 at addr fff00000c6457240 by task kunit_try_catch/231 [ 18.013246] [ 18.013285] CPU: 0 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 18.013371] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.013664] Hardware name: linux,dummy-virt (DT) [ 18.013737] Call trace: [ 18.013905] show_stack+0x20/0x38 (C) [ 18.013985] dump_stack_lvl+0x8c/0xd0 [ 18.014123] print_report+0x118/0x608 [ 18.014221] kasan_report+0xdc/0x128 [ 18.014349] __asan_report_load1_noabort+0x20/0x30 [ 18.014420] mempool_uaf_helper+0x314/0x340 [ 18.014468] mempool_slab_uaf+0xc0/0x118 [ 18.014533] kunit_try_run_case+0x170/0x3f0 [ 18.014583] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.014761] kthread+0x328/0x630 [ 18.014812] ret_from_fork+0x10/0x20 [ 18.014955] [ 18.015015] Allocated by task 231: [ 18.015109] kasan_save_stack+0x3c/0x68 [ 18.015201] kasan_save_track+0x20/0x40 [ 18.015288] kasan_save_alloc_info+0x40/0x58 [ 18.015341] __kasan_mempool_unpoison_object+0xbc/0x180 [ 18.015642] remove_element+0x16c/0x1f8 [ 18.015713] mempool_alloc_preallocated+0x58/0xc0 [ 18.015824] mempool_uaf_helper+0xa4/0x340 [ 18.015915] mempool_slab_uaf+0xc0/0x118 [ 18.016012] kunit_try_run_case+0x170/0x3f0 [ 18.016156] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.016309] kthread+0x328/0x630 [ 18.016368] ret_from_fork+0x10/0x20 [ 18.016474] [ 18.016560] Freed by task 231: [ 18.016617] kasan_save_stack+0x3c/0x68 [ 18.016656] kasan_save_track+0x20/0x40 [ 18.016930] kasan_save_free_info+0x4c/0x78 [ 18.017026] __kasan_mempool_poison_object+0xc0/0x150 [ 18.017124] mempool_free+0x28c/0x328 [ 18.017252] mempool_uaf_helper+0x104/0x340 [ 18.017327] mempool_slab_uaf+0xc0/0x118 [ 18.017443] kunit_try_run_case+0x170/0x3f0 [ 18.017532] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.017666] kthread+0x328/0x630 [ 18.017723] ret_from_fork+0x10/0x20 [ 18.017803] [ 18.017837] The buggy address belongs to the object at fff00000c6457240 [ 18.017837] which belongs to the cache test_cache of size 123 [ 18.017933] The buggy address is located 0 bytes inside of [ 18.017933] freed 123-byte region [fff00000c6457240, fff00000c64572bb) [ 18.017996] [ 18.018035] The buggy address belongs to the physical page: [ 18.018070] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106457 [ 18.018402] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.018469] page_type: f5(slab) [ 18.018511] raw: 0bfffe0000000000 fff00000c5945b40 dead000000000122 0000000000000000 [ 18.018560] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000 [ 18.018611] page dumped because: kasan: bad access detected [ 18.018649] [ 18.018668] Memory state around the buggy address: [ 18.018700] fff00000c6457100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.018742] fff00000c6457180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.018785] >fff00000c6457200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 18.018822] ^ [ 18.018854] fff00000c6457280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.018895] fff00000c6457300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.018933] ==================================================================
[ 14.269035] ================================================================== [ 14.269496] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400 [ 14.269844] Read of size 1 at addr ffff8881039ea240 by task kunit_try_catch/249 [ 14.270107] [ 14.270217] CPU: 0 UID: 0 PID: 249 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.270260] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.270410] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.270432] Call Trace: [ 14.270444] <TASK> [ 14.270781] dump_stack_lvl+0x73/0xb0 [ 14.270812] print_report+0xd1/0x650 [ 14.270834] ? __virt_addr_valid+0x1db/0x2d0 [ 14.270856] ? mempool_uaf_helper+0x392/0x400 [ 14.270878] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.270902] ? mempool_uaf_helper+0x392/0x400 [ 14.270925] kasan_report+0x141/0x180 [ 14.270946] ? mempool_uaf_helper+0x392/0x400 [ 14.270973] __asan_report_load1_noabort+0x18/0x20 [ 14.270999] mempool_uaf_helper+0x392/0x400 [ 14.271022] ? __pfx_mempool_uaf_helper+0x10/0x10 [ 14.271045] ? update_load_avg+0x1be/0x21b0 [ 14.271071] ? finish_task_switch.isra.0+0x153/0x700 [ 14.271097] mempool_slab_uaf+0xea/0x140 [ 14.271120] ? __pfx_mempool_slab_uaf+0x10/0x10 [ 14.271146] ? __pfx_mempool_alloc_slab+0x10/0x10 [ 14.271172] ? __pfx_mempool_free_slab+0x10/0x10 [ 14.271198] ? __pfx_read_tsc+0x10/0x10 [ 14.271218] ? ktime_get_ts64+0x86/0x230 [ 14.271243] kunit_try_run_case+0x1a5/0x480 [ 14.271267] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.271290] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.271315] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.271339] ? __kthread_parkme+0x82/0x180 [ 14.271396] ? preempt_count_sub+0x50/0x80 [ 14.271426] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.271452] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.271477] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.271503] kthread+0x337/0x6f0 [ 14.271521] ? trace_preempt_on+0x20/0xc0 [ 14.271689] ? __pfx_kthread+0x10/0x10 [ 14.271710] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.271732] ? calculate_sigpending+0x7b/0xa0 [ 14.271757] ? __pfx_kthread+0x10/0x10 [ 14.271778] ret_from_fork+0x116/0x1d0 [ 14.271796] ? __pfx_kthread+0x10/0x10 [ 14.271817] ret_from_fork_asm+0x1a/0x30 [ 14.271848] </TASK> [ 14.271858] [ 14.282087] Allocated by task 249: [ 14.282273] kasan_save_stack+0x45/0x70 [ 14.282529] kasan_save_track+0x18/0x40 [ 14.282722] kasan_save_alloc_info+0x3b/0x50 [ 14.283016] __kasan_mempool_unpoison_object+0x1bb/0x200 [ 14.283198] remove_element+0x11e/0x190 [ 14.283638] mempool_alloc_preallocated+0x4d/0x90 [ 14.283968] mempool_uaf_helper+0x96/0x400 [ 14.284194] mempool_slab_uaf+0xea/0x140 [ 14.284484] kunit_try_run_case+0x1a5/0x480 [ 14.284712] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.284943] kthread+0x337/0x6f0 [ 14.285067] ret_from_fork+0x116/0x1d0 [ 14.285258] ret_from_fork_asm+0x1a/0x30 [ 14.285657] [ 14.285751] Freed by task 249: [ 14.285980] kasan_save_stack+0x45/0x70 [ 14.286127] kasan_save_track+0x18/0x40 [ 14.286261] kasan_save_free_info+0x3f/0x60 [ 14.286625] __kasan_mempool_poison_object+0x131/0x1d0 [ 14.286985] mempool_free+0x2ec/0x380 [ 14.287218] mempool_uaf_helper+0x11a/0x400 [ 14.287607] mempool_slab_uaf+0xea/0x140 [ 14.287754] kunit_try_run_case+0x1a5/0x480 [ 14.287962] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.288271] kthread+0x337/0x6f0 [ 14.288560] ret_from_fork+0x116/0x1d0 [ 14.289113] ret_from_fork_asm+0x1a/0x30 [ 14.289262] [ 14.289367] The buggy address belongs to the object at ffff8881039ea240 [ 14.289367] which belongs to the cache test_cache of size 123 [ 14.290337] The buggy address is located 0 bytes inside of [ 14.290337] freed 123-byte region [ffff8881039ea240, ffff8881039ea2bb) [ 14.291130] [ 14.291250] The buggy address belongs to the physical page: [ 14.291531] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ea [ 14.291998] flags: 0x200000000000000(node=0|zone=2) [ 14.292262] page_type: f5(slab) [ 14.292425] raw: 0200000000000000 ffff8881027b7280 dead000000000122 0000000000000000 [ 14.292817] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000 [ 14.293155] page dumped because: kasan: bad access detected [ 14.293437] [ 14.293775] Memory state around the buggy address: [ 14.294224] ffff8881039ea100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 14.294825] ffff8881039ea180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 14.295232] >ffff8881039ea200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 14.295743] ^ [ 14.296249] ffff8881039ea280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 14.296941] ffff8881039ea300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.297232] ================================================================== [ 14.202610] ================================================================== [ 14.203089] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400 [ 14.203381] Read of size 1 at addr ffff888102d5fb00 by task kunit_try_catch/244 [ 14.203697] [ 14.203812] CPU: 1 UID: 0 PID: 244 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.203854] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.203866] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.203886] Call Trace: [ 14.203897] <TASK> [ 14.203912] dump_stack_lvl+0x73/0xb0 [ 14.203954] print_report+0xd1/0x650 [ 14.204151] ? __virt_addr_valid+0x1db/0x2d0 [ 14.204182] ? mempool_uaf_helper+0x392/0x400 [ 14.204205] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.204228] ? mempool_uaf_helper+0x392/0x400 [ 14.204250] kasan_report+0x141/0x180 [ 14.204272] ? mempool_uaf_helper+0x392/0x400 [ 14.204300] __asan_report_load1_noabort+0x18/0x20 [ 14.204325] mempool_uaf_helper+0x392/0x400 [ 14.204348] ? __pfx_mempool_uaf_helper+0x10/0x10 [ 14.204384] ? update_load_avg+0x1be/0x21b0 [ 14.204408] ? update_load_avg+0x1be/0x21b0 [ 14.204429] ? update_curr+0x80/0x810 [ 14.204451] ? finish_task_switch.isra.0+0x153/0x700 [ 14.204477] mempool_kmalloc_uaf+0xef/0x140 [ 14.204499] ? __pfx_mempool_kmalloc_uaf+0x10/0x10 [ 14.204525] ? __pfx_mempool_kmalloc+0x10/0x10 [ 14.204549] ? __pfx_mempool_kfree+0x10/0x10 [ 14.204574] ? __pfx_read_tsc+0x10/0x10 [ 14.204596] ? ktime_get_ts64+0x86/0x230 [ 14.204622] kunit_try_run_case+0x1a5/0x480 [ 14.204647] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.204683] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.204708] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.204732] ? __kthread_parkme+0x82/0x180 [ 14.204753] ? preempt_count_sub+0x50/0x80 [ 14.204776] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.204801] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.204826] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.204853] kthread+0x337/0x6f0 [ 14.204872] ? trace_preempt_on+0x20/0xc0 [ 14.204894] ? __pfx_kthread+0x10/0x10 [ 14.204914] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.204935] ? calculate_sigpending+0x7b/0xa0 [ 14.204959] ? __pfx_kthread+0x10/0x10 [ 14.204981] ret_from_fork+0x116/0x1d0 [ 14.204999] ? __pfx_kthread+0x10/0x10 [ 14.205020] ret_from_fork_asm+0x1a/0x30 [ 14.205051] </TASK> [ 14.205061] [ 14.212958] Allocated by task 244: [ 14.213139] kasan_save_stack+0x45/0x70 [ 14.213341] kasan_save_track+0x18/0x40 [ 14.213626] kasan_save_alloc_info+0x3b/0x50 [ 14.213816] __kasan_mempool_unpoison_object+0x1a9/0x200 [ 14.214015] remove_element+0x11e/0x190 [ 14.214208] mempool_alloc_preallocated+0x4d/0x90 [ 14.214515] mempool_uaf_helper+0x96/0x400 [ 14.214670] mempool_kmalloc_uaf+0xef/0x140 [ 14.214889] kunit_try_run_case+0x1a5/0x480 [ 14.215048] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.215224] kthread+0x337/0x6f0 [ 14.215366] ret_from_fork+0x116/0x1d0 [ 14.216644] ret_from_fork_asm+0x1a/0x30 [ 14.216810] [ 14.216882] Freed by task 244: [ 14.216993] kasan_save_stack+0x45/0x70 [ 14.217129] kasan_save_track+0x18/0x40 [ 14.217265] kasan_save_free_info+0x3f/0x60 [ 14.217453] __kasan_mempool_poison_object+0x131/0x1d0 [ 14.217697] mempool_free+0x2ec/0x380 [ 14.220014] mempool_uaf_helper+0x11a/0x400 [ 14.221061] mempool_kmalloc_uaf+0xef/0x140 [ 14.222073] kunit_try_run_case+0x1a5/0x480 [ 14.222236] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.222439] kthread+0x337/0x6f0 [ 14.222569] ret_from_fork+0x116/0x1d0 [ 14.222703] ret_from_fork_asm+0x1a/0x30 [ 14.222844] [ 14.222916] The buggy address belongs to the object at ffff888102d5fb00 [ 14.222916] which belongs to the cache kmalloc-128 of size 128 [ 14.223281] The buggy address is located 0 bytes inside of [ 14.223281] freed 128-byte region [ffff888102d5fb00, ffff888102d5fb80) [ 14.225216] [ 14.225302] The buggy address belongs to the physical page: [ 14.225761] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d5f [ 14.226643] flags: 0x200000000000000(node=0|zone=2) [ 14.227138] page_type: f5(slab) [ 14.227538] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 14.227937] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 14.228163] page dumped because: kasan: bad access detected [ 14.228333] [ 14.228685] Memory state around the buggy address: [ 14.229119] ffff888102d5fa00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 14.229901] ffff888102d5fa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.230661] >ffff888102d5fb00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 14.231155] ^ [ 14.231269] ffff888102d5fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.231562] ffff888102d5fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 14.232256] ==================================================================