An OpenSSL change addresses CVE-2026-121481, a buffer overflow in EVP_EncodeBlock() triggered by invalid or excessively large input lengths. The proposed fix checks for NULL input or output buffers, negative lengths, and encoded output sizes that cannot fit in an int, then returns an error rather than proceeding unsafely. The contributor also proposes rejecting NULL buffers and negative lengths in EVP_DecodeBlock(), correcting an insufficient length check in the HTTP client’s base64 encoder, documenting the behavior, and adding tests. The issue can reportedly be triggered through openssl s_client with a very large -proxy_pass value; GOST accepts such passwords, which can be supplied through an environment variable to avoid command-line length limits. The security advisory was still pending when the discussion was recorded.
Reviewers raised compatibility and completeness concerns, so the change was not yet settled. One requested that callers such as PEM_SignFinal() and NETSCAPE_SPKI_b64_encode() check the encoder’s return value; another suggested handling those call sites separately unless they can encounter the new failures. Reviewers also questioned returning -1, since third-party code might convert it to an unsigned size, and suggested returning 0 instead. The contributor argued that 0 already means successful empty output and that EVP_DecodeBlock() uses -1 for existing errors, making -1 the clearer consistent error result. The pull request remained open and under review, with requested changes.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.