Date
April 20, 2025, 11:09 p.m.
Environment | |
---|---|
x15 | |
x86 |
[ 56.741607] ================================================================== [ 56.752838] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4d0/0x550 [ 56.759490] Read of size 1 at addr cc22c0a8 by task kunit_try_catch/244 [ 56.766143] [ 56.767669] CPU: 1 UID: 0 PID: 244 Comm: kunit_try_catch Tainted: G B W N 6.15.0-rc3 #1 NONE [ 56.767700] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 56.767700] Hardware name: Generic DRA74X (Flattened Device Tree) [ 56.767700] Call trace: [ 56.767730] unwind_backtrace from show_stack+0x18/0x1c [ 56.767761] show_stack from dump_stack_lvl+0x70/0x90 [ 56.767761] dump_stack_lvl from print_report+0x158/0x528 [ 56.767791] print_report from kasan_report+0xdc/0x118 [ 56.767822] kasan_report from kmalloc_uaf2+0x4d0/0x550 [ 56.767852] kmalloc_uaf2 from kunit_try_run_case+0x22c/0x5a8 [ 56.767852] kunit_try_run_case from kunit_generic_run_threadfn_adapter+0xc4/0x128 [ 56.767883] kunit_generic_run_threadfn_adapter from kthread+0x464/0x810 [ 56.767913] kthread from ret_from_fork+0x14/0x20 [ 56.767944] Exception stack(0xf24bbfb0 to 0xf24bbff8) [ 56.767944] bfa0: 00000000 00000000 00000000 00000000 [ 56.767974] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 56.767974] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 56.768005] [ 56.872009] Allocated by task 244: [ 56.875427] kasan_save_track+0x30/0x5c [ 56.879302] __kasan_kmalloc+0x8c/0x94 [ 56.883087] kmalloc_uaf2+0xd8/0x550 [ 56.886688] kunit_try_run_case+0x22c/0x5a8 [ 56.890899] kunit_generic_run_threadfn_adapter+0xc4/0x128 [ 56.896423] kthread+0x464/0x810 [ 56.899688] ret_from_fork+0x14/0x20 [ 56.903289] [ 56.904785] Freed by task 244: [ 56.907867] kasan_save_track+0x30/0x5c [ 56.911743] kasan_save_free_info+0x3c/0x48 [ 56.915954] __kasan_slab_free+0x40/0x50 [ 56.919891] kfree+0xe8/0x384 [ 56.922912] kmalloc_uaf2+0x184/0x550 [ 56.926605] kunit_try_run_case+0x22c/0x5a8 [ 56.930816] kunit_generic_run_threadfn_adapter+0xc4/0x128 [ 56.936340] kthread+0x464/0x810 [ 56.939605] ret_from_fork+0x14/0x20 [ 56.943206] [ 56.944702] The buggy address belongs to the object at cc22c080 [ 56.944702] which belongs to the cache kmalloc-64 of size 64 [ 56.956420] The buggy address is located 40 bytes inside of [ 56.956420] freed 64-byte region [cc22c080, cc22c0c0) [ 56.967193] [ 56.968688] The buggy address belongs to the physical page: [ 56.974304] page: refcount:0 mapcount:0 mapping:00000000 index:0x0 pfn:0x8c22c [ 56.981567] flags: 0x0(zone=0) [ 56.984649] page_type: f5(slab) [ 56.987823] raw: 00000000 c7001300 00000122 00000000 00000000 80200020 f5000000 00000000 [ 56.995971] raw: 00000000 [ 56.998596] page dumped because: kasan: bad access detected [ 57.004211] [ 57.005706] Memory state around the buggy address: [ 57.010528] cc22bf80: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 57.017120] cc22c000: 00 04 fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 57.023681] >cc22c080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 57.030242] ^ [ 57.034118] cc22c100: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 57.040679] cc22c180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 57.047271] ==================================================================
[ 27.854456] ================================================================== [ 27.865608] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 27.872228] Read of size 1 at addr ffff888106799b28 by task kunit_try_catch/231 [ 27.879540] [ 27.881041] CPU: 3 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc3 #1 PREEMPT(voluntary) [ 27.881050] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.881052] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.7 12/07/2021 [ 27.881055] Call Trace: [ 27.881057] <TASK> [ 27.881059] dump_stack_lvl+0x73/0xb0 [ 27.881063] print_report+0xd1/0x650 [ 27.881067] ? __virt_addr_valid+0x1db/0x2d0 [ 27.881071] ? kmalloc_uaf2+0x4a8/0x520 [ 27.881074] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.881079] ? kmalloc_uaf2+0x4a8/0x520 [ 27.881082] kasan_report+0x141/0x180 [ 27.881087] ? kmalloc_uaf2+0x4a8/0x520 [ 27.881091] __asan_report_load1_noabort+0x18/0x20 [ 27.881095] kmalloc_uaf2+0x4a8/0x520 [ 27.881099] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 27.881103] ? finish_task_switch.isra.0+0x153/0x700 [ 27.881107] ? __switch_to+0x5d9/0xf60 [ 27.881111] ? dequeue_task_fair+0x166/0x4e0 [ 27.881115] ? __schedule+0x10cc/0x2b30 [ 27.881120] ? ktime_get_ts64+0x83/0x230 [ 27.881124] kunit_try_run_case+0x1a2/0x480 [ 27.881129] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.881133] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.881137] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.881142] ? __kthread_parkme+0x82/0x180 [ 27.881146] ? preempt_count_sub+0x50/0x80 [ 27.881150] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.881155] kunit_generic_run_threadfn_adapter+0x82/0xf0 [ 27.881159] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.881163] kthread+0x334/0x6f0 [ 27.881167] ? trace_preempt_on+0x20/0xc0 [ 27.881171] ? __pfx_kthread+0x10/0x10 [ 27.881176] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.881180] ? calculate_sigpending+0x7b/0xa0 [ 27.881183] ? __pfx_kthread+0x10/0x10 [ 27.881188] ret_from_fork+0x3e/0x80 [ 27.881192] ? __pfx_kthread+0x10/0x10 [ 27.881196] ret_from_fork_asm+0x1a/0x30 [ 27.881202] </TASK> [ 27.881203] [ 28.054887] Allocated by task 231: [ 28.058292] kasan_save_stack+0x45/0x70 [ 28.062131] kasan_save_track+0x18/0x40 [ 28.065971] kasan_save_alloc_info+0x3b/0x50 [ 28.070243] __kasan_kmalloc+0xb7/0xc0 [ 28.073996] __kmalloc_cache_noprof+0x189/0x420 [ 28.078527] kmalloc_uaf2+0xc6/0x520 [ 28.082108] kunit_try_run_case+0x1a2/0x480 [ 28.086292] kunit_generic_run_threadfn_adapter+0x82/0xf0 [ 28.091699] kthread+0x334/0x6f0 [ 28.094975] ret_from_fork+0x3e/0x80 [ 28.098556] ret_from_fork_asm+0x1a/0x30 [ 28.102482] [ 28.103979] Freed by task 231: [ 28.107040] kasan_save_stack+0x45/0x70 [ 28.110879] kasan_save_track+0x18/0x40 [ 28.114733] kasan_save_free_info+0x3f/0x60 [ 28.118920] __kasan_slab_free+0x56/0x70 [ 28.122848] kfree+0x222/0x3f0 [ 28.125907] kmalloc_uaf2+0x14c/0x520 [ 28.129572] kunit_try_run_case+0x1a2/0x480 [ 28.133759] kunit_generic_run_threadfn_adapter+0x82/0xf0 [ 28.139156] kthread+0x334/0x6f0 [ 28.142389] ret_from_fork+0x3e/0x80 [ 28.145967] ret_from_fork_asm+0x1a/0x30 [ 28.149894] [ 28.151392] The buggy address belongs to the object at ffff888106799b00 [ 28.151392] which belongs to the cache kmalloc-64 of size 64 [ 28.163762] The buggy address is located 40 bytes inside of [ 28.163762] freed 64-byte region [ffff888106799b00, ffff888106799b40) [ 28.175841] [ 28.177341] The buggy address belongs to the physical page: [ 28.182915] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106799 [ 28.190920] flags: 0x200000000000000(node=0|zone=2) [ 28.195799] page_type: f5(slab) [ 28.198947] raw: 0200000000000000 ffff8881000428c0 dead000000000122 0000000000000000 [ 28.206715] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 28.214483] page dumped because: kasan: bad access detected [ 28.220057] [ 28.221557] Memory state around the buggy address: [ 28.226350] ffff888106799a00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.233575] ffff888106799a80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.240794] >ffff888106799b00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 28.248015] ^ [ 28.252546] ffff888106799b80: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 28.259767] ffff888106799c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.266983] ==================================================================