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 58872280CD5 for ; Wed, 24 Dec 2025 13:07:01 +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=1766581623; cv=none; b=pfwATprmi/00mjJfyHDRcYaXdPNFehMsjShj0k7dQN+NdlNz29DyBtfR5AicbH7QAMtafJ3eB9qVmSjQg4x+Zhi8vu3UK3TqiI3bQo0mj+eJG7ook5qFwNrk1R61yqTfX8tQ+ax2HKKAfWaM+13DahVHPcQH4IiH0lZo27x4Jdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581623; c=relaxed/simple; bh=3Pw32Eo/CHWTmw0ZuDShkFl/gqb6OGszfLu7bsj3rN4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CvzNbVs+q4p9ctOGLgFbXG4bRTpkqLQwS3r0k6uQ4hqQcUHiinzCGljzoezBoTSCUzXWgG+lsF7JrP/l0iBaOrKEMYZfdn6ep9pRRtE0ie09S+XjyLmN2E/8ulJ79IGcvZcBIDA67x3+hfqVHybmt4GJi8rqnwCROuqYCVXAKmU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NVtUMk2G; 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="NVtUMk2G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E7A6C4CEFB; Wed, 24 Dec 2025 13:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581621; bh=3Pw32Eo/CHWTmw0ZuDShkFl/gqb6OGszfLu7bsj3rN4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=NVtUMk2GgJzIFdObrNYypLdnFl2drDZ69YRIa+0lq7rOEmGsiWSh08pCuhoY6u1wj 4UseX1I6cYzmrvC1WtkD3tKClroA1PEITuVPmDr76gwzGimUfcDSQqx8uHT7V+SuEY 2zue3C55mcfE2fZhrRjL+af/RTGGXRleFnhFCmGg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50753: f2fs: fix to do sanity check on summary info Date: Wed, 24 Dec 2025 14:06:04 +0100 Message-ID: <2025122452-CVE-2022-50753-6266@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=3469; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WbWDIVv1IbeD0xuqQrf6gR7H1vJ5w8TvHD2W7PTFpW8=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneTw3OKXCor1Mrvdm9+7jEz2T1MxryexafCuxddHL+g duVR+f3dcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEEngZFnQ9nbPmoOG8j+IL CnpdDir8vv5L9RzD/CD35Tl9H5p7P09LXeqRzuF1VaXeCAA= 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 do sanity check on summary info As Wenqing Liu reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216456 BUG: KASAN: use-after-free in recover_data+0x63ae/0x6ae0 [f2fs] Read of size 4 at addr ffff8881464dcd80 by task mount/1013 CPU: 3 PID: 1013 Comm: mount Tainted: G W 6.0.0-rc4 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x45/0x5e print_report.cold+0xf3/0x68d kasan_report+0xa8/0x130 recover_data+0x63ae/0x6ae0 [f2fs] f2fs_recover_fsync_data+0x120d/0x1fc0 [f2fs] f2fs_fill_super+0x4665/0x61e0 [f2fs] mount_bdev+0x2cf/0x3b0 legacy_get_tree+0xed/0x1d0 vfs_get_tree+0x81/0x2b0 path_mount+0x47e/0x19d0 do_mount+0xce/0xf0 __x64_sys_mount+0x12c/0x1a0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd The root cause is: in fuzzed image, SSA table is corrupted: ofs_in_node is larger than ADDRS_PER_PAGE(), result in out-of-range access on 4k-size page. - recover_data - do_recover_data - check_index_in_prev_nodes - f2fs_data_blkaddr This patch adds sanity check on summary info in recovery and GC flow in where the flows rely on them. After patch: [ 29.310883] F2FS-fs (loop0): Inconsistent ofs_in_node:65286 in summary, ino:0, nid:6, max:1018 The Linux kernel CVE team has assigned CVE-2022-50753 to this issue. Affected and fixed versions =========================== Fixed in 5.4.220 with commit c99860f9a75079f339ed7670425b1ac58f26e2ff Fixed in 5.10.150 with commit 4a8e8bf280703e04e0b9d91f101e1fdd9a5bd09e Fixed in 5.15.75 with commit 73687c53919f49dff3852155621dab7a35c52854 Fixed in 5.19.17 with commit e168f819bfa42459b14f479e55ebd550bcc78899 Fixed in 6.0.3 with commit 0922ad64ccefa3e483e84355942b86e13c8fea68 Fixed in 6.1 with commit c6ad7fd16657ebd34a87a97d9588195aae87597d 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-2022-50753 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/gc.c fs/f2fs/recovery.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/c99860f9a75079f339ed7670425b1ac58f26e2ff https://git.kernel.org/stable/c/4a8e8bf280703e04e0b9d91f101e1fdd9a5bd09e https://git.kernel.org/stable/c/73687c53919f49dff3852155621dab7a35c52854 https://git.kernel.org/stable/c/e168f819bfa42459b14f479e55ebd550bcc78899 https://git.kernel.org/stable/c/0922ad64ccefa3e483e84355942b86e13c8fea68 https://git.kernel.org/stable/c/c6ad7fd16657ebd34a87a97d9588195aae87597d