CVE-2025-38076
JSON

7.8high

alloc_tag: allocate percpu counters for module tags dynamically

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: alloc_tag: allocate percpu counters for module tags dynamically When a module gets unloaded it checks whether any of its tags are still in use and if so, we keep the memory containing module's allocation tags alive until all tags are unused. However percpu counters referenced by the tags are freed by free_module(). This will lead to UAF if the memory allocated by a module is accessed after module was unloaded. To fix this we allocate percpu counters for module allocation tags dynamically and we keep it alive for tags which are still in use after module unloading. This also removes the requirement of a larger PERCPU_MODULE_RESERVE when memory allocation profiling is enabled because percpu memory for counters does not need to be reserved anymore.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 0db6f8d7820a4b788565dac8eed52bfc2c3216da before 3cc733e6d96c938d2b82be96858a0ab900eb6fdc, from 0db6f8d7820a4b788565dac8eed52bfc2c3216da before 12ca42c237756182aad8ab04654c952765cb9061, 6.13
Not affected: before 6.13, from 6.14.9 up to 6.14.*, from 6.15 up to *
CVE List
linux linux_kernelfrom 6.13 before 6.14.9, 6.15NVD

Classification

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: alloc_tag: allocate percpu counters for module tags dynamically When a module gets unloaded it checks whether any of its tags are still in use and if so, we keep the memory containing module's allocation tags alive until all tags are unused. However percpu counters referenced by the tags are freed by free_module(). This will lead to UAF if the memory allocated by a module is accessed after module was unloaded. To fix this we allocate percpu counters for module allocation tags dynamically and we keep it alive for tags which are still in use after module unloading. This also removes the requirement of a larger PERCPU_MODULE_RESERVE when memory allocation profiling is enabled because percpu memory for counters does not need to be reserved anymore.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: alloc_tag: asignar contadores por CPU para etiquetas de módulo dinámicamente Cuando se descarga un módulo, este verifica si alguna de sus etiquetas aún está en uso y, de ser así, mantenemos activa la memoria que contiene las etiquetas de asignación del módulo hasta que todas las etiquetas estén sin usar. Sin embargo, los contadores por CPU referenciados por las etiquetas son liberados por free_module(). Esto conducirá a UAF si se accede a la memoria asignada por un módulo después de que el módulo se haya descargado. Para corregir esto, asignamos contadores por CPU para etiquetas de asignación de módulo dinámicamente y los mantenemos activos para las etiquetas que aún están en uso después de la descarga del módulo. Esto también elimina el requisito de un PERCPU_MODULE_RESERVE más grande cuando el perfil de asignación de memoria está habilitado porque la memoria por CPU para los contadores ya no necesita reservarse.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-38076 changed 2026-05-11CVE Terms of Use
NVDCVE-2025-38076 changed 2026-06-17Public domain