Fedora Account System
Red Hat Associate
Red Hat Customer
SocksInitRequestDecoder, the legacy SOCKS5 handshake decoder in the io.netty.handler.codec.socks package of netty-codec-socks, reads the NMETHODS field of the client greeting with the signed ByteBuf.readByte(). The SOCKS5 protocol defines this field as an unsigned octet. Valid wire values 0x80-0xFF (128-255 offered authentication methods) are therefore read as negative numbers. The decoder's authSchemeNum > 0 check fails for them, so it emits a successful SocksInitRequest with an empty authentication-scheme list. It consumes none of the method bytes that follow. A remote client can send a spec-legal greeting that advertises 128 or more authentication methods. The server then sees a request with no offered schemes, so authentication-scheme negotiation is bypassed or misjudged. The unconsumed method bytes remain in the buffer and are interpreted as the start of the next SOCKS message, which desynchronizes the protocol stream. Only applications that explicitly add new SocksInitRequestDecoder() to a channel pipeline are affected. This is the legacy decoder in netty-codec-socks, in versions up to and including 4.1.138.Final, and in 4.2.0.Final through 4.2.18.Final. The issue is fixed in 4.1.139.Final and 4.2.19.Final. Affected versions: <= 4.1.138.Final; >= 4.2.0.Final, <= 4.2.18.Final Patched versions: 4.1.139.Final; 4.2.19.Final CVSS: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N (5.3) CWE: CWE-115 Upstream advisory: https://github.com/netty/netty/security/advisories/GHSA-c7hc-m259-xhcr CVE requested by the Netty Project via PSIRTSUPT-32166.