CVE-2022-50714

Description

A flaw was discovered in the mt76/mt7921e Wi-Fi driver in the Linux kernel where improper handling of driver data during module removal can lead to a crash. Under certain insmod/rmmod stress test conditions, the driver’s mt7921_pci_remove() function is called while the associated mt76_dev (driver private data) has not been properly initialized or is missing. When the workqueue cancellation logic attempts to access this uninitialized data, it triggers a KASAN BUG: user-memory-access, resulting in a kernel panic or hang.

Mitigation

To mitigate this issue, if the `mt7921e` Wi-Fi hardware is not in use, prevent the `mt7921e` kernel module from loading. This can be achieved by blacklisting the module.

Create a file named `/etc/modprobe.d/blacklist-mt7921e.conf` with the following content:

blacklist mt7921e

After creating the file, regenerate the initramfs and reboot the system for the changes to take effect:

bash
dr_acutereboot

Warning: Blacklisting this module may disable Wi-Fi functionality if your system relies on the mt7921e driver.

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 Score4.7N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityHighN/AN/A
Privileges RequiredLowN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityNoneN/AN/A
Integrity ImpactNoneN/AN/A
Availability ImpactHighN/AN/A

Vector

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

Understanding the Weakness (CWE)

Availability,Integrity,Other

Technical Impact: Other

Initial variables usually contain junk, which can not be trusted for consistency. This can lead to denial of service conditions, or modify control flow in unexpected ways. In some cases, an attacker can "pre-initialize" the variable using previous actions, which might enable code execution. This can cause a race condition if a lock variable check passes when it should not.

Authorization,Other

Technical Impact: Other

Strings that are not initialized are especially dangerous, since many functions expect a null at the end -- and only at the end -- of a string.

Frequently Asked Questions

Want to get errata notifications? Sign up here.