When ssh-keygen generates key which is larger than OPENSSL_RSA_MAX_MODULUS_BITS (as defined in the current OpenSSL releases) it should warn the user that the key will probably not be usable. The current OpenSSL releases check if the key is larger and the signature verification functions will fail for such keys to prevent CVE-2006-2940.
Created attachment 1843 [details] keygen-max-bits.diff limit maximum key size
Patch applied. Will be in OpenSSH 5.6 - thanks.
Move resolved bugs to CLOSED after 5.7 release