Skip to content
Commit f3f3cc70 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

ssh-agent: Make public key parsing robuster

Previously, _gkd_ssh_agent_parse_public_key() accepted OpenSSH v1
keys, because the second component of the key line looks like a valid
base64 blob:

  2048 65537 2444136...

This patch checks that the component is really base64 encoded, by
checking the length is a multiple of 4.

Note that this solution is not perfect, as there could be a key with a
public exponent whose decimal length is multiple of 4.  More thorough
approach would be to call ssh-keygen -l on each public key.

https://bugzilla.gnome.org/show_bug.cgi?id=795699
parent 0b4e2e89
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment