]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Fix potential segfaults in reading OpenSSH's ASN.1 key format.
authorSimon Tatham <anakin@pobox.com>
Tue, 10 Nov 2015 18:49:51 +0000 (18:49 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 10 Nov 2015 19:05:49 +0000 (19:05 +0000)
commit5b7833cd474a24ec098654dcba8cb9509f3bf2c1
tree6bb370866adba14fbf53590a97696b7efdc4718f
parent5815d6a65af992881f5462097c9320f3a4716e0c
Fix potential segfaults in reading OpenSSH's ASN.1 key format.

The length coming back from ber_read_id_len might have overflowed, so
treat it as potentially negative. Also, while I'm here, accumulate it
inside ber_read_id_len as an unsigned, so as to avoid undefined
behaviour on integer overflow, and toint() it before return.

Thanks to Hanno Böck for spotting this, with the aid of AFL.
import.c