CVE-2024-36479: fpga: bridge: add owner module and take its refcount
In the Linux kernel, the following vulnerability has been resolved:
fpga: bridge: add owner module and take its refcount
The current implementation of the fpga bridge 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 bridge if the parent device does not have a driver.
To address this problem, add a module owner pointer to the fpgabridge struct and use it to take the module's refcount. Modify the function for registering a bridge to take an additional owner module parameter and rename it to avoid conflicts. Use the old function name for a helper macro that automatically sets the module that registers the bridge as the owner. This ensures compatibility with existing low-level control modules and reduces the chances of registering a bridge without setting the owner.
Also, update the documentation to keep it consistent with the new interface for registering an fpga bridge.
Other changes: opportunistically move putdevice() from fpgabridgeget() to fpgabridgeget() and offpgabridgeget() to improve code clarity since the bridge device is taken in these functions.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-36479?
CVE-2024-36479 has been classified as a vulnerability within the Linux kernel affecting the fpga bridge.
How do I fix CVE-2024-36479?
To remediate CVE-2024-36479, it is recommended to upgrade to a patched version of the Linux kernel, specifically 6.1.123-1 or 6.12.11-1.
Which versions of Linux are affected by CVE-2024-36479?
CVE-2024-36479 affects various versions of the Linux kernel including those between 4.10 and 6.1.120, and also between 6.2 and 6.6.33 and between 6.7 and 6.9.4.
What components does CVE-2024-36479 impact?
CVE-2024-36479 impacts the fpga bridge component of the Linux kernel, specifically the implementation that deals with driver registration.
Is CVE-2024-36479 already patched?
Yes, CVE-2024-36479 has been resolved with patches included in newer releases of the Linux kernel.