← Back to CVE Explorer

CVE-2023-53698

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: xsk: fix refcount underflow in error path Fix a refcount underflow problem reported by syzbot that can happen when a system is running out of memory. If xp_alloc_tx_descs() fails, and it can only fail due to not having enough memory, then the error path is triggered. In this error path, the refcount of the pool is decremented as it has incremented before. However, the reference to the pool in the socket was not nulled. This means that when the socket is closed later, the socket teardown logic will think that there is a pool attached to the socket and try to decrease the refcount again, leading to a refcount underflow. I chose this fix as it involved adding just a single line. Another option would have been to move xp_get_pool() and the assignment of xs->pool to after the if-statement and using xs_umem->pool instead of xs->pool in the whole if-statement resulting in somewhat simpler code, but this would have led to much more churn in the code base perhaps making it harder to backport.

Severity
HIGH
CVSS score
7.8 (v3.1)
Vulnerability status
Deferred
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2025-10-22 14:15:44.330000
Last modified
2026-10-28 19:10:00.193000
View original CVE JSON
{
  "id": "CVE-2023-53698",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2025-10-22T14:15:44.330",
  "lastModified": "2026-10-28T19:10:00.193",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nxsk: fix refcount underflow in error path\n\nFix a refcount underflow problem reported by syzbot that can happen\nwhen a system is running out of memory. If xp_alloc_tx_descs() fails,\nand it can only fail due to not having enough memory, then the error\npath is triggered. In this error path, the refcount of the pool is\ndecremented as it has incremented before. However, the reference to\nthe pool in the socket was not nulled. This means that when the socket\nis closed later, the socket teardown logic will think that there is a\npool attached to the socket and try to decrease the refcount again,\nleading to a refcount underflow.\n\nI chose this fix as it involved adding just a single line. Another\noption would have been to move xp_get_pool() and the assignment of\nxs->pool to after the if-statement and using xs_umem->pool instead of\nxs->pool in the whole if-statement resulting in somewhat simpler code,\nbut this would have led to much more churn in the code base perhaps\nmaking it harder to backport."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nxsk: corrección de desbordamiento negativo del contador de referencias en la ruta de error\n\nCorrige un problema de desbordamiento negativo del contador de referencias reportado por syzbot que puede ocurrir cuando un sistema se queda sin memoria. Si xp_alloc_tx_descs() falla, y solo puede fallar por no tener suficiente memoria, entonces se activa la ruta de error. En esta ruta de error, el contador de referencias del pool se decrementa como se había incrementado antes. Sin embargo, la referencia al pool en el socket no fue anulada. Esto significa que cuando el socket se cierra más tarde, la lógica de desmantelamiento del socket pensará que hay un pool adjunto al socket e intentará decrementar el contador de referencias de nuevo, lo que lleva a un desbordamiento negativo del contador de referencias.\n\nElegí esta corrección ya que implicaba añadir solo una línea. Otra opción habría sido mover xp_get_pool() y la asignación de xs  ->  pool a después de la sentencia if y usar xs_umem  ->  pool en lugar de xs  ->  pool en toda la sentencia if, lo que resultaría en un código algo más simple, pero esto habría provocado mucha más agitación en la base de código, quizás dificultando su retroportación."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "net/xdp/xsk.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "f7019562f142bc041f9cde63af338d1886585923",
              "lessThan": "789fcd94c9cac133dd4d96e193188661aca9f6c3",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "ba3beec2ec1d3b4fd8672ca6e781dac4b3267f6e",
              "lessThan": "15b453cf7348973217558235b9ece2ee5fea6777",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "ba3beec2ec1d3b4fd8672ca6e781dac4b3267f6e",
              "lessThan": "3e7722c31d4167eb7f3ffd35aba52cab69b79072",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "ba3beec2ec1d3b4fd8672ca6e781dac4b3267f6e",
              "lessThan": "85c2c79a07302fe68a1ad5cc449458cc559e314d",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "9f0c8a9d4ef1b9ebee0e4ac2495fe790727044aa",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "5.15.47",
              "lessThan": "5.15.127",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "5.17.15",
              "lessThan": "5.18",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "net/xdp/xsk.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "5.18",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "5.18",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.15.127",
              "lessThanOrEqual": "5.15.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.46",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.4.11",
              "lessThanOrEqual": "6.4.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.5",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
          "baseScore": 7.8,
          "baseSeverity": "HIGH",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 5.9
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-10-15T21:36:35.978263Z",
          "id": "CVE-2023-53698",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/15b453cf7348973217558235b9ece2ee5fea6777",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/3e7722c31d4167eb7f3ffd35aba52cab69b79072",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/789fcd94c9cac133dd4d96e193188661aca9f6c3",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/85c2c79a07302fe68a1ad5cc449458cc559e314d",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}