Date
June 24, 2025, 12:47 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 24.069185] ================================================================== [ 24.069341] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 24.070422] Read of size 1 at addr fff00000c3fab728 by task kunit_try_catch/186 [ 24.070544] [ 24.070611] CPU: 0 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT [ 24.070804] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.070868] Hardware name: linux,dummy-virt (DT) [ 24.070940] Call trace: [ 24.070992] show_stack+0x20/0x38 (C) [ 24.071775] dump_stack_lvl+0x8c/0xd0 [ 24.072213] print_report+0x118/0x608 [ 24.072859] kasan_report+0xdc/0x128 [ 24.073318] __asan_report_load1_noabort+0x20/0x30 [ 24.073536] kmalloc_uaf+0x300/0x338 [ 24.073681] kunit_try_run_case+0x170/0x3f0 [ 24.074784] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.074936] kthread+0x328/0x630 [ 24.075062] ret_from_fork+0x10/0x20 [ 24.075887] [ 24.076193] Allocated by task 186: [ 24.076274] kasan_save_stack+0x3c/0x68 [ 24.076432] kasan_save_track+0x20/0x40 [ 24.076540] kasan_save_alloc_info+0x40/0x58 [ 24.076639] __kasan_kmalloc+0xd4/0xd8 [ 24.076772] __kmalloc_cache_noprof+0x16c/0x3c0 [ 24.076877] kmalloc_uaf+0xb8/0x338 [ 24.076963] kunit_try_run_case+0x170/0x3f0 [ 24.077058] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.077177] kthread+0x328/0x630 [ 24.077270] ret_from_fork+0x10/0x20 [ 24.077414] [ 24.077471] Freed by task 186: [ 24.077550] kasan_save_stack+0x3c/0x68 [ 24.078054] kasan_save_track+0x20/0x40 [ 24.078250] kasan_save_free_info+0x4c/0x78 [ 24.078474] __kasan_slab_free+0x6c/0x98 [ 24.078590] kfree+0x214/0x3c8 [ 24.078871] kmalloc_uaf+0x11c/0x338 [ 24.079006] kunit_try_run_case+0x170/0x3f0 [ 24.079330] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.079471] kthread+0x328/0x630 [ 24.079582] ret_from_fork+0x10/0x20 [ 24.079764] [ 24.079824] The buggy address belongs to the object at fff00000c3fab720 [ 24.079824] which belongs to the cache kmalloc-16 of size 16 [ 24.080283] The buggy address is located 8 bytes inside of [ 24.080283] freed 16-byte region [fff00000c3fab720, fff00000c3fab730) [ 24.080651] [ 24.080704] The buggy address belongs to the physical page: [ 24.080810] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fab [ 24.080976] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 24.081148] page_type: f5(slab) [ 24.081347] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 24.081495] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 24.081602] page dumped because: kasan: bad access detected [ 24.081680] [ 24.081779] Memory state around the buggy address: [ 24.081928] fff00000c3fab600: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc [ 24.082082] fff00000c3fab680: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 24.082187] >fff00000c3fab700: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 24.082316] ^ [ 24.082898] fff00000c3fab780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.083131] fff00000c3fab800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.083242] ==================================================================
[ 12.005980] ================================================================== [ 12.006501] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 12.007025] Read of size 1 at addr ffff888102662f88 by task kunit_try_catch/204 [ 12.007689] [ 12.007847] CPU: 1 UID: 0 PID: 204 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT(voluntary) [ 12.007920] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.007934] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.007963] Call Trace: [ 12.007982] <TASK> [ 12.008011] dump_stack_lvl+0x73/0xb0 [ 12.008054] print_report+0xd1/0x650 [ 12.008083] ? __virt_addr_valid+0x1db/0x2d0 [ 12.008109] ? kmalloc_uaf+0x320/0x380 [ 12.008134] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.008161] ? kmalloc_uaf+0x320/0x380 [ 12.008184] kasan_report+0x141/0x180 [ 12.008203] ? kmalloc_uaf+0x320/0x380 [ 12.008226] __asan_report_load1_noabort+0x18/0x20 [ 12.008244] kmalloc_uaf+0x320/0x380 [ 12.008263] ? __pfx_kmalloc_uaf+0x10/0x10 [ 12.008282] ? __schedule+0x10cc/0x2b60 [ 12.008303] ? __pfx_read_tsc+0x10/0x10 [ 12.008321] ? ktime_get_ts64+0x86/0x230 [ 12.008345] kunit_try_run_case+0x1a5/0x480 [ 12.008368] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.008388] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.008409] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.008430] ? __kthread_parkme+0x82/0x180 [ 12.008450] ? preempt_count_sub+0x50/0x80 [ 12.008473] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.008494] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.008514] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.008534] kthread+0x337/0x6f0 [ 12.008578] ? trace_preempt_on+0x20/0xc0 [ 12.008641] ? __pfx_kthread+0x10/0x10 [ 12.008674] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.008710] ? calculate_sigpending+0x7b/0xa0 [ 12.008750] ? __pfx_kthread+0x10/0x10 [ 12.008786] ret_from_fork+0x41/0x80 [ 12.008825] ? __pfx_kthread+0x10/0x10 [ 12.008857] ret_from_fork_asm+0x1a/0x30 [ 12.008936] </TASK> [ 12.009211] [ 12.018731] Allocated by task 204: [ 12.019105] kasan_save_stack+0x45/0x70 [ 12.019446] kasan_save_track+0x18/0x40 [ 12.019692] kasan_save_alloc_info+0x3b/0x50 [ 12.019875] __kasan_kmalloc+0xb7/0xc0 [ 12.020038] __kmalloc_cache_noprof+0x189/0x420 [ 12.020213] kmalloc_uaf+0xaa/0x380 [ 12.020460] kunit_try_run_case+0x1a5/0x480 [ 12.020858] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.021272] kthread+0x337/0x6f0 [ 12.021583] ret_from_fork+0x41/0x80 [ 12.021909] ret_from_fork_asm+0x1a/0x30 [ 12.022240] [ 12.022436] Freed by task 204: [ 12.022773] kasan_save_stack+0x45/0x70 [ 12.023085] kasan_save_track+0x18/0x40 [ 12.023432] kasan_save_free_info+0x3f/0x60 [ 12.023776] __kasan_slab_free+0x56/0x70 [ 12.024027] kfree+0x222/0x3f0 [ 12.024179] kmalloc_uaf+0x12c/0x380 [ 12.024338] kunit_try_run_case+0x1a5/0x480 [ 12.024753] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.025190] kthread+0x337/0x6f0 [ 12.025458] ret_from_fork+0x41/0x80 [ 12.025812] ret_from_fork_asm+0x1a/0x30 [ 12.026167] [ 12.026295] The buggy address belongs to the object at ffff888102662f80 [ 12.026295] which belongs to the cache kmalloc-16 of size 16 [ 12.026791] The buggy address is located 8 bytes inside of [ 12.026791] freed 16-byte region [ffff888102662f80, ffff888102662f90) [ 12.027130] [ 12.027315] The buggy address belongs to the physical page: [ 12.027774] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102662 [ 12.028315] flags: 0x200000000000000(node=0|zone=2) [ 12.028747] page_type: f5(slab) [ 12.029068] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.029588] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.030009] page dumped because: kasan: bad access detected [ 12.030428] [ 12.030606] Memory state around the buggy address: [ 12.030853] ffff888102662e80: 00 02 fc fc 00 02 fc fc fa fb fc fc fa fb fc fc [ 12.031299] ffff888102662f00: fa fb fc fc 00 05 fc fc fa fb fc fc fa fb fc fc [ 12.031770] >ffff888102662f80: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.032162] ^ [ 12.032398] ffff888102663000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.032817] ffff888102663080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb [ 12.033054] ==================================================================