<p>Vadim Yanitskiy <strong>uploaded patch set #4</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/10183">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BTS: fix: pad LAPDm frames before sending via L1CTL<br><br>Thanks to Stefan Sperling, a critical bug was discovered in trxcon.<br>The problem was that length of LAPDm frames was not checked before<br>passing them to the libosmocoding API. So, if a received LAPDm<br>frame is shorter than expected (i.e. 23 bytes), then:<br><br>  - in case of xCCH, there was a heap overflow (detected by ASAN),<br>    so a short frame has been encoded together with some garbage<br>    outside the primitive buffer...<br><br>  - in case of FACCH, as the length != 23, a frame was recognised<br>    as a speech frame, and also encoded together with some garbage.<br><br>Since the bug is fixed (OS#3415), some TTCN-3 BTS tests started<br>to fail, because most likely it was assumed that trxcon would<br>pad the frames automatically, but it doesn't and shouldn't.<br><br>Let's automatically pad LAPDm frames with 0x2b before sending.<br><br>Change-Id: I16cba4e4179456bebabf0638760af011a27fd333<br>Related: OS#3418<br>---<br>M bts/BTS_Tests.ttcn<br>1 file changed, 8 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/10183/4</pre><p>To view, visit <a href="https://gerrit.osmocom.org/10183">change 10183</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/10183"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I16cba4e4179456bebabf0638760af011a27fd333 </div>
<div style="display:none"> Gerrit-Change-Number: 10183 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Stefan Sperling <ssperling@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>