LiveActive security incident?Get immediate response
CVE Record

CVE-2022-49850: nilfs2: fix deadlock in nilfs_count_free_blocks()

In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix deadlock in nilfs_count_free_blocks() A semaphore deadlock can occur if nilfs_get_block() detects metadata corruption while locating data blocks and a superblock writeback occurs at the same time: task 1 task 2 ------ ------ * A file operation * nilfs_truncate() nilfs_get_block() down_read(rwsem A) <-- nilfs_bmap_lookup_contig() ... generic_shutdown_super() nilfs_put_super() * Prepare to write superblock * down_write(rwsem B) <-- nilfs_cleanup_super() * Detect b-tree corruption * nilfs_set_log_cursor() nilfs_bmap_convert_error() nilfs_count_free_blocks() __nilfs_error() down_read(rwsem A) <-- nilfs_set_error() down_write(rwsem B) <-- *** DEADLOCK *** Here, nilfs_get_block() readlocks rwsem A (= NILFS_MDT(dat_inode)->mi_sem) and then calls nilfs_bmap_lookup_contig(), but if it fails due to metadata corruption, __nilfs_error() is called from nilfs_bmap_convert_error() inside the lock section. Since __nilfs_error() calls nilfs_set_error() unless the filesystem is read-only and nilfs_set_error() attempts to writelock rwsem B (= nilfs->ns_sem) to write back superblock exclusively, hierarchical lock acquisition occurs in the order rwsem A -> rwsem B. Now, if another task starts updating the superblock, it may writelock rwsem B during the lock sequence above, and can deadlock trying to readlock rwsem A in nilfs_count_free_blocks(). However, there is actually no need to take rwsem A in nilfs_count_free_blocks() because it, within the lock section, only reads a single integer data on a shared struct with nilfs_sufile_get_ncleansegs(). This has been the case after commit aa474a220180 ("nilfs2: add local variable to cache the number of clean segments"), that is, even before this bug was introduced. So, this resolves the deadlock problem by just not taking the semaphore in nilfs_count_free_blocks().

MediumCVSS 5.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This CVE is a Linux kernel NILFS2 filesystem deadlock. A local user or local workload interacting with a corrupted NILFS2 filesystem can trigger a kernel lockup condition affecting availability. It is not described as data theft or privilege escalation.

Executive priority

Treat as a targeted availability risk, not a broad remote compromise. Patch affected Linux systems during normal kernel maintenance, with higher priority for shared servers or systems that process NILFS2 media from less trusted sources.

Technical view

nilfs2 can deadlock when nilfs_get_block() detects metadata corruption while superblock writeback is occurring. The lock order between NILFS_MDT(dat_inode)->mi_sem and nilfs->ns_sem can invert. The fix removes an unnecessary semaphore acquisition in nilfs_count_free_blocks().

Likely exposure

Exposure is likely limited to Linux systems using NILFS2 on affected kernel versions or affected downstream builds. Systems that do not enable, mount, or process NILFS2 filesystems are unlikely to be exposed based on the provided sources.

Exploitation context

The CVSS vector is local, low complexity, low privileges, no user interaction, and high availability impact. The source bundle does not indicate KEV listing or active exploitation. The trigger requires NILFS2 metadata corruption and concurrent superblock writeback conditions.

Researcher notes

The affected record lists Linux kernel versions and multiple stable commit references, but downstream distribution status is not included. Do not assume all Linux systems are affected; validate NILFS2 usage and vendor kernel backports.

Mitigation direction

  • Inventory systems that mount or process NILFS2 filesystems.
  • Apply the relevant Linux stable or distribution kernel update containing the referenced fix.
  • Prioritize hosts where local users can access NILFS2 volumes.
  • Avoid mounting untrusted NILFS2 media until vendor guidance is applied.
  • Check Linux distribution advisories for packaged kernel availability.

Validation and detection

  • Confirm whether NILFS2 is enabled or mounted on Linux assets.
  • Compare running kernel builds against vendor advisories and fixed stable commits.
  • Review crash, hang, or filesystem error logs involving nilfs2.
  • Verify patched kernels include the nilfs_count_free_blocks() semaphore change.
Prepared
Confidence
high
Sources
10

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-667: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-49850 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
9Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.5CVSS 3.1MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H1.83.6CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

5.5Medium
CVSS 3.1 vector shape for CVE-2022-49850Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxe828949e5b42bfd234ee537cdb7c5e3a577958a3, e828949e5b42bfd234ee537cdb7c5e3a577958a3, e828949e5b42bfd234ee537cdb7c5e3a577958a3, e828949e5b42bfd234ee537cdb7c5e3a577958a3, e828949e5b42bfd234ee537cdb7c5e3a577958a3, e828949e5b42bfd234ee537cdb7c5e3a577958a3, e828949e5b42bfd234ee537cdb7c5e3a577958a3, e828949e5b42bfd234ee537cdb7c5e3a577958a3unaffected
LinuxLinux2.6.38, 0, 4.9.334, 4.14.300, 4.19.267, 5.4.225, 5.10.155, 5.15.79, 6.0.9, 6.1affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-667 · source CWE mapping

Improper Locking

Improper Locking represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.