Bug 2373393 (CVE-2025-38076) - CVE-2025-38076 kernel: alloc_tag: allocate percpu counters for module tags dynamically
Summary: CVE-2025-38076 kernel: alloc_tag: allocate percpu counters for module tags dy...
Keywords:
Status: NEW
Alias: CVE-2025-38076
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-18 10:05 UTC by OSIDB Bzimport
Modified: 2025-06-20 13:58 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-06-18 10:05:12 UTC
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.

Comment 1 Avinash Hanwate 2025-06-20 13:50:32 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025061840-CVE-2025-38076-359d@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.