CVE-2024-31852 Code injection in n/a

Medium 5.9 Published Updated

A miscompilation in the LLVM ARM backend can overwrite the LR register, potentially allowing control flow hijacking and code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-31852?

CVE-2024-31852 is a medium-severity code injection vulnerability in n/a, published on 5 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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."

Which versions are affected by CVE-2024-31852?

How do I fix CVE-2024-31852?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-31852 being exploited?

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

Sources

Also known as AZL-39713, AZL-39728, AZL-39758, AZL-39776, AZL-39785, AZL-39791 and 7 more.

Is CVE-2024-31852 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free