CVE & CISA-KEV Catalog

CVE-2025-68359

UNSCORED

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix double free of qgroup record after failure to add delayed ref head In the previous code it was possible to incur into a double kfree() scenario when calling add_delayed_ref_head(). This could happen if the record was reported to already exist in the btrfs_qgroup_trace_extent_nolock() call, but then there was an error later on add_delayed_ref_head(). In this case, since add_delayed_ref_head() returned an error, the caller went to free the record. Since add_delayed_ref_head() couldn't set this kfree'd pointer to NULL, then kfree() would have acted on a non-NULL 'record' object which was pointing to memory already freed by the callee. The problem comes from the fact that the responsibility to kfree the object is on both the caller and the callee at the same time. Hence, the fix for this is to shift the ownership of the 'qrecord' object out of the add_delayed_ref_head(). That is, we will never attempt to kfree() the given object inside of this function, and will expect the caller to act on the 'qrecord' object on its own. The only exception where the 'qrecord' object cannot be kfree'd is if it was inserted into the tracing logic, for which we already have the 'qrecord_inserted_ret' boolean to account for this. Hence, the caller has to kfree the object only if add_delayed_ref_head() reports not to have inserted it on the tracing logic. As a side-effect of the above, we must guarantee that 'qrecord_inserted_ret' is properly initialized at the start of the function, not at the end, and then set when an actual insert happens. This way we avoid 'qrecord_inserted_ret' having an invalid value on an early exit. The documentation from the add_delayed_ref_head() has also been updated to reflect on the exact ownership of the 'qrecord' object.

How to fix

