Skip to main content
VulnerabilityPublished Updated

CVE-2025-68359: Linux kernel · btrfs: fix double free of qgroup record after failure to add delayed ref head

Source GCVE Database

0
Authoritative record:CVE-2025-68359· Critical 9.8

Not known to be exploited · CVSS 9.8 Critical · fixed in 7617680769e3119dfb3b43a2b7c287ce2242211c : patch Linux kernel as a priority.

Data as of 26 Oct 2026, 17:16 UTC

CVSS 3.1 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 49% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 7617680769e3119dfb3b43a2b7c287ce2242211c, 364685c4c2d9c9f4408d95451bcf42fdeebc3ebb, 725e46298876a2cc1f1c3fb22ba69d29102c3ddf +1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 24 Dec 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade Linux kernel to 7617680769e3119dfb3b43a2b7c287ce2242211c, 364685c4c2d9c9f4408d95451bcf42fdeebc3ebb, 725e46298876a2cc1f1c3fb22ba69d29102c3ddf or 82d46660ebd94c269e3f25a77eb563621d8e67e3.

Affected software

ProductAffectedFixed in
LinuxLinuxAffected
  • ≥ 6ef8fbce010421bf742b12b8f8f2b2d2ff154845, < 7617680769e3119dfb3b43a2b7c287ce2242211c
Fixed in
  • 7617680769e3119dfb3b43a2b7c287ce2242211c
LinuxLinuxAffected
  • ≥ 6ef8fbce010421bf742b12b8f8f2b2d2ff154845, < 364685c4c2d9c9f4408d95451bcf42fdeebc3ebb
Fixed in
  • 364685c4c2d9c9f4408d95451bcf42fdeebc3ebb
LinuxLinuxAffected
  • ≥ 6ef8fbce010421bf742b12b8f8f2b2d2ff154845, < 725e46298876a2cc1f1c3fb22ba69d29102c3ddf
Fixed in
  • 725e46298876a2cc1f1c3fb22ba69d29102c3ddf
LinuxLinuxAffected
  • ≥ 6ef8fbce010421bf742b12b8f8f2b2d2ff154845, < 82d46660ebd94c269e3f25a77eb563621d8e67e3
Fixed in
  • 82d46660ebd94c269e3f25a77eb563621d8e67e3
LinuxLinuxAffected
  • =6.12
Fixed in–

AI-suggested

A fix is available that changes the ownership model of the qgroup record object in the add_delayed_ref_head() function to prevent double freeing. Users should apply the official Linux kernel patches that address this issue. Since this is a kernel vulnerability, updating to a patched kernel version is the recommended remediation. Patch status is not explicitly provided here; check the official Linux kernel advisories or vendor updates for the exact fixed versions and apply them promptly.

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.

References

Community reviews

Loading reviews…