Double Free Vulnerability in ubifs
Summary
GSD-2022-1002031: ubifs: rename_whiteout: Fix double free for whiteout_ui->data. Affects Kernel versions >= 9e0a1fff8db56eaaebb74b4a3ef65f86811c4798, < a90e2dbe66d2647ff95a0442ad2e86482d977fd8. 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 ubifs package is a file system designed for use on flash memory devices. It is commonly used in embedded systems and provides features such as compression, encryption, and wear leveling. The vulnerability in question affects the rename_whiteout function in ubifs, which is responsible for handling whiteout entries. Whiteouts are special entries used to mark files or directories as deleted in a union file system. This vulnerability allows an attacker to trigger a double free condition, potentially leading to a use-after-free vulnerability and subsequent code execution.
Vulnerability Detail
The vulnerability arises due to a double free issue in the rename_whiteout function of ubifs. When processing a whiteout entry, the function attempts to free the memory associated with the entry's data. However, due to a programming error, the same memory is freed twice, resulting in a double free condition. An attacker can exploit this vulnerability by creating a specially crafted whiteout entry, causing the double free condition to occur. This can lead to memory corruption and potentially allow the attacker to execute arbitrary code or crash the system.
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 avoid the exploitation of this vulnerability by disabling the use of union file systems or by restricting access to the affected functionality. However, applying the official patch or updating to the latest version is the recommended solution.
Conclusion
The double free vulnerability in ubifs can lead to memory corruption and potential code execution. It is crucial to update the Linux Kernel to the latest version or apply the provided patch to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
ubifs is a file system designed for use on flash memory devices. It provides features such as compression, encryption, and wear leveling.
A double free vulnerability occurs when a program attempts to free the same memory block twice. This can lead to memory corruption and potentially allow an attacker to execute arbitrary code or crash the system.
An attacker can exploit this vulnerability by creating a specially crafted whiteout entry, triggering a double free condition and potentially allowing for code execution or system crashes.
Yes, this vulnerability has been fixed in Linux Kernel version v5.10.110 by commit a90e2dbe66d2647ff95a0442ad2e86482d977fd8.
To protect your system, it is recommended to update the Linux Kernel to version v5.10.110 or later. This will ensure that the vulnerable code is replaced with the patched version.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.