Skip to content
Heist/ feed
Back to feed
UnratedFix available

netfilter: ctnetlink: use netlink policy range checks

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: netfilter: ctnetlink: use netlink policy range checks Replace manual range and mask validations with netlink policy annotations in ctnetlink code paths, so that the netlink core rejects invalid values early and can generate extack errors. - CTA_PROTOINFO_TCP_STATE: reject values > TCP_CONNTRACK_SYN_SENT2 at policy level, removing the manual >= TCP_CONNTRACK_MAX check. - CTA_PROTOINFO_TCP_WSCALE_ORIGINAL/REPLY: reject values > TCP_MAX_WSCALE (14). The normal TCP option parsing path already clamps to this value, but the ctnetlink path accepted 0-255, causing undefined behavior when used as a u32 shift count. - CTA_FILTER_ORIG_FLAGS/REPLY_FLAGS: use NLA_POLICY_MASK with CTA_FILTER_F_ALL, removing the manual mask checks. - CTA_EXPECT_FLAGS: use NLA_POLICY_MASK with NF_CT_EXPECT_MASK, adding a new mask define grouping all valid expect flags. Extracted from a broader nf-next patch by Florian Westphal, scoped to ctnetlink for the fixes tree.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.253, 5.15.203, 6.1.168, 6.12.80, 6.18.21, 6.19.11, 6.6.131
CVEs
CVE-2026-31495
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 13:38 UTC · Revision 1

Source evidence

netfilter: ctnetlink: use netlink policy range checks

core-osv · Original source

Published 22 Apr 2026, 13:54 UTC

In the Linux kernel, the following vulnerability has been resolved: netfilter: ctnetlink: use netlink policy range checks Replace manual range and mask validations with netlink policy annotations in ctnetlink code paths, so that the netlink core rejects invalid values early and can generate extack errors. - CTA_PROTOINFO_TCP_STATE: reject values > TCP_CONNTRACK_SYN_SENT2 at policy level, removing the manual >= TCP_CONNTRACK_MAX check. - CTA_PROTOINFO_TCP_WSCALE_ORIGINAL/REPLY: reject values > TCP_MAX_WSCALE (14). The normal TCP option parsing path already clamps to this value, but the ctnetlink path accepted 0-255, causing undefined behavior when used as a u32 shift count. - CTA_FILTER_ORIG_FLAGS/REPLY_FLAGS: use NLA_POLICY_MASK with CTA_FILTER_F_ALL, removing the manual mask checks. - CTA_EXPECT_FLAGS: use NLA_POLICY_MASK with NF_CT_EXPECT_MASK, adding a new mask define grouping all valid expect flags. Extracted from a broader nf-next patch by Florian Westphal, scoped to ctnetlink for the fixes tree.

osv:CVE-2026-31495

Kernel

Fixed versions: 5.10.253, 5.15.203, 6.1.168, 6.6.131, 6.12.80, 6.18.21, 6.19.11

Complete source record
{
  "id": "34b9c2899745adebfa28259e18b2eebb388dc8cbfd84cddae4e9b12c916e699f",
  "url": "https://osv.dev/vulnerability/CVE-2026-31495",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "netfilter: ctnetlink: use netlink policy range checks",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: netfilter: ctnetlink: use netlink policy range checks Replace manual range and mask validations with netlink policy annotations in ctnetlink code paths, so that the netlink core rejects invalid values early and can generate extack errors. - CTA_PROTOINFO_TCP_STATE: reject values > TCP_CONNTRACK_SYN_SENT2 at policy level, removing the manual >= TCP_CONNTRACK_MAX check. - CTA_PROTOINFO_TCP_WSCALE_ORIGINAL/REPLY: reject values > TCP_MAX_WSCALE (14). The normal TCP option parsing path already clamps to this value, but the ctnetlink path accepted 0-255, causing undefined behavior when used as a u32 shift count. - CTA_FILTER_ORIG_FLAGS/REPLY_FLAGS: use NLA_POLICY_MASK with CTA_FILTER_F_ALL, removing the manual mask checks. - CTA_EXPECT_FLAGS: use NLA_POLICY_MASK with NF_CT_EXPECT_MASK, adding a new mask define grouping all valid expect flags. Extracted from a broader nf-next patch by Florian Westphal, scoped to ctnetlink for the fixes tree.",
    "evidence": "osv:CVE-2026-31495",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.253",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.203",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.168",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.131",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.80",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.21",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.19.11",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-31495",
      "aliases": [
        "CVE-2026-31495"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c8e2078cfe414a99cf6f2f2f1d78c7e75392e9d4"
                },
                {
                  "fixed": "435b576cd2faa75154777868f8cbb73bf71644d3"
                },
                {
                  "fixed": "2ef71307c86a9f866d6e28f1a0c06e2e9d794474"
                },
                {
                  "fixed": "4f7d25f3f0786402ba48ff7d13b6241d77d975f5"
                },
                {
                  "fixed": "fcec5ce2d73a41668b24e3f18c803541602a59f6"
                },
                {
                  "fixed": "675c913b940488a84effdeeac5a1cfb657b59804"
                },
                {
                  "fixed": "c6cb41eaae875501eaaa487b8db6539feb092292"
                },
                {
                  "fixed": "45c33e79ae705b7af97e3117672b6cd258dd0b1b"
                },
                {
                  "fixed": "8f15b5071b4548b0aafc03b366eb45c9c6566704"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31495.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.22"
                },
                {
                  "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.168"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.131"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.80"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.21"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "6.19.11"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31495.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:36.073759707Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-019113.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-082556.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-457936.html",
        "https://git.kernel.org/stable/c/2ef71307c86a9f866d6e28f1a0c06e2e9d794474",
        "https://git.kernel.org/stable/c/435b576cd2faa75154777868f8cbb73bf71644d3",
        "https://git.kernel.org/stable/c/45c33e79ae705b7af97e3117672b6cd258dd0b1b",
        "https://git.kernel.org/stable/c/4f7d25f3f0786402ba48ff7d13b6241d77d975f5",
        "https://git.kernel.org/stable/c/675c913b940488a84effdeeac5a1cfb657b59804",
        "https://git.kernel.org/stable/c/8f15b5071b4548b0aafc03b366eb45c9c6566704",
        "https://git.kernel.org/stable/c/c6cb41eaae875501eaaa487b8db6539feb092292",
        "https://git.kernel.org/stable/c/fcec5ce2d73a41668b24e3f18c803541602a59f6",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31495.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-31495",
        "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-31495.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-31495",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 503154,
  "published_at": "2026-04-22T13:54:17.591+00:00"
}