Change in osmo-msc[master]: SMPP: Don't accept password or system-id exceeding spec length

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri May 10 07:07:01 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13930 )

Change subject: SMPP: Don't accept password or system-id exceeding spec length
......................................................................

SMPP: Don't accept password or system-id exceeding spec length

The SMPP 3.4 specification defines the password field as a
"Variable-length octet string with maximum length of 9", and according
to table 3-1 this means including the terminating NUL-byte.

However, OsmoMSC allows to configure longer passwords in the ESME
configuration. Those passwords will then never match, as libsmpp34
performs length validation and generates a parser error for anyone
trying to send a longer password via SMPP.

The same applies for system-id, where we have to permit only 15
characters with zero termination, but not 16 characters.

Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354
Closes: OS#3166
---
M src/libmsc/smpp_smsc.h
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

Objections:
  Pau Espin Pedrol: I would prefer this is not merged as is



diff --git a/src/libmsc/smpp_smsc.h b/src/libmsc/smpp_smsc.h
index 1c9eae6..b26d011 100644
--- a/src/libmsc/smpp_smsc.h
+++ b/src/libmsc/smpp_smsc.h
@@ -13,8 +13,8 @@
 #include <smpp34_structs.h>
 #include <smpp34_params.h>
 
-#define SMPP_SYS_ID_LEN	16
-#define SMPP_PASSWD_LEN	16
+#define SMPP_SYS_ID_LEN	15
+#define SMPP_PASSWD_LEN	8
 
 #define MODE_7BIT	7
 #define MODE_8BIT	8

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354
Gerrit-Change-Number: 13930
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190510/be2e2a0e/attachment.html>


More information about the gerrit-log mailing list