VYPR
Medium severity5.5NVD Advisory· Published Apr 25, 2026· Updated May 6, 2026

CVE-2026-31681

CVE-2026-31681

Description

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

netfilter: xt_multiport: validate range encoding in checkentry

ports_match_v1() 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 ports_match_v1() 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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Missing range encoding validation in Linux kernel's xt_multiport netfilter module can lead to out-of-bounds port access by malformed rules.

Vulnerability

Analysis

The Linux kernel's netfilter xt_multiport module contains a vulnerability in its checkentry validation path. The ports_match_v1() function interprets any non-zero pflags entry as the start of a port range and unconditionally consumes the next ports[] element as the range end. However, checkentry only validates protocol, flags, and count but does not validate the range encoding itself. This allows malformed rules that mark the last slot as a range start or place two range starts consecutively, causing ports_match_v1() to step past the last valid ports[] element while interpreting the rule [1].

Exploitation

The attack surface is limited to users or processes with the capability to load custom netfilter rules, typically requiring root privileges or CAP_NET_ADMIN. An attacker with such privileges can craft a malformed multiport v1 rule that triggers the out-of-bounds access. No authentication beyond the required capabilities is needed, as the flaw occurs during rule loading before any packet matching.

Impact

Successful exploitation results in an out-of-bounds memory access within the kernel, which can lead to denial of service (kernel panic or crash). In some configurations, this could potentially enable privilege escalation or information disclosure, though the primary impact is system instability.

Mitigation

The fix adds validation in checkentry to reject malformed multiport v1 rules by ensuring that each range start has a following element and that the following element is not itself a range start. The patch has been merged into the stable Linux kernel tree addresses this issue [2][3][4]. Users should apply the latest kernel updates to remediate the vulnerability.

AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

8
  • Linux/Kernel8 versions
    cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*+ 7 more
    • cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*range: >=2.6.17,<6.6.136
    • cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
    • cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.