{"id":"CVE-2026-98531","aliases":["CVE-2026-98531"],"related":[],"kind":"vulnerability","state":"published","title":"ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST","summary":"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->tail into uninitialized\nskb->head memory, which is stored in sdata->tun_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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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->tail into uninitialized\nskb->head memory, which is stored in sdata->tun_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.","source":"cvelist"}],"published":"2026-10-18T15:17:49.632Z","modified":"2026-10-19T10:19:08.527Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"050a0aa3c80907b8c60a396b7e04d48d8b1a9e70","status":"affected"},{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"209eefebee54c4a5f01d68b61e8ac9881eca2de9","status":"affected"},{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"e3ac68c1cdc2535d127b2bfd50c263d16c8e4199","status":"affected"},{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"66bf65fa109326e4c4ddeb0b94093379f72838fd","status":"affected"},{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"195813bb7324c338eaba0aaa02b18681ee65b670","status":"affected"},{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"6fcfc362344edea745a69f3a705de50b731f3418","status":"affected"},{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"94214cf0a08dd2c5f37aeeea46078d9dfe8e4a0e","status":"affected"},{"type":"git","introduced":"915d7e5e5930b4f01d0971d93b9b25ed17d221aa","fixed":"2d959c75c27f90e9ec489d18ce5ee6b852ad4741","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.10","status":"unaffected"},{"type":"semver","introduced":"5.10.271","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.222","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.189","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.158","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.112","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.55","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.9","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/050a0aa3c80907b8c60a396b7e04d48d8b1a9e70","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/209eefebee54c4a5f01d68b61e8ac9881eca2de9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e3ac68c1cdc2535d127b2bfd50c263d16c8e4199","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/66bf65fa109326e4c4ddeb0b94093379f72838fd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/195813bb7324c338eaba0aaa02b18681ee65b670","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6fcfc362344edea745a69f3a705de50b731f3418","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/94214cf0a08dd2c5f37aeeea46078d9dfe8e4a0e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2d959c75c27f90e9ec489d18ce5ee6b852ad4741","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-98531","url":"https://www.cve.org/CVERecord?id=CVE-2026-98531","licence":"CVE Terms of Use","modified":"2026-10-19T09:21:14.351Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-98531","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98531","licence":"Public domain","modified":"2026-10-19T10:19:08.527Z"}],"updatedAt":"2026-11-25T22:59:45.215Z","epss":{"score":0.0022,"percentile":0.13318,"date":"2026-12-02T12:00:21.000Z"}}