[packages/bird] Up to 3.4.0
arekm
arekm at pld-linux.org
Thu Oct 29 08:26:17 CET 2026
commit 78d199b7740e1e790ba5bf75de1aa79991d64223
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Oct 29 00:55:44 2026 +0100
Up to 3.4.0
Fixes CVE-2026-112112.
CVE-2026-112112.patch | 52 ++++++++++++++++++++++++++++++++++++++++
bird-rpki-aspa-length.patch | 30 +++++++++++++++++++++++
bird-rpki-log-buffer.patch | 37 ++++++++++++++++++++++++++++
bird-strtoul-test-overflow.patch | 41 +++++++++++++++++++++++++++++++
bird.spec | 14 ++++++++---
5 files changed, 171 insertions(+), 3 deletions(-)
---
diff --git a/bird.spec b/bird.spec
index 7197d6b..3d4b900 100644
--- a/bird.spec
+++ b/bird.spec
@@ -5,19 +5,23 @@
Summary: The BIRD Internet Routing Daemon
Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
Name: bird
-Version: 3.3.2
+Version: 3.4.0
Release: 1
License: GPL v2+
Group: Networking/Daemons
Source0: https://bird.nic.cz/download/%{name}-%{version}.tar.gz
-# Source0-md5: a9ca0d29e9531c0add78e7b3e5d41b3a
+# Source0-md5: e3c551c05909fd7d15a568ad9d5170c7
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: https://bird.nic.cz/download/%{name}-doc-%{version}.tar.gz
-# Source3-md5: f40f463087208ca753276444c126e9b0
+# Source3-md5: 320569ee653f689d652764eabb4db4e6
Source4: %{name}.service
Source5: %{name}.tmpfiles
Patch0: %{name}-xbasename-const.patch
+Patch1: CVE-2026-112112.patch
+Patch2: %{name}-rpki-aspa-length.patch
+Patch3: %{name}-rpki-log-buffer.patch
+Patch4: %{name}-strtoul-test-overflow.patch
URL: https://bird.nic.cz/
BuildRequires: autoconf
BuildRequires: automake
@@ -60,6 +64,10 @@ filtrów o dużych możliwościach.
%prep
%setup -q -a 3
%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
%build
cp -f /usr/share/automake/config.* tools
diff --git a/CVE-2026-112112.patch b/CVE-2026-112112.patch
new file mode 100644
index 0000000..c5be861
--- /dev/null
+++ b/CVE-2026-112112.patch
@@ -0,0 +1,52 @@
+From 7cf75587b6f38b87849fe192bf5dfd124b7702bc Mon Sep 17 00:00:00 2001
+From: Ondrej Zajicek <santiago at crfreenet.org>
+Date: Tue, 13 Oct 2026 17:01:43 +0200
+Subject: [PATCH] Nest: Fix IPv6 prefix handling in flowspec validation
+
+IPv6 flowspec destinatination prefix component contains offset field,
+RFC 8956 section 5 specifies that offset must be zero to pass the
+validation procedure. That was ignored in the old code, also the
+check for dst prefix was broken in case of zero pxlen.
+
+Reported-By: Secia Ng
+Target: patch
+---
+ nest/rt-table.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/nest/rt-table.c b/nest/rt-table.c
+index a8e392632..33b26b027 100644
+--- a/nest/rt-table.c
++++ b/nest/rt-table.c
+@@ -2687,18 +2687,21 @@ net_flow_has_dst_prefix(const net_addr *n)
+ {
+ ASSUME(net_is_flow(n));
+
+- if (n->pxlen)
+- return 1;
+-
+ if (n->type == NET_FLOW4)
+ {
+- const net_addr_flow4 *n4 = (void *) n;
+- return (n4->length > sizeof(net_addr_flow4)) && (n4->data[0] == FLOW_TYPE_DST_PREFIX);
++ /* Shortcut */
++ if (n->pxlen)
++ return 1;
++
++ /* RFC 8955 6. a) Flowspec has defined dst prefix */
++ const byte *part = flow4_first_part((const net_addr_flow4 *) n);
++ return part && (part[0] == FLOW_TYPE_DST_PREFIX);
+ }
+ else
+ {
+- const net_addr_flow6 *n6 = (void *) n;
+- return (n6->length > sizeof(net_addr_flow6)) && (n6->data[0] == FLOW_TYPE_DST_PREFIX);
++ /* RFC 8956 5. Flowspec has defined dst prefix with zero offset */
++ const byte *part = flow6_first_part((const net_addr_flow6 *) n);
++ return part && (part[0] == FLOW_TYPE_DST_PREFIX) && (part[2] == 0);
+ }
+ }
+
+--
+GitLab
+
diff --git a/bird-rpki-aspa-length.patch b/bird-rpki-aspa-length.patch
new file mode 100644
index 0000000..943ad4e
--- /dev/null
+++ b/bird-rpki-aspa-length.patch
@@ -0,0 +1,30 @@
+From c341848ebe83f4dd007ae914b7c58028fac2e711 Mon Sep 17 00:00:00 2001
+From: Ondrej Zajicek <santiago at crfreenet.org>
+Date: Wed, 14 Oct 2026 00:40:07 +0200
+Subject: [PATCH] RPKI: Fix handling of ASPA PDUs with strange length
+
+Length of ASPA PDUs should be multiple of 4, round it down when it is not.
+
+Reported-By: Joshua Rogers (AISLE)
+Target: patch
+Issue: #492
+---
+ proto/rpki/packets.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/proto/rpki/packets.c b/proto/rpki/packets.c
+index 919b6005e..7782d1f4a 100644
+--- a/proto/rpki/packets.c
++++ b/proto/rpki/packets.c
+@@ -906,7 +906,7 @@ rpki_handle_aspa_pdu(struct rpki_cache *cache, const struct pdu_header *pdu)
+ {
+ struct pdu_aspa *aspa = (void *) pdu;
+ struct channel *channel = cache->p->aspa_channel;
+- uint providers_length = aspa->len - sizeof(struct pdu_aspa);
++ uint providers_length = rpki_pdu_aspa_provider_asn_count(aspa) * sizeof(u32);
+
+ if (!channel)
+ {
+--
+GitLab
+
diff --git a/bird-rpki-log-buffer.patch b/bird-rpki-log-buffer.patch
new file mode 100644
index 0000000..0b507f7
--- /dev/null
+++ b/bird-rpki-log-buffer.patch
@@ -0,0 +1,37 @@
+From ca89e524de9fd2ef7a44232885196a750810d879 Mon Sep 17 00:00:00 2001
+From: Ondrej Zajicek <santiago at crfreenet.org>
+Date: Wed, 14 Oct 2026 01:13:17 +0200
+Subject: [PATCH] RPKI: Fix string buffer handling in rpki_log_packet()
+
+The first bsnprintf() should not use strlen() as the buffer is not
+initialized yet.
+
+Reported-By: Joshua Rogers (AISLE)
+Target: patch
+Issue: #492
+---
+ proto/rpki/packets.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/proto/rpki/packets.c b/proto/rpki/packets.c
+index 7782d1f4a..909f10db5 100644
+--- a/proto/rpki/packets.c
++++ b/proto/rpki/packets.c
+@@ -537,12 +537,10 @@ rpki_log_packet(struct rpki_cache *cache, const struct pdu_header *pdu, const en
+ int provider_asn_count = rpki_pdu_aspa_provider_asn_count(aspa);
+
+ if (provider_asn_count <= 0)
+- SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail),
+- "%u transit", aspa->customer_as_num));
++ SAVE(bsnprintf(detail, sizeof(detail), "%u", aspa->customer_as_num));
+ else
+ {
+- SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail),
+- "%u (providers", aspa->customer_as_num));
++ SAVE(bsnprintf(detail, sizeof(detail), "%u (providers", aspa->customer_as_num));
+ for (int i = 0; i < provider_asn_count; i++)
+ SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail),
+ " %u%c", aspa->provider_as_nums[i], (i == provider_asn_count-1) ? ')' : ','));
+--
+GitLab
+
diff --git a/bird-strtoul-test-overflow.patch b/bird-strtoul-test-overflow.patch
new file mode 100644
index 0000000..e832f0d
--- /dev/null
+++ b/bird-strtoul-test-overflow.patch
@@ -0,0 +1,41 @@
+From b818218f78655096354ebfe1e74cf1a4cdda0e14 Mon Sep 17 00:00:00 2001
+From: Robert Scheck <bird at robert-scheck.de>
+Date: Tue, 13 Oct 2026 02:06:40 +0200
+Subject: [PATCH] Lib: Fix stack overflow in bt_fmt_bytestr()
+
+bt_fmt_bytestr() allocates len + 1 bytes but writes two hex digits
+per byte plus a terminating NUL, overflowing the alloca() buffer.
+The formatter runs for every test case, not only on failure. On
+x86_64, alloca's 16-byte rounding usually hides the overflow; on
+s390x it smashes the stack and t_bstrhextobin/t_bstrbintohex fail.
+
+Allocate 2 * len + 1 bytes and print with %02x, so every byte is
+exactly two digits (the old %hx also dropped leading zeros).
+
+Target: patch
+Fixes: 3567ebc03
+---
+ lib/strtoul_test.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/strtoul_test.c b/lib/strtoul_test.c
+index 788f214d2..573857653 100644
+--- a/lib/strtoul_test.c
++++ b/lib/strtoul_test.c
+@@ -201,11 +201,11 @@ bt_fmt_bytestr(char *buf, size_t size, const void *data_)
+ return;
+ }
+
+- char *tmp = allocz(data->len + 1);
++ char *tmp = allocz(2 * data->len + 1);
+ char *t = tmp;
+
+ for (int i = 0; i < data->len; i++)
+- t += bsprintf(t, "%hx", data->buf[i]);
++ t += bsprintf(t, "%02x", data->buf[i]);
+
+ snprintf(buf, size, "0x%s", tmp);
+ }
+--
+GitLab
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bird.git/commitdiff/78d199b7740e1e790ba5bf75de1aa79991d64223
More information about the pld-cvs-commit
mailing list