openbsc.git branch master updated. 0.15.0-892-g957ceb1b7

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-commitlog@lists.osmocom.org/.

gitosis at osmocom.org gitosis at osmocom.org
Tue Oct 17 11:56:31 UTC 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Legacy: The OpenBSC GSM Base Station Controller (+MSC/HLR/SGSN)".

The branch, master has been updated
       via  957ceb1b792a274582e88ed2963dc959f5385ce0 (commit)
      from  65c6ddebff3e03fe3bdeebf225f013b0bc30773b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cgit.osmocom.org/openbsc/commit/?id=957ceb1b792a274582e88ed2963dc959f5385ce0

commit 957ceb1b792a274582e88ed2963dc959f5385ce0
Author: Pau Espin Pedrol <pespin at sysmocom.de>
Date:   Mon Oct 16 10:46:36 2017 +0200

    bsc_api: Fix NULL secondary_lchan access in handle_ass_fail
    
    Related: OW#3893
    
    Program terminated with signal SIGSEGV, Segmentation fault.
    0  gsm_lchan_name (lchan=lchan at entry=0x0) at gsm_data_shared.c:342
    (gdb) bt
    0  gsm_lchan_name (lchan=lchan at entry=0x0) at gsm_data_shared.c:342
    1  0x0805ab80 in lchan_release (lchan=0x0, sacch_deact=sacch_deact at entry=0, mode=mode at entry=RSL_REL_LOCAL_END)
        at chan_alloc.c:410
    2  0x0805c1dd in handle_ass_fail (msg=0x94142b8, conn=0x9251048) at bsc_api.c:459
    3  dispatch_dtap (msg=0x94142b8, link_id=0 '\000', conn=0x9251048) at bsc_api.c:598
    4  gsm0408_rcvmsg (msg=msg at entry=0x94142b8, link_id=0 '\000') at bsc_api.c:658
    5  0x08058ca2 in abis_rsl_rx_rll (msg=0x94142b8) at abis_rsl.c:1686
    6  abis_rsl_rcvmsg (msg=0x94142b8) at abis_rsl.c:2097
    7  0xb7e8cf9a in handle_ts1_read (bfd=0x94e8e08) at input/ipaccess.c:271
    8  ipaccess_fd_cb (bfd=0x94e8e08, what=1) at input/ipaccess.c:386
    9  0xb7ee8434 in osmo_select_main (polling=polling at entry=0) at select.c:158
    10 0x0804bd7c in main (argc=6, argv=0xbfc27144) at osmo_bsc_main.c:272
    (gdb) print lchan
    $2 = (const struct gsm_lchan *) 0x0
    
    Possible scenario in which this crash can appear:
    1- gsm0808_assign_req() calls handle_new_assignment() which sends an CHAN
    ACTIVATE msg and arms T10 timer.
    2- ACTIVATE ACK is received (handle_chan_ack), which calls
    gsm48_send_rr_ass_cmd() which sends an ASSIGNMENT CMD, and doesn't
    disable/modify T10 timer.
    3- T10 timeout is triggered (assignment_t10_timeout()), which sets
    conn->secondary_lchan = NULL
    4- Immediately after, the ASSIGNMENT FAILURE message (which might have been
    already queued) is processed in handle_ass_fail, and then the crash occurs.
    
    This race condition is not an issue for handle_ass_compl() path because there's
    this check there which would trigger most probably if secondary_lchan is NULL:
    "if (conn->secondary_lchan != msg->lchan)"
    
    Change-Id: Ied5bd90b9c06f27135a2e3c46e40d49d27d9a387

-----------------------------------------------------------------------

Summary of changes:
 openbsc/src/libbsc/bsc_api.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Legacy: The OpenBSC GSM Base Station Controller (+MSC/HLR/SGSN)



More information about the osmocom-commitlog mailing list