# CVE-2023-53270: ext4: fix i_disksize exceeding i_size problem in paritally written case

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-09-16T08:06:59.730Z
- Modified: 2026-06-17T06:44:41.770Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

ext4: fix i_disksize exceeding i_size problem in paritally written case

It is possible for i_disksize can exceed i_size, triggering a warning.

generic_perform_write
 copied = iov_iter_copy_from_user_atomic(len) // copied < len
 ext4_da_write_end
 | ext4_update_i_disksize
 |  new_i_size = pos + copied;
 |  WRITE_ONCE(EXT4_I(inode)->i_disksize, newsize) // update i_disksize
 | generic_write_end
 |  copied = block_write_end(copied, len) // copied = 0
 |   if (unlikely(copied < len))
 |    if (!PageUptodate(page))
 |     copied = 0;
 |  if (pos + copied > inode->i_size) // return false
 if (unlikely(copied == 0))
  goto again;
 if (unlikely(iov_iter_fault_in_readable(i, bytes))) {
  status = -EFAULT;
  break;
 }

We get i_disksize greater than i_size here, which could trigger WARNING
check 'i_size_read(inode) < EXT4_I(inode)->i_disksize' while doing dio:

ext4_dio_write_iter
 iomap_dio_rw
  __iomap_dio_rw // return err, length is not aligned to 512
 ext4_handle_inode_extension
  WARN_ON_ONCE(i_size_read(inode) < EXT4_I(inode)->i_disksize) // Oops

 WARNING: CPU: 2 PID: 2609 at fs/ext4/file.c:319
 CPU: 2 PID: 2609 Comm: aa Not tainted 6.3.0-rc2
 RIP: 0010:ext4_file_write_iter+0xbc7
 Call Trace:
  vfs_write+0x3b1
  ksys_write+0x77
  do_syscall_64+0x39

Fix it by updating 'copied' value before updating i_disksize just like
ext4_write_inline_data_end() does.

A reproducer can be found in the buganizer link below.

(As written by CVE List.)

## Affected

- Linux Linux: from 64769240bd07f446f83660bb143bb609d8ab4910 before 18eb23891aeae3229baf8c7c23b76be3364e1967; from 64769240bd07f446f83660bb143bb609d8ab4910 before d30090eb546d993ea3f3023452540c476ea614a5; from 64769240bd07f446f83660bb143bb609d8ab4910 before 3ecea2fee14227712694c8b54ad99d471e61de92; from 64769240bd07f446f83660bb143bb609d8ab4910 before 53877ed201baa6b58f7ce9df92664a839113c30e; from 64769240bd07f446f83660bb143bb609d8ab4910 before 1dedde690303c05ef732b7c5c8356fdf60a4ade3; 2.6.27 (not affected: before 2.6.27; from 5.15.111 up to 5.15.*; from 6.1.28 up to 6.1.*; from 6.2.15 up to 6.2.*; from 6.3.2 up to 6.3.*; from 6.4 up to *)
- linux linux_kernel: from 2.6.27 before 5.15.111; from 5.16 before 6.1.28; from 6.2 before 6.2.15; from 6.3 before 6.3.2

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/18eb23891aeae3229baf8c7c23b76be3364e1967> (patch)
- <https://git.kernel.org/stable/c/d30090eb546d993ea3f3023452540c476ea614a5> (patch)
- <https://git.kernel.org/stable/c/3ecea2fee14227712694c8b54ad99d471e61de92> (patch)
- <https://git.kernel.org/stable/c/53877ed201baa6b58f7ce9df92664a839113c30e> (patch)
- <https://git.kernel.org/stable/c/1dedde690303c05ef732b7c5c8356fdf60a4ade3> (patch)

## Sources

- CVE List: [CVE-2023-53270](https://www.cve.org/CVERecord?id=CVE-2023-53270), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-53270](https://nvd.nist.gov/vuln/detail/CVE-2023-53270), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-53270 · Whole record: https://cve.day/CVE-2023-53270.json · Rebuilt by cve.day 2026-11-25T22:58:34.805Z
