From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 82003391512 for ; Sun, 19 Jul 2026 12:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462627; cv=none; b=l63pXUQsLQHercfq3bO7u55mqEkoT06UAaJKj8F2WSNXGGHLBDo7osKchTWZB5UnQpEdBc5ih9DlAeFvdrlUQVocb8WYco9kkS+zLRvy0dEniRKOLeai7I2CTNqoSROR4A+BIoAXKIpiSEWClsFJwTFDgaR7yyjGfl7Xyr/ZO3g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462627; c=relaxed/simple; bh=y4dAsWnNAARVBcv16JAoOvn21rOTZFp4pqI4BrZItPM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VDzMs6SuBpAhrXtyLQb7F4EEo4v6EYDf4cR1x12QyeAe7anF/KUrESPrsIWYLMtS6hChu4lPs0OuvwMoUpM5zk6oaBZcYbdt0dntWMqCvYVeYbLdLanPRupq0yILE7Fo/m4s/mqZxagPXnD9mcA8ILL7qioVaUF2ui5YX2XVIIU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fj8eco0R; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fj8eco0R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E703B1F000E9; Sun, 19 Jul 2026 12:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784462626; bh=Wrf0Cbb/nU5sFfHuxImRdjv4nDtSkjeLdgeiMZkohBM=; h=From:To:Cc:Subject:Date:Reply-To; b=fj8eco0RAC6fHjx4lLzvtcJEBn//aus3wip/yllD5xUqpJ1LO3jftV0nSpzMlNQiC rqggDEy28ytF+FhzzJoJ3FK1MzhwONMKaX1PNM2tIhErl0XqJKKyVAf+tFTnflxRBQ LEKZbF+oqUrmWfiOreISD2rHgXyupRhbEiPO2ZCM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63819: f2fs: fix to do sanity check on f2fs_get_node_folio_ra() Date: Sun, 19 Jul 2026 14:02:36 +0200 Message-ID: <2026071905-CVE-2026-63819-e07a@gregkh> X-Mailer: git-send-email 2.55.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=4558; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kcpj3Orn38TkHYJNl2DLn/9bOGisyptxhdi5rS2+aK4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxe/a+yf7FO/nRVtm6cpc25++q85d4RU1R36vRNNVf+ 1/ir8LmjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIxlMM8ywslPbsFCrxm3r0 /vvUHMOC2/tkGBkWHEx/25l7njm5oGvxvR+XM7Y77svjBQA= 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 f2fs_get_node_folio_ra() kernel BUG at fs/f2fs/file.c:845! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:f2fs_do_truncate_blocks+0x1115/0x1140 fs/f2fs/file.c:845 Code: fc fc 90 0f 0b e8 8b 9d 9a fd 90 0f 0b e8 83 9d 9a fd 48 89 df 48 c7 c6 60 d1 1a 8c e8 54 f1 fc fc 90 0f 0b e8 6c 9d 9a fd 90 <0f> 0b e8 64 9d 9a fd 90 0f 0b 90 e9 93 fd ff ff e8 56 9d 9a fd 90 RSP: 0018:ffffc9000e4474c0 EFLAGS: 00010283 RAX: ffffffff842b1d34 RBX: 0000000000000003 RCX: 0000000000100000 RDX: ffffc9000f03a000 RSI: 0000000000035503 RDI: 0000000000035504 RBP: ffffc9000e447608 R08: ffff8880123b0000 R09: 0000000000000002 R10: 00000000fffffffe R11: 0000000000000002 R12: 0000000000000001 R13: 0000000000000000 R14: 1ffff92001c88ea0 R15: 00000000ffff039c FS: 00007f7e02ee36c0(0000) GS:ffff88808c887000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff0305c4000 CR3: 0000000012d4c000 CR4: 0000000000352ef0 Call Trace: f2fs_truncate_blocks+0x10a/0x300 fs/f2fs/file.c:882 f2fs_truncate+0x471/0x7c0 fs/f2fs/file.c:940 f2fs_evict_inode+0xa3f/0x1ac0 fs/f2fs/inode.c:907 evict+0x61e/0xb10 fs/inode.c:841 f2fs_fill_super+0x5f43/0x78f0 fs/f2fs/super.c:5224 get_tree_bdev_flags+0x431/0x4f0 fs/super.c:1694 vfs_get_tree+0x92/0x2a0 fs/super.c:1754 fc_mount fs/namespace.c:1193 [inline] do_new_mount_fc fs/namespace.c:3758 [inline] do_new_mount+0x341/0xd30 fs/namespace.c:3834 do_mount fs/namespace.c:4167 [inline] __do_sys_mount fs/namespace.c:4383 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4360 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f count = ADDRS_PER_PAGE(dn.node_folio, inode); count -= dn.ofs_in_node; f2fs_bug_on(sbi, count < 0); The fuzz test will trigger above bug_on in f2fs. The root cause should be: in the corrupted inode, there is a direct node which has the same ino and nid in its footer, so in f2fs_do_truncate_blocks(), after f2fs_get_dnode_of_data() finds such dnode: 1) ADDRS_PER_PAGE(dn.node_folio, inode) will return 923 2) once dn.ofs_in_node points to addr[923, 1017] Then it will trigger the system panic. Let's introduce NODE_TYPE_NON_IXNODE to indicate current node should not be an inode or xattr node, and then use it in below path to detect inconsistent node chain in inode mapping table: - f2fs_do_truncate_blocks - f2fs_get_dnode_of_data - f2fs_get_node_folio_ra - __get_node_folio - f2fs_sanity_check_node_footer - case NODE_TYPE_NON_IXNODE -> check whether it is inode|xnode The Linux kernel CVE team has assigned CVE-2026-63819 to this issue. Affected and fixed versions =========================== Fixed in 6.18.39 with commit 406c28af75123432d38cf9bbaa6f1476f7b14770 Fixed in 7.1.3 with commit 0cc21c1ffe15b4156b0bf744f32fd1faef0b7c73 Fixed in 7.2-rc1 with commit 8712353ed80f87271d732297567dcdbe4b84e8c7 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-2026-63819 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/node.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/406c28af75123432d38cf9bbaa6f1476f7b14770 https://git.kernel.org/stable/c/0cc21c1ffe15b4156b0bf744f32fd1faef0b7c73 https://git.kernel.org/stable/c/8712353ed80f87271d732297567dcdbe4b84e8c7