diff options
| author | jsing <> | 2014-10-22 15:29:31 +0000 | 
|---|---|---|
| committer | jsing <> | 2014-10-22 15:29:31 +0000 | 
| commit | c2e047559db4077d59c47364a006d7b0e33bde76 (patch) | |
| tree | da946aaf9f31b1dc29c2b8cb33c8e544f761c500 /src/lib/libssl/d1_pkt.c | |
| parent | 5746ae595318fcc502641bd37fd223911482aa77 (diff) | |
| download | openbsd-c2e047559db4077d59c47364a006d7b0e33bde76.tar.gz openbsd-c2e047559db4077d59c47364a006d7b0e33bde76.tar.bz2 openbsd-c2e047559db4077d59c47364a006d7b0e33bde76.zip | |
Avoid a NULL pointer dereference that can be triggered by
SSL3_RT_HANDSHAKE replays.
Reported by Markus Stenberg <markus.stenberg at iki.fi> - thanks!
ok deraadt@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/d1_pkt.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 6f3ee26217..7aa5aac752 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_pkt.c,v 1.35 2014/10/18 16:13:16 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.36 2014/10/22 15:29:31 jsing Exp $ */ | 
| 2 | /* | 2 | /* | 
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu | 
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 
| @@ -586,7 +586,7 @@ again: | |||
| 586 | * would be dropped unnecessarily. | 586 | * would be dropped unnecessarily. | 
| 587 | */ | 587 | */ | 
| 588 | if (!(s->d1->listen && rr->type == SSL3_RT_HANDSHAKE && | 588 | if (!(s->d1->listen && rr->type == SSL3_RT_HANDSHAKE && | 
| 589 | *p == SSL3_MT_CLIENT_HELLO) && | 589 | p != NULL && *p == SSL3_MT_CLIENT_HELLO) && | 
| 590 | !dtls1_record_replay_check(s, bitmap)) { | 590 | !dtls1_record_replay_check(s, bitmap)) { | 
| 591 | rr->length = 0; | 591 | rr->length = 0; | 
| 592 | s->packet_length=0; /* dump this record */ | 592 | s->packet_length=0; /* dump this record */ | 
