CVE-2023-53323: ext2/dax: Fix ext2_setsize when len is page aligned
In the Linux kernel, the following vulnerability has been resolved:
ext2/dax: Fix ext2_setsize when len is page aligned
PAGE_ALIGN(x) macro gives the next highest value which is multiple of
pagesize. But if x is already page aligned then it simply returns x.
So, if x passed is 0 in dax_zero_range() function, that means the
length gets passed as 0 to ->iomap_begin().
In ext2 it then calls ext2_get_blocks -> max_blocks as 0 and hits bug_on
here in ext2_get_blocks().
BUG_ON(maxblocks == 0);
Instead we should be calling dax_truncate_page() here which takes
care of it. i.e. it only calls dax_zero_range if the offset is not
page/block aligned.
This can be easily triggered with following on fsdax mounted pmem
device.
dd if=/dev/zero of=file count=1 bs=512
truncate -s 0 file
[79.525838] EXT2-fs (pmem0): DAX enabled. Warning: EXPERIMENTAL, use at your own risk
[79.529376] ext2 filesystem being mounted at /mnt1/test supports timestamps until 2038 (0x7fffffff)
[93.793207] ------------[ cut here ]------------
[93.795102] kernel BUG at fs/ext2/inode.c:637!
[93.796904] invalid opcode: 0000 [#1] PREEMPT SMP PTI
[93.798659] CPU: 0 PID: 1192 Comm: truncate Not tainted 6.3.0-rc2-xfstests-00056-g131086faa369 #139
[93.806459] RIP: 0010:ext2_get_blocks.constprop.0+0x524/0x610
<...>
[93.835298] Call Trace:
[93.836253] <TASK>
[93.837103] ? lock_acquire+0xf8/0x110
[93.838479] ? d_lookup+0x69/0xd0
[93.839779] ext2_iomap_begin+0xa7/0x1c0
[93.841154] iomap_iter+0xc7/0x150
[93.842425] dax_zero_range+0x6e/0xa0
[93.843813] ext2_setsize+0x176/0x1b0
[93.845164] ext2_setattr+0x151/0x200
[93.846467] notify_change+0x341/0x4e0
[93.847805] ? lock_acquire+0xf8/0x110
[93.849143] ? do_truncate+0x74/0xe0
[93.850452] ? do_truncate+0x84/0xe0
[93.851739] do_truncate+0x84/0xe0
[93.852974] do_sys_ftruncate+0x2b4/0x2f0
[93.854404] do_syscall_64+0x3f/0x90
[93.855789] entry_SYSCALL_64_after_hwframe+0x72/0xdc
Security readout for executives and security teams
Plain-English summary
This is a local denial-of-service flaw in the Linux kernel’s ext2 DAX handling. On systems using ext2 with DAX on persistent memory, a local user can trigger a kernel BUG during file resizing, potentially crashing the host or disrupting workloads.
Executive priority
Treat as a targeted availability risk, not a broad internet-facing emergency. Patch in normal kernel maintenance cycles, but accelerate for infrastructure using persistent memory with ext2 DAX because a local user can crash affected systems.
Technical view
When ext2_setsize handles a page-aligned truncate path under DAX, it can pass length zero into dax_zero_range and iomap. ext2_get_blocks then receives maxblocks zero and hits BUG_ON(maxblocks == 0), causing a kernel failure. The fix changes the truncation path to use dax_truncate_page behavior.
Likely exposure
Exposure appears narrow: Linux systems using ext2 with DAX enabled on fsdax-mounted persistent memory. General Linux hosts not using ext2 DAX are unlikely to be affected based on the provided sources.
Exploitation context
The CVSS vector is local, low complexity, and requires low privileges. The CVE is not listed as KEV, and the provided sources do not show active exploitation. Impact is availability only, rated high for availability.
Researcher notes
The source bundle provides a clear root cause, call trace, CVSS 5.5 vector, and upstream stable commit references. It does not provide distribution package mappings, real-world exploitation evidence, or affected non-Linux products.
Mitigation direction
Apply a vendor kernel update containing the referenced stable fixes.
Prioritize systems using ext2 DAX on persistent memory.
Avoid ext2 DAX on fsdax devices until patched where operationally feasible.
Check Linux distribution advisories for backported fix status.
Do not deploy directly from upstream commits without normal vendor validation.
Validation and detection
Inventory hosts using ext2 filesystems with DAX enabled.
Identify persistent memory or fsdax-backed mounts.
Compare running kernel packages against vendor advisories for CVE-2023-53323.
Confirm patched kernels include the referenced ext2 DAX fix commits.
Review crash logs for ext2_get_blocks BUG_ON availability events.
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.
cwe · low confidence lookup
CWE-617: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
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.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-617 · source CWE mapping
Reachable Assertion
Reachable Assertion represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.