CVE-2023-53660 in Linuxinfo

Summary

by MITRE • 10/07/2025

In the Linux kernel, the following vulnerability has been resolved:

bpf, cpumap: Handle skb as well when clean up ptr_ring

The following warning was reported when running xdp_redirect_cpu with both skb-mode and stress-mode enabled:

------------[ cut here ]------------
Incorrect XDP memory type (-2128176192) usage WARNING: CPU: 7 PID: 1442 at net/core/xdp.c:405 Modules linked in: CPU: 7 PID: 1442 Comm: kworker/7:0 Tainted: G 6.5.0-rc2+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Workqueue: events __cpu_map_entry_free RIP: 0010:__xdp_return+0x1e4/0x4a0 ...... Call Trace: <TASK> ? show_regs+0x65/0x70 ? __warn+0xa5/0x240 ? __xdp_return+0x1e4/0x4a0 ...... xdp_return_frame+0x4d/0x150 __cpu_map_entry_free+0xf9/0x230 process_one_work+0x6b0/0xb80 worker_thread+0x96/0x720 kthread+0x1a5/0x1f0 ret_from_fork+0x3a/0x70 ret_from_fork_asm+0x1b/0x30 </TASK>

The reason for the warning is twofold. One is due to the kthread cpu_map_kthread_run() is stopped prematurely. Another one is __cpu_map_ring_cleanup() doesn't handle skb mode and treats skbs in ptr_ring as XDP frames.

Prematurely-stopped kthread will be fixed by the preceding patch and ptr_ring will be empty when __cpu_map_ring_cleanup() is called. But as the comments in __cpu_map_ring_cleanup() said, handling and freeing skbs in ptr_ring as well to "catch any broken behaviour gracefully".

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 03/01/2026

The vulnerability identified as CVE-2023-53660 resides within the Linux kernel's implementation of eXpress Data Path (XDP) and control plane map (cpumap) functionality, specifically affecting the handling of packet buffers during cleanup operations. This issue manifests when the xdp_redirect_cpu function operates with both skb-mode and stress-mode enabled, creating a scenario where memory type inconsistencies occur during packet processing. The technical flaw stems from improper handling of different packet buffer types within the ptr_ring data structure, which is utilized for managing packet redirection between CPU cores. The kernel warning message indicates an incorrect XDP memory type usage with a specific error code value -2128176192, signaling a fundamental mismatch in how packet buffers are processed and freed.

The operational impact of this vulnerability extends beyond simple warning messages to potentially compromise system stability and packet processing integrity. When the kthread cpu_map_kthread_run() is terminated prematurely, it leaves behind inconsistent state in the ptr_ring structure, where skbs (socket buffer) entries remain unprocessed while the cleanup routine attempts to treat them as XDP frames. This misclassification occurs because __cpu_map_ring_cleanup() function lacks proper differentiation between the two buffer types, leading to incorrect memory management operations. The problem is particularly severe in high-throughput scenarios where stress-mode enables aggressive packet processing, amplifying the likelihood of memory corruption or system instability. The vulnerability affects systems utilizing XDP with CPU mapping capabilities, particularly those implementing xdp_redirect_cpu functionality for packet redirection across multiple CPU cores.

The root cause of this vulnerability aligns with CWE-1210: Improper Handling of Different Data Types, where the kernel fails to properly distinguish between socket buffer and XDP frame types during cleanup operations. This issue also relates to ATT&CK technique T1059.001: Command and Scripting Interpreter - PowerShell, as it involves improper handling of memory structures that could be exploited to manipulate packet processing behavior. The vulnerability demonstrates a classic memory management error where the cleanup routine assumes all entries in ptr_ring are of the same type, ignoring the legitimate presence of both XDP frames and skbs within the same data structure. The fix implemented addresses this by ensuring proper handling of both packet buffer types during cleanup operations, though the underlying design flaw highlights the complexity of managing mixed buffer types in high-performance networking code. The solution requires careful consideration of buffer lifecycle management and proper type checking during memory deallocation to prevent the incorrect treatment of socket buffers as XDP frames, thereby maintaining the integrity of the XDP packet processing pipeline.

Responsible

Linux

Reservation

10/07/2025

Disclosure

10/07/2025

Moderation

accepted

CPE

ready

EPSS

0.00142

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!