CVE-2022-50277

MEDIUM EPSS 0.7%
Published Sep 15, 20259mo ago · Modified Jun 17, 20261w ago
5.5 CVSS 3.1
Medium
Find Similar
Published Sep 15, 2025 9mo ago
Last Modified Jun 17, 2026 1w ago

Description

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.

CVSS Details

Base Score
5.5
Exploitability
1.8
Impact
3.6
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Attack Vector Local
Attack Complexity Low
Privileges Required Low
User Interaction None
Scope Unchanged
Confidentiality None
Integrity None
Availability High

Threat Intelligence

EPSS Exploit Probability
0.7% percentile
Exploit & Patch Status
No Known Exploit
Patch Available

Weaknesses 1

CWE-476 NULL Pointer Dereference Memory Safety

Affected Products 2

VendorProductVersionRange
linuxlinux_kernel*≥5.18  –  <6.0.18
linuxlinux_kernel*≥6.1  –  <6.1.4

References 3

  • git.kernel.org https://git.kernel.org/stable/c/105c78e12468413e426625831faa7db4284e1fec
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/1f7a6626f611aa06d7907aa45b484708dd5ac8bc
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/bcc5057e1781a3ee889225480d995c3b5cbde555
    Patch

Remediation

  • git.kernel.org https://git.kernel.org/stable/c/105c78e12468413e426625831faa7db4284e1fec
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/1f7a6626f611aa06d7907aa45b484708dd5ac8bc
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/bcc5057e1781a3ee889225480d995c3b5cbde555
    Patch