Vulnerability · Published Sep 7, 2025 · Assigned by Linux
CVE-2025-39731f2fs: vm_unmap_ram() may be called from an invalid context
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 4% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: f2fs: vm_unmap_ram() may be called from an invalid context When testing F2FS with xfstests using UFS backed virtual disks the kernel complains sometimes that f2fs_release_decomp_mem() calls vm_unmap_ram() from an invalid context. Example trace from f2fs/007 test: f2fs/007 5s ... [12:59:38][ 8.902525] run fstests f2fs/007 [ 11.468026] BUG: sleeping function called from invalid context at mm/vmalloc.c:2978 [ 11.471849] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 68, name: irq/22-ufshcd [ 11.475357] preempt_count: 1, expected: 0 [ 11.476970] RCU nest depth: 0, expected: 0 [ 11.478531] CPU: 0 UID: 0 PID: 68 Comm: irq/22-ufshcd Tainted: G W 6.16.0-rc5-xfstests-ufs-g40f92e79b0aa #9 PREEMPT(none) [ 11.478535] Tainted: [W]=WARN [ 11.478536] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.478537] Call Trace: [ 11.478543] <TASK> [ 11.478545] dump_stack_lvl+0x4e/0x70 [ 11.478554] __might_resched.cold+0xaf/0xbe [ 11.478557] vm_unmap_ram+0x21/0xb0 [ 11.478560] f2fs_release_decomp_mem+0x59/0x80 [ 11.478563] f2fs_free_dic+0x18/0x1a0 [ 11.478565] f2fs_finish_read_bio+0xd7/0x290 [ 11.478570] blk_update_request+0xec/0x3b0 [ 11.478574] ? sbitmap_queue_clear+0x3b/0x60 [ 11.478576] scsi_end_request+0x27/0x1a0 [ 11.478582] scsi_io_completion+0x40/0x300 [ 11.478583] ufshcd_mcq_poll_cqe_lock+0xa3/0xe0 [ 11.478588] ufshcd_sl_intr+0x194/0x1f0 [ 11.478592] ufshcd_threaded_intr+0x68/0xb0 [ 11.478594] ? __pfx_irq_thread_fn+0x10/0x10 [ 11.478599] irq_thread_fn+0x20/0x60 [ 11.478602] ? __pfx_irq_thread_fn+0x10/0x10 [ 11.478603] irq_thread+0xb9/0x180 [ 11.478605] ? __pfx_irq_thread_dtor+0x10/0x10 [ 11.478607] ? __pfx_irq_thread+0x10/0x10 [ 11.478609] kthread+0x10a/0x230 [ 11.478614] ? __pfx_kthread+0x10/0x10 [ 11.478615] ret_from_fork+0x7e/0xd0 [ 11.478619] ? __pfx_kthread+0x10/0x10 [ 11.478621] ret_from_fork_asm+0x1a/0x30 [ 11.478623] </TASK> This patch modifies in_task() check inside f2fs_read_end_io() to also check if interrupts are disabled. This ensures that pages are unmapped asynchronously in an interrupt handler.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.148-1 | DEBIAN-CVE-2025-39731 |
| Debian:13 | linux | 6.12.43-1 | DEBIAN-CVE-2025-39731 |
| Debian:14 | linux | 6.16.3-1 | DEBIAN-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux | 6.8.0-100.100 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1046.49 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | 6.14.0-1017.17~24.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1046.49~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1046.52 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | 6.14.0-1017.17~24.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1051.57~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1046.53 | UBUNTU-CVE-2025-39731 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1046.53~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1047.50 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | 6.14.0-1020.21~24.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1047.50~22.04.2 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1043.48 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1030.33 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-100.100~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1044.44 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1044.44~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-100.100.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-100.100.1~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1046.49 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1046.49~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1046.49.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1020.20 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | 6.14.0-1016.16 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1043.44 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | 6.14.0-1017.17~24.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1043.44~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1047.51 | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | 6.14.0-36.36.1~24.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-100.100~22.04.1 | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-39731 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1023.24 | UBUNTU-CVE-2025-39731 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | bff139b49d9f70c1ac5384aac94554846aa834de – before eb69e69a5ae6c8350957893b5f68bd55b1565fb2bff139b49d9f70c1ac5384aac94554846aa834de – before 1023836d1b9465593c8746f97d608da32958785fbff139b49d9f70c1ac5384aac94554846aa834de – before 0fe7976b62546f1e95eebfe9879925e9aa22b7a8bff139b49d9f70c1ac5384aac94554846aa834de – before 411e00f44e2e1a7fdb526013b25a7f0ed22a0947bff139b49d9f70c1ac5384aac94554846aa834de – before 18eea36f4f460ead3750ed4afe5496f7ce55f99ebff139b49d9f70c1ac5384aac94554846aa834de – before 08a7efc5b02a0620ae16aa9584060e980a69cb55 |
| Linux | Linux | 6.0 |
References
- https://git.kernel.org/stable/c/eb69e69a5ae6c8350957893b5f68bd55b1565fb2
- https://git.kernel.org/stable/c/1023836d1b9465593c8746f97d608da32958785f
- https://git.kernel.org/stable/c/0fe7976b62546f1e95eebfe9879925e9aa22b7a8
- https://git.kernel.org/stable/c/411e00f44e2e1a7fdb526013b25a7f0ed22a0947
- https://git.kernel.org/stable/c/18eea36f4f460ead3750ed4afe5496f7ce55f99e
- https://git.kernel.org/stable/c/08a7efc5b02a0620ae16aa9584060e980a69cb55
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html