Skip to content
OpenAdvisories
Unscored CVE-2023-53489 EUVD-2025-32784GHSA-5wf2-hxf9-8hxr

tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.

Published Oct 1, 2025 · Updated Nov 5, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.15 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.4 Package: linux-aws-5.8 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-fips Package: linux-aws-hwe Package: linux-azure Package: linux-azure-4.15 Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.15 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.4 Package: linux-azure-5.8 Package: linux-azure-6.11 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 Package: linux-azure-fips Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-4.15 Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.15 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.4 Package: linux-gcp-5.8 Package: linux-gcp-6.11 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.15 Package: linux-hwe-5.19 Package: linux-hwe-5.4 Package: linux-hwe-5.8 Package: linux-hwe-6.11 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.15 Package: linux-ibm-5.4 Package: linux-intel Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-intel-iotg Package: linux-intel-iotg-5.15 Package: linux-iot Package: linux-kvm Package: linux-lowlatency Package: linux-lowlatency-hwe-5.15 Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.11 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-nvidia Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-nvidia-tegra Package: linux-nvidia-tegra-5.15 Package: linux-nvidia-tegra-igx Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.11 Package: linux-oem-6.5 Package: linux-oem-6.8 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.15 Package: linux-oracle-5.3 Package: linux-oracle-5.4 Package: linux-oracle-5.8 Package: linux-oracle-6.5 Package: linux-raspi Package: linux-raspi-5.4 Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.15 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.5 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

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

tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.

syzkaller reported [0] memory leaks of an UDP socket and ZEROCOPY
skbs. We can reproduce the problem with these sequences:

sk = socket(AF_INET, SOCK_DGRAM, 0)
sk.setsockopt(SOL_SOCKET, SO_TIMESTAMPING, SOF_TIMESTAMPING_TX_SOFTWARE)
sk.setsockopt(SOL_SOCKET, SO_ZEROCOPY, 1)
sk.sendto(b'', MSG_ZEROCOPY, ('127.0.0.1', 53))
sk.close()

sendmsg() calls msg_zerocopy_alloc(), which allocates a skb, sets
skb->cb->ubuf.refcnt to 1, and calls sock_hold(). Here, struct
ubuf_info_msgzc indirectly holds a refcnt of the socket. When the
skb is sent, __skb_tstamp_tx() clones it and puts the clone into
the socket's error queue with the TX timestamp.

When the original skb is received locally, skb_copy_ubufs() calls
skb_unclone(), and pskb_expand_head() increments skb->cb->ubuf.refcnt.
This additional count is decremented while freeing the skb, but struct
ubuf_info_msgzc still has a refcnt, so __msg_zerocopy_callback() is
not called.

The last refcnt is not released unless we retrieve the TX timestamped
skb by recvmsg(). Since we clear the error queue in inet_sock_destruct()
after the socket's refcnt reaches 0, there is a circular dependency.
If we close() the socket holding such skbs, we never call sock_put()
and leak the count, sk, and skb.

