pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/libosip



Module Name:    pkgsrc
Committed By:   khorben
Date:           Sun Apr 21 16:25:38 UTC 2019

Modified Files:
        pkgsrc/devel/libosip: Makefile distinfo
Added Files:
        pkgsrc/devel/libosip/patches: patch-src_osip2_port__sema.c
            patch-src_osipparser2_osip__body.c
            patch-src_osipparser2_osip__message__parse.c
            patch-src_osipparser2_osip__message__to__str.c
            patch-src_osipparser2_osip__port.c
Removed Files:
        pkgsrc/devel/libosip/patches: patch-aa

Log Message:
Import security fixes for libosip2

This adds patches for the following CVE entries:
- CVE-2016-10324
- CVE-2016-10325
- CVE-2016-10326
- CVE-2017-7853

All patches were obtained from Debian and verified to match upstream.

While there, rename and comment the previous patch.

Bumps PKGREVISION.

XXX pull-up


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 pkgsrc/devel/libosip/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/devel/libosip/distinfo
cvs rdiff -u -r1.7 -r0 pkgsrc/devel/libosip/patches/patch-aa
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/libosip/patches/patch-src_osip2_port__sema.c \
    pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__body.c \
    pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__parse.c \
    pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__to__str.c \
    pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__port.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/libosip/Makefile
diff -u pkgsrc/devel/libosip/Makefile:1.19 pkgsrc/devel/libosip/Makefile:1.20
--- pkgsrc/devel/libosip/Makefile:1.19  Thu Oct  9 14:06:10 2014
+++ pkgsrc/devel/libosip/Makefile       Sun Apr 21 16:25:38 2019
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2014/10/09 14:06:10 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2019/04/21 16:25:38 khorben Exp $
 #
 
 DISTNAME=      libosip2-4.1.0
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GNU:=osip/}
 

Index: pkgsrc/devel/libosip/distinfo
diff -u pkgsrc/devel/libosip/distinfo:1.15 pkgsrc/devel/libosip/distinfo:1.16
--- pkgsrc/devel/libosip/distinfo:1.15  Tue Nov  3 03:27:43 2015
+++ pkgsrc/devel/libosip/distinfo       Sun Apr 21 16:25:38 2019
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.15 2015/11/03 03:27:43 agc Exp $
+$NetBSD: distinfo,v 1.16 2019/04/21 16:25:38 khorben Exp $
 
 SHA1 (libosip2-4.1.0.tar.gz) = 61459c9052ca2f5e77a6936c9b369e2b0602c080
 RMD160 (libosip2-4.1.0.tar.gz) = 3f86bf7872cd382f331b49f5e03a6ddddd338afa
 SHA512 (libosip2-4.1.0.tar.gz) = 8a04e047052aa6b970bb107aa8c0f94ed7c984defe69c3f2788f0b7677325812925a9386c1059499aa0940bb524ac1f724b5489f08e5b2210d190bad68271ee7
 Size (libosip2-4.1.0.tar.gz) = 636382 bytes
-SHA1 (patch-aa) = ba19e1ad149d2e7f0b0b44c38b48b1f5031dc587
+SHA1 (patch-src_osip2_port__sema.c) = 690cc6204025566f605cfc58a1652b95afc8e65f
+SHA1 (patch-src_osipparser2_osip__body.c) = fcbbb11e6a1b87f46faa1742d75a1951342b4095
+SHA1 (patch-src_osipparser2_osip__message__parse.c) = 2f9fea6f6ebea18b1bccb685a731ddf2295728dd
+SHA1 (patch-src_osipparser2_osip__message__to__str.c) = 12d559f25566c2143c9a679befb4b28bd03c3a63
+SHA1 (patch-src_osipparser2_osip__port.c) = 3723661ad715531bebb4ba6af7dd2e056f205e93

Added files:

