{"id":"CVE-2026-139110","summary":"apparmor: mediate AF_UNSPEC socket disconnects","details":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: mediate AF_UNSPEC socket disconnects\n\naa_inet_connect_perm() returns success immediately for AF_UNSPEC\nbefore checking the active AppArmor profile.  AF_UNSPEC is the socket\ndisconnect operation for TCP and UDP.  A process confined by a profile\ncontaining deny network can therefore disconnect inherited sockets\neven though ordinary socket creation and connect calls are denied.\n\nconsole output:\nhttps://gist.githubusercontent.com/shaos26/73b057c77b9ea22d5e6813c259dbf43c/raw/fab5c58d6f184f5fab88a3a31a80c2b919efecf0/console-output.txt\nreproduction kernel config:\nhttps://gist.githubusercontent.com/shaos26/73b057c77b9ea22d5e6813c259dbf43c/raw/b9192c97c92fdd3b59089704bad6fbd0a33ccf06/kernel-config.txt\nreproducer:\nhttps://gist.githubusercontent.com/shaos26/73b057c77b9ea22d5e6813c259dbf43c/raw/92c7dd098a227276fe3daeea45996e2848e66439/poc.c\n\nBuild the kernel from HEAD with the attached reproduction config, then\nmake a one-file initramfs.  The PoC mounts sysfs and securityfs\nitself; DEVTMPFS_MOUNT supplies /dev/console.\n\n    mkdir -p build rootfs\n    cp kernel-config.txt build/.config\n    make O=build olddefconfig\n    make O=build -j\"$(nproc)\" bzImage\n    cc -O2 -static -Wall -Wextra -o poc poc.c\n    cp poc rootfs/poc\n    (cd rootfs && find poc | cpio -o -H newc --owner=0:0) | gzip -9 \u003e initramfs.cpio.gz\n    timeout 900 qemu-system-x86_64 -kernel build/arch/x86/boot/bzImage \\\n        -initrd initramfs.cpio.gz -append \"console=ttyS0 rdinit=/poc panic=-1 loglevel=7 lsm=apparmor security=apparmor apparmor=1\" \\\n        -nographic -m 1024 -smp 1 -no-reboot 2\u003e&1 | tee console.log\n\nUnder the deny-network profile, socket() and connect(AF_INET) returned\nEACCES, but connect(fd, AF_UNSPEC) returned success and tore down the\ninherited connection and listener.  Two fresh boots matched.  A\none-line control that routed AF_UNSPEC through aa_sk_perm returned\nEACCES and kept both sockets alive.\n\nImpact and prerequisites: A confined process that inherits a TCP/UDP\nsocket can bypass the profile's network mediation for disconnect and\ndisrupt that socket.  The finding does not permit socket creation,\nbind, or arbitrary peer connections; no privilege escalation is\ndemonstrated.","modified":"2026-12-01T21:02:33.820490366Z","published":"2026-11-30T13:31:40.482Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139110.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/049760746597cfd054c181fe850531be3c1e7358"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6bac94125c0b9471f46a18be21916d6d4a5bcd60"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139110.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139110"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"89ac6aa752ec8b7b43d8d88a3e7719d1868d582a"},{"fixed":"6bac94125c0b9471f46a18be21916d6d4a5bcd60"},{"fixed":"049760746597cfd054c181fe850531be3c1e7358"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139110.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.3.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139110.json"}}],"schema_version":"1.9.2"}