From mboxrd@z Thu Jan 1 00:00:00 1970 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 93B3814900F for ; Wed, 3 Apr 2024 14:56:12 +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=1712156172; cv=none; b=kvymfkgbzX+PdeQcfc0lHrI6cBUphVdKWJ2wXsVFlEIZREZTa4M9Rf6mrOaRuxnkkV0PZuA6tHf09pTjmO6JLIi4RRFdwhGUdA0x4scz2ln3eLsfbfL2gOcWyscuOWoRDcPeT8MjlJf2neMQYUxMZ3LVaJ17RE9NOCf/wFxmk+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712156172; c=relaxed/simple; bh=s/68XMDus0wx3xcJr32LDL2u/DtyLtUFHw5BcUMkQks=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KS0DGkz8n35S068YYsuQetVAQrYJYp0sJd0lm7k0PY95p0bDTKy/WAPOP5kd8PPJ4lriuhNCd+ka8KS8IoIlVSeJxi1/AAeXVfVjbgAbOtUzKCciRrpIBM684OBSB446BpaGTa1L2C/DFKUqS4Z2MEkb7eVZVKnfdr4iBbt6XXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gSiH1mZN; 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="gSiH1mZN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6D4EC433C7; Wed, 3 Apr 2024 14:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712156172; bh=s/68XMDus0wx3xcJr32LDL2u/DtyLtUFHw5BcUMkQks=; h=From:To:Cc:Subject:Date:Reply-to:From; b=gSiH1mZN0Po3DO6dYZF37LAt4ywdqvc4CLazpFA5ZMNbfUMfDlwjPB1hrG4TmAoEI O+WSBkuvyj5+wcoDJ4qs4iPB9eYqPQw3U7Fc6XIRgTDLxG1RwQoYyGeP6Q9U5CMTJM TypMszmuGRZKDDvn1pPv2yZre7GohpWlhNpglGtw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26696: nilfs2: fix hang in nilfs_lookup_dirty_data_buffers() Date: Wed, 3 Apr 2024 16:55:47 +0200 Message-ID: <2024040338-CVE-2024-26696-9dff@gregkh> X-Mailer: git-send-email 2.44.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=3889; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=s/68XMDus0wx3xcJr32LDL2u/DtyLtUFHw5BcUMkQks=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm8ua+iPZlFLEy6p30IeWPcc1lE9dztl+VptbLdj/3M7 hcIrd/dEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABO56sUw3y1xX0zcyz29R483 zvs749NVc9WUnwwLZk4u0lbbXiZYEWn53FSfdbN+xYZkAA== 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: nilfs2: fix hang in nilfs_lookup_dirty_data_buffers() Syzbot reported a hang issue in migrate_pages_batch() called by mbind() and nilfs_lookup_dirty_data_buffers() called in the log writer of nilfs2. While migrate_pages_batch() locks a folio and waits for the writeback to complete, the log writer thread that should bring the writeback to completion picks up the folio being written back in nilfs_lookup_dirty_data_buffers() that it calls for subsequent log creation and was trying to lock the folio. Thus causing a deadlock. In the first place, it is unexpected that folios/pages in the middle of writeback will be updated and become dirty. Nilfs2 adds a checksum to verify the validity of the log being written and uses it for recovery at mount, so data changes during writeback are suppressed. Since this is broken, an unclean shutdown could potentially cause recovery to fail. Investigation revealed that the root cause is that the wait for writeback completion in nilfs_page_mkwrite() is conditional, and if the backing device does not require stable writes, data may be modified without waiting. Fix these issues by making nilfs_page_mkwrite() wait for writeback to finish regardless of the stable write requirement of the backing device. The Linux kernel CVE team has assigned CVE-2024-26696 to this issue. Affected and fixed versions =========================== Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 4.19.307 with commit 228742b2ddfb Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 5.4.269 with commit 862ee4422c38 Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 5.10.210 with commit 98a4026b22ff Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 5.15.149 with commit 7e9b622bd074 Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 6.1.79 with commit 8494ba2c9ea0 Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 6.6.18 with commit ea5ddbc11613 Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 6.7.6 with commit e38585401d46 Issue introduced in 3.9 with commit 1d1d1a767206 and fixed in 6.8 with commit 38296afe3c6e 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-26696 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/nilfs2/file.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/228742b2ddfb99dfd71e5a307e6088ab6836272e https://git.kernel.org/stable/c/862ee4422c38be5c249844a684b00d0dbe9d1e46 https://git.kernel.org/stable/c/98a4026b22ff440c7f47056481bcbbe442f607d6 https://git.kernel.org/stable/c/7e9b622bd0748cc104d66535b76d9b3535f9dc0f https://git.kernel.org/stable/c/8494ba2c9ea00a54d5b50e69b22c55a8958bce32 https://git.kernel.org/stable/c/ea5ddbc11613b55e5128c85f57b08f907abd9b28 https://git.kernel.org/stable/c/e38585401d464578d30f5868ff4ca54475c34f7d https://git.kernel.org/stable/c/38296afe3c6ee07319e01bb249aa4bb47c07b534