CVE-2023-53270
ext4: fix i_disksize exceeding i_size problem in paritally written case
Check your servers for CVE-2023-53270
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-53270 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.05% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 14 Jan 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 64769240bd07f446f83660bb143bb609d8ab4910, before 18eb23891aeae3229baf8c7c23b76be3364e1967 affected from 64769240bd07f446f83660bb143bb609d8ab4910, before d30090eb546d993ea3f3023452540c476ea614a5 affected from 64769240bd07f446f83660bb143bb609d8ab4910, before 3ecea2fee14227712694c8b54ad99d471e61de92 affected from 64769240bd07f446f83660bb143bb609d8ab4910, before 53877ed201baa6b58f7ce9df92664a839113c30e affected from 64769240bd07f446f83660bb143bb609d8ab4910, before 1dedde690303c05ef732b7c5c8356fdf60a4ade3
Other versions: unaffected
|
| Linux |
affected 2.6.27 unaffected before 2.6.27 unaffected from 5.15.111 up to and including 5.15.* unaffected from 6.1.28 up to and including 6.1.* unaffected from 6.2.15 up to and including 6.2.* unaffected from 6.3.2 up to and including 6.3.* unaffected 6.4 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-53270 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-53270
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-53270
trivy image --scanners vuln IMAGE | grep CVE-2023-53270
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/18eb23891aeae3229baf8c7c23b76be3364e1967 git.kernel.org
- https://git.kernel.org/stable/c/d30090eb546d993ea3f3023452540c476ea614a5 git.kernel.org
- https://git.kernel.org/stable/c/3ecea2fee14227712694c8b54ad99d471e61de92 git.kernel.org
- https://git.kernel.org/stable/c/53877ed201baa6b58f7ce9df92664a839113c30e git.kernel.org
- https://git.kernel.org/stable/c/1dedde690303c05ef732b7c5c8356fdf60a4ade3 git.kernel.org
Source: the record CVE-2023-53270 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse