Project

General

Profile

Actions

Bug #3420

open

ranap_transp_assoc_decode() decodes X.213 NSAP address headers as IP address

Added by neels almost 6 years ago. Updated almost 3 years ago.

Status:
Stalled
Priority:
Normal
Assignee:
Target version:
-
Start date:
07/26/2018
Due date:
% Done:

30%

Spec Reference:

Description

The SysmoCell5000 series sends RAB-AssignmentResponse with X.213 NSAP addresses, which get parsed by ranap_transp_assoc_decode().
These contain a three byte header followed by the IP address, typically it is 0x350001 followed by the Ipv4 address in hex.

ranap_transp_assoc_decode() however starts at the header and decodes as 53.0.1.N where N is the first octet of the actual IPv4 address, e.g. 192.
Hence switching RTP streams to the cell fails, since obviously 53.0.1.192 is not the correct IP address.

a) fix the check for the address length, should be len == 7, not len > 7.

b) generally be stricter about the lengths.


Checklist

  • fix the check for the address length, should be len == 7, not len > 7
  • generally be stricter about the lengths, e.g. do not decode a len > 4 as IPv4
  • properly decode the X.213 NSAP header, knowing what the octets mean instead of using magic numbers and fixed data offsets
  • implement a C unit test
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)