Vulnerability · Published May 21, 2024 · Assigned by Linux
CVE-2021-47386hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field
High 7.8
In plain English
A high-severity null pointer dereference in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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]
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-abi-stablelists | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-core | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-cross-headers | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-core | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-modules | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-debug-modules-extra | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-doc | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-headers | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-modules | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-modules-extra | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-rt | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-core | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-core | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-devel | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-kvm | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-modules | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-devel | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-kvm | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-modules | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-rt-modules-extra | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux:8 | kernel-tools | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-tools-libs | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-tools-libs-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-core | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | perf | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| AlmaLinux:8 | python3-perf | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
| Debian:12 | linux | 5.14.12-1 | DEBIAN-CVE-2021-47386 |
| Debian:13 | linux | 5.14.12-1 | DEBIAN-CVE-2021-47386 |
| Debian:14 | linux | 5.14.12-1 | DEBIAN-CVE-2021-47386 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.22.1.el8_10 | RLSA-2024:7000 |
| Rocky Linux:8 | kernel-rt | 0:4.18.0-553.22.1.rt7.363.el8_10 | RLSA-2024:7001 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2021-47386 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2021-47386 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 358d2071100d84cfe6ef4a9d70ac0d998a1d501e – before 44d3c480e4e2a75bf6296a18b4356157991ccd80358d2071100d84cfe6ef4a9d70ac0d998a1d501e – before 516d9055039017a20a698103be2b556b4c976bb8358d2071100d84cfe6ef4a9d70ac0d998a1d501e – before 16887ae4e3defd2c4e7913b6c539f33eaf4eac5c358d2071100d84cfe6ef4a9d70ac0d998a1d501e – before 943c15ac1b84d378da26bba41c83c67e16499ac4 |
| Linux | Linux | 5.4 |
Weakness: CWE-476 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H