# CVE-2024-2314: Path traversal in BPF Compiler Collection

> An unprivileged attacker can force bcc to load compromised kernel headers from a temporary directory, potentially leading to code execution.

- **Severity:** Low 2.8 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Mar 2024
- **Updated:** 30 Oct 2024
- **Also known as:** ALSA-2024:8831, ALSA-2024:9187, AZL-38914, BELL-CVE-2024-2314, CLSA-2026-1789740903, DEBIAN-CVE-2024-2314, GHSA-883r-qq2g-w5xj, OESA-2024-2502, RHSA-2024:8831, RHSA-2024:9187, RLSA-2024:8831

## What is CVE-2024-2314?

CVE-2024-2314 is a low-severity path traversal vulnerability in IOVisor BPF Compiler Collection, published on 10 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

If kernel headers need to be extracted, bcc will attempt to load them from a temporary directory. An unprivileged attacker could use this to force bcc to load compromised linux headers. Linux distributions which provide kernel headers by default are not affected by default.

## Which versions are affected by CVE-2024-2314?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bcc-devel` | AlmaLinux:8 | All versions | 0.25.0-9.el8_10 |
| `bcc-doc` | AlmaLinux:8 | All versions | 0.25.0-9.el8_10 |
| `bcc` | AlmaLinux:9 | All versions | 0.30.0-6.el9 |
| `bcc-devel` | AlmaLinux:9 | All versions | 0.30.0-6.el9 |
| `bcc-doc` | AlmaLinux:9 | All versions | 0.30.0-6.el9 |
| `bcc-tools` | AlmaLinux:9 | All versions | 0.30.0-6.el9 |
| `libbpf-tools` | AlmaLinux:9 | All versions | 0.30.0-6.el9 |
| `python3-bcc` | AlmaLinux:9 | All versions | 0.30.0-6.el9 |
| `bcc` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.25.0-9.el8_10 |
| `bcc-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.25.0-9.el8_10 |
| `bcc-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.25.0-9.el8_10 |
| `bcc-tools` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.25.0-9.el8_10 |
| `bcc-tools-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.25.0-9.el8_10 |
| `python3-bcc` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.25.0-9.el8_10 |
| `bcc-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:0.25.0-9.el8_10 |
| `bcc-debugsource` | Red Hat:enterprise_linux:8::crb | All versions | 0:0.25.0-9.el8_10 |
| `bcc-devel` | Red Hat:enterprise_linux:8::crb | All versions | 0:0.25.0-9.el8_10 |
| `bcc-doc` | Red Hat:enterprise_linux:8::crb | All versions | 0:0.25.0-9.el8_10 |
| `bcc-tools-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:0.25.0-9.el8_10 |
| `bcc` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `bcc-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `bcc-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `bcc-tools` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `bcc-tools-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `libbpf-tools` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `libbpf-tools-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `python3-bcc` | Red Hat:enterprise_linux:9::appstream | All versions | 0:0.30.0-6.el9 |
| `bcc-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:0.30.0-6.el9 |
| `bcc-debugsource` | Red Hat:enterprise_linux:9::crb | All versions | 0:0.30.0-6.el9 |
| `bcc-devel` | Red Hat:enterprise_linux:9::crb | All versions | 0:0.30.0-6.el9 |
| `bcc-doc` | Red Hat:enterprise_linux:9::crb | All versions | 0:0.30.0-6.el9 |
| `bcc-tools-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:0.30.0-6.el9 |
| `libbpf-tools-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:0.30.0-6.el9 |
| `bcc` | Rocky Linux:8 | All versions | 0:0.25.0-9.el8_10 |

Products: Iovisor Bpf Compiler Collection.

## How do I fix CVE-2024-2314?

Apply the vendor's patch.

## Is CVE-2024-2314 being exploited?

There is no known exploitation of CVE-2024-2314 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-2314 and fix it if it is affected.

What it is: CVE-2024-2314 is a low-severity path traversal vulnerability in IOVisor BPF Compiler Collection, published on 10 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-2314 in the wild and no public exploit code.

Affected product: IOVisor BPF Compiler Collection. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-2314/ (Markdown: https://insights.sbomify.com/CVE-2024-2314/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-2314
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-2314
- OSV: https://osv.dev/vulnerability/CVE-2024-2314

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-2314/
Summaries are generated and may contain mistakes; the official description above is the record.
