From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795153955; b=HIWoON93oNU7bqKp0H4AT9V7PDmYiWmEaU7u+ZNOf4KIUVNX25NCyvclYXUHMw/KWjiT pcs0r/5x4+ZJb2lkGIKo98pAN11cAqHpjOUO/5lX3ULkdav2ssrqDK0BDwLSbISm3mK8Z ZpeHIn++8RmolA1dByGlnIiY48V654vU0qgRU3DwO4gkMkhIBUcUKns+TL+1xgtHp4k9N 2atsrtva7h8A8Jkxu0XlxzldOqwmo0SRj9fK5gY3XWh7XuIDpp/HSN9KCADXgCPOncZRm dlvO5sHL2jE+qyjjQWmQAYMuirCQX7WKwGM1bOdeqd72ki3u0Q3gr2OzjWs9NGT+l1g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795153955; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=qUctseXgTp+OSH5rVy5H3hDekhEyimZFcanRTQGR81M=; b=X2qpl/tYjlGIr1WosfTpDtR5axdBf4N7hXpcPLgbR+ZCavDEI4T0wFmnXe44qcerhKGJ aJitx148koQ4re9v2JF7k4BAMSa3xRLvrGoRcY4GsQLENGoV/kk1jwRzUpncFHGfeKFZ4 oFl7z5XfL0rQw29Xjln2mkx9KZgHXFsCwyulWtPcPPG/Nf9HeFbfT5k7+KQd4h9UR8yDf KwWmgETB7OMvH95HwUsIUD6PjhzAriZveV4bwv5VczGbIbmqgd9NgHa3RI6K4Dsmfo3ci n28dWkqXXYS9f9kSIXy7q49nWAzZdEFWWABF6iekcrTAnKQv3GrPP+Ut5d3TpKXtQBw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dLpGvVnG; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F92D606A320 for ; Fri, 20 Nov 2026 05:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dLpGvVnG Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABD141F000C4; Fri, 20 Nov 2026 05:52:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795153955; bh=qUctseXgTp+OSH5rVy5H3hDekhEyimZFcanRTQGR81M=; h=From:To:Cc:Subject:Date:Reply-To; b=dLpGvVnGt5OrGuMuVsWcwEhRONbOchAQRYQWM36SLBEG7UChHe3YUFO8ktOFX/Bh9 nMKSjPfOMSuRscpc/94CMt5uyTNB7pQloEmkdrbLQo/1ict5Uzs694/1WEs3GdYzQc ew4slO6mOtu9b41zh/N7gFVNdSIEwaRENWDLzYuU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99576: f2fs: zone: fix to avoid bio split on sequential zone Date: Fri, 20 Nov 2026 06:49:22 +0100 Message-ID: <2026112017-CVE-2026-99576-2e07@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6055; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=z5VW9gtU8wra2w8dTDMc4rjqLcpWxFKJy6pcFzmdfmk=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/78fKTzab9SzoZ3pK47sZ7ae3nrpx0enuIbsJlmXhM 5Y9cWp72RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT0bdimMNxZ0WnzW/huafL rJ4l6cxZYf1JayrD/ArVLPYvpnr7jKpl9zg+ucD8xPD5FgA= 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: zone: fix to avoid bio split on sequential zone In the block layer, bio_split_to_limits() splits a bio if it exceeds any underlying queue limits: 1. queue_max_sectors: Splits bios larger than the transfer limit. This limit is set by the device driver/DMA controller (max_hw_sectors) and device-mapper targets. When flushing dirty pages (governed by VFS writeback_chunk_size() and f2fs nr_pages_to_skip()), f2fs merges contiguous pages into bios up to 512KB (1024 sectors) or more without checking queue_max_sectors, which will be split if the device or DM target enforces a smaller limit. 2. queue_max_segments: Splits bios exceeding scatter-gather segment limits. f2fs allocates bios with up to 256 pages, exceeding the 128-segment limit of DM targets (dm-default-key/dm-crypt) if pages are discontiguous. 3. chunk_sectors: Splits bios crossing chunk/zone boundaries. In f2fs, section_size strictly matches zone_size, and block allocation never spans across section boundaries, so bios never cross chunk_sectors. Crucially, when bio_split_to_limits() splits a bio, bio_submit_split() submits the tail half via submit_bio_noacct() before returning the head half to the caller. On a sequential zoned device, this causes the tail bio to arrive at the zone write plug before the head: dm-3: zone 7: prepare_bio wp mismatch: bio sector 30720 offset 2048 != wp_offset 248, len 248 The write plug rejects the out-of-order tail with BLK_STS_IOERR, causing f2fs_stop_checkpoint() and remounting the filesystem read-only: 2026-09-30T22:09:23.725678+08:00 localhost kernel: CPU: 9 UID: 0 PID: 243 Comm: kworker/9:1H Not tainted 6.12.81-gb3ef518fb26d #5 2026-09-30T22:09:23.725750+08:00 localhost kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014 2026-09-30T22:09:23.725753+08:00 localhost kernel: Workqueue: dm-3_zwplugs blk_zone_wplug_bio_work 2026-09-30T22:09:23.725756+08:00 localhost kernel: Call Trace: 2026-09-30T22:09:23.725758+08:00 localhost kernel: 2026-09-30T22:09:23.725758+08:00 localhost kernel: dump_stack_lvl+0x4d/0x70 2026-09-30T22:09:23.725759+08:00 localhost kernel: f2fs_stop_checkpoint+0x1df/0x5d0 2026-09-30T22:09:23.725759+08:00 localhost kernel: ? blk_zone_wplug_bio_work+0x4eb/0x740 2026-09-30T22:09:23.725760+08:00 localhost kernel: f2fs_cache_write_end_io+0x545/0x6e0 2026-09-30T22:09:23.725761+08:00 localhost kernel: blk_zone_wplug_bio_work+0x4eb/0x740 2026-09-30T22:09:23.725762+08:00 localhost kernel: process_one_work+0x5c6/0xde0 2026-09-30T22:09:23.725764+08:00 localhost kernel: ? assign_work+0x124/0x4e0 2026-09-30T22:09:23.725765+08:00 localhost kernel: worker_thread+0x403/0xb70 2026-09-30T22:09:23.725765+08:00 localhost kernel: ? __kthread_parkme+0x82/0x140 2026-09-30T22:09:23.725766+08:00 localhost kernel: ? __pfx_worker_thread+0x10/0x10 2026-09-30T22:09:23.725766+08:00 localhost kernel: kthread+0x235/0x2e0 2026-09-30T22:09:23.725767+08:00 localhost kernel: ? recalc_sigpending+0x128/0x1d0 2026-09-30T22:09:23.725767+08:00 localhost kernel: ? __pfx_kthread+0x10/0x10 2026-09-30T22:09:23.725769+08:00 localhost kernel: ret_from_fork+0x2f/0x70 2026-09-30T22:09:23.725769+08:00 localhost kernel: ? __pfx_kthread+0x10/0x10 2026-09-30T22:09:23.725770+08:00 localhost kernel: ret_from_fork_asm+0x1a/0x30 2026-09-30T22:09:23.725771+08:00 localhost kernel: 2026-09-30T22:09:23.725771+08:00 localhost kernel: F2FS-fs (dm-0): Stopped filesystem due to reason: 3 To prevent write bios destined for sequential zones from being split: 1. In __bio_alloc(), bound npages to bdev_max_segments(bdev) for writes to sequential zone areas. 2. In page_is_mergeable(), check queue_max_segments() and queue_max_sectors() for sequential zone areas, so f2fs will not merge beyond the queue limits. The Linux kernel CVE team has assigned CVE-2026-99576 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit 52763a4b7a2112743745c5bbfe43fe6f54d4b39a and fixed in 6.12.118 with commit e83a3ca9fb7c1f7e439d2c2e547897053342c1c6 Issue introduced in 4.8 with commit 52763a4b7a2112743745c5bbfe43fe6f54d4b39a and fixed in 6.18.64 with commit ec2e624b95cfda1c8b30e3a5b3ca9a55433da6c3 Issue introduced in 4.8 with commit 52763a4b7a2112743745c5bbfe43fe6f54d4b39a and fixed in 7.3.5 with commit c28481c073d4ca30c3c2ab6f1a65051cbe936220 Issue introduced in 4.8 with commit 52763a4b7a2112743745c5bbfe43fe6f54d4b39a and fixed in 7.4-rc1 with commit b9b036bd1e2cfbc189d5811d62d8711e216c40b3 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-99576 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/data.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/e83a3ca9fb7c1f7e439d2c2e547897053342c1c6 https://git.kernel.org/stable/c/ec2e624b95cfda1c8b30e3a5b3ca9a55433da6c3 https://git.kernel.org/stable/c/c28481c073d4ca30c3c2ab6f1a65051cbe936220 https://git.kernel.org/stable/c/b9b036bd1e2cfbc189d5811d62d8711e216c40b3