Describe the bug
When parsing a malformed SCTP packet with a chunk that either
has a size labeled as 0, this will cause an infinite loop.
To Reproduce
Parse the sctp packet I described below (one with
improperly labeled chunk size).
Expected behavior
I expected the raw data in this packet to still be parsed,
rather than looping infinitely or raising an exception.
Details(please complete the following information):
OS: [e.g. Windows10, Debian, etc]
Python Version 3.8.5
malformed SCTP packet example :
0000 00 00 00 01 00 06 00 1b 17 05 9e 1c 00 00 08 00
0010 45 00 00 34 cc 09 40 00 1e 11 41 54 95 ab 7e 01
0020 3b a6 00 09 b7 51 26 ab 00 20 f3 e8 32 bd ab ae
0030 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
0040 00 00 00 00
(size of chunk is labeled as 0)
Additional context
I submitted a pull request that addresses this issue. I am using this library for cybersecurity purposes, so parsing malformed packets is useful.
Describe the bug When parsing a malformed SCTP packet with a chunk that either has a size labeled as 0, this will cause an infinite loop.
To Reproduce Parse the sctp packet I described below (one with improperly labeled chunk size).
Expected behavior I expected the raw data in this packet to still be parsed, rather than looping infinitely or raising an exception.
Details(please complete the following information):
(size of chunk is labeled as 0)
Additional context I submitted a pull request that addresses this issue. I am using this library for cybersecurity purposes, so parsing malformed packets is useful.