CVE-2025-40078

bpf: Explicitly check accesses to bpf_sock_addr

No CVSS score yet EPSS 0.25%

Published 28 Oct 2025 Updated 10 Nov 2026 CNA: Linux

Check your servers for CVE-2025-40078

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-40078 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

bpf: Explicitly check accesses to bpf_sock_addr

Syzkaller found a kernel warning on the following sock_addr program:

0: r0 = 0 1: r2 = *(u32 *)(r1 +60) 2: exit

which triggers:

verifier bug: error during ctx access conversion (0)

This is happening because offset 60 in bpf_sock_addr corresponds to an implicit padding of 4 bytes, right after msg_src_ip4. Access to this padding isn't rejected in sock_addr_is_valid_access and it thus later fails to convert the access.

This patch fixes it by explicitly checking the various fields of bpf_sock_addr in sock_addr_is_valid_access.

I checked the other ctx structures and is_valid_access functions and didn't find any other similar cases. Other cases of (properly handled) padding are covered in new tests in a subsequent patch.

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 18.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before de44cdc50d2dce8718cb57deddf9cf1be9a7759f
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before 76e04bbb4296fb6eac084dbfc27e02ccc744db3e
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before 6d8b1a21fd5c34622b0c3893c61e4a38d8ba53ec
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before 4f00858cd9bbbdf67159e28b85a8ca9e77c83622
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before cdeafacb4f9ff261a96baef519e29480fd7b1019
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before fe9d33f0470350558cb08cecb54cf2267b3a45d2
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before ad8b4fe5617e3c85fc23267f02500c4f3bf0ff69
affected from 1cedee13d25ab118d325f95588c1a084e9317229, before 6fabca2fc94d33cdf7ec102058983b086293395f
Other versions: unaffected
Linux
affected 4.18
unaffected before 4.18
unaffected from 5.4.301 up to and including 5.4.*
unaffected from 5.10.246 up to and including 5.10.*
unaffected from 5.15.195 up to and including 5.15.*
unaffected from 6.1.156 up to and including 6.1.*
unaffected from 6.6.112 up to and including 6.6.*
unaffected from 6.12.53 up to and including 6.12.*
unaffected from 6.17.3 up to and including 6.17.*
unaffected 6.18 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-40078 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-40078

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-40078
trivy image --scanners vuln IMAGE | grep CVE-2025-40078

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-40078 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.