CVE-2023-54181
bpf: Fix issue in verifying allow_ptr_leaks
Check your servers for CVE-2023-54181
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-2023-54181 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.
Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix issue in verifying allow_ptr_leaks
After we converted the capabilities of our networking-bpf program from cap_sys_admin to cap_net_admin+cap_bpf, our networking-bpf program failed to start. Because it failed the bpf verifier, and the error log is "R3 pointer comparison prohibited".
A simple reproducer as follows,
SEC("cls-ingress") int ingress(struct __sk_buff *skb) { struct iphdr *iph = (void *)(long)skb->data + sizeof(struct ethhdr);
if ((long)(iph + 1) > (long)skb->data_end) return TC_ACT_STOLEN; return TC_ACT_OK; }
Per discussion with Yonghong and Alexei [1], comparison of two packet pointers is not a pointer leak. This patch fixes it.
Our local kernel is 6.1.y and we expect this fix to be backported to 6.1.y, so stable is CCed.
[1]. https://lore.kernel.org/bpf/CAADnVQ+Nmspr7Si+pxWn8zkE7hX-7s93ugwC+94aXSy4uQ9vBg@mail.gmail.com/
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 12.7% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366, before c96c67991aac6401b4c6996093bccb704bb2ea4b affected from 2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366, before 5927f0172d2809d8fc09c1ba667280b0387e9f73 affected from 2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366, before acfdc8b77016c8e648aadc283177546c88083dd3 affected from 2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366, before d75e30dddf73449bc2d10bb8e2f1a2c446bc67a2
Other versions: unaffected
|
| Linux |
affected 5.8 unaffected before 5.8 unaffected from 6.1.53 up to and including 6.1.* unaffected from 6.4.16 up to and including 6.4.* unaffected from 6.5.3 up to and including 6.5.* unaffected 6.6 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-2023-54181 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-54181
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-2023-54181
trivy image --scanners vuln IMAGE | grep CVE-2023-54181
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
- https://git.kernel.org/stable/c/c96c67991aac6401b4c6996093bccb704bb2ea4b git.kernel.org
- https://git.kernel.org/stable/c/5927f0172d2809d8fc09c1ba667280b0387e9f73 git.kernel.org
- https://git.kernel.org/stable/c/acfdc8b77016c8e648aadc283177546c88083dd3 git.kernel.org
- https://git.kernel.org/stable/c/d75e30dddf73449bc2d10bb8e2f1a2c446bc67a2 git.kernel.org
Source: the record CVE-2023-54181 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.
Vulnpocalypse