Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
Helium
-
None
-
None
-
Operating System: Linux
Platform: PC
-
1808
Description
When AD-SAL IPv4 class deserializes a raw packet, it deserializes the payload
as protocol header if the IP protocol number is 1 (ICMP) or 6 (TCP) or 17 (UDP).
But if an IPv4 packet is fragmented, the protocol header is present only in
the first fragment. So IPv4 class should not deserialize the payload if
fragmentation offset is not zero.
If a non-first fragment of an ICMP packet is deserialized as ICMP header,
ICMP class may corrupt the payload.
1. ICMP header is not present in non-first fragments of an ICMP packet.
But currently IPv4 class deserializes the payload as ICMP class instance
irrespective of fragmentation offset.
2. If a deserialized ICMP instance is serialized again, ICMP class always
updates the checksum field. So the computed checksum will be stored into
the payload unexpectedly if the packet is non-first fragment.
That is why IPv4 class should not set a protocol class to "payloadClass" field
unless the fragmentation offset is zero. The payload in non-first fragments
should be treated as raw bytes.