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 DC7D3142911 for ; Tue, 21 May 2024 14:40:57 +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=1716302457; cv=none; b=hFOJSylAb+2Hsj2TqrkIB4M1jV9amQTnW3AcIO8Ky3rryintBWz4zhYIxorpIgN4vRCgDyHmmRzDZLF0Bx85J4YPVHB5At+PwNmQBDhWSxHJMluKCXk9lUdteVUmL2uYGGY87HI8ZlxDudTk5zF533HH6EoSQSSMMMlgczsTRrE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716302457; c=relaxed/simple; bh=AyP87BhbcmlxosuuBGodWnoEqwziKI6YmtEkTlfk2b4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qdvtIEEiUVlDvx4EUO6oqkM6XoXsM0nFPkfHlJN9ejsKkp0THtfMugs9EYozxzzBJBEwBIZukFICFeDD1Hif5vuX+vMZs2Lutw1kWl7jqbqXd75wbLarXPu2JGK4Hr4lqKUTFXlOEiyx4eCur3chRbJtfNpYdolb40K0PMiD7R4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Akj/pbHZ; 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="Akj/pbHZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67BAFC2BD11; Tue, 21 May 2024 14:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716302457; bh=AyP87BhbcmlxosuuBGodWnoEqwziKI6YmtEkTlfk2b4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Akj/pbHZBY6vwcNCRfgyKR+gQ2XSOFkl4a+YKVqyKkDUM1Iad03xp2LdrgI7g2NHW uyY6bs6tE491QJLVGT8SvOZym/Asy3VzQlzox+HznleQvkh4AUDrt+tRNUlZEB4v/5 ADfYgcitbWL7OXPVSmlp6jvi3zDma7QQZ/BUuzNI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47342: ext4: fix possible UAF when remounting r/o a mmp-protected file system Date: Tue, 21 May 2024 16:36:16 +0200 Message-ID: <2024052138-CVE-2021-47342-bfd5@gregkh> X-Mailer: git-send-email 2.45.1 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=2106; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AyP87BhbcmlxosuuBGodWnoEqwziKI6YmtEkTlfk2b4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+G63uS/hFbqxtUUst9//HolkieonjwhefU5uFzmRtY gvqnCbVEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNhd2ZYMCen+Pz3EiuprUrF X9f5m6j3q97gZliw4HKC/jGjncvfvM58E7T16xfWIPEFAA== 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: ext4: fix possible UAF when remounting r/o a mmp-protected file system After commit 618f003199c6 ("ext4: fix memory leak in ext4_fill_super"), after the file system is remounted read-only, there is a race where the kmmpd thread can exit, causing sbi->s_mmp_tsk to point at freed memory, which the call to ext4_stop_mmpd() can trip over. Fix this by only allowing kmmpd() to exit when it is stopped via ext4_stop_mmpd(). Bug-Report-Link: <20210629143603.2166962-1-yebin10@huawei.com> The Linux kernel CVE team has assigned CVE-2021-47342 to this issue. Affected and fixed versions =========================== Fixed in 5.10.77 with commit b663890d8544 Fixed in 5.13.3 with commit 7ed572cdf110 Fixed in 5.14 with commit 61bb4a1c417e 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-2021-47342 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/ext4/mmp.c fs/ext4/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/b663890d854403e566169f7e90aed5cd6ff64f6b https://git.kernel.org/stable/c/7ed572cdf11081f8f9e07abd4bea56a3f2c4edbd https://git.kernel.org/stable/c/61bb4a1c417e5b95d9edb4f887f131de32e419cb