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

- Severity: High 7.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2024-05-21T15:03:46.274Z
- Modified: 2026-06-17T04:17:21.020Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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]

(As written by CVE List.)

## Affected

- Linux Linux: from 358d2071100d84cfe6ef4a9d70ac0d998a1d501e before 44d3c480e4e2a75bf6296a18b4356157991ccd80; from 358d2071100d84cfe6ef4a9d70ac0d998a1d501e before 516d9055039017a20a698103be2b556b4c976bb8; from 358d2071100d84cfe6ef4a9d70ac0d998a1d501e before 16887ae4e3defd2c4e7913b6c539f33eaf4eac5c; from 358d2071100d84cfe6ef4a9d70ac0d998a1d501e before 943c15ac1b84d378da26bba41c83c67e16499ac4; 5.4 (not affected: before 5.4; from 5.4.151 up to 5.4.*; from 5.10.71 up to 5.10.*; from 5.14.10 up to 5.14.*; from 5.15 up to *)
- linux linux_kernel: before 5.4.151; from 5.5 before 5.10.71; from 5.11 before 5.14.10; 5.15

## References

- <https://git.kernel.org/stable/c/44d3c480e4e2a75bf6296a18b4356157991ccd80> (patch)
- <https://git.kernel.org/stable/c/516d9055039017a20a698103be2b556b4c976bb8> (patch)
- <https://git.kernel.org/stable/c/16887ae4e3defd2c4e7913b6c539f33eaf4eac5c> (patch)
- <https://git.kernel.org/stable/c/943c15ac1b84d378da26bba41c83c67e16499ac4> (patch)

## Sources

- CVE List: [CVE-2021-47386](https://www.cve.org/CVERecord?id=CVE-2021-47386), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2021-47386](https://nvd.nist.gov/vuln/detail/CVE-2021-47386), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-47386 · Whole record: https://cve.day/CVE-2021-47386.json · Rebuilt by cve.day 2026-11-25T22:58:08.828Z
