ROHC library mishandles non-IPv4/IPv6 packets

Bug #560589 reported by Didier Barvaux
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rohc
Status tracked in Rohc-main
1.2.x
Fix Released
High
Didier Barvaux
1.3.x
Fix Released
High
Didier Barvaux
Rohc-main
Fix Released
High
Didier Barvaux

Bug Description

When compressing non-IP packets or IP packets in which IP version is not 4 or 6, the ROHC compressor fails with the following messages:
  [ip.c:31 ip_create()] bad IP version (4)
  [ERROR] [rohc_comp.c:172 rohc_compress()] cannot create the outer IP header

ROHC library version: 1.3.0
Expected result: the packets should be compressed using the Uncompressed profile.
Reproductible: always, the attached traffic capture contains IP packets in which IP version is 5. It can be used to reproduce the problem.

Tags: library
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Confirmed in branch 1.3.x.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Also affects branch 1.2.x.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Also affects trunk.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

While parsing the IP headers, malfomed IP headers should not stop the compression process. The packet should be flagged as non-IP, then the Uncompressed compression profile should be selected.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :
Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Fixed in branch 1.3.x. See http://bazaar.launchpad.net/~didier-barvaux/rohc/1.3.x/revision/138. The correction is the same as branch 1.2.x.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Fixed in trunk. See http://bazaar.launchpad.net/~didier-barvaux/rohc/main/revision/145. The correction is globally the same as branches 1.2.x and 1.3.x except that:
 - I added some debug traces in src/comp/rohc_comp.c,
 - I added some doxygen comments and assertions in code of ip.c to avoid mis-use of the functions
   related to IP packets,
 - I made the c_get_profile_from_packet() function static in src/comp/rohc_comp.c.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

In all branches, the attached PCAP traffic capture was used to create a new non-regression tests. It is located in the sub-directory test/report/samples/ipvx/ as the PCAP contains IP packet whose version is not 4 nor 6.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Fix released in version 1.3.1.

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Fix released in version 1.2.2.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.