# CVE-2021-47393: hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2024-05-21T15:03:50.844Z
- **Modified:** 2026-06-17T04:17:22.073Z

## Who should check

- Anyone running Linux \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< 5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< a6c42ae1530f94724d3c42cf91fe3d3c5e394f8a; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< 76bbb482d33bfcd7e9070ecf594c9ec73e01c930; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< aa85fb7bde558bb2e364e85976b14b259c8b6fe8; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< e6fab7af6ba1bc77c78713a83876f60ca7a4a064
- Anyone running Linux 4.19

## Description

In the Linux kernel, the following vulnerability has been resolved:

hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs

Fan speed minimum can be enforced from sysfs. For example, setting
current fan speed to 20 is used to enforce fan speed to be at 100%
speed, 19 - to be not below 90% speed, etcetera. This feature provides
ability to limit fan speed according to some system wise
considerations, like absence of some replaceable units or high system
ambient temperature.

Request for changing fan minimum speed is configuration request and can
be set only through 'sysfs' write procedure. In this situation value of
argument 'state' is above nominal fan speed maximum.

Return non-zero code in this case to avoid
thermal\_cooling\_device\_stats\_update() call, because in this case
statistics update violates thermal statistics table range.
The issues is observed in case kernel is configured with option
CONFIG\_THERMAL\_STATISTICS.

Here is the trace from KASAN:
\[  159.506659\] BUG: KASAN: slab-out-of-bounds in thermal\_cooling\_device\_stats\_update+0x7d/0xb0
\[  159.516016\] Read of size 4 at addr ffff888116163840 by task hw-management.s/7444
\[  159.545625\] Call Trace:
\[  159.548366\]  dump\_stack+0x92/0xc1
\[  159.552084\]  ? thermal\_cooling\_device\_stats\_update+0x7d/0xb0
\[  159.635869\]  thermal\_zone\_device\_update+0x345/0x780
\[  159.688711\]  thermal\_zone\_device\_set\_mode+0x7d/0xc0
\[  159.694174\]  mlxsw\_thermal\_modules\_init+0x48f/0x590 \[mlxsw\_core\]
\[  159.700972\]  ? mlxsw\_thermal\_set\_cur\_state+0x5a0/0x5a0 \[mlxsw\_core\]
\[  159.731827\]  mlxsw\_thermal\_init+0x763/0x880 \[mlxsw\_core\]
\[  160.070233\] RIP: 0033:0x7fd995909970
\[  160.074239\] Code: 73 01 c3 48 8b 0d 28 d5 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 99 2d 2c 00 00 75 10 b8 01 00 00 00 0f 05 \<48\> 3d 01 f0 ff ..
\[  160.095242\] RSP: 002b:00007fff54f5d938 EFLAGS: 00000246 ORIG\_RAX: 0000000000000001
\[  160.103722\] RAX: ffffffffffffffda RBX: 0000000000000013 RCX: 00007fd995909970
\[  160.111710\] RDX: 0000000000000013 RSI: 0000000001906008 RDI: 0000000000000001
\[  160.119699\] RBP: 0000000001906008 R08: 00007fd995bc9760 R09: 00007fd996210700
\[  160.127687\] R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000013
\[  160.135673\] R13: 0000000000000001 R14: 00007fd995bc8600 R15: 0000000000000013
\[  160.143671\]
\[  160.145338\] Allocated by task 2924:
\[  160.149242\]  kasan\_save\_stack+0x19/0x40
\[  160.153541\]  \_\_kasan\_kmalloc+0x7f/0xa0
\[  160.157743\]  \_\_kmalloc+0x1a2/0x2b0
\[  160.161552\]  thermal\_cooling\_device\_setup\_sysfs+0xf9/0x1a0
\[  160.167687\]  \_\_thermal\_cooling\_device\_register+0x1b5/0x500
\[  160.173833\]  devm\_thermal\_of\_cooling\_device\_register+0x60/0xa0
\[  160.180356\]  mlxreg\_fan\_probe+0x474/0x5e0 \[mlxreg\_fan\]
\[  160.248140\]
\[  160.249807\] The buggy address belongs to the object at ffff888116163400
\[  160.249807\]  which belongs to the cache kmalloc-1k of size 1024
\[  160.263814\] The buggy address is located 64 bytes to the right of
\[  160.263814\]  1024-byte region \[ffff888116163400, ffff888116163800)
\[  160.277536\] The buggy address belongs to the page:
\[  160.282898\] page:0000000012275840 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888116167000 pfn:0x116160
\[  160.294872\] head:0000000012275840 order:3 compound\_mapcount:0 compound\_pincount:0
\[  160.303251\] flags: 0x200000000010200(slab\|head\|node=0\|zone=2)
\[  160.309694\] raw: 0200000000010200 ffffea00046f7208 ffffea0004928208 ffff88810004dbc0
\[  160.318367\] raw: ffff888116167000 00000000000a0006 00000001ffffffff 0000000000000000
\[  160.327033\] page dumped because: kasan: bad access detected
\[  160.333270\]
\[  160.334937\] Memory state around the buggy address:
\[  160.356469\] \>ffff888116163800: fc ..

## Affected and fixed versions

- Linux: \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< 5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< a6c42ae1530f94724d3c42cf91fe3d3c5e394f8a; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< 76bbb482d33bfcd7e9070ecf594c9ec73e01c930; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< aa85fb7bde558bb2e364e85976b14b259c8b6fe8; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< e6fab7af6ba1bc77c78713a83876f60ca7a4a064 (cvelist)
- Linux: 4.19 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47393. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47393.md
Affected: Linux >= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, < 5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca; >= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, < a6c42ae1530f94724d3c42cf91fe3d3c5e394f8a; >= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, < 76bbb482d33bfcd7e9070ecf594c9ec73e01c930; >= 65afb4c8e7e4e7e74b28efa…
Fixed in: Linux 5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca, Linux 76bbb482d33bfcd7e9070ecf594c9ec73e01c930

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47393 being exploited?

There is no confirmed exploitation: CVE-2021-47393 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47393?

High: CVSS 7.1 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47393?

Linux \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< 5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< a6c42ae1530f94724d3c42cf91fe3d3c5e394f8a; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< 76bbb482d33bfcd7e9070ecf594c9ec73e01c930; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< aa85fb7bde558bb2e364e85976b14b259c8b6fe8; \>= 65afb4c8e7e4e7e74b28efa1df62da503ca3e7a6, \< e6fab7af6ba1bc77c78713a83876f60ca7a4a064; Linux 4.19.

### Is there a fix for CVE-2021-47393?

Yes. Fixed in Linux 5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca, Linux 76bbb482d33bfcd7e9070ecf594c9ec73e01c930. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-47393?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca>
- patch: <https://git.kernel.org/stable/c/a6c42ae1530f94724d3c42cf91fe3d3c5e394f8a>
- patch: <https://git.kernel.org/stable/c/76bbb482d33bfcd7e9070ecf594c9ec73e01c930>
- patch: <https://git.kernel.org/stable/c/aa85fb7bde558bb2e364e85976b14b259c8b6fe8>
- patch: <https://git.kernel.org/stable/c/e6fab7af6ba1bc77c78713a83876f60ca7a4a064>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47393>

HTML: <https://flawdb.com/CVE-2021-47393> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47393>
