[oe-commits] [openembedded-core] 05/17: connman: Fix a crash using wispr over TLS

git at git.openembedded.org git at git.openembedded.org
Sun Jan 21 09:55:41 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2ea983d4a187ac62e703e85dce622f70e309be05
Author: Jian Liang <jianliang at tycoint.com>
AuthorDate: Fri Jan 19 14:42:12 2018 +0000

    connman: Fix a crash using wispr over TLS
    
    This is happened when doing wispr against a HTTPS URL
    rather than the default one, i.e.
    http://ipv4.connman.net/online/status.html
    
    When gnutls_channel is instantiated, the gnutls_channel->established
    has to be initiated as FALSE. Otherwise, check_handshake function
    won't work. A random initial value 1 of gnutls_channel->established
    will make check_handshake return G_IO_STATUS_NORMAL, when the channel
    is actually not ready to be used. The observed behaviours are,
    
    - wispr is getting random errors in wispr_portal_web_result
    - ConnMan crashes on exit after those random errors
    - when wispr is luckly working, ConnMan doesn't crash on exit
    
    Signed-off-by: Jian Liang <jianliang at tycoint.com>
    Signed-off-by: André Draszik <andre.draszik at jci.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...iognutls-Fix-a-crash-using-wispr-over-TLS.patch | 41 ++++++++++++++++++++++
 meta/recipes-connectivity/connman/connman_1.35.bb  |  1 +
 2 files changed, 42 insertions(+)

diff --git a/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch b/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
new file mode 100644
index 0000000..f9080d4
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch
@@ -0,0 +1,41 @@
+From 929fc9b7068100444e0ffcccd25841f78791e619 Mon Sep 17 00:00:00 2001
+From: Jian Liang <jianliang at tycoint.com>
+Date: Fri, 15 Sep 2017 06:40:08 -0400
+Subject: [PATCH] gweb: Fix a crash using wispr over TLS
+To: connman at lists.01.org
+Cc: wagi at monom.org
+
+When gnutls_channel is instantiated, the gnutls_channel->established
+has to be initiated as FALSE. Otherwise, check_handshake function
+won't work. A random initial value 1 of gnutls_channel->established
+will make check_handshake return G_IO_STATUS_NORMAL, when the channel
+is actually not ready to be used. The observed behaviours are,
+
+- wispr is getting random errors in wispr_portal_web_result
+- ConnMan crashes on exit after those random errors
+- when wispr is luckly working, ConnMan doesn't crash on exit
+
+Signed-off-by: Jian Liang <jianliang at tycoint.com>
+
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=73e53f3bd9e7debae86341f1eee7b97862a56a5e]
+Signed-off-by: André Draszik <andre.draszik at jci.com>
+ gweb/giognutls.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gweb/giognutls.c b/gweb/giognutls.c
+index 09dc9e7..c029a8b 100644
+--- a/gweb/giognutls.c
++++ b/gweb/giognutls.c
+@@ -421,7 +421,7 @@ GIOChannel *g_io_channel_gnutls_new(int fd)
+ 
+ 	DBG("");
+ 
+-	gnutls_channel = g_new(GIOGnuTLSChannel, 1);
++	gnutls_channel = g_new0(GIOGnuTLSChannel, 1);
+ 
+ 	channel = (GIOChannel *) gnutls_channel;
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-connectivity/connman/connman_1.35.bb b/meta/recipes-connectivity/connman/connman_1.35.bb
index e7e5d38..4663a7e 100644
--- a/meta/recipes-connectivity/connman/connman_1.35.bb
+++ b/meta/recipes-connectivity/connman/connman_1.35.bb
@@ -7,6 +7,7 @@ SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
             file://no-version-scripts.patch \
             file://includes.patch \
             file://0001-session-Keep-track-of-addr-in-fw_snat-session.patch \
+            file://0001-giognutls-Fix-a-crash-using-wispr-over-TLS.patch \
             "
 SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
                              "

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list