Skip to content
Fencer Intel
critical 9.8

CVE-2025-68359 in the critical feed json

btrfs: fix double free of qgroup record after failure to add delayed ref head

published 10mo ago modified 19d ago also EUVD-2025-205095

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 50%
public exploits
0
none known

Summary

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.

Patch / fix

  • Linux Linux 6.12.114, 6.17.13, 6.18.2, 6.19
  • linux Debian 13 6.12.115-2
  • linux Debian 14 6.17.13-1

debian advisories DEBIAN-CVE-2025-68359

  • linux Ubuntu 25.10 6.17.0-19.19
  • linux-aws Ubuntu 25.10 6.17.0-1009.9
  • linux-gcp Ubuntu 25.10 6.17.0-1009.9
  • linux-azure Ubuntu 25.10 6.17.0-1010.10
  • linux-raspi Ubuntu 25.10 6.17.0-1010.10
  • linux-riscv Ubuntu 25.10 6.17.0-19.19.1
  • linux-oracle Ubuntu 25.10 6.17.0-1009.9
  • linux-aws-6.17 Ubuntu 24.04 LTS 6.17.0-1009.9~24.04.2

ubuntu advisories UBUNTU-CVE-2025-68359

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel-rt Linux Micro 6.2 6.12.0-160000.26.1
  • kernel-64kb SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.26.1
  • kernel-source SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.26.1
  • kernel-default SLES 16.0, SLE High Availability Extension 16.0, Linux Micro 6.2 +1 more 6.12.0-160000.26.1
  • kernel-default-base SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.26.1.160000.2.7
  • kernel-syms SLES 16.0, Linux Micro Extras 6.2, SLES for SAP applications 16.0 6.12.0-160000.26.1
  • kernel-azure SLES for SAP applications 16.0, SLES 16.0 6.12.0-160000.26.1
  • kernel-obs-qa SLES for SAP applications 16.0, SLES 16.0 6.12.0-160000.26.1

suse advisories SUSE-SU-2026:20555-1SUSE-SU-2026:20599-1SUSE-SU-2026:20615-1SUSE-SU-2026:20570-1

  • kernel-source-longterm openSUSE Tumbleweed 6.18.16-1.1
  • kernel-rt openSUSE Leap 16.0 6.12.0-160000.26.1
  • dtb-aarch64 openSUSE Leap 16.0 6.12.0-160000.26.1
  • kernel-64kb openSUSE Leap 16.0 6.12.0-160000.26.1
  • kernel-syms openSUSE Leap 16.0 6.12.0-160000.26.1
  • kernel-azure openSUSE Leap 16.0 6.12.0-160000.26.1
  • kernel-obs-qa openSUSE Leap 16.0 6.12.0-160000.26.1
  • kernel-source openSUSE Leap 16.0 6.12.0-160000.26.1

opensuse advisories openSUSE-SU-2026:10301-1openSUSE-SU-2026:20287-1openSUSE-SU-2026:10039-1

Is CVE-2025-68359 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-68359 updated cvss 5.5

kernel: btrfs: fix double free of qgroup record after failure to add delayed ref head

  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernel
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.63% chance of exploitation in the next 30 days, higher than 50% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

  • Linux Linux

Classification

Technology feeds

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.