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 3035079E1 for ; Thu, 27 Mar 2025 16:44:15 +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=1743093855; cv=none; b=hxtBJCmf6Rvxi+JHJWfYbadhFS0ggfZ5/L5WwFKBbiN9px0PpZeRS7kvqSDBdOdRdfp79WecvOtkauHEN301KlLQTcMEOGKabQmLFuCEEtMsdGNmEYnMbUcaPvEWZB7SnN1NUDRs4kInKkr1K/c0Z8MycK8lwoBAI4s4dVnP3TA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743093855; c=relaxed/simple; bh=Quu52/1dBJC0DBA6XEmWWShR+4cryEhbtfb0bbzcLmk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=d6YK+8u6/SaBS6DClpA++WdhL/1TONd8wC5jzFjNuz4aGpFZ1iquWloTTAtqa73uzUQXOAZ6+xt+38pUSjiCD/ssQeZBU8q14MPNH2VfXll7owO0lFPqYabrats9WhtiuXaJWr9FqvMQnrXktf7kd0vXPRMAVJ2ovpVzrtqXyp8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VoTbDHWs; 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="VoTbDHWs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92AFDC4CEDD; Thu, 27 Mar 2025 16:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743093855; bh=Quu52/1dBJC0DBA6XEmWWShR+4cryEhbtfb0bbzcLmk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VoTbDHWsqfevkGZ+bQvo/fH5FzEtsucKBRQpo29aY8oTrOEzXRprvQrCFau2A3Fcr WMhh3aC1vtT3kkLXesEpxkTcH5rs7RS1L2qgxV6woukCNocBevvTbVIgMja7w60eHA Qd/xRXDA11gHpRRlSZ8BKt5COKRm2ySzqhS7kSbs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49742: f2fs: initialize locks earlier in f2fs_fill_super() Date: Thu, 27 Mar 2025 17:43:00 +0100 Message-ID: <2025032757-CVE-2022-49742-e3d5@gregkh> X-Mailer: git-send-email 2.49.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=1880; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Quu52/1dBJC0DBA6XEmWWShR+4cryEhbtfb0bbzcLmk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlPGwRFzWevqZ/Zd3DiqeN1mU1TfnbPPNeg9TomXTm2u CGqxcKnI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbSZsqw4MCTnOVCnE7xRz+b 3Vl8oyDo3MrDiQwLLq0MLbJ/Zioo/S5c+Ps28YrTX/ZUAwA= 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: f2fs: initialize locks earlier in f2fs_fill_super() syzbot is reporting lockdep warning at f2fs_handle_error() [1], for spin_lock(&sbi->error_lock) is called before spin_lock_init() is called. For safe locking in error handling, move initialization of locks (and obvious structures) in f2fs_fill_super() to immediately after memory allocation. The Linux kernel CVE team has assigned CVE-2022-49742 to this issue. Affected and fixed versions =========================== Fixed in 6.1.11 with commit ddeff03bb33810fcf2f0c18e03d099cf0aacda62 Fixed in 6.2 with commit 92b4cf5b48955a4bdd15fe4e2067db8ebd87f04c 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-49742 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/f2fs/super.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/ddeff03bb33810fcf2f0c18e03d099cf0aacda62 https://git.kernel.org/stable/c/92b4cf5b48955a4bdd15fe4e2067db8ebd87f04c