Skip to contentSkip to conversation

package/slirp: security bump to version 4.3.1

PATCH New Fabrice Fontaine 3 participants 9 messages Nov 7, 2020 – Nov 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/slirp: security bump to version 4.3.1

- Use an up to date fork (spice slirp is archived and has not been updated since 2012)
- Add COPYRIGHT as the license file
- BSD-4-Clause has been replaced by BSD-3-Clause since
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/3bac39137a652b24b89d5b9e2a39600619fbe1d3
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/f9f6e69c4e1d9a43af30bfe791b31789ffa04954
- Add hash file
- Switch to meson-package
- Fix multiple security vulnerabilities: CVE-2014-3640, CVE-2017-11434, CVE-2019-6778, CVE-2019-9824, CVE-2019-14378 and CVE-2020-10756

---
 package/slirp/Config.in  | 17 ++++++-----------
 package/slirp/slirp.hash |  3 +++
 package/slirp/slirp.mk   | 20 +++++++-------------
 3 files changed, 16 insertions(+), 24 deletions(-)
 create mode 100644 package/slirp/slirp.hash
package/slirp/Config.in +6 -11
index 51dea9700f..8f57c4fa6a 100644
@@ -1,16 +1,10 @@
 config BR2_PACKAGE_SLIRP
 	bool "slirp"
 	help
-	  The Spice project aims to provide a complete open source
-	  solution for interaction with virtualized desktop devices.
-	  The Spice project deals with both the virtualized devices
-	  and the front-end. Interaction between front-end and
-	  back-end is done using VD-Interfaces.
+	  libslirp is a user-mode networking library used by virtual
+	  machines, containers or various tools.
 
-	  This package implements the slirp-part for Spice. Slirp
-	  emulates a PPP or SLIP connection over a normal terminal.
-
-	  http://www.spice-space.org/
+	  https://gitlab.freedesktop.org/slirp/libslirp/
 
 	  NOTE:
 	  This package has some history of a unique kind:
@@ -21,5 +15,6 @@ config BR2_PACKAGE_SLIRP
 	    - during that period, QEMU (Fabrice BELLARD) forked the code
 	      and included it in QEMU
 	    - and it was imported from this breed by the Spice project
-	      around May 2009
-	    - which is what we use here
+	      around May 2009 which archived it in 2012
+	    - So we switched to
+	      https://gitlab.freedesktop.org/slirp/libslirp
package/slirp/slirp.hash new file +3 -0
new file mode 100644
index 0000000000..3051179df9
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  6b1641f04d41bc45f94018ac8d42d3c9f3ba0e463cbeacf5f26fe83fc050161e  libslirp-v4.3.1.tar.bz2
+sha256  b28aecf4796a6a22054167f0a976de13d9db335669d37afd2dc7ea4c335e1e13  COPYRIGHT
package/slirp/slirp.mk +7 -13
index 7cfead65e2..4351818952 100644
@@ -4,18 +4,12 @@
 #
 ################################################################################
 
-# There's no tarball releases of slirp, so we use the git repo
-# Also, there's no tag, so we use a random SHA1 (master's HEAD
-# of today)
-SLIRP_VERSION = 8c2da74c1385242f20799fec8c04f8378edc6550
-SLIRP_SITE = git://anongit.freedesktop.org/spice/slirp
-SLIRP_LICENSE = BSD-4-Clause, BSD-2-Clause
-# Note: The license file 'COPYRIGHT' is missing from the sources,
-# although some files refer to it.
+SLIRP_VERSION = 4.3.1
+SLIRP_SOURCE = libslirp-v$(SLIRP_VERSION).tar.bz2
+SLIRP_SITE = \
+	https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v$(SLIRP_VERSION)
+SLIRP_LICENSE = BSD-3-Clause
+SLIRP_LICENSE_FILES = COPYRIGHT
 SLIRP_INSTALL_STAGING = YES
 
-# As we're using the git tree, there's no ./configure,
-# so we need to autoreconf.
-SLIRP_AUTORECONF = YES
-
-$(eval $(autotools-package))
+$(eval $(meson-package))
Signature · 1 line
2.28.0
#1 lore raw

PATCH 2/2 package/xen: add slirp dependency for tools

