<p>Pau Espin Pedrol <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/9207">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm: kasumi: Fix dynamic-stack-buffer-overflow on out buffers not multiple of 64 bits<br><br>Fixes following AddressSanitizer report during gea_test run with gcc<br>8.1.0:<br><br>==8899==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7ffc5f1719bb at pc 0x7fe574adc5fe bp 0x7ffc5f171460 sp 0x7ffc5f171450<br>WRITE of size 1 at 0x7ffc5f1719bb thread T0<br>    #0 0x7fe574adc5fd in osmo_store64be_ext ../../include/osmocom/core/bit64gen.h:75<br>    #1 0x7fe574adc649 in osmo_store64be ../../include/osmocom/core/bit64gen.h:104<br>    #2 0x7fe574ade936 in _kasumi_kgcore libosmocore/src/gsm/kasumi.c:186<br>    #3 0x7fe574ae2532 in gea4 libosmocore/src/gsm/gea.c:44<br>    #4 0x7fe574ae266c in gea3 libosmocore/src/gsm/gea.c:60<br>    #5 0x7fe574a9b616 in gprs_cipher_run libosmocore/src/gsm/gprs_cipher_core.c:95<br>    #6 0x56422d3fb2ee in test_gea libosmocore/tests/gea/gea_test.c:29<br>    #7 0x56422d3fb506 in main libosmocore/tests/gea/gea_test.c:49<br>    #8 0x7fe5730f406a in __libc_start_main (/usr/lib/libc.so.6+0x2306a)<br>    #9 0x56422d3fadf9 in _start (libosmocore/tests/gea/.libs/lt-gea_test+0x1df9)<br><br>The kasumi_test is updated to calculate the entire array of bits<br>according to expected result. Before this commit it worked by writing<br>the entire last 64bit block, and addressSanitizer cannot catch it<br>because the allocated buffer is 64bit aligned too.<br><br>Change-Id: I7b2a0224a3b5527d5a3ad7e17efc73081b63eac1<br>---<br>M src/gsm/kasumi.c<br>M tests/kasumi/kasumi_test.c<br>2 files changed, 15 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/07/9207/3</pre><p>To view, visit <a href="https://gerrit.osmocom.org/9207">change 9207</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/9207"/><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-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I7b2a0224a3b5527d5a3ad7e17efc73081b63eac1 </div>
<div style="display:none"> Gerrit-Change-Number: 9207 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>