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 12807296BD3 for ; Tue, 30 Dec 2025 12:12:18 +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=1767096739; cv=none; b=dNiS2juAIY2EGGv72fk/npLlntmADzRaZ1KRlSl3wVB4Bucr0zl/ohr5wp3L4xTKmTO1dvjuOnBxSSyvTyZ0nw+uZpMi4GtwL/5I4ev3dIt9qBwWt7OVgbHudx7Ckaw5jPSiG8WVkMAKa/e47kj+RrxpVRVPxTYFpIwFwn6sugw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096739; c=relaxed/simple; bh=MUTCGEtxz7+6LNpa6qIC0geir31ppZpw54Fr7RN0S5I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kYWHpTnXuzChQd/lvapxDOZwc75CtxBzAH8s5B8zHw7L6Z5pSlSooL2SVzYz2hyVZSSb3fzofXhA71X4KS5JfYOO88fej/0JfAwxa6+8s5mNVD6PkCkHRhjQRP9jNbx6I99/vU3tbs1hvCj0PwqvzhXyH2+Opz9wdRwEfgG6Zcw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dr++IHvQ; 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="dr++IHvQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 261ECC113D0; Tue, 30 Dec 2025 12:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096738; bh=MUTCGEtxz7+6LNpa6qIC0geir31ppZpw54Fr7RN0S5I=; h=From:To:Cc:Subject:Date:Reply-To:From; b=dr++IHvQxC3gr97ROrabJTBFGaDUuZwcfjnDQaPHf4ta+9wxqM1fokmLHbeUoilaS K8UHoTI0BZXl8O3amF5+DGLqqUrL5Kb/qP7lAH7NQKh+NXvjqxm6jqe0kW61EmmcR+ HRhMSg0Mft00FQloBlf6RDBKISz6JQyGEo6vt4tk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54182: f2fs: fix to check readonly condition correctly Date: Tue, 30 Dec 2025 13:09:50 +0100 Message-ID: <2025123024-CVE-2023-54182-916c@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3068; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IAgeJpaJNJ57k2Y+toF+DVmdu2N1vimy0L9jdAOGaN8=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBB74YHnLo8X1ZHiQ3oda+aNo0eznTZSuc/5Qm+onOP lx/riG8I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbCNp9hwVmlvfGado/SUj7q n1piu5ApIZ7dhGF+luT0r49c/BbeTE9wPdYpkbsw/8oGAA== 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: f2fs: fix to check readonly condition correctly With below case, it can mount multi-device image w/ rw option, however one of secondary device is set as ro, later update will cause panic, so let's introduce f2fs_dev_is_readonly(), and check multi-devices rw status in f2fs_remount() w/ it in order to avoid such inconsistent mount status. mkfs.f2fs -c /dev/zram1 /dev/zram0 -f blockdev --setro /dev/zram1 mount -t f2fs dev/zram0 /mnt/f2fs mount: /mnt/f2fs: WARNING: source write-protected, mounted read-only. mount -t f2fs -o remount,rw mnt/f2fs dd if=/dev/zero of=/mnt/f2fs/file bs=1M count=8192 kernel BUG at fs/f2fs/inline.c:258! RIP: 0010:f2fs_write_inline_data+0x23e/0x2d0 [f2fs] Call Trace: f2fs_write_single_data_page+0x26b/0x9f0 [f2fs] f2fs_write_cache_pages+0x389/0xa60 [f2fs] __f2fs_write_data_pages+0x26b/0x2d0 [f2fs] f2fs_write_data_pages+0x2e/0x40 [f2fs] do_writepages+0xd3/0x1b0 __writeback_single_inode+0x5b/0x420 writeback_sb_inodes+0x236/0x5a0 __writeback_inodes_wb+0x56/0xf0 wb_writeback+0x2a3/0x490 wb_do_writeback+0x2b2/0x330 wb_workfn+0x6a/0x260 process_one_work+0x270/0x5e0 worker_thread+0x52/0x3e0 kthread+0xf4/0x120 ret_from_fork+0x29/0x50 The Linux kernel CVE team has assigned CVE-2023-54182 to this issue. Affected and fixed versions =========================== Fixed in 5.15.113 with commit e2759a59a4cc96af712084e9db7065c858c4fe9f Fixed in 6.1.30 with commit e05d63f8b48aad4613bd582c945bee41e2dd7255 Fixed in 6.3.4 with commit da8c535b28696017e5d1532d12ea78e836432d9e Fixed in 6.4 with commit d78dfefcde9d311284434560d69c0478c55a657e 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-54182 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/f2fs.h fs/f2fs/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/e2759a59a4cc96af712084e9db7065c858c4fe9f https://git.kernel.org/stable/c/e05d63f8b48aad4613bd582c945bee41e2dd7255 https://git.kernel.org/stable/c/da8c535b28696017e5d1532d12ea78e836432d9e https://git.kernel.org/stable/c/d78dfefcde9d311284434560d69c0478c55a657e