Date
June 17, 2025, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.829362] ================================================================== [ 16.829426] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 16.829483] Read of size 16 at addr fff00000c11936c0 by task kunit_try_catch/177 [ 16.829534] [ 16.829998] CPU: 1 UID: 0 PID: 177 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT [ 16.830208] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.830277] Hardware name: linux,dummy-virt (DT) [ 16.830477] Call trace: [ 16.830503] show_stack+0x20/0x38 (C) [ 16.830560] dump_stack_lvl+0x8c/0xd0 [ 16.830612] print_report+0x118/0x608 [ 16.830659] kasan_report+0xdc/0x128 [ 16.830804] __asan_report_load16_noabort+0x20/0x30 [ 16.830884] kmalloc_uaf_16+0x3bc/0x438 [ 16.831012] kunit_try_run_case+0x170/0x3f0 [ 16.831072] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.831268] kthread+0x328/0x630 [ 16.831322] ret_from_fork+0x10/0x20 [ 16.831492] [ 16.831552] Allocated by task 177: [ 16.831652] kasan_save_stack+0x3c/0x68 [ 16.831696] kasan_save_track+0x20/0x40 [ 16.831871] kasan_save_alloc_info+0x40/0x58 [ 16.831919] __kasan_kmalloc+0xd4/0xd8 [ 16.832224] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.832301] kmalloc_uaf_16+0x140/0x438 [ 16.832404] kunit_try_run_case+0x170/0x3f0 [ 16.832481] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.832525] kthread+0x328/0x630 [ 16.832843] ret_from_fork+0x10/0x20 [ 16.832971] [ 16.833043] Freed by task 177: [ 16.833134] kasan_save_stack+0x3c/0x68 [ 16.833212] kasan_save_track+0x20/0x40 [ 16.833377] kasan_save_free_info+0x4c/0x78 [ 16.833601] __kasan_slab_free+0x6c/0x98 [ 16.833700] kfree+0x214/0x3c8 [ 16.833736] kmalloc_uaf_16+0x190/0x438 [ 16.833800] kunit_try_run_case+0x170/0x3f0 [ 16.834113] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.834212] kthread+0x328/0x630 [ 16.834331] ret_from_fork+0x10/0x20 [ 16.834381] [ 16.834400] The buggy address belongs to the object at fff00000c11936c0 [ 16.834400] which belongs to the cache kmalloc-16 of size 16 [ 16.834464] The buggy address is located 0 bytes inside of [ 16.834464] freed 16-byte region [fff00000c11936c0, fff00000c11936d0) [ 16.834669] [ 16.834832] The buggy address belongs to the physical page: [ 16.834941] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101193 [ 16.835027] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.835093] page_type: f5(slab) [ 16.835294] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122 [ 16.835359] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.835506] page dumped because: kasan: bad access detected [ 16.835586] [ 16.835695] Memory state around the buggy address: [ 16.835754] fff00000c1193580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.836064] fff00000c1193600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.836145] >fff00000c1193680: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 16.836281] ^ [ 16.836347] fff00000c1193700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.836470] fff00000c1193780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.836562] ==================================================================
[ 17.926861] ================================================================== [ 17.928096] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 17.928904] Read of size 16 at addr ffff888102264540 by task kunit_try_catch/195 [ 17.930164] [ 17.930435] CPU: 1 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) [ 17.930561] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.930597] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 17.930655] Call Trace: [ 17.930693] <TASK> [ 17.930738] dump_stack_lvl+0x73/0xb0 [ 17.930822] print_report+0xd1/0x650 [ 17.930917] ? __virt_addr_valid+0x1db/0x2d0 [ 17.930995] ? kmalloc_uaf_16+0x47b/0x4c0 [ 17.931064] ? kasan_complete_mode_report_info+0x64/0x200 [ 17.931139] ? kmalloc_uaf_16+0x47b/0x4c0 [ 17.931207] kasan_report+0x141/0x180 [ 17.931319] ? kmalloc_uaf_16+0x47b/0x4c0 [ 17.931421] __asan_report_load16_noabort+0x18/0x20 [ 17.931461] kmalloc_uaf_16+0x47b/0x4c0 [ 17.931491] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 17.931523] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 17.931568] kunit_try_run_case+0x1a5/0x480 [ 17.931605] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.931636] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 17.931666] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 17.931701] ? __kthread_parkme+0x82/0x180 [ 17.931728] ? preempt_count_sub+0x50/0x80 [ 17.931759] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.931792] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.931822] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 17.931882] kthread+0x337/0x6f0 [ 17.931910] ? trace_preempt_on+0x20/0xc0 [ 17.931945] ? __pfx_kthread+0x10/0x10 [ 17.931972] ? _raw_spin_unlock_irq+0x47/0x80 [ 17.932005] ? calculate_sigpending+0x7b/0xa0 [ 17.932039] ? __pfx_kthread+0x10/0x10 [ 17.932067] ret_from_fork+0x116/0x1d0 [ 17.932092] ? __pfx_kthread+0x10/0x10 [ 17.932119] ret_from_fork_asm+0x1a/0x30 [ 17.932159] </TASK> [ 17.932174] [ 17.950943] Allocated by task 195: [ 17.951572] kasan_save_stack+0x45/0x70 [ 17.952012] kasan_save_track+0x18/0x40 [ 17.952640] kasan_save_alloc_info+0x3b/0x50 [ 17.952970] __kasan_kmalloc+0xb7/0xc0 [ 17.953649] __kmalloc_cache_noprof+0x189/0x420 [ 17.954410] kmalloc_uaf_16+0x15b/0x4c0 [ 17.954986] kunit_try_run_case+0x1a5/0x480 [ 17.955570] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.956352] kthread+0x337/0x6f0 [ 17.956862] ret_from_fork+0x116/0x1d0 [ 17.957207] ret_from_fork_asm+0x1a/0x30 [ 17.957537] [ 17.957690] Freed by task 195: [ 17.957948] kasan_save_stack+0x45/0x70 [ 17.959496] kasan_save_track+0x18/0x40 [ 17.959924] kasan_save_free_info+0x3f/0x60 [ 17.960396] __kasan_slab_free+0x56/0x70 [ 17.960727] kfree+0x222/0x3f0 [ 17.961038] kmalloc_uaf_16+0x1d6/0x4c0 [ 17.961488] kunit_try_run_case+0x1a5/0x480 [ 17.962105] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.962755] kthread+0x337/0x6f0 [ 17.963143] ret_from_fork+0x116/0x1d0 [ 17.963724] ret_from_fork_asm+0x1a/0x30 [ 17.964185] [ 17.964408] The buggy address belongs to the object at ffff888102264540 [ 17.964408] which belongs to the cache kmalloc-16 of size 16 [ 17.965656] The buggy address is located 0 bytes inside of [ 17.965656] freed 16-byte region [ffff888102264540, ffff888102264550) [ 17.967013] [ 17.967284] The buggy address belongs to the physical page: [ 17.968272] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102264 [ 17.968768] flags: 0x200000000000000(node=0|zone=2) [ 17.969484] page_type: f5(slab) [ 17.969874] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 17.970763] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.971639] page dumped because: kasan: bad access detected [ 17.972077] [ 17.972263] Memory state around the buggy address: [ 17.973100] ffff888102264400: fa fb fc fc 00 00 fc fc fa fb fc fc fa fb fc fc [ 17.973624] ffff888102264480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.974155] >ffff888102264500: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 17.974697] ^ [ 17.975630] ffff888102264580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.976196] ffff888102264600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.976826] ==================================================================