CVE-2024-50010 exec: don't WARN for racy path_noexec check

Medium 4.7 Published Updated

A race condition in the Linux kernel's exec path triggers spurious warnings, potentially causing system instability or denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-50010?

CVE-2024-50010 is a medium-severity denial of service vulnerability in Linux kernel, published on 21 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

exec: don't WARN for racy path_noexec check

Both i_mode and noexec checks wrapped in WARN_ON stem from an artifact of the previous implementation. They used to legitimately check for the condition, but that got moved up in two commits: 633fb6ac3980 ("exec: move S_ISREG() check earlier") 0fd338b2d2cd ("exec: move path_noexec() check earlier")

Instead of being removed said checks are WARN_ON'ed instead, which has some debug value.

However, the spurious path_noexec check is racy, resulting in unwarranted warnings should someone race with setting the noexec flag.

One can note there is more to perm-checking whether execve is allowed and none of the conditions are guaranteed to still hold after they were tested for.

Additionally this does not validate whether the code path did any perm checking to begin with -- it will pass if the inode happens to be regular.

Keep the redundant path_noexec() check even though it's mindless nonsense checking for guarantee that isn't given so drop the WARN.

Reword the commentary and do small tidy ups while here.

[brauner: keep redundant path_noexec() check]

Which versions are affected by CVE-2024-50010?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50010?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-50010 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-52324, AZL-52341, BELL-CVE-2024-50010, DEBIAN-CVE-2024-50010, GHSA-5cmh-766g-p8jx, UBUNTU-CVE-2024-50010.

Is CVE-2024-50010 in your software?

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

Check your SBOMs for free