Bug #6377
openipa: Failure decoding ipa frames split between several tcp packets
90%
Description
This happens when a lot of IPA concurrent clients send messages and end up in the same TCP packet due to naggle algorithm.
When that happens, ipa code in osmo_ss7 fails to decode in osmo-epdg:
*DBG* epdg_ue_fsm_262424287925697 receive call {auth_request,33,"internet"} from <0.204.0> in state state_new *DBG* epdg_ue_fsm_262424287925697 send ok to <0.204.0> *DBG* gsup_server new state {gsups_state,#Port<0.16>,4222,#Port<0.19>, {ipa_ccm_options,"EPDG-00-00-00-00-00-00", "0/0/0","00:00:00:00:00:00","00:00:00:00:00:00", "00:00:00:00:00:00","00:00:00:00:00:00", "00:00:00:00:00:00","EPDG-00-00-00-00-00-00", false}, {set,6,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[], []}, {{[],[],[],[], [{gsups_ue,<<"262429242370912">>,<0.240.0>}], [], [{gsups_ue,<<"262423473100631">>,<0.243.0>}], [],[], [{gsups_ue,<<"262423491582839">>,<0.244.0>}], [],[], [{gsups_ue,<<"262424287925697">>,<0.248.0>}], [{gsups_ue,<<"262426121377808">>,<0.245.0>}], [{gsups_ue,<<"262426512097609">>,<0.246.0>}], []}}}} *DBG* epdg_ue_fsm_262424287925697 consume call {auth_request,33,"internet"} from <0.204.0> in state state_new => state_wait_auth_res p *DBG* gsup_server got {ipa,#Port<0.19>, {osmo,5}, #{imsi => <<"262425921669062">>, message_type => send_auth_info_req, pdp_info_list => [#{access_point_name => "internet", pdp_address => #{address => #{},pdp_type_nr => 33, pdp_type_org => 241}, pdp_context_id => 0}]}} *DBG* epdg_ue_fsm_262425921669062 enter epdg_ue_fsm in state state_new 17:39:21.043 [error] Error in process <0.222.0> with exit value: {{badmatch,<<0,32,238,5,8,1,8,98,66,98,68,72,146,87,244,5,18,16,1,0,17,2,241,33,18>>},[{ipa_proto,split_ipa_msg,1,[{file,"/tmp/osmo- epdg/_build/default/lib/osmo_ss7/src/ipa_proto.erl"},{line,135}]},{ipa_proto,process_rx_ipa_msg,4,[{file,"/tmp/osmo-epdg/_build/defa ult/lib/osmo_ss7/src/ipa_proto.erl"},{line,182}]},{ipa_proto,loop,3,[{file,"/tmp/osmo-epdg/_build/default/lib/osmo_ss7/src/ipa_proto .erl"},{line,269}]}]}
Files
Updated by pespin about 2 months ago
- File ipa_gsup_bug.pcap.gz ipa_gsup_bug.pcap.gz added
Updated by pespin about 2 months ago
- File 0001-GSM-IPA-properly-handle-PDUs-spanning-multiple-TCP-s.patch 0001-GSM-IPA-properly-handle-PDUs-spanning-multiple-TCP-s.patch added
Attaching patch from fixeria with a few fixes to get IPA reassembly working in wireshark.
So, the encoding is fine, but the decoding in osmo_ss7 is then buggy and needs to be fixed.
Updated by fixeria about 2 months ago
pespin wrote in #note-2:
Attaching patch from fixeria with a few fixes to get IPA reassembly working in wireshark.
So, the encoding is fine, but the decoding in osmo_ss7 is then buggy and needs to be fixed.
FYI: https://gitlab.com/wireshark/wireshark/-/merge_requests/14588
Updated by pespin about 2 months ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
WIP patches for osmo_ss7.git here:
remote: https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/36094 cosmetic: ipa_proto.erl: Fix trailing whitespace [NEW]
remote: https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/36095 ipa_proto.erl: Implement TCP/IPA reassembly [NE
Updated by pespin about 2 months ago
- Status changed from In Progress to Feedback
- % Done changed from 50 to 90
Submitted an updated version of https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/36095 which is verified to fix the issue.