summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/libyang
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/libyang')
-rw-r--r--meta-oe/recipes-extended/libyang/libyang/CVE-2023-26917.patch40
-rw-r--r--meta-oe/recipes-extended/libyang/libyang_2.0.164.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/libyang/libyang/CVE-2023-26917.patch b/meta-oe/recipes-extended/libyang/libyang/CVE-2023-26917.patch
new file mode 100644
index 0000000000..d7ba2fb9a0
--- /dev/null
+++ b/meta-oe/recipes-extended/libyang/libyang/CVE-2023-26917.patch
@@ -0,0 +1,40 @@
1From cfa1a965a429e4bfc5ae1539a8e87a9cf71c3090 Mon Sep 17 00:00:00 2001
2From: Michal Vasko <mvasko@cesnet.cz>
3Date: Tue, 18 Jul 2023 10:41:21 +0000
4Subject: [PATCH] parser common BUGFIX handle missing YANG strings
5
6Fixes #1987
7
8CVE: CVE-2023-26917
9
10Upstream-Status:
11Backport[https://github.com/CESNET/libyang/commit/cfa1a965a429e4bfc5ae1539a8e87a9cf71c3090]
12
13Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
14---
15 src/parser_stmt.c | 10 ++++++++++
16 1 file changed, 10 insertions(+)
17
18diff --git a/src/parser_stmt.c b/src/parser_stmt.c
19index 81ccbfca6..2ebf822ab 100644
20--- a/src/parser_stmt.c
21+++ b/src/parser_stmt.c
22@@ -52,6 +52,16 @@ lysp_stmt_validate_value(struct lys_parser_ctx *ctx, enum yang_arg val_type, con
23 uint32_t c;
24 size_t utf8_char_len;
25
26+ if (!val) {
27+ if (val_type == Y_MAYBE_STR_ARG) {
28+ /* fine */
29+ return LY_SUCCESS;
30+ }
31+
32+ LOGVAL_PARSER(ctx, LYVE_SYNTAX, "Missing an expected string.");
33+ return LY_EVALID;
34+ }
35+
36 while (*val) {
37 LY_CHECK_ERR_RET(ly_getutf8(&val, &c, &utf8_char_len),
38 LOGVAL_PARSER(ctx, LY_VCODE_INCHAR, (val)[-utf8_char_len]), LY_EVALID);
39--
402.35.5
diff --git a/meta-oe/recipes-extended/libyang/libyang_2.0.164.bb b/meta-oe/recipes-extended/libyang/libyang_2.0.164.bb
index 7875c1ef79..eb3f322519 100644
--- a/meta-oe/recipes-extended/libyang/libyang_2.0.164.bb
+++ b/meta-oe/recipes-extended/libyang/libyang_2.0.164.bb
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \
12 file://libyang-add-stdint-h.patch \ 12 file://libyang-add-stdint-h.patch \
13 file://run-ptest \ 13 file://run-ptest \
14 file://CVE-2023-26916.patch \ 14 file://CVE-2023-26916.patch \
15 file://CVE-2023-26917.patch \
15 " 16 "
16 17
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"