From mboxrd@z Thu Jan 1 00:00:00 1970 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 CDEEE1F4711 for ; Fri, 27 Dec 2024 13:57: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=1735307821; cv=none; b=G3+Le8pmzjdUAQ9GtXYtqIPq3YShp4CLKLTtGmdrSbpqwsmH+ZEzRlnoyGxzwNRVGi0zQfqZr3YUxHOio3dw90yOeOA0z2hoiPPByK5aSfsUTKcHGGQ5U/nvEzRW00yS4eaMeHlSza+wOh01rL1Wbv4bdFwqwQmnfABTjU3y29Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735307821; c=relaxed/simple; bh=X0AOlU7xU9bgM5zbeAnLMTfv2YkmZ+McovngrSRO/H0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ASgvA+q6frEjXd2+lOoFRDmi0r4LVeZvNRwuFUgXFaNUBDZy6DjLLmZEk7zAylfv0UEfvG9n8zAsGyosJ9Vehd7sFXtnayccVbnP/6dK4NkZFnrpcGn4opDNfgIGKpAeNn4B7NczgXMcSR9gvzCJNhq1pasKrOkeRo+E8m7PEzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V+SaAll9; 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="V+SaAll9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B9E3C4CED0; Fri, 27 Dec 2024 13:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735307821; bh=X0AOlU7xU9bgM5zbeAnLMTfv2YkmZ+McovngrSRO/H0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V+SaAll9y3rf2JcbfkvYNhiWIlxxd0fKR5Dm4RP3j+jVsBn6kMavGKSpAAfNnwFUb eQNO6cAH2R4rfYdy7c4KwmpE9SNxYP9QLtR5dDvFicoRq/allfdvWdET0o3ckTQtVt lL1FoHDCjyx9KayViLzu4Up7KcFPJQJbUSGeVs+U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53221: f2fs: fix null-ptr-deref in f2fs_submit_page_bio() Date: Fri, 27 Dec 2024 14:53:07 +0100 Message-ID: <2024122733-CVE-2024-53221-d8b2@gregkh> X-Mailer: git-send-email 2.47.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=2974; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=X0AOlU7xU9bgM5zbeAnLMTfv2YkmZ+McovngrSRO/H0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5GxXP1RX7+WYr/7tv/bHqTe+t5+o1G1jXXZoo4i0Qw LJZeE5LRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEs4thNkuhc5TMK4sKh2Pf NlYUMz4Ub7NNZ1iwe/5nh683FC992NfknPP/2BqxkOdbAA== 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 null-ptr-deref in f2fs_submit_page_bio() There's issue as follows when concurrently installing the f2fs.ko module and mounting the f2fs file system: KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] RIP: 0010:__bio_alloc+0x2fb/0x6c0 [f2fs] Call Trace: f2fs_submit_page_bio+0x126/0x8b0 [f2fs] __get_meta_page+0x1d4/0x920 [f2fs] get_checkpoint_version.constprop.0+0x2b/0x3c0 [f2fs] validate_checkpoint+0xac/0x290 [f2fs] f2fs_get_valid_checkpoint+0x207/0x950 [f2fs] f2fs_fill_super+0x1007/0x39b0 [f2fs] mount_bdev+0x183/0x250 legacy_get_tree+0xf4/0x1e0 vfs_get_tree+0x88/0x340 do_new_mount+0x283/0x5e0 path_mount+0x2b2/0x15b0 __x64_sys_mount+0x1fe/0x270 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Above issue happens as the biset of the f2fs file system is not initialized before register "f2fs_fs_type". To address above issue just register "f2fs_fs_type" at the last in init_f2fs_fs(). Ensure that all f2fs file system resources are initialized. The Linux kernel CVE team has assigned CVE-2024-53221 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit f543805fcd60f3f9a491cfa2f2dc9284d2569c28 and fixed in 6.11.11 with commit 32f5e291b7677495f98246eec573767430321c08 Issue introduced in 5.6 with commit f543805fcd60f3f9a491cfa2f2dc9284d2569c28 and fixed in 6.12.2 with commit 9e11b1d5fda972f6be60ab732976a7c8e064cd56 Issue introduced in 5.6 with commit f543805fcd60f3f9a491cfa2f2dc9284d2569c28 and fixed in 6.13-rc1 with commit b7d0a97b28083084ebdd8e5c6bccd12e6ec18faa 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-2024-53221 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/32f5e291b7677495f98246eec573767430321c08 https://git.kernel.org/stable/c/9e11b1d5fda972f6be60ab732976a7c8e064cd56 https://git.kernel.org/stable/c/b7d0a97b28083084ebdd8e5c6bccd12e6ec18faa