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 952BB16EBEE for ; Fri, 12 Jul 2024 12:33:25 +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=1720787605; cv=none; b=UYsYWIpzzuzcFbMwDKFsh54eO7VkyfvhY17OAUe5rfaANvSyfTPoguyNSWYP8B5tPTEjScW+xtHN5RwdweOnFeU5y0bKG/xZK/aPADAQD3nwdtI1qfrV1F30wRyzjcdadTNF9QWWOqdnBBJfC6J6tpMRzS7SCTTaTreuRzaBF6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720787605; c=relaxed/simple; bh=7F24zf2gv4j+Rj7vGfeKPW5oP82DtMMmOasCDYoEZyQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=j82UnHYcGYNYCYPArtUAR63cctSFACwIoVGti4VtEMot77UUKTFTp4nRUrLXmmCDLVJtOAH5gSIa8AMwaiccmvdCWYxtKXlbcNkWDUsE4Hk5nQcpf6FbaRvUxvxhidS5iEMbNJtaq2uEcbnDmleRWOuqjrBU62HKAhwfoUnUxg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MaiU0/G2; 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="MaiU0/G2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BA0BC32786; Fri, 12 Jul 2024 12:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720787605; bh=7F24zf2gv4j+Rj7vGfeKPW5oP82DtMMmOasCDYoEZyQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MaiU0/G2fMSQe4j+9ImRyL0mxXU57NYkllj5BnqxgPsW7G2y6exQ5ARHO+mWyZLeD bhQQRVDy3OPWRZTaGDQFQLabR7P4CAzSTHYjqggXY9ugeBXiCyoNiH5MCTt0HmOari S1FWe7ojoyf8QtYJgcKyIXE6hrfFE69wEs4f8lSQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-40969: f2fs: don't set RO when shutting down f2fs Date: Fri, 12 Jul 2024 14:32:45 +0200 Message-ID: <2024071228-CVE-2024-40969-6507@gregkh> X-Mailer: git-send-email 2.45.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=2161; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7F24zf2gv4j+Rj7vGfeKPW5oP82DtMMmOasCDYoEZyQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkTlWKyLydHJc68JPXh6eFrgYUPV/Qx29TMyslfejSX5 bTgBeETHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRqzIMC/oXHl7tF+H2bOrX 5IftsY7JjX7Xoxjmu0xcIjnPvtTm6g6tdekdWpv8Zd3KAQ== 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: don't set RO when shutting down f2fs Shutdown does not check the error of thaw_super due to readonly, which causes a deadlock like below. f2fs_ioc_shutdown(F2FS_GOING_DOWN_FULLSYNC) issue_discard_thread - bdev_freeze - freeze_super - f2fs_stop_checkpoint() - f2fs_handle_critical_error - sb_start_write - set RO - waiting - bdev_thaw - thaw_super_locked - return -EINVAL, if sb_rdonly() - f2fs_stop_discard_thread -> wait for kthread_stop(discard_thread); The Linux kernel CVE team has assigned CVE-2024-40969 to this issue. Affected and fixed versions =========================== Fixed in 6.6.36 with commit 1036d3ea7a32 Fixed in 6.9.7 with commit f47ed3b284b3 Fixed in 6.10-rc1 with commit 3bdb7f161697 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-40969 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/1036d3ea7a32cb7cee00885c73a1f2ba7fbc499a https://git.kernel.org/stable/c/f47ed3b284b38f235355e281f57dfa8fffcc6563 https://git.kernel.org/stable/c/3bdb7f161697e2d5123b89fe1778ef17a44858e7