Skip to content

buffer overflow when adding ssh key #179

@mercury00

Description

@mercury00

Plugin is working fine for many repos, and many users (great plugin btw!).

However, I have at least one user that I continuously get this error in the logs:

remote: buffer_get_ret: trying to get more bytes 257 than in buffer 251 remote: buffer_get_string_ret: buffer_get failed remote: buffer_get_bignum2_ret: invalid bignum remote: key_from_blob: can't read rsa key remote: key_read: key_from_blob {ssh key deleted from post} failed remote: line 1 too long: ssh-rsa {the deleted key}... remote: FATAL: fingerprinting failed for 'keydir/{some users ssh key}.pub' To gitolite@{myhost}:gitolite-admin.git 282256f..3715e29 master -> master

It seems like the buffer is too small for the rsa key. Is this so? Would appreciate either a patch to increase the buffer size to valid rsa key lengths or some input on where I should look in the current code to change the buffer size so I can verify for myself if this is in fact the problem and not something else. By the way, in /keydir/ the rsa key is showing fine, it's being imported there at least and is the same as on the user's computer. It doesn't get included in .ssh/authorized keys on the gitolite user like all the other keys though, so the user is unable to checkout code, etc.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions