Change in osmo-bsc[master]: cipher mode reject: send proper cause codes

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/.

osmith gerrit-no-reply at lists.osmocom.org
Tue Oct 23 12:26:20 UTC 2018


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11438


Change subject: cipher mode reject: send proper cause codes
......................................................................

cipher mode reject: send proper cause codes

bssmap_handle_cipher_mode() had code paths doing "goto reject" without setting
a meaningful cause value.

Related: OS#3186
Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/38/11438/1

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 1e97f33..9419f56 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -444,6 +444,7 @@
 
 	if (conn->ciphering_handled) {
 		LOGP(DMSC, LOGL_ERROR, "Already seen ciphering command. Protocol Error.\n");
+		reject_cause = GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC;
 		goto reject;
 	}
 
@@ -452,6 +453,7 @@
 	tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0);
 	if (!TLVP_PRESENT(&tp, GSM0808_IE_ENCRYPTION_INFORMATION)) {
 		LOGP(DMSC, LOGL_ERROR, "IE Encryption Information missing.\n");
+		reject_cause = GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING;
 		goto reject;
 	}
 
@@ -464,6 +466,7 @@
 	len = TLVP_LEN(&tp, GSM0808_IE_ENCRYPTION_INFORMATION);
 	if (len < 1) {
 		LOGP(DMSC, LOGL_ERROR, "IE Encryption Information is too short.\n");
+		reject_cause = GSM0808_CAUSE_INCORRECT_VALUE;
 		goto reject;
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/11438
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia608fa34a6a2d3035a66d05fbc38553ac5186804
Gerrit-Change-Number: 11438
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181023/bccf4075/attachment.htm>


More information about the gerrit-log mailing list