Commit 0f474461 authored by Milan P. Stanić's avatar Milan P. Stanić

main/dnsmasq: security upgrade to 2.83

CVE fixes:
- CVE-2020-25681
- CVE-2020-25682
- CVE-2020-25683
- CVE-2020-25684
- CVE-2020-25685
- CVE-2020-25686
- CVE-2020-25687

change license to SPDX format
remove nettle-3.5.patch and CVE-2019-14834.patch, applied upstream
parent 3e415359
Pipeline #69157 failed with stages
in 30 seconds
......@@ -2,6 +2,14 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
#
# secfixes:
# 2.83-r0:
# - CVE-2020-25681
# - CVE-2020-25682
# - CVE-2020-25683
# - CVE-2020-25684
# - CVE-2020-25685
# - CVE-2020-25686
# - CVE-2020-25687
# 2.80-r5:
# - CVE-2019-14834
# 2.79-r0:
......@@ -16,23 +24,21 @@
# - CVE-2017-14496
#
pkgname=dnsmasq
pkgver=2.80
pkgrel=5
pkgver=2.83
pkgrel=0
pkgdesc="A lightweight DNS, DHCP, RA, TFTP and PXE server"
url="http://www.thekelleys.org.uk/dnsmasq/"
arch="all"
license="GPL-2.0"
license="GPL-2.0-only OR GPL-3.0-only"
depends="!$pkgname-dnssec"
makedepends="linux-headers nettle-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade
$pkgname-dnssec.pre-install $pkgname-dnssec.pre-upgrade"
subpackages="$pkgname-doc $pkgname-dnssec"
source="http://www.thekelleys.org.uk/dnsmasq/$pkgname-$pkgver.tar.gz
nettle-3.5.patch
$pkgname.initd
$pkgname.confd
uncomment-conf-dir.patch
CVE-2019-14834.patch
"
builddir="$srcdir/$pkgname-$pkgver"
......@@ -77,9 +83,7 @@ dnssec() {
cp -r "$pkgdir"/etc "$subpkgdir"/etc
}
sha512sums="da50030ac96617fbb7d54d5ef02d2ed1e14ec1ebe0df49bc23a1509381bc1644cf6fb95ff72ed15e0ad1e9bd6aa11ec6e4dcabec8ebb152da0d84f9a4408565b dnsmasq-2.80.tar.gz
df64088b22f996ff228fce18dd05b329d9fdf7b02290bc3992546004394e662be7bc416dc718ea866341403234eb20efd5bbf1eec96df1cb6ab099ebfd3fdee4 nettle-3.5.patch
sha512sums="bdd6e701317b7a0191625c7d1983b64d4f4e49f3e2d192ca799397d9a8ab5a788542000888d9e0c32d5394622c311b4c191baa392be06ebbf953ebc887b96745 dnsmasq-2.83.tar.gz
a7d64a838d10f4f69e0f2178cf66f0b3725901696e30df9e8e3e09f2afd7c86e9d95af64d2b63ef66f18b8a637397b7015573938df9ad961e2b36c391c3ac579 dnsmasq.initd
9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8 dnsmasq.confd
01e9e235e667abda07675009fb1947547863e0bb0256393c5a415978e2a49c1007585c7f0b51e8decce79c05e6f2ced3f400b11343feaa4de9b2e524f74a1ee3 uncomment-conf-dir.patch
d4d11945578430da629d7a38b00eb552cd95b1c438a0b85b63ba637ed19b4283623e39692f48146132b7cb5d453eaa3c07680f1514017d8d458e347153215a9b CVE-2019-14834.patch"
01e9e235e667abda07675009fb1947547863e0bb0256393c5a415978e2a49c1007585c7f0b51e8decce79c05e6f2ced3f400b11343feaa4de9b2e524f74a1ee3 uncomment-conf-dir.patch"
From 69bc94779c2f035a9fffdb5327a54c3aeca73ed5 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 14 Aug 2019 20:44:50 +0100
Subject: [PATCH] Fix memory leak in helper.c
Thanks to Xu Mingjie <xumingjie1995@outlook.com> for spotting this.
---
src/helper.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/helper.c b/src/helper.c
index 33ba120..c392eec 100644
--- a/src/helper.c
+++ b/src/helper.c
@@ -80,7 +80,8 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
pid_t pid;
int i, pipefd[2];
struct sigaction sigact;
-
+ unsigned char *alloc_buff = NULL;
+
/* create the pipe through which the main program sends us commands,
then fork our process. */
if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1)
@@ -186,11 +187,16 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
struct script_data data;
char *p, *action_str, *hostname = NULL, *domain = NULL;
unsigned char *buf = (unsigned char *)daemon->namebuff;
- unsigned char *end, *extradata, *alloc_buff = NULL;
+ unsigned char *end, *extradata;
int is6, err = 0;
int pipeout[2];
- free(alloc_buff);
+ /* Free rarely-allocated memory from previous iteration. */
+ if (alloc_buff)
+ {
+ free(alloc_buff);
+ alloc_buff = NULL;
+ }
/* we read zero bytes when pipe closed: this is our signal to exit */
if (!read_write(pipefd[0], (unsigned char *)&data, sizeof(data), 1))
--
1.7.10.4
From 6fd9aba7abe1e084123bc5002959350897774ace Mon Sep 17 00:00:00 2001
From: Vladislav Grishenko <themiron@mail.ru>
Date: Wed, 26 Jun 2019 20:27:11 +0500
Subject: [PATCH] Fix build with libnettle 3.5
---
src/crypto.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/crypto.c b/src/crypto.c
index 1f1c12b..9cfe371 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -296,6 +296,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
static struct ecc_point *key_256 = NULL, *key_384 = NULL;
static mpz_t x, y;
static struct dsa_signature *sig_struct;
+#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4
+#define nettle_get_secp_256r1() (&nettle_secp_256r1)
+#define nettle_get_secp_384r1() (&nettle_secp_384r1)
+#endif
if (!sig_struct)
{
@@ -315,7 +319,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
return 0;
- nettle_ecc_point_init(key_256, &nettle_secp_256r1);
+ nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
}
key = key_256;
@@ -328,7 +332,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
return 0;
- nettle_ecc_point_init(key_384, &nettle_secp_384r1);
+ nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
}
key = key_384;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment