gnome-keyring crashes on ssh-agent access on aarch64
I'm using mate desktop on aarch64 (M1 macbook air) with asahi linux. Using ssh-agent included in gnome-keyring-daemon always worked fine, and then suddenly started to fail strangely (core dump with nonsenical stack) with SIGILL. When I attached to a debug build with gdb, I was able to find the offending line in daemon/ssh-agent/gkd-ssh-agent-service.c:187
if (egg_buffer_get_byte (req, 4, NULL, &op) &&
op <= GKD_SSH_OP_MAX && operations[op] != NULL)
This clearly needs to be < GKD_SSH_OP_MAX, it tried to access element with index 27 when it crashes. Not sure how this could ever work (the code hasn't changed in 4 years)? Maybe on most systems there is a null byte directly after the array? Replacing the <= with < fixes the crash.