{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "c656aa4c27b17a8c70da223ed5ab42145800d6b5"
            },
            {
              "fixed": "2ca64fb7e2d2ae14619dd204d4f2f0a601f421fb"
            },
            {
              "fixed": "8b71299d587d9e4c830c18afb884c80ddb30ad28"
            },
            {
              "fixed": "16649adc2e19509104245ea1f349b629d858f11f"
            },
            {
              "fixed": "07cb6c72e66ba548679f22ac29ad588da8999279"
            },
            {
              "fixed": "a9495069b43b8634c1ae0042e888766c34f66637"
            },
            {
              "fixed": "21ae2cda66a55c759607bbf1d23cbaa42019d2de"
            },
            {
              "fixed": "7e37da42eda45d7859d9273fc7e225d8df458038"
            },
            {
              "fixed": "c71ba669b570c7b3f86ec875be222ea11dacb352"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.5.0"
            },
            {
              "fixed": "5.10.253"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.203"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.169"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.135"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.82"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.23"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "6.19.13"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31660.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nnfc: pn533: allocate rx skb before consuming bytes\n\npn532_receive_buf() reports the number of accepted bytes to the serdev\ncore. The current code consumes bytes into recv_skb and may already hand\na complete frame to pn533_recv_frame() before allocating a fresh receive\nbuffer.\n\nIf that alloc_skb() fails, the callback returns 0 even though it has\nalready consumed bytes, and it leaves recv_skb as NULL for the next\nreceive callback. That breaks the receive_buf() accounting contract and\ncan also lead to a NULL dereference on the next skb_put_u8().\n\nAllocate the receive skb lazily before consuming the next byte instead.\nIf allocation fails, return the number of bytes already accepted.",
  "id": "CVE-2026-31660",
  "modified": "2026-07-08T05:37:46.967815344Z",
  "published": "2026-04-24T14:45:11.039Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/07cb6c72e66ba548679f22ac29ad588da8999279"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/16649adc2e19509104245ea1f349b629d858f11f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/21ae2cda66a55c759607bbf1d23cbaa42019d2de"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/2ca64fb7e2d2ae14619dd204d4f2f0a601f421fb"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7e37da42eda45d7859d9273fc7e225d8df458038"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/8b71299d587d9e4c830c18afb884c80ddb30ad28"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a9495069b43b8634c1ae0042e888766c34f66637"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c71ba669b570c7b3f86ec875be222ea11dacb352"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31660.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31660"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.7.5",
  "summary": "nfc: pn533: allocate rx skb before consuming bytes"
}