CVE-2021-47393 json
hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs
published 2024-05-21 2 y ago modified 2026-06-17 4 mo ago also EUVD-2021-34398
- cvss
- 7.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 16%
- public exploits
- 0
- none known
Summary
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 ..
Patch / fix
- Linux Linux 4.19.209, 5.4.151, 5.10.71, 5.14.10, 5.15
- linux Debian 14, Debian 13, Debian 12 5.14.12-1
debian advisories DEBIAN-CVE-2021-47393
- linux Ubuntu 20.04 LTS 5.4.0-91.102
- linux-aws Ubuntu 20.04 LTS 5.4.0-1060.63
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1058.62
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1008.9
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1050.52
- linux-azure Ubuntu 20.04 LTS 5.4.0-1064.67
- linux-gkeop Ubuntu 20.04 LTS 5.4.0-1027.28
- linux-raspi Ubuntu 20.04 LTS 5.4.0-1047.52
ubuntu advisories UBUNTU-CVE-2021-47393
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 8 4.18.0-553.22.1.el8_10
- perf RHEL 8 4.18.0-553.22.1.el8_10
- bpftool RHEL 8 4.18.0-553.22.1.el8_10
- kernel-core RHEL 8 4.18.0-553.22.1.el8_10
- kernel-tools RHEL 8 4.18.0-553.22.1.el8_10
- python3-perf RHEL 8 4.18.0-553.22.1.el8_10
- kernel-modules RHEL 8 4.18.0-553.22.1.el8_10
- kernel-zfcpdump RHEL 8 4.18.0-553.22.1.el8_10
red hat advisories RHSA-2024:10262RHSA-2024:7000RHSA-2024:7001RHSA-2024:6991RHSA-2024:6990RHSA-2024:5065
- dtb-aarch64 openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-64kb SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-syms SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-obs-qa openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-source SLE Module for Development Tools 15 SP5, SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-default SLE Workstation Extension 15 SP5, SLE Module for Legacy 15 SP5, SLE Module for Basesystem 15 SP5 +4 more 5.14.21-150500.55.68.1
- kernel-kvmsmall openSUSE Leap 15.5 5.14.21-150500.55.68.1
- kernel-zfcpdump SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.68.1
suse advisories SUSE-SU-2024:2190-1SUSE-SU-2024:2189-1SUSE-SU-2024:2185-1SUSE-SU-2024:2183-1SUSE-SU-2024:2019-1SUSE-SU-2024:2011-1
- kernel AlmaLinux 8 4.18.0-553.22.1.el8_10
- perf AlmaLinux 8 4.18.0-553.22.1.el8_10
- bpftool AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-core AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-tools AlmaLinux 8 4.18.0-553.22.1.el8_10
- python3-perf AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-modules AlmaLinux 8 4.18.0-553.22.1.el8_10
- kernel-zfcpdump AlmaLinux 8 4.18.0-553.22.1.el8_10
almalinux advisories ALSA-2024:7000ALSA-2024:7001
- kernel Rocky Linux 8 4.18.0-553.22.1.el8_10
- kernel-rt Rocky Linux 8 4.18.0-553.22.1.rt7.363.el8_10
rocky linux advisories RLSA-2024:7000RLSA-2024:7001
- git.kernel.org/stable/c/5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca commit
- git.kernel.org/stable/c/a6c42ae1530f94724d3c42cf91fe3d3c5e394f8a commit
- git.kernel.org/stable/c/76bbb482d33bfcd7e9070ecf594c9ec73e01c930 commit
- git.kernel.org/stable/c/aa85fb7bde558bb2e364e85976b14b259c8b6fe8 commit
- git.kernel.org/stable/c/e6fab7af6ba1bc77c78713a83876f60ca7a4a064 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-47393 updated cvss 4.7
kernel: hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs
-
Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 moreaffected: workaround, no fix available “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.”
-
Red Hat CodeReady Linux Builder EUS (v.8.8) kernel-debuginfo-common-x86_64 4.18.0-477.81.1.el8_8, kernel-debuginfo-common-aarch64 4.18.0-477.81.1.el8_8, kernel-debuginfo-common-ppc64le 4.18.0-477.81.1.el8_8fixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:10262
-
Red Hat Enterprise Linux AppStream (v. 9) perf 5.14.0-284.11.1.el9_2, rtla 5.14.0-284.11.1.el9_2, kernel-devel-matched 5.14.0-284.11.1.el9_2, kernel-64k-devel-matched 5.14.0-284.11.1.el9_2, kernel-debug-devel-matched 5.14.0-284.11.1.el9_2, kernel-debuginfo-common-s390x 5.14.0-284.11.1.el9_2, +5 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2023:2458
-
Red Hat Enterprise Linux AppStream E4S (v.9.0) perf 5.14.0-70.117.1.el9_0, kernel-devel-matched 5.14.0-70.117.1.el9_0, kernel-debug-devel-matched 5.14.0-70.117.1.el9_0, kernel-debuginfo-common-s390x 5.14.0-70.117.1.el9_0, kernel-zfcpdump-devel-matched 5.14.0-70.117.1.el9_0, kernel-debuginfo-common-x86_64 5.14.0-70.117.1.el9_0, +2 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:6991
-
Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-553.22.1.el8_10, kernel 4.18.0-553.22.1.el8_10, bpftool 4.18.0-553.22.1.el8_10, kernel-core 4.18.0-553.22.1.el8_10, kernel-tools 4.18.0-553.22.1.el8_10, python3-perf 4.18.0-553.22.1.el8_10, +15 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:7000
-
Red Hat Enterprise Linux BaseOS (v. 9) bpftool 7.0.0-284.11.1.el9_2, kernel 5.14.0-284.11.1.el9_2, kernel-64k 5.14.0-284.11.1.el9_2, kernel-core 5.14.0-284.11.1.el9_2, kernel-tools 5.14.0-284.11.1.el9_2, python3-perf 5.14.0-284.11.1.el9_2, +28 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2023:2458
-
Red Hat Enterprise Linux BaseOS AUS (v.8.6) perf 4.18.0-372.115.1.el8_6, kernel 4.18.0-372.115.1.el8_6, bpftool 4.18.0-372.115.1.el8_6, kernel-core 4.18.0-372.115.1.el8_6, kernel-tools 4.18.0-372.115.1.el8_6, python3-perf 4.18.0-372.115.1.el8_6, +8 more Red Hat Enterprise Linux BaseOS E4S (v.8.6) perf 4.18.0-372.115.1.el8_6, kernel 4.18.0-372.115.1.el8_6, bpftool 4.18.0-372.115.1.el8_6, kernel-core 4.18.0-372.115.1.el8_6, kernel-tools 4.18.0-372.115.1.el8_6, python3-perf 4.18.0-372.115.1.el8_6, +15 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:5065
-
Red Hat Enterprise Linux BaseOS E4S (v.9.0) kernel 5.14.0-70.117.1.el9_0, bpftool 5.14.0-70.117.1.el9_0, kernel-core 5.14.0-70.117.1.el9_0, kernel-tools 5.14.0-70.117.1.el9_0, python3-perf 5.14.0-70.117.1.el9_0, kernel-modules 5.14.0-70.117.1.el9_0, +14 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:6991
show 9 moreshow fewer
-
Red Hat Enterprise Linux BaseOS EUS (v.8.8) perf 4.18.0-477.81.1.el8_8, kernel 4.18.0-477.81.1.el8_8, bpftool 4.18.0-477.81.1.el8_8, kernel-core 4.18.0-477.81.1.el8_8, kernel-tools 4.18.0-477.81.1.el8_8, python3-perf 4.18.0-477.81.1.el8_8, +15 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:10262
-
Red Hat Enterprise Linux BaseOS TUS (v.8.6) perf 4.18.0-372.115.1.el8_6, kernel 4.18.0-372.115.1.el8_6, bpftool 4.18.0-372.115.1.el8_6, kernel-core 4.18.0-372.115.1.el8_6, kernel-tools 4.18.0-372.115.1.el8_6, python3-perf 4.18.0-372.115.1.el8_6, +8 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:5065
-
Red Hat Enterprise Linux CRB (v. 8) kernel-debuginfo-common-x86_64 4.18.0-553.22.1.el8_10, kernel-debuginfo-common-aarch64 4.18.0-553.22.1.el8_10, kernel-debuginfo-common-ppc64le 4.18.0-553.22.1.el8_10fixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:7000
-
Red Hat Enterprise Linux CRB (v. 9) kernel-debuginfo-common-s390x 5.14.0-284.11.1.el9_2, kernel-debuginfo-common-x86_64 5.14.0-284.11.1.el9_2, kernel-debuginfo-common-aarch64 5.14.0-284.11.1.el9_2, kernel-debuginfo-common-ppc64le 5.14.0-284.11.1.el9_2fixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2023:2458
-
Red Hat Enterprise Linux NFV (v. 8) kernel-rt 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-kvm 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-core 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-modules 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-kvm 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-core 4.18.0-553.22.1.rt7.363.el8_10, +4 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:7001
-
Red Hat Enterprise Linux NFV E4S (v.9.0) kernel-rt 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-kvm 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-core 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-modules 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-debug-kvm 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-debug-core 5.14.0-70.117.1.rt21.189.el9_0, +4 more Red Hat Enterprise Linux Real Time E4S (v.9.0) kernel-rt 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-core 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-modules 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-debug-core 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-debug-modules 5.14.0-70.117.1.rt21.189.el9_0, kernel-rt-modules-extra 5.14.0-70.117.1.rt21.189.el9_0, +2 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:6990
-
Red Hat Enterprise Linux RT (v. 8) kernel-rt 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-core 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-modules 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-core 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-debug-modules 4.18.0-553.22.1.rt7.363.el8_10, kernel-rt-modules-extra 4.18.0-553.22.1.rt7.363.el8_10, +2 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2024:7001
-
Red Hat OpenShift AI 8 rhoai/odh-rhel8-operator v2.13.1-2, rhoai/odh-dashboard-rhel8 v2.13.1-1, rhoai/odh-modelmesh-rhel8 v2.13.1-1, rhoai/odh-operator-bundle v2.13.1-2, rhoai/odh-rhel8-operator v2.14.0-24, rhoai/odh-dashboard-rhel8 v2.14.0-11, +56 morefixed: vendor fix “Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHBA-2024:8413
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.25% chance of exploitation in the next 30 days, higher than 16% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
- Technology feeds
References
-
git.kernel.org
/stable/c/5c6e0bce647d9cb32a17d58ffa669b3421fcc6ca
patch
-
git.kernel.org
/stable/c/a6c42ae1530f94724d3c42cf91fe3d3c5e394f8a
patch
-
git.kernel.org
/stable/c/76bbb482d33bfcd7e9070ecf594c9ec73e01c930
patch
-
git.kernel.org
/stable/c/aa85fb7bde558bb2e364e85976b14b259c8b6fe8
patch
-
git.kernel.org
/stable/c/e6fab7af6ba1bc77c78713a83876f60ca7a4a064
patch
Sources
- CVE List CVE-2021-47393
- NVD CVE-2021-47393
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.