Linux Kernel up to 6.12.12/6.13.1 btf.h bpf_try_module_get reference count

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.5 | $0-$5k | 0.00 |
Summary
A vulnerability categorized as critical has been discovered in Linux Kernel up to 6.12.12/6.13.1. This impacts the function bpf_try_module_get of the file btf.h. The manipulation results in reference count.
This vulnerability is cataloged as CVE-2024-58060. There is no exploit available.
It is advisable to upgrade the affected component.
Details
A vulnerability was found in Linux Kernel up to 6.12.12/6.13.1. It has been classified as critical. Affected is the function bpf_try_module_get of the file btf.h. The manipulation with an unknown input leads to a reference count vulnerability. CWE is classifying the issue as CWE-911. The product uses a reference count to manage a resource, but it does not update or incorrectly updates the reference count. This is going to have an impact on availability. CVE summarizes:
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject struct_ops registration that uses module ptr and the module btf_id is missing There is a UAF report in the bpf_struct_ops when CONFIG_MODULES=n. In particular, the report is on tcp_congestion_ops that has a "struct module *owner" member. For struct_ops that has a "struct module *owner" member, it can be extended either by the regular kernel module or by the bpf_struct_ops. bpf_try_module_get() will be used to do the refcounting and different refcount is done based on the owner pointer. When CONFIG_MODULES=n, the btf_id of the "struct module" is missing: WARN: resolve_btfids: unresolved symbol module Thus, the bpf_try_module_get() cannot do the correct refcounting. Not all subsystem's struct_ops requires the "struct module *owner" member. e.g. the recent sched_ext_ops. This patch is to disable bpf_struct_ops registration if the struct_ops has the "struct module *" member and the "struct module" btf_id is missing. The btf_type_is_fwd() helper is moved to the btf.h header file for this test. This has happened since the beginning of bpf_struct_ops which has gone through many changes. The Fixes tag is set to a recent commit that this patch can apply cleanly. Considering CONFIG_MODULES=n is not common and the age of the issue, targeting for bpf-next also.
The advisory is shared for download at git.kernel.org. This vulnerability is traded as CVE-2024-58060 since 03/06/2025. There are known technical details, but no exploit is available.
The vulnerability scanner Nessus provides a plugin with the ID 232233 (Linux Distros Unpatched Vulnerability : CVE-2024-58060), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 6.12.13, 6.13.2 or 6.14-rc1 eliminates this vulnerability. Applying the patch b777b14c2a4a4e2322daf8e8ffd42d2b88831b17/2324fb4e92092837ee278fdd8d60c48ee1a619ce/96ea081ed52bf077cad6d00153b6fba68e510767 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (232233) and CERT Bund (WID-SEC-2025-0499). VulDB is the best source for vulnerability data and more expert information about this specific topic.
Affected
- Google Container-Optimized OS
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- RESF Rocky Linux
- SolarWinds Security Event Manager
- Open Source Linux Kernel
- Dell Secure Connect Gateway
Product
Type
Vendor
Name
Version
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.7VulDB Meta Temp Score: 5.5
VulDB Base Score: 5.7
VulDB Temp Score: 5.5
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Reference countCWE: CWE-911 / CWE-664
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Partially
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 232233
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2024-58060
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Kernel 6.12.13/6.13.2/6.14-rc1
Patch: b777b14c2a4a4e2322daf8e8ffd42d2b88831b17/2324fb4e92092837ee278fdd8d60c48ee1a619ce/96ea081ed52bf077cad6d00153b6fba68e510767
Timeline
03/06/2025 🔍03/06/2025 🔍
03/06/2025 🔍
02/16/2026 🔍
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2024-58060 (🔍)
GCVE (CVE): GCVE-0-2024-58060
GCVE (VulDB): GCVE-100-298824
CERT Bund: WID-SEC-2025-0499 - Linux Kernel: Mehrere Schwachstellen
Entry
Created: 03/06/2025 17:13Updated: 02/16/2026 19:14
Changes: 03/06/2025 17:13 (59), 03/07/2025 16:35 (2), 03/21/2025 19:12 (1), 02/16/2026 19:14 (7)
Complete: 🔍
Cache ID: 216::103
VulDB is the best source for vulnerability data and more expert information about this specific topic.
No comments yet. Languages: en.
Please log in to comment.