Vulnerability in Kernel: cfg80211_leave_ocb not called when switching away from OCB
Summary
UVI-2021-1001098: cfg80211: call cfg80211_leave_ocb when switching away from OCB. Affects Kernel versions < d3a0d82d3f4747866f80d3f0732156c4b85226d2. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Kernel is a critical component of the Linux operating system that provides core functionalities and interfaces between hardware and software. It manages system resources, facilitates communication between processes, and enables device drivers to interact with hardware. The cfg80211 module within the Kernel is responsible for handling wireless network configuration and management. It provides various functions and callbacks for wireless drivers and applications to interact with the underlying wireless stack.
One of the features supported by cfg80211 is the OCB (Outside the Context of a Basic Service Set) mode, which allows devices to communicate directly with each other without the need for an access point. However, a vulnerability has been identified in the Kernel where the cfg80211_leave_ocb function is not called when switching away from OCB mode. This oversight can lead to resource leaks and potential security issues.
Vulnerability Detail
The vulnerability arises from the failure to invoke the cfg80211_leave_ocb function when transitioning away from OCB mode in the Kernel. This omission can result in resource leaks, as the necessary cleanup operations are not performed. Attackers may exploit these resource leaks to exhaust system resources, leading to denial-of-service conditions. Additionally, the absence of proper cleanup may leave sensitive information in memory, potentially enabling information disclosure attacks.
To exploit this vulnerability, an attacker would need to have the capability to switch a device from OCB mode to another mode while the Kernel is running. The impact of this vulnerability can vary depending on the specific use case and the presence of other security measures in place.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can manually invoke the cfg80211_leave_ocb function when switching away from OCB mode. This can be done by executing the following code snippet:
#include <net/cfg80211.h>
void switch_away_from_ocb()
{
struct cfg80211_registered_device *rdev;
// Obtain the registered device pointer
rdev = cfg80211_get_dev_by_name("<device_name>");
if (rdev) {
// Invoke the leave OCB function
cfg80211_leave_ocb(rdev);
// Release the device reference
cfg80211_put_dev(rdev);
}
}
Replace <device_name> with the appropriate name of the wireless device. This workaround ensures that the necessary cleanup operations are performed when transitioning away from OCB mode.
Conclusion
In conclusion, the vulnerability in the Kernel's cfg80211 module, where cfg80211_leave_ocb is not called when switching away from OCB mode, can lead to resource leaks and potential security issues. It is crucial to update the Kernel to the patched version (v4.9.274) or apply the provided workaround to mitigate the vulnerability. Regularly monitoring for security updates and following best practices for Kernel maintenance is recommended.
For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability can vary depending on the specific use case and the presence of other security measures in place. It can potentially lead to denial-of-service conditions and information disclosure attacks.
To check if your system is affected by this vulnerability, you can use tools like Vulert (https://vulert.com) or manually inspect the Kernel version and the presence of the fix commit (d3a0d82d3f4747866f80d3f0732156c4b85226d2) in the Kernel source code.
Yes, a workaround is available. Users can manually invoke the cfg80211_leave_ocb function when switching away from OCB mode. Refer to the 'workaround' section for more details.
Yes, this vulnerability has been patched in the Linux Kernel version v4.9.274 through the commit d3a0d82d3f4747866f80d3f0732156c4b85226d2.
For more information about this vulnerability, you can refer to the source database entry: https://github.com/cloudsecurityalliance/gsd-database/blob/main/2021/1001xxx/UVI-2021-1001098.json
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.