Build of xen tools fails if slirp is built before xen because xen is not compatible with spice slirp which does not provide libslirp.h:

/home/buildroot/autobuild/instance-2/output-1/build/xen-4.13.0/tools/qemu-xen/net/slirp.c:40:10: fatal error: libslirp.h: No such file or directory

 #include <libslirp.h>
          ^~~~~~~~~~~~

Indeed, xen prefers a system-provided slirp over its internal one

So add slirp as a mandatory dependency (now that we switched to the up to date https://gitlab.freedesktop.org/slirp/libslirp)

This build failure is raised since, at least, version 4.13.0

Fixes:
- http://autobuild.buildroot.org/results/b80b33ed558518f7bbb0a3c8586bf2d0b8acc36f

---
 package/xen/Config.in | 1 +
 package/xen/xen.mk    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
package/xen/Config.in +1 -0
index 57ab40eba8..af6acd3530 100644
@@ -28,6 +28,7 @@ config BR2_PACKAGE_XEN_TOOLS
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_PIXMAN
+	select BR2_PACKAGE_SLIRP
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
 	select BR2_PACKAGE_YAJL
package/xen/xen.mk +2 -1
index 8f1fa7db76..8cbe532d2b 100644
@@ -41,7 +41,8 @@ XEN_CONF_OPTS += --disable-xen
 endif
 
 ifeq ($(BR2_PACKAGE_XEN_TOOLS),y)
-XEN_DEPENDENCIES += dtc libaio libglib2 ncurses openssl pixman util-linux yajl
+XEN_DEPENDENCIES += \
+	dtc libaio libglib2 ncurses openssl pixman slirp util-linux yajl
 ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
 XEN_DEPENDENCIES += argp-standalone
 endif
Signature · 1 line
2.28.0
#2 lore raw

PATCH 2/2 package/xen: add slirp dependency for tools

Quoted 13 lines · Fabrice Fontaine

Build of xen tools fails if slirp is built before xen because xen is not compatible with spice slirp which does not provide libslirp.h:

/home/buildroot/autobuild/instance-2/output-1/build/xen-4.13.0/tools/qemu-xen/net/slirp.c:40:10: fatal error: libslirp.h: No such file or directory

 #include <libslirp.h>
          ^~~~~~~~~~~~

Indeed, xen prefers a system-provided slirp over its internal one

So add slirp as a mandatory dependency (now that we switched to the up to date https://gitlab.freedesktop.org/slirp/libslirp)

Quoted 6 lines

This build failure is raised since, at least, version 4.13.0

Fixes:
- http://autobuild.buildroot.org/results/b80b33ed558518f7bbb0a3c8586bf2d0b8acc36f

Alistair

Quoted 38 lines
---
 package/xen/Config.in | 1 +
 package/xen/xen.mk    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
package/xen/Config.in +1 -0
index 57ab40eba8..af6acd3530 100644
@@ -28,6 +28,7 @@ config BR2_PACKAGE_XEN_TOOLS
        select BR2_PACKAGE_NCURSES
        select BR2_PACKAGE_OPENSSL
        select BR2_PACKAGE_PIXMAN
+       select BR2_PACKAGE_SLIRP
        select BR2_PACKAGE_UTIL_LINUX
        select BR2_PACKAGE_UTIL_LINUX_LIBUUID
        select BR2_PACKAGE_YAJL
package/xen/xen.mk +2 -2
index 8f1fa7db76..8cbe532d2b 100644
@@ -41,7 +41,8 @@ XEN_CONF_OPTS += --disable-xen
 endif
 
 ifeq ($(BR2_PACKAGE_XEN_TOOLS),y)
-XEN_DEPENDENCIES += dtc libaio libglib2 ncurses openssl pixman util-linux yajl
+XEN_DEPENDENCIES += \
+       dtc libaio libglib2 ncurses openssl pixman slirp util-linux yajl
 ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
 XEN_DEPENDENCIES += argp-standalone
 endif
--

2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

PATCH 2/2 package/xen: add slirp dependency for tools

In reply to Fabrice Fontaine
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Build of xen tools fails if slirp is built before xen because xen is not compatible with spice slirp which does not provide libslirp.h:

/home/buildroot/autobuild/instance-2/output-1/build/xen-4.13.0/tools/qemu-xen/net/slirp.c:40:10: fatal error: libslirp.h: No such file or directory

 #include <libslirp.h>
          ^~~~~~~~~~~~

Indeed, xen prefers a system-provided slirp over its internal one

So add slirp as a mandatory dependency (now that we switched to the up to date https://gitlab.freedesktop.org/slirp/libslirp)

Quoted 6 lines

This build failure is raised since, at least, version 4.13.0

Fixes:
- http://autobuild.buildroot.org/results/b80b33ed558518f7bbb0a3c8586bf2d0b8acc36f

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 2/2 package/xen: add slirp dependency for tools

In reply to Fabrice Fontaine
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Build of xen tools fails if slirp is built before xen because xen is not compatible with spice slirp which does not provide libslirp.h:

/home/buildroot/autobuild/instance-2/output-1/build/xen-4.13.0/tools/qemu-xen/net/slirp.c:40:10: fatal error: libslirp.h: No such file or directory

 #include <libslirp.h>
          ^~~~~~~~~~~~

Indeed, xen prefers a system-provided slirp over its internal one

So add slirp as a mandatory dependency (now that we switched to the up to date https://gitlab.freedesktop.org/slirp/libslirp)

Quoted 6 lines

This build failure is raised since, at least, version 4.13.0

Fixes:
- http://autobuild.buildroot.org/results/b80b33ed558518f7bbb0a3c8586bf2d0b8acc36f

Committed to 2020.02.x and 2020.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/2 package/slirp: security bump to version 4.3.1

In reply to Fabrice Fontaine
Quoted 12 lines · Fabrice Fontaine

- Use an up to date fork (spice slirp is archived and has not been updated since 2012)
- Add COPYRIGHT as the license file
- BSD-4-Clause has been replaced by BSD-3-Clause since
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/3bac39137a652b24b89d5b9e2a39600619fbe1d3
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/f9f6e69c4e1d9a43af30bfe791b31789ffa04954
- Add hash file
- Switch to meson-package
- Fix multiple security vulnerabilities: CVE-2014-3640, CVE-2017-11434, CVE-2019-6778, CVE-2019-9824, CVE-2019-14378 and CVE-2020-10756

Quoted 1 line

Alistair

Quoted 86 lines
---
 package/slirp/Config.in  | 17 ++++++-----------
 package/slirp/slirp.hash |  3 +++
 package/slirp/slirp.mk   | 20 +++++++-------------
 3 files changed, 16 insertions(+), 24 deletions(-)
 create mode 100644 package/slirp/slirp.hash
package/slirp/Config.in +6 -11
index 51dea9700f..8f57c4fa6a 100644
@@ -1,16 +1,10 @@
 config BR2_PACKAGE_SLIRP
        bool "slirp"
        help
-         The Spice project aims to provide a complete open source
-         solution for interaction with virtualized desktop devices.
-         The Spice project deals with both the virtualized devices
-         and the front-end. Interaction between front-end and
-         back-end is done using VD-Interfaces.
+         libslirp is a user-mode networking library used by virtual
+         machines, containers or various tools.
 
-         This package implements the slirp-part for Spice. Slirp
-         emulates a PPP or SLIP connection over a normal terminal.
-
-         http://www.spice-space.org/
+         https://gitlab.freedesktop.org/slirp/libslirp/
 
          NOTE:
          This package has some history of a unique kind:
@@ -21,5 +15,6 @@ config BR2_PACKAGE_SLIRP
            - during that period, QEMU (Fabrice BELLARD) forked the code
              and included it in QEMU
            - and it was imported from this breed by the Spice project
-             around May 2009
-           - which is what we use here
+             around May 2009 which archived it in 2012
+           - So we switched to
+             https://gitlab.freedesktop.org/slirp/libslirp
package/slirp/slirp.hash new file +3 -0
new file mode 100644
index 0000000000..3051179df9
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  6b1641f04d41bc45f94018ac8d42d3c9f3ba0e463cbeacf5f26fe83fc050161e  libslirp-v4.3.1.tar.bz2
+sha256  b28aecf4796a6a22054167f0a976de13d9db335669d37afd2dc7ea4c335e1e13  COPYRIGHT
package/slirp/slirp.mk +7 -14
index 7cfead65e2..4351818952 100644
@@ -4,18 +4,12 @@
 #
 ################################################################################
 
-# There's no tarball releases of slirp, so we use the git repo
-# Also, there's no tag, so we use a random SHA1 (master's HEAD
-# of today)
-SLIRP_VERSION = 8c2da74c1385242f20799fec8c04f8378edc6550
-SLIRP_SITE = git://anongit.freedesktop.org/spice/slirp
-SLIRP_LICENSE = BSD-4-Clause, BSD-2-Clause
-# Note: The license file 'COPYRIGHT' is missing from the sources,
-# although some files refer to it.
+SLIRP_VERSION = 4.3.1
+SLIRP_SOURCE = libslirp-v$(SLIRP_VERSION).tar.bz2
+SLIRP_SITE = \
+       https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v$(SLIRP_VERSION)
+SLIRP_LICENSE = BSD-3-Clause
+SLIRP_LICENSE_FILES = COPYRIGHT
 SLIRP_INSTALL_STAGING = YES
 
-# As we're using the git tree, there's no ./configure,
-# so we need to autoreconf.
-SLIRP_AUTORECONF = YES
-
-$(eval $(autotools-package))
+$(eval $(meson-package))
--

2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

PATCH 1/2 package/slirp: security bump to version 4.3.1

In reply to Fabrice Fontaine
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

- Use an up to date fork (spice slirp is archived and has not been updated since 2012)
- Add COPYRIGHT as the license file
- BSD-4-Clause has been replaced by BSD-3-Clause since
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/3bac39137a652b24b89d5b9e2a39600619fbe1d3
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/f9f6e69c4e1d9a43af30bfe791b31789ffa04954
- Add hash file
- Switch to meson-package
- Fix multiple security vulnerabilities: CVE-2014-3640, CVE-2017-11434, CVE-2019-6778, CVE-2019-9824, CVE-2019-14378 and CVE-2020-10756

Quoted 1 line

Committed, thanks.

I believe qemu also uses an embedded copy of slirp. Could/should we change it to use this package instead?

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 1/2 package/slirp: security bump to version 4.3.1

Hi Peter,

Le mar. 10 nov. 2020 ? 10:35, Peter Korsgaard <[email protected]> a ?crit :

Quoted 14 lines
Quoted 13 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

- Use an up to date fork (spice slirp is archived and has not been updated since 2012)
- Add COPYRIGHT as the license file
- BSD-4-Clause has been replaced by BSD-3-Clause since
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/3bac39137a652b24b89d5b9e2a39600619fbe1d3
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/f9f6e69c4e1d9a43af30bfe791b31789ffa04954
- Add hash file
- Switch to meson-package
- Fix multiple security vulnerabilities: CVE-2014-3640, CVE-2017-11434, CVE-2019-6778, CVE-2019-9824, CVE-2019-14378 and CVE-2020-10756

Quoted 6 lines
Quoted 1 line

Committed, thanks.

I believe qemu also uses an embedded copy of slirp. Could/should we change it to use this package instead?

Indeed, qemu also checks and prefers a system-wide slirp.

Quoted 3 lines

--
Bye, Peter Korsgaard

Best Regards,

Fabrice

#8 lore raw

PATCH 1/2 package/slirp: security bump to version 4.3.1

In reply to Fabrice Fontaine
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

- Use an up to date fork (spice slirp is archived and has not been updated since 2012)
- Add COPYRIGHT as the license file
- BSD-4-Clause has been replaced by BSD-3-Clause since
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/3bac39137a652b24b89d5b9e2a39600619fbe1d3
https://gitlab.freedesktop.org/slirp/libslirp/-/commit/f9f6e69c4e1d9a43af30bfe791b31789ffa04954
- Add hash file
- Switch to meson-package
- Fix multiple security vulnerabilities: CVE-2014-3640, CVE-2017-11434, CVE-2019-6778, CVE-2019-9824, CVE-2019-14378 and CVE-2020-10756

Quoted 1 line

Committed to 2020.02.x and 2020.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard