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 C6FA43148B1 for ; Thu, 18 Sep 2025 16:06:17 +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=1758211577; cv=none; b=gceO1I2djAxIkup4Glvb20jBxOTFzH8A8Q8KgTwCs3lrNWalfPDwBXvYPsawIyyPaaC3pOY224JSHocQlhUGowG6HHscNIGIzqX0M76WvvXhQxlIuIc2RLGxGucQgpYhyKTHsovIzUNUr+y31BDy+jcMkcDPqGbKegLo+62et1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758211577; c=relaxed/simple; bh=KNLjFNJy41NTH4bs9Cc+1SpJktGLxsiXoPC7HUSZthc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WVMkC6ND0qvT1iavD0c9fU9vlaODZAv3BVEBzlgjhum3ZsbRIfo/BatCDjaQzM3kiWU97aZY/6PW2PzBiYToov3DiYwLwlpcWqgkLVWLXfjUdy4WxgFXgX3NFYltpi3o6ZP6wS45EV3WfNcrD3/FPM+1c0CPJVOTWYZO421+8tI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Bck/gH4d; 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="Bck/gH4d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 433B0C4CEE7; Thu, 18 Sep 2025 16:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758211577; bh=KNLjFNJy41NTH4bs9Cc+1SpJktGLxsiXoPC7HUSZthc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Bck/gH4d574CUzxa31AxfuGcNUzEPcs/DqkwORXNHqay+mLEQ5zlc8Sn+2MpNfqJ/ VoQ2r1dOugGbj6tMx0NfK4/ziYadUPOpdaUJ5H4aEuTap0NKqgcMweNrLYgOaoG61S Nkf9EWqWqR6QgZYYOt9L4YcNA1COKi1rxL65pB3A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53447: f2fs: don't reset unchangable mount option in f2fs_remount() Date: Thu, 18 Sep 2025 18:04:38 +0200 Message-ID: <2025091800-CVE-2023-53447-e0ee@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=3463; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4KaUkQggnieR+ehrzm24YEK+n7EtVEWJaCCKeEEvHu0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlndAsCZp2q3xdwRvrbNhsL5hOzp/ryCDl/vrs5ZP08q 9lrZA//64hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJSBQxzJVJmx6l9/B1pexK rg3SHduDf9vmn2GYw+c03dtoYwXngTlcTyVnua9fFrX9LAA= 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: don't reset unchangable mount option in f2fs_remount() syzbot reports a bug as below: general protection fault, probably for non-canonical address 0xdffffc0000000009: 0000 [#1] PREEMPT SMP KASAN RIP: 0010:__lock_acquire+0x69/0x2000 kernel/locking/lockdep.c:4942 Call Trace: lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5691 __raw_write_lock include/linux/rwlock_api_smp.h:209 [inline] _raw_write_lock+0x2e/0x40 kernel/locking/spinlock.c:300 __drop_extent_tree+0x3ac/0x660 fs/f2fs/extent_cache.c:1100 f2fs_drop_extent_tree+0x17/0x30 fs/f2fs/extent_cache.c:1116 f2fs_insert_range+0x2d5/0x3c0 fs/f2fs/file.c:1664 f2fs_fallocate+0x4e4/0x6d0 fs/f2fs/file.c:1838 vfs_fallocate+0x54b/0x6b0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xbd/0x100 fs/open.c:353 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The root cause is race condition as below: - since it tries to remount rw filesystem, so that do_remount won't call sb_prepare_remount_readonly to block fallocate, there may be race condition in between remount and fallocate. - in f2fs_remount(), default_options() will reset mount option to default one, and then update it based on result of parse_options(), so there is a hole which race condition can happen. Thread A Thread B - f2fs_fill_super - parse_options - clear_opt(READ_EXTENT_CACHE) - f2fs_remount - default_options - set_opt(READ_EXTENT_CACHE) - f2fs_fallocate - f2fs_insert_range - f2fs_drop_extent_tree - __drop_extent_tree - __may_extent_tree - test_opt(READ_EXTENT_CACHE) return true - write_lock(&et->lock) access NULL pointer - parse_options - clear_opt(READ_EXTENT_CACHE) The Linux kernel CVE team has assigned CVE-2023-53447 to this issue. Affected and fixed versions =========================== Fixed in 6.4.5 with commit 115557cc226a927924f2d7d1980ccbf6e3b3bb36 Fixed in 6.5 with commit 458c15dfbce62c35fefd9ca637b20a051309c9f1 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-53447 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/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/115557cc226a927924f2d7d1980ccbf6e3b3bb36 https://git.kernel.org/stable/c/458c15dfbce62c35fefd9ca637b20a051309c9f1