Re:Linux kernel: CVE-2017-6074: DCCP double-free vulnerabili...
by justincormack on Wednesday February 22, 2017 @12:49PM
(#13707431)
That is the default in Docker.
Re:Linux kernel: CVE-2017-6074: DCCP double-free vulnerabili...
by geofft on Wednesday February 22, 2017 @01:24PM
(#13707761)
This is module auto-loading, i.e., you don't need CAP_SYS_MODULE, nor do you make an init_module syscall. The only syscall you make is socket(...IPPROTO_DCCP), and the kernel asks /sbin/modprobe (which it runs with full privileges) to load the appropriate module. The userspace program does not have any privileges.
Does Docker actually block that? amluto's comment about the Timgad LSM implies that such functionality doesn't exist yet. (And the replies on LKML show the same confusion between explicit module loading, which requires privilege, and auto-loading, which does not. https://lkml.org/lkml/2017/2/6/279)
The easy way to try this is to lsmod and look for dccp and dccp_ipv4, `modprobe -r` them if they're already there, run
python -c 'from socket import *; socket(AF_INET, 6, 33)'
in your container, and lsmod again and see if they're present.
Re:Linux kernel: CVE-2017-6074: DCCP double-free vulnerabili...
by justincormack on Wednesday February 22, 2017 @05:15PM
(#13709741)
Yeah true. Docker master has a seccomp profile that blocks this socket family though.
Block CAP_SYS_MODULE or filter init_module syscalls. Container software should have this enabled as sensible default.