CVE-2016-3135
High · 7.8CVSS
7.8
EPSS
1.0%
Published
Apr 27, 2016
CISA due date
—
Cloudanix analysis
A programming mistake in the Linux kernel on 32-bit computers lets someone who already has an account on the machine take full control or shut the system down.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
Integer overflow in xt_alloc_table_info allows undersized allocation followed by out-of-bounds writes into heap memory when processing IPT_SO_SET_REPLACE setsockopt on 32-bit kernels, resulting in memory corruption that can be turned into privilege escalation or denial of service.
Why it matters to the business
Local attackers on 32-bit Linux systems can obtain root privileges or crash the host, enabling full host compromise or service disruption; the issue is long-public with public exploits available but no known ransomware or nation-state campaigns.
How an attack unfolds
An attacker with a local shell crafts a malicious IPT_SO_SET_REPLACE setsockopt call that supplies an oversized table size; the integer overflow in xt_alloc_table_info produces a too-small allocation, after which subsequent table data is written past the allocated buffer, corrupting adjacent heap structures and allowing control-flow hijacking or kernel panic.
How to fix it
Upgrade the kernel to a version containing commit d157bd761585605b7882935ffb86286919f62ea1 or later; rebuild and reboot with the patched kernel; on systems that cannot be immediately updated, restrict unprivileged local access and consider disabling unnecessary netfilter modules.
How to confirm the fix worked
Verify the running kernel contains commit d157bd761585605b7882935ffb86286919f62ea1 or is newer than 4.5.2; confirm xt_alloc_table_info no longer performs the vulnerable size calculation; run regression tests that exercise IPT_SO_SET_REPLACE with large table sizes.
Typical attack path
- Obtain local shell on 32-bit Linux kernel <= 4.5.2
- Open a netfilter socket and prepare a crafted ipt_replace structure with large num_entries and size values
- Invoke setsockopt with IPT_SO_SET_REPLACE to trigger xt_alloc_table_info
- Exploit resulting heap corruption to execute arbitrary kernel code or cause denial of service
How to detect it
Review audit logs for unusual setsockopt calls on netfilter sockets by unprivileged users; inspect kernel crash dumps for heap corruption signatures near x_tables allocations; correlate with any sudden privilege changes or unexpected root processes.
What your security team should do
- Patch all 32-bit Linux systems to the fixed commit immediately
- Audit local user access on remaining unpatched 32-bit hosts and apply compensating controls such as seccomp or user namespaces
- Monitor for future kernel updates and include this class of netfilter integer issues in patch-management SLAs
The record
Integer overflow in the xt_alloc_table_info function in net/netfilter/x_tables.c in the Linux kernel through 4.5.2 on 32-bit platforms allows local users to gain privileges or cause a denial of service (heap memory corruption) via an IPT_SO_SET_REPLACE setsockopt call.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | linux | 0 | 4.4.6-1 |
| Debian:12 | linux | 0 | 4.4.6-1 |
| Debian:13 | linux | 0 | 4.4.6-1 |
| Ubuntu:14.04:LTS | linux-aws | 0 | 4.4.0-1002.2 |
| Ubuntu:14.04:LTS | linux-lts-wily | 0 | 4.2.0-34.39~14.04.1 |
| Ubuntu:14.04:LTS | linux-lts-xenial | 0 | 4.4.0-34.53~14.04.1 |
| Ubuntu:16.04:LTS | linux | 0 | 4.4.0-34.53 |
| Ubuntu:16.04:LTS | linux-aws | 0 | 4.4.0-1001.10 |
| Ubuntu:16.04:LTS | linux-gke | 0 | 4.4.0-1003.3 |
| Ubuntu:16.04:LTS | linux-hwe | 0 | 4.8.0-36.36~16.04.1 |
| Ubuntu:16.04:LTS | linux-raspi2 | 0 | 4.4.0-1019.25 |
| Ubuntu:16.04:LTS | linux-snapdragon | 0 | 4.4.0-1022.25 |
| openSUSE:Tumbleweed | kernel-source | 0 | 4.8.13-1.1 |
Related vulnerabilities
- CVE-2025-38562 In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix null… Also affects linux
- CVE-2025-38352 In the Linux kernel, the following vulnerability has been resolved: posix-cpu-timers: fix… Also affects linux
- CVE-2025-22037 In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix null… Also affects linux
- CVE-2025-21760 In the Linux kernel, the following vulnerability has been resolved: ndisc: extend RCU… Also affects linux
- CVE-2025-21758 In the Linux kernel, the following vulnerability has been resolved: ipv6: mcast: add RCU… Also affects linux
- CVE-2025-21664 In the Linux kernel, the following vulnerability has been resolved: dm thin: make… Also affects linux
- CVE-2024-57946 In the Linux kernel, the following vulnerability has been resolved: virtio-blk: don't… Also affects linux
- CVE-2024-57945 In the Linux kernel, the following vulnerability has been resolved: riscv: mm: Fix the… Also affects linux