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 060D53203B4 for ; Mon, 15 Sep 2025 14:14:03 +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=1757945644; cv=none; b=hKIuq0ApWXX1h6r0kM7uNANSdMGwf+kH7DJ2BNtQ8Zspvt3G9VmVtBg+mZJ1X67KN7kQuMN8wgE9OjHWW4kknWDs/7bM6vaPYB+gJo1V5Vm4RipGmm52MV7RAQa/D2ekiGz4N8qP8bFy6r2zp9Oh9HJZNJS70NI6zi+0JmDWMUw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945644; c=relaxed/simple; bh=TMMUClGdWoD+58yfhFFyIDgGAk62KIS21xFFKRdfe7c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=q3z2JuOffyS6bhmgD0NN0QBRPhRld2gabT/97v5B1qZOL7w/73b/0cZDr3QZIen8pBPEtBsfo+PfH0lZXdr4/ck9eUbfpOFVwywDWab2xz7GE5cjZgJrGLxI0YbJ2vWyJ5YT+JSUWmXtIuUdHQieTg3WWpNdd4lEKRAfHif04dg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nV4+Xd5y; 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="nV4+Xd5y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01FE7C4CEF1; Mon, 15 Sep 2025 14:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757945643; bh=TMMUClGdWoD+58yfhFFyIDgGAk62KIS21xFFKRdfe7c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nV4+Xd5y40LkourSLOYuF0DICdd0/st8bwA3TZm4x0GyS42zXtFnEazApaHzl/xlb 96tFM1cIOx1EwXSI4loPRGvSiTUaH9t5/hKQVDpSTOGkrbJ9SAVgbM6XcaEt7HJyri c85fUSbtFOlPdmsT/2sEwG6UuU+sH6ukjV3Ywkik= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53149: ext4: avoid deadlock in fs reclaim with page writeback Date: Mon, 15 Sep 2025 16:02:12 +0200 Message-ID: <2025091552-CVE-2023-53149-2f0a@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=3029; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EreMbWgqQmNEfhY2gcCC8LB+MyYHIUr+kPaZUIJroNk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknZAJ2zn/zfgZPWe6OA6Umpcc4ixbzs2yv/P+mlCn3s 1Dqa+MlHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRtUEM8/24ooM4kncd3dV9 OTJoBr+MukTHPoYF83sCeUxS/prYBHVPCvsRKj2pQcYYAA== 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: ext4: avoid deadlock in fs reclaim with page writeback Ext4 has a filesystem wide lock protecting ext4_writepages() calls to avoid races with switching of journalled data flag or inode format. This lock can however cause a deadlock like: CPU0 CPU1 ext4_writepages() percpu_down_read(sbi->s_writepages_rwsem); ext4_change_inode_journal_flag() percpu_down_write(sbi->s_writepages_rwsem); - blocks, all readers block from now on ext4_do_writepages() ext4_init_io_end() kmem_cache_zalloc(io_end_cachep, GFP_KERNEL) fs_reclaim frees dentry... dentry_unlink_inode() iput() - last ref => iput_final() - inode dirty => write_inode_now()... ext4_writepages() tries to acquire sbi->s_writepages_rwsem and blocks forever Make sure we cannot recurse into filesystem reclaim from writeback code to avoid the deadlock. The Linux kernel CVE team has assigned CVE-2023-53149 to this issue. Affected and fixed versions =========================== Issue introduced in 4.7 with commit c8585c6fcaf2011de54c3592e80a634a2b9e1a7f and fixed in 6.2.16 with commit 2ec97dc90df40c50e509809dc9a198638a7e18b6 Issue introduced in 4.7 with commit c8585c6fcaf2011de54c3592e80a634a2b9e1a7f and fixed in 6.3.3 with commit 4b4340bf04ce9a52061f15000ecedd126abc093c Issue introduced in 4.7 with commit c8585c6fcaf2011de54c3592e80a634a2b9e1a7f and fixed in 6.4 with commit 00d873c17e29cc32d90ca852b82685f1673acaa5 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-2023-53149 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/ext4.h fs/ext4/inode.c fs/ext4/migrate.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/2ec97dc90df40c50e509809dc9a198638a7e18b6 https://git.kernel.org/stable/c/4b4340bf04ce9a52061f15000ecedd126abc093c https://git.kernel.org/stable/c/00d873c17e29cc32d90ca852b82685f1673acaa5