Bugzilla – Bug 2177
Ipv6ExtensionFragmentHeader length is initialized to a wrong value.
Last modified: 2015-09-19 10:28:32 UTC
Erroneous use of SetLength in Ipv6ExtensionFragmentHeader can lead to a 2048 extension header length. Reported by Hajar Hantouti <hajar.hantouti@gmail.com>
Pushed a temporary fix in changeset 11649:d1bbecfd11d4 Leaving the bug open to have a better fix and a more optimized code. The following code is simply a nightmare: SetLength ((i.ReadU8 () + 1) << 3); Where SetLength is m_length = (length >> 3) - 1; m_length should be protected, and sub-classes should be able to modify it directly.
Complete fix in changeset: 11673:71b37dda3fe8 m_length is now protected instead of private, allowing an easier processing by sub-options. Moreover, the LooseRouting Extension header had an hardcoded address length (nobody ever noticed this?)