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

Published Sep 11, 2025
·
Updated

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

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

When enabling CONFIGKASAN, CONFIGPREEMPTVOLUNTARYBUILD and CONFIGPREEMPTVOLUNTARY at the same time, there will be soft deadlock, the relevant logs are as follows:

rcu: INFO: rcusched self-detected stall on CPU ... Call Trace: [<900000000024f9e4>] showstack+0x5c/0x180 [<90000000002482f4>] dumpstacklvl+0x94/0xbc [<9000000000224544>] rcudumpcpustacks+0x1fc/0x280 [<900000000037ac80>] rcuschedclockirq+0x720/0xf88 [<9000000000396c34>] updateprocesstimes+0xb4/0x150 [<90000000003b2474>] ticknohzhandler+0xf4/0x250 [<9000000000397e28>] hrtimerrunqueues+0x1d0/0x428 [<9000000000399b2c>] hrtimerinterrupt+0x214/0x538 [<9000000000253634>] constanttimerinterrupt+0x64/0x80 [<9000000000349938>] handleirqeventpercpu+0x78/0x1a0 [<9000000000349a78>] handleirqeventpercpu+0x18/0x88 [<9000000000354c00>] handlepercpuirq+0x90/0xf0 [<9000000000348c74>] handleirqdesc+0x94/0xb8 [<9000000001012b28>] handlecpuirq+0x68/0xa0 [<9000000001def8c0>] handleloongarchirq+0x30/0x48 [<9000000001def958>] dovint+0x80/0xd0 [<9000000000268a0c>] kasanmemtoshadow.part.0+0x2c/0x2a0 [<90000000006344f4>] asanload8+0x4c/0x120 [<900000000025c0d0>] modulefrobarchsections+0x5c8/0x6b8 [<90000000003895f0>] loadmodule+0x9e0/0x2958 [<900000000038b770>] dosysinitmodule+0x208/0x2d0 [<9000000001df0c34>] dosyscall+0x94/0x190 [<900000000024d6fc>] handlesyscall+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, modulefrobarchsections() tries to figure out the number of PLTs/GOTs that will be needed to handle all the RELAs. It will call the countmaxentries() 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 iptables 36K fat 143K radeon 2.5MB amdgpu 16MB

Without this patch: Module Module load time (ms) Count(PLTs/GOTs) iptables 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) iptables 18 59/6 fat 0 162/14 radeon 22 1221/84 amdgpu 45 4525/1098

Affected Software

11 affected componentsFixes available
Linux Linux kernel
Microsoft azl3 kernel 6.6.96.2-2
debian/linux<=6.1.176-1, <=6.1.190-1
6.12.107-16.12.113-17.2.12-17.2.13-1
Linux Linux kernel>=5.19<6.6.103
Linux Linux kernel>=6.7<6.12.44
Linux Linux kernel>=6.13<6.16.4
Linux Linux kernel=6.17-rc1
Linux Linux kernel=6.17-rc2
linux/kernel>=5.19.0<6.6.103
6.6.103
linux/kernel>=6.7.0<6.12.44
6.12.44
linux/kernel>=6.13.0<6.16.4
6.16.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.103
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.44
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.16.4

Event History

Sep 11, 2025
CVE Published
via MITRE·04:56 PM
Data Sourced
via MITRE·04:56 PM
Description
Data Sourced
via NVD·05:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 13, 2025
Data Sourced
via Microsoft·01:03 AM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2025-39767?

CVE-2025-39767 has a medium severity due to the potential for soft deadlock in certain kernel configurations.

2

How do I fix CVE-2025-39767?

To fix CVE-2025-39767, it is recommended to update the Linux kernel to a version that mitigates the vulnerability.

3

Which configurations are affected by CVE-2025-39767?

CVE-2025-39767 affects systems with CONFIG_KASAN, CONFIG_PREEMPT_VOLUNTARY_BUILD, and CONFIG_PREEMPT_VOLUNTARY enabled simultaneously.

4

What does CVE-2025-39767 impact in the Linux kernel?

CVE-2025-39767 impacts the module load time optimization feature in the Linux kernel, leading to possible deadlocks.

5

Is CVE-2025-39767 specific to a particular version of the Linux kernel?

CVE-2025-39767 is not limited to a specific version but arises from specific configuration combinations within the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203