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 C54C660DD1 for ; Thu, 22 Feb 2024 16:14:19 +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=1708618459; cv=none; b=JkR5F7Vv2HwVDXID1IpCmbS0bpsA/dTH6wdl9xR0Z+FRCtjM/QssNWW40tt2hWkkBpotEzjw6kNA1TDXNF9SL7Wp+L9KLfXTY0ENn9ybRrN5h5MPXM4hXter5+4d+InkzKLrloI4ImvLS3B5gHnxHiJY3/592Vc2N6+uy9ogx3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708618459; c=relaxed/simple; bh=hkxEg2ED7hWJx7uFGUZ7r5QEhHN4G8GNZldctiQHFsg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=O+jf4+An50KptEBYl0N28RAAmkrQKp2qhQyK7JrsTEfjerdBHOdFhojw6eYHFql3va+yui5VQaN9NZBdAhz/oCZ3YzsVOpLtnpkJTQuEbtlVhOam45veDUvcJ5SYC1kLeS0FjUP6yWLCkU8HInXPXN/GX2TW/mKs7k31fAvY/1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KRKuWn6p; 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="KRKuWn6p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BB19C43390; Thu, 22 Feb 2024 16:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708618459; bh=hkxEg2ED7hWJx7uFGUZ7r5QEhHN4G8GNZldctiQHFsg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KRKuWn6pAk6NLyIkkJc7Vh8HiQ2U+pQiSVLY0wdPulJdUnDpmG6H7eePxLiPIkEXe ZFD9CBlDoSAvwc4fKejY2r4WzzS2FYq+8ai/JvVx7mQIKB7qvyWvIjJFq+atiYVIFN aZWvHDRqubLtLHDkhx9HY77wOtrS1mMITn07TdLg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26590: erofs: fix inconsistent per-file compression format Date: Thu, 22 Feb 2024 17:13:59 +0100 Message-ID: <2024022259-CVE-2024-26590-85a4@gregkh> X-Mailer: git-send-email 2.43.2 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=2538; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hkxEg2ED7hWJx7uFGUZ7r5QEhHN4G8GNZldctiQHFsg=; b=owGbwMvMwCRo6H6F97bub03G02pJDKnXi44brty7/sULUaupZVfZ+Y/cyL6f5tLNrPZ3l6Pj6 acXg05IdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE0vczLFg4vyfkRutM17eX d/+3ZSj/ZRlVcphhvtfZaN+Ji1/t0P44acLs2AbBVSEGJwE= 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: erofs: fix inconsistent per-file compression format EROFS can select compression algorithms on a per-file basis, and each per-file compression algorithm needs to be marked in the on-disk superblock for initialization. However, syzkaller can generate inconsistent crafted images that use an unsupported algorithmtype for specific inodes, e.g. use MicroLZMA algorithmtype even it's not set in `sbi->available_compr_algs`. This can lead to an unexpected "BUG: kernel NULL pointer dereference" if the corresponding decompressor isn't built-in. Fix this by checking against `sbi->available_compr_algs` for each m_algorithmformat request. Incorrect !erofs_sb_has_compr_cfgs preset bitmap is now fixed together since it was harmless previously. The Linux kernel CVE team has assigned CVE-2024-26590 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 622ceaddb764 and fixed in 6.6.14 with commit 823ba1d21060 Issue introduced in 5.16 with commit 622ceaddb764 and fixed in 6.7.2 with commit eed24b816e50 Issue introduced in 5.16 with commit 622ceaddb764 and fixed in 6.8-rc1 with commit 118a8cf504d7 Please see https://www.kernel.org or 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-26590 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/erofs/decompressor.c fs/erofs/zmap.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/823ba1d2106019ddf195287ba53057aee33cf724 https://git.kernel.org/stable/c/eed24b816e50c6cd18cbee0ff0d7218c8fced199 https://git.kernel.org/stable/c/118a8cf504d7dfa519562d000f423ee3ca75d2c4