Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31D3C3AE198 for ; Thu, 28 May 2026 09:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961122; cv=none; b=aBaJEPSYCnd7b4M03NHmB73aTXmZCBwvou+G0E0Jq5VOX6bHAbR6p8HvfbtukYTIvjHMRoB8qCLiyQ5E0Ro7yIDKRC/caI7YNDojn2VFhbrfbuM5qivFDGO1E+cmZvHFAzkf01q8Kt90Xdl2DVlSh7g51OjfuauLVYu8+6ec1g4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961122; c=relaxed/simple; bh=fzZeVN5ORozzXp8hMHmsiEpiPMf3P5R0YiVwdnqMsL8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Y35uWmt7LmutcynLznt9XRmy9iMLWJtqraaG1DkiHpzzd8+HDVR21CIJQuzyNf9goBN1FX6mmAmqpLPkl9LCzprEt7TRVxrWx6ct5v+plNgOIP/batWEzBhz6J4GQKWjjxLenFesJcO148eZU9pjUDYEY06OoJomQ/llY0k1jZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FisEUPu6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FisEUPu6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07FFA1F000E9; Thu, 28 May 2026 09:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779961120; bh=GwJEqjJd7eiC3nrMQX179Jw4Oq/lrrOPX9KfgOx5DT8=; h=From:To:Cc:Subject:Date:Reply-To; b=FisEUPu6+GIzbriRWs98RYGgpiKNHQGNaxIZKZYV7znAzafu0ND8CZrqL2aJOExl5 mdVDRedRrs8fVNWVjHpG4LObwqUnzPyp+gvvD87GPa5Ki7wlgd9RcGX2n68YJ9aQ36 mbDxVZCkhN40dXe7rrojS/QzANDdlQaoUgin431U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46129: btrfs: fix double free in create_space_info() error path Date: Thu, 28 May 2026 11:36:34 +0200 Message-ID: <2026052817-CVE-2026-46129-5c77@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3137; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=E5iuAPNmtWNPo9XOMGSCp5lS3DPFhf45Dl/av+x5DpI=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkSPBMv/nnSIb4rWvtTvHpu8tpH/3nz5m20D1BQSdRTS nM6lN7QEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNxaGGY7zl/1tzzE2Y6CNz/ zWTG9X/aq2CbfQwLerzf1G85ul2+bfH0hRNNTx69EPpYCQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: btrfs: fix double free in create_space_info() error path When kobject_init_and_add() fails, the call chain is: create_space_info() -> btrfs_sysfs_add_space_info_type() -> kobject_init_and_add() -> failure -> kobject_put(&space_info->kobj) -> space_info_release() -> kfree(space_info) Then control returns to create_space_info(): btrfs_sysfs_add_space_info_type() returns error -> goto out_free -> kfree(space_info) This causes a double free. Keep the direct kfree(space_info) for the earlier failure path, but after btrfs_sysfs_add_space_info_type() has called kobject_put(), let the kobject release callback handle the cleanup. The Linux kernel CVE team has assigned CVE-2026-46129 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.122 with commit 58208907c4044a764dbd8896026283905da6d9be and fixed in 6.6.140 with commit c2670ec4aa49ca226bce9776601e0da37502be07 Issue introduced in 6.12.67 with commit bb4fa4c0b54aae25e55faeda7f78d0c11b8cd618 and fixed in 6.12.88 with commit f414b3abbba59ef379a2b3c31f2bdd9358ed5e53 Issue introduced in 6.18.7 with commit 6cb008f1bb23e023dfe615cca5df14570dfc8da5 and fixed in 6.18.30 with commit 9a060970fd7b5e1c561e4ce73cb9949e4269a738 Issue introduced in 6.19 with commit a11224a016d6d1d46a4d9b6573244448a80d4d7f and fixed in 7.0.7 with commit dd6ade0fdd59218d71a981ae7c937a304e49209c Issue introduced in 6.19 with commit a11224a016d6d1d46a4d9b6573244448a80d4d7f and fixed in 7.1-rc1 with commit 3f487be81292702a59ea9dbc4088b3360a50e837 Issue introduced in 6.1.162 with commit 20e8f2de3688082eeafeb93c8900485b7542457e Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-46129 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/btrfs/space-info.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/c2670ec4aa49ca226bce9776601e0da37502be07 https://git.kernel.org/stable/c/f414b3abbba59ef379a2b3c31f2bdd9358ed5e53 https://git.kernel.org/stable/c/9a060970fd7b5e1c561e4ce73cb9949e4269a738 https://git.kernel.org/stable/c/dd6ade0fdd59218d71a981ae7c937a304e49209c https://git.kernel.org/stable/c/3f487be81292702a59ea9dbc4088b3360a50e837