CVE-2021-47380 HID: amd_sfh: Fix potential NULL pointer dereference

High 7.8 Published Updated

A NULL pointer dereference in the AMD SFH HID driver can cause a kernel crash, leading to denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2021-47380?

CVE-2021-47380 is a high-severity vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

HID: amd_sfh: Fix potential NULL pointer dereference

devm_add_action_or_reset() can suddenly invoke amd_mp2_pci_remove() at registration that will cause NULL pointer dereference since corresponding data is not initialized yet. The patch moves initialization of data before devm_add_action_or_reset().

Found by Linux Driver Verification project (linuxtesting.org).

[[email protected]: rebase]

Weakness: CWE-476

Which versions are affected by CVE-2021-47380?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47380?

Apply the vendor's patch.

Is CVE-2021-47380 being exploited?

There is no known exploitation of CVE-2021-47380 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47380, GHSA-qpf6-m6mq-hcmq, UBUNTU-CVE-2021-47380.

Is CVE-2021-47380 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free