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 58DBB3218DD for ; Mon, 15 Sep 2025 14:47:40 +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=1757947660; cv=none; b=R39K3Im9LznS1Fr5kmTfTIHtPIkBuI8bId/JFW0C5o38t825C4L+YbbigMtjD+zJCKnXDJzW15a9A4pi3dpsbFUoDmqWJnaPhZ3liyeDxj/7DTOSK8QzN43XBhXrVf7IFOpDvGZEQ/5ezRIOUGYgTwGj2qQPb3SK19+MCzo5nYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757947660; c=relaxed/simple; bh=OddnpKAQCD501f/bbhR1LCzIeIqX0qc1BTq/p1xXggk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Mgcw4SPIoGXHKhaV9V4q7ObVZQ1a8XgIvIudh0ySGcDVTnzaqNiqdODRLAYZjU8Z4w9t1+sSsFegjm/akAY3yeeAcFyPG3W9GP2eg9biJHpg1BCDHq9piWeSyxx4JPPRkb+iTdSCHf0gnqaAlI0m/LRHBWm9iHE10/JLZFCr7gI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=igDzqSdO; 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="igDzqSdO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C619C4CEF5; Mon, 15 Sep 2025 14:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757947659; bh=OddnpKAQCD501f/bbhR1LCzIeIqX0qc1BTq/p1xXggk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=igDzqSdOd6+Qc3nrh3WTgWsbsas4HdTvq4Ii0fVfVHNww6w64EJmpOClbRhv43s8S ugr+84BBGhfyQPXPCUHw/E8WgRMBXSV0C9PpUzXNG1egnr4Ykgfse9vBB+ePinotSo sk22BwQF2EHIhebIzbJrs8DUHkGJ4lNaZVji7PUk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50313: erofs: fix order >= MAX_ORDER warning due to crafted negative i_size Date: Mon, 15 Sep 2025 16:46:15 +0200 Message-ID: <2025091500-CVE-2022-50313-2fa9@gregkh> X-Mailer: git-send-email 2.51.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=3021; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XEVp0TzJMDpiytoErRZcBKTyV2vEB/k0Esy1EqKWqUY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkn1Fawq/IVq0652vvV9HKTzYrZH71nK65dxvL6q/ebH ellQiVrOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAifx8wLNi1KmvJDdWk8+XO soY1OW/euRy/28Iwh2frgdCsmEe5s0IVW+fY3yw+ptU4GQA= 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: erofs: fix order >= MAX_ORDER warning due to crafted negative i_size As syzbot reported [1], the root cause is that i_size field is a signed type, and negative i_size is also less than EROFS_BLKSIZ. As a consequence, it's handled as fast symlink unexpectedly. Let's fall back to the generic path to deal with such unusual i_size. [1] https://lore.kernel.org/r/000000000000ac8efa05e7feaa1f@google.com The Linux kernel CVE team has assigned CVE-2022-50313 to this issue. Affected and fixed versions =========================== Issue introduced in 4.19 with commit 431339ba90423a038914c6032bfd71f0ba7ef2f2 and fixed in 5.4.289 with commit 17a0cdbd7b0cf0fc0d7ca4187a67f8f1c18c291f Issue introduced in 4.19 with commit 431339ba90423a038914c6032bfd71f0ba7ef2f2 and fixed in 5.10.233 with commit 0ab621fcdff1a58ff4de51a8590fa92a0ecd34be Issue introduced in 4.19 with commit 431339ba90423a038914c6032bfd71f0ba7ef2f2 and fixed in 5.15.82 with commit acc2f40b980c61a9178b72cdedd150b829064997 Issue introduced in 4.19 with commit 431339ba90423a038914c6032bfd71f0ba7ef2f2 and fixed in 5.19.17 with commit b6c8330f5b0f22149957a2e4977fd0f01a9db7cd Issue introduced in 4.19 with commit 431339ba90423a038914c6032bfd71f0ba7ef2f2 and fixed in 6.0.3 with commit 6235fb899b25fd287d5e42635ff82196395708cc Issue introduced in 4.19 with commit 431339ba90423a038914c6032bfd71f0ba7ef2f2 and fixed in 6.1 with commit 1dd73601a1cba37a0ed5f89a8662c90191df5873 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-2022-50313 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/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/17a0cdbd7b0cf0fc0d7ca4187a67f8f1c18c291f https://git.kernel.org/stable/c/0ab621fcdff1a58ff4de51a8590fa92a0ecd34be https://git.kernel.org/stable/c/acc2f40b980c61a9178b72cdedd150b829064997 https://git.kernel.org/stable/c/b6c8330f5b0f22149957a2e4977fd0f01a9db7cd https://git.kernel.org/stable/c/6235fb899b25fd287d5e42635ff82196395708cc https://git.kernel.org/stable/c/1dd73601a1cba37a0ed5f89a8662c90191df5873