Remediation Available
linuxDebian
Fixed in:6.17.13-1CVE-2025-68359
linuxUbuntu
Fixed in:6.17.0-19.19USN-8094-1
linux-awsUbuntu
Fixed in:6.17.0-1009.9USN-8094-1
linux-aws-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.2USN-8094-1
linux-azureUbuntu
Fixed in:6.17.0-1010.10USN-8094-4
linux-azure-6.17Ubuntu
Fixed in:6.17.0-1010.10~24.04.1USN-8094-4
linux-gcpUbuntu
Fixed in:6.17.0-1009.9USN-8094-1
linux-gcp-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.3USN-8094-2
linux-hwe-6.17Ubuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
linux-image-6.17.0-1008-realtimeUbuntu
Fixed in:6.17.0-1008.9~24.04.1USN-8094-3
Fixed in:6.17.0-1008.9USN-8094-2
linux-image-6.17.0-1009-awsUbuntu
Fixed in:6.17.0-1009.9~24.04.2USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-6.17.0-1009-aws-64kUbuntu
Fixed in:6.17.0-1009.9~24.04.2USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-6.17.0-1009-gcpUbuntu
Fixed in:6.17.0-1009.9~24.04.3USN-8094-2
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-6.17.0-1009-gcp-64kUbuntu
Fixed in:6.17.0-1009.9~24.04.3USN-8094-2
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-6.17.0-1009-oracleUbuntu
Fixed in:6.17.0-1009.9~24.04.1USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-6.17.0-1009-oracle-64kUbuntu
Fixed in:6.17.0-1009.9~24.04.1USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-6.17.0-1010-azureUbuntu
Fixed in:6.17.0-1010.10~24.04.1USN-8094-4
Fixed in:6.17.0-1010.10USN-8094-4
linux-image-6.17.0-1010-raspiUbuntu
Fixed in:6.17.0-1010.10USN-8094-5
linux-image-6.17.0-1017-oemUbuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-image-6.17.0-19-genericUbuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
Fixed in:6.17.0-19.19USN-8094-1
linux-image-6.17.0-19-generic-64kUbuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
Fixed in:6.17.0-19.19USN-8094-1
linux-image-awsUbuntu
Fixed in:6.17.0-1009.9~24.04.2USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-aws-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.2USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-aws-64kUbuntu
Fixed in:6.17.0-1009.9~24.04.2USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-aws-64k-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.2USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-azureUbuntu
Fixed in:6.17.0-1010.10~24.04.1USN-8094-4
Fixed in:6.17.0-1010.10USN-8094-4
linux-image-azure-6.17Ubuntu
Fixed in:6.17.0-1010.10~24.04.1USN-8094-4
Fixed in:6.17.0-1010.10USN-8094-4
linux-image-gcpUbuntu
Fixed in:6.17.0-1009.9~24.04.3USN-8094-2
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-gcp-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.3USN-8094-2
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-gcp-64kUbuntu
Fixed in:6.17.0-1009.9~24.04.3USN-8094-2
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-gcp-64k-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.3USN-8094-2
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-genericUbuntu
Fixed in:6.17.0-19.19USN-8094-1
linux-image-generic-6.17Ubuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
Fixed in:6.17.0-19.19USN-8094-1
linux-image-generic-64kUbuntu
Fixed in:6.17.0-19.19USN-8094-1
linux-image-generic-64k-6.17Ubuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
Fixed in:6.17.0-19.19USN-8094-1
linux-image-generic-64k-hwe-24.04Ubuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
linux-image-generic-hwe-24.04Ubuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
linux-image-oem-24.04Ubuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-image-oem-24.04aUbuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-image-oem-24.04bUbuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-image-oem-24.04cUbuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-image-oem-24.04dUbuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-image-oem-6.17Ubuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-image-oracleUbuntu
Fixed in:6.17.0-1009.9~24.04.1USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-oracle-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.1USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-oracle-64kUbuntu
Fixed in:6.17.0-1009.9~24.04.1USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-oracle-64k-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.1USN-8094-1
Fixed in:6.17.0-1009.9USN-8094-1
linux-image-raspiUbuntu
Fixed in:6.17.0-1010.10USN-8094-5
linux-image-raspi-6.17Ubuntu
Fixed in:6.17.0-1010.10USN-8094-5
linux-image-realtimeUbuntu
Fixed in:6.17.0-1008.9USN-8094-2
linux-image-realtime-6.17Ubuntu
Fixed in:6.17.0-1008.9~24.04.1USN-8094-3
Fixed in:6.17.0-1008.9USN-8094-2
linux-image-realtime-hwe-24.04Ubuntu
Fixed in:6.17.0-1008.9~24.04.1USN-8094-3
Fixed in:6.17.0-1008.9USN-8094-2
linux-image-virtualUbuntu
Fixed in:6.17.0-19.19USN-8094-1
linux-image-virtual-6.17Ubuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
Fixed in:6.17.0-19.19USN-8094-1
linux-image-virtual-hwe-24.04Ubuntu
Fixed in:6.17.0-19.19~24.04.2USN-8094-1
linux-oem-6.17Ubuntu
Fixed in:6.17.0-1017.17USN-8152-1
linux-oracleUbuntu
Fixed in:6.17.0-1009.9USN-8094-1
linux-oracle-6.17Ubuntu
Fixed in:6.17.0-1009.9~24.04.1USN-8094-1
linux-raspiUbuntu
Fixed in:6.17.0-1010.10USN-8094-5
linux-realtimeUbuntu
Fixed in:6.17.0-1008.9USN-8094-2
linux-realtime-6.17Ubuntu
Fixed in:6.17.0-1008.9~24.04.1USN-8094-3

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3.1 Vector

No CVSS vector data available.

Exploit Intelligence

0.17%probability of exploitation in 30 days
6thpercentile

Low risk: more likely to be exploited than 6% of all known CVEs.

References

Embed a live status badge for CVE-2025-68359
CVE-2025-68359 severity badge

Markdown

[![CVE-2025-68359](https://tridentstack.com/cve/badge/CVE-2025-68359.svg)](https://tridentstack.com/cve/CVE-2025-68359)

HTML

<a href="https://tridentstack.com/cve/CVE-2025-68359"><img src="https://tridentstack.com/cve/badge/CVE-2025-68359.svg" alt="CVE-2025-68359"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-12-29.