# CVE-2021-47386: hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-05-21 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2021-47386, DEBIAN-CVE-2021-47386
- Record: https://cvemate.com/vulnerability/CVE-2021-47386 · JSON: https://cvemate.com/vulnerability/CVE-2021-47386/json

## Description

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

hwmon: (w83791d) 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 multi-line alignment]
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.258%, percentile 18.646%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 92)

- debian linux (Debian): \< 5.14.12-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-91.102
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1060.63
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1060.63~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-fips (Ubuntu): \< 5.4.0-1069.73+fips2 \| All versions (No fix recorded)
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1064.67
- ubuntu linux-azure-4.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/44d3c480e4e2a75bf6296a18b4356157991ccd80>
- <https://git.kernel.org/stable/c/516d9055039017a20a698103be2b556b4c976bb8>
- <https://git.kernel.org/stable/c/16887ae4e3defd2c4e7913b6c539f33eaf4eac5c>
- <https://git.kernel.org/stable/c/943c15ac1b84d378da26bba41c83c67e16499ac4>
- <https://ubuntu.com/security/CVE-2021-47386>
- <https://www.cve.org/CVERecord?id=CVE-2021-47386>
- <https://git.kernel.org/linus/943c15ac1b84d378da26bba41c83c67e16499ac4>
- <https://security-tracker.debian.org/tracker/CVE-2021-47386>

---

Data as of 2026-12-05T10:16:59.476Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
