Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AC3CC42669B for ; Wed, 6 May 2026 11:31:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778067101; cv=none; b=IHHBRauafYbvvSD4HG6FwmVlvEwNIMy2XeN+HKj4hFwg6Tl6qiHjCEAbmE2l1L9VBimjXG88BNZlr7iMRVZpzHs5BKUowD/7qBN7TaBINxJBpg+VA4GqM/OiCA4kNhTouKBvu/mJqWzY9ryly5Du7WJvEmPeYezzuyhXEMT7dbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778067101; c=relaxed/simple; bh=QVOUrhcTB6fjWPGYcdWcTCHPk0pkAGCB8KTFtIc6afU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LaIRUByy1qYBsevxTEyBNv1JP4rS6L/KVYqGv6WNNkQ3HLeNklN+OtamNkQFHeefAe2DTImOj8JYM6746eBm6evnPHwoHzvsrC0VA6JhTzf0znPy42AHYUvuAZB68JC/ELKBeVxGkracPIi2DbGIgRW2w46zLPZyb9vR5kEcllY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AyQnb2cC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AyQnb2cC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42712C2BCB8; Wed, 6 May 2026 11:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778067101; bh=QVOUrhcTB6fjWPGYcdWcTCHPk0pkAGCB8KTFtIc6afU=; h=From:To:Cc:Subject:Date:Reply-To:From; b=AyQnb2cCOvunXMX1R3A0QiikWpzgWR/9CI8tExec0xRHVFz5LveG92lZ+bDy65sVT IDXMg4BoVBvRg6JwhrMep8nlT19dkR5+hJWtknGnSw1OmMbu6k9pHVXb0VqKa1v40r elkL4HOqxffzCZMvgTkRAXr928OnLsl//WupBsQc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-43187: xfs: delete attr leaf freemap entries when empty Date: Wed, 6 May 2026 13:28:23 +0200 Message-ID: <2026050641-CVE-2026-43187-6b4a@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=4838; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3t/Jfi5OHKdlv+jCmBVjCSoDRBsPbdwu9XviuOh3aFc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm/Vddu/sZ07vmNP8evM89q2Hes7NDdHf2zzCynbck96 spplPqCqSOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmsn4Ww4LNd2rf+9/OZJg1 vey2yNl/5tYLPhQzzC96dZzv/dOJS5zjWLLiRZRn/S24uxsA 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: xfs: delete attr leaf freemap entries when empty Back in commit 2a2b5932db6758 ("xfs: fix attr leaf header freemap.size underflow"), Brian Foster observed that it's possible for a small freemap at the end of the end of the xattr entries array to experience a size underflow when subtracting the space consumed by an expansion of the entries array. There are only three freemap entries, which means that it is not a complete index of all free space in the leaf block. This code can leave behind a zero-length freemap entry with a nonzero base. Subsequent setxattr operations can increase the base up to the point that it overlaps with another freemap entry. This isn't in and of itself a problem because the code in _leaf_add that finds free space ignores any freemap entry with zero size. However, there's another bug in the freemap update code in _leaf_add, which is that it fails to update a freemap entry that begins midway through the xattr entry that was just appended to the array. That can result in the freemap containing two entries with the same base but different sizes (0 for the "pushed-up" entry, nonzero for the entry that's actually tracking free space). A subsequent _leaf_add can then allocate xattr namevalue entries on top of the entries array, leading to data loss. But fixing that is for later. For now, eliminate the possibility of confusion by zeroing out the base of any freemap entry that has zero size. Because the freemap is not intended to be a complete index of free space, a subsequent failure to find any free space for a new xattr will trigger block compaction, which regenerates the freemap. It looks like this bug has been in the codebase for quite a long time. The Linux kernel CVE team has assigned CVE-2026-43187 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.10.252 with commit f3c0d1fc1eadbb4adbee5ab7757d41d35f48325b Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.15.202 with commit aa9083d97e2157da3c6fb45ddb1a97af7f188f7f Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.1.165 with commit a631899025d47ea1aa6464d76db5b4d3b6d196fd Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.128 with commit ffaf5c99d0f862db021fb1af8b813c1416b1beb2 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.75 with commit e1b8c6452ee99a30e188a88f3f3f804fb1c6004a Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.16 with commit f31a8334e1c54b126fcecf98645a49b6bc5ad399 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.19.6 with commit 479b05fc3ee272090f671b06a41f3da8aa78eece Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.0 with commit 6f13c1d2a6271c2e73226864a0e83de2770b6f34 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-43187 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/xfs/libxfs/xfs_attr_leaf.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/f3c0d1fc1eadbb4adbee5ab7757d41d35f48325b https://git.kernel.org/stable/c/aa9083d97e2157da3c6fb45ddb1a97af7f188f7f https://git.kernel.org/stable/c/a631899025d47ea1aa6464d76db5b4d3b6d196fd https://git.kernel.org/stable/c/ffaf5c99d0f862db021fb1af8b813c1416b1beb2 https://git.kernel.org/stable/c/e1b8c6452ee99a30e188a88f3f3f804fb1c6004a https://git.kernel.org/stable/c/f31a8334e1c54b126fcecf98645a49b6bc5ad399 https://git.kernel.org/stable/c/479b05fc3ee272090f671b06a41f3da8aa78eece https://git.kernel.org/stable/c/6f13c1d2a6271c2e73226864a0e83de2770b6f34