Hi There,
I think I tracked down a bug in udp.c
I'm using MQX 4.1.1 along with the IPv6 Patch, and compiling RTCS with -Os
Using this, my devices crashes when receiving an IPv6 UDP multicast package, targeting a port I'm not listening to.
I will add the package 'of death' to this posting as tcpdump (pcap) file. I'm using tcpreplay to invoke the attack like this:
$ sudo tcpreplay --intf1=eth0 ~/Desktop/ipv6_udp_multicast_crash.pcapng
This bug vanishes when wrapping an RTCS function called UDP_service6() in -O0 pragmas, like this:
#pragma GCC optimize ("O0")
#if RTCSCFG_ENABLE_IP6
void UDP_service6
[...]
#endif
#pragma GCC optimize ("Os")
Can't say what's happening exactly, and what goes south when having the complete udp.c optimized by -Os, hope I can deliver further information later on...
Does anyone have a clue, or a suggestion for me?
Thanks a lot,
Martin
Original Attachment has been moved to: ipv6_udp_multicast_crash.pcapng.zip