CVE-2023-53270 (GCVE-0-2023-53270)
Vulnerability from cvelistv5
Published
2025-09-16 08:06
Modified
2025-09-16 08:06
Severity ?
Summary
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.
Impacted products
Vendor Product Version
Linux Linux Version: 64769240bd07f446f83660bb143bb609d8ab4910
Version: 64769240bd07f446f83660bb143bb609d8ab4910
Version: 64769240bd07f446f83660bb143bb609d8ab4910
Version: 64769240bd07f446f83660bb143bb609d8ab4910
Version: 64769240bd07f446f83660bb143bb609d8ab4910
Create a notification for this product.
   Linux Linux Version: 2.6.27
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "18eb23891aeae3229baf8c7c23b76be3364e1967",
              "status": "affected",
              "version": "64769240bd07f446f83660bb143bb609d8ab4910",
              "versionType": "git"
            },
            {
              "lessThan": "d30090eb546d993ea3f3023452540c476ea614a5",
              "status": "affected",
              "version": "64769240bd07f446f83660bb143bb609d8ab4910",
              "versionType": "git"
            },
            {
              "lessThan": "3ecea2fee14227712694c8b54ad99d471e61de92",
              "status": "affected",
              "version": "64769240bd07f446f83660bb143bb609d8ab4910",
              "versionType": "git"
            },
            {
              "lessThan": "53877ed201baa6b58f7ce9df92664a839113c30e",
              "status": "affected",
              "version": "64769240bd07f446f83660bb143bb609d8ab4910",
              "versionType": "git"
            },
            {
              "lessThan": "1dedde690303c05ef732b7c5c8356fdf60a4ade3",
              "status": "affected",
              "version": "64769240bd07f446f83660bb143bb609d8ab4910",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.27"
            },
            {
              "lessThan": "2.6.27",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.111",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.28",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.2.*",
              "status": "unaffected",
              "version": "6.2.15",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.3.*",
              "status": "unaffected",
              "version": "6.3.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.4",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.111",
                  "versionStartIncluding": "2.6.27",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.28",
                  "versionStartIncluding": "2.6.27",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2.15",
                  "versionStartIncluding": "2.6.27",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.3.2",
                  "versionStartIncluding": "2.6.27",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.4",
                  "versionStartIncluding": "2.6.27",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix i_disksize exceeding i_size problem in paritally written case\n\nIt is possible for i_disksize can exceed i_size, triggering a warning.\n\ngeneric_perform_write\n copied = iov_iter_copy_from_user_atomic(len) // copied \u003c len\n ext4_da_write_end\n | ext4_update_i_disksize\n |  new_i_size = pos + copied;\n |  WRITE_ONCE(EXT4_I(inode)-\u003ei_disksize, newsize) // update i_disksize\n | generic_write_end\n |  copied = block_write_end(copied, len) // copied = 0\n |   if (unlikely(copied \u003c len))\n |    if (!PageUptodate(page))\n |     copied = 0;\n |  if (pos + copied \u003e inode-\u003ei_size) // return false\n if (unlikely(copied == 0))\n  goto again;\n if (unlikely(iov_iter_fault_in_readable(i, bytes))) {\n  status = -EFAULT;\n  break;\n }\n\nWe get i_disksize greater than i_size here, which could trigger WARNING\ncheck \u0027i_size_read(inode) \u003c EXT4_I(inode)-\u003ei_disksize\u0027 while doing dio:\n\next4_dio_write_iter\n iomap_dio_rw\n  __iomap_dio_rw // return err, length is not aligned to 512\n ext4_handle_inode_extension\n  WARN_ON_ONCE(i_size_read(inode) \u003c EXT4_I(inode)-\u003ei_disksize) // Oops\n\n WARNING: CPU: 2 PID: 2609 at fs/ext4/file.c:319\n CPU: 2 PID: 2609 Comm: aa Not tainted 6.3.0-rc2\n RIP: 0010:ext4_file_write_iter+0xbc7\n Call Trace:\n  vfs_write+0x3b1\n  ksys_write+0x77\n  do_syscall_64+0x39\n\nFix it by updating \u0027copied\u0027 value before updating i_disksize just like\next4_write_inline_data_end() does.\n\nA reproducer can be found in the buganizer link below."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-09-16T08:06:59.730Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/18eb23891aeae3229baf8c7c23b76be3364e1967"
        },
        {
          "url": "https://git.kernel.org/stable/c/d30090eb546d993ea3f3023452540c476ea614a5"
        },
        {
          "url": "https://git.kernel.org/stable/c/3ecea2fee14227712694c8b54ad99d471e61de92"
        },
        {
          "url": "https://git.kernel.org/stable/c/53877ed201baa6b58f7ce9df92664a839113c30e"
        },
        {
          "url": "https://git.kernel.org/stable/c/1dedde690303c05ef732b7c5c8356fdf60a4ade3"
        }
      ],
      "title": "ext4: fix i_disksize exceeding i_size problem in paritally written case",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-53270",
    "datePublished": "2025-09-16T08:06:59.730Z",
    "dateReserved": "2025-09-16T08:05:12.516Z",
    "dateUpdated": "2025-09-16T08:06:59.730Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-53270\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-16T08:15:35.790\",\"lastModified\":\"2025-09-16T12:49:16.060\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\next4: fix i_disksize exceeding i_size problem in paritally written case\\n\\nIt is possible for i_disksize can exceed i_size, triggering a warning.\\n\\ngeneric_perform_write\\n copied = iov_iter_copy_from_user_atomic(len) // copied \u003c len\\n ext4_da_write_end\\n | ext4_update_i_disksize\\n |  new_i_size = pos + copied;\\n |  WRITE_ONCE(EXT4_I(inode)-\u003ei_disksize, newsize) // update i_disksize\\n | generic_write_end\\n |  copied = block_write_end(copied, len) // copied = 0\\n |   if (unlikely(copied \u003c len))\\n |    if (!PageUptodate(page))\\n |     copied = 0;\\n |  if (pos + copied \u003e inode-\u003ei_size) // return false\\n if (unlikely(copied == 0))\\n  goto again;\\n if (unlikely(iov_iter_fault_in_readable(i, bytes))) {\\n  status = -EFAULT;\\n  break;\\n }\\n\\nWe get i_disksize greater than i_size here, which could trigger WARNING\\ncheck \u0027i_size_read(inode) \u003c EXT4_I(inode)-\u003ei_disksize\u0027 while doing dio:\\n\\next4_dio_write_iter\\n iomap_dio_rw\\n  __iomap_dio_rw // return err, length is not aligned to 512\\n ext4_handle_inode_extension\\n  WARN_ON_ONCE(i_size_read(inode) \u003c EXT4_I(inode)-\u003ei_disksize) // Oops\\n\\n WARNING: CPU: 2 PID: 2609 at fs/ext4/file.c:319\\n CPU: 2 PID: 2609 Comm: aa Not tainted 6.3.0-rc2\\n RIP: 0010:ext4_file_write_iter+0xbc7\\n Call Trace:\\n  vfs_write+0x3b1\\n  ksys_write+0x77\\n  do_syscall_64+0x39\\n\\nFix it by updating \u0027copied\u0027 value before updating i_disksize just like\\next4_write_inline_data_end() does.\\n\\nA reproducer can be found in the buganizer link below.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/18eb23891aeae3229baf8c7c23b76be3364e1967\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1dedde690303c05ef732b7c5c8356fdf60a4ade3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3ecea2fee14227712694c8b54ad99d471e61de92\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/53877ed201baa6b58f7ce9df92664a839113c30e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d30090eb546d993ea3f3023452540c476ea614a5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…