Files
Yunseong Kim c8dc986a39 libyang: Fix CVE-2026-41401 and CVE-2026-44673
CVE-2026-41401:

  Fix incorrect metadata list pointer update in lyd_parse_set_data_flags()
  when freeing the head metadata entry. Without this fix, crafted YANG XML
  documents with specific metadata ordering can trigger invalid pointer
  states in the metadata linked list.

CVE-2026-44673:

  Fix integer overflow and OOM in the LYB binary parser. lyb_read_string()
  wraps len + 1 to 0 when len == UINT64_MAX, and lyb_read_term_value()
  truncates uint64_t to uint32_t causing undersized allocation. Both paths
  are reachable via malformed LYB input with crafted length fields.

Signed-off-by: Yunseong Kim <yunseong.kim@est.tech>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
2026-07-16 15:49:42 +05:30

48 lines
1.6 KiB
BlitzBasic

SUMMARY = "YANG data modeling language library"
DESCRIPTION = "libyang is a YANG data modelling language parser and toolkit written (and providing API) in C."
HOMEPAGE = "https://github.com/CESNET/libyang"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f3916d7d8d42a6508d0ea418cfff10ad"
SRCREV = "fc4dbd923e044006c93df020590a1e5a8656c09e"
SRC_URI = "git://github.com/CESNET/libyang.git;branch=master;protocol=https \
file://0001-test_context-skip-test-case-test_searchdirs.patch \
file://CVE-2026-41401.patch \
file://CVE-2026-44673.patch \
file://run-ptest \
"
S = "${WORKDIR}/git"
# Main dependencies
inherit cmake pkgconfig lib_package ptest multilib_header
DEPENDS = "libpcre2"
DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'cmocka', '', d)}"
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
EXTRA_OECMAKE += " ${@bb.utils.contains('PTEST_ENABLED', '1', '-DENABLE_TESTS=ON -DENABLE_VALGRIND_TESTS=OFF', '', d)}"
do_compile:prepend () {
if [ ${PTEST_ENABLED} = "1" ]; then
sed -i -e 's|${S}|${PTEST_PATH}|g' ${B}/tests/tests_config.h
sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/tests/tests_config.h
fi
}
do_install:append () {
oe_multilib_header libyang/config.h
}
do_install_ptest () {
install -d ${D}${PTEST_PATH}/tests
cp -f ${B}/tests/utest_* ${D}${PTEST_PATH}/tests/
cp -fR ${S}/tests/modules ${D}${PTEST_PATH}/tests/
install -d ${D}${PTEST_PATH}/tests/plugins
cp -f ${B}/tests/plugins/plugin_*.so ${D}${PTEST_PATH}/tests/plugins/
}
FILES:${PN} += "${datadir}/yang/*"