CVE-2022-49850
Linux Kernel vulnerability analysis and mitigation

Overview

A semaphore deadlock vulnerability was discovered in the Linux kernel's NILFS2 filesystem implementation, specifically in the nilfs_count_free_blocks() function. The vulnerability was assigned CVE-2022-49850 and disclosed on May 1, 2025. The issue affects Linux kernel versions from 4.15 up to (excluding) 4.19.267, from 4.20 up to (excluding) 5.4.225, and various 6.1 release candidates (NVD).

Technical details

The deadlock occurs when nilfs_get_block() detects metadata corruption while locating data blocks and a superblock writeback occurs simultaneously. The issue involves a hierarchical lock acquisition where nilfs_get_block() readlocks rwsem A (NILFS_MDT(dat_inode)->mi_sem) and calls nilfs_bmap_lookup_contig(). If this fails due to metadata corruption, __nilfs_error() is called from nilfs_bmap_convert_error() inside the lock section. The vulnerability has been assigned a CVSS v3.1 Base Score of 5.5 (MEDIUM) with vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (NVD, Wiz).

Impact

When another task starts updating the superblock, it may writelock rwsem B during the lock sequence, and can deadlock trying to readlock rwsem A in nilfs_count_free_blocks(). This creates a potential system hang condition that affects the stability and availability of systems using the NILFS2 filesystem (Wiz).

Mitigation and workarounds

The vulnerability has been fixed by removing the unnecessary semaphore in nilfs_count_free_blocks(). This was possible because within the lock section, it only reads a single integer data on a shared struct with nilfs_sufile_get_ncleansegs(). This behavior has been in place since commit aa474a220180 ('nilfs2: add local variable to cache the number of clean segments'), which predates the introduction of this bug (NVD).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-68753HIGH7.8
  • Linux KernelLinux Kernel
  • linux-realtime
NoYesJan 05, 2026
CVE-2025-68756HIGH7.1
  • Linux KernelLinux Kernel
  • linux-oracle
NoYesJan 05, 2026
CVE-2025-68764MEDIUM5.5
  • Linux KernelLinux Kernel
  • linux-realtime
NoYesJan 05, 2026
CVE-2025-68758MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-core
NoYesJan 05, 2026
CVE-2025-68762N/AN/A
  • Linux KernelLinux Kernel
  • kernel
NoYesJan 05, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management