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

netfilter: nf_conntrack_sip: don't use simple_strtoul

Replace unsafe port parsing in epaddr_len(), ct_sip_parse_header_uri(),
and ct_sip_parse_request() with a new sip_parse_port() helper that
validates each digit against the buffer limit, eliminating the use of
simple_strtoul() which assumes NUL-terminated strings.

The previous code dereferenced pointers without bounds checks after
sip_parse_addr() and relied on simple_strtoul() on non-NUL-terminated
skb data. A port that reaches the buffer limit without a trailing
character is also rejected as malformed.

Also get rid of all simple_strtoul() usage in conntrack, prefer a
stricter version instead. There are intentional changes:

- Bail out if number is > UINT_MAX and indicate a failure, same for
too long sequences.
While we do accept 05535 as port 5535, we will not accept e.g.
'sip:10.0.0.1:005060'. While its syntactically valid under RFC 3261,
we should restrict this to not waste cycles when presented with
malformed packets with 64k '0' characters.

- Force base 10 in ct_sip_parse_numerical_param(). This is used to fetch
'expire=' and 'rports='; both are expected to use base-10.

- In nf_nat_sip.c, only accept the parsed value if its within the 1k-64k
range.

- epaddr_len now returns 0 if the port is invalid, as it already does
for invalid ip addresses. This is intentional. nf_conntrack_sip
performs lots of guesswork to find the right parts of the message
to parse. Being stricter could break existing setups.
Connection tracking helpers are designed to allow traffic to
pass, not to block it.

Based on an earlier patch from Jenny Guanni Qu <qguanni@gmail.com>.
Published: 2026-06-24
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel, parsing of SIP port numbers previously used simple_strtoul, which assumes NUL‑terminated strings and performs no bounds checking after skb data extraction. This could lead to memory corruption or kernel crashes when receiving malformed SIP packets. The patch replaces these calls with a stricter helper that validates each digit against buffer limits, ensures numbers stay within UINT_MAX, and rejects excessively long sequences. By securing this parsing logic, the kernel no longer risks out‑of‑bounds reads or integer overflows caused by malformed input, preventing a potential denial‑of‑service condition.

Affected Systems

The vulnerability exists in the nf_conntrack_sip helper used by the Linux kernel's netfilter subsystem. All kernel versions that include the nf_conntrack_sip module and contain the old parsing code are impacted. The affected products are generic Linux kernels; specific versions are not listed in the CVE data. Systems that process SIP traffic through netfilter conntrack should update to a kernel version that includes the patch.

Risk and Exploitability

Without a publicly published CVSS score, the exact severity is unspecified, but the use of unbounded parsing suggests a moderate to high risk for a kernel panic. Exploitation would likely involve sending crafted SIP packets over the network to a vulnerable host. EPSS data is unavailable, and the issue is not tracked in CISA KEV, indicating no known widespread exploitation as of the data release. Operators should treat this as a potential denial‑of‑service threat and apply the kernel update promptly.

Generated by OpenCVE AI on June 24, 2026 at 18:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update to a kernel incorporating the nf_conntrack_sip parsing fix.
  • If an immediate update is not possible, disable the nf_conntrack_sip helper or block SIP traffic at the network perimeter to mitigate.
  • Verify that port validation logic rejects malformed ports; if custom SIP proxies are in use, ensure they use base‑10 parsing and reject ports outside the 1k‑64k range.

Generated by OpenCVE AI on June 24, 2026 at 18:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 24 Jun 2026 19:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-120
CWE-190

Wed, 24 Jun 2026 17:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack_sip: don't use simple_strtoul Replace unsafe port parsing in epaddr_len(), ct_sip_parse_header_uri(), and ct_sip_parse_request() with a new sip_parse_port() helper that validates each digit against the buffer limit, eliminating the use of simple_strtoul() which assumes NUL-terminated strings. The previous code dereferenced pointers without bounds checks after sip_parse_addr() and relied on simple_strtoul() on non-NUL-terminated skb data. A port that reaches the buffer limit without a trailing character is also rejected as malformed. Also get rid of all simple_strtoul() usage in conntrack, prefer a stricter version instead. There are intentional changes: - Bail out if number is > UINT_MAX and indicate a failure, same for too long sequences. While we do accept 05535 as port 5535, we will not accept e.g. 'sip:10.0.0.1:005060'. While its syntactically valid under RFC 3261, we should restrict this to not waste cycles when presented with malformed packets with 64k '0' characters. - Force base 10 in ct_sip_parse_numerical_param(). This is used to fetch 'expire=' and 'rports='; both are expected to use base-10. - In nf_nat_sip.c, only accept the parsed value if its within the 1k-64k range. - epaddr_len now returns 0 if the port is invalid, as it already does for invalid ip addresses. This is intentional. nf_conntrack_sip performs lots of guesswork to find the right parts of the message to parse. Being stricter could break existing setups. Connection tracking helpers are designed to allow traffic to pass, not to block it. Based on an earlier patch from Jenny Guanni Qu <qguanni@gmail.com>.
Title netfilter: nf_conntrack_sip: don't use simple_strtoul
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-06-24T16:29:00.752Z

Reserved: 2026-06-09T07:44:35.376Z

Link: CVE-2026-52986

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T18:45:05Z

Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

  • CWE-190

    Integer Overflow or Wraparound