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 3A63F482D3 for ; Wed, 1 May 2024 05:32:07 +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=1714541528; cv=none; b=hQL0mA8ksfccyVwaQd/51ZvM0jW+qTMjcscDWEPMfUFKpiHkSnYYtXxTy50nqAM6HzLtWJDc9lmJHxqvK2DRtXiXBe/Ik9M2PmqBfG6YG2McPvOfYaU5v8bUF9JA6ZoEBK4Mza4IPtGUYo/Gak23zm/25SHTRYebq65HvA9qCAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714541528; c=relaxed/simple; bh=z4ZVijsspQtpXVPlYLndiTKX0ezqjzeIBBMiboMOuo4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=P75HFjuYrRf5dmFhpN046qMZeEN3kHqYy/JnT+3p95kN+8E42sWo0LQRjMQ5z/VrueV8So2nGKSpo1+IqRM1nFo2lby6vXFCTBjBEo4po1kOv4UrXy25bAnUPvQTTQjvsyw3pgqp2rMYy62zcQmoEXJli22Psd8Q/DTKf2g1GHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LFw6LhKv; 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="LFw6LhKv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DC75C113CC; Wed, 1 May 2024 05:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714541527; bh=z4ZVijsspQtpXVPlYLndiTKX0ezqjzeIBBMiboMOuo4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LFw6LhKvj+jskdadQoKeE46IMNLYuYL/y7yBzS8UbDsPEDAMVnnLHQpovfF6D4PrE zCRdxCdplCUEmgTTrW1ksxKk6mgZWFAEsL6dTjVSkEnyNfXDC2wKnVHxfbOARTOToQ 8a+8n0UF3RiJhUBe+OVwaae1qBN0bwBYdNGni7Kg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26982: Squashfs: check the inode number is not the invalid value of zero Date: Wed, 1 May 2024 07:30:43 +0200 Message-ID: <2024050141-CVE-2024-26982-8675@gregkh> X-Mailer: git-send-email 2.44.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=2786; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=z4ZVijsspQtpXVPlYLndiTKX0ezqjzeIBBMiboMOuo4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmGl5u4IgMZ393vmOgwQXPvma4/f6sy5rmWvDj62jgqw WvV21qRjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiI9H6GBRtiDs1l6Oz9NTd1 d3bauwmZ02OiuxnmabaK3dCfO3XK9aVXiu84BDsciTuvBAA= 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: Squashfs: check the inode number is not the invalid value of zero Syskiller has produced an out of bounds access in fill_meta_index(). That out of bounds access is ultimately caused because the inode has an inode number with the invalid value of zero, which was not checked. The reason this causes the out of bounds access is due to following sequence of events: 1. Fill_meta_index() is called to allocate (via empty_meta_index()) and fill a metadata index. It however suffers a data read error and aborts, invalidating the newly returned empty metadata index. It does this by setting the inode number of the index to zero, which means unused (zero is not a valid inode number). 2. When fill_meta_index() is subsequently called again on another read operation, locate_meta_index() returns the previous index because it matches the inode number of 0. Because this index has been returned it is expected to have been filled, and because it hasn't been, an out of bounds access is performed. This patch adds a sanity check which checks that the inode number is not zero when the inode is created and returns -EINVAL if it is. [phillip@squashfs.org.uk: whitespace fix] Link: https://lkml.kernel.org/r/20240409204723.446925-1-phillip@squashfs.org.uk The Linux kernel CVE team has assigned CVE-2024-26982 to this issue. Affected and fixed versions =========================== Fixed in 6.8.8 with commit 7def00ebc9f2 Fixed in 6.9-rc5 with commit 9253c54e01b6 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-26982 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/squashfs/inode.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/7def00ebc9f2d6a581ddf46ce4541f84a10680e5 https://git.kernel.org/stable/c/9253c54e01b6505d348afbc02abaa4d9f8a01395