# CVE-2021-47300: bpf: Fix tail\_call\_reachable rejection for interpreter when jit failed

> 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-125
- **Published:** 2024-05-21T14:35:22.040Z
- **Modified:** 2026-08-05T08:47:09.253Z

## Who should check

- Anyone running Linux \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< 39f1735c8107ef43a53c4daf82f330d880488d8f; \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< cbb086074dab631ac43f8645cbac1d7b148e05c4; \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< 5dd0a6b8582ffbfa88351949d50eccd5b6694ade
- Anyone running Linux 5.10

## Description

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

bpf: Fix tail\_call\_reachable rejection for interpreter when jit failed

During testing of f263a81451c1 ("bpf: Track subprog poke descriptors correctly
and fix use-after-free") under various failure conditions, for example, when
jit\_subprogs() fails and tries to clean up the program to be run under the
interpreter, we ran into the following freeze:

  \[...\]
  \#127/8 tailcall\_bpf2bpf\_3:FAIL
  \[...\]
  \[   92.041251\] BUG: KASAN: slab-out-of-bounds in \_\_\_bpf\_prog\_run+0x1b9d/0x2e20
  \[   92.042408\] Read of size 8 at addr ffff88800da67f68 by task test\_progs/682
  \[   92.043707\]
  \[   92.044030\] CPU: 1 PID: 682 Comm: test\_progs Tainted: G   O   5.13.0-53301-ge6c08cb33a30-dirty \#87
  \[   92.045542\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014
  \[   92.046785\] Call Trace:
  \[   92.047171\]  ? \_\_bpf\_prog\_run\_args64+0xc0/0xc0
  \[   92.047773\]  ? \_\_bpf\_prog\_run\_args32+0x8b/0xb0
  \[   92.048389\]  ? \_\_bpf\_prog\_run\_args64+0xc0/0xc0
  \[   92.049019\]  ? ktime\_get+0x117/0x130
  \[...\] // few hundred \[similar\] lines more
  \[   92.659025\]  ? ktime\_get+0x117/0x130
  \[   92.659845\]  ? \_\_bpf\_prog\_run\_args64+0xc0/0xc0
  \[   92.660738\]  ? \_\_bpf\_prog\_run\_args32+0x8b/0xb0
  \[   92.661528\]  ? \_\_bpf\_prog\_run\_args64+0xc0/0xc0
  \[   92.662378\]  ? print\_usage\_bug+0x50/0x50
  \[   92.663221\]  ? print\_usage\_bug+0x50/0x50
  \[   92.664077\]  ? bpf\_ksym\_find+0x9c/0xe0
  \[   92.664887\]  ? ktime\_get+0x117/0x130
  \[   92.665624\]  ? kernel\_text\_address+0xf5/0x100
  \[   92.666529\]  ? \_\_kernel\_text\_address+0xe/0x30
  \[   92.667725\]  ? unwind\_get\_return\_address+0x2f/0x50
  \[   92.668854\]  ? \_\_\_bpf\_prog\_run+0x15d4/0x2e20
  \[   92.670185\]  ? ktime\_get+0x117/0x130
  \[   92.671130\]  ? \_\_bpf\_prog\_run\_args64+0xc0/0xc0
  \[   92.672020\]  ? \_\_bpf\_prog\_run\_args32+0x8b/0xb0
  \[   92.672860\]  ? \_\_bpf\_prog\_run\_args64+0xc0/0xc0
  \[   92.675159\]  ? ktime\_get+0x117/0x130
  \[   92.677074\]  ? lock\_is\_held\_type+0xd5/0x130
  \[   92.678662\]  ? \_\_\_bpf\_prog\_run+0x15d4/0x2e20
  \[   92.680046\]  ? ktime\_get+0x117/0x130
  \[   92.681285\]  ? \_\_bpf\_prog\_run32+0x6b/0x90
  \[   92.682601\]  ? \_\_bpf\_prog\_run64+0x90/0x90
  \[   92.683636\]  ? lock\_downgrade+0x370/0x370
  \[   92.684647\]  ? mark\_held\_locks+0x44/0x90
  \[   92.685652\]  ? ktime\_get+0x117/0x130
  \[   92.686752\]  ? lockdep\_hardirqs\_on+0x79/0x100
  \[   92.688004\]  ? ktime\_get+0x117/0x130
  \[   92.688573\]  ? \_\_cant\_migrate+0x2b/0x80
  \[   92.689192\]  ? bpf\_test\_run+0x2f4/0x510
  \[   92.689869\]  ? bpf\_test\_timer\_continue+0x1c0/0x1c0
  \[   92.690856\]  ? rcu\_read\_lock\_bh\_held+0x90/0x90
  \[   92.691506\]  ? \_\_kasan\_slab\_alloc+0x61/0x80
  \[   92.692128\]  ? eth\_type\_trans+0x128/0x240
  \[   92.692737\]  ? \_\_build\_skb+0x46/0x50
  \[   92.693252\]  ? bpf\_prog\_test\_run\_skb+0x65e/0xc50
  \[   92.693954\]  ? bpf\_prog\_test\_run\_raw\_tp+0x2d0/0x2d0
  \[   92.694639\]  ? \_\_fget\_light+0xa1/0x100
  \[   92.695162\]  ? bpf\_prog\_inc+0x23/0x30
  \[   92.695685\]  ? \_\_sys\_bpf+0xb40/0x2c80
  \[   92.696324\]  ? bpf\_link\_get\_from\_fd+0x90/0x90
  \[   92.697150\]  ? mark\_held\_locks+0x24/0x90
  \[   92.698007\]  ? lockdep\_hardirqs\_on\_prepare+0x124/0x220
  \[   92.699045\]  ? finish\_task\_switch+0xe6/0x370
  \[   92.700072\]  ? lockdep\_hardirqs\_on+0x79/0x100
  \[   92.701233\]  ? finish\_task\_switch+0x11d/0x370
  \[   92.702264\]  ? \_\_switch\_to+0x2c0/0x740
  \[   92.703148\]  ? mark\_held\_locks+0x24/0x90
  \[   92.704155\]  ? \_\_x64\_sys\_bpf+0x45/0x50
  \[   92.705146\]  ? do\_syscall\_64+0x35/0x80
  \[   92.706953\]  ? entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
  \[...\]

Turns out that the program rejection from e411901c0b77 ("bpf: allow for tailcalls
in BPF subprograms for x64 JIT") is buggy since env-\>prog-\>aux-\>tail\_call\_reachable
is never true. Commit ebf7d1f508a7 ("bpf, x64: rework pro/epilogue and tailcall
handling in JIT") added a tracker into check\_max\_stack\_depth() which propagates
the tail\_call\_reachable condition throughout the subprograms. This info is then
assigned to the subprogram's 
---truncated---

## Affected and fixed versions

- Linux: \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< 39f1735c8107ef43a53c4daf82f330d880488d8f; \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< cbb086074dab631ac43f8645cbac1d7b148e05c4; \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< 5dd0a6b8582ffbfa88351949d50eccd5b6694ade (cvelist)
- Linux: 5.10 (cvelist)

## Mitigation

- Upgrade Linux to 5dd0a6b8582ffbfa88351949d50eccd5b6694ade or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2021-47300.md
Affected: Linux >= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, < 39f1735c8107ef43a53c4daf82f330d880488d8f; >= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, < cbb086074dab631ac43f8645cbac1d7b148e05c4; >= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, < 5dd0a6b8582ffbfa88351949d50eccd5b6694ade; Linux 5.10
Fixed in: Linux 39f1735c8107ef43a53c4daf82f330d880488d8f, Linux 5dd0a6b8582ffbfa88351949d50eccd5b6694ade

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-2021-47300 being exploited?

There is no confirmed exploitation: CVE-2021-47300 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-2021-47300?

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

### Which versions are affected by CVE-2021-47300?

Linux \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< 39f1735c8107ef43a53c4daf82f330d880488d8f; \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< cbb086074dab631ac43f8645cbac1d7b148e05c4; \>= ebf7d1f508a73871acf3b2bfbfa1323a477acdb3, \< 5dd0a6b8582ffbfa88351949d50eccd5b6694ade; Linux 5.10.

### Is there a fix for CVE-2021-47300?

Yes. Fixed in Linux 39f1735c8107ef43a53c4daf82f330d880488d8f, Linux 5dd0a6b8582ffbfa88351949d50eccd5b6694ade. Upgrade Linux to 5dd0a6b8582ffbfa88351949d50eccd5b6694ade or later.

### How do I check if I'm affected by CVE-2021-47300?

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/39f1735c8107ef43a53c4daf82f330d880488d8f>
- patch: <https://git.kernel.org/stable/c/cbb086074dab631ac43f8645cbac1d7b148e05c4>
- patch: <https://git.kernel.org/stable/c/5dd0a6b8582ffbfa88351949d50eccd5b6694ade>

## 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-2021-47300>

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