CVE-2022-50089
BaseFortify
Publication date: 2025-06-18
Last updated on: 2025-11-18
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-NVD-CWE-noinfo |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in the Linux kernel's btrfs filesystem involves a failure in the cow_file_range() function where pages remain locked if an error occurs during allocation. Specifically, when cow_file_range() fails partway through allocating a region, it can leave some pages locked, causing tasks to hang. The issue happens because the function does not unlock pages on error when called with unlock=0, leading to hung tasks on zoned btrfs devices. The fix ensures that pages are properly unlocked on error to prevent such hangs.
How can this vulnerability impact me? :
This vulnerability can cause processes to become blocked or hung for extended periods when using the btrfs filesystem on zoned devices. This can lead to system instability or degraded performance due to tasks waiting indefinitely for locked pages to be released, potentially impacting applications relying on btrfs for storage.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by observing hung tasks related to btrfs on zoned devices. Specifically, kernel logs may show hung_task reports indicating tasks blocked for extended periods, such as the example with the 'rocksdb:high0' task blocked for more than 241 seconds. You can check for such hung tasks by examining the kernel log with commands like 'dmesg | grep hung_task' or monitoring /proc/sys/kernel/hung_task_timeout_secs settings. Additionally, reproducing the issue might involve running fstests generic/551 on a zoned null_blk device in emulated zoned mode to observe similar hangs.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation includes updating the Linux kernel to a version where the btrfs cow_file_range() function properly unlocks pages on failure, preventing hung tasks. As a temporary workaround, you can disable hung task timeout messages by running 'echo 0 > /proc/sys/kernel/hung_task_timeout_secs' to suppress hung task reports, but this does not fix the underlying issue. Ultimately, applying the patch that ensures pages are unlocked on cow_file_range() failure is necessary to resolve the problem.