Created attachment 2972 [details] Patch to pass ciphers by name rather than by virtual address The newkeys_(from|to)_blob() functions currently pass a pointer to the static cipher structure between processes. This works as long as pointers are opaque integer data. With upcoming pointer integrity schemes such as CHERI (which ensures pointer derivations are valid with hardware tags) this no longer works and the pointer is instantiated out of thin air from the perspective of the receiving process. Given the current structure of the cipher code, it's trivial to pass the name instead as is done in the attached patch. This change appears to be sufficient to run OpenSSH with hardware enforced memory bounds on CHERI.
Created attachment 2997 [details] revised diff enc->name already contains the cipher name, so I don't think it's necessary to pass it again. It probably was on the version that you based your patch on, but we've since removed SSHv1 support and with it all ciphers that were not explicitly identified by name.
Patch applied. This will be in openssh-7.6
closing resolved bugs as of 8.6p1 release