Linux Kernel up to 6.12.13/6.13.2/6.14-rc1 Ufshcd devm_blk_crypto_profile_init use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.7 | $0-$5k | 0.00 |
Summary
A vulnerability marked as critical has been reported in Linux Kernel up to 6.12.13/6.13.2/6.14-rc1. Impacted is the function devm_blk_crypto_profile_init of the component Ufshcd Handler. The manipulation leads to use after free.
This vulnerability is referenced as CVE-2025-21739. No exploit is available.
It is suggested to upgrade the affected component.
Details
A vulnerability was found in Linux Kernel up to 6.12.13/6.13.2/6.14-rc1. It has been rated as critical. This issue affects the function devm_blk_crypto_profile_init of the component Ufshcd Handler. The manipulation with an unknown input leads to a use after free vulnerability. Using CWE to declare the problem leads to CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. Impacted is confidentiality, integrity, and availability. The summary by CVE is:
In the Linux kernel, the following vulnerability has been resolved: scsi: ufs: core: Fix use-after free in init error and remove paths devm_blk_crypto_profile_init() registers a cleanup handler to run when the associated (platform-) device is being released. For UFS, the crypto private data and pointers are stored as part of the ufs_hba's data structure 'struct ufs_hba::crypto_profile'. This structure is allocated as part of the underlying ufshcd and therefore Scsi_host allocation. During driver release or during error handling in ufshcd_pltfrm_init(), this structure is released as part of ufshcd_dealloc_host() before the (platform-) device associated with the crypto call above is released. Once this device is released, the crypto cleanup code will run, using the just-released 'struct ufs_hba::crypto_profile'. This causes a use-after-free situation: Call trace: kfree+0x60/0x2d8 (P) kvfree+0x44/0x60 blk_crypto_profile_destroy_callback+0x28/0x70 devm_action_release+0x1c/0x30 release_nodes+0x6c/0x108 devres_release_all+0x98/0x100 device_unbind_cleanup+0x20/0x70 really_probe+0x218/0x2d0 In other words, the initialisation code flow is: platform-device probe ufshcd_pltfrm_init() ufshcd_alloc_host() scsi_host_alloc() allocation of struct ufs_hba creation of scsi-host devices devm_blk_crypto_profile_init() devm registration of cleanup handler using platform-device and during error handling of ufshcd_pltfrm_init() or during driver removal: ufshcd_dealloc_host() scsi_host_put() put_device(scsi-host) release of struct ufs_hba put_device(platform-device) crypto cleanup handler To fix this use-after free, change ufshcd_alloc_host() to register a devres action to automatically cleanup the underlying SCSI device on ufshcd destruction, without requiring explicit calls to ufshcd_dealloc_host(). This way: * the crypto profile and all other ufs_hba-owned resources are destroyed before SCSI (as they've been registered after) * a memleak is plugged in tc-dwc-g210-pci.c remove() as a side-effect * EXPORT_SYMBOL_GPL(ufshcd_dealloc_host) can be removed fully as it's not needed anymore * no future drivers using ufshcd_alloc_host() could ever forget adding the cleanup
The advisory is shared at git.kernel.org. The identification of this vulnerability is CVE-2025-21739 since 12/29/2024. The exploitation is known to be easy. Technical details are known, but no exploit is available. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 06/01/2026).
The vulnerability scanner Nessus provides a plugin with the ID 234058 (SUSE SLES15 / openSUSE 15 Security Update : kernel (SUSE-SU-2025:1178-1)), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 6.12.14, 6.13.3 or 6.14-rc2 eliminates this vulnerability. Applying the patch 0c77c0d754fe83cb154715fcfec6c3faef94f207/9c185beae09a3eb85f54777edafa227f7e03075d/f8fb2403ddebb5eea0033d90d9daae4c88749ada 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 (234058) and CERT Bund (WID-SEC-2025-0453). Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Affected
- Google Container-Optimized OS
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- Siemens SIMATIC S7
- RESF Rocky Linux
- Dell NetWorker
- Dell Avamar
- Red Hat OpenShift
- IBM QRadar SIEM
- SolarWinds Security Event Manager
- Dell PowerProtect Data Domain
- Open Source Linux Kernel
- IBM DataPower Gateway
- Dell Secure Connect Gateway
- Dell PowerScale OneFS
- Dell ECS
Product
Type
Vendor
Name
Version
- 6.12.0
- 6.12.1
- 6.12.2
- 6.12.3
- 6.12.4
- 6.12.5
- 6.12.6
- 6.12.7
- 6.12.8
- 6.12.9
- 6.12.10
- 6.12.11
- 6.12.12
- 6.12.13
- 6.13.0
- 6.13.1
- 6.13.2
- 6.14-rc1
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.9VulDB Meta Temp Score: 7.7
VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔍
VulDB Reliability: 🔍
ADP CISA Base Score: 7.8
ADP CISA Vector: 🔍
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: Use after freeCWE: CWE-416 / CWE-119
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: 234058
Nessus Name: SUSE SLES15 / openSUSE 15 Security Update : kernel (SUSE-SU-2025:1178-1)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: Kernel 6.12.14/6.13.3/6.14-rc2
Patch: 0c77c0d754fe83cb154715fcfec6c3faef94f207/9c185beae09a3eb85f54777edafa227f7e03075d/f8fb2403ddebb5eea0033d90d9daae4c88749ada
Timeline
12/29/2024 🔍02/27/2025 🔍
02/27/2025 🔍
06/01/2026 🔍
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2025-21739 (🔍)
GCVE (CVE): GCVE-0-2025-21739
GCVE (VulDB): GCVE-100-297665
CERT Bund: WID-SEC-2025-0453 - Linux Kernel: Mehrere Schwachstellen
Entry
Created: 02/27/2025 07:31Updated: 06/01/2026 23:44
Changes: 02/27/2025 07:31 (59), 03/25/2025 05:36 (1), 04/10/2025 10:13 (2), 10/25/2025 21:02 (7), 11/10/2025 03:07 (1), 01/18/2026 09:11 (1), 05/25/2026 03:02 (1), 06/01/2026 23:44 (11)
Complete: 🔍
Cache ID: 216::103
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
No comments yet. Languages: en.
Please log in to comment.