Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-38166

published high CVSS 3.1 · 7.8

bpf: fix ktls panic with sockmap

Published
03 Jul 2025, 08:36:06 UTC
Updated
15 Oct 2026, 21:52:10 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxd3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 328cac3f9f8ae394748485e769a527518a9137c8 · d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 2e36a81d388ec9c3f78b6223f7eda2088cd40adb · d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 57fbbe29e86042bbaa31c1a30d2afa16c427e3f7 · d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 603943f022a7fe5cc83ca7005faf34798fb7853f · d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 54a3ecaeeeae8176da8badbd7d72af1017032c39 · Other versions: unaffected Affected Not stated Linux
Linux — Linux4.20 (affected) · 0 to < 4.20 (unaffected · semver) · 6.1.142 through 6.1.* (unaffected · semver) · 6.6.94 through 6.6.* (unaffected · semver) · 6.12.34 through 6.12.* (unaffected · semver) · 6.15.3 through 6.15.* (unaffected · semver) · 6.16 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected; No Fix Planned Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2025-1080 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2025-1111 Fixed Not stated Amazon Linux assessment
AlmaLinux 10 kernel-abi-stablelists Advisory build 6.12.0-211.7.1.el10_2 ALSA-2026:18134
Debian bookworm linux Advisory build 6.1.147-1 DSA-5973-1
Oracle Linux 10 kernelx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Show 97 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
AlmaLinux 10 kernel-doc Advisory build 6.12.0-211.7.1.el10_2 ALSA-2026:18134
AlmaLinux 9 kernel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-debug Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-debug-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-debug-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-debug-devel-matched Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-debug-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-debug-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-debug-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-devel-matched Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-64k-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-abi-stablelists Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-cross-headers Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug-devel-matched Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-debug-uki-virt Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-devel-matched Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-doc Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-headers Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-debug Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-debug-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-debug-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-debug-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-debug-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-debug-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-64k-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-debug Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-debug-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-debug-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-debug-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-debug-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-debug-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-rt-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-tools Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-tools-libs Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-tools-libs-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-uki-virt Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-uki-virt-addons Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-zfcpdump Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-zfcpdump-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-zfcpdump-devel Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-zfcpdump-devel-matched Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-zfcpdump-modules Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-zfcpdump-modules-core Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 kernel-zfcpdump-modules-extra Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 libperf Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 perf Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 python3-perf Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 rtla Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
AlmaLinux 9 rv Advisory build 5.14.0-687.5.1.el9_8 ALSA-2026:18587
Debian bullseye linux-6.1 Advisory build 6.1.153-1~deb11u1 DLA-4328-1
Oracle Linux 10 kernel-abi-stablelistsx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-cross-headersaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-cross-headersx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debugx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-develx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-devel-matchedx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-modulesx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-modules-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-modules-extrax86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-uki-virtx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-develx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-devel-matchedx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-docx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-headersaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-headersx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modulesx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modules-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modules-extrax86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modules-extra-matchedx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134

Package entries are limited to the first 100 builds and 100 linked advisories.

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: fix ktls panic with sockmap [ 2172.936997] ------------[ cut here ]------------ [ 2172.936999] kernel BUG at lib/iov_iter.c:629! ...... [ 2172.944996] PKRU: 55555554 [ 2172.945155] Call Trace: [ 2172.945299] <TASK> [ 2172.945428] ? die+0x36/0x90 [ 2172.945601] ? do_trap+0xdd/0x100 [ 2172.945795] ? iov_iter_revert+0x178/0x180 [ 2172.946031] ? iov_iter_revert+0x178/0x180 [ 2172.946267] ? do_error_trap+0x7d/0x110 [ 2172.946499] ? iov_iter_revert+0x178/0x180 [ 2172.946736] ? exc_invalid_op+0x50/0x70 [ 2172.946961] ? iov_iter_revert+0x178/0x180 [ 2172.947197] ? asm_exc_invalid_op+0x1a/0x20 [ 2172.947446] ? iov_iter_revert+0x178/0x180 [ 2172.947683] ? iov_iter_revert+0x5c/0x180 [ 2172.947913] tls_sw_sendmsg_locked.isra.0+0x794/0x840 [ 2172.948206] tls_sw_sendmsg+0x52/0x80 [ 2172.948420] ? inet_sendmsg+0x1f/0x70 [ 2172.948634] __sys_sendto+0x1cd/0x200 [ 2172.948848] ? find_held_lock+0x2b/0x80 [ 2172.949072] ? syscall_trace_enter+0x140/0x270 [ 2172.949330] ? __lock_release.isra.0+0x5e/0x170 [ 2172.949595] ? find_held_lock+0x2b/0x80 [ 2172.949817] ? syscall_trace_enter+0x140/0x270 [ 2172.950211] ? lockdep_hardirqs_on_prepare+0xda/0x190 [ 2172.950632] ? ktime_get_coarse_real_ts64+0xc2/0xd0 [ 2172.951036] __x64_sys_sendto+0x24/0x30 [ 2172.951382] do_syscall_64+0x90/0x170 ...... After calling bpf_exec_tx_verdict(), the size of msg_pl->sg may increase, e.g., when the BPF program executes bpf_msg_push_data(). If the BPF program sets cork_bytes and sg.size is smaller than cork_bytes, it will return -ENOSPC and attempt to roll back to the non-zero copy logic. However, during rollback, msg->msg_iter is reset, but since msg_pl->sg.size has been increased, subsequent executions will exceed the actual size of msg_iter. ''' iov_iter_revert(&msg->msg_iter, msg_pl->sg.size - orig_size); ''' The changes in this commit are based on the following considerations: 1. When cork_bytes is set, rolling back to non-zero copy logic is pointless and can directly go to zero-copy logic. 2. We can not calculate the correct number of bytes to revert msg_iter. Assume the original data is "abcdefgh" (8 bytes), and after 3 pushes by the BPF program, it becomes 11-byte data: "abc?de?fgh?". Then, we set cork_bytes to 6, which means the first 6 bytes have been processed, and the remaining 5 bytes "?fgh?" will be cached until the length meets the cork_bytes requirement. However, some data in "?fgh?" is not within 'sg->msg_iter' (but in msg_pl instead), especially the data "?" we pushed. So it doesn't seem as simple as just reverting through an offset of msg_iter. 3. For non-TLS sockets in tcp_bpf_sendmsg, when a "cork" situation occurs, the user-space send() doesn't return an error, and the returned length is the same as the input length parameter, even if some data is cached. Additionally, I saw that the current non-zero-copy logic for handling corking is written as: ''' line 1177 else if (ret != -EAGAIN) { if (ret == -ENOSPC) ret = 0; goto send_end; ''' So it's ok to just return 'copied' without error when a "cork" situation occurs.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

