CVE-2021-47385 hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field

Medium 5.5 Published Updated

A NULL pointer dereference in the Linux kernel w83792d hardware monitoring driver can cause a system crash.

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-47385?

CVE-2021-47385 is a medium-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:

hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field

If driver read val value sufficient for (val & 0x08) && (!(val & 0x80)) && ((val & 0x7) == ((val >> 4) & 0x7)) from device then Null pointer dereference occurs. (It is possible if tmp = 0b0xyz1xyz, where same literals mean same numbers) Also lm75[] does not serve a purpose anymore after switching to devm_i2c_new_dummy_device() in w83791d_detect_subclients().

The patch fixes possible NULL pointer dereference by removing lm75[].

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

[groeck: Dropped unnecessary continuation lines, fixed multipline alignment]

Weakness: CWE-476

Which versions are affected by CVE-2021-47385?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47385?

Apply the vendor's patch.

Is CVE-2021-47385 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47385, GHSA-2v26-28rg-whvc, UBUNTU-CVE-2021-47385.

Is CVE-2021-47385 in your software?

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

Check your SBOMs for free