CVE-2024-35247 fpga: region: add owner module and take its refcount
A null pointer dereference in the Linux kernel FPGA region driver can cause a system crash during region programming if the parent device lacks a driver.
- 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-35247?
CVE-2024-35247 is a medium-severity vulnerability in Linux kernel, published on 24 Jun 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:
fpga: region: add owner module and take its refcount
The current implementation of the fpga region assumes that the low-level module registers a driver for the parent device and uses its owner pointer to take the module's refcount. This approach is problematic since it can lead to a null pointer dereference while attempting to get the region during programming if the parent device does not have a driver.
To address this problem, add a module owner pointer to the fpga_region struct and use it to take the module's refcount. Modify the functions for registering a region to take an additional owner module parameter and rename them to avoid conflicts. Use the old function names for helper macros that automatically set the module that registers the region as the owner. This ensures compatibility with existing low-level control modules and reduces the chances of registering a region without setting the owner.
Also, update the documentation to keep it consistent with the new interface for registering an fpga region.
Weakness: CWE-476
Which versions are affected by CVE-2024-35247?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-35247?
Apply the vendor's patch.
Is CVE-2024-35247 being exploited?
There is no known exploitation of CVE-2024-35247 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-35247, DEBIAN-CVE-2024-35247, GHSA-6wq6-xj8v-gvfq, UBUNTU-CVE-2024-35247.