Commit 4fd5caf
committed
BUG/MEDIUM: htx: Fix htx_xfer() to consume more data than expected
When an htx DATA block is partially transfer, we must take care to remove
exactly the copied size. To do so, we must save the size of the last block
value copied and not rely on the last data block after the copy. Indeed,
data can be merged with an existing DATA block, so the last block size can
be larger than the last part copied.
Because of this issue, it is possible to remove more data than
expected. Worse, this could lead to a crash by performing an integer
overflow on the block size.
No backport needed.1 parent d26bd9f commit 4fd5caf
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
736 | 737 | | |
737 | 738 | | |
738 | 739 | | |
| 740 | + | |
739 | 741 | | |
740 | 742 | | |
741 | 743 | | |
| |||
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
754 | 760 | | |
755 | 761 | | |
756 | 762 | | |
757 | 763 | | |
758 | | - | |
759 | | - | |
| 764 | + | |
| 765 | + | |
760 | 766 | | |
761 | 767 | | |
762 | 768 | | |
763 | 769 | | |
764 | 770 | | |
765 | 771 | | |
| 772 | + | |
766 | 773 | | |
767 | 774 | | |
768 | 775 | | |
| |||
772 | 779 | | |
773 | 780 | | |
774 | 781 | | |
775 | | - | |
| 782 | + | |
776 | 783 | | |
777 | 784 | | |
778 | 785 | | |
| |||
784 | 791 | | |
785 | 792 | | |
786 | 793 | | |
| 794 | + | |
787 | 795 | | |
788 | 796 | | |
789 | 797 | | |
790 | 798 | | |
791 | 799 | | |
792 | 800 | | |
| 801 | + | |
793 | 802 | | |
794 | 803 | | |
795 | 804 | | |
| |||
848 | 857 | | |
849 | 858 | | |
850 | 859 | | |
851 | | - | |
| 860 | + | |
852 | 861 | | |
853 | 862 | | |
854 | 863 | | |
| |||
0 commit comments