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 DC011146D45 for ; Sat, 17 Aug 2024 09:13:29 +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=1723886009; cv=none; b=gVh8Qs/3kKyb3RNBbAZf11FJiRhCVQxm6zBer/0qf/lcoKECIr5ehqQX8C6owEhdZuLeoPS2X0oRMlZx+gsLwJY8mD/ZqdM0BEVsX+bWQw6JcRNntKm3kJjnVUEqQxE63vg6FFjFw4OJYQ/gAhnn2rJDE6yc+zsD1PimAbQOxJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723886009; c=relaxed/simple; bh=hIGGmxLHMP9QgmftTHvvfgtBI0b33E85Ljr2tAMZAzo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GeSpecbU3eo58YamfzE0axtdGwVKgxvT4M/Z1ruEWpRxq1AadfNDjAj1wdNT9NtoQ95GQlgu2j4bDZzT+ZZUQfBVAXf27n+JiHINd+eOgiwWdifVeCXE6rKWbNhZtvsv469sxLp9QKRLwSip+JyDRK4+gw5aZu4s30kgPPkennc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dAGuXcxl; 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="dAGuXcxl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 143F3C116B1; Sat, 17 Aug 2024 09:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723886009; bh=hIGGmxLHMP9QgmftTHvvfgtBI0b33E85Ljr2tAMZAzo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dAGuXcxlhTFgaOOscB1wAnL2BLKKsk66Z/c4o6KVDfNVkLPJvPNHPxOVVcF3DQY84 MH+gdFc5WQCobeIW7FrwEUih/RbFp04NmOZV2QnLLxlbtRXu52n80sWBtgFOQKfI+8 bxEYZyZ+93vOC8rUjSyQ4FIBr+H8LzlvbevBCqGg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42296: f2fs: fix return value of f2fs_convert_inline_inode() Date: Sat, 17 Aug 2024 11:10:01 +0200 Message-ID: <2024081747-CVE-2024-42296-3f50@gregkh> X-Mailer: git-send-email 2.46.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=2898; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hIGGmxLHMP9QgmftTHvvfgtBI0b33E85Ljr2tAMZAzo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHMm7fjVtaunDKr7dSf59fynHdx/h03wst+cp/k1ftD V7/Q7AutyOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmcnQPwzyN80JFl+P+7Lbf 18281nXGYpFpZY8YFhyYtjJIN7nCyGmV0mmt9evlOoVPyQEA 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: fix return value of f2fs_convert_inline_inode() If device is readonly, make f2fs_convert_inline_inode() return EROFS instead of zero, otherwise it may trigger panic during writeback of inline inode's dirty page as below: f2fs_write_single_data_page+0xbb6/0x1e90 fs/f2fs/data.c:2888 f2fs_write_cache_pages fs/f2fs/data.c:3187 [inline] __f2fs_write_data_pages fs/f2fs/data.c:3342 [inline] f2fs_write_data_pages+0x1efe/0x3a90 fs/f2fs/data.c:3369 do_writepages+0x359/0x870 mm/page-writeback.c:2634 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:397 __filemap_fdatawrite_range mm/filemap.c:430 [inline] file_write_and_wait_range+0x1aa/0x290 mm/filemap.c:788 f2fs_do_sync_file+0x68a/0x1ae0 fs/f2fs/file.c:276 generic_write_sync include/linux/fs.h:2806 [inline] f2fs_file_write_iter+0x7bd/0x24e0 fs/f2fs/file.c:4977 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa72/0xc90 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The Linux kernel CVE team has assigned CVE-2024-42296 to this issue. Affected and fixed versions =========================== Fixed in 6.1.103 with commit 47a8ddcdcacc Fixed in 6.6.44 with commit 077f0e24b27c Fixed in 6.10.3 with commit 1e7725814361 Fixed in 6.11-rc1 with commit a8eb3de28e7a 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-42296 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/inline.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/47a8ddcdcaccd9b891db4574795e46a33a121ac2 https://git.kernel.org/stable/c/077f0e24b27c4b44841593c7edbd1993be9eecb5 https://git.kernel.org/stable/c/1e7725814361c8c008d131db195cef8274ff26b8 https://git.kernel.org/stable/c/a8eb3de28e7a365690c61161e7a07a4fc7c60bbf