CVE-2025-22058
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-22058 is a memory accounting leak vulnerability discovered in the Linux kernel's UDP implementation. The vulnerability was reported by Matt Dowling and disclosed on April 16, 2025. The issue affects the Linux kernel's UDP memory management system, specifically in how it handles memory accounting when UDP sockets are closed (NVD, Debian Tracker).

Technical details

The vulnerability stems from an integer overflow in the udprmemrelease() function. When a socket is closed, udpdestructcommon() calculates the total size of the receive queue using an unsigned integer, but passes it to udprmemrelease() which takes a signed integer argument. This causes the total size to wrap around, leading to an overflow. The issue manifests when an application sets INTMAX to SORCVBUF, causing the UDP memory usage to spike to 524,288 pages and double when the application is terminated (Red Hat CVE).

Impact

The vulnerability results in incorrect memory accounting, causing UDP memory usage to spike and never drop, eventually doubling when applications are terminated. This leads to memory allocation failures when a socket's skrmemalloc exceeds net.ipv4.udprmemmin, resulting in packet drops. The issue affects system stability and network performance (Red Hat CVE).

Mitigation and workarounds

The issue has been fixed in Linux kernel version 6.12.25-1. The fix involves using unsigned int for the calculation and calling skforwardalloc_add() only once for the small delta. Various Linux distributions have released or are in the process of releasing patches, including Debian which has fixed the issue in version 6.12.25-1 (Debian Tracker).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management