🛡️ UBUNTU-CVE-2025-38166
⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

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] [ 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.

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2025-07-03
Updated 2026-06-15
Modified 2026-06-08
Fix URL N/A

Affected Packages

Software From version Fixed in
linux 6.8.0-100.100
linux-allwinner-5.19
linux-aws 6.8.0-1046.49
linux-aws-5.0
linux-aws-5.11
linux-aws-5.13
linux-aws-5.15
linux-aws-5.19
linux-aws-5.3
linux-aws-5.4
linux-aws-5.8
linux-aws-6.14 6.14.0-1013.13~24.04.1
linux-aws-6.2
linux-aws-6.5
linux-aws-6.8 6.8.0-1046.49~22.04.1
linux-aws-fips 6.8.0-1046.49+fips1
linux-azure 6.8.0-1046.52
linux-azure-5.11
linux-azure-5.13
linux-azure-5.15
linux-azure-5.19
linux-azure-5.3
linux-azure-5.4
linux-azure-5.8
linux-azure-6.11
linux-azure-6.2
linux-azure-6.5
linux-azure-6.8 6.8.0-1051.57~22.04.1
linux-azure-edge
linux-azure-fde
linux-azure-fde-5.19
linux-azure-fde-6.17
linux-azure-fde-6.2
linux-azure-fde-6.8
linux-azure-fips 6.8.0-1046.52+fips1
linux-azure-nvidia
linux-azure-nvidia-6.14 6.14.0-1007.7
linux-bluefield
linux-fips 6.8.0-100.100+fips1
linux-gcp 6.8.0-1047.50
linux-gcp-5.11
linux-gcp-5.13
linux-gcp-5.15
linux-gcp-5.19
linux-gcp-5.3
linux-gcp-5.4
linux-gcp-5.8
linux-gcp-6.11
linux-gcp-6.14 6.14.0-1016.17~24.04.1
linux-gcp-6.2
linux-gcp-6.5
linux-gcp-6.8 6.8.0-1047.50~22.04.2
linux-gcp-fips 6.8.0-1047.50+fips1
linux-gke 6.8.0-1043.48
linux-gke-4.15
linux-gke-5.15
linux-gke-5.4
linux-gkeop 6.8.0-1030.33
linux-gkeop-5.15
linux-gkeop-5.4
linux-hwe
linux-hwe-5.11
linux-hwe-5.13
linux-hwe-5.15
linux-hwe-5.19
linux-hwe-5.4
linux-hwe-5.8
linux-hwe-6.11
linux-hwe-6.2
linux-hwe-6.5
linux-hwe-6.8 6.8.0-100.100~22.04.1
linux-hwe-edge
linux-ibm 6.8.0-1044.44
linux-ibm-5.15
linux-ibm-5.4
linux-ibm-6.8 6.8.0-1044.44~22.04.1
linux-intel
linux-intel-5.13
linux-intel-iot-realtime
linux-intel-iotg
linux-intel-iotg-5.15
linux-iot
linux-kvm
linux-lowlatency 6.8.0-100.100.1
linux-lowlatency-hwe-5.15
linux-lowlatency-hwe-5.19
linux-lowlatency-hwe-6.11
linux-lowlatency-hwe-6.2
linux-lowlatency-hwe-6.5
linux-lowlatency-hwe-6.8 6.8.0-100.100.1~22.04.1
linux-nvidia 6.8.0-1046.49
linux-nvidia-6.11
linux-nvidia-6.2
linux-nvidia-6.5
linux-nvidia-6.8 6.8.0-1046.49~22.04.1
linux-nvidia-lowlatency 6.8.0-1046.49.1
linux-nvidia-tegra 6.8.0-1020.20
linux-nvidia-tegra-5.15
linux-nvidia-tegra-igx
linux-oem
linux-oem-5.10
linux-oem-5.13
linux-oem-5.14
linux-oem-5.17
linux-oem-5.6
linux-oem-6.0
linux-oem-6.1
linux-oem-6.11
linux-oem-6.14 6.14.0-1012.12
linux-oem-6.5
linux-oem-6.8
linux-oracle 6.8.0-1043.44
linux-oracle-5.0
linux-oracle-5.11
linux-oracle-5.13
linux-oracle-5.15
linux-oracle-5.3
linux-oracle-5.4
linux-oracle-5.8
linux-oracle-6.14 6.14.0-1013.13~24.04.1
linux-oracle-6.5
linux-oracle-6.8 6.8.0-1043.44~22.04.1
linux-raspi 6.8.0-1047.51
linux-raspi-5.4
linux-raspi-realtime 6.8.0-2037.38
linux-raspi2
linux-realtime 6.8.1-1041.42
linux-realtime-6.14 6.14.0-1012.12~24.04.1
linux-realtime-6.8 6.8.1-1041.42~22.04.1
linux-riscv
linux-riscv-5.11
linux-riscv-5.15
linux-riscv-5.19
linux-riscv-5.8
linux-riscv-6.14 6.14.0-32.32.1~24.04.1
linux-riscv-6.5
linux-riscv-6.8 6.8.0-100.100~22.04.1
linux-starfive-5.19
linux-starfive-6.2
linux-starfive-6.5
linux-xilinx 6.8.0-1023.24
linux-xilinx-zynqmp

References

Similar Threats

Vulnerability Monitoring

Stay informed about vulnerabilities in your stack

BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.