Bug#842093: libupnp: CVE-2016-8863

2016-12-08 Thread Uwe Kleine-König
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


signature.asc
Description: PGP signature


Bug#842093: libupnp: CVE-2016-8863

2016-10-25 Thread Salvatore Bonaccorso
Source: libupnp
Version: 1:1.6.19+git20141001-1
Severity: grave
Tags: security upstream

Hi,

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.

CVE-2016-8863[0]:
Buffer overflow in create_url_list

If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2016-8863
[1] https://sourceforge.net/p/pupnp/bugs/133/

Regards,
Salvatore