logoalt Hacker News

dapperdrakeyesterday at 9:00 AM1 replyview on HN

Confer the recent bug related to goto-error handling in OpenSSH where the "additional" error return value wasn’t caught and allowed a security bypass accepting a failed key.

Cleanup is good. Jumping around with "goto" confused most people in practice. It seems highly likely that most programmers model "defer" differently in their minds.

EDIT:

IIRC it was CVE-2025-26465. Read the code and the patch.


Replies

ueckeryesterday at 9:08 AM

It is not clear to me that defer helps here. The issue is management of state (the return value) not control flow.

show 1 reply