Date
June 20, 2025, 12:38 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.894063] ================================================================== [ 31.894278] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 31.894433] Read of size 16 at addr fff00000c58d2980 by task kunit_try_catch/179 [ 31.894593] [ 31.894702] CPU: 1 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250620 #1 PREEMPT [ 31.895013] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.895107] Hardware name: linux,dummy-virt (DT) [ 31.895220] Call trace: [ 31.895305] show_stack+0x20/0x38 (C) [ 31.895494] dump_stack_lvl+0x8c/0xd0 [ 31.895670] print_report+0x118/0x608 [ 31.895798] kasan_report+0xdc/0x128 [ 31.895943] __asan_report_load16_noabort+0x20/0x30 [ 31.896111] kmalloc_uaf_16+0x3bc/0x438 [ 31.896264] kunit_try_run_case+0x170/0x3f0 [ 31.896427] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.896550] kthread+0x328/0x630 [ 31.896821] ret_from_fork+0x10/0x20 [ 31.897166] [ 31.897211] Allocated by task 179: [ 31.897315] kasan_save_stack+0x3c/0x68 [ 31.897441] kasan_save_track+0x20/0x40 [ 31.897552] kasan_save_alloc_info+0x40/0x58 [ 31.897742] __kasan_kmalloc+0xd4/0xd8 [ 31.897841] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.897929] kmalloc_uaf_16+0x140/0x438 [ 31.898012] kunit_try_run_case+0x170/0x3f0 [ 31.898157] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.898252] kthread+0x328/0x630 [ 31.898325] ret_from_fork+0x10/0x20 [ 31.898405] [ 31.898453] Freed by task 179: [ 31.898506] kasan_save_stack+0x3c/0x68 [ 31.898575] kasan_save_track+0x20/0x40 [ 31.898703] kasan_save_free_info+0x4c/0x78 [ 31.898804] __kasan_slab_free+0x6c/0x98 [ 31.898901] kfree+0x214/0x3c8 [ 31.899080] kmalloc_uaf_16+0x190/0x438 [ 31.899275] kunit_try_run_case+0x170/0x3f0 [ 31.899406] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.899547] kthread+0x328/0x630 [ 31.899725] ret_from_fork+0x10/0x20 [ 31.899854] [ 31.899900] The buggy address belongs to the object at fff00000c58d2980 [ 31.899900] which belongs to the cache kmalloc-16 of size 16 [ 31.900110] The buggy address is located 0 bytes inside of [ 31.900110] freed 16-byte region [fff00000c58d2980, fff00000c58d2990) [ 31.900268] [ 31.900356] The buggy address belongs to the physical page: [ 31.900430] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058d2 [ 31.900655] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.900848] page_type: f5(slab) [ 31.900991] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122 [ 31.901172] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 31.901321] page dumped because: kasan: bad access detected [ 31.901422] [ 31.901488] Memory state around the buggy address: [ 31.901602] fff00000c58d2880: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 31.901741] fff00000c58d2900: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 31.901825] >fff00000c58d2980: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.901896] ^ [ 31.901976] fff00000c58d2a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.902075] fff00000c58d2a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.902171] ==================================================================
[ 25.582982] ================================================================== [ 25.583522] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 25.584160] Read of size 16 at addr ffff8881022cf700 by task kunit_try_catch/197 [ 25.584424] [ 25.584651] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) [ 25.584747] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.584774] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.584819] Call Trace: [ 25.584844] <TASK> [ 25.584879] dump_stack_lvl+0x73/0xb0 [ 25.584943] print_report+0xd1/0x650 [ 25.584992] ? __virt_addr_valid+0x1db/0x2d0 [ 25.585041] ? kmalloc_uaf_16+0x47b/0x4c0 [ 25.585071] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.585099] ? kmalloc_uaf_16+0x47b/0x4c0 [ 25.585121] kasan_report+0x141/0x180 [ 25.585146] ? kmalloc_uaf_16+0x47b/0x4c0 [ 25.585190] __asan_report_load16_noabort+0x18/0x20 [ 25.585230] kmalloc_uaf_16+0x47b/0x4c0 [ 25.585271] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 25.585316] ? __schedule+0x10cc/0x2b60 [ 25.585362] ? __pfx_read_tsc+0x10/0x10 [ 25.585409] ? ktime_get_ts64+0x86/0x230 [ 25.585695] kunit_try_run_case+0x1a5/0x480 [ 25.585779] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.585831] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.585883] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.585935] ? __kthread_parkme+0x82/0x180 [ 25.585984] ? preempt_count_sub+0x50/0x80 [ 25.586050] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.586105] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.586169] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.586221] kthread+0x337/0x6f0 [ 25.586259] ? trace_preempt_on+0x20/0xc0 [ 25.586294] ? __pfx_kthread+0x10/0x10 [ 25.586317] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.586340] ? calculate_sigpending+0x7b/0xa0 [ 25.586366] ? __pfx_kthread+0x10/0x10 [ 25.586389] ret_from_fork+0x116/0x1d0 [ 25.586410] ? __pfx_kthread+0x10/0x10 [ 25.586432] ret_from_fork_asm+0x1a/0x30 [ 25.586490] </TASK> [ 25.586504] [ 25.598394] Allocated by task 197: [ 25.598685] kasan_save_stack+0x45/0x70 [ 25.598959] kasan_save_track+0x18/0x40 [ 25.599216] kasan_save_alloc_info+0x3b/0x50 [ 25.599554] __kasan_kmalloc+0xb7/0xc0 [ 25.599857] __kmalloc_cache_noprof+0x189/0x420 [ 25.600308] kmalloc_uaf_16+0x15b/0x4c0 [ 25.600702] kunit_try_run_case+0x1a5/0x480 [ 25.601135] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.601543] kthread+0x337/0x6f0 [ 25.601878] ret_from_fork+0x116/0x1d0 [ 25.602265] ret_from_fork_asm+0x1a/0x30 [ 25.602601] [ 25.602802] Freed by task 197: [ 25.603064] kasan_save_stack+0x45/0x70 [ 25.603387] kasan_save_track+0x18/0x40 [ 25.603752] kasan_save_free_info+0x3f/0x60 [ 25.604052] __kasan_slab_free+0x56/0x70 [ 25.604471] kfree+0x222/0x3f0 [ 25.604662] kmalloc_uaf_16+0x1d6/0x4c0 [ 25.604861] kunit_try_run_case+0x1a5/0x480 [ 25.605291] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.605770] kthread+0x337/0x6f0 [ 25.605991] ret_from_fork+0x116/0x1d0 [ 25.606277] ret_from_fork_asm+0x1a/0x30 [ 25.606627] [ 25.606801] The buggy address belongs to the object at ffff8881022cf700 [ 25.606801] which belongs to the cache kmalloc-16 of size 16 [ 25.607550] The buggy address is located 0 bytes inside of [ 25.607550] freed 16-byte region [ffff8881022cf700, ffff8881022cf710) [ 25.608114] [ 25.608291] The buggy address belongs to the physical page: [ 25.608643] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1022cf [ 25.608950] flags: 0x200000000000000(node=0|zone=2) [ 25.609200] page_type: f5(slab) [ 25.609367] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 25.609648] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 25.610218] page dumped because: kasan: bad access detected [ 25.610722] [ 25.610922] Memory state around the buggy address: [ 25.611438] ffff8881022cf600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 25.612015] ffff8881022cf680: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 25.612591] >ffff8881022cf700: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.612910] ^ [ 25.613071] ffff8881022cf780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.613739] ffff8881022cf800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.614340] ==================================================================