{"id":"CVE-2026-139110","state":"PUBLISHED","title":"apparmor: mediate AF_UNSPEC socket disconnects","description":"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 > 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>&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.","publishedAt":"2026-11-30T13:31:40.482Z","updatedAt":"2026-11-30T13:31:40.482Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"89ac6aa752ec8b7b43d8d88a3e7719d1868d582a","status":"affected","lessThan":"6bac94125c0b9471f46a18be21916d6d4a5bcd60","versionType":"git"},{"version":"89ac6aa752ec8b7b43d8d88a3e7719d1868d582a","status":"affected","lessThan":"049760746597cfd054c181fe850531be3c1e7358","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/af_inet.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.3","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/af_inet.c"]}],"references":["https://git.kernel.org/stable/c/6bac94125c0b9471f46a18be21916d6d4a5bcd60","https://git.kernel.org/stable/c/049760746597cfd054c181fe850531be3c1e7358"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139110.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139110","state":"PUBLISHED","datePublished":"2026-11-30T13:31:40.482Z","dateUpdated":"2026-11-30T13:31:40.482Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.914Z"},"containers":{"cna":{"title":"apparmor: mediate AF_UNSPEC socket disconnects","descriptions":[{"lang":"en","value":"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 > 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>&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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"89ac6aa752ec8b7b43d8d88a3e7719d1868d582a","status":"affected","lessThan":"6bac94125c0b9471f46a18be21916d6d4a5bcd60","versionType":"git"},{"version":"89ac6aa752ec8b7b43d8d88a3e7719d1868d582a","status":"affected","lessThan":"049760746597cfd054c181fe850531be3c1e7358","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/af_inet.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.3","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/af_inet.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6bac94125c0b9471f46a18be21916d6d4a5bcd60"},{"url":"https://git.kernel.org/stable/c/049760746597cfd054c181fe850531be3c1e7358"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:31:40.482Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.3","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}