cbcvebase.
CVE-2017-18017
published 2018-01-03

CVE-2017-18017: The tcpmss_mangle_packet function in net/netfilter/xt_TCPMSS.c in the Linux kernel before 4.11, and 4.9.x before 4.9.36, allows remote attackers to cause a…

PriorityP359critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
52.84%
98.9th percentile
The tcpmss_mangle_packet function in net/netfilter/xt_TCPMSS.c in the Linux kernel before 4.11, and 4.9.x before 4.9.36, allows remote attackers to cause a denial of service (use-after-free and memory corruption) or possibly have unspecified other impact by leveraging the presence of xt_TCPMSS in an iptables action.

Affected

58 ranges· showing 25
VendorProductVersion rangeFixed in
aristaeos
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debianlinux< linux 4.11.6-1 (bookworm)linux 4.11.6-1 (bookworm)
f5arx6.2.0 – 6.4.0
linuxlinux_kernel>= 0 < 4.11.6-14.11.6-1
linuxlinux_kernel>= 0 < 4.11.6-14.11.6-1
linuxlinux_kernel>= 0 < 4.11.6-14.11.6-1
linuxlinux_kernel>= 0 < 4.11.6-14.11.6-1
linuxlinux_kernel>= 0 < 3.13.0-142.1913.13.0-142.191
linuxlinux_kernel>= 3.11 < 3.16.543.16.54
linuxlinux_kernel>= 3.17 < 3.18.603.18.60
linuxlinux_kernel>= 3.19 < 4.1.434.1.43
linuxlinux_kernel>= 3.2 < 3.2.993.2.99
linuxlinux_kernel>= 3.3 < 3.10.1083.10.108
linuxlinux_kernel>= 4.10 < 4.114.11
linuxlinux_kernel>= 4.2 < 4.4.764.4.76
linuxlinux_kernel>= 4.5 < 4.9.364.9.36
openstackcloud_magnum_orchestration
opensuseleap
redhatenterprise_linux_desktop
redhatenterprise_linux_desktop
redhatenterprise_linux_eus

Detection & IOCsextracted from sources · hover to see the quote

pathnet/netfilter/xt_TCPMSS.c
urlhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2638fd0f92d4397884fd991d8f4925cb3f081901
  • Exploit requires a crafted TCP packet with doff (data offset) field set to 0, triggering an out-of-bounds loop in tcpmss_mangle_packet(). Monitor for TCP packets with doff=0 reaching netfilter when xt_TCPMSS is active.
  • Exploit also possible via TCP packets with doff=15, causing doff to wrap to 0 after TCPOLEN_MSS/4 addition. Monitor for TCP packets with doff=15 processed by xt_TCPMSS.
  • Vulnerability is only exploitable when the xt_TCPMSS kernel module is loaded and an iptables TCPMSS action (--set-mss or --clamp-mss-to-pmtu) is configured. Audit iptables rules for TCPMSS targets as a prerequisite indicator.
  • KASAN (Kernel Address Sanitizer) will report use-after-free errors when opt[i] and opt[i+1] access out-of-bound data beyond the socket buffer. KASAN reports in kernel logs are a strong indicator of active exploitation.
  • A successful exploit may manifest as a kernel execution thread stuck looping for extended periods (tens of seconds iterating ~4GB of memory) or a system crash. Monitor for kernel hangs or panics on systems with xt_TCPMSS active.
  • ·The vulnerability is only reachable when xt_TCPMSS is present as an iptables action. Systems without this netfilter module loaded or without a TCPMSS iptables rule are not exposed to remote exploitation.
  • ·Privilege escalation is considered unlikely but cannot be fully ruled out. The memory overwrite is restricted: bytes 0x02/0x04 must appear after the socket buffer, and the written newmss value is controlled by the sysadmin's iptables rule, not the attacker.
  • ·Malformed TCP packets with doff<5 are normally dropped by tcp_v4_rcv()/tcp_v6_rcv() before reaching the application stack, but they can still reach tcpmss_mangle_packet() via the PREROUTING/mangle hook before those checks apply.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.010.0CRITICALAV:N/AC:L/Au:N/C:C/I:C/A:C
osv9.8CRITICAL
vendor_debian9.8CRITICAL
vendor_redhat9.8CRITICAL
vendor_ubuntu7.8HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.