{"id":"CVE-2026-31681","summary":"netfilter: xt_multiport: validate range encoding in checkentry","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: xt_multiport: validate range encoding in checkentry\n\nports_match_v1() treats any non-zero pflags entry as the start of a\nport range and unconditionally consumes the next ports[] element as\nthe range end.\n\nThe checkentry path currently validates protocol, flags and count, but\nit does not validate the range encoding itself. As a result, malformed\nrules can mark the last slot as a range start or place two range starts\nback to back, leaving ports_match_v1() to step past the last valid\nports[] element while interpreting the rule.\n\nReject malformed multiport v1 rules in checkentry by validating that\neach range start has a following element and that the following element\nis not itself marked as another range start.","modified":"2026-04-26T04:22:21.710751Z","published":"2026-04-25T08:46:57.995Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31681.json","cna_assigner":"Linux"},"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/1e4baa853f1cc4227e04f52d6860524707cfb294"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8368ce8eb01f0b91111d814703696e780d0ef12f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/aec14808271f2bf2b656de6ff12dfe73c5fd3b67"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ff64c5bfef12461df8450e0f50bb693b5269c720"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31681.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31681"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"a89ecb6a2ef732d04058d87801e2b6bd7e5c7089"},{"fixed":"aec14808271f2bf2b656de6ff12dfe73c5fd3b67"},{"fixed":"8368ce8eb01f0b91111d814703696e780d0ef12f"},{"fixed":"1e4baa853f1cc4227e04f52d6860524707cfb294"},{"fixed":"ff64c5bfef12461df8450e0f50bb693b5269c720"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31681.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.6.17"},{"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"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31681.json"}}],"schema_version":"1.7.5"}