Bug #4483
Updated by pespin about 4 years ago
First time I tested osmo-gsm-tester.git Change-Id Idd0b5bf8769d693480268c0a0b89dbfd63779e48, which sets osmo-pcu VTY cfg to use "egprs only" when EGPRS is enabled by the scenario, I got a crash (test ping.py) in osmo-bts-trx while the modem was PS attaching to the network:
<pre>
20200406183348272 DTRX <000b> trx_if.c:122 phy0.0: Clock indication: fn=50053
20200406183348272 DL1C <0006> scheduler_trx.c:1787 TRX Clock Ind: elapsed_us=1000036, elapsed_fn=217, error_us=-1419
20200406183348272 DL1C <0006> scheduler_trx.c:1805 GSM clock jitter: -2452us (elapsed_fn=0)
20200406183348964 DPCU <0009> pcu_sock.c:391 Sending RACH indication: qta=-2, ra=113, fn=50198
20200406183349270 DTRX <000b> trx_if.c:122 phy0.0: Clock indication: fn=50269
20200406183349270 DL1C <0006> scheduler_trx.c:1787 TRX Clock Ind: elapsed_us= 998125, elapsed_fn=216, error_us=+1285
20200406183349270 DL1C <0006> scheduler_trx.c:1805 GSM clock jitter: -3803us (elapsed_fn=0)
=================================================================
==12388==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7fa20b9ab8d0 at pc 0x7fa20b982894 bp 0x7ffdfea8b9c0 sp 0x7ffdfea8b9b8
READ of size 1 at 0x7fa20b9ab8d0 thread T0
#0 0x7fa20b982893 in gsm0503_mcs1_dl_interleave /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/coding/gsm0503_interleaving.c:165
#1 0x7fa20b994f1a in egprs_type3_map /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/coding/gsm0503_coding.c:1179
#2 0x7fa20b994f1a in gsm0503_pdtch_egprs_encode /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/coding/gsm0503_coding.c:1392
#3 0x558d8ad7ebe3 in tx_pdtch_fn /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/osmo-bts/src/osmo-bts-trx/scheduler_trx.c:280
#4 0x558d8ada0119 in _sched_dl_burst /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/osmo-bts/src/common/scheduler.c:1188
#5 0x558d8ad7c4f7 in trx_sched_fn /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/osmo-bts/src/osmo-bts-trx/scheduler_trx.c:1568
#6 0x558d8ad7cb3a in trx_fn_timer_cb /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/osmo-bts/src/osmo-bts-trx/scheduler_trx.c:1672
#7 0x7fa209fd2bc6 in osmo_fd_disp_fds /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/select.c:227
#8 0x7fa209fd2bc6 in _osmo_select_main /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/select.c:265
#9 0x7fa209fd5bfa in osmo_select_main /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/select.c:274
#10 0x558d8ae2242b in bts_main /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/osmo-bts/src/common/main.c:354
#11 0x7fa208a732e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#12 0x558d8ad6aa39 in _start (/home/jenkins/workspace/osmo-gsm-tester_manual-run/trial-263/inst/osmo-bts/bin/osmo-bts-trx+0x131a39)
0x7fa20b9ab8d0 is located 48 bytes to the left of global variable 'gsm0503_pdtch_edge_hl_hn_sbit' defined in 'gsm0503_tables.c:60:14' (0x7fa20b9ab900) of size 24
0x7fa20b9ab8d0 is located 0 bytes to the right of global variable 'gsm0503_usf2six' defined in 'gsm0503_tables.c:66:14' (0x7fa20b9ab8a0) of size 48
SUMMARY: AddressSanitizer: global-buffer-overflow /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/coding/gsm0503_interleaving.c:165 in gsm0503_mcs1_dl_interleave
Shadow bytes around the buggy address:
0x0ff4c172d6c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff4c172d6d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff4c172d6e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 04 f9 f9
0x0ff4c172d6f0: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff4c172d700: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0ff4c172d710: f9 f9 f9 f9 00 00 00 00 00 00[f9]f9 f9 f9 f9 f9
0x0ff4c172d720: 00 00 00 f9 f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9
0x0ff4c172d730: 00 00 00 f9 f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9
0x0ff4c172d740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff4c172d750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0ff4c172d760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==12388==ABORTING
</pre>
Find attached the run directory archived with all logs and pcaps.