CVE-2021-47386: hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field
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]
Security readout for executives and security teams
Plain-English summary
CVE-2021-47386 is a Linux kernel bug in the w83791d hardware-monitoring driver. A local authenticated user could potentially trigger a NULL pointer dereference through specific device-read conditions, causing kernel impact. The published CVSS score is high, but exposure is narrower than a remote internet-facing issue.
Executive priority
Treat as high priority for Linux fleet patching, especially shared servers and systems where local users or workloads are less trusted. It is not evidenced as actively exploited in the provided sources.
Technical view
The issue is CWE-476 in the Linux kernel hwmon w83791d driver. The fix removes the obsolete lm75[] structure field after use of devm_i2c_new_dummy_device(). The CVSS vector is AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Stable kernel commits are referenced as fixes.
Likely exposure
Exposure appears limited to Linux systems running affected kernel versions with the w83791d hwmon driver path relevant. The CVSS vector requires local privileges, so typical exposure is post-access local escalation or kernel disruption risk, not direct remote exploitation.
Exploitation context
The provided sources do not show CISA KEV listing or active exploitation. The condition depends on driver-read values meeting a specific bit pattern. No public exploit status is provided in the source bundle.
Researcher notes
The record ties the issue to a NULL pointer dereference in w83791d and references four stable commits. Evidence is incomplete on exact downstream distro package mapping, exploit availability, and real-world hardware prevalence.
Mitigation direction
Update affected Linux kernels to versions containing the referenced stable fixes.
Prioritize vendor or distribution kernel advisories for exact package versions.
Check whether systems load or require the w83791d hwmon driver.
If patching is delayed, consult vendor guidance for temporary controls.
Validation and detection
Inventory Linux kernel versions across servers, appliances, and images.
Check loaded kernel modules and hardware-monitoring driver usage.
Confirm vendor kernel packages include the referenced stable commits.
Track remediation through vulnerability scans and package baseline checks.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-476: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.