Linux Kernel F2FS Invalid Context Vulnerability in vm_unmap_ram() Call

Vulnerability

A vulnerability in the Linux kernel's F2FS (Flash-Friendly File System) has been addressed. The issue arose when F2FS was tested with xfstests using UFS-backed virtual disks. During these tests, the kernel occasionally reported that the function f2fs_release_decomp_mem() was calling vm_unmap_ram() from an invalid context. This was identified as a problem because it involved a sleeping function being executed while interrupts were disabled, which can lead to improper handling of asynchronous operations. The vulnerability was traced back to a commit that changed how F2FS handles decompression, and it was resolved by modifying the context check to ensure that the unmapping of memory pages could be done safely, without disrupting interrupt handling.

Impact

The vulnerability could lead to improper memory management in F2FS, potentially causing issues in how the file system handles data, especially under certain testing conditions with UFS-backed virtual disks.

Reproduction

The vulnerability can be reproduced by testing F2FS with xfstests while using UFS-backed virtual disks. This combination can trigger the kernel's warning about the invalid context, as the f2fs_release_decomp_mem() function attempts to call vm_unmap_ram() while interrupts are disabled, leading to a bug where a sleeping function is called from an invalid context.

Remediation

Users can update to the latest version of the Linux kernel where this vulnerability has been fixed. The specific commit that addresses this issue is available in the Linux kernel stable tree.

Added: Sep 7, 2025, 4:23 PM
Updated: Sep 7, 2025, 4:23 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
3.9
remediation
7.7
relevance
0.5
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.