{"id":"CVE-2021-47386","state":"PUBLISHED","title":"hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nhwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field\n\nIf driver read val value sufficient for\n(val & 0x08) && (!(val & 0x80)) && ((val & 0x7) == ((val >> 4) & 0x7))\nfrom device then Null pointer dereference occurs.\n(It is possible if tmp = 0b0xyz1xyz, where same literals mean same numbers)\nAlso lm75[] does not serve a purpose anymore after switching to\ndevm_i2c_new_dummy_device() in w83791d_detect_subclients().\n\nThe patch fixes possible NULL pointer dereference by removing lm75[].\n\nFound by Linux Driver Verification project (linuxtesting.org).\n\n[groeck: Dropped unnecessary continuation lines, fixed multi-line alignment]","publishedAt":"2024-05-21T15:03:46.274Z","updatedAt":"2026-05-11T13:53:41.298Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"44d3c480e4e2a75bf6296a18b4356157991ccd80","versionType":"git"},{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"516d9055039017a20a698103be2b556b4c976bb8","versionType":"git"},{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"16887ae4e3defd2c4e7913b6c539f33eaf4eac5c","versionType":"git"},{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"943c15ac1b84d378da26bba41c83c67e16499ac4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/w83791d.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"5.4.151","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.71","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.14.10","status":"unaffected","lessThanOrEqual":"5.14.*","versionType":"semver"},{"version":"5.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/w83791d.c"]}],"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"],"weaknesses":["CWE-476"],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47386.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47386","state":"PUBLISHED","datePublished":"2024-05-21T15:03:46.274Z","dateUpdated":"2026-05-11T13:53:41.298Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-21T14:58:30.813Z"},"containers":{"cna":{"title":"hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nhwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field\n\nIf driver read val value sufficient for\n(val & 0x08) && (!(val & 0x80)) && ((val & 0x7) == ((val >> 4) & 0x7))\nfrom device then Null pointer dereference occurs.\n(It is possible if tmp = 0b0xyz1xyz, where same literals mean same numbers)\nAlso lm75[] does not serve a purpose anymore after switching to\ndevm_i2c_new_dummy_device() in w83791d_detect_subclients().\n\nThe patch fixes possible NULL pointer dereference by removing lm75[].\n\nFound by Linux Driver Verification project (linuxtesting.org).\n\n[groeck: Dropped unnecessary continuation lines, fixed multi-line alignment]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"44d3c480e4e2a75bf6296a18b4356157991ccd80","versionType":"git"},{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"516d9055039017a20a698103be2b556b4c976bb8","versionType":"git"},{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"16887ae4e3defd2c4e7913b6c539f33eaf4eac5c","versionType":"git"},{"version":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","status":"affected","lessThan":"943c15ac1b84d378da26bba41c83c67e16499ac4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/w83791d.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"5.4.151","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.71","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.14.10","status":"unaffected","lessThanOrEqual":"5.14.*","versionType":"semver"},{"version":"5.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/w83791d.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/44d3c480e4e2a75bf6296a18b4356157991ccd80"},{"url":"https://git.kernel.org/stable/c/516d9055039017a20a698103be2b556b4c976bb8"},{"url":"https://git.kernel.org/stable/c/16887ae4e3defd2c4e7913b6c539f33eaf4eac5c"},{"url":"https://git.kernel.org/stable/c/943c15ac1b84d378da26bba41c83c67e16499ac4"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T13:53:41.298Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.4.151"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.10.71"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.14.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-05-28T18:28:32.870309Z","id":"CVE-2021-47386","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-476","type":"CWE","lang":"en","description":"CWE-476 NULL Pointer Dereference"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-13T18:21:04.770Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/44d3c480e4e2a75bf6296a18b4356157991ccd80","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/516d9055039017a20a698103be2b556b4c976bb8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/16887ae4e3defd2c4e7913b6c539f33eaf4eac5c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/943c15ac1b84d378da26bba41c83c67e16499ac4","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:39:59.316Z"}}]}}}