CVE-2025-38076

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-38076
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38076.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-38076
Downstream
Published
2025-06-18T09:33:51Z
Modified
2025-10-22T12:10:58.618708Z
Summary
alloc_tag: allocate percpu counters for module tags dynamically
Details

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 PERCPUMODULERESERVE when memory allocation profiling is enabled because percpu memory for counters does not need to be reserved anymore.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0db6f8d7820a4b788565dac8eed52bfc2c3216da
Fixed
3cc733e6d96c938d2b82be96858a0ab900eb6fdc
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0db6f8d7820a4b788565dac8eed52bfc2c3216da
Fixed
12ca42c237756182aad8ab04654c952765cb9061

Affected versions

v6.*

v6.12
v6.12-rc7
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.14
v6.14-rc1
v6.14-rc2
v6.14-rc3
v6.14-rc4
v6.14-rc5
v6.14-rc6
v6.14-rc7
v6.14.1
v6.14.2
v6.14.3
v6.14.4
v6.14.5
v6.14.6
v6.14.7
v6.14.8
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.14.9