# CVE-2023-52613: drivers/thermal/loongson2\_thermal: Fix incorrect PTR\_ERR() judgment

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; 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.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-03-18T10:07:47.781Z
- **Modified:** 2026-06-17T06:43:09.710Z

## Who should check

- Anyone running Linux \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 70481755ed77400e783200e2d022e5fea16060ce; \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 6010a9fc14eb1feab5cafd84422001134fe8ec58; \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 15ef92e9c41124ee9d88b01208364f3fe1f45f84
- Anyone running Linux 6.6

## Description

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

drivers/thermal/loongson2\_thermal: Fix incorrect PTR\_ERR() judgment

PTR\_ERR() returns -ENODEV when thermal-zones are undefined, and we need
-ENODEV as the right value for comparison.

Otherwise, tz-\>type is NULL when thermal-zones is undefined, resulting
in the following error:

\[   12.290030\] CPU 1 Unable to handle kernel paging request at virtual address fffffffffffffff1, era == 900000000355f410, ra == 90000000031579b8
\[   12.302877\] Oops\[\#1\]:
\[   12.305190\] CPU: 1 PID: 181 Comm: systemd-udevd Not tainted 6.6.0-rc7+ \#5385
\[   12.312304\] pc 900000000355f410 ra 90000000031579b8 tp 90000001069e8000 sp 90000001069eba10
\[   12.320739\] a0 0000000000000000 a1 fffffffffffffff1 a2 0000000000000014 a3 0000000000000001
\[   12.329173\] a4 90000001069eb990 a5 0000000000000001 a6 0000000000001001 a7 900000010003431c
\[   12.337606\] t0 fffffffffffffff1 t1 54567fd5da9b4fd4 t2 900000010614ec40 t3 00000000000dc901
\[   12.346041\] t4 0000000000000000 t5 0000000000000004 t6 900000010614ee20 t7 900000000d00b790
\[   12.354472\] t8 00000000000dc901 u0 54567fd5da9b4fd4 s9 900000000402ae10 s0 900000010614ec40
\[   12.362916\] s1 90000000039fced0 s2 ffffffffffffffed s3 ffffffffffffffed s4 9000000003acc000
\[   12.362931\] s5 0000000000000004 s6 fffffffffffff000 s7 0000000000000490 s8 90000001028b2ec8
\[   12.362938\]    ra: 90000000031579b8 thermal\_add\_hwmon\_sysfs+0x258/0x300
\[   12.386411\]   ERA: 900000000355f410 strscpy+0xf0/0x160
\[   12.391626\]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
\[   12.397898\]  PRMD: 00000004 (PPLV0 +PIE -PWE)
\[   12.403678\]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
\[   12.409859\]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
\[   12.415882\] ESTAT: 00010000 \[PIL\] (IS= ECode=1 EsubCode=0)
\[   12.415907\]  BADV: fffffffffffffff1
\[   12.415911\]  PRID: 0014a000 (Loongson-64bit, Loongson-2K1000)
\[   12.415917\] Modules linked in: loongson2\_thermal(+) vfat fat uio\_pdrv\_genirq uio fuse zram zsmalloc
\[   12.415950\] Process systemd-udevd (pid: 181, threadinfo=00000000358b9718, task=00000000ace72fe3)
\[   12.415961\] Stack : 0000000000000dc0 54567fd5da9b4fd4 900000000402ae10 9000000002df9358
\[   12.415982\]         ffffffffffffffed 0000000000000004 9000000107a10aa8 90000001002a3410
\[   12.415999\]         ffffffffffffffed ffffffffffffffed 9000000107a11268 9000000003157ab0
\[   12.416016\]         9000000107a10aa8 ffffff80020fc0c8 90000001002a3410 ffffffffffffffed
\[   12.416032\]         0000000000000024 ffffff80020cc1e8 900000000402b2a0 9000000003acc000
\[   12.416048\]         90000001002a3410 0000000000000000 ffffff80020f4030 90000001002a3410
\[   12.416065\]         0000000000000000 9000000002df6808 90000001002a3410 0000000000000000
\[   12.416081\]         ffffff80020f4030 0000000000000000 90000001002a3410 9000000002df2ba8
\[   12.416097\]         00000000000000b4 90000001002a34f4 90000001002a3410 0000000000000002
\[   12.416114\]         ffffff80020f4030 fffffffffffffff0 90000001002a3410 9000000002df2f30
\[   12.416131\]         ...
\[   12.416138\] Call Trace:
\[   12.416142\] \[\<900000000355f410\>\] strscpy+0xf0/0x160
\[   12.416167\] \[\<90000000031579b8\>\] thermal\_add\_hwmon\_sysfs+0x258/0x300
\[   12.416183\] \[\<9000000003157ab0\>\] devm\_thermal\_add\_hwmon\_sysfs+0x50/0xe0
\[   12.416200\] \[\<ffffff80020cc1e8\>\] loongson2\_thermal\_probe+0x128/0x200 \[loongson2\_thermal\]
\[   12.416232\] \[\<9000000002df6808\>\] platform\_probe+0x68/0x140
\[   12.416249\] \[\<9000000002df2ba8\>\] really\_probe+0xc8/0x3c0
\[   12.416269\] \[\<9000000002df2f30\>\] \_\_driver\_probe\_device+0x90/0x180
\[   12.416286\] \[\<9000000002df3058\>\] driver\_probe\_device+0x38/0x160
\[   12.416302\] \[\<9000000002df33a8\>\] \_\_driver\_attach+0xa8/0x200
\[   12.416314\] \[\<9000000002deffec\>\] bus\_for\_each\_dev+0x8c/0x120
\[   12.416330\] \[\<9000000002df198c\>\] bus\_add\_driver+0x10c/0x2a0
\[   12.416346\] \[\<9000000002df46b4\>\] driver\_register+0x74/0x160
\[   12.416358\] \[\<90000000022201a4\>\] do\_one\_initcall+0x84/0x220
\[   12.416372\] \[\<90000000022f3ab8\>\] do\_init\_module+0x58/0x2c0
\[
---truncated---

## Affected and fixed versions

- Linux: \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 70481755ed77400e783200e2d022e5fea16060ce; \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 6010a9fc14eb1feab5cafd84422001134fe8ec58; \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 15ef92e9c41124ee9d88b01208364f3fe1f45f84 (cvelist)
- Linux: 6.6 (cvelist)

## Mitigation

- Upgrade Linux to 15ef92e9c41124ee9d88b01208364f3fe1f45f84 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52613.md
Affected: Linux >= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, < 70481755ed77400e783200e2d022e5fea16060ce; >= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, < 6010a9fc14eb1feab5cafd84422001134fe8ec58; >= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, < 15ef92e9c41124ee9d88b01208364f3fe1f45f84; Linux 6.6
Fixed in: Linux 70481755ed77400e783200e2d022e5fea16060ce, Linux 6010a9fc14eb1feab5cafd84422001134fe8ec58, Linux 15ef92e9c41124ee9d88b01208364f3fe1f45f84

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-2023-52613 being exploited?

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

### How serious is CVE-2023-52613?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52613?

Linux \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 70481755ed77400e783200e2d022e5fea16060ce; \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 6010a9fc14eb1feab5cafd84422001134fe8ec58; \>= e7e3a7c35791fe7a70997883fb8ada5866a40f4d, \< 15ef92e9c41124ee9d88b01208364f3fe1f45f84; Linux 6.6.

### Is there a fix for CVE-2023-52613?

Yes. Fixed in Linux 70481755ed77400e783200e2d022e5fea16060ce, Linux 6010a9fc14eb1feab5cafd84422001134fe8ec58, Linux 15ef92e9c41124ee9d88b01208364f3fe1f45f84. Upgrade Linux to 15ef92e9c41124ee9d88b01208364f3fe1f45f84 or later.

### How do I check if I'm affected by CVE-2023-52613?

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/70481755ed77400e783200e2d022e5fea16060ce>
- patch: <https://git.kernel.org/stable/c/6010a9fc14eb1feab5cafd84422001134fe8ec58>
- patch: <https://git.kernel.org/stable/c/15ef92e9c41124ee9d88b01208364f3fe1f45f84>

## 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-2023-52613>

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