From 1811de98032cf577bc1ad93b700269a621669327 Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Wed, 4 Nov 2026 07:36:38 +1300 Subject: [PATCH] flatcc: patch CVE-2026-116733 Details: https://nvd.nist.gov/vuln/detail/cve-2026-116733 Signed-off-by: Ankur Tyagi Signed-off-by: Khem Raj --- .../flatcc/flatcc/CVE-2026-116733.patch | 30 +++++++++++++++++++ .../recipes-devtools/flatcc/flatcc_0.6.4.bb | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-devtools/flatcc/flatcc/CVE-2026-116733.patch diff --git a/meta-oe/recipes-devtools/flatcc/flatcc/CVE-2026-116733.patch b/meta-oe/recipes-devtools/flatcc/flatcc/CVE-2026-116733.patch new file mode 100644 index 0000000000..86272984f7 --- /dev/null +++ b/meta-oe/recipes-devtools/flatcc/flatcc/CVE-2026-116733.patch @@ -0,0 +1,30 @@ +From 8fcc19366aa081068d2c845084a3ffd907c88129 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mikkel=20Fahn=C3=B8e=20J=C3=B8rgensen?= +Date: Thu, 22 Oct 2026 18:59:04 +0200 +Subject: [PATCH] Guard against adversarial buffer overrun in JSON parser + +(cherry picked from commit 356792dc155a9e685acdfe0ec1e209bdadcb4ab9) + +CVE: CVE-2026-116733 +Upstream-Status: Backport [https://github.com/dvidelabs/flatcc/commit/356792dc155a9e685acdfe0ec1e209bdadcb4ab9] + +Dropped changes to the CHANGELOG file. + +Signed-off-by: Ankur Tyagi +--- + src/runtime/json_parser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/runtime/json_parser.c b/src/runtime/json_parser.c +index 4472af2..f9bc9fa 100644 +--- a/src/runtime/json_parser.c ++++ b/src/runtime/json_parser.c +@@ -538,7 +538,7 @@ static const char *__flatcc_json_parser_number(flatcc_json_parser_t *ctx, const + if (buf != end) { + if (*buf == '.') { + ++buf; +- if (*buf < '0' || *buf > '9') { ++ if (buf == end || *buf < '0' || *buf > '9') { + return flatcc_json_parser_set_error(ctx, buf, end, flatcc_json_parser_error_invalid_numeric); + } + ++buf; diff --git a/meta-oe/recipes-devtools/flatcc/flatcc_0.6.4.bb b/meta-oe/recipes-devtools/flatcc/flatcc_0.6.4.bb index 059f888eed..9defbfac04 100644 --- a/meta-oe/recipes-devtools/flatcc/flatcc_0.6.4.bb +++ b/meta-oe/recipes-devtools/flatcc/flatcc_0.6.4.bb @@ -6,7 +6,9 @@ SECTION = "devel/lib" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=b3d8fb7158bf7e2600ba3191428dc4ef" -SRC_URI = "git://github.com/dvidelabs/flatcc.git;protocol=https;branch=master;tag=v${PV}" +SRC_URI = "git://github.com/dvidelabs/flatcc.git;protocol=https;branch=master;tag=v${PV} \ + file://CVE-2026-116733.patch \ +" SRCREV = "fec0275c0d0c5b6f495ab48d51fcde521d72b5fc" inherit cmake