CVE-2022-50277: ext4: don't allow journal inode to have encrypt flag
In the Linux kernel, the following vulnerability has been resolved:
ext4: don't allow journal inode to have encrypt flag
Mounting a filesystem whose journal inode has the encrypt flag causes a
NULL dereference in fscrypt_limit_io_blocks() when the 'inlinecrypt'
mount option is used.
The problem is that when jbd2_journal_init_inode() calls bmap(), it
eventually finds its way into ext4_iomap_begin(), which calls
fscrypt_limit_io_blocks(). fscrypt_limit_io_blocks() requires that if
the inode is encrypted, then its encryption key must already be set up.
That's not the case here, since the journal inode is never "opened" like
a normal file would be. Hence the crash.
A reproducer is:
mkfs.ext4 -F /dev/vdb
debugfs -w /dev/vdb -R "set_inode_field <8> flags 0x80808"
mount /dev/vdb /mnt -o inlinecrypt
To fix this, make ext4 consider journal inodes with the encrypt flag to
be invalid. (Note, maybe other flags should be rejected on the journal
inode too. For now, this is just the minimal fix for the above issue.)
I've marked this as fixing the commit that introduced the call to
fscrypt_limit_io_blocks(), since that's what made an actual crash start
being possible. But this fix could be applied to any version of ext4
that supports the encrypt feature.
Security readout for executives and security teams
Plain-English summary
A malformed ext4 filesystem can crash a Linux kernel when mounted with inline encryption enabled. The issue is in how ext4 handles an invalid encrypted flag on its journal inode. Business impact is mainly availability: affected systems could panic or become unavailable if they mount a crafted filesystem.
Executive priority
Treat this as a targeted availability risk, not an internet-scale emergency based on current evidence. Prioritize patching systems that mount untrusted ext4 media or images, especially shared infrastructure, forensic workstations, virtualization hosts, and backup-processing systems.
Technical view
When ext4 mounts a filesystem with inlinecrypt, a journal inode incorrectly marked encrypted can reach fscrypt_limit_io_blocks() before an encryption key is set, causing a NULL dereference. The kernel fix treats journal inodes with the encrypt flag as invalid. Sources do not provide CVSS, CWE, or vendor severity.
Likely exposure
Exposure is most plausible on Linux systems that mount ext4 filesystems from removable, tenant-controlled, backup, forensic, or otherwise untrusted block devices while using inlinecrypt. Ordinary servers that never mount untrusted ext4 images are less exposed, though kernel version and storage workflow still matter.
Exploitation context
The source record includes a crash reproducer but does not cite active exploitation, and CISA KEV status is false in the provided bundle. Exploitation appears to require causing an affected system to mount a crafted ext4 filesystem with the relevant mount option.
Researcher notes
The bug is a kernel NULL dereference triggered by invalid ext4 metadata during journal inode initialization under inlinecrypt. The fix is narrowly scoped: reject encrypted journal inodes. Evidence is incomplete for severity scoring, exploit prevalence, and distribution-specific affected package ranges.
Mitigation direction
Update affected Linux kernels to vendor-supported builds containing the ext4 fix.
Check distribution advisories for backported fixes matching your kernel stream.
Avoid mounting untrusted ext4 filesystems on affected hosts until patched.
Restrict mount privileges and removable or tenant-controlled block device workflows.
Review inlinecrypt usage where ext4 filesystems may come from untrusted sources.
Validation and detection
Inventory Linux kernel versions on systems that mount ext4 filesystems.
Identify hosts using ext4 inlinecrypt or handling untrusted block devices.
Confirm vendor kernel packages include the referenced upstream stable fixes.
Review logs for mount failures or kernel crashes involving ext4 and fscrypt.
Validate remediation through standard patch compliance tooling, not crash reproduction.
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.
cve · low confidence lookup
CVE-2022-50277 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.
0CVSS vectors
3Timeline events
0ADP providers
4Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Sep 15, 2025, 14:21 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.