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 00704233D8E for ; Sat, 9 Nov 2024 10:16:20 +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=1731147381; cv=none; b=BIThV3EflNFR2VE9MNVM511UPl4gD/imA1BZYWkitOmQ+hnRF1w7cek7kDI5Mb8oCd/62dl87bhnsRXXAL+48ZVZ63UgD683pgQkCYGtv1O2Nq9JUI4sfzbpwln0luj6MO8eNXrcZnvzRX7a/l2GJooKIysXpZNw+ld2Ff44t/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147381; c=relaxed/simple; bh=5dsl1Ta9xpWXCY41QJSa10TbT6/yobEaqObAvQ0hFy8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RewLM1bm8VXdXLFeiBrQGVuIl/nCaQpyLUfVh5EycYzq2ia5MEuKn7IfN0l1gxZDiWtZu3vN1FZqC5mN8HMUuCxc7j5S8aqQWg1Gz6WydwxY/tlYUofd7wy/3LI5BrS5pmcmAtqk+VRnTYV2Pj+qqZ4XxGAtpXRJsaW6YRmWLjM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EU2yfh5T; 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="EU2yfh5T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18C64C4CECE; Sat, 9 Nov 2024 10:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731147380; bh=5dsl1Ta9xpWXCY41QJSa10TbT6/yobEaqObAvQ0hFy8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=EU2yfh5TCP0QnjNntAGGp4s1FMklyER10H0wWcKnSnSKWhjNIqS3EFTK76j/AhyA5 os2nXNUUaD9bHMjdBB7WKMFvaDNwPEkg/5lsR/1wDRmnlU4WF7BJ6ci9sUXlip9LB9 cs3EWlvBOeV9vlCmGWhh8rkXZ5aVvYf9O7VFJAjs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50218: ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow Date: Sat, 9 Nov 2024 11:15:26 +0100 Message-ID: <2024110925-CVE-2024-50218-68cd@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3167; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5dsl1Ta9xpWXCY41QJSa10TbT6/yobEaqObAvQ0hFy8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn6ZrZGpWy8HD+7vMzjo02FuxtaFNZp/OOorjn4p/bFi x35lu0dsSwMgkwMsmKKLF+28RzdX3FI0cvQ9jTMHFYmkCEMXJwCMJGqrwwLOhVfy3qFvQ3PnNY4 q3QtW/H2cOb9DAs2VV/+OS1UpGxvRMndbfbih+fWvn4BAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow Syzbot reported a kernel BUG in ocfs2_truncate_inline. There are two reasons for this: first, the parameter value passed is greater than ocfs2_max_inline_data_with_xattr, second, the start and end parameters of ocfs2_truncate_inline are "unsigned int". So, we need to add a sanity check for byte_start and byte_len right before ocfs2_truncate_inline() in ocfs2_remove_inode_range(), if they are greater than ocfs2_max_inline_data_with_xattr return -EINVAL. The Linux kernel CVE team has assigned CVE-2024-50218 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 4.19.323 with commit 27d95867bee8 Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 5.4.285 with commit 95fbed8ae8c3 Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 5.10.229 with commit 70767689ec6e Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 5.15.171 with commit ecd62f684386 Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 6.1.116 with commit 2fe5d62e122b Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 6.6.60 with commit 88f97a4b5843 Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 6.11.7 with commit 0b6b8c205578 Issue introduced in 2.6.24 with commit 1afc32b95233 and fixed in 6.12-rc6 with commit bc0a2f3a73fc 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-2024-50218 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/file.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/27d95867bee806cdc448d122bd99f1d8b0544035 https://git.kernel.org/stable/c/95fbed8ae8c32c0977e6be1721c190d8fea23f2f https://git.kernel.org/stable/c/70767689ec6ee5f05fb0a2c17d7ec1927946e486 https://git.kernel.org/stable/c/ecd62f684386fa64f9c0cea92eea361f4e6444c2 https://git.kernel.org/stable/c/2fe5d62e122b040ce7fc4d31aa7fa96ae328cefc https://git.kernel.org/stable/c/88f97a4b5843ce21c1286e082c02a5fb4d8eb473 https://git.kernel.org/stable/c/0b6b8c2055784261de3fb641c5d0d63964318e8f https://git.kernel.org/stable/c/bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0