CVE-2023-53270
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-16

Last updated on: 2025-12-03

Assigner: kernel.org

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-16
Last Modified
2025-12-03
Generated
2026-05-07
AI Q&A
2025-09-16
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 4 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 2.6.27 (inc) to 5.15.111 (exc)
linux linux_kernel From 5.16 (inc) to 6.1.28 (exc)
linux linux_kernel From 6.2 (inc) to 6.2.15 (exc)
linux linux_kernel From 6.3 (inc) to 6.3.2 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-NVD-CWE-noinfo
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability in the Linux kernel's ext4 filesystem involves a discrepancy where the internal variable i_disksize can become larger than i_size during certain write operations. This mismatch can trigger warnings and potentially lead to unexpected behavior or kernel warnings (WARN_ON_ONCE) during direct I/O writes. The issue arises because the i_disksize is updated before the actual number of bytes copied is finalized, causing the inconsistency. The fix involves updating the copied value correctly before updating i_disksize to prevent this condition.


How can this vulnerability impact me? :

The impact of this vulnerability is primarily related to stability and reliability of the ext4 filesystem during write operations. It can cause kernel warnings and potentially lead to unexpected behavior or crashes in the filesystem code when i_disksize exceeds i_size. This could affect system stability or data integrity during certain write scenarios, especially with direct I/O. However, no direct security impact such as privilege escalation or data leakage is described.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability is fixed in the Linux kernel by updating the 'copied' value before updating i_disksize, preventing i_disksize from exceeding i_size and triggering warnings. To mitigate this vulnerability, you should update your Linux kernel to a version that includes this fix (e.g., version 6.3.0-rc2 or later where the patch is applied).


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart