Skip to content
Heist/ feed
Back to feed
HighFix available

ext4: fix invalid free tracking in ext4_xattr_move_to_block()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: ext4: fix invalid free tracking in ext4_xattr_move_to_block() In ext4_xattr_move_to_block(), the value of the extended attribute which we need to move to an external block may be allocated by kvmalloc() if the value is stored in an external inode. So at the end of the function the code tried to check if this was the case by testing entry->e_value_inum. However, at this point, the pointer to the xattr entry is no longer valid, because it was removed from the original location where it had been stored. So we could end up calling kvfree() on a pointer which was not allocated by kvmalloc(); or we could also potentially leak memory by not freeing the buffer when it should be freed. Fix this by storing whether it should be freed in a separate variable.

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.315, 4.19.283, 5.10.180, 5.15.112, 5.4.243, 6.1.29, 6.2.16, 6.3.3
CVEs
CVE-2023-54062
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 18:27 UTC · Revision 1

Source evidence

ext4: fix invalid free tracking in ext4_xattr_move_to_block()

core-osv · Original source

Published 24 Dec 2025, 12:23 UTC

In the Linux kernel, the following vulnerability has been resolved: ext4: fix invalid free tracking in ext4_xattr_move_to_block() In ext4_xattr_move_to_block(), the value of the extended attribute which we need to move to an external block may be allocated by kvmalloc() if the value is stored in an external inode. So at the end of the function the code tried to check if this was the case by testing entry->e_value_inum. However, at this point, the pointer to the xattr entry is no longer valid, because it was removed from the original location where it had been stored. So we could end up calling kvfree() on a pointer which was not allocated by kvmalloc(); or we could also potentially leak memory by not freeing the buffer when it should be freed. Fix this by storing whether it should be freed in a separate variable.

osv:CVE-2023-54062

Kernel

Fixed versions: 4.14.315, 4.19.283, 5.4.243, 5.10.180, 5.15.112, 6.1.29, 6.2.16, 6.3.3

