poky/meta/recipes-support/libmicrohttpd/libmicrohttpd_0.9.76.bb
Peter Marko 33d90091be libmicrohttpd: disable experimental code by default
Introduce new packageconfig to explicitly avoid compilation of
experimental code. Note that the code was not compiled by default also
before this patch, this now makes it explicit and makes it possible to
check for the flags in cve-check code.

This is less intrusive change than a patch removing the code which was
rejected in patch review.

This will solve CVE-2025-59777 and CVE-2025-62689 as the vulnerable code
is not compiled by default.
Set appropriate CVE status for these CVEs based on new packageconfig.

(From OE-Core rev: 1d8e646aebe75b8ede51d4de9e0003a822992a33)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-12-12 08:49:37 -08:00

34 lines
1.2 KiB
BlitzBasic

DESCRIPTION = "A small C library that is supposed to make it easy to run an HTTP server as part of another application"
HOMEPAGE = "http://www.gnu.org/software/libmicrohttpd/"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=57d09285feac8a64efa878e692b14f36"
SECTION = "net"
DEPENDS = "file"
SRC_URI = "${GNU_MIRROR}/libmicrohttpd/${BPN}-${PV}.tar.gz"
SRC_URI[sha256sum] = "f0b1547b5a42a6c0f724e8e1c1cb5ce9c4c35fb495e7d780b9930d35011ceb4c"
inherit autotools lib_package pkgconfig gettext
CFLAGS += "-pthread -D_REENTRANT"
EXTRA_OECONF += "--disable-static --with-gnutls=${STAGING_LIBDIR}/../"
PACKAGECONFIG ?= "curl https"
PACKAGECONFIG:append:class-target = "\
${@bb.utils.filter('DISTRO_FEATURES', 'largefile', d)} \
"
PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,"
PACKAGECONFIG[https] = "--enable-https,--disable-https,libgcrypt gnutls,"
PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
do_compile:append() {
sed -i s:-L${STAGING_LIBDIR}::g libmicrohttpd.pc
}
BBCLASSEXTEND = "native nativesdk"
CVE_CHECK_IGNORE += "${@bb.utils.contains('PACKAGECONFIG', 'experimental', '', 'CVE-2025-59777 CVE-2025-62689', d)}"