{"id":"CVE-2026-139512","state":"PUBLISHED","title":"net: psp: require an established connection for association setup","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: psp: require an established connection for association setup\n\nCheck sk_state under the socket lock in both the rx-assoc and tx-assoc\nhandlers, and only allow association setup on sockets in\nTCP_ESTABLISHED. Also, fail connect() when PSP assoc state is already\npresent, and remove the dead PSP MSS adjustment from\ntcp_v[46]_connect().\n\nThe net effect of this commit is:\n1. PSP assoc state can never exist on a listen socket.\n2. The upgrade to PSP must be done while the socket is in\n   TCP_ESTABLISHED.\n\nThis change defeatures behavior that was previously allowed under the\nPSP uapi. My justification is:\n\nNothing useful can be done after association setup on closed or listen\nsockets today. Listen sockets could accept a PSP-encrypted TCP SYN, but\nthe child socket will not inherit any PSP state. On the other side,\nestablishing PSP state prior to connect() will result in a PSP-encrypted\nTCP SYN sent to a listening peer, which in turn has the aforementioned\nlimitations. That implies that there cannot be any users of this\nfeature, so it should be safe to remove it from the PSP uapi.\n\nIn theory, the check in the tx-assoc path is more restrictive than\nnecessary. FIN_WAIT1/2, CLOSING, LAST_ACK and CLOSE_WAIT could be\nallowed, and the peer would accept PSP-encrypted ACKs in the\npost-FIN-sent states, or data in the half-close case, but it is simpler\nto disallow those states because they don't fit the upgrade model.\n\nThe check in the tx-assoc path fixes a bug in commit 6b46ca260e22 (\"net:\npsp: add socket security association code\") where an unsynchronized\nwrite can be performed on an assoc shared with a timewait socket when\nthe socket is in TCP_CLOSE after shutdown. This commit is not targeted\nat net because its premise of preventing listen sockets from holding\nassoc state depends on net-next commit 8cc3aef0cb19 (\"tcp: Do not allow\nbuggy transitions between ehash and lhash2.\")","publishedAt":"2026-11-30T13:35:26.187Z","updatedAt":"2026-11-30T13:35:26.187Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6b46ca260e2290e3453d1355ab5b6d283d73d780","status":"affected","lessThan":"1d5073d45d846dad26b6b8035d8a2e997d8e1d59","versionType":"git"},{"version":"6b46ca260e2290e3453d1355ab5b6d283d73d780","status":"affected","lessThan":"f84e20af7d01a7f29586cf3ddff92d275615e637","versionType":"git"},{"version":"6b46ca260e2290e3453d1355ab5b6d283d73d780","status":"affected","lessThan":"86a19284425fb0c420e1702f8d0de891279df6b7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["Documentation/networking/psp.rst","net/ipv4/tcp_ipv4.c","net/ipv6/tcp_ipv6.c","net/psp/psp_sock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","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":["Documentation/networking/psp.rst","net/ipv4/tcp_ipv4.c","net/ipv6/tcp_ipv6.c","net/psp/psp_sock.c"]}],"references":["https://git.kernel.org/stable/c/1d5073d45d846dad26b6b8035d8a2e997d8e1d59","https://git.kernel.org/stable/c/f84e20af7d01a7f29586cf3ddff92d275615e637","https://git.kernel.org/stable/c/86a19284425fb0c420e1702f8d0de891279df6b7"],"weaknesses":[],"ingestedAt":"2026-11-30T13:50:04.417Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139512.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139512","state":"PUBLISHED","datePublished":"2026-11-30T13:35:26.187Z","dateUpdated":"2026-11-30T13:35:26.187Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.938Z"},"containers":{"cna":{"title":"net: psp: require an established connection for association setup","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: psp: require an established connection for association setup\n\nCheck sk_state under the socket lock in both the rx-assoc and tx-assoc\nhandlers, and only allow association setup on sockets in\nTCP_ESTABLISHED. Also, fail connect() when PSP assoc state is already\npresent, and remove the dead PSP MSS adjustment from\ntcp_v[46]_connect().\n\nThe net effect of this commit is:\n1. PSP assoc state can never exist on a listen socket.\n2. The upgrade to PSP must be done while the socket is in\n   TCP_ESTABLISHED.\n\nThis change defeatures behavior that was previously allowed under the\nPSP uapi. My justification is:\n\nNothing useful can be done after association setup on closed or listen\nsockets today. Listen sockets could accept a PSP-encrypted TCP SYN, but\nthe child socket will not inherit any PSP state. On the other side,\nestablishing PSP state prior to connect() will result in a PSP-encrypted\nTCP SYN sent to a listening peer, which in turn has the aforementioned\nlimitations. That implies that there cannot be any users of this\nfeature, so it should be safe to remove it from the PSP uapi.\n\nIn theory, the check in the tx-assoc path is more restrictive than\nnecessary. FIN_WAIT1/2, CLOSING, LAST_ACK and CLOSE_WAIT could be\nallowed, and the peer would accept PSP-encrypted ACKs in the\npost-FIN-sent states, or data in the half-close case, but it is simpler\nto disallow those states because they don't fit the upgrade model.\n\nThe check in the tx-assoc path fixes a bug in commit 6b46ca260e22 (\"net:\npsp: add socket security association code\") where an unsynchronized\nwrite can be performed on an assoc shared with a timewait socket when\nthe socket is in TCP_CLOSE after shutdown. This commit is not targeted\nat net because its premise of preventing listen sockets from holding\nassoc state depends on net-next commit 8cc3aef0cb19 (\"tcp: Do not allow\nbuggy transitions between ehash and lhash2.\")"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6b46ca260e2290e3453d1355ab5b6d283d73d780","status":"affected","lessThan":"1d5073d45d846dad26b6b8035d8a2e997d8e1d59","versionType":"git"},{"version":"6b46ca260e2290e3453d1355ab5b6d283d73d780","status":"affected","lessThan":"f84e20af7d01a7f29586cf3ddff92d275615e637","versionType":"git"},{"version":"6b46ca260e2290e3453d1355ab5b6d283d73d780","status":"affected","lessThan":"86a19284425fb0c420e1702f8d0de891279df6b7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["Documentation/networking/psp.rst","net/ipv4/tcp_ipv4.c","net/ipv6/tcp_ipv6.c","net/psp/psp_sock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.18","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","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":["Documentation/networking/psp.rst","net/ipv4/tcp_ipv4.c","net/ipv6/tcp_ipv6.c","net/psp/psp_sock.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1d5073d45d846dad26b6b8035d8a2e997d8e1d59"},{"url":"https://git.kernel.org/stable/c/f84e20af7d01a7f29586cf3ddff92d275615e637"},{"url":"https://git.kernel.org/stable/c/86a19284425fb0c420e1702f8d0de891279df6b7"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:35:26.187Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}