{"id":"CVE-2026-23331","state":"PUBLISHED","title":"udp: Unhash auto-bound connected sk from 4-tuple hash table when disconnected.","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nudp: Unhash auto-bound connected sk from 4-tuple hash table when disconnected.\n\nLet's say we bind() an UDP socket to the wildcard address with a\nnon-zero port, connect() it to an address, and disconnect it from\nthe address.\n\nbind() sets SOCK_BINDPORT_LOCK on sk->sk_userlocks (but not\nSOCK_BINDADDR_LOCK), and connect() calls udp_lib_hash4() to put\nthe socket into the 4-tuple hash table.\n\nThen, __udp_disconnect() calls sk->sk_prot->rehash(sk).\n\nIt computes a new hash based on the wildcard address and moves\nthe socket to a new slot in the 4-tuple hash table, leaving a\ngarbage in the chain that no packet hits.\n\nLet's remove such a socket from 4-tuple hash table when disconnected.\n\nNote that udp_sk(sk)->udp_portaddr_hash needs to be udpated after\nudp_hash4_dec(hslot2) in udp_unhash4().","publishedAt":"2026-03-25T10:27:22.526Z","updatedAt":"2026-05-11T22:04:47.743Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"78c91ae2c6deb5d236a5a93ff2995cdd05514380","status":"affected","lessThan":"b955350778b8715e1b7885179979b3a68221c0fb","versionType":"git"},{"version":"78c91ae2c6deb5d236a5a93ff2995cdd05514380","status":"affected","lessThan":"3b8f104880c104151f8c30f2f89df81fb59a286c","versionType":"git"},{"version":"78c91ae2c6deb5d236a5a93ff2995cdd05514380","status":"affected","lessThan":"6996a2d2d0a64808c19c98002aeb5d9d1b2df6a4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/udp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.18.17","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.7","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/udp.c"]}],"references":["https://git.kernel.org/stable/c/b955350778b8715e1b7885179979b3a68221c0fb","https://git.kernel.org/stable/c/3b8f104880c104151f8c30f2f89df81fb59a286c","https://git.kernel.org/stable/c/6996a2d2d0a64808c19c98002aeb5d9d1b2df6a4"],"weaknesses":[],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/23xxx/CVE-2026-23331.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-23331","state":"PUBLISHED","datePublished":"2026-03-25T10:27:22.526Z","dateUpdated":"2026-05-11T22:04:47.743Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-01-13T15:37:45.996Z"},"containers":{"cna":{"title":"udp: Unhash auto-bound connected sk from 4-tuple hash table when disconnected.","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nudp: Unhash auto-bound connected sk from 4-tuple hash table when disconnected.\n\nLet's say we bind() an UDP socket to the wildcard address with a\nnon-zero port, connect() it to an address, and disconnect it from\nthe address.\n\nbind() sets SOCK_BINDPORT_LOCK on sk->sk_userlocks (but not\nSOCK_BINDADDR_LOCK), and connect() calls udp_lib_hash4() to put\nthe socket into the 4-tuple hash table.\n\nThen, __udp_disconnect() calls sk->sk_prot->rehash(sk).\n\nIt computes a new hash based on the wildcard address and moves\nthe socket to a new slot in the 4-tuple hash table, leaving a\ngarbage in the chain that no packet hits.\n\nLet's remove such a socket from 4-tuple hash table when disconnected.\n\nNote that udp_sk(sk)->udp_portaddr_hash needs to be udpated after\nudp_hash4_dec(hslot2) in udp_unhash4()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"78c91ae2c6deb5d236a5a93ff2995cdd05514380","status":"affected","lessThan":"b955350778b8715e1b7885179979b3a68221c0fb","versionType":"git"},{"version":"78c91ae2c6deb5d236a5a93ff2995cdd05514380","status":"affected","lessThan":"3b8f104880c104151f8c30f2f89df81fb59a286c","versionType":"git"},{"version":"78c91ae2c6deb5d236a5a93ff2995cdd05514380","status":"affected","lessThan":"6996a2d2d0a64808c19c98002aeb5d9d1b2df6a4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/udp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.13","versionType":"semver"},{"version":"6.18.17","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.7","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/udp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b955350778b8715e1b7885179979b3a68221c0fb"},{"url":"https://git.kernel.org/stable/c/3b8f104880c104151f8c30f2f89df81fb59a286c"},{"url":"https://git.kernel.org/stable/c/6996a2d2d0a64808c19c98002aeb5d9d1b2df6a4"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T22:04:47.743Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.18.17"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.19.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}