Description
In the Linux kernel, the following vulnerability has been resolved:

ext4: don't enable DAX on new encrypted files

Currently, when a new encrypted regular file is created, the call to
ext4_set_inode_flags(inode, init=true) in __ext4_new_inode() is made
before EXT4_INODE_ENCRYPT is set. As a result, it can set S_DAX if the
filesystem is mounted with "-o dax=always".

EXT4_INODE_ENCRYPT then actually gets set a bit later in
__ext4_new_inode(), when it calls fscrypt_set_context() which calls
ext4_set_context(). ext4_set_context() sets EXT4_INODE_ENCRYPT and
calls ext4_set_inode_flags(inode, init=false) to set S_ENCRYPTED too.

This was intended to clear S_DAX as well. However, this was broken by
commit 043546e46dc7 ("fs/ext4: Only change S_DAX on inode load"). This
causes data written to the file to bypass encryption, also causing
xfstests failures such as generic/548 (when "-o dax=always" is used).

Fix this by simplifying the flow by making __ext4_new_inode() set
EXT4_INODE_ENCRYPT earlier. This makes it take effect in
ext4_set_inode_flags(inode, init=true), making S_DAX never be set.

Similarly, make EXT4_STATE_MAY_INLINE_DATA never be set in the first
place on new encrypted inodes. Then it doesn't need to be cleared.

As a result of these simplifications, ext4_set_context() no longer needs
to change inode flags or state when 'handle != NULL'. Remove that too.
Published: 2026-09-04
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In ext4, newer encrypted files created while the filesystem is mounted with "-o dax=always" can have the S_DAX flag incorrectly set because the encryption flag EXT4_INODE_ENCRYPT is not applied early enough. When that flag is set, data written to the file bypasses the encryption layer, causing sensitive content to be stored in cleartext. This flaw allows any entity that can write to an encrypted ext4 filesystem to store and retrieve data without encryption, thereby leaking confidentiality.

Affected Systems

The vulnerability affects Linux kernels that use the ext4 filesystem with support for file encryption and the DAX feature. No specific kernel versions are listed in the advisory; it applies to all builds where these features coexist and a user can create a new file while the mount option "-o dax=always" is active.

Risk and Exploitability

The CVSS score is not disclosed, and EPSS is not available, but the flaw has a high potential impact on confidentiality. Exploitation requires local write access to a filesystem that is both encrypted and mounted with DAX forced. No remote or credential‑less attack path is described, and the vulnerability is not currently listed in the CISA KEV catalog.

Generated by OpenCVE AI on September 4, 2026 at 17:33 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the patch which sets EXT4_INODE_ENCRYPT before enabling DAX during inode creation.
  • If a kernel update is not immediately possible, mount ext4 filesystems without the "-o dax=always" option for encrypted data or disable DAX for those mounts through mount options or kernel parameters.
  • Verify that encrypted files no longer contain cleartext by running encrypted filesystem tests or inspecting data written to disk under the affected conditions.

Generated by OpenCVE AI on September 4, 2026 at 17:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 18:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-665

Fri, 04 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ext4: don't enable DAX on new encrypted files Currently, when a new encrypted regular file is created, the call to ext4_set_inode_flags(inode, init=true) in __ext4_new_inode() is made before EXT4_INODE_ENCRYPT is set. As a result, it can set S_DAX if the filesystem is mounted with "-o dax=always". EXT4_INODE_ENCRYPT then actually gets set a bit later in __ext4_new_inode(), when it calls fscrypt_set_context() which calls ext4_set_context(). ext4_set_context() sets EXT4_INODE_ENCRYPT and calls ext4_set_inode_flags(inode, init=false) to set S_ENCRYPTED too. This was intended to clear S_DAX as well. However, this was broken by commit 043546e46dc7 ("fs/ext4: Only change S_DAX on inode load"). This causes data written to the file to bypass encryption, also causing xfstests failures such as generic/548 (when "-o dax=always" is used). Fix this by simplifying the flow by making __ext4_new_inode() set EXT4_INODE_ENCRYPT earlier. This makes it take effect in ext4_set_inode_flags(inode, init=true), making S_DAX never be set. Similarly, make EXT4_STATE_MAY_INLINE_DATA never be set in the first place on new encrypted inodes. Then it doesn't need to be cleared. As a result of these simplifications, ext4_set_context() no longer needs to change inode flags or state when 'handle != NULL'. Remove that too.
Title ext4: don't enable DAX on new encrypted files
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-04T15:13:20.282Z

Reserved: 2026-08-26T14:34:25.794Z

Link: CVE-2026-80806

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T16:18:07.647

Modified: 2026-09-04T16:18:07.647

Link: CVE-2026-80806

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T20:15:14Z

Weaknesses