From cf06742a7c064d293c715e143fdabf91bf072893 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 20 Oct 2026 07:44:29 -0700 Subject: [PATCH] frr: Fix build with bison rejecting paths in output directives bison now carries the fix for CVE-2026-56390, which rejects '/' in %header/%defines and %output file names, so generating the command parser fails: lib/command_parse.y:20.10-30: error: invalid %header file name ignored lib/command_parse.y:21.10-30: error: invalid %output file name ignored Backport the upstream fix which drops these directives and passes the output file name with -o instead. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...ths-in-bison-output-defines-directiv.patch | 54 +++++++++++++++++++ .../recipes-protocols/frr/frr_10.6.2.bb | 1 + 2 files changed, 55 insertions(+) create mode 100644 meta-networking/recipes-protocols/frr/frr/0001-lib-Don-t-use-paths-in-bison-output-defines-directiv.patch diff --git a/meta-networking/recipes-protocols/frr/frr/0001-lib-Don-t-use-paths-in-bison-output-defines-directiv.patch b/meta-networking/recipes-protocols/frr/frr/0001-lib-Don-t-use-paths-in-bison-output-defines-directiv.patch new file mode 100644 index 0000000000..ac732d9ebc --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr/0001-lib-Don-t-use-paths-in-bison-output-defines-directiv.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Donatas Abraitis +Date: Tue, 13 Oct 2026 15:33:02 +0300 +Subject: [PATCH] lib: Don't use paths in bison %output/%defines directives + +The fix for CVE-2026-56390 rejects any '/' in %output and %header (%defines) +file names. The directive is then ignored, and bison reports an error +and exits non-zero, which breaks the build: + + invalid %output file name ignored + invalid %header file name ignored + +We only used these directives to place the generated files in lib/, +because the .y.c rule ran bison without -o. Drop them and pass +`-o $@` instead. With -d, bison derives lib/command_parse.h from the +-o name, so the generated files stay the same. + +Signed-off-by: Donatas Abraitis + +Upstream-Status: Backport [https://github.com/FRRouting/frr/commit/b7ad39d799d98c982713b29c1d0ba6d49691308b] +Signed-off-by: Khem Raj +--- + lib/command_parse.y | 4 ---- + lib/subdir.am | 2 +- + 2 files changed, 1 insertion(+), 5 deletions(-) + +diff --git a/lib/command_parse.y b/lib/command_parse.y +index bc04bc93bb4c..4d9377e5df87 100644 +--- a/lib/command_parse.y ++++ b/lib/command_parse.y +@@ -16,10 +16,6 @@ + %define api.pure full + /* define api.prefix {cmd_yy} */ + +-/* names for generated header and parser files */ +-%defines "lib/command_parse.h" +-%output "lib/command_parse.c" +- + /* note: code blocks are output in order, to both .c and .h: + * 1. %code requires + * 2. %union + bison forward decls +diff --git a/lib/subdir.am b/lib/subdir.am +index 20947c306d60..dafebacf8e7a 100644 +--- a/lib/subdir.am ++++ b/lib/subdir.am +@@ -537,7 +537,7 @@ CLEANFILES += vtysh/vtysh_cmd.c $(vtysh_cmd_split) + .l.c: + $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $< + .y.c: +- $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $< ++ $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) -o $@ $< + + # + # generated sources & extra foo diff --git a/meta-networking/recipes-protocols/frr/frr_10.6.2.bb b/meta-networking/recipes-protocols/frr/frr_10.6.2.bb index b72af9f244..f4a98e2471 100644 --- a/meta-networking/recipes-protocols/frr/frr_10.6.2.bb +++ b/meta-networking/recipes-protocols/frr/frr_10.6.2.bb @@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/${@oe.utils.trim_version('${PV}', 2)};tag=frr-${PV} \ file://frr.pam \ + file://0001-lib-Don-t-use-paths-in-bison-output-defines-directiv.patch \ " SRCREV = "c8efb33af96f9f1220d0fdda6ac049f9126edd6f"