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 5D1C428C2AA for ; Thu, 10 Jul 2025 08:15:56 +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=1752135356; cv=none; b=As85EbkKUTWMN+JHVptaSk8pGR7tfx2aLI6NcxhB0LviWmZ2Aq/NPaJp8g6uPZA85IgdwMh3wzZ92mOn13mBKvJGIqNH82zEluO+HiO5n2T7CGYnYkOTZG11fvD9TnD14FTX36qrWe3usrbN9HBwVFzqYNi9410zfhOuTS1LFjM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752135356; c=relaxed/simple; bh=yimeTI5LP3vmydY7awwL7mkHBzuva2Ic6X/1zhK12K4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sGKWWmF6iOnex9zP9Ff/oOtke1GvjcVw3xw9rPwZKlA/qpBfzyCWUqXCykxL62ge1otZIhSdDSei49UHF0h8fXBHpONSumOCIJYWsc/yjBjdC+Eit8tON/PnW8eXpOmxppRO9p/nq/QFgAwemsSW7585kd9wdnFljILz0gi9ofY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VLluCpfo; 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="VLluCpfo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9833EC4CEE3; Thu, 10 Jul 2025 08:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752135356; bh=yimeTI5LP3vmydY7awwL7mkHBzuva2Ic6X/1zhK12K4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VLluCpfoT4fi0sJcBtIMH4uS3MzS3bU4HnSWlLfe4BrVppBjOfrpmYPhjIob9hTXU 1pb0Qyxqz43IctUqihTmwwbbaEZ4BtFTJ8zPVuoaJ3JZ9JhJ+8J4/RGEw5e79e4h/b SPu0Ho57TtE6eMeJ6fNOpCcpS2eEWevcxQDZUG8o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38333: f2fs: fix to bail out in get_new_segment() Date: Thu, 10 Jul 2025 10:15:41 +0200 Message-ID: <2025071033-CVE-2025-38333-a60d@gregkh> X-Mailer: git-send-email 2.50.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=2470; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=snikj0/Nf6BRMCZsnJ6vHed6ko3CNHsKKEAXQWOOcHk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBn5ZUv/9pWejlYv2Tch1vnB2ekpzApGHaUX9q0sylQ78 1vVsU6oI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbiXc4wT6/yg9S+3b5nePSv b9Z6tM8nN1ddgGF+tkXgTYaeHm49R4HCOVZT73jffzMbAA== 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 bail out in get_new_segment() ------------[ cut here ]------------ WARNING: CPU: 3 PID: 579 at fs/f2fs/segment.c:2832 new_curseg+0x5e8/0x6dc pc : new_curseg+0x5e8/0x6dc Call trace: new_curseg+0x5e8/0x6dc f2fs_allocate_data_block+0xa54/0xe28 do_write_page+0x6c/0x194 f2fs_do_write_node_page+0x38/0x78 __write_node_page+0x248/0x6d4 f2fs_sync_node_pages+0x524/0x72c f2fs_write_checkpoint+0x4bc/0x9b0 __checkpoint_and_complete_reqs+0x80/0x244 issue_checkpoint_thread+0x8c/0xec kthread+0x114/0x1bc ret_from_fork+0x10/0x20 get_new_segment() detects inconsistent status in between free_segmap and free_secmap, let's record such error into super block, and bail out get_new_segment() instead of continue using the segment. The Linux kernel CVE team has assigned CVE-2025-38333 to this issue. Affected and fixed versions =========================== Fixed in 6.12.35 with commit f0023d7a2a86999c8e1300e911d92f995a5310a8 Fixed in 6.15.4 with commit ca860f507a61c7c3d4dde47b830a5c0d555cf83c Fixed in 6.16-rc1 with commit bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2 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-2025-38333 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/segment.c include/linux/f2fs_fs.h 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/f0023d7a2a86999c8e1300e911d92f995a5310a8 https://git.kernel.org/stable/c/ca860f507a61c7c3d4dde47b830a5c0d555cf83c https://git.kernel.org/stable/c/bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2