Date
July 9, 2025, 11:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.706096] ================================================================== [ 16.706540] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 16.706769] Read of size 16 at addr fff00000c61bc440 by task kunit_try_catch/168 [ 16.706830] [ 16.706869] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.706950] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.706975] Hardware name: linux,dummy-virt (DT) [ 16.707006] Call trace: [ 16.707028] show_stack+0x20/0x38 (C) [ 16.707080] dump_stack_lvl+0x8c/0xd0 [ 16.707140] print_report+0x118/0x608 [ 16.707186] kasan_report+0xdc/0x128 [ 16.707230] __asan_report_load16_noabort+0x20/0x30 [ 16.707280] kmalloc_uaf_16+0x3bc/0x438 [ 16.707324] kunit_try_run_case+0x170/0x3f0 [ 16.707370] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.707421] kthread+0x328/0x630 [ 16.707463] ret_from_fork+0x10/0x20 [ 16.707513] [ 16.707530] Allocated by task 168: [ 16.707562] kasan_save_stack+0x3c/0x68 [ 16.707638] kasan_save_track+0x20/0x40 [ 16.708095] kasan_save_alloc_info+0x40/0x58 [ 16.708263] __kasan_kmalloc+0xd4/0xd8 [ 16.708310] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.708349] kmalloc_uaf_16+0x140/0x438 [ 16.708384] kunit_try_run_case+0x170/0x3f0 [ 16.708466] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.708580] kthread+0x328/0x630 [ 16.708612] ret_from_fork+0x10/0x20 [ 16.708647] [ 16.708665] Freed by task 168: [ 16.708691] kasan_save_stack+0x3c/0x68 [ 16.708727] kasan_save_track+0x20/0x40 [ 16.708763] kasan_save_free_info+0x4c/0x78 [ 16.708800] __kasan_slab_free+0x6c/0x98 [ 16.708836] kfree+0x214/0x3c8 [ 16.708868] kmalloc_uaf_16+0x190/0x438 [ 16.708902] kunit_try_run_case+0x170/0x3f0 [ 16.708937] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.709004] kthread+0x328/0x630 [ 16.709133] ret_from_fork+0x10/0x20 [ 16.709187] [ 16.709206] The buggy address belongs to the object at fff00000c61bc440 [ 16.709206] which belongs to the cache kmalloc-16 of size 16 [ 16.709270] The buggy address is located 0 bytes inside of [ 16.709270] freed 16-byte region [fff00000c61bc440, fff00000c61bc450) [ 16.709566] [ 16.709623] The buggy address belongs to the physical page: [ 16.709655] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1061bc [ 16.709732] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.709887] page_type: f5(slab) [ 16.709971] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 16.710020] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.710059] page dumped because: kasan: bad access detected [ 16.710089] [ 16.710106] Memory state around the buggy address: [ 16.710147] fff00000c61bc300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.710189] fff00000c61bc380: fa fb fc fc 00 04 fc fc fa fb fc fc fa fb fc fc [ 16.710774] >fff00000c61bc400: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 16.710929] ^ [ 16.710975] fff00000c61bc480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.711071] fff00000c61bc500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.711152] ==================================================================
[ 12.588169] ================================================================== [ 12.589148] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 12.589389] Read of size 16 at addr ffff8881031eb000 by task kunit_try_catch/185 [ 12.589614] [ 12.589752] CPU: 0 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.589796] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.589818] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.589838] Call Trace: [ 12.589850] <TASK> [ 12.589864] dump_stack_lvl+0x73/0xb0 [ 12.589895] print_report+0xd1/0x650 [ 12.589951] ? __virt_addr_valid+0x1db/0x2d0 [ 12.589976] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.590014] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.590049] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.590095] kasan_report+0x141/0x180 [ 12.590131] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.590218] __asan_report_load16_noabort+0x18/0x20 [ 12.590248] kmalloc_uaf_16+0x47b/0x4c0 [ 12.590268] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 12.590291] ? __schedule+0x10cc/0x2b60 [ 12.590313] ? __pfx_read_tsc+0x10/0x10 [ 12.590334] ? ktime_get_ts64+0x86/0x230 [ 12.590359] kunit_try_run_case+0x1a5/0x480 [ 12.590384] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.590407] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.590459] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.590484] ? __kthread_parkme+0x82/0x180 [ 12.590504] ? preempt_count_sub+0x50/0x80 [ 12.590529] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.590552] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.590577] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.590601] kthread+0x337/0x6f0 [ 12.590747] ? trace_preempt_on+0x20/0xc0 [ 12.590773] ? __pfx_kthread+0x10/0x10 [ 12.590793] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.590814] ? calculate_sigpending+0x7b/0xa0 [ 12.590838] ? __pfx_kthread+0x10/0x10 [ 12.590859] ret_from_fork+0x116/0x1d0 [ 12.590876] ? __pfx_kthread+0x10/0x10 [ 12.590896] ret_from_fork_asm+0x1a/0x30 [ 12.590928] </TASK> [ 12.590938] [ 12.601302] Allocated by task 185: [ 12.601479] kasan_save_stack+0x45/0x70 [ 12.601699] kasan_save_track+0x18/0x40 [ 12.601894] kasan_save_alloc_info+0x3b/0x50 [ 12.602173] __kasan_kmalloc+0xb7/0xc0 [ 12.602309] __kmalloc_cache_noprof+0x189/0x420 [ 12.602461] kmalloc_uaf_16+0x15b/0x4c0 [ 12.602672] kunit_try_run_case+0x1a5/0x480 [ 12.602892] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.603252] kthread+0x337/0x6f0 [ 12.603368] ret_from_fork+0x116/0x1d0 [ 12.603494] ret_from_fork_asm+0x1a/0x30 [ 12.603865] [ 12.603979] Freed by task 185: [ 12.604151] kasan_save_stack+0x45/0x70 [ 12.604444] kasan_save_track+0x18/0x40 [ 12.604611] kasan_save_free_info+0x3f/0x60 [ 12.604834] __kasan_slab_free+0x56/0x70 [ 12.604968] kfree+0x222/0x3f0 [ 12.605267] kmalloc_uaf_16+0x1d6/0x4c0 [ 12.605461] kunit_try_run_case+0x1a5/0x480 [ 12.605636] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.605861] kthread+0x337/0x6f0 [ 12.606121] ret_from_fork+0x116/0x1d0 [ 12.606284] ret_from_fork_asm+0x1a/0x30 [ 12.606423] [ 12.606493] The buggy address belongs to the object at ffff8881031eb000 [ 12.606493] which belongs to the cache kmalloc-16 of size 16 [ 12.607093] The buggy address is located 0 bytes inside of [ 12.607093] freed 16-byte region [ffff8881031eb000, ffff8881031eb010) [ 12.607605] [ 12.607828] The buggy address belongs to the physical page: [ 12.608013] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1031eb [ 12.608373] flags: 0x200000000000000(node=0|zone=2) [ 12.608662] page_type: f5(slab) [ 12.608850] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.609252] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.609586] page dumped because: kasan: bad access detected [ 12.609826] [ 12.609896] Memory state around the buggy address: [ 12.610179] ffff8881031eaf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.610541] ffff8881031eaf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.610858] >ffff8881031eb000: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.611374] ^ [ 12.611555] ffff8881031eb080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.611868] ffff8881031eb100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.612082] ==================================================================