What’s Vulnerable › Vulnerabilities
CVE-2012-6704
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2016-12-28 · updated 2026-06-16
- Weakness: CWE-119
Description
The sock_setsockopt function in net/core/sock.c in the Linux kernel before 3.5 mishandles negative values of sk_sndbuf and sk_rcvbuf, which allows local users to cause a denial of service (memory corruption and system crash) or possibly have unspecified other impact by leveraging the CAP_NET_ADMIN capability for a crafted setsockopt system call with the (1) SO_SNDBUF or (2) SO_RCVBUF option.
Affected products
- Linux kernel: before 3.2.85; from 3.3 before 3.5 — fixed in 3.2.85, 3.5
How to fix
Upgrade to a fixed version: Linux kernel 3.2.85, 3.5. Check the vendor advisory for mitigations.
References
- http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82981930125abfd39d7c8378a9cfdf5e1be2002b
- http://www.openwall.com/lists/oss-security/2016/12/03/1
- http://www.securityfocus.com/bid/95135
- https://bugzilla.redhat.com/show_bug.cgi?id=1402024
- https://github.com/torvalds/linux/commit/82981930125abfd39d7c8378a9cfdf5e1be2002b
- http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82981930125abfd39d7c8378a9cfdf5e1be2002b
- http://www.openwall.com/lists/oss-security/2016/12/03/1
- http://www.securityfocus.com/bid/95135
- https://bugzilla.redhat.com/show_bug.cgi?id=1402024
- https://github.com/torvalds/linux/commit/82981930125abfd39d7c8378a9cfdf5e1be2002b
Get alerted when CVE-2012-6704 or the next vulnerability affects your stack