Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.640177] ================================================================== [ 19.640317] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 19.640442] Read of size 16 at addr fff00000c6191520 by task kunit_try_catch/168 [ 19.640913] [ 19.641102] CPU: 0 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.641301] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.641363] Hardware name: linux,dummy-virt (DT) [ 19.641429] Call trace: [ 19.641474] show_stack+0x20/0x38 (C) [ 19.641902] dump_stack_lvl+0x8c/0xd0 [ 19.642139] print_report+0x118/0x608 [ 19.642327] kasan_report+0xdc/0x128 [ 19.642518] __asan_report_load16_noabort+0x20/0x30 [ 19.642618] kmalloc_uaf_16+0x3bc/0x438 [ 19.642922] kunit_try_run_case+0x170/0x3f0 [ 19.643047] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.643167] kthread+0x328/0x630 [ 19.643344] ret_from_fork+0x10/0x20 [ 19.643525] [ 19.643583] Allocated by task 168: [ 19.643749] kasan_save_stack+0x3c/0x68 [ 19.643847] kasan_save_track+0x20/0x40 [ 19.643988] kasan_save_alloc_info+0x40/0x58 [ 19.644406] __kasan_kmalloc+0xd4/0xd8 [ 19.644526] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.644626] kmalloc_uaf_16+0x140/0x438 [ 19.644833] kunit_try_run_case+0x170/0x3f0 [ 19.645122] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.645543] kthread+0x328/0x630 [ 19.645994] ret_from_fork+0x10/0x20 [ 19.646093] [ 19.646309] Freed by task 168: [ 19.646579] kasan_save_stack+0x3c/0x68 [ 19.646666] kasan_save_track+0x20/0x40 [ 19.646748] kasan_save_free_info+0x4c/0x78 [ 19.646894] __kasan_slab_free+0x6c/0x98 [ 19.647145] kfree+0x214/0x3c8 [ 19.647439] kmalloc_uaf_16+0x190/0x438 [ 19.647530] kunit_try_run_case+0x170/0x3f0 [ 19.647610] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.647797] kthread+0x328/0x630 [ 19.647882] ret_from_fork+0x10/0x20 [ 19.648051] [ 19.648105] The buggy address belongs to the object at fff00000c6191520 [ 19.648105] which belongs to the cache kmalloc-16 of size 16 [ 19.648243] The buggy address is located 0 bytes inside of [ 19.648243] freed 16-byte region [fff00000c6191520, fff00000c6191530) [ 19.648372] [ 19.648414] The buggy address belongs to the physical page: [ 19.648494] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106191 [ 19.648637] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.648748] page_type: f5(slab) [ 19.648832] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 19.648950] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.649058] page dumped because: kasan: bad access detected [ 19.649127] [ 19.649166] Memory state around the buggy address: [ 19.649241] fff00000c6191400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.649344] fff00000c6191480: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.649443] >fff00000c6191500: 00 00 fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 19.649526] ^ [ 19.649601] fff00000c6191580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.649861] fff00000c6191600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.649948] ==================================================================
[ 11.543433] ================================================================== [ 11.543910] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 11.544261] Read of size 16 at addr ffff8881019d1b00 by task kunit_try_catch/185 [ 11.544631] [ 11.544746] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.544816] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.544827] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.544870] Call Trace: [ 11.544882] <TASK> [ 11.544895] dump_stack_lvl+0x73/0xb0 [ 11.544921] print_report+0xd1/0x650 [ 11.544953] ? __virt_addr_valid+0x1db/0x2d0 [ 11.544974] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.544994] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.545025] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.545045] kasan_report+0x141/0x180 [ 11.545065] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.545090] __asan_report_load16_noabort+0x18/0x20 [ 11.545162] kmalloc_uaf_16+0x47b/0x4c0 [ 11.545183] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 11.545214] ? __schedule+0x10cc/0x2b60 [ 11.545235] ? __pfx_read_tsc+0x10/0x10 [ 11.545255] ? ktime_get_ts64+0x86/0x230 [ 11.545306] kunit_try_run_case+0x1a5/0x480 [ 11.545329] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.545350] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.545382] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.545404] ? __kthread_parkme+0x82/0x180 [ 11.545423] ? preempt_count_sub+0x50/0x80 [ 11.545446] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.545468] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.545489] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.545511] kthread+0x337/0x6f0 [ 11.545529] ? trace_preempt_on+0x20/0xc0 [ 11.545550] ? __pfx_kthread+0x10/0x10 [ 11.545570] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.545589] ? calculate_sigpending+0x7b/0xa0 [ 11.545611] ? __pfx_kthread+0x10/0x10 [ 11.545631] ret_from_fork+0x116/0x1d0 [ 11.545648] ? __pfx_kthread+0x10/0x10 [ 11.545667] ret_from_fork_asm+0x1a/0x30 [ 11.545696] </TASK> [ 11.545706] [ 11.557426] Allocated by task 185: [ 11.557779] kasan_save_stack+0x45/0x70 [ 11.558192] kasan_save_track+0x18/0x40 [ 11.558568] kasan_save_alloc_info+0x3b/0x50 [ 11.558982] __kasan_kmalloc+0xb7/0xc0 [ 11.559383] __kmalloc_cache_noprof+0x189/0x420 [ 11.559824] kmalloc_uaf_16+0x15b/0x4c0 [ 11.560143] kunit_try_run_case+0x1a5/0x480 [ 11.560418] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.560595] kthread+0x337/0x6f0 [ 11.560715] ret_from_fork+0x116/0x1d0 [ 11.560845] ret_from_fork_asm+0x1a/0x30 [ 11.560983] [ 11.561052] Freed by task 185: [ 11.561288] kasan_save_stack+0x45/0x70 [ 11.561774] kasan_save_track+0x18/0x40 [ 11.562175] kasan_save_free_info+0x3f/0x60 [ 11.562655] __kasan_slab_free+0x56/0x70 [ 11.563049] kfree+0x222/0x3f0 [ 11.563437] kmalloc_uaf_16+0x1d6/0x4c0 [ 11.563834] kunit_try_run_case+0x1a5/0x480 [ 11.564315] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.564924] kthread+0x337/0x6f0 [ 11.565307] ret_from_fork+0x116/0x1d0 [ 11.565691] ret_from_fork_asm+0x1a/0x30 [ 11.566094] [ 11.566342] The buggy address belongs to the object at ffff8881019d1b00 [ 11.566342] which belongs to the cache kmalloc-16 of size 16 [ 11.567398] The buggy address is located 0 bytes inside of [ 11.567398] freed 16-byte region [ffff8881019d1b00, ffff8881019d1b10) [ 11.567747] [ 11.567822] The buggy address belongs to the physical page: [ 11.567994] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1019d1 [ 11.568292] flags: 0x200000000000000(node=0|zone=2) [ 11.568463] page_type: f5(slab) [ 11.568637] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.568979] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.569371] page dumped because: kasan: bad access detected [ 11.569560] [ 11.569629] Memory state around the buggy address: [ 11.569781] ffff8881019d1a00: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc [ 11.570104] ffff8881019d1a80: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 11.570472] >ffff8881019d1b00: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.570767] ^ [ 11.570969] ffff8881019d1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.571344] ffff8881019d1c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.571558] ==================================================================