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/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: sclc_rx_cldt(): Don't try to dereference user data_ie without check
......................................................................
sclc_rx_cldt(): Don't try to dereference user data_ie without check
While the SUA / SCCP2SUA code is ensuring that mandatory information
elements such as the user data IE in a CLDT message, we might still have
current or future callers of sclc_rx_cldt() that don't comply with that.
So let's make sure data_ie is valid before dereferencing it.
Change-Id: Ia102f6c4cd5c6c3f823cb219635c42b9a87765f8
Fixes: coverity CID#166942
---
M src/sccp_sclc.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c
index 7cdfac5..262b2c0 100644
--- a/src/sccp_sclc.c
+++ b/src/sccp_sclc.c
@@ -156,6 +156,11 @@
struct osmo_sccp_user *scu;
uint32_t protocol_class;
+ if (!data_ie) {
+ LOGP(DLSCCP, LOGL_ERROR, "SCCP/SUA CLDT without user data?!?\n");
+ return -1;
+ }
+
/* fill primitive */
prim = (struct osmo_scu_prim *) msgb_put(upmsg, sizeof(*prim));
param = &prim->u.unitdata;
--
To view, visit https://gerrit.osmocom.org/2434
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia102f6c4cd5c6c3f823cb219635c42b9a87765f8
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder