summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/iptables/iptables/0003-extensions-format-security-fixes-in-libipt_icmp.patch61
-rw-r--r--meta/recipes-extended/iptables/iptables_1.8.2.bb (renamed from meta/recipes-extended/iptables/iptables_1.6.2.bb)5
2 files changed, 64 insertions, 2 deletions
diff --git a/meta/recipes-extended/iptables/iptables/0003-extensions-format-security-fixes-in-libipt_icmp.patch b/meta/recipes-extended/iptables/iptables/0003-extensions-format-security-fixes-in-libipt_icmp.patch
new file mode 100644
index 0000000000..e26594d19b
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/0003-extensions-format-security-fixes-in-libipt_icmp.patch
@@ -0,0 +1,61 @@
1From 907e429d7548157016cd51aba4adc5d0c7d9f816 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Adam=20Go=C5=82=C4=99biowski?= <adamg@pld-linux.org>
3Date: Wed, 14 Nov 2018 07:35:28 +0100
4Subject: extensions: format-security fixes in libip[6]t_icmp
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit 61d6c3834de3 ("xtables: add 'printf' attribute to xlate_add")
10introduced support for gcc feature to check format string against passed
11argument. This commit adds missing bits to extenstions's libipt_icmp.c
12and libip6t_icmp6.c that were causing build to fail.
13
14Fixes: 61d6c3834de3 ("xtables: add 'printf' attribute to xlate_add")
15Signed-off-by: Adam Gołębiowski <adamg@pld-linux.org>
16Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
17
18Upstream-Status: Backport
19---
20 extensions/libip6t_icmp6.c | 4 ++--
21 extensions/libipt_icmp.c | 2 +-
22 2 files changed, 3 insertions(+), 3 deletions(-)
23
24diff --git a/extensions/libip6t_icmp6.c b/extensions/libip6t_icmp6.c
25index 45a71875..cc7bfaeb 100644
26--- a/extensions/libip6t_icmp6.c
27+++ b/extensions/libip6t_icmp6.c
28@@ -230,7 +230,7 @@ static unsigned int type_xlate_print(struct xt_xlate *xl, unsigned int icmptype,
29 type_name = icmp6_type_xlate(icmptype);
30
31 if (type_name) {
32- xt_xlate_add(xl, type_name);
33+ xt_xlate_add(xl, "%s", type_name);
34 } else {
35 for (i = 0; i < ARRAY_SIZE(icmpv6_codes); ++i)
36 if (icmpv6_codes[i].type == icmptype &&
37@@ -239,7 +239,7 @@ static unsigned int type_xlate_print(struct xt_xlate *xl, unsigned int icmptype,
38 break;
39
40 if (i != ARRAY_SIZE(icmpv6_codes))
41- xt_xlate_add(xl, icmpv6_codes[i].name);
42+ xt_xlate_add(xl, "%s", icmpv6_codes[i].name);
43 else
44 return 0;
45 }
46diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c
47index 54189976..e76257c5 100644
48--- a/extensions/libipt_icmp.c
49+++ b/extensions/libipt_icmp.c
50@@ -236,7 +236,7 @@ static unsigned int type_xlate_print(struct xt_xlate *xl, unsigned int icmptype,
51 if (icmp_codes[i].type == icmptype &&
52 icmp_codes[i].code_min == code_min &&
53 icmp_codes[i].code_max == code_max) {
54- xt_xlate_add(xl, icmp_codes[i].name);
55+ xt_xlate_add(xl, "%s", icmp_codes[i].name);
56 return 1;
57 }
58 }
59--
60cgit v1.2.1
61
diff --git a/meta/recipes-extended/iptables/iptables_1.6.2.bb b/meta/recipes-extended/iptables/iptables_1.8.2.bb
index a57cac34eb..ad2c1a6f84 100644
--- a/meta/recipes-extended/iptables/iptables_1.6.2.bb
+++ b/meta/recipes-extended/iptables/iptables_1.8.2.bb
@@ -10,10 +10,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
10SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ 10SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
11 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ 11 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
12 file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \ 12 file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
13 file://0003-extensions-format-security-fixes-in-libipt_icmp.patch \
13" 14"
14 15
15SRC_URI[md5sum] = "7d2b7847e4aa8832a18437b8a4c1873d" 16SRC_URI[md5sum] = "944558e88ddcc3b9b0d9550070fa3599"
16SRC_URI[sha256sum] = "55d02dfa46263343a401f297d44190f2a3e5113c8933946f094ed40237053733" 17SRC_URI[sha256sum] = "a3778b50ed1a3256f9ca975de82c2204e508001fc2471238c8c97f3d1c4c12af"
17 18
18inherit autotools pkgconfig 19inherit autotools pkgconfig
19 20