{"id":"CVE-2026-139211","state":"PUBLISHED","title":"sctp: reject forged cookie peer_addr with unknown address family","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsctp: reject forged cookie peer_addr with unknown address family\n\nWhen cookie authentication is disabled, COOKIE-ECHO peer_addr is\nattacker-controlled. An invalid sa_family made sctp_get_af_specific()\nreturn NULL and crash in sctp_transport_init() on\naf_specific->sockaddr_len. Validate it with af->addr_valid() in\nsctp_unpack_cookie(), which also rejects a mismatched family, e.g.\nan AF_INET6 peer_addr on an IPv4 socket that would later crash in\nsctp_v6_get_dst() on inet6_sk(sk)->opt. Validate a copy of peer_addr,\nsince addr_valid() rewrites a v4-mapped v6 address in place and the\ncookie still lives in the received skb, which is not guaranteed to\nbe unshared. Store the validated copy in the new association and\npass it to sctp_process_init() instead of the raw cookie, so a\nv4-mapped v6 address is normalised to AF_INET before the association\nand its primary transport are built from it.\n\nFor that, sctp_v6_addr_valid() has to return 0 for a non-v4-mapped\naddress when it is called with a socket that is not PF_INET6, so that\nIPv6 addresses are never used on IPv4 sockets. The check is done after\nthe v4-mapped handling, so v4-mapped addresses passed to an IPv4\nsocket through the socket API keep being accepted. As addr_valid()\nnow also checks sk_family and ipv6_only_sock, simplify the address\nhandling in sctp_process_param() with it, as it additionally filters\nout non-unicast addresses. As a side effect, a v4-mapped address in\nan IPv6 address parameter is now normalised to AF_INET before the\ntransport is created, matching what the socket API paths already do.\n\nAlso add the missing !af check in sctp_process_init(), as\nsctp_get_af_specific(AF_INET6) returns NULL on CONFIG_IPV6=n builds.\n\n  BUG: KASAN: null-ptr-deref in sctp_transport_new+0xa7/0x350\n  Read of size 4 at addr 00000000000000b4 by task poc/682\n  Call Trace:\n   <IRQ>\n   sctp_transport_new+0xa7/0x350\n   sctp_assoc_add_peer+0x153/0x850\n   sctp_process_init+0xf9/0x1180\n   sctp_sf_do_5_1D_ce+0x464/0xbc0\n   sctp_do_sm+0x114/0x2990\n   sctp_endpoint_bh_rcv+0x280/0x430\n   sctp_inq_push+0xdd/0x100\n   sctp_rcv+0x17f5/0x1ae0\n   sctp4_rcv+0x2b/0x40\n   ip_protocol_deliver_rcu+0x25b/0x270\n   ip_local_deliver+0xd1/0xe0\n   </IRQ>\n  Kernel panic - not syncing: Fatal exception in interrupt","publishedAt":"2026-11-30T13:32:36.488Z","updatedAt":"2026-11-30T13:32:36.488Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"abe7fd5461f148541b8c1c0dab29ad8dedc3bceb","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7048e58181bbf4f0e2cc0d051a9fae43ffd3cf3b","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"898e7e2da83e8e09cf87c7841f70d924cf6ec323","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"6f5c3ae194f95e76570b1ddaab0730a5ddf5c5bd","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"9802123ceca818aa69284c615114ca55b9cc94a1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sctp/ipv6.c","net/sctp/sm_make_chunk.c","net/sctp/sm_statefuns.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","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":["net/sctp/ipv6.c","net/sctp/sm_make_chunk.c","net/sctp/sm_statefuns.c"]}],"references":["https://git.kernel.org/stable/c/abe7fd5461f148541b8c1c0dab29ad8dedc3bceb","https://git.kernel.org/stable/c/7048e58181bbf4f0e2cc0d051a9fae43ffd3cf3b","https://git.kernel.org/stable/c/898e7e2da83e8e09cf87c7841f70d924cf6ec323","https://git.kernel.org/stable/c/6f5c3ae194f95e76570b1ddaab0730a5ddf5c5bd","https://git.kernel.org/stable/c/9802123ceca818aa69284c615114ca55b9cc94a1"],"weaknesses":[],"ingestedAt":"2026-11-30T13:44:05.999Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139211.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139211","state":"PUBLISHED","datePublished":"2026-11-30T13:32:36.488Z","dateUpdated":"2026-11-30T13:32:36.488Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.920Z"},"containers":{"cna":{"title":"sctp: reject forged cookie peer_addr with unknown address family","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsctp: reject forged cookie peer_addr with unknown address family\n\nWhen cookie authentication is disabled, COOKIE-ECHO peer_addr is\nattacker-controlled. An invalid sa_family made sctp_get_af_specific()\nreturn NULL and crash in sctp_transport_init() on\naf_specific->sockaddr_len. Validate it with af->addr_valid() in\nsctp_unpack_cookie(), which also rejects a mismatched family, e.g.\nan AF_INET6 peer_addr on an IPv4 socket that would later crash in\nsctp_v6_get_dst() on inet6_sk(sk)->opt. Validate a copy of peer_addr,\nsince addr_valid() rewrites a v4-mapped v6 address in place and the\ncookie still lives in the received skb, which is not guaranteed to\nbe unshared. Store the validated copy in the new association and\npass it to sctp_process_init() instead of the raw cookie, so a\nv4-mapped v6 address is normalised to AF_INET before the association\nand its primary transport are built from it.\n\nFor that, sctp_v6_addr_valid() has to return 0 for a non-v4-mapped\naddress when it is called with a socket that is not PF_INET6, so that\nIPv6 addresses are never used on IPv4 sockets. The check is done after\nthe v4-mapped handling, so v4-mapped addresses passed to an IPv4\nsocket through the socket API keep being accepted. As addr_valid()\nnow also checks sk_family and ipv6_only_sock, simplify the address\nhandling in sctp_process_param() with it, as it additionally filters\nout non-unicast addresses. As a side effect, a v4-mapped address in\nan IPv6 address parameter is now normalised to AF_INET before the\ntransport is created, matching what the socket API paths already do.\n\nAlso add the missing !af check in sctp_process_init(), as\nsctp_get_af_specific(AF_INET6) returns NULL on CONFIG_IPV6=n builds.\n\n  BUG: KASAN: null-ptr-deref in sctp_transport_new+0xa7/0x350\n  Read of size 4 at addr 00000000000000b4 by task poc/682\n  Call Trace:\n   <IRQ>\n   sctp_transport_new+0xa7/0x350\n   sctp_assoc_add_peer+0x153/0x850\n   sctp_process_init+0xf9/0x1180\n   sctp_sf_do_5_1D_ce+0x464/0xbc0\n   sctp_do_sm+0x114/0x2990\n   sctp_endpoint_bh_rcv+0x280/0x430\n   sctp_inq_push+0xdd/0x100\n   sctp_rcv+0x17f5/0x1ae0\n   sctp4_rcv+0x2b/0x40\n   ip_protocol_deliver_rcu+0x25b/0x270\n   ip_local_deliver+0xd1/0xe0\n   </IRQ>\n  Kernel panic - not syncing: Fatal exception in interrupt"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"abe7fd5461f148541b8c1c0dab29ad8dedc3bceb","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7048e58181bbf4f0e2cc0d051a9fae43ffd3cf3b","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"898e7e2da83e8e09cf87c7841f70d924cf6ec323","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"6f5c3ae194f95e76570b1ddaab0730a5ddf5c5bd","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"9802123ceca818aa69284c615114ca55b9cc94a1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sctp/ipv6.c","net/sctp/sm_make_chunk.c","net/sctp/sm_statefuns.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","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":["net/sctp/ipv6.c","net/sctp/sm_make_chunk.c","net/sctp/sm_statefuns.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/abe7fd5461f148541b8c1c0dab29ad8dedc3bceb"},{"url":"https://git.kernel.org/stable/c/7048e58181bbf4f0e2cc0d051a9fae43ffd3cf3b"},{"url":"https://git.kernel.org/stable/c/898e7e2da83e8e09cf87c7841f70d924cf6ec323"},{"url":"https://git.kernel.org/stable/c/6f5c3ae194f95e76570b1ddaab0730a5ddf5c5bd"},{"url":"https://git.kernel.org/stable/c/9802123ceca818aa69284c615114ca55b9cc94a1"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:36.488Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}