48

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The trigger is a local `sendmsg()`/`sendto()` syscall on a kTLS socket enrolled in a sockmap, and the data driving the bug is the calling process's own send buffer plus the sk_msg BPF verdict — not data received from a remote peer. This is the kTLS transmit path combined with BPF/sockmap, both of which are locally reachable only. AC:L - Exploitation is fully deterministic — no race, no memory-layout grooming, no timing window; the attacker simply issues a `send()` whose length falls below the program's `cork_bytes` threshold and the `BUG()` fires every time. The attacker additionally chooses ITER_UBUF vs ITER_IOVEC by controlling `nr_segs`, selecting between the guaranteed panic and the out-of-bounds iterator walk. PR:L - Enabling kTLS TX requires no capability whatsoever (net/tls contains no `capable()` checks), and in the standard sockmap deployment the `sk_msg` program is installed by the platform/service mesh with sockets auto-enrolled on connect, so an ordinary unprivileged local user needs only a socket and a `send()` call. Where the attacker supplies the BPF program, `bpf_token_capable()` also grants `CAP_BPF`/`CAP_NET_ADMIN` inside a user namespace via a delegated BPF token. UI:N - The attacker performs every step themselves — create socket, enable kTLS, call send(). No action by any other user or administrator is needed at exploitation time. S:U - The corruption and the crash are confined to the kernel's own memory and the attacking task's socket state; no hypervisor, IOMMU, or sandbox boundary is crossed. C:H - With ≥2 iovecs, `iov_iter_revert()` walks backwards off the front of `iovstack[]` in an unbounded loop, reading kernel-stack qwords as `iov_len` and leaving `i->__iov` pointing at out-of-bounds kernel memory adjacent to the attacker-seeded `sockaddr_storage`; `i->count` is simultaneously inflated past the end of the user buffer, and the corrupted iterator is then used for further copies. This unbounded OOB kernel read plus live-iterator corruption is a disclosure primitive. I:H - The faulty revert writes an out-of-bounds pointer, inflated `nr_segs`, and an `iov_offset` derived from out-of-bounds kernel memory into a live kernel iterator whose neighbouring stack contents the attacker controls via `msg_name`, and the `sg.size`/`sk_mem_charge` accounting diverges from reality. Memory-safety corruption of this nature is scored High. A:H - The common single-buffer case hits a guaranteed `BUG()` at lib/iov_iter.c:629 while holding both `tls_ctx->tx_lock` and the socket lock, so the killed task self-deadlocks in `tls_sk_proto_close()` during exit — an unkillable D-state task with a permanently wedged socket and leaked memory. On systems with `panic_on_oops` it is an immediate full system panic, and it is trivially repeatable.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 328cac3f9f8ae394748485e769a527518a9137c8 (affected · git)d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 2e36a81d388ec9c3f78b6223f7eda2088cd40adb (affected · git)d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 57fbbe29e86042bbaa31c1a30d2afa16c427e3f7 (affected · git)d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 603943f022a7fe5cc83ca7005faf34798fb7853f (affected · git)d3b18ad31f93d0b6bae105c679018a1ba7daa9ca to < 54a3ecaeeeae8176da8badbd7d72af1017032c39 (affected · git)Default: unaffected Linux · cna
Linux Linux 4.20 (affected)0 to < 4.20 (unaffected · semver)6.1.142 through 6.1.* (unaffected · semver)6.6.94 through 6.6.* (unaffected · semver)6.12.34 through 6.12.* (unaffected · semver)6.15.3 through 6.15.* (unaffected · semver)6.16 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

6

Provider assertions

3

Linux · cna

bpf: fix ktls panic with sockmap

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
b92c8876712b7daa4d3a4e668305cc5fbae4fdad109f92fc3900ab7dab5ffed7
Ingested
15 Oct 2026, 23:26:24 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected