<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13930">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">SMPP: Don't accept password or system-id exceeding spec length<br><br>The SMPP 3.4 specification defines the password field as a<br>"Variable-length octet string with maximum length of 9", and according<br>to table 3-1 this means including the terminating NUL-byte.<br><br>However, OsmoMSC allows to configure longer passwords in the ESME<br>configuration. Those passwords will then never match, as libsmpp34<br>performs length validation and generates a parser error for anyone<br>trying to send a longer password via SMPP.<br><br>The same applies for system-id, where we have to permit only 15<br>characters with zero termination, but not 16 characters.<br><br>Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354<br>Closes: OS#3166<br>---<br>M src/libmsc/smpp_smsc.h<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/30/13930/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/smpp_smsc.h b/src/libmsc/smpp_smsc.h</span><br><span>index 1c9eae6..b26d011 100644</span><br><span>--- a/src/libmsc/smpp_smsc.h</span><br><span>+++ b/src/libmsc/smpp_smsc.h</span><br><span>@@ -13,8 +13,8 @@</span><br><span> #include <smpp34_structs.h></span><br><span> #include <smpp34_params.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define SMPP_SYS_ID_LEN  16</span><br><span style="color: hsl(0, 100%, 40%);">-#define SMPP_PASSWD_LEN       16</span><br><span style="color: hsl(120, 100%, 40%);">+#define SMPP_SYS_ID_LEN     15</span><br><span style="color: hsl(120, 100%, 40%);">+#define SMPP_PASSWD_LEN     8</span><br><span> </span><br><span> #define MODE_7BIT      7</span><br><span> #define MODE_8BIT  8</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13930">change 13930</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13930"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I81ef593e84bf1e15f6746386fc145495fae29354 </div>
<div style="display:none"> Gerrit-Change-Number: 13930 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>