Index: pkgsrc/devel/libosip/patches/patch-src_osip2_port__sema.c
diff -u /dev/null pkgsrc/devel/libosip/patches/patch-src_osip2_port__sema.c:1.1
--- /dev/null   Sun Apr 21 16:25:38 2019
+++ pkgsrc/devel/libosip/patches/patch-src_osip2_port__sema.c   Sun Apr 21 16:25:38 2019
@@ -0,0 +1,39 @@
+$NetBSD: patch-src_osip2_port__sema.c,v 1.1 2019/04/21 16:25:38 khorben Exp $
+
+Fix the calls to semctl to make this package build on NetBSD 1.6
+
+--- src/osip2/port_sema.c.orig 2013-12-18 18:36:46.000000000 +0000
++++ src/osip2/port_sema.c
+@@ -305,7 +305,6 @@ osip_sem_trywait (struct osip_sem *_sem)
+ struct osip_sem *
+ osip_sem_init (unsigned int value)
+ {
+-  union semun val;
+   int i;
+   osip_sem_t *sem = (osip_sem_t *) osip_malloc (sizeof (osip_sem_t));
+ 
+@@ -318,8 +317,7 @@ osip_sem_init (unsigned int value)
+     osip_free (sem);
+     return NULL;
+   }
+-  val.val = (int) value;
+-  i = semctl (sem->semid, 0, SETVAL, val);
++  i = semctl(sem->semid, 0, SETVAL, value);
+   if (i != 0) {
+     perror ("semctl error");
+     osip_free (sem);
+@@ -331,13 +329,11 @@ osip_sem_init (unsigned int value)
+ int
+ osip_sem_destroy (struct osip_sem *_sem)
+ {
+-  union semun val;
+   osip_sem_t *sem = (osip_sem_t *) _sem;
+ 
+   if (sem == NULL)
+     return OSIP_SUCCESS;
+-  val.val = 0;
+-  semctl (sem->semid, 0, IPC_RMID, val);
++  semctl(sem->semid, 0, IPC_RMID, 0);
+   osip_free (sem);
+   return OSIP_SUCCESS;
+ }
Index: pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__body.c
diff -u /dev/null pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__body.c:1.1
--- /dev/null   Sun Apr 21 16:25:38 2019
+++ pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__body.c     Sun Apr 21 16:25:38 2019
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_osipparser2_osip__body.c,v 1.1 2019/04/21 16:25:38 khorben Exp $
+
+Apply fix for CVE-2016-10326 (from Debian)
+
+--- src/osipparser2/osip_body.c.orig   2013-12-18 18:36:46.000000000 +0000
++++ src/osipparser2/osip_body.c
+@@ -417,6 +417,14 @@ osip_body_to_str (const osip_body_t * bo
+   }
+ 
+   if ((osip_list_size (body->headers) > 0) || (body->content_type != NULL)) {
++    if (length < tmp_body - ptr + 3) {
++      size_t len;
++
++      len = tmp_body - ptr;
++      length = length + 3 + body->length; /* add body->length, to avoid calling realloc often */
++      ptr = osip_realloc (ptr, length);
++      tmp_body = ptr + len;
++    }
+     tmp_body = osip_strn_append (tmp_body, CRLF, 2);
+   }
+   if (length < tmp_body - ptr + body->length + 4) {
Index: pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__parse.c
diff -u /dev/null pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__parse.c:1.1
--- /dev/null   Sun Apr 21 16:25:38 2019
+++ pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__parse.c   Sun Apr 21 16:25:38 2019
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_osipparser2_osip__message__parse.c,v 1.1 2019/04/21 16:25:38 khorben Exp $
+
+Apply fix for CVE-2017-7853 (from Debian)
+
+--- src/osipparser2/osip_message_parse.c.orig  2013-12-18 18:36:46.000000000 +0000
++++ src/osipparser2/osip_message_parse.c
+@@ -812,6 +812,12 @@ msg_osip_body_parse (osip_message_t * si
+     if ('\n' == start_of_body[0] || '\r' == start_of_body[0])
+       start_of_body++;
+ 
++    /* if message body is empty or contains a single CR/LF */
++    if (end_of_body <= start_of_body) {
++      osip_free (sep_boundary);
++      return OSIP_SYNTAXERROR;
++    }
++
+     body_len = end_of_body - start_of_body;
+ 
+     /* Skip CR before end boundary. */
Index: pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__to__str.c
diff -u /dev/null pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__to__str.c:1.1
--- /dev/null   Sun Apr 21 16:25:38 2019
+++ pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__message__to__str.c Sun Apr 21 16:25:38 2019
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_osipparser2_osip__message__to__str.c,v 1.1 2019/04/21 16:25:38 khorben Exp $
+
+Apply fix for CVE-2016-10325 (from Debian)
+
+--- src/osipparser2/osip_message_to_str.c.orig 2013-12-18 18:36:46.000000000 +0000
++++ src/osipparser2/osip_message_to_str.c
+@@ -378,6 +378,13 @@ _osip_message_to_str (osip_message_t * s
+     /* A start-line isn't required for message/sipfrag parts. */
+   }
+   else {
++    size_t message_len = strlen(tmp);
++    if (_osip_message_realloc (&message, dest, message_len + 3, &malloc_size) < 0) {
++      osip_free (tmp);
++      *dest = NULL;
++      return OSIP_NOMEM;
++    }
++
+     message = osip_str_append (message, tmp);
+     osip_free (tmp);
+     message = osip_strn_append (message, CRLF, 2);
Index: pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__port.c
diff -u /dev/null pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__port.c:1.1
--- /dev/null   Sun Apr 21 16:25:38 2019
+++ pkgsrc/devel/libosip/patches/patch-src_osipparser2_osip__port.c     Sun Apr 21 16:25:38 2019
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_osipparser2_osip__port.c,v 1.1 2019/04/21 16:25:38 khorben Exp $
+
+Apply fix for CVE-2016-10324 (from Debian)
+
+--- src/osipparser2/osip_port.c.orig   2013-12-18 18:36:46.000000000 +0000
++++ src/osipparser2/osip_port.c
+@@ -1462,8 +1462,10 @@ osip_clrncpy (char *dst, const char *src
+   char *p;
+   size_t spaceless_length;
+ 
+-  if (src == NULL)
++  if (src == NULL || len == 0) {
++    *dst = '\0';
+     return NULL;
++  }
+ 
+   /* find the start of relevant text */
+   pbeg = src;



Home | Main Index | Thread Index | Old Index