{"id":"CVE-2026-45536","aliases":["CVE-2026-45536","GHSA-w573-9ffj-6ff9"],"related":[],"kind":"vulnerability","state":"published","title":"Netty: Unix-socket fd receive leaks descriptors when peer sends two at once","summary":"Netty is a network application framework for development of protocol servers and clients. Prior to versions 4.1.135.Final and 4.2.15.Final, netty_unix_socket_recvFd sets msg_control to `char control[CMSG_SPACE(sizeof(int))]` (line 940) — 24 bytes on 64-bit Linux. A peer-sent SCM_RIGHTS cmsg carrying two ints has cmsg_len = CMSG_LEN(8) = 24, which fits exactly with no MSG_CTRUNC, so the kernel installs both fds in the receiving process. The subsequent check `cmsg->cmsg_len == CMSG_LEN(sizeof(int))` (line 972, expected 20) fails, the branch that would read the fd is skipped, and neither installed fd is closed. The for(;;) loop calls recvmsg again (non-blocking → EAGAIN → Java maps to 0 → read loop exits normally), leaving two leaked fds per message. There is no MSG_CTRUNC handling. Reachable via Epoll/KQueue DomainSocketChannel when the application opts into DomainSocketReadMode.FILE_DESCRIPTORS (non-default). Versions 4.1.135.Final and 4.2.15.Final patch the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Netty is a network application framework for development of protocol servers and clients. Prior to versions 4.1.135.Final and 4.2.15.Final, netty_unix_socket_recvFd sets msg_control to `char control[CMSG_SPACE(sizeof(int))]` (line 940) — 24 bytes on 64-bit Linux. A peer-sent SCM_RIGHTS cmsg carrying two ints has cmsg_len = CMSG_LEN(8) = 24, which fits exactly with no MSG_CTRUNC, so the kernel installs both fds in the receiving process. The subsequent check `cmsg->cmsg_len == CMSG_LEN(sizeof(int))` (line 972, expected 20) fails, the branch that would read the fd is skipped, and neither installed fd is closed. The for(;;) loop calls recvmsg again (non-blocking → EAGAIN → Java maps to 0 → read loop exits normally), leaving two leaked fds per message. There is no MSG_CTRUNC handling. Reachable via Epoll/KQueue DomainSocketChannel when the application opts into DomainSocketReadMode.FILE_DESCRIPTORS (non-default). Versions 4.1.135.Final and 4.2.15.Final patch the issue.","source":"cvelist"},{"lang":"en","text":"netty_unix_socket_recvFd sets msg_control to `char control[CMSG_SPACE(sizeof(int))]` (line 940) — 24 bytes on 64-bit Linux. A peer-sent SCM_RIGHTS cmsg carrying two ints has cmsg_len = CMSG_LEN(8) = 24, which fits exactly with no MSG_CTRUNC, so the kernel installs both fds in the receiving process. The subsequent check `cmsg->cmsg_len == CMSG_LEN(sizeof(int))` (line 972, expected 20) fails, the branch that would read the fd is skipped, and neither installed fd is closed. The for(;;) loop calls recvmsg again (non-blocking → EAGAIN → Java maps to 0 → read loop exits normally), leaving two leaked fds per message. There is no MSG_CTRUNC handling. Reachable via Epoll/KQueue DomainSocketChannel when the application opts into DomainSocketReadMode.FILE_DESCRIPTORS (non-default).","format":"markdown","source":"ghsa"}],"published":"2026-06-08T23:01:33.000Z","modified":"2026-09-10T03:50:12.439Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":4,"rating":"MEDIUM"}],"cwes":["CWE-200","CWE-772"],"affected":[{"ranges":[{"version":">= 4.2.0.Final, < 4.2.15.Final","status":"affected"},{"version":"< 4.1.135.Final","status":"affected"}],"vendor":"netty","product":"netty","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.2.0.Final","status":"affected","fixed":"4.2.15.Final"}],"ecosystem":"Maven","package":"io.netty:netty-transport-native-epoll","purl":"pkg:maven/io.netty/netty-transport-native-epoll","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.2.0.Final","status":"affected","fixed":"4.2.15.Final"}],"ecosystem":"Maven","package":"io.netty:netty-transport-native-kqueue","purl":"pkg:maven/io.netty/netty-transport-native-kqueue","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.1.135.Final"}],"ecosystem":"Maven","package":"io.netty:netty-transport-native-kqueue","purl":"pkg:maven/io.netty/netty-transport-native-kqueue","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.1.135.Final"}],"ecosystem":"Maven","package":"io.netty:netty-transport-native-epoll","purl":"pkg:maven/io.netty/netty-transport-native-epoll","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.1.135"},{"status":"affected","introduced":"4.2.0","fixed":"4.2.15"}],"vendor":"netty","product":"netty","cpe":"cpe:2.3:a:netty:netty:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/netty/netty/security/advisories/GHSA-w573-9ffj-6ff9","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/netty/netty/releases/tag/netty-4.1.135.Final","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/netty/netty/releases/tag/netty-4.2.15.Final","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45536","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/netty/netty","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-12T15:05:26.043Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45536","url":"https://www.cve.org/CVERecord?id=CVE-2026-45536","licence":"CVE Terms of Use","modified":"2026-06-12T15:05:36.411Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w573-9ffj-6ff9","url":"https://github.com/advisories/GHSA-w573-9ffj-6ff9","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:12.439Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45536","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45536","licence":"Public domain","modified":"2026-06-17T10:52:10.480Z"}],"updatedAt":"2026-11-25T22:59:24.510Z","epss":{"score":0.00193,"percentile":0.05104,"date":"2026-11-30T12:00:22.000Z"}}