CVE-2022-50540

Description

A logic error was found in the Linux kernel Qualcomm ADM DMA engine driver's slave configuration handling. A local user with privileges to configure DMA operations can trigger DMA slave setup on Qualcomm ADM hardware, causing the driver to use an incorrect size comparison (pointer size instead of struct size) that results in ignoring critical DMA configuration values, which leads to kernel panic and denial of service.

Statement

The issue arises because of an incorrect sizeof operator usage in the slave configuration validation code. The function compares peripheral_size against sizeof(config) where config is a pointer, rather than sizeof(*config) to get the actual structure size. On 64-bit systems, this evaluates to 8 bytes (pointer size) instead of the actual configuration structure size. The comparison always fails, causing the code path that sets the crci (connection request control information) value to be skipped. The crci value is essential for proper DMA channel operation on Qualcomm ADM hardware. When DMA operations proceed with an uninitialized or invalid crci value, the hardware configuration is incorrect and triggers a kernel panic. This occurs reliably on any system using the ADM DMA driver when slave devices attempt to configure their DMA channels—a normal operation during device initialization or data transfer setup. The impact is strictly availability; the kernel crashes before any data transfer occurs, preventing any information disclosure or integrity compromise.

Mitigation

To mitigate this issue, prevent the qcom_adm module from loading. See https://access.redhat.com/solutions/41278 for instructions on blacklisting kernel modules.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.55.5N/A
Attack VectorLocalLocalN/A
Attack ComplexityLowLowN/A
Privileges RequiredLowLowN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityNoneNoneN/A
Integrity ImpactNoneNoneN/A
Availability ImpactHighHighN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Understanding the Weakness (CWE)

Other

Technical Impact: Varies by Context

This can lead to incorrect results and resultant weaknesses. For example, the code might inadvertently compare references to objects, instead of the relevant contents of those objects, causing two "equal" objects to be considered unequal.

Frequently Asked Questions

Want to get errata notifications? Sign up here.