mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-09-27 12:40:19 +00:00
libyang: patch CVE-2026-41401
Backport patch identified by Debian[1] Details: https://nvd.nist.gov/vuln/detail/cve-2026-41401 [1]https://security-tracker.debian.org/tracker/CVE-2026-41401 Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
From 34b2a26ee86716e2b593c44e51e38ee15d4e8434 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Vasko <mvasko@cesnet.cz>
|
||||
Date: Thu, 26 Mar 2026 08:33:44 +0100
|
||||
Subject: [PATCH] parser common BUGFIX invalid metadata removal
|
||||
|
||||
(cherry picked from commit 54c3276d871023da266d4ed3ceaee7e8d71d0b04)
|
||||
|
||||
CVE: CVE-2026-41401
|
||||
Upstream-Status: Backport [https://github.com/CESNET/libyang/commit/54c3276d871023da266d4ed3ceaee7e8d71d0b04]
|
||||
|
||||
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
|
||||
---
|
||||
src/parser_common.c | 4 ++--
|
||||
tests/fuzz/corpus/lyd_parse_mem_xml/advisory2026_03_26 | 5 +++++
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
create mode 100644 tests/fuzz/corpus/lyd_parse_mem_xml/advisory2026_03_26
|
||||
|
||||
diff --git a/src/parser_common.c b/src/parser_common.c
|
||||
index 0b221af72..fefe723eb 100644
|
||||
--- a/src/parser_common.c
|
||||
+++ b/src/parser_common.c
|
||||
@@ -413,8 +413,8 @@ lyd_parser_set_data_flags(struct lyd_node *node, struct lyd_meta **meta, struct
|
||||
next_meta = meta2->next;
|
||||
|
||||
/* delete the metadata */
|
||||
- if (meta != &node->meta) {
|
||||
- *meta = (*meta)->next;
|
||||
+ if ((meta != &node->meta) && (meta2 == *meta)) {
|
||||
+ *meta = next_meta;
|
||||
}
|
||||
lyd_free_meta_single(meta2);
|
||||
if (prev_meta) {
|
||||
diff --git a/tests/fuzz/corpus/lyd_parse_mem_xml/advisory2026_03_26 b/tests/fuzz/corpus/lyd_parse_mem_xml/advisory2026_03_26
|
||||
new file mode 100644
|
||||
index 000000000..7e3b6c39e
|
||||
--- /dev/null
|
||||
+++ b/tests/fuzz/corpus/lyd_parse_mem_xml/advisory2026_03_26
|
||||
@@ -0,0 +1,5 @@
|
||||
+<int32 xmlns="urn:tests:types"
|
||||
+ xmlns:yang="urn:ietf:params:xml:ns:yang:1"
|
||||
+ xmlns:dflt="urn:ietf:params:xml:ns:netconf:default:1.0"
|
||||
+ yang:operation="create"
|
||||
+ dflt:default="true">5</int32>
|
||||
@@ -11,6 +11,7 @@ SRCREV = "c2ddd01b9b810a30d6a7d6749a3bc9adeb7b01fb"
|
||||
SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https;tag=v${PV} \
|
||||
file://0001-test_context-skip-test-case-test_searchdirs.patch \
|
||||
file://run-ptest \
|
||||
file://CVE-2026-41401.patch \
|
||||
"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user