{"id":"CVE-2026-98531","summary":"ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nipv6: sr: enforce exact attribute length for SEG6_ATTR_DST\n\nIn seg6_genl_policy, SEG6_ATTR_DST is defined with .type = NLA_BINARY and\n.len = sizeof(struct in6_addr). For NLA_BINARY, .len only enforces the\nmaximum payload length and permits shorter payloads (e.g., 0 bytes).\nWhen seg6_genl_set_tunsrc() copies sizeof(struct in6_addr) bytes via\nkmemdup(val, sizeof(*val), GFP_KERNEL), a short SEG6_ATTR_DST attribute\ntriggers a 16-byte out-of-bounds read past skb-\u003etail into uninitialized\nskb-\u003ehead memory, which is stored in sdata-\u003etun_src and leaked back to\nuserspace via SEG6_CMD_GET_TUNSRC.\n\nSwitch SEG6_ATTR_DST in seg6_genl_policy to\nNLA_POLICY_EXACT_LEN(sizeof(struct in6_addr)) so that generic netlink\nvalidation rejects any attribute whose length is not exactly\nsizeof(struct in6_addr) with -ERANGE.\n\nTested in QEMU against Linux 7.3.0-rc3 by sending a SEG6_CMD_SET_TUNSRC\nGeneric Netlink message with a 0-byte SEG6_ATTR_DST attribute followed\nby SEG6_CMD_GET_TUNSRC. On the unfixed kernel, SEG6_CMD_SET_TUNSRC\nsucceeds (err = 0) and SEG6_CMD_GET_TUNSRC leaks 16 bytes of\nuninitialized kernel heap memory (tun_src =\n836a61ecc4d25a1042a8d60411cfb378); with this patch applied,\nSEG6_CMD_SET_TUNSRC is rejected by netlink policy validation with\n-ERANGE (-34) and tun_src remains zeroed.","modified":"2026-10-19T02:46:25.619769857Z","published":"2026-10-18T15:17:49.632Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98531.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/050a0aa3c80907b8c60a396b7e04d48d8b1a9e70"},{"type":"WEB","url":"https://git.kernel.org/stable/c/195813bb7324c338eaba0aaa02b18681ee65b670"},{"type":"WEB","url":"https://git.kernel.org/stable/c/209eefebee54c4a5f01d68b61e8ac9881eca2de9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2d959c75c27f90e9ec489d18ce5ee6b852ad4741"},{"type":"WEB","url":"https://git.kernel.org/stable/c/66bf65fa109326e4c4ddeb0b94093379f72838fd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6fcfc362344edea745a69f3a705de50b731f3418"},{"type":"WEB","url":"https://git.kernel.org/stable/c/94214cf0a08dd2c5f37aeeea46078d9dfe8e4a0e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e3ac68c1cdc2535d127b2bfd50c263d16c8e4199"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98531.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98531"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.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"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98531.json"}}],"schema_version":"1.9.0"}