diff options
| author | Wang Mingyu <wangmy@fujitsu.com> | 2024-11-12 17:24:08 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-18 22:09:02 +0000 |
| commit | 594936b8ae892cac97176db4e0b744b09cc4045f (patch) | |
| tree | 2991583103a27d55700ca8886ecd782a7419b32e /meta | |
| parent | 6326e8fefd24f2abd72bac3727205c5b70ad21d2 (diff) | |
| download | poky-594936b8ae892cac97176db4e0b744b09cc4045f.tar.gz | |
iptables: upgrade 1.8.10 -> 1.8.11
0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
0002-nft-ruleparse-Add-missing-braces-around-ternary.patch
removed since they're included in 1.8.11
Changelog:
https://netfilter.org/projects/iptables/files/changes-iptables-1.8.11.txt
(From OE-Core rev: d12f4bf60cc45bf9f73f688000786cfea7a2faeb)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch | 53 | ||||
| -rw-r--r-- | meta/recipes-extended/iptables/iptables/0002-nft-ruleparse-Add-missing-braces-around-ternary.patch | 37 | ||||
| -rw-r--r-- | meta/recipes-extended/iptables/iptables_1.8.11.bb (renamed from meta/recipes-extended/iptables/iptables_1.8.10.bb) | 4 |
3 files changed, 1 insertions, 93 deletions
diff --git a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch deleted file mode 100644 index 0fe2261511..0000000000 --- a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch +++ /dev/null | |||
| @@ -1,53 +0,0 @@ | |||
| 1 | From 653db8b938166db7833135f615b90c38a3f27a30 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
| 3 | Date: Thu, 25 Apr 2024 10:51:02 +0200 | ||
| 4 | Subject: [PATCH] configure: Add option to enable/disable libnfnetlink | ||
| 5 | |||
| 6 | Default behavior (autodetecting) does not change, but specifying | ||
| 7 | either option would explicitly disable or enable libnfnetlink support, | ||
| 8 | and if the library is not found in the latter case, ./configure will error | ||
| 9 | out. | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://git.netfilter.org/iptables/commit/?id=653db8b938166db7833135f615b90c38a3f27a30] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
| 14 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 15 | Signed-off-by: Phil Sutter <phil@nwl.cc> | ||
| 16 | --- | ||
| 17 | configure.ac | 13 +++++++++++-- | ||
| 18 | 1 file changed, 11 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/configure.ac b/configure.ac | ||
| 21 | index d99fa3b9..2293702b 100644 | ||
| 22 | --- a/configure.ac | ||
| 23 | +++ b/configure.ac | ||
| 24 | @@ -63,6 +63,9 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], | ||
| 25 | AC_ARG_ENABLE([nftables], | ||
| 26 | AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]), | ||
| 27 | [enable_nftables="$enableval"], [enable_nftables="yes"]) | ||
| 28 | +AC_ARG_ENABLE([libnfnetlink], | ||
| 29 | + AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]), | ||
| 30 | + [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="auto"]) | ||
| 31 | AC_ARG_ENABLE([connlabel], | ||
| 32 | AS_HELP_STRING([--disable-connlabel], | ||
| 33 | [Do not build libnetfilter_conntrack]), | ||
| 34 | @@ -113,8 +116,14 @@ AM_CONDITIONAL([ENABLE_SYNCONF], [test "$enable_nfsynproxy" = "yes"]) | ||
| 35 | AM_CONDITIONAL([ENABLE_NFTABLES], [test "$enable_nftables" = "yes"]) | ||
| 36 | AM_CONDITIONAL([ENABLE_CONNLABEL], [test "$enable_connlabel" = "yes"]) | ||
| 37 | |||
| 38 | -PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], | ||
| 39 | - [nfnetlink=1], [nfnetlink=0]) | ||
| 40 | +# If specified explicitly on the command line, error out when library was not found | ||
| 41 | +# Otherwise, disable and continue | ||
| 42 | +AS_IF([test "x$enable_libnfnetlink" = "xyes"], | ||
| 43 | + [PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], | ||
| 44 | + [nfnetlink=1])], | ||
| 45 | + [test "x$enable_libnfnetlink" = "xauto"], | ||
| 46 | + [PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], | ||
| 47 | + [nfnetlink=1], [nfnetlink=0])]) | ||
| 48 | AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1]) | ||
| 49 | |||
| 50 | if test "x$enable_bpfc" = "xyes" || test "x$enable_nfsynproxy" = "xyes"; then | ||
| 51 | -- | ||
| 52 | 2.39.2 | ||
| 53 | |||
diff --git a/meta/recipes-extended/iptables/iptables/0002-nft-ruleparse-Add-missing-braces-around-ternary.patch b/meta/recipes-extended/iptables/iptables/0002-nft-ruleparse-Add-missing-braces-around-ternary.patch deleted file mode 100644 index 4cbc8bdaf4..0000000000 --- a/meta/recipes-extended/iptables/iptables/0002-nft-ruleparse-Add-missing-braces-around-ternary.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | From 2026b08bce7fe87b5964f7912e1eef30f04922c1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Phil Sutter <phil@nwl.cc> | ||
| 3 | Date: Fri, 26 Jan 2024 18:43:10 +0100 | ||
| 4 | Subject: [PATCH] nft: ruleparse: Add missing braces around ternary | ||
| 5 | |||
| 6 | The expression evaluated the sum before the ternay, consequently not | ||
| 7 | adding target->size if tgsize was zero. | ||
| 8 | |||
| 9 | Identified by ASAN for a simple rule using standard target: | ||
| 10 | | # ebtables -A INPUT -s de:ad:be:ef:0:00 -j RETURN | ||
| 11 | | # ebtables -D INPUT -s de:ad:be:ef:0:00 -j RETURN | ||
| 12 | | ================================================================= | ||
| 13 | | ==18925==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000120 at pc 0x7f627a4c75c5 bp 0x7ffe882b5180 sp 0x7ffe882b4928 | ||
| 14 | | READ of size 8 at 0x603000000120 thread T0 | ||
| 15 | | [...] | ||
| 16 | |||
| 17 | Upstream-Status: Backport [2026b08bce7fe87b5964f7912e1eef30f04922c1] | ||
| 18 | |||
| 19 | Fixes: 2a6eee89083c8 ("nft-ruleparse: Introduce nft_create_target()") | ||
| 20 | Signed-off-by: Phil Sutter <phil@nwl.cc> | ||
| 21 | --- | ||
| 22 | iptables/nft-ruleparse.c | 2 +- | ||
| 23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 24 | |||
| 25 | diff --git a/iptables/nft-ruleparse.c b/iptables/nft-ruleparse.c | ||
| 26 | index 0bbdf44faf..3b1cbe4fa1 100644 | ||
| 27 | --- a/iptables/nft-ruleparse.c | ||
| 28 | +++ b/iptables/nft-ruleparse.c | ||
| 29 | @@ -94,7 +94,7 @@ __nft_create_target(struct nft_xt_ctx *ctx, const char *name, size_t tgsize) | ||
| 30 | if (!target) | ||
| 31 | return NULL; | ||
| 32 | |||
| 33 | - size = XT_ALIGN(sizeof(*target->t)) + tgsize ?: target->size; | ||
| 34 | + size = XT_ALIGN(sizeof(*target->t)) + (tgsize ?: target->size); | ||
| 35 | |||
| 36 | target->t = xtables_calloc(1, size); | ||
| 37 | target->t->u.target_size = size; | ||
diff --git a/meta/recipes-extended/iptables/iptables_1.8.10.bb b/meta/recipes-extended/iptables/iptables_1.8.11.bb index a94e4749ae..686dc5afe5 100644 --- a/meta/recipes-extended/iptables/iptables_1.8.10.bb +++ b/meta/recipes-extended/iptables/iptables_1.8.11.bb | |||
| @@ -13,10 +13,8 @@ SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.xz \ | |||
| 13 | file://iptables.rules \ | 13 | file://iptables.rules \ |
| 14 | file://ip6tables.service \ | 14 | file://ip6tables.service \ |
| 15 | file://ip6tables.rules \ | 15 | file://ip6tables.rules \ |
| 16 | file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ | ||
| 17 | file://0002-nft-ruleparse-Add-missing-braces-around-ternary.patch \ | ||
| 18 | " | 16 | " |
| 19 | SRC_URI[sha256sum] = "5cc255c189356e317d070755ce9371eb63a1b783c34498fb8c30264f3cc59c9c" | 17 | SRC_URI[sha256sum] = "d87303d55ef8c92bcad4dd3f978b26d272013642b029425775f5bad1009fe7b2" |
| 20 | 18 | ||
| 21 | SYSTEMD_SERVICE:${PN} = "\ | 19 | SYSTEMD_SERVICE:${PN} = "\ |
| 22 | iptables.service \ | 20 | iptables.service \ |
