Skip to content
Heist/ feed
Back to feed
UnratedFix available

ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST In seg6_genl_policy, SEG6_ATTR_DST is defined with .type = NLA_BINARY and .len = sizeof(struct in6_addr). For NLA_BINARY, .len only enforces the maximum payload length and permits shorter payloads (e.g., 0 bytes). When seg6_genl_set_tunsrc() copies sizeof(struct in6_addr) bytes via kmemdup(val, sizeof(*val), GFP_KERNEL), a short SEG6_ATTR_DST attribute triggers a 16-byte out-of-bounds read past skb->tail into uninitialized skb->head memory, which is stored in sdata->tun_src and leaked back to userspace via SEG6_CMD_GET_TUNSRC. Switch SEG6_ATTR_DST in seg6_genl_policy to NLA_POLICY_EXACT_LEN(sizeof(struct in6_addr)) so that generic netlink validation rejects any attribute whose length is not exactly sizeof(struct in6_addr) with -ERANGE. Tested in QEMU against Linux 7.3.0-rc3 by sending a SEG6_CMD_SET_TUNSRC Generic Netlink message with a 0-byte SEG6_ATTR_DST attribute followed by SEG6_CMD_GET_TUNSRC. On the unfixed kernel, SEG6_CMD_SET_TUNSRC succeeds (err = 0) and SEG6_CMD_GET_TUNSRC leaks 16 bytes of uninitialized kernel heap memory (tun_src = 836a61ecc4d25a1042a8d60411cfb378); with this patch applied, SEG6_CMD_SET_TUNSRC is rejected by netlink policy validation with -ERANGE (-34) and tun_src remains zeroed.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.271, 5.15.222, 6.1.189, 6.12.112, 6.18.55, 6.6.158, 7.2.9
CVEs
CVE-2026-98531
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:54 UTC · Revision 1

Source evidence

ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST

core-osv · Original source

Published 18 Oct 2026, 15:17 UTC

In the Linux kernel, the following vulnerability has been resolved: ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST In seg6_genl_policy, SEG6_ATTR_DST is defined with .type = NLA_BINARY and .len = sizeof(struct in6_addr). For NLA_BINARY, .len only enforces the maximum payload length and permits shorter payloads (e.g., 0 bytes). When seg6_genl_set_tunsrc() copies sizeof(struct in6_addr) bytes via kmemdup(val, sizeof(*val), GFP_KERNEL), a short SEG6_ATTR_DST attribute triggers a 16-byte out-of-bounds read past skb->tail into uninitialized skb->head memory, which is stored in sdata->tun_src and leaked back to userspace via SEG6_CMD_GET_TUNSRC. Switch SEG6_ATTR_DST in seg6_genl_policy to NLA_POLICY_EXACT_LEN(sizeof(struct in6_addr)) so that generic netlink validation rejects any attribute whose length is not exactly sizeof(struct in6_addr) with -ERANGE. Tested in QEMU against Linux 7.3.0-rc3 by sending a SEG6_CMD_SET_TUNSRC Generic Netlink message with a 0-byte SEG6_ATTR_DST attribute followed by SEG6_CMD_GET_TUNSRC. On the unfixed kernel, SEG6_CMD_SET_TUNSRC succeeds (err = 0) and SEG6_CMD_GET_TUNSRC leaks 16 bytes of uninitialized kernel heap memory (tun_src = 836a61ecc4d25a1042a8d60411cfb378); with this patch applied, SEG6_CMD_SET_TUNSRC is rejected by netlink policy validation with -ERANGE (-34) and tun_src remains zeroed.

osv:CVE-2026-98531

Kernel

Fixed versions: 5.10.271, 5.15.222, 6.1.189, 6.6.158, 6.12.112, 6.18.55, 7.2.9

Complete source record
{
  "id": "3f58fdc7c1911dfca3faf693e9f2a14743606d55652a52966dbf44181f062277",
  "url": "https://osv.dev/vulnerability/CVE-2026-98531",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST In seg6_genl_policy, SEG6_ATTR_DST is defined with .type = NLA_BINARY and .len = sizeof(struct in6_addr). For NLA_BINARY, .len only enforces the maximum payload length and permits shorter payloads (e.g., 0 bytes). When seg6_genl_set_tunsrc() copies sizeof(struct in6_addr) bytes via kmemdup(val, sizeof(*val), GFP_KERNEL), a short SEG6_ATTR_DST attribute triggers a 16-byte out-of-bounds read past skb->tail into uninitialized skb->head memory, which is stored in sdata->tun_src and leaked back to userspace via SEG6_CMD_GET_TUNSRC. Switch SEG6_ATTR_DST in seg6_genl_policy to NLA_POLICY_EXACT_LEN(sizeof(struct in6_addr)) so that generic netlink validation rejects any attribute whose length is not exactly sizeof(struct in6_addr) with -ERANGE. Tested in QEMU against Linux 7.3.0-rc3 by sending a SEG6_CMD_SET_TUNSRC Generic Netlink message with a 0-byte SEG6_ATTR_DST attribute followed by SEG6_CMD_GET_TUNSRC. On the unfixed kernel, SEG6_CMD_SET_TUNSRC succeeds (err = 0) and SEG6_CMD_GET_TUNSRC leaks 16 bytes of uninitialized kernel heap memory (tun_src = 836a61ecc4d25a1042a8d60411cfb378); with this patch applied, SEG6_CMD_SET_TUNSRC is rejected by netlink policy validation with -ERANGE (-34) and tun_src remains zeroed.",
    "evidence": "osv:CVE-2026-98531",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.271",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.222",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.189",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.158",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.112",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.55",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.2.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98531",
      "aliases": [
        "CVE-2026-98531"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "915d7e5e5930b4f01d0971d93b9b25ed17d221aa"
                },
                {
                  "fixed": "050a0aa3c80907b8c60a396b7e04d48d8b1a9e70"
                },
                {
                  "fixed": "209eefebee54c4a5f01d68b61e8ac9881eca2de9"
                },
                {
                  "fixed": "e3ac68c1cdc2535d127b2bfd50c263d16c8e4199"
                },
                {
                  "fixed": "66bf65fa109326e4c4ddeb0b94093379f72838fd"
                },
                {
                  "fixed": "195813bb7324c338eaba0aaa02b18681ee65b670"
                },
                {
                  "fixed": "6fcfc362344edea745a69f3a705de50b731f3418"
                },
                {
                  "fixed": "94214cf0a08dd2c5f37aeeea46078d9dfe8e4a0e"
                },
                {
                  "fixed": "2d959c75c27f90e9ec489d18ce5ee6b852ad4741"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98531.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.10.0"
                },
                {
                  "fixed": "5.10.271"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.222"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.189"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.158"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.112"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.55"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98531.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.610351237Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/050a0aa3c80907b8c60a396b7e04d48d8b1a9e70",
        "https://git.kernel.org/stable/c/195813bb7324c338eaba0aaa02b18681ee65b670",
        "https://git.kernel.org/stable/c/209eefebee54c4a5f01d68b61e8ac9881eca2de9",
        "https://git.kernel.org/stable/c/2d959c75c27f90e9ec489d18ce5ee6b852ad4741",
        "https://git.kernel.org/stable/c/66bf65fa109326e4c4ddeb0b94093379f72838fd",
        "https://git.kernel.org/stable/c/6fcfc362344edea745a69f3a705de50b731f3418",
        "https://git.kernel.org/stable/c/94214cf0a08dd2c5f37aeeea46078d9dfe8e4a0e",
        "https://git.kernel.org/stable/c/e3ac68c1cdc2535d127b2bfd50c263d16c8e4199",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98531.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98531",
        "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/98xxx/CVE-2026-98531.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98531",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 504967,
  "published_at": "2026-10-18T15:17:49.632+00:00"
}