https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092018-02-22T18:42:54ZOpen Source Mobile Communicationslibosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=77612018-02-22T18:42:54Zfixeria
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-2 priority-default closed" href="/issues/2982">Bug #2982</a>: make check: sgsn test failed</i> added</li></ul> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=77632018-02-22T18:43:06Zfixeria
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-1 priority-lowest closed" href="/issues/2981">Bug #2981</a>: make check: mgcp test failed</i> added</li></ul> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=77652018-02-22T18:43:24Zfixeria
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-2 priority-default closed" href="/issues/2983">Bug #2983</a>: OsmoMSC crashes on LUR</i> added</li></ul> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=88032018-04-10T17:32:51Zlaforge
<ul><li><strong>Assignee</strong> set to <i>lynxis</i></li></ul> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=88122018-04-10T17:53:46Zfixeria
<ul></ul><p>I have the following suggestions:</p>
<ul>
<li>Bump the minimal required version to 3.3.0;</li>
<li>Initialize the library when libosmocore is loaded (DSO):</li>
</ul>
<pre>
__attribute__((constructor))
static void on_dso_load_gnutls(void)
{
gnutls_global_init();
}
</pre> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=89762018-04-20T13:21:13Zlynxis
<ul></ul><p>debian/wheezy (old-old-stable): 2.12.20-8+deb7u5<br />debian/jessie (old-stabe): 3.3.8-6+deb8u<br />debian/stretch (stable): 3.5.8-5+deb9u3<br />ubuntu/14.04 LTS: 3.2.11<br />ubuntu/16.04 LTS: 3.4.10</p> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90072018-04-24T10:15:27Zlynxis
<ul><li><strong>Assignee</strong> changed from <i>lynxis</i> to <i>laforge</i></li></ul><p><a class="user active" href="https://projects.osmocom.org/users/7">laforge</a>: can we increase the minimal version to 3.3.0?</p> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90082018-04-24T10:19:12Zlynxis
<ul></ul><p>sysmobts 201705: is using 3.5.9<br />sysmobts 201310: is using 2.12.23</p>
<p>So we would loose sysmobts 201310 and ubuntu 14.04</p> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90092018-04-24T12:01:27Zlynxis
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Assignee</strong> changed from <i>laforge</i> to <i>lynxis</i></li></ul> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90112018-04-24T12:07:27Zlaforge
<ul></ul><p>I think we should simply introduce an</p>
<pre>
#if GNUTLS_VERSION < 3.3.0
gnutls_global_init();
#endif
</pre>
<p>I would assume it's pretty straight-forward to do, and not a big burden<br />in order to gain wider backwards compatibility.</p> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90132018-04-24T14:19:50Zlynxis
<ul></ul><p>I've tried to reproduce this test in a vm with debian wheezy, but it didn't worked out.</p>
<pre>
/* compile with
* gcc -g -o test_osmo_get_rand_id /tmp/test_osmo_get_rand_id.c -l osmocore -l osmogsm
*/
#include <stdio.h>
#include <stdlib.h>
#include <osmocom/gsm/gsm_utils.h>
int main() {
char buffer[16] = { 0 };
printf("%s\n", osmo_hexdump(buffer, 16));
int rc = osmo_get_rand_id(buffer, 16);
printf("%s\n", osmo_hexdump(buffer, 16));
printf("rc = %d\n", rc);
exit(0);
}
</pre> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90142018-04-24T14:30:49Zlynxis
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p><a class="external" href="https://gerrit.osmocom.org/#/c/7904/">https://gerrit.osmocom.org/#/c/7904/</a></p> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90152018-04-24T14:31:03Zlynxis
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li></ul> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=90902018-05-01T16:06:56Zlaforge
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Stalled</i></li><li><strong>% Done</strong> changed from <i>100</i> to <i>90</i></li></ul> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=91032018-05-02T13:51:37Zlynxis
<ul></ul><p>waiting for review.</p> libosmocore - Bug #2986: GNU TLS fallback: segfault on gnutls_rnd()https://projects.osmocom.org/issues/2986?journal_id=91072018-05-03T02:52:35Zlynxis
<ul><li><strong>Status</strong> changed from <i>Stalled</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul>