ssh-agent: record failed session-bind attempts
authordjm <djm@openbsd.org>
Mon, 18 Dec 2023 14:48:08 +0000 (14:48 +0000)
committerdjm <djm@openbsd.org>
Mon, 18 Dec 2023 14:48:08 +0000 (14:48 +0000)
commitee6c82a8e7dbc872765bf4e5ff071275d35890c3
tree48605d0e24b224140a24e888ff37ff6a8ba412e1
parentba05a7aae989020b8d05cc93cc6200109bba5a7b
ssh-agent: record failed session-bind attempts

Record failed attempts to session-bind a connection and refuse signing
operations on that connection henceforth.

Prevents a future situation where we add a new hostkey type that is not
recognised by an older ssh-agent, that consequently causes session-bind
to fail (this situation is only likely to arise when people mix ssh(1)
and ssh-agent(1) of different versions on the same host). Previously,
after such a failure the agent socket would be considered unbound and
not subject to restriction.

Spotted by Jann Horn
usr.bin/ssh/ssh-agent.c