TCP has the same problem, and commit e0c8bccd40fc ("net: stream:
purge sk_error_queue in sk_stream_kill_queues()") tried to fix it
by calling skb_queue_purge() during close(). However, there is a
small chance that skb queued in a qdisc or device could be put
into the error queue after the skb_queue_purge() call.

In __skb_tstamp_tx(), the cloned skb should not have a reference
to the ubuf to remove the circular dependency, but skb_clone() does
not call skb_copy_ubufs() for zerocopy skb. So, we need to call
skb_orphan_frags_rx() for the cloned skb to call skb_copy_ubufs().

[0]:
BUG: memory leak
unreferenced object 0xffff88800c6d2d00 (size 1152):
comm "syz-executor392", pid 264, jiffies 4294785440 (age 13.044s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 cd af e8 81 00 00 00 00 ................
02 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00 ...@............
backtrace:
[<0000000055636812>] sk_prot_alloc+0x64/0x2a0 net/core/sock.c:2024
[<0000000054d77b7a>] sk_alloc+0x3b/0x800 net/core/sock.c:2083
[<0000000066f3c7e0>] inet_create net/ipv4/af_inet.c:319 [inline]
[<0000000066f3c7e0>] inet_create+0x31e/0xe40 net/ipv4/af_inet.c:245
[<000000009b83af97>] __sock_create+0x2ab/0x550 net/socket.c:1515
[<00000000b9b11231>] sock_create net/socket.c:1566 [inline]
[<00000000b9b11231>] __sys_socket_create net/socket.c:1603 [inline]
[<00000000b9b11231>] __sys_socket_create net/socket.c:1588 [inline]
[<00000000b9b11231>] __sys_socket+0x138/0x250 net/socket.c:1636
[<000000004fb45142>] __do_sys_socket net/socket.c:1649 [inline]
[<000000004fb45142>] __se_sys_socket net/socket.c:1647 [inline]
[<000000004fb45142>] __x64_sys_socket+0x73/0xb0 net/socket.c:1647
[<0000000066999e0e>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<0000000066999e0e>] do_syscall_64+0x38/0x90 arch/x86/entry/common.c:80
[<0000000017f238c1>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff888017633a00 (size 240):
comm "syz-executor392", pid 264, jiffies 4294785440 (age 13.044s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 2d 6d 0c 80 88 ff ff .........-m.....
backtrace:
[<000000002b1c4368>] __alloc_skb+0x229/0x320 net/core/skbuff.c:497
[<00000000143579a6>] alloc_skb include/linux/skbuff.h:1265 [inline]
[<00000000143579a6>] sock_omalloc+0xaa/0x190 net/core/sock.c:2596
[<00000000be626478>] msg_zerocopy_alloc net/core/skbuff.c:1294 [inline]
[<00000000be626478>]
---truncated---

Affected products

VendorProductAffectedFixed
Linux Linux 4.14 4.14.315

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.3.7-1 —
Debian 13 linux 6.3.7-1 —
Debian 12 linux 6.1.37-1 —
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield 5.15.0-1022.24 —
Ubuntu 24.04 LTS linux-intel +9 No fix yet —
Ubuntu 22.04 LTS linux 5.15.0-79.86 —
Ubuntu 22.04 LTS linux-aws 5.15.0-1042.47 —
Ubuntu 22.04 LTS linux-azure 5.15.0-1045.52 —
Ubuntu 22.04 LTS linux-azure-fde 5.15.0-1045.52.1 —
Ubuntu 22.04 LTS linux-gcp 5.15.0-1039.47 —
Ubuntu 22.04 LTS linux-gke +1 5.15.0-1039.44 —
Ubuntu 22.04 LTS linux-gkeop 5.15.0-1025.30 —
Ubuntu 22.04 LTS linux-ibm +1 5.15.0-1035.38 —
Ubuntu 22.04 LTS linux-intel-iotg 5.15.0-1037.42 —
Ubuntu 22.04 LTS linux-lowlatency 5.15.0-79.88 —
Ubuntu 22.04 LTS linux-nvidia 5.15.0-1030.30 —
Ubuntu 22.04 LTS linux-nvidia-tegra 5.15.0-1016.16 —
Ubuntu 22.04 LTS linux-nvidia-tegra-igx 5.15.0-1002.2 —
Ubuntu 22.04 LTS linux-oracle 5.15.0-1040.46 —
Ubuntu 22.04 LTS linux-riscv +32 No fix yet —
Ubuntu 22.04 LTS linux-xilinx-zynqmp 5.15.0-1025.29 —
Ubuntu 20.04 LTS linux 5.4.0-162.179 —
Ubuntu 20.04 LTS linux-aws 5.4.0-1109.118 —
Ubuntu 20.04 LTS linux-aws-5.15 5.15.0-1041.46~20.04.1 —
Ubuntu 20.04 LTS linux-azure 5.4.0-1115.122 —
Ubuntu 20.04 LTS linux-azure-5.15 5.15.0-1045.52~20.04.1 —
Ubuntu 20.04 LTS linux-bluefield 5.4.0-1070.76 —
Ubuntu 20.04 LTS linux-gcp 5.4.0-1112.121 —
Ubuntu 20.04 LTS linux-gcp-5.15 5.15.0-1039.47~20.04.1 —
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Ubuntu 20.04 LTS linux-hwe-5.15 5.15.0-79.86~20.04.2 —
Ubuntu 20.04 LTS linux-ibm 5.4.0-1056.61 —
Ubuntu 20.04 LTS linux-ibm-5.15 5.15.0-1036.39~20.04.1 —
Ubuntu 20.04 LTS linux-intel-iotg-5.15 5.15.0-1037.42~20.04.1 —
Ubuntu 20.04 LTS linux-iot 5.4.0-1021.22 —
Ubuntu 20.04 LTS linux-kvm 5.4.0-1098.104 —
Ubuntu 20.04 LTS linux-lowlatency-hwe-5.15 5.15.0-79.88~20.04.1 —
Ubuntu 20.04 LTS linux-nvidia-tegra-5.15 5.15.0-1016.16~20.04.1 —
Ubuntu 20.04 LTS linux-oracle 5.4.0-1108.117 —
Ubuntu 20.04 LTS linux-oracle-5.15 5.15.0-1040.46~20.04.1 —
Ubuntu 20.04 LTS linux-raspi 5.4.0-1093.104 —
Ubuntu 20.04 LTS linux-riscv-5.15 5.15.0-1038.42~20.04.2 —
Ubuntu 20.04 LTS linux-xilinx-zynqmp 5.4.0-1029.33 —
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu Pro Realtime 22.04 LTS linux-intel-iot-realtime 5.15.0-1036.38 —
Ubuntu Pro Realtime 22.04 LTS linux-realtime 5.15.0-1043.48 —
Ubuntu Pro FIPS 20.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS 18.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-updates 20.04 LTS linux-aws-fips 5.4.0-1109.118+fips1 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-azure-fips 5.4.0-1115.122+fips1 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-fips 5.4.0-1084.93 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-gcp-fips 5.4.0-1112.121+fips1 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-preview 22.04 LTS linux-fips No fix yet —
Ubuntu Pro 18.04 LTS linux +5 No fix yet —
Ubuntu Pro 18.04 LTS linux-aws-5.4 5.4.0-1109.118~18.04.1 —
Ubuntu Pro 18.04 LTS linux-azure-5.4 5.4.0-1115.122~18.04.1 —
Ubuntu Pro 18.04 LTS linux-gcp-5.4 5.4.0-1112.121~18.04.1 —
Ubuntu Pro 18.04 LTS linux-hwe-5.4 5.4.0-162.179~18.04.1 —
Ubuntu Pro 18.04 LTS linux-ibm-5.4 5.4.0-1056.61~18.04.1 —
Ubuntu Pro 18.04 LTS linux-oracle-5.4 5.4.0-1108.117~18.04.1 —
Ubuntu Pro 18.04 LTS linux-raspi-5.4 5.4.0-1093.104~18.04.1 —
Ubuntu Pro 16.04 LTS linux-gcp +4 No fix yet —
Ubuntu Pro 14.04 LTS linux-azure No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 bpftool 7.2.0-362.8.1.el9_3 RHSA-2023:6583
RHEL 9 rv +64 5.14.0-362.8.1.el9_3 RHSA-2023:6583
ReleasePackageFixed inAdvisory
SLES 15 SP5 kernel-64kb +6 5.14.21-150500.55.124.1 SUSE-SU-2025:03615-1
SLES 15 SP5 kernel-default-base 5.14.21-150500.55.124.1.150500.6.59.1 SUSE-SU-2025:03615-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP5 kernel-default-base 5.14.21-150500.55.124.1.150500.6.59.1 SUSE-SU-2025:03615-1
SLES for SAP 15 SP5 kernel-docs +4 5.14.21-150500.55.124.1 SUSE-SU-2025:03615-1
SLE Micro 5.5 kernel-default-base 5.14.21-150500.55.124.1.150500.6.59.1 SUSE-SU-2025:03615-1
SLE Micro 5.5 kernel-rt +1 5.14.21-150500.13.109.1 SUSE-SU-2025:3761-1
SLE Micro 5.5 kernel-source +1 5.14.21-150500.55.124.1 SUSE-SU-2025:03615-1
SLE Live Patching 15 SP5 kernel-default 5.14.21-150500.55.124.1 SUSE-SU-2025:03615-1
SLE Live Patching 15 SP5 kernel-livepatch-SLE15-SP5_Update_31 1-150500.11.3.1 SUSE-SU-2025:03615-1
SLE HPC 15 SP5 kernel-64kb +5 5.14.21-150500.55.124.1 SUSE-SU-2025:03615-1
SLE HPC 15 SP5 kernel-default-base 5.14.21-150500.55.124.1.150500.6.59.1 SUSE-SU-2025:03615-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 kernel-livepatch-6.1.29-47.49 1.0-0.amzn2023 ALAS2023-2023-184
Amazon Linux 2023 perf +12 6.1.29-47.49.amzn2023 ALAS2023-2023-184
Amazon Linux 2 kernel-livepatch-4.14.318-240.529 1.0-0.amzn2 ALAS2-2023-2100
Amazon Linux 2 perf +8 4.14.318-240.529.amzn2 ALAS2-2023-2100

Advisories 6

References