# CVE-2024-35905: bpf: Protect against int overflow for stack access size

> 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.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-129, CWE-190
- **Published:** 2024-05-19T08:34:58.347Z
- **Modified:** 2026-10-15T01:17:52.303Z

## Who should check

- Anyone running Linux \>= afea95d319ccb4ad2060dece9ac5e2e364dec543, \< 9970e059af471478455f9534e8c3db82f8c5496d; \>= 02962684258eb53f414a8a59854767be526e6abb, \< 37dc1718dc0c4392dbfcb9adec22a776e745dd69; \>= b1d4d54d32ce6342f5faffe71bae736540ce7cb5, \< 98cdac206b112bec63852e94802791e316acc2c1; \>= 08b91babccbb168353f8d43fea0ed28a4cad568c, \< 3f0784b2f1eb9147973d8c43ba085c5fdf44ff69; \>= a833a17aeac73b33f79433d7cee68d5cafd71e4f, \< 203a68151e8eeb331d4a64ab78303f3a15faf103; \>= a833a17aeac73b33f79433d7cee68d5cafd71e4f, \< ecc6a2101840177e57c925c102d2d29f260d37c8; 1858b8a331937f3976d8482cd5f6e1f945294ad3; \>= 5.10.209, \< 5.10.215; \>= 5.15.148, \< 5.15.154; \>= 6.1.75, \< 6.1.85; …
- Anyone running Linux 6.8

## Description

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

bpf: Protect against int overflow for stack access size

This patch re-introduces protection against the size of access to stack
memory being negative; the access size can appear negative as a result
of overflowing its signed int representation. This should not actually
happen, as there are other protections along the way, but we should
protect against it anyway. One code path was missing such protections
(fixed in the previous patch in the series), causing out-of-bounds array
accesses in check\_stack\_range\_initialized(). This patch causes the
verification of a program with such a non-sensical access size to fail.

This check used to exist in a more indirect way, but was inadvertendly
removed in a833a17aeac7.

## Affected and fixed versions

- Linux: \>= afea95d319ccb4ad2060dece9ac5e2e364dec543, \< 9970e059af471478455f9534e8c3db82f8c5496d; \>= 02962684258eb53f414a8a59854767be526e6abb, \< 37dc1718dc0c4392dbfcb9adec22a776e745dd69; \>= b1d4d54d32ce6342f5faffe71bae736540ce7cb5, \< 98cdac206b112bec63852e94802791e316acc2c1; \>= 08b91babccbb168353f8d43fea0ed28a4cad568c, \< 3f0784b2f1eb9147973d8c43ba085c5fdf44ff69; \>= a833a17aeac73b33f79433d7cee68d5cafd71e4f, \< 203a68151e8eeb331d4a64ab78303f3a15faf103; \>= a833a17aeac73b33f79433d7cee68d5cafd71e4f, \< ecc6a2101840177e57c925c102d2d29f260d37c8; 1858b8a331937f3976d8482cd5f6e1f945294ad3; \>= 5.10.209, \< 5.10.215; \>= 5.15.148, \< 5.15.154; \>= 6.1.75, \< 6.1.85; … (cvelist)
- Linux: 6.8 (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-35905. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-35905.md
Affected: Linux >= afea95d319ccb4ad2060dece9ac5e2e364dec543, < 9970e059af471478455f9534e8c3db82f8c5496d; >= 02962684258eb53f414a8a59854767be526e6abb, < 37dc1718dc0c4392dbfcb9adec22a776e745dd69; >= b1d4d54d32ce6342f5faffe71bae736540ce7cb5, < 98cdac206b112bec63852e94802791e316acc2c1; >= 08b91babccbb168353f8d43…
Fixed in: Linux 9970e059af471478455f9534e8c3db82f8c5496d, Linux 37dc1718dc0c4392dbfcb9adec22a776e745dd69, Linux 98cdac206b112bec63852e94802791e316acc2c1, Linux 3f0784b2f1eb9147973d8c43ba085c5fdf44ff69, Linux 203a68151e8eeb331d4a64ab78303f3a15faf103, Linux 5.10.215, Linux 5.15.154, Linux 6.1.85

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-35905 being exploited?

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

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

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

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

Linux \>= afea95d319ccb4ad2060dece9ac5e2e364dec543, \< 9970e059af471478455f9534e8c3db82f8c5496d; \>= 02962684258eb53f414a8a59854767be526e6abb, \< 37dc1718dc0c4392dbfcb9adec22a776e745dd69; \>= b1d4d54d32ce6342f5faffe71bae736540ce7cb5, \< 98cdac206b112bec63852e94802791e316acc2c1; \>= 08b91babccbb168353f8d43fea0ed28a4cad568c, \< 3f0784b2f1eb9147973d8c43ba085c5fdf44ff69; \>= a833a17aeac73b33f79433d7cee68d5cafd71e4f, \< 203a68151e8eeb331d4a64ab78303f3a15faf103; \>= a833a17aeac73b33f79433d7cee68d5cafd71e4f, \< ecc6a2101840177e57c925c102d2d29f260d37c8; 1858b8a331937f3976d8482cd5f6e1f945294ad3; \>= 5.10.209, \< 5.10.215; \>= 5.15.148, \< 5.15.154; \>= 6.1.75, \< 6.1.85; …; Linux 6.8.

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

Yes. Fixed in Linux 9970e059af471478455f9534e8c3db82f8c5496d, Linux 37dc1718dc0c4392dbfcb9adec22a776e745dd69, Linux 98cdac206b112bec63852e94802791e316acc2c1, Linux 3f0784b2f1eb9147973d8c43ba085c5fdf44ff69, Linux 203a68151e8eeb331d4a64ab78303f3a15faf103, Linux 5.10.215, Linux 5.15.154, Linux 6.1.85. No fix listed yet: follow the vendor advisory.

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

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/9970e059af471478455f9534e8c3db82f8c5496d>
- patch: <https://git.kernel.org/stable/c/37dc1718dc0c4392dbfcb9adec22a776e745dd69>
- patch: <https://git.kernel.org/stable/c/98cdac206b112bec63852e94802791e316acc2c1>
- patch: <https://git.kernel.org/stable/c/3f0784b2f1eb9147973d8c43ba085c5fdf44ff69>
- patch: <https://git.kernel.org/stable/c/203a68151e8eeb331d4a64ab78303f3a15faf103>
- patch: <https://git.kernel.org/stable/c/ecc6a2101840177e57c925c102d2d29f260d37c8>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>

## 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-35905>

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