CVE-2024-40938·Kernel vulnerability
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]
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.9.6
- Published
- 2024-07-12
Affected versions
From: 6.7
Until: 6.9.6
Fixed in: 6.9.6
How to fix this CVE
Update your Linux kernel to version 6.9.6 or later to resolve a path traversal vulnerability in the Landlock security module. This fix prevents a warning condition that could be triggered during symlink operations on mount points. Apply the kernel update and reboot your system to enable the security patch.
sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version with: uname -r (vulnerable if output is between 6.7 and 6.9.5)
- Verify Landlock is enabled with: grep -i landlock /boot/config-$(uname -r) (should show CONFIG_SECURITY_LANDLOCK=y)
- Search system logs for Landlock warnings with: sudo journalctl -b | grep -i 'collect_domain_accesses\|WARN_ON'
- After patching, confirm new version with: uname -r (should be 6.9.6 or later)
FAQ
What is CVE-2024-40938?
CVE-2024-40938 is a vulnerability in the Linux kernel's Landlock security module where incorrect directory parent traversal during symlink operations can trigger a kernel warning condition. This affects systems using Landlock for mandatory access control policies.
Is CVE-2024-40938 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and has no public exploit code available.
What versions of Kernel are affected by CVE-2024-40938?
Linux kernel versions 6.7 through 6.9.5 are affected. Kernel 6.9.6 and later contain the security fix.
How do I check if my server is vulnerable to CVE-2024-40938?
Run 'uname -r' to display your kernel version. If it shows 6.7.x through 6.9.5, your system is vulnerable. Additionally, verify Landlock is compiled in with 'grep CONFIG_SECURITY_LANDLOCK /boot/config-$(uname -r)'.
Does Defensia detect CVE-2024-40938?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-40938 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/88da52ccd66e65f2e63a6c35c9dff55d448ef4dc
- https://git.kernel.org/stable/c/b6e5e696435832b33e40775f060ef5c95f4fda1f
- https://git.kernel.org/stable/c/c7618c7b0b8c45bcef34410cc1d1e953eb17f8f6
- https://git.kernel.org/stable/c/cc30d05b34f9a087a6928d09b131f7b491e9ab11
- https://git.kernel.org/stable/c/88da52ccd66e65f2e63a6c35c9dff55d448ef4dc
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-40938. Free for 1 server.
Get started free