An issue was discovered in net/ipv6/ip6mr.c in the Linux kernel before 4.11. By setting a specific socket option, an attacker can control a pointer in kernel land and cause an inetcsklistenstop general protection fault, or potentially execute arbitrary code under certain circumstances. The issue can be triggered as root (e.g., inside a default LXC container or with the CAPNETADMIN capability) or after namespace unsharing. This occurs because sktype and protocol are not checked in the appropriate part of the ip6mroute* functions. NOTE: this affects Linux distributions that use 4.9.x longterm kernels before 4.9.187.
[
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git@99253eb750fda6a644d5188fb26c43bad8d5a745",
"digest": {
"function_hash": "334410933136282710967774068023981460530",
"length": 2763.0
},
"target": {
"file": "net/ipv6/ip6mr.c",
"function": "ip6_mroute_setsockopt"
},
"id": "CVE-2017-18509-3385e0c1",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git@99253eb750fda6a644d5188fb26c43bad8d5a745",
"digest": {
"threshold": 0.9,
"line_hashes": [
"298009621754784947338976317639313641580",
"238898635758313853733269622164346830466",
"164981494354328959081603277826549826038",
"54730709383692090809855170929975497157",
"100812824994221953414922115304082628324",
"161321961574033993320537476681077070219",
"307616960852696608536787177282000021506",
"260955927640175033788372205548123349701",
"3013348516959180471679634323967881011",
"36801583908514757786675713252300506322",
"238898635758313853733269622164346830466",
"164981494354328959081603277826549826038"
]
},
"target": {
"file": "net/ipv6/ip6mr.c"
},
"id": "CVE-2017-18509-4347aeea",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git@99253eb750fda6a644d5188fb26c43bad8d5a745",
"digest": {
"function_hash": "213724507498041325655797406518481755665",
"length": 772.0
},
"target": {
"file": "net/ipv6/ip6mr.c",
"function": "ip6_mroute_getsockopt"
},
"id": "CVE-2017-18509-6d5b4664",
"deprecated": false,
"signature_version": "v1"
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2017-18509.json"