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 1B2285C613 for ; Fri, 17 May 2024 14:27:56 +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=1715956077; cv=none; b=GC7ZNGKjIDUbzj59FpvBpAejmBR6oBrU+SklbmmYxi0T7flGZSRl9bon2acfGIwXauIJH/xemH3TY6VFjef3fv5kffUZUVQ5D3BBrLxWfwRTCH5Ji0iSXwsS/4h3888LTt6rIOqbf7EyJZG1VwD0hkP+HL5Pzzx9Uh2K+4VpEh0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715956077; c=relaxed/simple; bh=pL4L5un0wmN0jBR7Cv6qZOwmvwNZ24PQzx555q1gPgc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=saRwAmo/O5vXTiSC4D94BbRdxEu3moaI5gIBUhOdGnXQQ/dj5QzvXLUIy8pTn+iGcwUtznIWBBTELPbMxWxDs0svixpcbNa3xVboQwJBth23Mriuio+M0j8SykeCtQzX82CCYLVZNvCen963QwlpEtGG2vNW57Ytlm67VYwQke0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0zXnFoLC; 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="0zXnFoLC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D195C2BD10; Fri, 17 May 2024 14:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715956076; bh=pL4L5un0wmN0jBR7Cv6qZOwmvwNZ24PQzx555q1gPgc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0zXnFoLCeg37pOnS/WvEwVALtUVC5oh9RDxfoxOIstiSJ303gy3lrPjCHA0uXIs4x GgDmI2ZOEAja5OKvdfToCriyQ9tvol1gdombUh0WGkejJoSpePQBH7rPXZvqG/rbbQ r70weUypIW2/wgKxeFiZEnjKjhaKxh67T8vb9+oE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52682: f2fs: fix to wait on block writeback for post_read case Date: Fri, 17 May 2024 16:26:55 +0200 Message-ID: <2024051751-CVE-2023-52682-fae2@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=2616; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pL4L5un0wmN0jBR7Cv6qZOwmvwNZ24PQzx555q1gPgc=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnumdo3l3Me4xD41dorfk1889uOz1f4uSKt2zSETj9W+ yoeyN/dEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABP5LMqwYG/GARXhVcnuk6Uj I3hy1nfstb3MzjCHb+rFyJUT4oy8XEo7pspf9kts3GMEAA== 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 to wait on block writeback for post_read case If inode is compressed, but not encrypted, it missed to call f2fs_wait_on_block_writeback() to wait for GCed page writeback in IPU write path. Thread A GC-Thread - f2fs_gc - do_garbage_collect - gc_data_segment - move_data_block - f2fs_submit_page_write migrate normal cluster's block via meta_inode's page cache - f2fs_write_single_data_page - f2fs_do_write_data_page - f2fs_inplace_write_data - f2fs_submit_page_bio IRQ - f2fs_read_end_io IRQ old data overrides new data due to out-of-order GC and common IO. - f2fs_read_end_io The Linux kernel CVE team has assigned CVE-2023-52682 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.1.75 with commit 9bfd5ea71521 Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.6.14 with commit 4535be487804 Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.7.2 with commit f904c156d801 Issue introduced in 5.6 with commit 4c8ff7095bef and fixed in 6.8 with commit 55fdc1c24a1d 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-52682 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/data.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/9bfd5ea71521d0e522ba581c6ccc5db93759c0c3 https://git.kernel.org/stable/c/4535be48780431753505e74e1b1ad4836a189bc2 https://git.kernel.org/stable/c/f904c156d8011d8291ffd5b6b398f3747e294986 https://git.kernel.org/stable/c/55fdc1c24a1d6229fe0ecf31335fb9a2eceaaa00