Commit 70065d8
committed
Fix size_t underflow in ICMPv6 echo reply handler
prvProcessICMPMessage_IPv6() subtracted sizeof(ICMPEcho_IPv6_t) from
the IPv6 Payload Length without checking that the payload is at least
that large. When Payload Length is 0, the size_t subtraction wraps to
SIZE_MAX, causing the verification loop to read far past the buffer.
Add a minimum length check before the subtraction.1 parent fc68874 commit 70065d8
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1081 | 1081 | | |
1082 | 1082 | | |
1083 | 1083 | | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1084 | 1089 | | |
1085 | 1090 | | |
1086 | 1091 | | |
| |||
0 commit comments