We do not currently check the length of the caller's buffer for received packets. This creates a potential buffer overrun when iPXE is being used via the SNP or UNDI protocols. Fix by checking the buffer length and correctly returning the required length and an EFI_BUFFER_TOO_SMALL error. Reported-by: Paul McMillan <paul.mcmillan@oracle.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
| 710 |
|
710 |
|
| 711 |
|
711 |
|
| 712 |
|
712 |
|
|
713 |
|
|
| 713 |
|
714 |
|
| 714 |
|
715 |
|
| 715 |
|
716 |
|
|
|
||
| 722 |
|
723 |
|
| 723 |
|
724 |
|
| 724 |
|
725 |
|
| 725 |
|
|
|
|
726 |
|
|
| 726 |
|
727 |
|
| 727 |
|
728 |
|
| 728 |
|
729 |
|
| 729 |
|
730 |
|
| 730 |
|
731 |
|
| 731 |
|
732 |
|
| 732 |
|
|
|
| 733 |
|
733 |
|
| 734 |
|
734 |
|
|
735 |
|
|
|
736 |
|
|
|
737 |
|
|
|
738 |
|
|
|
739 |
|
|
|
740 |
|
|
|
741 |
|
|
|
742 |
|
|
|
743 |
|
|
|
744 |
|
|
|
745 |
|
|
| 735 |
|
746 |
|
| 736 |
|
747 |
|
| 737 |
|
|
|
| 738 |
|
748 |
|
| 739 |
|
749 |
|
| 740 |
|
750 |
|
|
|
||
| 759 |
|
769 |
|
| 760 |
|
770 |
|
| 761 |
|
771 |
|
|
772 |
|
|
| 762 |
|
773 |
|
| 763 |
|
774 |
|
| 764 |
|
775 |
|