Use-after-free and Memory Leak Vulnerability in serial: liteuart
Summary
GSD-2021-1002581: serial: liteuart: fix use-after-free and memleak on unbind. Affects Kernel versions >= 1da81e5562fac8286567422cc56a7fbd0dc646d4, < 602824cf9aa9db8830ffe5cfb2cd54365cada4fe. 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 serial: liteuart package is a component of the Linux Kernel, which is responsible for handling serial communication. It provides support for UART (Universal Asynchronous Receiver-Transmitter) devices, allowing data transmission between computers and peripheral devices. This vulnerability affects versions of the Linux Kernel from v5.11 to v5.15.6. The liteuart driver in the kernel suffers from a use-after-free vulnerability and a memory leak issue when unbinding. These vulnerabilities can potentially be exploited by an attacker to execute arbitrary code or cause a denial-of-service condition.
Vulnerability Detail
The use-after-free vulnerability in the serial: liteuart driver occurs when the driver attempts to access memory that has already been freed. This can lead to a crash or potentially allow an attacker to execute arbitrary code by manipulating the freed memory. The memory leak issue occurs when the driver fails to release allocated memory properly during the unbinding process, resulting in a gradual depletion of system resources. An attacker could exploit this vulnerability to exhaust system memory, leading to a denial-of-service condition. The vulnerability was introduced in version v5.11 of the Linux Kernel and has been fixed in version v5.15.7.
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 disable the affected serial: liteuart driver if it is not required for their system. This can be achieved by blacklisting the driver module or removing it from the kernel configuration. However, it is important to note that this workaround may result in the loss of serial communication functionality for devices relying on the liteuart driver.
Conclusion
The use-after-free and memory leak vulnerabilities in the serial: liteuart driver of the Linux Kernel can pose significant security risks, including arbitrary code execution and denial-of-service conditions. It is highly recommended to update the Linux Kernel to version v5.15.7 or later to address these vulnerabilities. Users can also utilize the Vulert Playground at https://vulert.com/scanner to check if their system is affected and obtain further support for vulnerability remediation.
See every vulnerability recorded for Kernel →
FAQ
The use-after-free vulnerability can potentially allow an attacker to execute arbitrary code or crash the system. The memory leak issue can lead to a gradual depletion of system resources, resulting in a denial-of-service condition.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any open-source vulnerabilities, including this one.
Yes, the vulnerability has been fixed in Linux Kernel version v5.15.7. It is recommended to update to this version or a later one to mitigate the risk.
Yes, as a temporary measure, you can disable the serial: liteuart driver if it is not required for your system. However, this may result in the loss of serial communication functionality for devices relying on the liteuart driver.
At the time of this report, there are no known exploits for this vulnerability. However, it is crucial to apply the necessary updates and patches to mitigate the risk.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.