CVE-2025-39767

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
11/09/2025
Last modified:
15/09/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> LoongArch: Optimize module load time by optimizing PLT/GOT counting<br /> <br /> When enabling CONFIG_KASAN, CONFIG_PREEMPT_VOLUNTARY_BUILD and<br /> CONFIG_PREEMPT_VOLUNTARY at the same time, there will be soft deadlock,<br /> the relevant logs are as follows:<br /> <br /> rcu: INFO: rcu_sched self-detected stall on CPU<br /> ...<br /> Call Trace:<br /> [] show_stack+0x5c/0x180<br /> [] dump_stack_lvl+0x94/0xbc<br /> [] rcu_dump_cpu_stacks+0x1fc/0x280<br /> [] rcu_sched_clock_irq+0x720/0xf88<br /> [] update_process_times+0xb4/0x150<br /> [] tick_nohz_handler+0xf4/0x250<br /> [] __hrtimer_run_queues+0x1d0/0x428<br /> [] hrtimer_interrupt+0x214/0x538<br /> [] constant_timer_interrupt+0x64/0x80<br /> [] __handle_irq_event_percpu+0x78/0x1a0<br /> [] handle_irq_event_percpu+0x18/0x88<br /> [] handle_percpu_irq+0x90/0xf0<br /> [] handle_irq_desc+0x94/0xb8<br /> [] handle_cpu_irq+0x68/0xa0<br /> [] handle_loongarch_irq+0x30/0x48<br /> [] do_vint+0x80/0xd0<br /> [] kasan_mem_to_shadow.part.0+0x2c/0x2a0<br /> [] __asan_load8+0x4c/0x120<br /> [] module_frob_arch_sections+0x5c8/0x6b8<br /> [] load_module+0x9e0/0x2958<br /> [] __do_sys_init_module+0x208/0x2d0<br /> [] do_syscall+0x94/0x190<br /> [] handle_syscall+0xbc/0x158<br /> <br /> After analysis, this is because the slow speed of loading the amdgpu<br /> module leads to the long time occupation of the cpu and then the soft<br /> deadlock.<br /> <br /> When loading a module, module_frob_arch_sections() tries to figure out<br /> the number of PLTs/GOTs that will be needed to handle all the RELAs. It<br /> will call the count_max_entries() to find in an out-of-order date which<br /> counting algorithm has O(n^2) complexity.<br /> <br /> To make it faster, we sort the relocation list by info and addend. That<br /> way, to check for a duplicate relocation, it just needs to compare with<br /> the previous entry. This reduces the complexity of the algorithm to O(n<br /> log n), as done in commit d4e0340919fb ("arm64/module: Optimize module<br /> load time by optimizing PLT counting"). This gives sinificant reduction<br /> in module load time for modules with large number of relocations.<br /> <br /> After applying this patch, the soft deadlock problem has been solved,<br /> and the kernel starts normally without "Call Trace".<br /> <br /> Using the default configuration to test some modules, the results are as<br /> follows:<br /> <br /> Module Size<br /> ip_tables 36K<br /> fat 143K<br /> radeon 2.5MB<br /> amdgpu 16MB<br /> <br /> Without this patch:<br /> Module Module load time (ms) Count(PLTs/GOTs)<br /> ip_tables 18 59/6<br /> fat 0 162/14<br /> radeon 54 1221/84<br /> amdgpu 1411 4525/1098<br /> <br /> With this patch:<br /> Module Module load time (ms) Count(PLTs/GOTs)<br /> ip_tables 18 59/6<br /> fat 0 162/14<br /> radeon 22 1221/84<br /> amdgpu 45 4525/1098

Impact