{"id":"CVE-2021-47386","aliases":["CVE-2021-47386"],"related":[],"kind":"vulnerability","state":"published","title":"hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field","summary":"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]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: hwmon: (w83791d) Corrija la desreferencia del puntero NULL eliminando el campo de estructura innecesario. Si el controlador lee el valor val suficiente para (val &amp; 0x08) &amp;&amp; (!(val &amp; 0x80)) &amp;&amp; (( val &amp; 0x7) == ((val &gt;&gt; 4) &amp; 0x7)) desde el dispositivo, luego se produce la desreferencia del puntero null. (Es posible si tmp = 0b0xyz1xyz, donde los mismos literales significan los mismos números) Además, lm75[] ya no sirve para nada después de cambiar a devm_i2c_new_dummy_device() en w83791d_detect_subclients(). El parche corrige la posible desreferencia del puntero NULL eliminando lm75[]. Encontrado por el proyecto de verificación de controladores de Linux (linuxtesting.org). [groeck: Se eliminaron líneas de continuación innecesarias, se corrigió la alineación de varias líneas]","source":"nvd"}],"published":"2024-05-21T15:03:46.274Z","modified":"2026-06-17T04:17:21.020Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","fixed":"44d3c480e4e2a75bf6296a18b4356157991ccd80","status":"affected"},{"type":"git","introduced":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","fixed":"516d9055039017a20a698103be2b556b4c976bb8","status":"affected"},{"type":"git","introduced":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","fixed":"16887ae4e3defd2c4e7913b6c539f33eaf4eac5c","status":"affected"},{"type":"git","introduced":"358d2071100d84cfe6ef4a9d70ac0d998a1d501e","fixed":"943c15ac1b84d378da26bba41c83c67e16499ac4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.4","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.4","status":"unaffected"},{"type":"semver","introduced":"5.4.151","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.71","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.14.10","lastAffected":"5.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"5.4.151"},{"status":"affected","introduced":"5.5","fixed":"5.10.71"},{"status":"affected","introduced":"5.11","fixed":"5.14.10"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/44d3c480e4e2a75bf6296a18b4356157991ccd80","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/516d9055039017a20a698103be2b556b4c976bb8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/16887ae4e3defd2c4e7913b6c539f33eaf4eac5c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/943c15ac1b84d378da26bba41c83c67e16499ac4","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-28T18:28:32.870Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47386","url":"https://www.cve.org/CVERecord?id=CVE-2021-47386","licence":"CVE Terms of Use","modified":"2026-05-11T13:53:41.298Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47386","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47386","licence":"Public domain","modified":"2026-06-17T04:17:21.020Z"}],"updatedAt":"2026-11-25T22:58:08.828Z","epss":{"score":0.00258,"percentile":0.18711,"date":"2026-12-01T12:00:22.000Z"}}