Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154303; b=G/itmvPiENf7SnWZxWggDvc+Y2Ii0gPlKAZfgNKXbuzlnUa6T6ZPwxvNkEscMqTCo+uw z1v56Y0jvBAUXbGMaD6KeUl+qkiHPwAryOcix0Sll+Uojrgopu1sdv41VaxcrdS60qyF7 Qr02LtYJBThctw1Y9ZJbmhRGKKwSFXV0k6sO80rQra+I7UXf8s1NRnrcdCz8bcNsIwhqQ s+CMs5mlmtD+DsZoWHpU8yRItT5zbdrCrhT7gYIrO31Fc6mYZAG2zQBKIh95EUkPk0gEc OyxQbbU36idRMFBuAzzPJRS7a4yH997mnqVAee0VAKpBbFujQOaan8IiRo37UeADFDQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154303; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=6puG7PXaaajafF44B1hhPUHrSglQsRe44nphh0D35As=; b=pkGInlzDHEkbnQcF2/mfehK3822obBeaMV5lKUh57oVsd9p3CowYBo2Amqy3jsOLLhkM 5h7YL4PVuswgtpEwdKDbBVZ/xSo7SdsNYe0WJrb/akJzST86GraGyKOzvt1yvoFOcR5XS 6GAY+esQWhSh6veaDw7BzHM4RUPLILifvRbA3znJByZa0TN3jNDVNTD92nYFnymSMU3yB Ie9ID7TAxEU//rUohfawFbqH0O07C2IU+7GfZFlUeyOrZpg630PcRSL7e8pxVDPNnVadx T7vfzoEaRX7lMhWsKxrV2LN+0+0TUQLre/3KP91b8i6+KqtGWKSViV1V5NdsBG9p5dw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=b5oR5w28; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C52960A3839 for ; Fri, 20 Nov 2026 05:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=b5oR5w28 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FD9F1F000CA; Fri, 20 Nov 2026 05:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154302; bh=6puG7PXaaajafF44B1hhPUHrSglQsRe44nphh0D35As=; h=From:To:Cc:Subject:Date:Reply-To; b=b5oR5w280FzPLLTgMFyfYee7pJQ1mnRCFsKwrBO4Z7BMWS9M6GEz7O4UNQ6qQUm0W GC/1pIF/pzoxo4MrxrpiOnFQuPRu22iu+wN+WqFgmaZyr2bJp0ckHsmps+rYFag7TT ddVGl1Be+d1kU6QLCdHBDlPyH+oxtEoHzWarZa+o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99696: ocfs2: find the xattr entry again after defragmenting a bucket Date: Fri, 20 Nov 2026 06:51:22 +0100 Message-ID: <2026112000-CVE-2026-99696-9e47@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3561; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=46xgBy/61+x9VeFBzWpPre5PyiKmYX+xGfynGNcLEbQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/73fMTjrxs/DkjajQGXfmNjzwlQ3UDY4KrZSaaJYmJ sTNJfO3I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYynY9hfsWdHu1i7Yf7q0t3 OUj7/F0ZqbPkLMN8H6a4t57WR6fbbwtTN07lf2Y1sfEbAA== 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: ocfs2: find the xattr entry again after defragmenting a bucket ocfs2_xattr_set_entry_bucket() hands loc.xl_entry to ocfs2_xa_set() twice: once for the bucket as it stands, and, if that reports -ENOSPC, once more after ocfs2_defrag_xattr_bucket() has packed the name/value pairs down. Defragmenting ends by sorting the entry array on xe_name_hash. Buckets are kept sorted, so the sort only permutes entries that share a hash, but lib/sort.c is an unstable heapsort and it does permute them. loc.xl_entry is an address inside xh_entries[], so afterwards it denotes whichever entry landed in that slot rather than the one the search found. The second ocfs2_xa_set() then works on the wrong entry. Nothing on that path compares the entry's name with xi->xi_name, so what happens depends on how the two entries compare in size: ocfs2_xa_reuse_entry() trips its BUG_ON() when the padded name sizes differ, and otherwise the new value is written into the neighbouring attribute's value slot while the attribute being set is left untouched. setxattr() reports success either way. Remember the entry's hash before defragmenting and look the entry up again afterwards, the way ocfs2_xattr_bucket_find() does. An entry that cannot be found again means the bucket no longer holds what the search found, so fail with -EFSCORRUPTED rather than writing through the stale pointer. The Linux kernel CVE team has assigned CVE-2026-99696 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.28 with commit 012255961c9ecfe22b7a1df47ac26ab37818cb1e and fixed in 6.12.118 with commit b839d9913b56f0d769dced34cdfbe02a009b3bf1 Issue introduced in 2.6.28 with commit 012255961c9ecfe22b7a1df47ac26ab37818cb1e and fixed in 6.18.64 with commit 89ef9cb4da160b5572e0e5b9cf930335117d561b Issue introduced in 2.6.28 with commit 012255961c9ecfe22b7a1df47ac26ab37818cb1e and fixed in 7.3.5 with commit 8c107f10fe63fdec081c2ae471fc90b4d3376db6 Issue introduced in 2.6.28 with commit 012255961c9ecfe22b7a1df47ac26ab37818cb1e and fixed in 7.4-rc2 with commit 9a40c050f58344615a0604701b5d299519833163 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-99696 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/ocfs2/xattr.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/b839d9913b56f0d769dced34cdfbe02a009b3bf1 https://git.kernel.org/stable/c/89ef9cb4da160b5572e0e5b9cf930335117d561b https://git.kernel.org/stable/c/8c107f10fe63fdec081c2ae471fc90b4d3376db6 https://git.kernel.org/stable/c/9a40c050f58344615a0604701b5d299519833163