From e39a6f6c547bfad8b1aed9a91d43af1ab0f890bd Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 11 Aug 2023 21:13:50 +0200 Subject: [PATCH 01/15] Convert license to SPDX format Signed-off-by: Phil Sutter --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index 73ccd76..eeae4ab 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.17 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Manage Linux IP sets License: GPLv2 @@ -171,6 +171,9 @@ fi %changelog +* Fri Aug 11 2023 Phil Sutter - 7.17-4 +- Convert license to SPDX format + * Thu Jul 20 2023 Fedora Release Engineering - 7.17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 3b8395e7e676a8eec4045286172c42b20a3e5bac Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 11 Aug 2023 21:13:57 +0200 Subject: [PATCH 02/15] Convert license to SPDX format Signed-off-by: Phil Sutter --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index eeae4ab..5f9152d 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.17 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Manage Linux IP sets License: GPLv2 @@ -171,6 +171,9 @@ fi %changelog +* Fri Aug 11 2023 Phil Sutter - 7.17-5 +- Convert license to SPDX format + * Fri Aug 11 2023 Phil Sutter - 7.17-4 - Convert license to SPDX format From ff45e749b21d9e3838ecfab581dc367380551f4f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 11 Aug 2023 21:14:14 +0200 Subject: [PATCH 03/15] Convert license to SPDX format Signed-off-by: Phil Sutter --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index 5f9152d..6ed9e26 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.17 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Manage Linux IP sets License: GPLv2 @@ -171,6 +171,9 @@ fi %changelog +* Fri Aug 11 2023 Phil Sutter - 7.17-6 +- Convert license to SPDX format + * Fri Aug 11 2023 Phil Sutter - 7.17-5 - Convert license to SPDX format From 904bbed4ddb8ee3bfa98d1928ad30fb948f244ac Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 11 Aug 2023 21:14:56 +0200 Subject: [PATCH 04/15] Convert license to SPDX format Signed-off-by: Phil Sutter --- ipset.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ipset.spec b/ipset.spec index 6ed9e26..9af674c 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,9 +1,9 @@ Name: ipset Version: 7.17 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Manage Linux IP sets -License: GPLv2 +License: GPL-2.0-only URL: http://ipset.netfilter.org/ Source0: %{url}/%{name}-%{version}.tar.bz2 Source1: %{name}.service @@ -171,6 +171,9 @@ fi %changelog +* Fri Aug 11 2023 Phil Sutter - 7.17-7 +- Convert license to SPDX format + * Fri Aug 11 2023 Phil Sutter - 7.17-6 - Convert license to SPDX format From 1d4434c8b293e6d4c9d0d68afe0b6cb279a0be37 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 23 Oct 2023 13:53:29 +0200 Subject: [PATCH 05/15] Update to 7.19 --- ipset.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ipset.spec b/ipset.spec index 9af674c..6949b49 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset -Version: 7.17 -Release: 7%{?dist} +Version: 7.19 +Release: 1%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -171,6 +171,9 @@ fi %changelog +* Mon Oct 23 2023 Nicolas Chauvet - 7.19-1 +- Update to 7.19 + * Fri Aug 11 2023 Phil Sutter - 7.17-7 - Convert license to SPDX format diff --git a/sources b/sources index 602f1fb..3f5e652 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipset-7.17.tar.bz2) = e308a0d7707ccf7d0cb06a32cf9a822f97862e007abdbab8a91a5a0d5bfbd9f2fb9a3f5e8f36b250ec0d565438c8648a31e8e5b45d8205a76558e90f46e6e597 +SHA512 (ipset-7.19.tar.bz2) = 0f4252e6d967b0f130a2c7a0307b17c6b7d48336e86b2f838ea176f5faaa0c9bbbf273060906b43d91e9b38a9f33c18918e33d02292839a6bc321181d5d7f84e From 10bf621d6db1c5478cb4782049c34e35da8804c3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 23:14:58 +0000 Subject: [PATCH 06/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index 6949b49..0c7862f 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.19 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -171,6 +171,9 @@ fi %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 7.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Oct 23 2023 Nicolas Chauvet - 7.19-1 - Update to 7.19 From a657c361cb6d07c4d388d22cbd60e1a892667846 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 22:53:46 +0000 Subject: [PATCH 07/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index 0c7862f..a5687a5 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.19 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -171,6 +171,9 @@ fi %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 7.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 7.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d87bd16c2c84a448940705512165126deba45721 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 1 Feb 2024 14:20:15 +0100 Subject: [PATCH 08/15] Update to 7.20 --- ipset.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ipset.spec b/ipset.spec index a5687a5..3400789 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset -Version: 7.19 -Release: 3%{?dist} +Version: 7.20 +Release: 1%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -171,6 +171,9 @@ fi %changelog +* Thu Feb 01 2024 Nicolas Chauvet - 7.20-1 +- Update to 7.20 + * Wed Jan 24 2024 Fedora Release Engineering - 7.19-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 3f5e652..4e000ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipset-7.19.tar.bz2) = 0f4252e6d967b0f130a2c7a0307b17c6b7d48336e86b2f838ea176f5faaa0c9bbbf273060906b43d91e9b38a9f33c18918e33d02292839a6bc321181d5d7f84e +SHA512 (ipset-7.20.tar.bz2) = d0b87ab889987a3febeaf3d73099a262aca86160878258b3bd1be064e52b55baa90601804b30ad3bbb363066c9fc1bbdfe8bc100414f801729215a892e186fc6 From 411d25f4a63f95ff24dd654e1ee8624f5434644d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 12 Feb 2024 13:17:00 +0100 Subject: [PATCH 09/15] Update to 7.21 --- ipset.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ipset.spec b/ipset.spec index 3400789..ae31410 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,5 +1,5 @@ Name: ipset -Version: 7.20 +Version: 7.21 Release: 1%{?dist} Summary: Manage Linux IP sets @@ -171,6 +171,9 @@ fi %changelog +* Mon Feb 12 2024 Nicolas Chauvet - 7.21-1 +- Update to 7.21 + * Thu Feb 01 2024 Nicolas Chauvet - 7.20-1 - Update to 7.20 diff --git a/sources b/sources index 4e000ad..588e6be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipset-7.20.tar.bz2) = d0b87ab889987a3febeaf3d73099a262aca86160878258b3bd1be064e52b55baa90601804b30ad3bbb363066c9fc1bbdfe8bc100414f801729215a892e186fc6 +SHA512 (ipset-7.21.tar.bz2) = 175c6516c2091c57738a0324678d8d016e4d7f18fa03cb0dcc502391cac4caf4db1e757f61ad2fe312c1dbe431ec9cfabbc8e15a64a94ebd2fa903155b27c88f From 5cff36f4547eb6ff85eec8288e4918bbae848d00 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 10:33:14 +0000 Subject: [PATCH 10/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index ae31410..e366c38 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.21 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -171,6 +171,9 @@ fi %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 7.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Feb 12 2024 Nicolas Chauvet - 7.21-1 - Update to 7.21 From 044838f10facbd6b7b175f1eab3675f526d32a38 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 1 Aug 2024 14:16:05 +0200 Subject: [PATCH 11/15] ipset-7.22-1 - Turn absolute ipset-translate symlink into a relative one - Rebase onto v7.22 plus fixes --- ...Fix-typo-in-ipset-translate-man-page.patch | 31 -- ...ith-WARN_ON_ONCE-according-to-usage-.patch | 23 ++ 0001-build-do-install-libipset-args.h.patch | 28 -- 0002-Fix-IPv6-sets-nftables-translation.patch | 91 ----- ...-global-buffer-overflow-warning-by-A.patch | 54 +++ ...late-allow-invoking-with-a-path-name.patch | 46 --- ...-ipset-Avoid-argv-array-overstepping.patch | 38 ++ 0004-tests-Reduce-testsuite-run-time.patch | 354 ++++++++++++++++++ ipset.spec | 16 +- sources | 2 +- 10 files changed, 484 insertions(+), 199 deletions(-) delete mode 100644 0001-Fix-typo-in-ipset-translate-man-page.patch create mode 100644 0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch delete mode 100644 0001-build-do-install-libipset-args.h.patch delete mode 100644 0002-Fix-IPv6-sets-nftables-translation.patch create mode 100644 0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch delete mode 100644 0003-ipset-translate-allow-invoking-with-a-path-name.patch create mode 100644 0003-lib-ipset-Avoid-argv-array-overstepping.patch create mode 100644 0004-tests-Reduce-testsuite-run-time.patch diff --git a/0001-Fix-typo-in-ipset-translate-man-page.patch b/0001-Fix-typo-in-ipset-translate-man-page.patch deleted file mode 100644 index 5c841e0..0000000 --- a/0001-Fix-typo-in-ipset-translate-man-page.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c74a420471fd693f89e0b0e19f93c88af22fb7de Mon Sep 17 00:00:00 2001 -From: "Bernhard M. Wiedemann" -Date: Wed, 29 Sep 2021 09:55:43 +0200 -Subject: [PATCH] Fix typo in ipset-translate man page - -originally reported in -https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/ZIXKNQHSSCQ4ZLEGYYKLAXQ4PQ5EYFGZ/ -by Larry Len Rainey - -Signed-off-by: Bernhard M. Wiedemann -Signed-off-by: Pablo Neira Ayuso ---- - src/ipset-translate.8 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ipset-translate.8 b/src/ipset-translate.8 -index bb4e737e1480..55ce2a99f2cf 100644 ---- a/src/ipset-translate.8 -+++ b/src/ipset-translate.8 -@@ -33,7 +33,7 @@ to \fBnftables(8)\fP. - The only available command is: - - .IP \[bu] 2 --ipset-translate restores < file.ipt -+ipset-translate restore < file.ipt - - .SH USAGE - The \fBipset-translate\fP tool reads an IP sets file in the syntax produced by --- -2.37.2 - diff --git a/0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch b/0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch new file mode 100644 index 0000000..7acff72 --- /dev/null +++ b/0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch @@ -0,0 +1,23 @@ +From 21080dc79c4e9244149aa78f6a8f7fbb6f4b8e81 Mon Sep 17 00:00:00 2001 +From: Jozsef Kadlecsik +Date: Thu, 6 Jun 2024 08:57:11 +0200 +Subject: [PATCH] Replace BUG_ON() with WARN_ON_ONCE() according to usage + policy. + +--- + kernel/net/netfilter/ipset/ip_set_list_set.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/net/netfilter/ipset/ip_set_list_set.c b/kernel/net/netfilter/ipset/ip_set_list_set.c +index fd78e2db06e4f..0d3e5a7331f26 100644 +--- a/kernel/net/netfilter/ipset/ip_set_list_set.c ++++ b/kernel/net/netfilter/ipset/ip_set_list_set.c +@@ -432,7 +432,7 @@ list_set_destroy(struct ip_set *set) + { + struct list_set *map = set->data; + +- BUG_ON(!list_empty(&map->members)); ++ WARN_ON_ONCE(!list_empty(&map->members)); + kfree(map); + + set->data = NULL; diff --git a/0001-build-do-install-libipset-args.h.patch b/0001-build-do-install-libipset-args.h.patch deleted file mode 100644 index c2f8edf..0000000 --- a/0001-build-do-install-libipset-args.h.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 39fde1381f0ba9101f65c08f2abda5426a46f8b1 Mon Sep 17 00:00:00 2001 -From: Jan Engelhardt -Date: Mon, 22 Jan 2018 22:50:33 +0100 -Subject: [PATCH] build: do install libipset/args.h - -libipset/types.h includes args.h, therefore args.h must be installed -too. - -Signed-off-by: Jan Engelhardt -Signed-off-by: Jozsef Kadlecsik ---- - include/libipset/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/libipset/Makefile.am b/include/libipset/Makefile.am -index 3b47518..79a1357 100644 ---- a/include/libipset/Makefile.am -+++ b/include/libipset/Makefile.am -@@ -1,5 +1,6 @@ - pkgincludedir = ${includedir}/libipset - pkginclude_HEADERS = \ -+ args.h \ - data.h \ - errcode.h \ - linux_ip_set_bitmap.h \ --- -2.11.0 - diff --git a/0002-Fix-IPv6-sets-nftables-translation.patch b/0002-Fix-IPv6-sets-nftables-translation.patch deleted file mode 100644 index f2756e8..0000000 --- a/0002-Fix-IPv6-sets-nftables-translation.patch +++ /dev/null @@ -1,91 +0,0 @@ -From be7f6099feb7b5d34715b06f9308877cdcdc404a Mon Sep 17 00:00:00 2001 -From: Pablo Neira Ayuso -Date: Mon, 28 Feb 2022 19:52:57 +0100 -Subject: [PATCH] Fix IPv6 sets nftables translation - -The parser assumes the set is an IPv4 ipset because IPSET_OPT_FAMILY is -not set. - - # ipset-translate restore < ./ipset-mwan3_set_connected_ipv6.dump - add table inet global - add set inet global mwan3_connected_v6 { type ipv6_addr; flags interval; } - flush set inet global mwan3_connected_v6 - ipset v7.15: Error in line 4: Syntax error: '64' is out of range 0-32 - -Remove ipset_xlate_type_get(), call ipset_xlate_set_get() instead to -obtain the set type and family. - -Reported-by: Florian Eckert -Fixes: 325af556cd3a ("add ipset to nftables translation infrastructure") -Signed-off-by: Pablo Neira Ayuso ---- - lib/ipset.c | 24 ++++++++++-------------- - tests/xlate/xlate.t | 2 ++ - tests/xlate/xlate.t.nft | 2 ++ - 3 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/lib/ipset.c b/lib/ipset.c -index 73e67db88e0d..50f86aee045b 100644 ---- a/lib/ipset.c -+++ b/lib/ipset.c -@@ -949,18 +949,6 @@ ipset_xlate_set_get(struct ipset *ipset, const char *name) - return NULL; - } - --static const struct ipset_type *ipset_xlate_type_get(struct ipset *ipset, -- const char *name) --{ -- const struct ipset_xlate_set *set; -- -- set = ipset_xlate_set_get(ipset, name); -- if (!set) -- return NULL; -- -- return set->type; --} -- - static int - ipset_parser(struct ipset *ipset, int oargc, char *oargv[]) - { -@@ -1282,8 +1270,16 @@ ipset_parser(struct ipset *ipset, int oargc, char *oargv[]) - if (!ipset->xlate) { - type = ipset_type_get(session, cmd); - } else { -- type = ipset_xlate_type_get(ipset, arg0); -- ipset_session_data_set(session, IPSET_OPT_TYPE, type); -+ const struct ipset_xlate_set *xlate_set; -+ -+ xlate_set = ipset_xlate_set_get(ipset, arg0); -+ if (xlate_set) { -+ ipset_session_data_set(session, IPSET_OPT_TYPE, -+ xlate_set->type); -+ ipset_session_data_set(session, IPSET_OPT_FAMILY, -+ &xlate_set->family); -+ type = xlate_set->type; -+ } - } - if (type == NULL) - return ipset->standard_error(ipset, p); -diff --git a/tests/xlate/xlate.t b/tests/xlate/xlate.t -index b1e7d288e2a9..f09cb202bb6c 100644 ---- a/tests/xlate/xlate.t -+++ b/tests/xlate/xlate.t -@@ -53,3 +53,5 @@ create bp1 bitmap:port range 1-1024 - add bp1 22 - create bim1 bitmap:ip,mac range 1.1.1.0/24 - add bim1 1.1.1.1,aa:bb:cc:dd:ee:ff -+create hn6 hash:net family inet6 -+add hn6 fe80::/64 -diff --git a/tests/xlate/xlate.t.nft b/tests/xlate/xlate.t.nft -index 96eba3b0175e..0152a3081125 100644 ---- a/tests/xlate/xlate.t.nft -+++ b/tests/xlate/xlate.t.nft -@@ -54,3 +54,5 @@ add set inet global bp1 { type inet_service; } - add element inet global bp1 { 22 } - add set inet global bim1 { type ipv4_addr . ether_addr; } - add element inet global bim1 { 1.1.1.1 . aa:bb:cc:dd:ee:ff } -+add set inet global hn6 { type ipv6_addr; flags interval; } -+add element inet global hn6 { fe80::/64 } --- -2.37.2 - diff --git a/0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch b/0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch new file mode 100644 index 0000000..115b5fc --- /dev/null +++ b/0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch @@ -0,0 +1,54 @@ +From f1bcacf5eeb8620ea684524e1ce9c3951a77f1f9 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Thu, 27 Jun 2024 10:18:16 +0200 +Subject: [PATCH] lib: data: Fix for global-buffer-overflow warning by ASAN + +After compiling with CFLAGS="-fsanitize=address -g", running the +testsuite triggers the following warning: + +| ipmap: Range: Check syntax error: missing range/from-to: FAILED +| Failed test: ../src/ipset 2>.foo.err -N test ipmap +| ================================================================= +| ==4204==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55a21e77172a at pc 0x7f1ef246f2a6 bp 0x7fffed8f4f40 sp 0x7fffed8f46e8 +| READ of size 32 at 0x55a21e77172a thread T0 +| #0 0x7f1ef246f2a5 in __interceptor_memcpy /var/tmp/portage/sys-devel/gcc-13.2.1_p20231014/work/gcc-13-20231014/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:899 +| #1 0x55a21e758bf6 in ipset_strlcpy /home/n0-1/git/ipset/lib/data.c:119 +| #2 0x55a21e758bf6 in ipset_data_set /home/n0-1/git/ipset/lib/data.c:349 +| #3 0x55a21e75ee2f in ipset_parse_typename /home/n0-1/git/ipset/lib/parse.c:1819 +| #4 0x55a21e754119 in ipset_parser /home/n0-1/git/ipset/lib/ipset.c:1205 +| #5 0x55a21e752cef in ipset_parse_argv /home/n0-1/git/ipset/lib/ipset.c:1344 +| #6 0x55a21e74ea45 in main /home/n0-1/git/ipset/src/ipset.c:38 +| #7 0x7f1ef224cf09 (/lib64/libc.so.6+0x23f09) +| #8 0x7f1ef224cfc4 in __libc_start_main (/lib64/libc.so.6+0x23fc4) +| #9 0x55a21e74f040 in _start (/home/n0-1/git/ipset/src/ipset+0x1d040) +| +| 0x55a21e77172a is located 54 bytes before global variable '*.LC1' defined in 'ipset_bitmap_ip.c' (0x55a21e771760) of size 19 +| '*.LC1' is ascii string 'IP|IP/CIDR|FROM-TO' +| 0x55a21e77172a is located 0 bytes after global variable '*.LC0' defined in 'ipset_bitmap_ip.c' (0x55a21e771720) of size 10 +| '*.LC0' is ascii string 'bitmap:ip' + +Fix this by avoiding 'src' array overstep in ipset_strlcpy(): In +contrast to strncpy(), memcpy() does not respect NUL-chars in input but +stubbornly reads as many bytes as specified. + +Fixes: a7432ba786ca4 ("Workaround misleading -Wstringop-truncation warning") +Signed-off-by: Phil Sutter +Signed-off-by: Jozsef Kadlecsik +--- + lib/data.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lib/data.c b/lib/data.c +index c05b20144cdad..64cad7a377302 100644 +--- a/lib/data.c ++++ b/lib/data.c +@@ -111,6 +111,9 @@ ipset_strlcpy(char *dst, const char *src, size_t len) + assert(dst); + assert(src); + ++ if (strlen(src) < len) ++ len = strlen(src) + 1; ++ + memcpy(dst, src, len); + dst[len - 1] = '\0'; + } diff --git a/0003-ipset-translate-allow-invoking-with-a-path-name.patch b/0003-ipset-translate-allow-invoking-with-a-path-name.patch deleted file mode 100644 index b6e21de..0000000 --- a/0003-ipset-translate-allow-invoking-with-a-path-name.patch +++ /dev/null @@ -1,46 +0,0 @@ -From e1b60b2a93356c313cccb2abfdae4b58d530e02b Mon Sep 17 00:00:00 2001 -From: Quentin Armitage -Date: Thu, 11 Aug 2022 17:52:18 +0100 -Subject: [PATCH] ipset-translate: allow invoking with a path name - -Executing /usr/sbin/ipset-translate results in the ipset functionality being run, rather than the ipset-translate functionality. - - # ipset-translate destroy fred - This command is not supported, use `ipset-translate restore < file' - - # /usr/sbin/ipset-translate destroy fred - ipset v7.15: The set with the given name does not exist - -use basename() to resolve the issue. - -Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1626 -Signed-off-by: Quentin Armitage -Signed-off-by: Pablo Neira Ayuso ---- - src/ipset.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/ipset.c b/src/ipset.c -index 6d42b60d2fe9..162f477d49cd 100644 ---- a/src/ipset.c -+++ b/src/ipset.c -@@ -6,6 +6,7 @@ - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -+#define _GNU_SOURCE - #include /* assert */ - #include /* fprintf */ - #include /* exit */ -@@ -31,7 +32,7 @@ main(int argc, char *argv[]) - exit(1); - } - -- if (!strcmp(argv[0], "ipset-translate")) { -+ if (!strcmp(basename(argv[0]), "ipset-translate")) { - ret = ipset_xlate_argv(ipset, argc, argv); - } else { - ret = ipset_parse_argv(ipset, argc, argv); --- -2.37.2 - diff --git a/0003-lib-ipset-Avoid-argv-array-overstepping.patch b/0003-lib-ipset-Avoid-argv-array-overstepping.patch new file mode 100644 index 0000000..99dfdca --- /dev/null +++ b/0003-lib-ipset-Avoid-argv-array-overstepping.patch @@ -0,0 +1,38 @@ +From 851cb04ffee5040f1e0063f77c3fe9bc6245e0fb Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Thu, 27 Jun 2024 10:18:17 +0200 +Subject: [PATCH] lib: ipset: Avoid 'argv' array overstepping + +The maximum accepted value for 'argc' is MAX_ARGS which matches 'argv' +array size. The maximum allowed array index is therefore argc-1. + +This fix will leave items in argv non-NULL-terminated, so explicitly +NULL the formerly last entry after shifting. + +Looks like a day-1 bug. Interestingly, this neither triggered ASAN nor +valgrind. Yet adding debug output printing argv entries being copied +did. + +Fixes: 1e6e8bd9a62aa ("Third stage to ipset-5") +Signed-off-by: Phil Sutter +Signed-off-by: Jozsef Kadlecsik +--- + lib/ipset.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/ipset.c b/lib/ipset.c +index c910d88805c28..3bf1c5fcdbc59 100644 +--- a/lib/ipset.c ++++ b/lib/ipset.c +@@ -343,9 +343,9 @@ ipset_shift_argv(int *argc, char *argv[], int from) + + assert(*argc >= from + 1); + +- for (i = from + 1; i <= *argc; i++) ++ for (i = from + 1; i < *argc; i++) + argv[i-1] = argv[i]; +- (*argc)--; ++ argv[--(*argc)] = NULL; + return; + } + diff --git a/0004-tests-Reduce-testsuite-run-time.patch b/0004-tests-Reduce-testsuite-run-time.patch new file mode 100644 index 0000000..499d356 --- /dev/null +++ b/0004-tests-Reduce-testsuite-run-time.patch @@ -0,0 +1,354 @@ +From 5c9ef9016d2781f6e07a544e34ec9f4a8d65d0e2 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Thu, 27 Jun 2024 10:18:18 +0200 +Subject: [PATCH] tests: Reduce testsuite run-time + +Where acceptable, batch add set element calls to avoid overhead of +excessive 'ipset' program spawns. On my (slow) testing VM, this patch +reduces a full run of tests/runtest.sh from ~70min down to ~11min. + +This might eliminate the situation being tested: resize.sh might be such +a case so batch only 255 'ipset add' calls and continue to repeat these +batched calls 32 times in hopes that it still qualifies as the resizing +stress test tests/hash:ip.t calls it. + +Signed-off-by: Phil Sutter +Signed-off-by: Jozsef Kadlecsik +--- + tests/resize.sh | 4 ++-- + tests/resizec.sh | 32 +++++++++++++-------------- + tests/resizen.sh | 49 ++++++++++++++++++++--------------------- + tests/resizet.sh | 40 ++++++++++++++++----------------- + tests/setlist_resize.sh | 4 ++-- + 5 files changed, 64 insertions(+), 65 deletions(-) + +diff --git a/tests/resize.sh b/tests/resize.sh +index 19b93fb01876c..9069b4970e92d 100755 +--- a/tests/resize.sh ++++ b/tests/resize.sh +@@ -9,6 +9,6 @@ set -e + $ipset n resize-test hash:ip hashsize 64 + for x in `seq 1 32`; do + for y in `seq 1 255`; do +- $ipset a resize-test 192.168.$x.$y +- done ++ echo "a resize-test 192.168.$x.$y" ++ done | $ipset restore + done +diff --git a/tests/resizec.sh b/tests/resizec.sh +index 28d674769f76f..781acf74c38dd 100755 +--- a/tests/resizec.sh ++++ b/tests/resizec.sh +@@ -25,65 +25,65 @@ case "$2" in + $ipset n test hash:ip $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y comment "text $ip$x$sep$y" ++ echo "a test $ip$x$sep$y comment \"text $ip$x$sep$y\"" + done +- done ++ done | $ipset restore + ;; + ipport) + $ipset n test hash:ip,port $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023 "text $ip$x$sep$y,1023" ++ echo "a test $ip$x$sep$y,1023 \"text $ip$x$sep$y,1023\"" + done +- done ++ done | $ipset restore + ;; + ipportip) + $ipset n test hash:ip,port,ip $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023,$ip2 comment "text $ip$x$sep$y,1023,$ip2" ++ echo "a test $ip$x$sep$y,1023,$ip2 comment \"text $ip$x$sep$y,1023,$ip2\"" + done +- done ++ done | $ipset restore + ;; + ipportnet) + $ipset n test hash:ip,port,net $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023,$ip2/$net comment "text $ip$x$sep$y,1023,$ip2/$net" ++ echo "a test $ip$x$sep$y,1023,$ip2/$net comment \"text $ip$x$sep$y,1023,$ip2/$net\"" + done +- done ++ done | $ipset restore + ;; + net) + $ipset n test hash:net $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net comment "text $ip$x$sep$y/$net" ++ echo "a test $ip$x$sep$y/$net comment \"text $ip$x$sep$y/$net\"" + done +- done ++ done | $ipset restore + ;; + netnet) + $ipset n test hash:net,net $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net comment "text $ip$x$sep$y/$net,$ip$y$sep$x/$net" ++ echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net comment \"text $ip$x$sep$y/$net,$ip$y$sep$x/$net\"" + done +- done ++ done | $ipset restore + ;; + netport) + $ipset n test hash:net,port $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,1023 comment "text $ip$x$sep$y/$net,1023" ++ echo "a test $ip$x$sep$y/$net,1023 comment \"text $ip$x$sep$y/$net,1023\"" + done +- done ++ done | $ipset restore + ;; + netiface) + $ipset n test hash:net,iface $1 hashsize 64 comment + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,eth0 comment "text $ip$x$sep$y/$net,eth0" ++ echo "$ipset a test $ip$x$sep$y/$net,eth0 comment \"text $ip$x$sep$y/$net,eth0\"" + done +- done ++ done | $ipset restore + ;; + esac + $ipset l test | grep ^$ip | while read x y z; do +diff --git a/tests/resizen.sh b/tests/resizen.sh +index 9322bd2a2cfce..13221f7b0894a 100755 +--- a/tests/resizen.sh ++++ b/tests/resizen.sh +@@ -25,80 +25,79 @@ case "$2" in + $ipset n test hash:ip,port,net $1 hashsize 64 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023,$ip2/$net nomatch ++ echo "a test $ip$x$sep$y,1023,$ip2/$net nomatch" + done +- done ++ done | $ipset restore + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset t test $ip$x$sep$y,1023,$ip2/$net nomatch 2>/dev/null ++ echo "t test $ip$x$sep$y,1023,$ip2/$net nomatch" + done +- done ++ done | $ipset restore 2>/dev/null + ;; + netportnet) + $ipset n test hash:net,port,net $1 hashsize 64 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023,$ip2/$net nomatch ++ echo "a test $ip$x$sep$y,1023,$ip2/$net nomatch" + done +- done ++ done | $ipset restore + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset t test $ip$x$sep$y,1023,$ip2/$net nomatch 2>/dev/null ++ echo "t test $ip$x$sep$y,1023,$ip2/$net nomatch" + done +- done ++ done | $ipset restore 2>/dev/null + ;; + net) + $ipset n test hash:net $1 hashsize 64 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net nomatch ++ echo "a test $ip$x$sep$y/$net nomatch" + done +- done ++ done | $ipset restore + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset t test $ip$x$sep$y/$net nomatch 2>/dev/null ++ echo "t test $ip$x$sep$y/$net nomatch" + done +- done ++ done | $ipset restore 2>/dev/null + ;; + netnet) + $ipset n test hash:net,net $1 hashsize 64 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch ++ echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch" + done +- done ++ done | $ipset restore + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset t test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch \ +- 2>/dev/null ++ echo "t test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch" + done +- done ++ done | $ipset restore 2>/dev/null + ;; + netport) + $ipset n test hash:net,port $1 hashsize 64 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,1023 nomatch ++ echo "a test $ip$x$sep$y/$net,1023 nomatch" + done +- done ++ done | $ipset restore + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset t test $ip$x$sep$y/$net,1023 nomatch 2>/dev/null ++ echo "t test $ip$x$sep$y/$net,1023 nomatch" + done +- done ++ done | $ipset restore 2>/dev/null + ;; + netiface) + $ipset n test hash:net,iface $1 hashsize 64 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,eth0 nomatch ++ echo "a test $ip$x$sep$y/$net,eth0 nomatch" + done +- done ++ done | $ipset restore + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset t test $ip$x$sep$y/$net,eth0 nomatch 2>/dev/null ++ echo "t test $ip$x$sep$y/$net,eth0 nomatch" + done +- done ++ done | $ipset restore 2>/dev/null + ;; + esac + $ipset x +diff --git a/tests/resizet.sh b/tests/resizet.sh +index eed4abf2bd86e..e8fdd732435ab 100755 +--- a/tests/resizet.sh ++++ b/tests/resizet.sh +@@ -25,81 +25,81 @@ case "$2" in + $ipset n test hash:ip $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y ++ echo "a test $ip$x$sep$y" + done +- done ++ done | $ipset restore + ;; + ipmark) + $ipset n test hash:ip,mark $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023 ++ echo "a test $ip$x$sep$y,1023" + done +- done ++ done | $ipset restore + ;; + ipport) + $ipset n test hash:ip,port $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023 ++ echo "a test $ip$x$sep$y,1023" + done +- done ++ done | $ipset restore + ;; + ipportip) + $ipset n test hash:ip,port,ip $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023,$ip2 ++ echo "a test $ip$x$sep$y,1023,$ip2" + done +- done ++ done | $ipset restore + ;; + ipportnet) + $ipset n test hash:ip,port,net $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y,1023,$ip2/$net ++ echo "a test $ip$x$sep$y,1023,$ip2/$net" + done +- done ++ done | $ipset restore + ;; + netportnet) + $ipset n test hash:net,port,net $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 128`; do +- $ipset a test $ip$x$sep$y/$net,1023,$ip$y$sep$x/$net ++ echo "a test $ip$x$sep$y/$net,1023,$ip$y$sep$x/$net" + done +- done ++ done | $ipset restore + ;; + net) + $ipset n test hash:net $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net ++ echo "a test $ip$x$sep$y/$net" + done +- done ++ done | $ipset restore + ;; + netnet) + $ipset n test hash:net,net $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net ++ echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net" + done +- done ++ done | $ipset restore + ;; + netport) + $ipset n test hash:net,port $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,1023 ++ echo "a test $ip$x$sep$y/$net,1023" + done +- done ++ done | $ipset restore + ;; + netiface) + $ipset n test hash:net,iface $1 hashsize 64 timeout 100 + for x in `seq 0 16`; do + for y in `seq 0 255`; do +- $ipset a test $ip$x$sep$y/$net,eth0 ++ echo "a test $ip$x$sep$y/$net,eth0" + done +- done ++ done | $ipset restore + ;; + esac + $ipset l test | grep ^$ip | while read x y z; do +diff --git a/tests/setlist_resize.sh b/tests/setlist_resize.sh +index 1c2be327b841a..acb33e3ba0f08 100755 +--- a/tests/setlist_resize.sh ++++ b/tests/setlist_resize.sh +@@ -25,9 +25,9 @@ rmmod ip_set >/dev/null 2>&1 + create() { + n=$1 + while [ $n -le 1024 ]; do +- $ipset c test$n hash:ip ++ echo "c test$n hash:ip" + n=$((n+2)) +- done ++ done | $ipset restore + } + + for x in `seq 1 $loop`; do diff --git a/ipset.spec b/ipset.spec index e366c38..c10dd01 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset -Version: 7.21 -Release: 2%{?dist} +Version: 7.22 +Release: 1%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -10,6 +10,11 @@ Source1: %{name}.service Source2: %{name}.start-stop Source3: %{name}-config +Patch001: 0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch +Patch002: 0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch +Patch003: 0003-lib-ipset-Avoid-argv-array-overstepping.patch +Patch004: 0004-tests-Reduce-testsuite-run-time.patch + BuildRequires: libmnl-devel BuildRequires: automake BuildRequires: autoconf @@ -108,6 +113,9 @@ install -c -m 600 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-config # Create directory for configuration mkdir -p %{buildroot}%{_sysconfdir}/%{name} +# Turn absolute symlink into a relative one +ln -sf %{name} %{buildroot}/%{_sbindir}/%{name}-translate + %preun if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then @@ -171,6 +179,10 @@ fi %changelog +* Thu Aug 01 2024 Phil Sutter - 7.22-1 +- Turn absolute ipset-translate symlink into a relative one +- Rebase onto v7.22 plus fixes + * Thu Jul 18 2024 Fedora Release Engineering - 7.21-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 588e6be..f0c0e6f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipset-7.21.tar.bz2) = 175c6516c2091c57738a0324678d8d016e4d7f18fa03cb0dcc502391cac4caf4db1e757f61ad2fe312c1dbe431ec9cfabbc8e15a64a94ebd2fa903155b27c88f +SHA512 (ipset-7.22.tar.bz2) = e375a9110eb7974480147c57eb2cff4bdd03c7704cdae006a3d254cc80fada587aa8aee25a86f7cab29db83f5e283c5f9a47a314297317660ebba5097f623d79 From e6e33e65e2d096d6bee17c8d4baaec61b257e187 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 07:21:42 +0000 Subject: [PATCH 12/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index c10dd01..9f235d0 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.22 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -179,6 +179,9 @@ fi %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 7.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Aug 01 2024 Phil Sutter - 7.22-1 - Turn absolute ipset-translate symlink into a relative one - Rebase onto v7.22 plus fixes From 506847bd396e005f3e686a84be16b9263f62344e Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 7 May 2025 16:39:33 +0200 Subject: [PATCH 13/15] New version 7.23 --- ...ith-WARN_ON_ONCE-according-to-usage-.patch | 23 -- ...-global-buffer-overflow-warning-by-A.patch | 54 --- ...-ipset-Avoid-argv-array-overstepping.patch | 38 -- 0004-tests-Reduce-testsuite-run-time.patch | 354 ------------------ ipset.spec | 12 +- sources | 2 +- 6 files changed, 6 insertions(+), 477 deletions(-) delete mode 100644 0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch delete mode 100644 0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch delete mode 100644 0003-lib-ipset-Avoid-argv-array-overstepping.patch delete mode 100644 0004-tests-Reduce-testsuite-run-time.patch diff --git a/0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch b/0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch deleted file mode 100644 index 7acff72..0000000 --- a/0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 21080dc79c4e9244149aa78f6a8f7fbb6f4b8e81 Mon Sep 17 00:00:00 2001 -From: Jozsef Kadlecsik -Date: Thu, 6 Jun 2024 08:57:11 +0200 -Subject: [PATCH] Replace BUG_ON() with WARN_ON_ONCE() according to usage - policy. - ---- - kernel/net/netfilter/ipset/ip_set_list_set.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/kernel/net/netfilter/ipset/ip_set_list_set.c b/kernel/net/netfilter/ipset/ip_set_list_set.c -index fd78e2db06e4f..0d3e5a7331f26 100644 ---- a/kernel/net/netfilter/ipset/ip_set_list_set.c -+++ b/kernel/net/netfilter/ipset/ip_set_list_set.c -@@ -432,7 +432,7 @@ list_set_destroy(struct ip_set *set) - { - struct list_set *map = set->data; - -- BUG_ON(!list_empty(&map->members)); -+ WARN_ON_ONCE(!list_empty(&map->members)); - kfree(map); - - set->data = NULL; diff --git a/0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch b/0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch deleted file mode 100644 index 115b5fc..0000000 --- a/0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch +++ /dev/null @@ -1,54 +0,0 @@ -From f1bcacf5eeb8620ea684524e1ce9c3951a77f1f9 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 27 Jun 2024 10:18:16 +0200 -Subject: [PATCH] lib: data: Fix for global-buffer-overflow warning by ASAN - -After compiling with CFLAGS="-fsanitize=address -g", running the -testsuite triggers the following warning: - -| ipmap: Range: Check syntax error: missing range/from-to: FAILED -| Failed test: ../src/ipset 2>.foo.err -N test ipmap -| ================================================================= -| ==4204==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55a21e77172a at pc 0x7f1ef246f2a6 bp 0x7fffed8f4f40 sp 0x7fffed8f46e8 -| READ of size 32 at 0x55a21e77172a thread T0 -| #0 0x7f1ef246f2a5 in __interceptor_memcpy /var/tmp/portage/sys-devel/gcc-13.2.1_p20231014/work/gcc-13-20231014/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:899 -| #1 0x55a21e758bf6 in ipset_strlcpy /home/n0-1/git/ipset/lib/data.c:119 -| #2 0x55a21e758bf6 in ipset_data_set /home/n0-1/git/ipset/lib/data.c:349 -| #3 0x55a21e75ee2f in ipset_parse_typename /home/n0-1/git/ipset/lib/parse.c:1819 -| #4 0x55a21e754119 in ipset_parser /home/n0-1/git/ipset/lib/ipset.c:1205 -| #5 0x55a21e752cef in ipset_parse_argv /home/n0-1/git/ipset/lib/ipset.c:1344 -| #6 0x55a21e74ea45 in main /home/n0-1/git/ipset/src/ipset.c:38 -| #7 0x7f1ef224cf09 (/lib64/libc.so.6+0x23f09) -| #8 0x7f1ef224cfc4 in __libc_start_main (/lib64/libc.so.6+0x23fc4) -| #9 0x55a21e74f040 in _start (/home/n0-1/git/ipset/src/ipset+0x1d040) -| -| 0x55a21e77172a is located 54 bytes before global variable '*.LC1' defined in 'ipset_bitmap_ip.c' (0x55a21e771760) of size 19 -| '*.LC1' is ascii string 'IP|IP/CIDR|FROM-TO' -| 0x55a21e77172a is located 0 bytes after global variable '*.LC0' defined in 'ipset_bitmap_ip.c' (0x55a21e771720) of size 10 -| '*.LC0' is ascii string 'bitmap:ip' - -Fix this by avoiding 'src' array overstep in ipset_strlcpy(): In -contrast to strncpy(), memcpy() does not respect NUL-chars in input but -stubbornly reads as many bytes as specified. - -Fixes: a7432ba786ca4 ("Workaround misleading -Wstringop-truncation warning") -Signed-off-by: Phil Sutter -Signed-off-by: Jozsef Kadlecsik ---- - lib/data.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/lib/data.c b/lib/data.c -index c05b20144cdad..64cad7a377302 100644 ---- a/lib/data.c -+++ b/lib/data.c -@@ -111,6 +111,9 @@ ipset_strlcpy(char *dst, const char *src, size_t len) - assert(dst); - assert(src); - -+ if (strlen(src) < len) -+ len = strlen(src) + 1; -+ - memcpy(dst, src, len); - dst[len - 1] = '\0'; - } diff --git a/0003-lib-ipset-Avoid-argv-array-overstepping.patch b/0003-lib-ipset-Avoid-argv-array-overstepping.patch deleted file mode 100644 index 99dfdca..0000000 --- a/0003-lib-ipset-Avoid-argv-array-overstepping.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 851cb04ffee5040f1e0063f77c3fe9bc6245e0fb Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 27 Jun 2024 10:18:17 +0200 -Subject: [PATCH] lib: ipset: Avoid 'argv' array overstepping - -The maximum accepted value for 'argc' is MAX_ARGS which matches 'argv' -array size. The maximum allowed array index is therefore argc-1. - -This fix will leave items in argv non-NULL-terminated, so explicitly -NULL the formerly last entry after shifting. - -Looks like a day-1 bug. Interestingly, this neither triggered ASAN nor -valgrind. Yet adding debug output printing argv entries being copied -did. - -Fixes: 1e6e8bd9a62aa ("Third stage to ipset-5") -Signed-off-by: Phil Sutter -Signed-off-by: Jozsef Kadlecsik ---- - lib/ipset.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/ipset.c b/lib/ipset.c -index c910d88805c28..3bf1c5fcdbc59 100644 ---- a/lib/ipset.c -+++ b/lib/ipset.c -@@ -343,9 +343,9 @@ ipset_shift_argv(int *argc, char *argv[], int from) - - assert(*argc >= from + 1); - -- for (i = from + 1; i <= *argc; i++) -+ for (i = from + 1; i < *argc; i++) - argv[i-1] = argv[i]; -- (*argc)--; -+ argv[--(*argc)] = NULL; - return; - } - diff --git a/0004-tests-Reduce-testsuite-run-time.patch b/0004-tests-Reduce-testsuite-run-time.patch deleted file mode 100644 index 499d356..0000000 --- a/0004-tests-Reduce-testsuite-run-time.patch +++ /dev/null @@ -1,354 +0,0 @@ -From 5c9ef9016d2781f6e07a544e34ec9f4a8d65d0e2 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 27 Jun 2024 10:18:18 +0200 -Subject: [PATCH] tests: Reduce testsuite run-time - -Where acceptable, batch add set element calls to avoid overhead of -excessive 'ipset' program spawns. On my (slow) testing VM, this patch -reduces a full run of tests/runtest.sh from ~70min down to ~11min. - -This might eliminate the situation being tested: resize.sh might be such -a case so batch only 255 'ipset add' calls and continue to repeat these -batched calls 32 times in hopes that it still qualifies as the resizing -stress test tests/hash:ip.t calls it. - -Signed-off-by: Phil Sutter -Signed-off-by: Jozsef Kadlecsik ---- - tests/resize.sh | 4 ++-- - tests/resizec.sh | 32 +++++++++++++-------------- - tests/resizen.sh | 49 ++++++++++++++++++++--------------------- - tests/resizet.sh | 40 ++++++++++++++++----------------- - tests/setlist_resize.sh | 4 ++-- - 5 files changed, 64 insertions(+), 65 deletions(-) - -diff --git a/tests/resize.sh b/tests/resize.sh -index 19b93fb01876c..9069b4970e92d 100755 ---- a/tests/resize.sh -+++ b/tests/resize.sh -@@ -9,6 +9,6 @@ set -e - $ipset n resize-test hash:ip hashsize 64 - for x in `seq 1 32`; do - for y in `seq 1 255`; do -- $ipset a resize-test 192.168.$x.$y -- done -+ echo "a resize-test 192.168.$x.$y" -+ done | $ipset restore - done -diff --git a/tests/resizec.sh b/tests/resizec.sh -index 28d674769f76f..781acf74c38dd 100755 ---- a/tests/resizec.sh -+++ b/tests/resizec.sh -@@ -25,65 +25,65 @@ case "$2" in - $ipset n test hash:ip $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y comment "text $ip$x$sep$y" -+ echo "a test $ip$x$sep$y comment \"text $ip$x$sep$y\"" - done -- done -+ done | $ipset restore - ;; - ipport) - $ipset n test hash:ip,port $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023 "text $ip$x$sep$y,1023" -+ echo "a test $ip$x$sep$y,1023 \"text $ip$x$sep$y,1023\"" - done -- done -+ done | $ipset restore - ;; - ipportip) - $ipset n test hash:ip,port,ip $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023,$ip2 comment "text $ip$x$sep$y,1023,$ip2" -+ echo "a test $ip$x$sep$y,1023,$ip2 comment \"text $ip$x$sep$y,1023,$ip2\"" - done -- done -+ done | $ipset restore - ;; - ipportnet) - $ipset n test hash:ip,port,net $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023,$ip2/$net comment "text $ip$x$sep$y,1023,$ip2/$net" -+ echo "a test $ip$x$sep$y,1023,$ip2/$net comment \"text $ip$x$sep$y,1023,$ip2/$net\"" - done -- done -+ done | $ipset restore - ;; - net) - $ipset n test hash:net $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net comment "text $ip$x$sep$y/$net" -+ echo "a test $ip$x$sep$y/$net comment \"text $ip$x$sep$y/$net\"" - done -- done -+ done | $ipset restore - ;; - netnet) - $ipset n test hash:net,net $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net comment "text $ip$x$sep$y/$net,$ip$y$sep$x/$net" -+ echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net comment \"text $ip$x$sep$y/$net,$ip$y$sep$x/$net\"" - done -- done -+ done | $ipset restore - ;; - netport) - $ipset n test hash:net,port $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,1023 comment "text $ip$x$sep$y/$net,1023" -+ echo "a test $ip$x$sep$y/$net,1023 comment \"text $ip$x$sep$y/$net,1023\"" - done -- done -+ done | $ipset restore - ;; - netiface) - $ipset n test hash:net,iface $1 hashsize 64 comment - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,eth0 comment "text $ip$x$sep$y/$net,eth0" -+ echo "$ipset a test $ip$x$sep$y/$net,eth0 comment \"text $ip$x$sep$y/$net,eth0\"" - done -- done -+ done | $ipset restore - ;; - esac - $ipset l test | grep ^$ip | while read x y z; do -diff --git a/tests/resizen.sh b/tests/resizen.sh -index 9322bd2a2cfce..13221f7b0894a 100755 ---- a/tests/resizen.sh -+++ b/tests/resizen.sh -@@ -25,80 +25,79 @@ case "$2" in - $ipset n test hash:ip,port,net $1 hashsize 64 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023,$ip2/$net nomatch -+ echo "a test $ip$x$sep$y,1023,$ip2/$net nomatch" - done -- done -+ done | $ipset restore - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset t test $ip$x$sep$y,1023,$ip2/$net nomatch 2>/dev/null -+ echo "t test $ip$x$sep$y,1023,$ip2/$net nomatch" - done -- done -+ done | $ipset restore 2>/dev/null - ;; - netportnet) - $ipset n test hash:net,port,net $1 hashsize 64 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023,$ip2/$net nomatch -+ echo "a test $ip$x$sep$y,1023,$ip2/$net nomatch" - done -- done -+ done | $ipset restore - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset t test $ip$x$sep$y,1023,$ip2/$net nomatch 2>/dev/null -+ echo "t test $ip$x$sep$y,1023,$ip2/$net nomatch" - done -- done -+ done | $ipset restore 2>/dev/null - ;; - net) - $ipset n test hash:net $1 hashsize 64 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net nomatch -+ echo "a test $ip$x$sep$y/$net nomatch" - done -- done -+ done | $ipset restore - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset t test $ip$x$sep$y/$net nomatch 2>/dev/null -+ echo "t test $ip$x$sep$y/$net nomatch" - done -- done -+ done | $ipset restore 2>/dev/null - ;; - netnet) - $ipset n test hash:net,net $1 hashsize 64 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch -+ echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch" - done -- done -+ done | $ipset restore - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset t test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch \ -- 2>/dev/null -+ echo "t test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch" - done -- done -+ done | $ipset restore 2>/dev/null - ;; - netport) - $ipset n test hash:net,port $1 hashsize 64 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,1023 nomatch -+ echo "a test $ip$x$sep$y/$net,1023 nomatch" - done -- done -+ done | $ipset restore - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset t test $ip$x$sep$y/$net,1023 nomatch 2>/dev/null -+ echo "t test $ip$x$sep$y/$net,1023 nomatch" - done -- done -+ done | $ipset restore 2>/dev/null - ;; - netiface) - $ipset n test hash:net,iface $1 hashsize 64 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,eth0 nomatch -+ echo "a test $ip$x$sep$y/$net,eth0 nomatch" - done -- done -+ done | $ipset restore - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset t test $ip$x$sep$y/$net,eth0 nomatch 2>/dev/null -+ echo "t test $ip$x$sep$y/$net,eth0 nomatch" - done -- done -+ done | $ipset restore 2>/dev/null - ;; - esac - $ipset x -diff --git a/tests/resizet.sh b/tests/resizet.sh -index eed4abf2bd86e..e8fdd732435ab 100755 ---- a/tests/resizet.sh -+++ b/tests/resizet.sh -@@ -25,81 +25,81 @@ case "$2" in - $ipset n test hash:ip $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y -+ echo "a test $ip$x$sep$y" - done -- done -+ done | $ipset restore - ;; - ipmark) - $ipset n test hash:ip,mark $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023 -+ echo "a test $ip$x$sep$y,1023" - done -- done -+ done | $ipset restore - ;; - ipport) - $ipset n test hash:ip,port $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023 -+ echo "a test $ip$x$sep$y,1023" - done -- done -+ done | $ipset restore - ;; - ipportip) - $ipset n test hash:ip,port,ip $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023,$ip2 -+ echo "a test $ip$x$sep$y,1023,$ip2" - done -- done -+ done | $ipset restore - ;; - ipportnet) - $ipset n test hash:ip,port,net $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y,1023,$ip2/$net -+ echo "a test $ip$x$sep$y,1023,$ip2/$net" - done -- done -+ done | $ipset restore - ;; - netportnet) - $ipset n test hash:net,port,net $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 128`; do -- $ipset a test $ip$x$sep$y/$net,1023,$ip$y$sep$x/$net -+ echo "a test $ip$x$sep$y/$net,1023,$ip$y$sep$x/$net" - done -- done -+ done | $ipset restore - ;; - net) - $ipset n test hash:net $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net -+ echo "a test $ip$x$sep$y/$net" - done -- done -+ done | $ipset restore - ;; - netnet) - $ipset n test hash:net,net $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net -+ echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net" - done -- done -+ done | $ipset restore - ;; - netport) - $ipset n test hash:net,port $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,1023 -+ echo "a test $ip$x$sep$y/$net,1023" - done -- done -+ done | $ipset restore - ;; - netiface) - $ipset n test hash:net,iface $1 hashsize 64 timeout 100 - for x in `seq 0 16`; do - for y in `seq 0 255`; do -- $ipset a test $ip$x$sep$y/$net,eth0 -+ echo "a test $ip$x$sep$y/$net,eth0" - done -- done -+ done | $ipset restore - ;; - esac - $ipset l test | grep ^$ip | while read x y z; do -diff --git a/tests/setlist_resize.sh b/tests/setlist_resize.sh -index 1c2be327b841a..acb33e3ba0f08 100755 ---- a/tests/setlist_resize.sh -+++ b/tests/setlist_resize.sh -@@ -25,9 +25,9 @@ rmmod ip_set >/dev/null 2>&1 - create() { - n=$1 - while [ $n -le 1024 ]; do -- $ipset c test$n hash:ip -+ echo "c test$n hash:ip" - n=$((n+2)) -- done -+ done | $ipset restore - } - - for x in `seq 1 $loop`; do diff --git a/ipset.spec b/ipset.spec index 9f235d0..fed78c5 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset -Version: 7.22 -Release: 2%{?dist} +Version: 7.23 +Release: 1%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -10,11 +10,6 @@ Source1: %{name}.service Source2: %{name}.start-stop Source3: %{name}-config -Patch001: 0001-Replace-BUG_ON-with-WARN_ON_ONCE-according-to-usage-.patch -Patch002: 0002-lib-data-Fix-for-global-buffer-overflow-warning-by-A.patch -Patch003: 0003-lib-ipset-Avoid-argv-array-overstepping.patch -Patch004: 0004-tests-Reduce-testsuite-run-time.patch - BuildRequires: libmnl-devel BuildRequires: automake BuildRequires: autoconf @@ -179,6 +174,9 @@ fi %changelog +* Wed May 07 2025 Phil Sutter - 7.23-1 +- new version + * Fri Jan 17 2025 Fedora Release Engineering - 7.22-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index f0c0e6f..be758ae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipset-7.22.tar.bz2) = e375a9110eb7974480147c57eb2cff4bdd03c7704cdae006a3d254cc80fada587aa8aee25a86f7cab29db83f5e283c5f9a47a314297317660ebba5097f623d79 +SHA512 (ipset-7.23.tar.bz2) = 5a43c790abf157a55db5a9a22cb5f28a225f5c7969beda81566a2259aa82c9d852979eb805b11b4347f47c6a0c2cc4de6f14e4733bee5b562844422a45fb9dab From 3dd0bb47016d83d57e8f7fcfa5a620a4f8bd3921 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 20 May 2025 13:32:16 +0200 Subject: [PATCH 14/15] New version 7.24 --- ipset.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ipset.spec b/ipset.spec index fed78c5..81df147 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,5 +1,5 @@ Name: ipset -Version: 7.23 +Version: 7.24 Release: 1%{?dist} Summary: Manage Linux IP sets @@ -174,6 +174,9 @@ fi %changelog +* Tue May 20 2025 Phil Sutter - 7.24-1 +- new version + * Wed May 07 2025 Phil Sutter - 7.23-1 - new version diff --git a/sources b/sources index be758ae..66b03f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ipset-7.23.tar.bz2) = 5a43c790abf157a55db5a9a22cb5f28a225f5c7969beda81566a2259aa82c9d852979eb805b11b4347f47c6a0c2cc4de6f14e4733bee5b562844422a45fb9dab +SHA512 (ipset-7.24.tar.bz2) = 18ccb49bd38083f0556b11e1d17f43791c52a2b094c9a500b6f770796b17e8e70c3860a628eac2252eb672b1fc9de734d3a0e0823d61dd9be7b4188adc6dd214 From 08a38ea64a84f22de26e42e70dd5010518e7f065 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:45:50 +0000 Subject: [PATCH 15/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- ipset.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipset.spec b/ipset.spec index 81df147..8fa6607 100644 --- a/ipset.spec +++ b/ipset.spec @@ -1,6 +1,6 @@ Name: ipset Version: 7.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manage Linux IP sets License: GPL-2.0-only @@ -174,6 +174,9 @@ fi %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 7.24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue May 20 2025 Phil Sutter - 7.24-1 - new version