# CVE-2024-47794: bpf: Prevent tailcall infinite loop caused by freplace

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-835
- **Published:** 2025-01-11T12:25:14.419Z
- **Modified:** 2026-10-30T13:17:37.863Z

## Who should check

- Anyone running Linux \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< 272f92998cbec9e12fea8ef28f48d6b1bc625a34; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< 987aa730bad3e1ef66d9f30182294daa78f6387d; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< d6083f040d5d8f8d748462c77e90547097df936e
- Anyone running Linux 5.6

## Description

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

bpf: Prevent tailcall infinite loop caused by freplace

There is a potential infinite loop issue that can occur when using a
combination of tail calls and freplace.

In an upcoming selftest, the attach target for entry\_freplace of
tailcall\_freplace.c is subprog\_tc of tc\_bpf2bpf.c, while the tail call in
entry\_freplace leads to entry\_tc. This results in an infinite loop:

entry\_tc -\> subprog\_tc -\> entry\_freplace --tailcall-\> entry\_tc.

The problem arises because the tail\_call\_cnt in entry\_freplace resets to
zero each time entry\_freplace is executed, causing the tail call mechanism
to never terminate, eventually leading to a kernel panic.

To fix this issue, the solution is twofold:

1. Prevent updating a program extended by an freplace program to a
   prog\_array map.
2. Prevent extending a program that is already part of a prog\_array map
   with an freplace program.

This ensures that:

\* If a program or its subprogram has been extended by an freplace program,
  it can no longer be updated to a prog\_array map.
\* If a program has been added to a prog\_array map, neither it nor its
  subprograms can be extended by an freplace program.

Moreover, an extension program should not be tailcalled. As such, return
-EINVAL if the program has a type of BPF\_PROG\_TYPE\_EXT when adding it to a
prog\_array map.

Additionally, fix a minor code style issue by replacing eight spaces with a
tab for proper formatting.

## Affected and fixed versions

- Linux: \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< 272f92998cbec9e12fea8ef28f48d6b1bc625a34; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< 987aa730bad3e1ef66d9f30182294daa78f6387d; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< d6083f040d5d8f8d748462c77e90547097df936e (cvelist)
- Linux: 5.6 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-47794. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-47794.md
Affected: Linux >= be8704ff07d2374bcc5c675526f95e70c6459683, < 272f92998cbec9e12fea8ef28f48d6b1bc625a34; >= be8704ff07d2374bcc5c675526f95e70c6459683, < f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6; >= be8704ff07d2374bcc5c675526f95e70c6459683, < 987aa730bad3e1ef66d9f30182294daa78f6387d; >= be8704ff07d2374bcc5c675…
Fixed in: Linux 272f92998cbec9e12fea8ef28f48d6b1bc625a34, Linux 987aa730bad3e1ef66d9f30182294daa78f6387d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-47794 being exploited?

There is no confirmed exploitation: CVE-2024-47794 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-47794?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< 272f92998cbec9e12fea8ef28f48d6b1bc625a34; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< 987aa730bad3e1ef66d9f30182294daa78f6387d; \>= be8704ff07d2374bcc5c675526f95e70c6459683, \< d6083f040d5d8f8d748462c77e90547097df936e; Linux 5.6.

### Is there a fix for CVE-2024-47794?

Yes. Fixed in Linux 272f92998cbec9e12fea8ef28f48d6b1bc625a34, Linux 987aa730bad3e1ef66d9f30182294daa78f6387d. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-47794?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/987aa730bad3e1ef66d9f30182294daa78f6387d>
- patch: <https://git.kernel.org/stable/c/d6083f040d5d8f8d748462c77e90547097df936e>
- other: <https://git.kernel.org/stable/c/272f92998cbec9e12fea8ef28f48d6b1bc625a34>
- other: <https://git.kernel.org/stable/c/f8ba0d22afa613b280fc40fcf6ae99f73c7b36e6>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-47794>

HTML: <https://flawdb.com/CVE-2024-47794> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-47794>
