Date
July 23, 2025, 2:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.382449] ================================================================== [ 15.382519] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 15.382593] Read of size 16 at addr fff00000c3ec4120 by task kunit_try_catch/168 [ 15.383020] [ 15.383072] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT [ 15.383173] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.383202] Hardware name: linux,dummy-virt (DT) [ 15.383233] Call trace: [ 15.383254] show_stack+0x20/0x38 (C) [ 15.383306] dump_stack_lvl+0x8c/0xd0 [ 15.383355] print_report+0x118/0x5d0 [ 15.383403] kasan_report+0xdc/0x128 [ 15.383461] __asan_report_load16_noabort+0x20/0x30 [ 15.383521] kmalloc_uaf_16+0x3bc/0x438 [ 15.383567] kunit_try_run_case+0x170/0x3f0 [ 15.383615] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.383676] kthread+0x328/0x630 [ 15.383727] ret_from_fork+0x10/0x20 [ 15.383797] [ 15.383816] Allocated by task 168: [ 15.383844] kasan_save_stack+0x3c/0x68 [ 15.384438] kasan_save_track+0x20/0x40 [ 15.384824] kasan_save_alloc_info+0x40/0x58 [ 15.384937] __kasan_kmalloc+0xd4/0xd8 [ 15.385150] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.385593] kmalloc_uaf_16+0x140/0x438 [ 15.386221] kunit_try_run_case+0x170/0x3f0 [ 15.386518] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.386848] kthread+0x328/0x630 [ 15.387174] ret_from_fork+0x10/0x20 [ 15.387250] [ 15.387305] Freed by task 168: [ 15.387377] kasan_save_stack+0x3c/0x68 [ 15.387436] kasan_save_track+0x20/0x40 [ 15.387602] kasan_save_free_info+0x4c/0x78 [ 15.387726] __kasan_slab_free+0x6c/0x98 [ 15.387842] kfree+0x214/0x3c8 [ 15.387938] kmalloc_uaf_16+0x190/0x438 [ 15.388064] kunit_try_run_case+0x170/0x3f0 [ 15.388103] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.388282] kthread+0x328/0x630 [ 15.388498] ret_from_fork+0x10/0x20 [ 15.388561] [ 15.388613] The buggy address belongs to the object at fff00000c3ec4120 [ 15.388613] which belongs to the cache kmalloc-16 of size 16 [ 15.388684] The buggy address is located 0 bytes inside of [ 15.388684] freed 16-byte region [fff00000c3ec4120, fff00000c3ec4130) [ 15.388919] [ 15.388994] The buggy address belongs to the physical page: [ 15.389142] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ec4 [ 15.389527] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.389934] page_type: f5(slab) [ 15.390035] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.390230] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.390556] page dumped because: kasan: bad access detected [ 15.390594] [ 15.390612] Memory state around the buggy address: [ 15.390652] fff00000c3ec4000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.390697] fff00000c3ec4080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.390915] >fff00000c3ec4100: 00 00 fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 15.391124] ^ [ 15.391346] fff00000c3ec4180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.391649] fff00000c3ec4200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.391777] ==================================================================
[ 12.641455] ================================================================== [ 12.641918] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 12.642248] Read of size 16 at addr ffff8881025ca040 by task kunit_try_catch/185 [ 12.642801] [ 12.642931] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT(voluntary) [ 12.642974] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.643007] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.643027] Call Trace: [ 12.643038] <TASK> [ 12.643052] dump_stack_lvl+0x73/0xb0 [ 12.643081] print_report+0xd1/0x610 [ 12.643103] ? __virt_addr_valid+0x1db/0x2d0 [ 12.643125] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.643145] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.643183] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.643203] kasan_report+0x141/0x180 [ 12.643224] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.643249] __asan_report_load16_noabort+0x18/0x20 [ 12.643272] kmalloc_uaf_16+0x47b/0x4c0 [ 12.643293] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 12.643313] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 12.643338] ? trace_hardirqs_on+0x37/0xe0 [ 12.643360] ? __pfx_read_tsc+0x10/0x10 [ 12.643381] ? ktime_get_ts64+0x86/0x230 [ 12.643404] kunit_try_run_case+0x1a5/0x480 [ 12.643428] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.643530] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.643555] ? __kthread_parkme+0x82/0x180 [ 12.643574] ? preempt_count_sub+0x50/0x80 [ 12.643597] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.643620] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.643663] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.643686] kthread+0x337/0x6f0 [ 12.643705] ? trace_preempt_on+0x20/0xc0 [ 12.643726] ? __pfx_kthread+0x10/0x10 [ 12.643746] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.643767] ? calculate_sigpending+0x7b/0xa0 [ 12.643790] ? __pfx_kthread+0x10/0x10 [ 12.643822] ret_from_fork+0x116/0x1d0 [ 12.643841] ? __pfx_kthread+0x10/0x10 [ 12.643861] ret_from_fork_asm+0x1a/0x30 [ 12.643890] </TASK> [ 12.643900] [ 12.651777] Allocated by task 185: [ 12.651973] kasan_save_stack+0x45/0x70 [ 12.652333] kasan_save_track+0x18/0x40 [ 12.652533] kasan_save_alloc_info+0x3b/0x50 [ 12.652786] __kasan_kmalloc+0xb7/0xc0 [ 12.652994] __kmalloc_cache_noprof+0x189/0x420 [ 12.653328] kmalloc_uaf_16+0x15b/0x4c0 [ 12.653537] kunit_try_run_case+0x1a5/0x480 [ 12.653731] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.653987] kthread+0x337/0x6f0 [ 12.654394] ret_from_fork+0x116/0x1d0 [ 12.654599] ret_from_fork_asm+0x1a/0x30 [ 12.654795] [ 12.654908] Freed by task 185: [ 12.655067] kasan_save_stack+0x45/0x70 [ 12.655359] kasan_save_track+0x18/0x40 [ 12.655563] kasan_save_free_info+0x3f/0x60 [ 12.655799] __kasan_slab_free+0x56/0x70 [ 12.655994] kfree+0x222/0x3f0 [ 12.656203] kmalloc_uaf_16+0x1d6/0x4c0 [ 12.656451] kunit_try_run_case+0x1a5/0x480 [ 12.656641] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.656881] kthread+0x337/0x6f0 [ 12.657064] ret_from_fork+0x116/0x1d0 [ 12.657317] ret_from_fork_asm+0x1a/0x30 [ 12.657480] [ 12.657572] The buggy address belongs to the object at ffff8881025ca040 [ 12.657572] which belongs to the cache kmalloc-16 of size 16 [ 12.657981] The buggy address is located 0 bytes inside of [ 12.657981] freed 16-byte region [ffff8881025ca040, ffff8881025ca050) [ 12.659011] [ 12.659238] The buggy address belongs to the physical page: [ 12.659541] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025ca [ 12.659920] flags: 0x200000000000000(node=0|zone=2) [ 12.660151] page_type: f5(slab) [ 12.660318] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.660870] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.661154] page dumped because: kasan: bad access detected [ 12.661324] [ 12.661394] Memory state around the buggy address: [ 12.661545] ffff8881025c9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.661888] ffff8881025c9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.662494] >ffff8881025ca000: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 12.662929] ^ [ 12.663117] ffff8881025ca080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.663611] ffff8881025ca100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.663932] ==================================================================