Commit 9871417
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 fc7804e commit 9871417
1 file changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
614 | 617 | | |
615 | 618 | | |
616 | 619 | | |
| |||
688 | 691 | | |
689 | 692 | | |
690 | 693 | | |
691 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
692 | 700 | | |
693 | 701 | | |
694 | 702 | | |
| |||
746 | 754 | | |
747 | 755 | | |
748 | 756 | | |
749 | | - | |
| 757 | + | |
750 | 758 | | |
751 | 759 | | |
752 | 760 | | |
| |||
775 | 783 | | |
776 | 784 | | |
777 | 785 | | |
778 | | - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
779 | 795 | | |
780 | 796 | | |
781 | 797 | | |
| |||
0 commit comments