Skip to content
Heist/ feed
Back to feed
HighFix available

nfc: llcp: add missing return after LLCP_CLOSED checks

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: nfc: llcp: add missing return after LLCP_CLOSED checks In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket state is LLCP_CLOSED, the code correctly calls release_sock() and nfc_llcp_sock_put() but fails to return. Execution falls through to the remainder of the function, which calls release_sock() and nfc_llcp_sock_put() again. This results in a double release_sock() and a refcount underflow via double nfc_llcp_sock_put(), leading to a use-after-free. Add the missing return statements after the LLCP_CLOSED branches in both functions to prevent the fall-through.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.258, 5.15.209, 6.1.175, 6.12.83, 6.18.24, 6.19.14, 6.6.136, 7.0.1
CVEs
CVE-2026-31629
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 15:42 UTC · Revision 1

Source evidence

nfc: llcp: add missing return after LLCP_CLOSED checks

core-osv · Original source

Published 24 Apr 2026, 14:42 UTC

In the Linux kernel, the following vulnerability has been resolved: nfc: llcp: add missing return after LLCP_CLOSED checks In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket state is LLCP_CLOSED, the code correctly calls release_sock() and nfc_llcp_sock_put() but fails to return. Execution falls through to the remainder of the function, which calls release_sock() and nfc_llcp_sock_put() again. This results in a double release_sock() and a refcount underflow via double nfc_llcp_sock_put(), leading to a use-after-free. Add the missing return statements after the LLCP_CLOSED branches in both functions to prevent the fall-through.

osv:CVE-2026-31629

Kernel

Fixed versions: 5.10.258, 5.15.209, 6.1.175, 6.6.136, 6.12.83, 6.18.24, 6.19.14, 7.0.1

Complete source record
{
  "id": "3c772e9a15bb66affb7e2fc0c823d078954da3d9ec55da8fb7091c409b49a873",
  "url": "https://osv.dev/vulnerability/CVE-2026-31629",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "nfc: llcp: add missing return after LLCP_CLOSED checks",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: nfc: llcp: add missing return after LLCP_CLOSED checks In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket state is LLCP_CLOSED, the code correctly calls release_sock() and nfc_llcp_sock_put() but fails to return. Execution falls through to the remainder of the function, which calls release_sock() and nfc_llcp_sock_put() again. This results in a double release_sock() and a refcount underflow via double nfc_llcp_sock_put(), leading to a use-after-free. Add the missing return statements after the LLCP_CLOSED branches in both functions to prevent the fall-through.",
    "evidence": "osv:CVE-2026-31629",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.258",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.209",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.175",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.136",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.83",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.24",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.19.14",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.0.1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-31629",
      "aliases": [
        "A-499350302",
        "ASB-A-499350302",
        "CVE-2026-31629"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:A/AC:L/PR:N/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": "d646960f7986fefb460a2b062d5ccc8ccfeacc3a"
                },
                {
                  "fixed": "b2a23529593d011fb433a3d711fc597ed6a6bd2f"
                },
                {
                  "fixed": "665315df9c3486cb213fc44d83cc8bcd47fe0d26"
                },
                {
                  "fixed": "9b49e2a4b8219a2fc5cebf94f4ec34e509aff8a6"
                },
                {
                  "fixed": "0eb1263a3b8c36418c9ba295c9ab3abed664edbf"
                },
                {
                  "fixed": "796e0cac058252d0ad34ebe288e6f7979b5fc9b2"
                },
                {
                  "fixed": "8977fad2b3c6eefd414131168d597c5d1d5e1abf"
                },
                {
                  "fixed": "ff3d9e8f7244293e303f7b6ef70774291c7c27e9"
                },
                {
                  "fixed": "aba4712e8f0381cd5d196534ce2ad082626a5ab6"
                },
                {
                  "fixed": "2b5dd4632966c39da6ba74dbc8689b309065e82c"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31629.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.3.0"
                },
                {
                  "fixed": "5.10.258"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.209"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.175"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.136"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.83"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.24"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "6.19.14"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.20.0"
                },
                {
                  "fixed": "7.0.1"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31629.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:30.409292333Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-784472.html",
        "https://git.kernel.org/stable/c/0eb1263a3b8c36418c9ba295c9ab3abed664edbf",
        "https://git.kernel.org/stable/c/2b5dd4632966c39da6ba74dbc8689b309065e82c",
        "https://git.kernel.org/stable/c/665315df9c3486cb213fc44d83cc8bcd47fe0d26",
        "https://git.kernel.org/stable/c/796e0cac058252d0ad34ebe288e6f7979b5fc9b2",
        "https://git.kernel.org/stable/c/8977fad2b3c6eefd414131168d597c5d1d5e1abf",
        "https://git.kernel.org/stable/c/9b49e2a4b8219a2fc5cebf94f4ec34e509aff8a6",
        "https://git.kernel.org/stable/c/aba4712e8f0381cd5d196534ce2ad082626a5ab6",
        "https://git.kernel.org/stable/c/b2a23529593d011fb433a3d711fc597ed6a6bd2f",
        "https://git.kernel.org/stable/c/ff3d9e8f7244293e303f7b6ef70774291c7c27e9",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31629.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-31629",
        "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/2026/31xxx/CVE-2026-31629.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-31629",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 496936,
  "published_at": "2026-04-24T14:42:49.849+00:00"
}