CVE-2024-40938 landlock: Fix d_parent walk
A null pointer dereference in the Linux kernel Landlock subsystem can cause a system crash when linking a root mount point.
- 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-40938?
CVE-2024-40938 is a medium-severity vulnerability in Linux kernel, published on 12 Jul 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:
landlock: Fix d_parent walk
The WARN_ON_ONCE() in collect_domain_accesses() can be triggered when trying to link a root mount point. This cannot work in practice because this directory is mounted, but the VFS check is done after the call to security_path_link().
Do not use source directory's d_parent when the source directory is the mount point.
[mic: Fix commit message]
Which versions are affected by CVE-2024-40938?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-40938?
Apply the vendor's patch.
Is CVE-2024-40938 being exploited?
There is no known exploitation of CVE-2024-40938 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-40938, DEBIAN-CVE-2024-40938, GHSA-p92j-gfh9-4hjj, UBUNTU-CVE-2024-40938.