smoltcp-rs / smoltcp

a smol tcp/ip stack
BSD Zero Clause License
3.82k stars 433 forks source link

fix: 6lowpan could panic when frag datagram_size < 40 #997

Closed thvdveld closed 2 months ago

thvdveld commented 2 months ago

6LoWPAN fragmentation could panic when the datagram_size in the fragmentation header is less than 40. When converting 6LoWPAN to IPv6 a minimum size of 40 bytes is required to put the IPv6 header in the buffer.