From mboxrd@z Thu Jan 1 00:00:00 1970 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 456635678EB for ; Fri, 11 Sep 2026 19:52:35 +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=1789156366; cv=none; b=qQe/+guZq+R8nrPnWkhaBhpiVh+Ogsybgo8stGv6uA8HDhsM3CVTlCGWEIWh44dk5doBV4WauGUuXFgkAJF/m29lvcEqa9V+GOyYtbIKy5IrAwGp7aqhclqIMrHHU6kzaJzgjm/gAAy8XZLOPHLtt6aTtOKdn5RyUaZvAVzA5pI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156366; c=relaxed/simple; bh=9kmpXSV6ztFacF4Amly0Cpsjb0wQF8iJeFX7nXqf9wM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SwTSlO3ohl7NKNVaX7UxnI48fbykAooaHsmzT/Hp4ezIlGCD2U3flGnccn7SP+BvCTPjxnlarrSxfR7ubdu6tSIgNNDYkxxppAqcHkNzXmN8PVsoLlpHqODtRg5jHAgjqsgWKEqnHpAg/oozf28C55Lqy93XKLO+gdZdb+mEXHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cju5Tgvs; 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="cju5Tgvs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 262551F00893; Fri, 11 Sep 2026 19:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156354; bh=+FHKEuNGLSJr9MBGaH1JvqMhtfJkV4DWp2BfWpUlmvs=; h=From:To:Cc:Subject:Date:Reply-To; b=cju5Tgvs7bzxRclpdogXWvohf20v8mWlnex1DKT69tnRHbER9Rg44zq8LI/BfzLQ2 ZCeG1tBFGWiSCllI162etsMVSpkTsceT4d2gRcjIw8vJ+VBMCsKmrYMta3GkeYbogo tm+w6ew9DxDJxytC+cqTF8Tvr+hCd/uN3c8wuQRI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89490: ocfs2: fix readdir position truncation on 32-bit kernels Date: Fri, 11 Sep 2026 21:42:59 +0200 Message-ID: <2026091107-CVE-2026-89490-6c3a@gregkh> X-Mailer: git-send-email 2.55.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=3621; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0jvX4NRzaALVKJeM3XTa//owd4g8oMdgQSzBWFxNfl4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIoPnTMuTz3npvlNIslJo/R6zAF0b083HJrTnyU+fP yfSNC29I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaiMYthfviE6UXLIvtCmDlf np9+T5Ix29CLk2FB+77+4LUez5jPzznArrLNcbUl144tAA== 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: fix readdir position truncation on 32-bit kernels In ocfs2_dir_foreach_blk_el(), the directory cookie position is rebuilt with ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1)) | offset; `ctx->pos` is loff_t (signed 64-bit), while `sb->s_blocksize` is unsigned long. On 32-bit kernels unsigned long is 32-bit, so the mask ~(sb->s_blocksize - 1) is computed as a 32-bit unsigned value (e.g. 0xfffff000 for a 4 KiB block size). In the AND expression with the 64-bit `ctx->pos`, that unsigned operand is zero-extended to 64 bits per the usual arithmetic conversions, yielding 0x00000000fffff000. The high 32 bits of `ctx->pos` are silently cleared, even though directory size is allowed to exceed 4 GiB. When readdir() crosses the 4 GiB boundary on a 32-bit kernel the position is reset back into the first 4 GiB block, making the re-validation path re-enumerate already-returned dirents indefinitely. This is ocfs2_dir_foreach_blk_el(), the extent-list readdir path taken for all non-inline directories, so a directory large enough to cross 4 GiB reaches it. This is the same class of bug that commit 3dce5bb82c97 ("exfat: Fix bitwise operation having different size") fixed in exfat, and the fix mirrors the equivalent ext4 fix in this series. Cast the operand to loff_t so the mask is 64-bit before the AND: ctx->pos = (ctx->pos & ~((loff_t)sb->s_blocksize - 1)) | offset; 64-bit kernels are unaffected. The Linux kernel CVE team has assigned CVE-2026-89490 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.16 with commit ccd979bdbce9fba8412beb3f1de68a9d0171b12c and fixed in 6.12.109 with commit 1001fb3b69a11eaa0dc7c7428f6edfa48b88997a Issue introduced in 2.6.16 with commit ccd979bdbce9fba8412beb3f1de68a9d0171b12c and fixed in 6.18.50 with commit c0c165487a2ea5a37ddcdab4259157b7a527129c Issue introduced in 2.6.16 with commit ccd979bdbce9fba8412beb3f1de68a9d0171b12c and fixed in 7.2.4 with commit b53e2b271eeb6040c2a4a78230c570dc41cdcfa4 Issue introduced in 2.6.16 with commit ccd979bdbce9fba8412beb3f1de68a9d0171b12c and fixed in 7.3-rc1 with commit a63308ab426f3a3c7e33b02c150ea59054620261 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-89490 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/dir.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/1001fb3b69a11eaa0dc7c7428f6edfa48b88997a https://git.kernel.org/stable/c/c0c165487a2ea5a37ddcdab4259157b7a527129c https://git.kernel.org/stable/c/b53e2b271eeb6040c2a4a78230c570dc41cdcfa4 https://git.kernel.org/stable/c/a63308ab426f3a3c7e33b02c150ea59054620261