osmo-ttcn3-hacks/bts
Vadim Yanitskiy 31e7c67772 BTS: fix: pad LAPDm frames before sending via L1CTL
Thanks to Stefan Sperling, a critical bug was discovered in trxcon.
The problem was that length of LAPDm frames was not checked before
passing them to the libosmocoding API. So, if a received LAPDm
frame is shorter than expected (i.e. 23 bytes), then:

  - in case of xCCH, there was a heap overflow (detected by ASAN),
    so a short frame has been encoded together with some garbage
    outside the primitive buffer...

  - in case of FACCH, as the length != 23, a frame was recognised
    as a speech frame, and also encoded together with some garbage.

Since the bug is fixed (OS#3415), some TTCN-3 BTS tests started
to fail, because most likely it was assumed that trxcon would
pad the frames automatically, but it doesn't and shouldn't.

Let's automatically pad LAPDm frames with 0x2b before sending.

Change-Id: I16cba4e4179456bebabf0638760af011a27fd333
Related: OS#3418
2018-07-27 13:05:53 +00:00
..
BTS_Tests.cfg bts: add missing BTS_Tests.cfg config file 2018-07-22 15:02:08 +02:00
BTS_Tests.default Revert "detect VTY TELNET port connection failures in TTCN3 tests" 2018-07-27 13:01:26 +00:00
BTS_Tests.ttcn BTS: fix: pad LAPDm frames before sending via L1CTL 2018-07-27 13:05:53 +00:00
README.md Add README.md file for several suites 2018-06-14 18:55:36 +02:00
expected-results.xml update expected test result for TC_sacch_multi_chg 2018-07-26 20:36:55 +00:00
gen_links.sh ignore results of .ttcnpp files 2018-03-16 18:25:58 +01:00
regen_makefile.sh bts: Add TELNET/VTY module so we can interact with BTS VTY 2018-02-27 22:32:54 +01:00

README.md

BTS_Tests.ttcn

  • external interfaces
    • A-bis side: RSL (emulates BSC-side server)
    • Um side: L1CTL to control MS
    • PCU side: pcu_socket

{% dot bts_tests.svg digraph G { rankdir=LR; { rank=same; BTS, BSC}; BTS [label="IUT\nosmo-bts-trx",shape="box"]; ATS [label="ATS\nBTS_Tests.ttcn"]; BSC [label="osmo-bsc\nOML only"]; BTS -> fake_trx [label="bursts"]; fake_trx -> trxcon [label="bursts"]; trxcon -> ATS [label="bursts"];

BTS -> BSC [label="A-bis OML"]; BTS -> ATS [label="A-bis RSL"];

ATS -> BTS [label="pcu_sock"]; ATS -> BSC [label="VTY"]; ATS -> BTS [label="CTRL"]; } %}