CVE-2022-50277: ext4: don't allow journal inode to have encrypt flag

Published Sep 15, 2025
·
Updated

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 fscryptlimitioblocks() when the 'inlinecrypt' mount option is used.

The problem is that when jbd2journalinitinode() calls bmap(), it eventually finds its way into ext4iomapbegin(), which calls fscryptlimitioblocks(). fscryptlimitioblocks() 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 "setinodefield <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 fscryptlimitioblocks(), 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.

Affected Software

3 affected components
Linux Linux kernel
Linux Linux kernel>=5.18<6.0.18
Linux Linux kernel>=6.1<6.1.4

Event History

Sep 15, 2025
CVE Published
via MITRE·02:21 PM
Data Sourced
via MITRE·02:21 PM
Description
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-50277?

CVE-2022-50277 has been classified as a high-severity vulnerability due to its potential to cause system crashes.

2

How do I fix CVE-2022-50277?

To fix CVE-2022-50277, update your Linux kernel to version 6.0.18 or later, or 6.1.4 or later.

3

What impact does CVE-2022-50277 have on systems?

CVE-2022-50277 can lead to a NULL dereference and system crash when mounting filesystems with an encrypted journal inode.

4

Which versions of the Linux kernel are affected by CVE-2022-50277?

CVE-2022-50277 affects Linux kernel versions between 5.18 and 6.0.18, and 6.1 and 6.1.4.

5

Is CVE-2022-50277 remotely exploitable?

CVE-2022-50277 can potentially be exploited locally by a user with the ability to mount filesystems.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203