pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/29908 )

Change subject: osmux: Fix null ptr dereference sending UL data before the 
remote is configured
......................................................................

osmux: Fix null ptr dereference sending UL data before the remote is configured

Related: SYS#6161
Change-Id: I5d7971c0ed9b22d35d8965af54031a43c6388762
---
M src/common/osmux.c
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/common/osmux.c b/src/common/osmux.c
index 3f137e5..83730ce 100644
--- a/src/common/osmux.c
+++ b/src/common/osmux.c
@@ -493,6 +493,12 @@
        rtph = (struct rtp_hdr *)msgb_data(msg);
        rtph->marker = marker;

+       /* Avoid using the osmux.in if not yet connected. */
+       if (!lchan_osmux_connected(lchan)) {
+               msgb_free(msg);
+               return -1;
+       }
+
        while ((rc = osmux_xfrm_input(lchan->abis_ip.osmux.in, msg,
                                      lchan->abis_ip.osmux.remote_cid)) > 0) {
                /* batch full, build and deliver it */

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29908
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I5d7971c0ed9b22d35d8965af54031a43c6388762
Gerrit-Change-Number: 29908
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to