Kernel: Fix kernel panic on skipped partition
Summary
GSD-2022-1000560: mtd: parsers: qcom: Fix kernel panic on skipped partition. Affects Kernel versions >= 803eb124e1a64e42888542c3444bfe6dac412c7f, < a2995fe23095ceda2dc382fbe057f5e164595548. 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 the core functionality and interfaces with hardware devices. It manages memory, processes, and system resources, enabling the execution of user programs. The vulnerability in question affects the Kernel's mtd (Memory Technology Devices) parsers, specifically the qcom (Qualcomm) parser. The mtd subsystem is responsible for managing flash memory devices, such as NAND and NOR flash chips, and provides a unified interface for accessing and manipulating these devices. The qcom parser is used for parsing partition tables on Qualcomm-based devices. This vulnerability can lead to a kernel panic when a partition is skipped, potentially resulting in a denial of service (DoS) condition.
Vulnerability Detail
The vulnerability arises from a flaw in the qcom parser of the mtd subsystem. When a partition is skipped during parsing, it triggers a kernel panic due to an unhandled error condition. An attacker could exploit this vulnerability by crafting a malicious partition table that intentionally skips a partition, causing the system to crash and become unresponsive. The impact of this vulnerability is a DoS condition, as the kernel panic halts normal system operation. This vulnerability was introduced in Linux Kernel version v5.12 and has been fixed in version v5.16.11.
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 vulnerability by ensuring that all partitions in the partition table are properly defined and not skipped. This can be achieved by carefully configuring the partition table to include all necessary partitions and ensuring that the parsing logic handles all partitions correctly. Here is an example of a valid partition table configuration:
<code> # Example partition tablepartition1: start=0x00000000, size=0x10000000, name=boot partition2: start=0x10000000, size=0x20000000, name=system partition3: start=0x30000000, size=0x40000000, name=data </code>
Conclusion
In conclusion, the vulnerability in the Kernel's mtd qcom parser can lead to a kernel panic and denial of service condition when a partition is skipped. It is crucial to update the Linux Kernel to version v5.16.11 or later to mitigate this vulnerability. Users can also ensure the partition table is properly configured and handle partitions correctly to avoid the issue. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to a kernel panic, resulting in a denial of service (DoS) condition. The system becomes unresponsive and requires a reboot to recover.
An attacker can craft a malicious partition table that intentionally skips a partition. When the system attempts to parse this table, it triggers a kernel panic, causing the system to crash.
The vulnerability was introduced in Linux Kernel version v5.12. Versions prior to v5.12 are not affected. It has been fixed in version v5.16.11.
Yes, users can avoid the vulnerability by ensuring that all partitions in the partition table are properly defined and not skipped. Careful configuration of the partition table and handling of partitions in the parsing logic can mitigate the risk.
The fixed version of the Linux Kernel (v5.16.11 or later) can be obtained from the official Linux Kernel repository or through the package manager of your Linux distribution.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.