Commit 445598b
Fix memory leak from zero-length DTLS fragments.
The |pqueue_insert| function can fail if one attempts to insert a
duplicate sequence number. When handling a fragment of an out of
sequence message, |dtls1_process_out_of_seq_message| would not call
|dtls1_reassemble_fragment| if the fragment's length was zero. It would
then allocate a fresh fragment and attempt to insert it, but ignore the
return value, leaking the fragment.
This allows an attacker to exhaust the memory of a DTLS peer.
Fixes CVE-2014-3507
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>1 parent 338a5e7 commit 445598b
1 file changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
608 | 611 | | |
609 | 612 | | |
610 | 613 | | |
| |||
682 | 685 | | |
683 | 686 | | |
684 | 687 | | |
685 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
686 | 694 | | |
687 | 695 | | |
688 | 696 | | |
| |||
740 | 748 | | |
741 | 749 | | |
742 | 750 | | |
743 | | - | |
| 751 | + | |
744 | 752 | | |
745 | 753 | | |
746 | 754 | | |
| |||
769 | 777 | | |
770 | 778 | | |
771 | 779 | | |
772 | | - | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
773 | 789 | | |
774 | 790 | | |
775 | 791 | | |
| |||
0 commit comments