CVE-2026-139014: f2fs: drop pending discard commands before reserving device alias
f2fs: drop pending discard commands before reserving device alias
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1 - Compensating control
In f2fs_ioc_reserve_dev_alias(), before f2fs_reserve_device_alias(), call f2fs_drop_discard_cmd_range() to traverse the discard rbtree, drop pending D_PREP discard commands for the target range, and wait for in-flight discard bios under dcc->cmd_lock.
Event History
Frequently Asked Questions
What conditions are required to trigger the kernel BUG?
The system must use F2FS and reserve a device alias for a device range that was previously released. Stale pending D_PREP discard commands must still cover that range when the alias reservation marks its blocks valid in SIT.
What is the impact if the vulnerable path is reached?
When the discard thread later processes the stale commands, its consistency check finds valid blocks in the discard range and triggers a kernel BUG(). This can cause a kernel crash.
How does the fix prevent the issue?
Before reserving the device alias, the fix removes pending D_PREP discard commands for the affected range and waits for in-flight discard bios while holding the discard-command lock. The alias reservation then cannot leave stale discard work targeting blocks newly marked valid.