# CVE-2025-39767: LoongArch: Optimize module load time by optimizing PLT/GOT counting

> 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, NVD) `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.17% (percentile 4, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-09-11T16:56:22.238Z
- **Modified:** 2026-10-30T13:18:09.397Z

## Who should check

- Anyone running Linux \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 45b4617608304119fa4da338ae2c7823982d00f6; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 5189c0b7c251363a4dd7678ed11b054c54f36f6f; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< e94cdb9fb279430cbd323a74c7ec124c85109747; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< a096b0280168d0c8b0ec1cbbfd56c8b81af8c7d8; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 63dbd8fb2af3a89466538599a9acb2d11ef65c06
- Anyone running Linux 5.19

## Description

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

LoongArch: Optimize module load time by optimizing PLT/GOT counting

When enabling CONFIG\_KASAN, CONFIG\_PREEMPT\_VOLUNTARY\_BUILD and
CONFIG\_PREEMPT\_VOLUNTARY at the same time, there will be soft deadlock,
the relevant logs are as follows:

rcu: INFO: rcu\_sched self-detected stall on CPU
...
Call Trace:
\[\<900000000024f9e4\>\] show\_stack+0x5c/0x180
\[\<90000000002482f4\>\] dump\_stack\_lvl+0x94/0xbc
\[\<9000000000224544\>\] rcu\_dump\_cpu\_stacks+0x1fc/0x280
\[\<900000000037ac80\>\] rcu\_sched\_clock\_irq+0x720/0xf88
\[\<9000000000396c34\>\] update\_process\_times+0xb4/0x150
\[\<90000000003b2474\>\] tick\_nohz\_handler+0xf4/0x250
\[\<9000000000397e28\>\] \_\_hrtimer\_run\_queues+0x1d0/0x428
\[\<9000000000399b2c\>\] hrtimer\_interrupt+0x214/0x538
\[\<9000000000253634\>\] constant\_timer\_interrupt+0x64/0x80
\[\<9000000000349938\>\] \_\_handle\_irq\_event\_percpu+0x78/0x1a0
\[\<9000000000349a78\>\] handle\_irq\_event\_percpu+0x18/0x88
\[\<9000000000354c00\>\] handle\_percpu\_irq+0x90/0xf0
\[\<9000000000348c74\>\] handle\_irq\_desc+0x94/0xb8
\[\<9000000001012b28\>\] handle\_cpu\_irq+0x68/0xa0
\[\<9000000001def8c0\>\] handle\_loongarch\_irq+0x30/0x48
\[\<9000000001def958\>\] do\_vint+0x80/0xd0
\[\<9000000000268a0c\>\] kasan\_mem\_to\_shadow.part.0+0x2c/0x2a0
\[\<90000000006344f4\>\] \_\_asan\_load8+0x4c/0x120
\[\<900000000025c0d0\>\] module\_frob\_arch\_sections+0x5c8/0x6b8
\[\<90000000003895f0\>\] load\_module+0x9e0/0x2958
\[\<900000000038b770\>\] \_\_do\_sys\_init\_module+0x208/0x2d0
\[\<9000000001df0c34\>\] do\_syscall+0x94/0x190
\[\<900000000024d6fc\>\] handle\_syscall+0xbc/0x158

After analysis, this is because the slow speed of loading the amdgpu
module leads to the long time occupation of the cpu and then the soft
deadlock.

When loading a module, module\_frob\_arch\_sections() tries to figure out
the number of PLTs/GOTs that will be needed to handle all the RELAs. It
will call the count\_max\_entries() to find in an out-of-order date which
counting algorithm has O(n^2) complexity.

To make it faster, we sort the relocation list by info and addend. That
way, to check for a duplicate relocation, it just needs to compare with
the previous entry. This reduces the complexity of the algorithm to O(n
 log n), as done in commit d4e0340919fb ("arm64/module: Optimize module
load time by optimizing PLT counting"). This gives sinificant reduction
in module load time for modules with large number of relocations.

After applying this patch, the soft deadlock problem has been solved,
and the kernel starts normally without "Call Trace".

Using the default configuration to test some modules, the results are as
follows:

Module              Size
ip\_tables           36K
fat                 143K
radeon              2.5MB
amdgpu              16MB

Without this patch:
Module              Module load time (ms)	Count(PLTs/GOTs)
ip\_tables           18				59/6
fat                 0				162/14
radeon              54				1221/84
amdgpu              1411			4525/1098

With this patch:
Module              Module load time (ms)	Count(PLTs/GOTs)
ip\_tables           18				59/6
fat                 0				162/14
radeon              22				1221/84
amdgpu              45				4525/1098

## Affected and fixed versions

- Linux: \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 45b4617608304119fa4da338ae2c7823982d00f6; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 5189c0b7c251363a4dd7678ed11b054c54f36f6f; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< e94cdb9fb279430cbd323a74c7ec124c85109747; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< a096b0280168d0c8b0ec1cbbfd56c8b81af8c7d8; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 63dbd8fb2af3a89466538599a9acb2d11ef65c06 (cvelist)
- Linux: 5.19 (cvelist)

## Mitigation

- Upgrade Linux to 63dbd8fb2af3a89466538599a9acb2d11ef65c06 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-39767.md
Affected: Linux >= fcdfe9d22bed08409968a751e93112f742208be6, < 45b4617608304119fa4da338ae2c7823982d00f6; >= fcdfe9d22bed08409968a751e93112f742208be6, < 5189c0b7c251363a4dd7678ed11b054c54f36f6f; >= fcdfe9d22bed08409968a751e93112f742208be6, < e94cdb9fb279430cbd323a74c7ec124c85109747; >= fcdfe9d22bed08409968a75…
Fixed in: Linux 45b4617608304119fa4da338ae2c7823982d00f6, Linux 5189c0b7c251363a4dd7678ed11b054c54f36f6f, Linux 63dbd8fb2af3a89466538599a9acb2d11ef65c06

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-2025-39767 being exploited?

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

### How serious is CVE-2025-39767?

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

### Which versions are affected by CVE-2025-39767?

Linux \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 45b4617608304119fa4da338ae2c7823982d00f6; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 5189c0b7c251363a4dd7678ed11b054c54f36f6f; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< e94cdb9fb279430cbd323a74c7ec124c85109747; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< a096b0280168d0c8b0ec1cbbfd56c8b81af8c7d8; \>= fcdfe9d22bed08409968a751e93112f742208be6, \< 63dbd8fb2af3a89466538599a9acb2d11ef65c06; Linux 5.19.

### Is there a fix for CVE-2025-39767?

Yes. Fixed in Linux 45b4617608304119fa4da338ae2c7823982d00f6, Linux 5189c0b7c251363a4dd7678ed11b054c54f36f6f, Linux 63dbd8fb2af3a89466538599a9acb2d11ef65c06. Upgrade Linux to 63dbd8fb2af3a89466538599a9acb2d11ef65c06 or later.

### How do I check if I'm affected by CVE-2025-39767?

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/5189c0b7c251363a4dd7678ed11b054c54f36f6f>
- patch: <https://git.kernel.org/stable/c/e94cdb9fb279430cbd323a74c7ec124c85109747>
- patch: <https://git.kernel.org/stable/c/a096b0280168d0c8b0ec1cbbfd56c8b81af8c7d8>
- patch: <https://git.kernel.org/stable/c/63dbd8fb2af3a89466538599a9acb2d11ef65c06>
- other: <https://git.kernel.org/stable/c/45b4617608304119fa4da338ae2c7823982d00f6>

## 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-2025-39767>

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