Hello Marcelo,

I created a patch for CVE-2016-8863 but forgot to Cc: you. Do you care
to take a look?

Best regards
Uwe

----- Forwarded message from Uwe Kleine-König <u...@kleine-koenig.org> -----

Date: Thu, 8 Dec 2016 14:20:32 +0100
From: Uwe Kleine-König <u...@kleine-koenig.org>
To: Salvatore Bonaccorso <car...@debian.org>
Cc: 842...@bugs.debian.org
Subject: Re: libupnp: CVE-2016-8863
Message-ID: <20161208132027.idez435hu4jna...@perseus.defre.kleine-koenig.org>

Control: tag -1 + patch

Hello,

On Tue, Oct 25, 2016 at 10:27:24PM +0200, Salvatore Bonaccorso wrote:
> the following vulnerability was published for libupnp. The issue is
> reproducible easily if libupnp compiled with ASAN and following the
> reproducing steps in the upstream bugreport.

I didn't try to reproduce, but I think the following patch (while not
being pretty) is easy and fixes the issue:

diff --git a/upnp/src/gena/gena_device.c b/upnp/src/gena/gena_device.c
index 58a3e55e8973..700f00b449db 100644
--- a/upnp/src/gena/gena_device.c
+++ b/upnp/src/gena/gena_device.c
@@ -1145,7 +1145,11 @@ static int create_url_list(
 
     if( URLcount > 0 ) {
         out->URLs = malloc(URLS->size + 1);
-        out->parsedURLs = malloc(sizeof(uri_type) * URLcount);
+       /*
+        * You wonder why there is a +1? See
+        * https://sourceforge.net/p/pupnp/bugs/133/
+        */
+        out->parsedURLs = malloc(sizeof(uri_type) * (URLcount + 1));
         if (!out->URLs || !out->parsedURLs) {
             free(out->URLs);
             free(out->parsedURLs);

Best regards
Uwe



----- End forwarded message -----

Attachment: signature.asc
Description: PGP signature

Reply via email to