commit | fe6731181c7db6455490c62b3e3f3f051fbdb09f | [log] [tgz] |
---|---|---|
author | Neels Hofmeyr <neels@hofmeyr.de> | Fri Aug 24 17:43:45 2018 +0200 |
committer | Neels Hofmeyr <neels@hofmeyr.de> | Fri Aug 24 17:50:22 2018 +0200 |
tree | 4498ff4c79afbe28fdb9e5af59de2624125bbe12 | |
parent | 67902bbeb973b9da8a390bb5aacb3dba7ece1e15 [diff] |
ipa: don't crash on missing IPA ID GET message ipaccess_bts_read_cb() only initializes signalling links if it has received an IPA ID GET message on it, and so far happily accesses the uninitialized sign_links list anyway if it hasn't. Reproduce: simply don't send an IPA ID GET message when connecting to an IPA server run by libosmo-abis, then continue to use the link --> segfault. Fix the segfault: make sure that the e1inp_ts' type has been set, i.e. that e1inp_ts_config_sign() has been called and the sign_links llist is initialized, before calling e1inp_lookup_sign_link() on it. ../../../src/libosmo-abis/src/e1_input.c:511:2: runtime error: member access within null pointer of type 'struct e1inp_sign_link' ../../../src/libosmo-abis/src/e1_input.c:512:11: runtime error: member access within null pointer of type 'struct e1inp_sign_link' ASAN:SIGSEGV ================================================================= ==5702==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000038 (pc 0x7f28a379ea34 sp 0x7ffd7d8933f0 bp 0x62e000000a98 T0) #0 0x7f28a379ea33 in e1inp_lookup_sign_link ../../../src/libosmo-abis/src/e1_input.c:512 #1 0x7f28a37b97d4 in ipaccess_bts_read_cb ../../../src/libosmo-abis/src/input/ipaccess.c:778 #2 0x7f28a37b0277 in ipa_client_read ../../../src/libosmo-abis/src/input/ipa.c:76 #3 0x7f28a37b0277 in ipa_client_fd_cb ../../../src/libosmo-abis/src/input/ipa.c:139 #4 0x7f28a2ac1a34 in osmo_fd_disp_fds ../../../src/libosmocore/src/select.c:217 #5 0x7f28a2ac1a34 in osmo_select_main ../../../src/libosmocore/src/select.c:257 #6 0x444ba3 in bts_main ../../../../src/osmo-bts/src/common/main.c:364 #7 0x7f28a17ddb44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b44) #8 0x405e54 (/usr/local/bin/osmo-bts-trx+0x405e54) Related: OS#3498 Change-Id: I2487ca37a0fe9aa56733f66bcad9dcf91fc11144
This repository contains a set of C-language libraries that form the A-bis interface library of Osmocom Open Source Mobile Communications projects such as OpenBSC / OsmoBSC.
Historically, a lot of this code was developed as part of the OpenBSC project, but which are of a more generic nature and thus useful to (at least) other programs that we develop in the sphere of Free Software / Open Source mobile communications.
The libosmo-abis.git repository build multiple libraries:
The official homepage of the project is https://osmocom.org/projects/libosmo-abis
You can clone from the official libosmo-abis.git repository using
git clone git://git.osmocom.org/libosmo-abis.git
There is a cgit interface at http://git.osmocom.org/libosmo-abis/
There is no Doxygen-generated API documentation yet for this library. It would be great to some day have it, comparable to libosmocore.
Discussions related to libosmo-abis are happening on the openbsc@lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/openbsc for subscription options and the list archive.
Please observe the Osmocom Mailing List Rules when posting.
Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
We us a gerrit based patch submission/review process for managing contributions. Please see https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details
The current patch queue for libosmo-abis can be seen at https://gerrit.osmocom.org/#/q/project:libosmo-abis+status:open