Linux kernel
Linux SCTP root
Patch now if…Needs code running on the box. No distro fix yet.
A bug in the Linux kernel's SCTP code lets any local user, including one inside a container, free the same kernel memory twice and take over the machine. Xint chained it with nginx2root to get root on the host and escape a Docker container. The fix reached the main kernel tree on 19 Nov, but no stable or distro kernel ships it yet, so blocking the sctp module is the stopgap.
How scary is it?
Are you affected? only if all are true
1Kernel 4.15 or latercommand
The bug arrived in 4.15 (Jan 2018). The fix was merged into the main kernel tree on 19 Nov, after 7.4-rc3. The newest stable kernels (7.3.5, 6.18.64, 6.12.118, released 17 Nov) don't have it; the only distro we found carrying it on 20 Nov is Gentoo (kernel sources). Xint hasn't named the fix, but the commit credits Xint's tool and matches its description.1,2,3,4,5,6
uname -r2Untrusted code can run on it
The attacker must already run code on the machine, as any user or inside a container. Xint got there through nginx2root. The bug needs no special rights. Containers don't stop it: they share the host kernel, Docker's default seccomp profile doesn't block SCTP sockets, and Kubernetes pods run without seccomp unless you turn it on.1,2,9,12,13,14
3SCTP can loadcommand
The kernel loads the sctp module the first time any program opens an SCTP socket, unless it's blocked. Many distros ship it. Red Hat says it isn't loaded by default on RHEL: it's in kernel-modules-extra, which blacklists it on install. If lsmod prints nothing, it can still load on demand; modprobe -c | grep sctp shows any block.1,9,10,11,15
lsmod | grep sctpWhat to do
1Block SCTP if you don't use itcommand
Put this line in a file under /etc/modprobe.d/ (Ubuntu uses disable-sctp.conf); on Debian and Ubuntu, then run sudo update-initramfs -u. It doesn't unload a module that's already loaded (reboot, or sudo rmmod sctp if nothing uses it) and doesn't help if SCTP is built into the kernel. It breaks telecom signalling and some Kubernetes network plugins. Red Hat's version is install sctp /bin/true plus blacklist sctp.1,9,10,16
install sctp /bin/false2Update the kernel and rebootPending
Install your distro's kernel with the fix ("sctp: do not free a new asoc peeled off while sendmsg slept") once it ships, then reboot. No stable release or major distro kernel has it as of 20 Nov.2,3,4
3Patch the way in
Xint's chain starts with nginx2root, so upgrade nginx too. Any other way to run code on the host or in a container works just as well.1,7
This page shows you how to check. It can't tell you you're safe.
Sources (17) and changelog
- Xint: nginx-to-root chain, Docker escape, since 4.15, module block 18 Nov
- Linux kernel: the fix, unprivileged double free, Xint Code credit 16 Nov
- Linux kernel: fix merged into mainline (net-7.4-rc4) 19 Nov
- kernel.org: newest stable kernels, all from 17 Nov or earlier
- Gentoo: gentoo-sources patched for the SCTP fix 19 Nov
- Linux stable list: developer ties the patch to Xint's post 18 Nov
- Help Net Security: no CVE or patch on 18 Nov, Docker host root 19 Nov
- Tenable: no CVE on 19 Nov, no attacks reported on the chain 19 Nov
- Sysdig: module loads on first SCTP socket, lsmod check, side effects
- Red Hat: SCTP not loaded by default on RHEL, block lines
- Red Hat: sctp blacklisted on install, kernel-modules-extra
- Docker (moby): default seccomp filters sockets by family only
- Kubernetes: pods run Unconfined unless seccompDefault is on
- Tencent: earlier SCTP bug escaped Docker with default seccomp 6 Aug
- modprobe(8) man page: -c prints the effective configuration
- Ubuntu: disable-sctp.conf, update-initramfs, rmmod steps
- CISA KEV catalog: not listed
- Published.