CVE-2025-39767 (GCVE-0-2025-39767)
Vulnerability from cvelistv5
Published
2025-09-11 16:56
Modified
2025-09-11 16:56
Severity ?
VLAI Severity ?
EPSS score ?
Summary
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
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "arch/loongarch/kernel/module-sections.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "5189c0b7c251363a4dd7678ed11b054c54f36f6f", "status": "affected", "version": "fcdfe9d22bed08409968a751e93112f742208be6", "versionType": "git" }, { "lessThan": "e94cdb9fb279430cbd323a74c7ec124c85109747", "status": "affected", "version": "fcdfe9d22bed08409968a751e93112f742208be6", "versionType": "git" }, { "lessThan": "a096b0280168d0c8b0ec1cbbfd56c8b81af8c7d8", "status": "affected", "version": "fcdfe9d22bed08409968a751e93112f742208be6", "versionType": "git" }, { "lessThan": "63dbd8fb2af3a89466538599a9acb2d11ef65c06", "status": "affected", "version": "fcdfe9d22bed08409968a751e93112f742208be6", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "arch/loongarch/kernel/module-sections.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.19" }, { "lessThan": "5.19", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.6.*", "status": "unaffected", "version": "6.6.103", "versionType": "semver" }, { "lessThanOrEqual": "6.12.*", "status": "unaffected", "version": "6.12.44", "versionType": "semver" }, { "lessThanOrEqual": "6.16.*", "status": "unaffected", "version": "6.16.4", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.17-rc3", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.6.103", "versionStartIncluding": "5.19", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.12.44", "versionStartIncluding": "5.19", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.16.4", "versionStartIncluding": "5.19", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.17-rc3", "versionStartIncluding": "5.19", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: Optimize module load time by optimizing PLT/GOT counting\n\nWhen enabling CONFIG_KASAN, CONFIG_PREEMPT_VOLUNTARY_BUILD and\nCONFIG_PREEMPT_VOLUNTARY at the same time, there will be soft deadlock,\nthe relevant logs are as follows:\n\nrcu: INFO: rcu_sched self-detected stall on CPU\n...\nCall Trace:\n[\u003c900000000024f9e4\u003e] show_stack+0x5c/0x180\n[\u003c90000000002482f4\u003e] dump_stack_lvl+0x94/0xbc\n[\u003c9000000000224544\u003e] rcu_dump_cpu_stacks+0x1fc/0x280\n[\u003c900000000037ac80\u003e] rcu_sched_clock_irq+0x720/0xf88\n[\u003c9000000000396c34\u003e] update_process_times+0xb4/0x150\n[\u003c90000000003b2474\u003e] tick_nohz_handler+0xf4/0x250\n[\u003c9000000000397e28\u003e] __hrtimer_run_queues+0x1d0/0x428\n[\u003c9000000000399b2c\u003e] hrtimer_interrupt+0x214/0x538\n[\u003c9000000000253634\u003e] constant_timer_interrupt+0x64/0x80\n[\u003c9000000000349938\u003e] __handle_irq_event_percpu+0x78/0x1a0\n[\u003c9000000000349a78\u003e] handle_irq_event_percpu+0x18/0x88\n[\u003c9000000000354c00\u003e] handle_percpu_irq+0x90/0xf0\n[\u003c9000000000348c74\u003e] handle_irq_desc+0x94/0xb8\n[\u003c9000000001012b28\u003e] handle_cpu_irq+0x68/0xa0\n[\u003c9000000001def8c0\u003e] handle_loongarch_irq+0x30/0x48\n[\u003c9000000001def958\u003e] do_vint+0x80/0xd0\n[\u003c9000000000268a0c\u003e] kasan_mem_to_shadow.part.0+0x2c/0x2a0\n[\u003c90000000006344f4\u003e] __asan_load8+0x4c/0x120\n[\u003c900000000025c0d0\u003e] module_frob_arch_sections+0x5c8/0x6b8\n[\u003c90000000003895f0\u003e] load_module+0x9e0/0x2958\n[\u003c900000000038b770\u003e] __do_sys_init_module+0x208/0x2d0\n[\u003c9000000001df0c34\u003e] do_syscall+0x94/0x190\n[\u003c900000000024d6fc\u003e] handle_syscall+0xbc/0x158\n\nAfter analysis, this is because the slow speed of loading the amdgpu\nmodule leads to the long time occupation of the cpu and then the soft\ndeadlock.\n\nWhen loading a module, module_frob_arch_sections() tries to figure out\nthe number of PLTs/GOTs that will be needed to handle all the RELAs. It\nwill call the count_max_entries() to find in an out-of-order date which\ncounting algorithm has O(n^2) complexity.\n\nTo make it faster, we sort the relocation list by info and addend. That\nway, to check for a duplicate relocation, it just needs to compare with\nthe previous entry. This reduces the complexity of the algorithm to O(n\n log n), as done in commit d4e0340919fb (\"arm64/module: Optimize module\nload time by optimizing PLT counting\"). This gives sinificant reduction\nin module load time for modules with large number of relocations.\n\nAfter applying this patch, the soft deadlock problem has been solved,\nand the kernel starts normally without \"Call Trace\".\n\nUsing the default configuration to test some modules, the results are as\nfollows:\n\nModule Size\nip_tables 36K\nfat 143K\nradeon 2.5MB\namdgpu 16MB\n\nWithout this patch:\nModule Module load time (ms)\tCount(PLTs/GOTs)\nip_tables 18\t\t\t\t59/6\nfat 0\t\t\t\t162/14\nradeon 54\t\t\t\t1221/84\namdgpu 1411\t\t\t4525/1098\n\nWith this patch:\nModule Module load time (ms)\tCount(PLTs/GOTs)\nip_tables 18\t\t\t\t59/6\nfat 0\t\t\t\t162/14\nradeon 22\t\t\t\t1221/84\namdgpu 45\t\t\t\t4525/1098" } ], "providerMetadata": { "dateUpdated": "2025-09-11T16:56:22.238Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/5189c0b7c251363a4dd7678ed11b054c54f36f6f" }, { "url": "https://git.kernel.org/stable/c/e94cdb9fb279430cbd323a74c7ec124c85109747" }, { "url": "https://git.kernel.org/stable/c/a096b0280168d0c8b0ec1cbbfd56c8b81af8c7d8" }, { "url": "https://git.kernel.org/stable/c/63dbd8fb2af3a89466538599a9acb2d11ef65c06" } ], "title": "LoongArch: Optimize module load time by optimizing PLT/GOT counting", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-39767", "datePublished": "2025-09-11T16:56:22.238Z", "dateReserved": "2025-04-16T07:20:57.126Z", "dateUpdated": "2025-09-11T16:56:22.238Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-39767\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-11T17:15:42.087\",\"lastModified\":\"2025-09-15T15:22:38.297\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nLoongArch: Optimize module load time by optimizing PLT/GOT counting\\n\\nWhen enabling CONFIG_KASAN, CONFIG_PREEMPT_VOLUNTARY_BUILD and\\nCONFIG_PREEMPT_VOLUNTARY at the same time, there will be soft deadlock,\\nthe relevant logs are as follows:\\n\\nrcu: INFO: rcu_sched self-detected stall on CPU\\n...\\nCall Trace:\\n[\u003c900000000024f9e4\u003e] show_stack+0x5c/0x180\\n[\u003c90000000002482f4\u003e] dump_stack_lvl+0x94/0xbc\\n[\u003c9000000000224544\u003e] rcu_dump_cpu_stacks+0x1fc/0x280\\n[\u003c900000000037ac80\u003e] rcu_sched_clock_irq+0x720/0xf88\\n[\u003c9000000000396c34\u003e] update_process_times+0xb4/0x150\\n[\u003c90000000003b2474\u003e] tick_nohz_handler+0xf4/0x250\\n[\u003c9000000000397e28\u003e] __hrtimer_run_queues+0x1d0/0x428\\n[\u003c9000000000399b2c\u003e] hrtimer_interrupt+0x214/0x538\\n[\u003c9000000000253634\u003e] constant_timer_interrupt+0x64/0x80\\n[\u003c9000000000349938\u003e] __handle_irq_event_percpu+0x78/0x1a0\\n[\u003c9000000000349a78\u003e] handle_irq_event_percpu+0x18/0x88\\n[\u003c9000000000354c00\u003e] handle_percpu_irq+0x90/0xf0\\n[\u003c9000000000348c74\u003e] handle_irq_desc+0x94/0xb8\\n[\u003c9000000001012b28\u003e] handle_cpu_irq+0x68/0xa0\\n[\u003c9000000001def8c0\u003e] handle_loongarch_irq+0x30/0x48\\n[\u003c9000000001def958\u003e] do_vint+0x80/0xd0\\n[\u003c9000000000268a0c\u003e] kasan_mem_to_shadow.part.0+0x2c/0x2a0\\n[\u003c90000000006344f4\u003e] __asan_load8+0x4c/0x120\\n[\u003c900000000025c0d0\u003e] module_frob_arch_sections+0x5c8/0x6b8\\n[\u003c90000000003895f0\u003e] load_module+0x9e0/0x2958\\n[\u003c900000000038b770\u003e] __do_sys_init_module+0x208/0x2d0\\n[\u003c9000000001df0c34\u003e] do_syscall+0x94/0x190\\n[\u003c900000000024d6fc\u003e] handle_syscall+0xbc/0x158\\n\\nAfter analysis, this is because the slow speed of loading the amdgpu\\nmodule leads to the long time occupation of the cpu and then the soft\\ndeadlock.\\n\\nWhen loading a module, module_frob_arch_sections() tries to figure out\\nthe number of PLTs/GOTs that will be needed to handle all the RELAs. It\\nwill call the count_max_entries() to find in an out-of-order date which\\ncounting algorithm has O(n^2) complexity.\\n\\nTo make it faster, we sort the relocation list by info and addend. That\\nway, to check for a duplicate relocation, it just needs to compare with\\nthe previous entry. This reduces the complexity of the algorithm to O(n\\n log n), as done in commit d4e0340919fb (\\\"arm64/module: Optimize module\\nload time by optimizing PLT counting\\\"). This gives sinificant reduction\\nin module load time for modules with large number of relocations.\\n\\nAfter applying this patch, the soft deadlock problem has been solved,\\nand the kernel starts normally without \\\"Call Trace\\\".\\n\\nUsing the default configuration to test some modules, the results are as\\nfollows:\\n\\nModule Size\\nip_tables 36K\\nfat 143K\\nradeon 2.5MB\\namdgpu 16MB\\n\\nWithout this patch:\\nModule Module load time (ms)\\tCount(PLTs/GOTs)\\nip_tables 18\\t\\t\\t\\t59/6\\nfat 0\\t\\t\\t\\t162/14\\nradeon 54\\t\\t\\t\\t1221/84\\namdgpu 1411\\t\\t\\t4525/1098\\n\\nWith this patch:\\nModule Module load time (ms)\\tCount(PLTs/GOTs)\\nip_tables 18\\t\\t\\t\\t59/6\\nfat 0\\t\\t\\t\\t162/14\\nradeon 22\\t\\t\\t\\t1221/84\\namdgpu 45\\t\\t\\t\\t4525/1098\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/5189c0b7c251363a4dd7678ed11b054c54f36f6f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/63dbd8fb2af3a89466538599a9acb2d11ef65c06\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a096b0280168d0c8b0ec1cbbfd56c8b81af8c7d8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e94cdb9fb279430cbd323a74c7ec124c85109747\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…