CVE-2025-22059

linux: In the Linux kernel, the following vulnerability has been resolved: udp: Fix multiple wraparounds of sk->sk_rmem_alloc

CVE-2025-22059 is fixed in 58 products on 1 platform, first by DEBIAN-CVE-2025-22059, released April 16, 2025. It is not reported as exploited. Patch Radar priority: Routine.

Routine
CVSS
5.7
medium
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0048
41st percentile

In the Linux kernel, the following vulnerability has been resolved: udp: Fix multiple wraparounds of sk->sk_rmem_alloc. __udp_enqueue_schedule_skb() has the following condition: if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf) goto drop; sk->sk_rcvbuf is initialised by net.core.rmem_default and later can be configured by SO_RCVBUF, which is limited by net.core.rmem_max, or SO_RCVBUFFORCE. If we set INT_MAX to sk->sk_rcvbuf, the condition is always false as sk->sk_rmem_alloc is also signed int. Then, the size of the incoming skb is added to sk->sk_rmem_alloc unconditionally. This results in integer overflow (possibly multiple times) on sk->sk_rmem_alloc and allows a single socket to have skb up to net.core.udp_mem[1]. For example, if we set a large value to udp_mem[1] and INT_MAX to sk->sk_rcvbuf and flood packets to the socket, we can see multiple overflows: # cat /proc/net/sockstat | grep UDP: UDP: inuse 3 mem 7956736 <-- (7956736 << 12) bytes > INT_MAX * 15 ^- PAGE_SHIFT # ss -uam State Recv-Q ... UNCONN -1757018048 ... <-- flipping the sign repeatedly skmem:(r2537949248,rb2147483646,t0,tb212992,f1984,w0,o0,bl0,d0) Previously, we had a boundary check for INT_MAX, which was removed by commit 6a1f12dd85a8 ("udp: relax atomic operation on sk->sk_rmem_alloc"). A complete fix would be to revert it and cap the right operand by INT_MAX: rmem = atomic_add_return(size, &sk->sk_rmem_alloc); if (rmem > min(size + (unsigned int)sk->sk_rcvbuf, INT_MAX)) goto uncharge_drop; but we do not want to add the expensive atomic_add_return() back just for the corner case. Casting rmem to unsigned int prevents multiple wraparounds, but we still allow a single wraparound. # cat /proc/net/sockstat | grep UDP: UDP: inuse 3 mem 524288 <-- (INT_MAX + 1) >> 12 # ss -uam State Recv-Q ... UNCONN -2147482816 ... <-- INT_MAX + 831 bytes skmem:(r2147484480,rb2147483646,t0,tb212992,f3264,w0,o0,bl0,d14468947) So, let's define rmem and rcvbuf as unsigned int and check skb->truesize only when rcvbuf is large enough to lower the overflow possibility. Note that we still have a small chance to see overflow if multiple skbs to the same socket are processed on different core at the same time and each size does not exceed the limit but the total size does. Note also that we must ignore skb->truesize for a small buffer as explained in commit 363dc73acacb ("udp: be less conservative with sock rmem accounting").

Where it's fixed

ProductFixed inFixReleased
Linux
bpftool · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
bpftool-debuginfo · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-devel · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-headers · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-libbpf · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-libbpf-debuginfo · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-libbpf-devel · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-libbpf-static · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-livepatch-6.12.23-29.97 · amzn 2023 1.0-0.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-modules-extra-common · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-tools · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-tools-debuginfo · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-tools-devel · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel-uek · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-core · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-core · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-core · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-core · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-devel · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-devel · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-core · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-core · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-deprecated · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-deprecated · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-desktop · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-desktop · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-extra · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-extra · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-extra-netfilter · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-extra-netfilter · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-usb · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-usb · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-wireless · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-debug-modules-wireless · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-devel · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-devel · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-doc · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-doc · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-core · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-core · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-deprecated · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-deprecated · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-desktop · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-desktop · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-extra · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-extra · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-extra-netfilter · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-extra-netfilter · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-usb · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-usb · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-wireless · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-modules-wireless · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-tools · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek-tools · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-core · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-core · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-devel · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-devel · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-core · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-core · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-deprecated · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-deprecated · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-desktop · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-desktop · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-extra · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-extra · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-extra-netfilter · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-extra-netfilter · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-usb · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-usb · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-wireless · ol 10 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel-uek64k-modules-wireless · ol 9 0:6.12.0-101.33.4.3.el9uek ELSA-2025-20480 Jul 17, 2025
kernel6.12 · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel6.12-debuginfo · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel6.12-debuginfo-common-aarch64 · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel6.12-debuginfo-common-x86_64 · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
kernel6.12-modules-extra · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
linux · Debian 13.5 (trixie) 6.12.25-1 DEBIAN-CVE-2025-22059 Apr 16, 2025
linux · Debian 14 6.12.25-1 DEBIAN-CVE-2025-22059 Apr 16, 2025
perf6.12 · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
perf6.12-debuginfo · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
python3-perf6.12 · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025
python3-perf6.12-debuginfo · amzn 2023 6.12.23-29.97.amzn2023 ALAS2023-2025-948 Apr 23, 2025

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.