<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/17741">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm0503_coding: Fix USF encoding in MCS1-4<br><br>osmo-gsm-tester raised an ASan warning in osmo-bts-trx  during execution<br>of a test with EGPRS enabled and a modem connecting to it (see OS#4483<br>for full trace):<br>==12388==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7fa20b9ab8d0 at pc 0x7fa20b982894 bp 0x7ffdfea8b9c0 sp 0x7ffdfea8b9b8<br>READ of size 1 at 0x7fa20b9ab8d0 thread T0<br> #0 0x7fa20b982893 in gsm0503_mcs1_dl_interleave /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/coding/gsm0503_interleaving.c:165<br><br>Function gsm0503_mcs1_dl_interleave() was being passed the 6-bit USF<br>encoding while clrearly expecting a 12 element array. TS 05.03 5.1.5.1.2<br>"USF precoding" also clearly states that 12bit encoding is to be used<br>for MCS1-4.<br><br>Fixes: OS#4483<br>Change-Id: I94db14de770070b17894a9071aa14391d26e776c<br>---<br>M src/coding/gsm0503_coding.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/41/17741/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c</span><br><span>index 9449f4b..5592433 100644</span><br><span>--- a/src/coding/gsm0503_coding.c</span><br><span>+++ b/src/coding/gsm0503_coding.c</span><br><span>@@ -1176,7 +1176,7 @@</span><br><span>       ubit_t iB[456];</span><br><span>      const ubit_t *hl_hn = gsm0503_pdtch_hl_hn_ubit[3];</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  gsm0503_mcs1_dl_interleave(gsm0503_usf2six[usf], hc, dc, iB);</span><br><span style="color: hsl(120, 100%, 40%);">+ gsm0503_mcs1_dl_interleave(gsm0503_usf2twelve_ubit[usf], hc, dc, iB);</span><br><span> </span><br><span>    for (i = 0; i < 4; i++) {</span><br><span>                 gsm0503_xcch_burst_map(&iB[i * 114], &bursts[i * 116],</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/17741">change 17741</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/c/libosmocore/+/17741"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I94db14de770070b17894a9071aa14391d26e776c </div>
<div style="display:none"> Gerrit-Change-Number: 17741 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>