Complete source record
{
  "id": "c0fa5c0668e9cae2017a7ead2b6e0a96ee9fd7f2e8c0bc8fae1b60e43a15a33f",
  "url": "https://osv.dev/vulnerability/CVE-2023-54062",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ext4: fix invalid free tracking in ext4_xattr_move_to_block()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: ext4: fix invalid free tracking in ext4_xattr_move_to_block() In ext4_xattr_move_to_block(), the value of the extended attribute which we need to move to an external block may be allocated by kvmalloc() if the value is stored in an external inode. So at the end of the function the code tried to check if this was the case by testing entry->e_value_inum. However, at this point, the pointer to the xattr entry is no longer valid, because it was removed from the original location where it had been stored. So we could end up calling kvfree() on a pointer which was not allocated by kvmalloc(); or we could also potentially leak memory by not freeing the buffer when it should be freed. Fix this by storing whether it should be freed in a separate variable.",
    "evidence": "osv:CVE-2023-54062",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.315",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.283",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.243",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.180",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.112",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.29",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.2.16",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.3.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2023-54062",
      "aliases": [
        "CVE-2023-54062"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c7851208abffe5ae4deb01cf48763911dc14fc67"
                },
                {
                  "fixed": "76887be2a96193cd11be818551b8934ecdb3123f"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f5cdc6a7339f250d44d4d469ed7a474ac0d6c7a7"
                },
                {
                  "fixed": "f30f3391d089dc91aef91d08f4b04a6c0df2b067"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3b28c799a1334adb5a19f42f03abe0d8cbb05938"
                },
                {
                  "fixed": "ba04d6af5ac440a6d5a2d35dc1d8e2cb0323550a"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d738789ae9ec47d3458a008788f3cdc862ebf0cb"
                },
                {
                  "fixed": "1a8822343e67432b658145d2760a524c884da9d4"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "a6744e14ce7045ab1a728bde9595f62fbd39f1d2"
                },
                {
                  "fixed": "8beaa3cb293a8f7bacf711cf52201d59859dbc40"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "8b6d06b3be7648b3b0f428558293ddf6e2cb94bf"
                },
                {
                  "fixed": "c5fa4eedddd1c8342ce533cb401c0e693e55b4e3"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d2efaf8c870c7067b8d1779773134f3481cd8f68"
                },
                {
                  "fixed": "a18670395e5f28acddeca037c5e4bd2ea961b70a"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1e9d62d252812575ded7c620d8fc67c32ff06c16"
                },
                {
                  "fixed": "b2fab1807d26acd1c6115b95b5eddd697d84751b"
                },
                {
                  "fixed": "b87c7cdf2bed4928b899e1ce91ef0d147017ba45"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4.14.308"
                },
                {
                  "fixed": "4.14.315"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4.19.276"
                },
                {
                  "fixed": "4.19.283"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.4.235"
                },
                {
                  "fixed": "5.4.243"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.10.173"
                },
                {
                  "fixed": "5.10.180"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.15.99"
                },
                {
                  "fixed": "5.15.112"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.1.16"
                },
                {
                  "fixed": "6.1.29"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.2.3"
                },
                {
                  "fixed": "6.2.16"
                }
              ]
            }
          ],
          "versions": [
            "v4.14.314",
            "v4.14.313",
            "v4.14.312",
            "v4.14.311",
            "v4.14.310",
            "v4.14.309",
            "v4.14.308",
            "v4.19.282",
            "v4.19.281",
            "v4.19.280",
            "v4.19.279",
            "v4.19.278",
            "v4.19.277",
            "v4.19.276",
            "v5.4.242",
            "v5.4.241",
            "v5.4.240",
            "v5.4.239",
            "v5.4.238",
            "v5.4.237",
            "v5.4.236",
            "v5.4.235",
            "v5.10.179",
            "v5.10.178",
            "v5.10.177",
            "v5.10.176",
            "v5.10.175",
            "v5.10.174",
            "v5.10.173",
            "v5.15.111",
            "v5.15.110",
            "v5.15.109",
            "v5.15.108",
            "v5.15.107",
            "v5.15.106",
            "v5.15.105",
            "v5.15.104",
            "v5.15.103",
            "v5.15.102",
            "v5.15.101",
            "v5.15.100",
            "v5.15.99",
            "v6.1.28",
            "v6.1.27",
            "v6.1.26",
            "v6.1.25",
            "v6.1.24",
            "v6.1.23",
            "v6.1.22",
            "v6.1.21",
            "v6.1.20",
            "v6.1.19",
            "v6.1.18",
            "v6.1.17",
            "v6.1.16",
            "v6.2.15",
            "v6.2.14",
            "v6.2.13",
            "v6.2.12",
            "v6.2.11",
            "v6.2.10",
            "v6.2.9",
            "v6.2.8",
            "v6.2.7",
            "v6.2.6",
            "v6.2.5",
            "v6.2.4",
            "v6.2.3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54062.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4.14.315"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.283"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.243"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.180"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.112"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.29"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.2.16"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.3.0"
                },
                {
                  "fixed": "6.3.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54062.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:22.483235989Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/1a8822343e67432b658145d2760a524c884da9d4",
        "https://git.kernel.org/stable/c/76887be2a96193cd11be818551b8934ecdb3123f",
        "https://git.kernel.org/stable/c/8beaa3cb293a8f7bacf711cf52201d59859dbc40",
        "https://git.kernel.org/stable/c/a18670395e5f28acddeca037c5e4bd2ea961b70a",
        "https://git.kernel.org/stable/c/b2fab1807d26acd1c6115b95b5eddd697d84751b",
        "https://git.kernel.org/stable/c/b87c7cdf2bed4928b899e1ce91ef0d147017ba45",
        "https://git.kernel.org/stable/c/ba04d6af5ac440a6d5a2d35dc1d8e2cb0323550a",
        "https://git.kernel.org/stable/c/c5fa4eedddd1c8342ce533cb401c0e693e55b4e3",
        "https://git.kernel.org/stable/c/f30f3391d089dc91aef91d08f4b04a6c0df2b067",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54062.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-54062",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54062.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-54062",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 488416,
  "published_at": "2025-12-24T12:23:08.649+00:00"
}