CVE-2022-50367
Linux Kernel vulnerability analysis and mitigation

Overview

In the Linux kernel, a vulnerability (CVE-2022-50367) has been identified related to a Use-After-Free (UAF) and General Protection Fault (GPF) bug in the nilfsmdtdestroy function. The issue occurs when inodeinitalways() returns -ENOMEM if securityinodealloc() fails, leaving inode->iprivate uninitialized. This causes nilfsismetadatafileinode() to return true, leading nilfsfreeinode() to incorrectly call nilfsmdtdestroy(), which frees the uninitialized inode->iprivate and results in crashes (NVD).

Technical details

The vulnerability stems from a sequence of events in the Linux kernel's filesystem code. When inodeinitalways() fails with -ENOMEM during securityinodealloc(), it leaves the inode->iprivate pointer uninitialized. Subsequently, nilfsismetadatafileinode() incorrectly returns true for this uninitialized state, triggering nilfsfreeinode() to call nilfsmdtdestroy(). This function then attempts to free the uninitialized inode->iprivate pointer, resulting in UAF/GPF crashes. The fix involves relocating the securityinodealloc call to just before thiscpuinc(nr_inodes) (NVD).

Impact

The vulnerability can lead to system crashes through Use-After-Free (UAF) and General Protection Fault (GPF) conditions when handling certain filesystem operations. This affects the stability and reliability of systems using the affected Linux kernel versions (NVD).

Mitigation and workarounds

The vulnerability has been patched by moving the securityinodealloc call to execute just prior to thiscpuinc(nr_inodes), ensuring proper initialization sequence. Users should update to patched kernel versions that include this fix (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-40205HIGH7.8
  • Linux KernelLinux Kernel
  • linux-hwe-6.14
NoYesNov 12, 2025
CVE-2025-40211HIGH7.1
  • Linux KernelLinux Kernel
  • linux-azure-fde-6.14
NoYesNov 21, 2025
CVE-2025-40206MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel
NoYesNov 12, 2025
CVE-2025-40210MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-tools-libs-devel
NoYesNov 21, 2025
CVE-2025-40212N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k
NoYesNov 24, 2025

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