CVE-2026-31681

Source
https://cve.org/CVERecord?id=CVE-2026-31681
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-31681.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-31681
Downstream
Published
2026-04-25T08:46:57.995Z
Modified
2026-04-26T04:22:21.710751Z
Summary
netfilter: xt_multiport: validate range encoding in checkentry
Details

In the Linux kernel, the following vulnerability has been resolved:

netfilter: xt_multiport: validate range encoding in checkentry

portsmatchv1() treats any non-zero pflags entry as the start of a port range and unconditionally consumes the next ports[] element as the range end.

The checkentry path currently validates protocol, flags and count, but it does not validate the range encoding itself. As a result, malformed rules can mark the last slot as a range start or place two range starts back to back, leaving portsmatchv1() to step past the last valid ports[] element while interpreting the rule.

Reject malformed multiport v1 rules in checkentry by validating that each range start has a following element and that the following element is not itself marked as another range start.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31681.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

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"

Linux / Kernel

Package

Name
Kernel

Affected 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"