Fix read at invalid address in X509 extension parser.

When encountering an extension unknown to OpenSSL, we would read from
the wrong memory location. Also added a testcase to prevent this specific
case from happening again.
This commit is contained in:
Johanna Amann 2018-06-04 11:43:20 -07:00
parent 19b893a5bc
commit a891517762
3 changed files with 16 additions and 1 deletions

View file

@ -0,0 +1,11 @@
# @TEST-EXEC: bro -C -r $TRACES/tls/ocsp-stapling.trace %INPUT
# @TEST-EXEC: btest-diff .stdout
event x509_extension(f: fa_file, ext: X509::Extension)
{
if ( ext$oid != "1.3.6.1.5.5.7.1.12" )
return;
print ext$short_name;
print ext$value;
}