Serguey Asael Shinder: Netty now rejects SPDY frames of 16 MiB or more instead of writing a corrupt length
Netty merged a cluster of small fixes on 13 and 14 November, across the 4.1, 4.2 and 5.0 lines. Read together, most of them do the same thing: they make the library refuse a value it cannot honour, instead of accepting it and doing something else.
The clearest case is pull request 18412. The SPDY frame length is a 24-bit field, and SpdyFrameEncoder wrote it with writeMedium without checking. A DATA frame with a 16,777,216-byte payload therefore went out with a length of 0, followed by the whole payload, and the peer would parse the rest of that payload as further frames. SYN_STREAM, SYN_REPLY and HEADERS frames with large header blocks behaved the same way. The fix checks the length against SpdyCodecUtil.SPDY_MAX_LENGTH in every encode method whose size depends on input, before the buffer is allocated, and throws IllegalArgumentException for a frame it cannot represent. The author notes the issue was found by an LLM-enhanced static analysis engine and verified by hand.
Pull request 18414 concerns the QUIC SSL context. SSLSessionContext.setSessionTimeout(int) and setSessionCacheSize(int) are specified to throw IllegalArgumentException for negative values, and Netty's OpenSslSessionContext already did. The QUIC implementation stored the value instead. On a server context that value went to BoringSSL's SSL_CTX_set_timeout, which takes an unsigned 32-bit timeout, so -1 became a session lifetime of about 136 years. Both setters now use ObjectUtil.checkPositiveOrZero and keep the previous settings on rejection.

Two fixes go the other way: they make a non-positive setting work again rather than fail. Since 4.2.13, BrotliDecoder passed the system property io.netty.compression.defaultMaxForwardBytes to a constructor that requires a positive buffer size, so with the property at 0 or below, HttpContentDecompressor could not decode br content at all (18378). ZstdDecoder had a quieter version of the bug: a threshold of 0 gave output buffers a capacity of 0, so a zstd body came out empty without an error, and below 0 the allocation failed (18289). Both now treat the threshold and the pull size separately, falling back to 64 KiB for pulls.
Other merges in the same window fix the address length for batched datagrams sent to abstract Unix domain sockets, where a single sendto worked and a batch silently did not reach the peer (18394), and query SSL_pending lazily in the OpenSSL engine's unwrap, after a production profile put that JNI call at about 1.7% of CPU samples (18376).
What I take from the list is the pattern of the bugs rather than any single fix. A 24-bit field, an unsigned native parameter, a threshold of zero: each is a boundary where Java's int can hold a value the layer below cannot. The SPDY and QUIC fixes check at that boundary. The zstd one is a reminder that the failure without the check is not always an exception; sometimes it is an empty body and a passing request.