aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/pw-am.sh2
-rw-r--r--meta-filesystems/recipes-filesystems/logfsprogs/logfsprogs_git.bb2
-rw-r--r--meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb (renamed from meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb)5
-rw-r--r--meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb2
-rw-r--r--meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse_3.7.0.bb2
-rw-r--r--meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.1.bb2
-rw-r--r--meta-filesystems/recipes-support/fuse/fuse3_3.9.2.bb2
-rw-r--r--meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb2
-rw-r--r--meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.13.0.bb2
-rw-r--r--meta-filesystems/recipes-utils/fatcat/fatcat_1.1.0.bb2
-rw-r--r--meta-filesystems/recipes-utils/fatresize/fatresize_1.0.2.bb2
-rw-r--r--meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb2
-rw-r--r--meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb2
-rw-r--r--meta-gnome/recipes-gnome/libchamplain/libchamplain_0.12.20.bb2
-rw-r--r--meta-gnome/recipes-support/ibus/ibus.inc2
-rw-r--r--meta-gnome/recipes-support/keybinder/keybinder_3.0.bb2
-rw-r--r--meta-gnome/recipes-support/libhandy/libhandy_git.bb2
-rw-r--r--meta-gnome/recipes-support/libstemmer/libstemmer_git.bb2
-rw-r--r--meta-gnome/recipes-support/libwacom/libwacom_0.33.bb2
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb2
-rw-r--r--meta-initramfs/recipes-devtools/dracut/dracut_git.bb2
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb2
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby_git.bb2
-rw-r--r--meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb2
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb2
-rw-r--r--meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb2
-rw-r--r--meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/dleyna/dleyna-connector-dbus_0.3.0.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/dleyna/dleyna-core_0.6.0.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/dleyna/dleyna-renderer_0.6.0.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/fdk-aac/fdk-aac_2.0.1.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc2
-rw-r--r--meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb4
-rw-r--r--meta-multimedia/recipes-multimedia/libcamera/libcamera.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/mimic/mimic_1.2.0.2.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.16.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/musicpd/mpc_0.31.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/musicpd/ncmpc_0.34.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/openal/openal-soft_1.19.1.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb2
-rw-r--r--meta-multimedia/recipes-multimedia/tremor/tremor_20180319.bb2
-rw-r--r--meta-multimedia/recipes-support/crossguid/crossguid.bb2
-rw-r--r--meta-multimedia/recipes-support/gst-instruments/gst-instruments_git.bb2
-rw-r--r--meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb2
-rw-r--r--meta-networking/recipes-connectivity/civetweb/civetweb_git.bb2
-rw-r--r--meta-networking/recipes-connectivity/dibbler/dibbler_git.bb2
-rw-r--r--meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb2
-rw-r--r--meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb2
-rw-r--r--meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb2
-rw-r--r--meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb2
-rw-r--r--meta-networking/recipes-connectivity/netplan/netplan_0.98.bb2
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb (renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb)3
-rw-r--r--meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb2
-rw-r--r--meta-networking/recipes-connectivity/relayd/relayd_git.bb2
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch93
-rw-r--r--meta-networking/recipes-connectivity/samba/samba_4.10.18.bb1
-rw-r--r--meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb2
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb2
-rw-r--r--meta-networking/recipes-daemons/atftp/atftp/0001-fix-buffer-overflow-in-atftpd.patch111
-rw-r--r--meta-networking/recipes-daemons/atftp/atftp/0001-options.c-Proper-fix-for-the-read-past-end-of-array.patch48
-rw-r--r--meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb4
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2022-24407.patch83
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb3
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb2
-rw-r--r--meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb2
-rw-r--r--meta-networking/recipes-daemons/postfix/files/0001-fix-build-with-glibc-2.34.patch46
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix_3.4.27.bb (renamed from meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb)5
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/CVE-2021-46854.patch51
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/CVE-2023-51713.patch278
-rw-r--r--meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb2
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2023-46728.patch608
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2023-46846-pre1.patch1154
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2023-46846.patch169
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2023-46847.patch47
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2023-49285.patch35
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2023-49286.patch87
-rw-r--r--meta-networking/recipes-daemons/squid/files/CVE-2023-50269.patch62
-rw-r--r--meta-networking/recipes-daemons/squid/squid_4.9.bb7
-rw-r--r--meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb2
-rw-r--r--meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb2
-rw-r--r--meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb2
-rw-r--r--meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb2
-rw-r--r--meta-networking/recipes-irc/znc/znc_1.7.5.bb4
-rw-r--r--meta-networking/recipes-kernel/wireguard/files/0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch29
-rw-r--r--meta-networking/recipes-kernel/wireguard/files/0001-compat-icmp_ndo_send-functions-were-backported-exten.patch32
-rw-r--r--meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20200401.bb30
-rw-r--r--meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20220627.bb23
-rw-r--r--meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20210914.bb (renamed from meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20200319.bb)6
-rw-r--r--meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb2
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2022-44792-CVE-2022-44793.patch116
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb1
-rw-r--r--meta-networking/recipes-protocols/openflow/openflow.inc6
-rw-r--r--meta-networking/recipes-protocols/quagga/files/CVE-2021-44038.patch117
-rw-r--r--meta-networking/recipes-protocols/quagga/quagga.inc2
-rw-r--r--meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb2
-rw-r--r--meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb2
-rw-r--r--meta-networking/recipes-support/arptables/arptables_git.bb2
-rw-r--r--meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb2
-rw-r--r--meta-networking/recipes-support/cifs/cifs-utils_6.10.bb2
-rw-r--r--meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb2
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2021-3448.patch1040
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2022-0934.patch188
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2023-28450.patch63
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb3
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0001-auth-mech-rpa-Fail-on-zero-len-buffer.patch30
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch19
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch13
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0001-lib-mail-message-parser-Add-a-message_part_finish-he.patch76
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0002-lib-mail-message-parser-Change-message_part_append-t.patch71
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0002-lib-ntlm-Check-buffer-length-on-responses.patch37
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0003-lib-mail-message-parser-Optimize-updating-children_c.patch49
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0004-lib-mail-message-parser-Optimize-appending-new-part-.patch90
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0005-lib-mail-message-parser-Minor-code-cleanup-to-findin.patch45
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0006-lib-mail-message-parser-Truncate-excessively-long-MI.patch163
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0007-lib-mail-message-parser-Optimize-boundary-lookups-wh.patch72
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0008-lib-mail-message-parser-Add-boundary_remove_until-he.patch50
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0009-lib-mail-message-parser-Don-t-use-memory-pool-for-pa.patch169
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0010-lib-mail-message-parser-Support-limiting-max-number-.patch188
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0011-lib-mail-message-parser-Support-limiting-max-number-.patch87
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0012-lib-mail-Fix-handling-trailing-in-MIME-boundaries.patch133
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/0013-lib-mail-Fix-parse_too_many_nested_mime_parts.patch32
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot/buffer_free_fix.patch27
-rw-r--r--meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb16
-rw-r--r--meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb5
-rw-r--r--meta-networking/recipes-support/geoip/geoip-perl_1.51.bb2
-rw-r--r--meta-networking/recipes-support/geoip/geoip_1.6.12.bb2
-rw-r--r--meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb2
-rw-r--r--meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb2
-rw-r--r--meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb2
-rw-r--r--meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb2
-rw-r--r--meta-networking/recipes-support/mtr/mtr_0.93.bb2
-rw-r--r--meta-networking/recipes-support/nbdkit/nbdkit_git.bb2
-rw-r--r--meta-networking/recipes-support/ndisc6/ndisc6_git.bb2
-rw-r--r--meta-networking/recipes-support/netcat/netcat_0.7.1.bb2
-rw-r--r--meta-networking/recipes-support/netcf/netcf_0.2.8.bb2
-rw-r--r--meta-networking/recipes-support/netperf/netperf_git.bb2
-rw-r--r--meta-networking/recipes-support/nis/yp-tools_4.2.3.bb2
-rw-r--r--meta-networking/recipes-support/ntimed/ntimed_git.bb2
-rw-r--r--meta-networking/recipes-support/ntp/ntp/CVE-2023-2655x.patch340
-rw-r--r--meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb10
-rw-r--r--meta-networking/recipes-support/open-isns/open-isns_0.99.bb2
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn_2.4.12.bb (renamed from meta-networking/recipes-support/openvpn/openvpn_2.4.9.bb)7
-rw-r--r--meta-networking/recipes-support/phytool/phytool.bb2
-rw-r--r--meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb2
-rw-r--r--meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb2
-rw-r--r--meta-networking/recipes-support/spice/spice-protocol_git.bb2
-rw-r--r--meta-networking/recipes-support/spice/spice_git.bb4
-rw-r--r--meta-networking/recipes-support/spice/usbredir_0.8.0.bb2
-rw-r--r--meta-networking/recipes-support/strongswan/files/CVE-2021-41990.patch62
-rw-r--r--meta-networking/recipes-support/strongswan/files/CVE-2021-41991.patch41
-rw-r--r--meta-networking/recipes-support/strongswan/files/CVE-2021-45079.patch156
-rw-r--r--meta-networking/recipes-support/strongswan/files/CVE-2022-40617.patch210
-rw-r--r--meta-networking/recipes-support/strongswan/files/CVE-2023-41913.patch46
-rw-r--r--meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb5
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch1
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump/CVE-2018-16301.patch111
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb1
-rw-r--r--meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch37
-rw-r--r--meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb3
-rw-r--r--meta-networking/recipes-support/traceroute/traceroute_2.1.3.bb (renamed from meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb)3
-rw-r--r--meta-networking/recipes-support/unbound/unbound_1.9.4.bb2
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2022-0585-CVE-2023-2879.patch93
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2022-4345.patch52
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-0667-pre1.patch153
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-0667.patch66
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-0668.patch33
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-1992.patch62
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-2855.patch117
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-2856.patch68
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-2858.patch94
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-2906.patch38
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-2952.patch97
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2023-3649.patch231
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2024-0208.patch42
-rw-r--r--meta-networking/recipes-support/wireshark/files/fix_lemon_path.patch22
-rw-r--r--meta-networking/recipes-support/wireshark/wireshark_3.2.18.bb (renamed from meta-networking/recipes-support/wireshark/wireshark_3.2.15.bb)20
-rw-r--r--meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb2
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-benchmark/speedtest-cli/speedtest-cli_2.1.2.bb2
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb4
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb4
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb2
-rw-r--r--meta-oe/dynamic-layers/meta-python/recipes-support/smem/smem_1.5.bb2
-rw-r--r--meta-oe/recipes-benchmark/cpuburn/cpuburn-arm_git.bb2
-rw-r--r--meta-oe/recipes-benchmark/fio/fio_3.17.bb2
-rw-r--r--meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch76
-rw-r--r--meta-oe/recipes-benchmark/glmark2/glmark2_git.bb7
-rw-r--r--meta-oe/recipes-benchmark/iperf2/iperf2_2.0.13.bb2
-rw-r--r--meta-oe/recipes-benchmark/iperf3/iperf3/0001-Fix-memory-allocation-hazard-1542-.-1543.patch46
-rw-r--r--meta-oe/recipes-benchmark/iperf3/iperf3_3.7.bb5
-rw-r--r--meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb2
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb2
-rw-r--r--meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb2
-rw-r--r--meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb2
-rw-r--r--meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb2
-rw-r--r--meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb2
-rw-r--r--meta-oe/recipes-bsp/ledmon/ledmon_git.bb2
-rw-r--r--meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb4
-rw-r--r--meta-oe/recipes-bsp/nvme-cli/nvme-cli_1.10.1.bb2
-rw-r--r--meta-oe/recipes-connectivity/gattlib/gattlib_git.bb6
-rw-r--r--meta-oe/recipes-connectivity/gensio/gensio_1.5.3.bb2
-rw-r--r--meta-oe/recipes-connectivity/iwd/iwd_1.9.bb2
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5/CVE-2022-42898.patch110
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5_1.17.1.bb1
-rw-r--r--meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb2
-rw-r--r--meta-oe/recipes-connectivity/libndp/libndp_1.7.bb2
-rw-r--r--meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb2
-rw-r--r--meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-1.patch32
-rw-r--r--meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-2.patch30
-rw-r--r--meta-oe/recipes-connectivity/libuv/libuv_1.36.0.bb6
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch42
-rw-r--r--meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb (renamed from meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb)6
-rw-r--r--meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb2
-rw-r--r--meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.10.0.bb2
-rw-r--r--meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb2
-rw-r--r--meta-oe/recipes-connectivity/ser2net/ser2net_4.1.8.bb2
-rw-r--r--meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb2
-rw-r--r--meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb2
-rw-r--r--meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb2
-rw-r--r--meta-oe/recipes-connectivity/zeromq/czmq_4.2.0.bb3
-rw-r--r--meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch8
-rw-r--r--meta-oe/recipes-connectivity/zeromq/zeromq_4.3.4.bb (renamed from meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb)4
-rw-r--r--meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch2
-rw-r--r--meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb2
-rw-r--r--meta-oe/recipes-core/emlog/emlog.inc4
-rw-r--r--meta-oe/recipes-core/emlog/emlog_git.bb13
-rw-r--r--meta-oe/recipes-core/glfw/glfw_3.3.bb2
-rw-r--r--meta-oe/recipes-core/libnfc/libnfc_git.bb2
-rw-r--r--meta-oe/recipes-core/mdbus2/mdbus2_git.bb2
-rw-r--r--meta-oe/recipes-core/ndctl/ndctl_v67.bb2
-rw-r--r--meta-oe/recipes-core/opencl-headers/opencl-headers_git.bb2
-rw-r--r--meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb2
-rw-r--r--meta-oe/recipes-core/safec/safec_3.5.1.bb2
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.1/0001-Try-to-first-find-googletest-in-the-system-before-do.patch96
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb2
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.1.bb9
-rw-r--r--meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.7.bb (renamed from meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.2.bb)6
-rw-r--r--meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb2
-rw-r--r--meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.26.bb2
-rw-r--r--meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb2
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb-native_10.4.28.bb (renamed from meta-oe/recipes-dbs/mysql/mariadb-native_10.4.20.bb)0
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb.inc7
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/CVE-2022-47015.patch269
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch73
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch32
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb_10.4.28.bb (renamed from meta-oe/recipes-dbs/mysql/mariadb_10.4.20.bb)0
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch15
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch13
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch13
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql_12.17.bb (renamed from meta-oe/recipes-dbs/postgresql/postgresql_12.7.bb)4
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb2
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb2
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb1
-rw-r--r--meta-oe/recipes-devtools/bootchart/bootchart_git.bb2
-rw-r--r--meta-oe/recipes-devtools/breakpad/breakpad_git.bb10
-rw-r--r--meta-oe/recipes-devtools/capnproto/capnproto_0.7.0.bb4
-rw-r--r--meta-oe/recipes-devtools/capnproto/files/CVE-2022-46149.patch49
-rw-r--r--meta-oe/recipes-devtools/cjson/cjson_1.7.13.bb2
-rw-r--r--meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb2
-rw-r--r--meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb4
-rw-r--r--meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.12.0.bb9
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb5
-rw-r--r--meta-oe/recipes-devtools/guider/guider_3.9.7.bb2
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch52
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb5
-rw-r--r--meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.3.0.bb2
-rw-r--r--meta-oe/recipes-devtools/lapack/lapack_3.9.0.bb2
-rw-r--r--meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb2
-rw-r--r--meta-oe/recipes-devtools/libubox/libubox_git.bb2
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace_git.bb2
-rw-r--r--meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch73
-rw-r--r--meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch28
-rw-r--r--meta-oe/recipes-devtools/lua/lua_5.3.6.bb3
-rw-r--r--meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb2
-rw-r--r--meta-oe/recipes-devtools/msgpack/msgpack-c_3.2.1.bb2
-rw-r--r--meta-oe/recipes-devtools/nanopb/nanopb_0.4.0.bb4
-rw-r--r--meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb2
-rw-r--r--meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb2
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps-nodejs14.patch22
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-jinja-tests.py-add-py-3.10-fix-nodejs14.patch40
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang-nodejs14.patch27
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries-nodejs14.patch62
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir-nodejs14.patch84
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-32212.patch133
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-35255.patch237
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-43548.patch214
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/CVE-llhttp.patch4348
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/gcc13.patch63
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/libatomic-nodejs14.patch21
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory-nodejs14.patch32
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/python-3.11-invalid-mode-rU.patch46
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_12.22.12.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb)12
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_14.18.1.bb211
-rw-r--r--meta-oe/recipes-devtools/openocd/openocd_git.bb8
-rw-r--r--meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb2
-rw-r--r--meta-oe/recipes-devtools/perl/ipc-run_20180523.0.bb2
-rw-r--r--meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb2
-rw-r--r--meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb2
-rw-r--r--meta-oe/recipes-devtools/php/php/CVE-2022-4900.patch48
-rw-r--r--meta-oe/recipes-devtools/php/php/CVE-2023-3247-1.patch87
-rw-r--r--meta-oe/recipes-devtools/php/php/CVE-2023-3247-2.patch29
-rw-r--r--meta-oe/recipes-devtools/php/php/CVE-2023-3824.patch91
-rw-r--r--meta-oe/recipes-devtools/php/php_7.4.33.bb (renamed from meta-oe/recipes-devtools/php/php_7.4.21.bb)6
-rw-r--r--meta-oe/recipes-devtools/ply/ply_git.bb2
-rw-r--r--meta-oe/recipes-devtools/pmtools/pmtools_git.bb2
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb2
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch73
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb3
-rw-r--r--meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb2
-rw-r--r--meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb2
-rw-r--r--meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb2
-rw-r--r--meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb2
-rw-r--r--meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb2
-rw-r--r--meta-oe/recipes-devtools/valijson/valijson_git.bb2
-rw-r--r--meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.51.03.bb2
-rw-r--r--meta-oe/recipes-devtools/yajl/yajl/CVE-2023-33460.patch29
-rw-r--r--meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb2
-rw-r--r--meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb4
-rw-r--r--meta-oe/recipes-devtools/yasm/yasm_git.bb2
-rw-r--r--meta-oe/recipes-extended/brotli/brotli/0001-brotli-fix-CVE-2020-8927.patch44
-rw-r--r--meta-oe/recipes-extended/brotli/brotli_1.0.7.bb4
-rw-r--r--meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb2
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.7.bb2
-rw-r--r--meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb2
-rw-r--r--meta-oe/recipes-extended/dumb-init/dumb-init_1.2.2.bb2
-rw-r--r--meta-oe/recipes-extended/figlet/figlet_git.bb2
-rw-r--r--meta-oe/recipes-extended/gnuplot/gnuplot_5.2.8.bb2
-rw-r--r--meta-oe/recipes-extended/haveged/haveged_1.9.13.bb2
-rw-r--r--meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb2
-rw-r--r--meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb2
-rw-r--r--meta-oe/recipes-extended/iotop/iotop_0.6.bb2
-rw-r--r--meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb2
-rw-r--r--meta-oe/recipes-extended/jansson/jansson_2.13.1.bb3
-rw-r--r--meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb2
-rw-r--r--meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb2
-rw-r--r--meta-oe/recipes-extended/libblockdev/libblockdev_2.24.bb2
-rw-r--r--meta-oe/recipes-extended/libcec/libcec_git.bb2
-rw-r--r--meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb2
-rw-r--r--meta-oe/recipes-extended/libimobiledevice/libplist_2.1.0.bb2
-rw-r--r--meta-oe/recipes-extended/libimobiledevice/libusbmuxd_git.bb3
-rw-r--r--meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb2
-rw-r--r--meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2022-0367.patch38
-rw-r--r--meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb5
-rw-r--r--meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb2
-rw-r--r--meta-oe/recipes-extended/libqb/libqb_1.0.5.bb2
-rw-r--r--meta-oe/recipes-extended/libreport/libreport_2.10.0.bb2
-rw-r--r--meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb2
-rw-r--r--meta-oe/recipes-extended/libuio/libuio_0.2.1.bb2
-rw-r--r--meta-oe/recipes-extended/md5deep/md5deep_git.bb2
-rw-r--r--meta-oe/recipes-extended/mraa/mraa_git.bb2
-rw-r--r--meta-oe/recipes-extended/openwsman/openwsman_2.6.11.bb2
-rw-r--r--meta-oe/recipes-extended/ostree/ostree_2020.3.bb4
-rw-r--r--meta-oe/recipes-extended/p7zip/files/CVE-2016-9296.patch27
-rw-r--r--meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch226
-rw-r--r--meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch27
-rw-r--r--meta-oe/recipes-extended/p7zip/p7zip_16.02.bb23
-rw-r--r--meta-oe/recipes-extended/p8platform/p8platform_git.bb2
-rw-r--r--meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb2
-rw-r--r--meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb2
-rw-r--r--meta-oe/recipes-extended/pmdk/pmdk_1.7.bb2
-rw-r--r--meta-oe/recipes-extended/polkit/files/CVE-2021-4034.patch74
-rw-r--r--meta-oe/recipes-extended/polkit/files/CVE-2021-4115.patch87
-rw-r--r--meta-oe/recipes-extended/polkit/polkit/CVE-2021-3560.patch33
-rw-r--r--meta-oe/recipes-extended/polkit/polkit_0.116.bb3
-rw-r--r--meta-oe/recipes-extended/redis/redis_5.0.14.bb (renamed from meta-oe/recipes-extended/redis/redis_5.0.9.bb)3
-rw-r--r--meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb2
-rw-r--r--meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb2
-rw-r--r--meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb2
-rw-r--r--meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb2
-rw-r--r--meta-oe/recipes-extended/sedutil/sedutil_git.bb2
-rw-r--r--meta-oe/recipes-extended/socketcan/can-isotp_git.bb2
-rw-r--r--meta-oe/recipes-extended/socketcan/can-utils_git.bb2
-rw-r--r--meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb2
-rw-r--r--meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb2
-rw-r--r--meta-oe/recipes-extended/sysdig/sysdig_git.bb5
-rw-r--r--meta-oe/recipes-extended/tipcutils/tipcutils_git.bb2
-rw-r--r--meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb2
-rw-r--r--meta-oe/recipes-extended/upm/upm_git.bb2
-rw-r--r--meta-oe/recipes-extended/wipe/wipe_0.24.bb2
-rw-r--r--meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb2
-rw-r--r--meta-oe/recipes-extended/zlog/zlog_1.2.14.bb2
-rw-r--r--meta-oe/recipes-extended/zstd/zstd_1.4.5.bb2
-rw-r--r--meta-oe/recipes-gnome/pyxdg/pyxdg_0.26.bb2
-rw-r--r--meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb2
-rw-r--r--meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb2
-rw-r--r--meta-oe/recipes-graphics/fbgrab/fbgrab_1.3.3.bb2
-rw-r--r--meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb2
-rw-r--r--meta-oe/recipes-graphics/fvwm/fvwm_2.6.9.bb2
-rw-r--r--meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb2
-rw-r--r--meta-oe/recipes-graphics/graphviz/graphviz_2.40.1.bb13
-rw-r--r--meta-oe/recipes-graphics/jasper/jasper_2.0.16.bb2
-rw-r--r--meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.12.bb2
-rw-r--r--meta-oe/recipes-graphics/libyui/libyui-ncurses_2.52.0.bb2
-rw-r--r--meta-oe/recipes-graphics/libyui/libyui_3.6.0.bb2
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-1.patch72
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-2.patch86
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-15389.patch43
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-1.patch29
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-2.patch27
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-3.patch30
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-4.patch27
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27823.patch29
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27824.patch24
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27841.patch238
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27842.patch31
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27843.patch31
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27845.patch74
-rw-r--r--meta-oe/recipes-graphics/openjpeg/openjpeg_2.3.1.bb29
-rw-r--r--meta-oe/recipes-graphics/qrencode/qrencode_git.bb2
-rw-r--r--meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb2
-rw-r--r--meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb2
-rw-r--r--meta-oe/recipes-graphics/spir/spirv-tools_git.bb11
-rw-r--r--meta-oe/recipes-graphics/tesseract/tesseract-lang_4.0.0.bb2
-rw-r--r--meta-oe/recipes-graphics/tesseract/tesseract_git.bb2
-rw-r--r--meta-oe/recipes-graphics/tigervnc/tigervnc_1.10.1.bb4
-rw-r--r--meta-oe/recipes-graphics/ttf-fonts/ttf-droid_git.bb2
-rw-r--r--meta-oe/recipes-graphics/ttf-fonts/ttf-lohit_2.bb2
-rw-r--r--meta-oe/recipes-graphics/ttf-fonts/ttf-noto-emoji_20190815.bb2
-rw-r--r--meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb2
-rw-r--r--meta-oe/recipes-graphics/vdpau/libvdpau_1.3.bb2
-rw-r--r--meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb2
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xgamma_1.0.6.bb2
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.4.bb2
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xsetroot_1.1.2.bb1
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-24130.patch84
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-45063.patch776
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xterm_353.bb3
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-video-armsoc_1.4.1.bb2
-rw-r--r--meta-oe/recipes-graphics/yad/yad_6.0.bb2
-rw-r--r--meta-oe/recipes-kernel/agent-proxy/agent-proxy_1.97.bb2
-rw-r--r--meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_git.bb2
-rw-r--r--meta-oe/recipes-kernel/crash/crash_7.2.8.bb2
-rw-r--r--meta-oe/recipes-kernel/kpatch/kpatch.inc2
-rw-r--r--meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.1.bb2
-rw-r--r--meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb2
-rw-r--r--meta-oe/recipes-multimedia/jack/a2jmidid_9.bb2
-rw-r--r--meta-oe/recipes-multimedia/jack/jack_1.19.14.bb2
-rw-r--r--meta-oe/recipes-multimedia/libass/libass_0.14.0.bb2
-rw-r--r--meta-oe/recipes-multimedia/mplayer/mpv_0.32.0.bb2
-rw-r--r--meta-oe/recipes-multimedia/pipewire/pipewire-0.2_git.bb2
-rw-r--r--meta-oe/recipes-multimedia/pipewire/pipewire_git.bb2
-rw-r--r--meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb2
-rw-r--r--meta-oe/recipes-multimedia/webm/libvpx_1.8.2.bb2
-rw-r--r--meta-oe/recipes-printing/cups/cups-filters.inc8
-rw-r--r--meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb15
-rw-r--r--meta-oe/recipes-security/softhsm/softhsm_git.bb2
-rw-r--r--meta-oe/recipes-support/ace-cloud-editor/ace-cloud-editor_git.bb2
-rw-r--r--meta-oe/recipes-support/anthy/anthy_9100h.bb4
-rw-r--r--meta-oe/recipes-support/avro/avro-c_1.9.2.bb2
-rw-r--r--meta-oe/recipes-support/bdwgc/bdwgc_8.0.4.bb2
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares/0001-fix-configure-error-mv-libcares.pc.cmakein-to-libcar.patch27
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares/CVE-2022-4904.patch67
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31130.patch329
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31147.patch717
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares/CVE-2023-32067.patch84
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch84
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares_1.16.1.bb27
-rw-r--r--meta-oe/recipes-support/c-ares/c-ares_1.18.1.bb30
-rw-r--r--meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.0.bb2
-rw-r--r--meta-oe/recipes-support/cli11/cli11_1.8.0.bb2
-rw-r--r--meta-oe/recipes-support/cmark/cmark_git.bb2
-rw-r--r--meta-oe/recipes-support/daemonize/daemonize_git.bb2
-rw-r--r--meta-oe/recipes-support/digitemp/digitemp_3.7.2.bb2
-rw-r--r--meta-oe/recipes-support/dstat/dstat_0.7.4.bb4
-rw-r--r--meta-oe/recipes-support/epeg/epeg_git.bb2
-rw-r--r--meta-oe/recipes-support/fmt/fmt_6.2.0.bb2
-rw-r--r--meta-oe/recipes-support/freerdp/freerdp_git.bb2
-rw-r--r--meta-oe/recipes-support/function2/function2_4.0.0.bb2
-rw-r--r--meta-oe/recipes-support/gd/gd_2.3.0.bb2
-rw-r--r--meta-oe/recipes-support/gflags/gflags_2.2.2.bb2
-rw-r--r--meta-oe/recipes-support/glog/glog_0.3.5.bb2
-rw-r--r--meta-oe/recipes-support/gnulib/gnulib_2018-12-18.bb (renamed from meta-oe/recipes-support/gnulib/gnulib_2018-03-07.03.bb)2
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb2
-rw-r--r--meta-oe/recipes-support/gpm/gpm_git.bb2
-rw-r--r--meta-oe/recipes-support/hidapi/hidapi_git.bb2
-rw-r--r--meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb2
-rw-r--r--meta-oe/recipes-support/hunspell/hunspell_1.7.0.bb2
-rw-r--r--meta-oe/recipes-support/hwdata/hwdata_git.bb2
-rw-r--r--meta-oe/recipes-support/iksemel/iksemel_1.5.bb2
-rw-r--r--meta-oe/recipes-support/imagemagick/imagemagick_7.0.9.bb2
-rw-r--r--meta-oe/recipes-support/inih/libinih_git.bb2
-rw-r--r--meta-oe/recipes-support/iniparser/iniparser_4.1.bb2
-rw-r--r--meta-oe/recipes-support/inotify-tools/inotify-tools_git.bb2
-rwxr-xr-xmeta-oe/recipes-support/lcov/lcov_1.14.bb2
-rw-r--r--meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb2
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0001-example-Do-not-run-the-tests.patch27
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch57
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch77
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch26
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch40
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch27
-rw-r--r--meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch44
-rw-r--r--meta-oe/recipes-support/libb64/libb64_1.2.1.bb39
-rw-r--r--meta-oe/recipes-support/libbytesize/libbytesize_2.2.bb2
-rw-r--r--meta-oe/recipes-support/libcereal/libcereal_1.3.0.bb2
-rw-r--r--meta-oe/recipes-support/libcyusbserial/libcyusbserial_git.bb2
-rw-r--r--meta-oe/recipes-support/libfann/libfann_git.bb2
-rw-r--r--meta-oe/recipes-support/libgit2/libgit2_0.28.4.bb2
-rw-r--r--meta-oe/recipes-support/libgusb/libgusb_git.bb2
-rw-r--r--meta-oe/recipes-support/libharu/libharu_2.3.0.bb2
-rw-r--r--meta-oe/recipes-support/libiio/libiio_git.bb2
-rw-r--r--meta-oe/recipes-support/libmicrohttpd/libmicrohttpd/CVE-2021-3466.patch158
-rw-r--r--meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.70.bb3
-rw-r--r--meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb2
-rw-r--r--meta-oe/recipes-support/libmxml/libmxml_3.1.bb2
-rw-r--r--meta-oe/recipes-support/libp11/libp11_0.4.10.bb2
-rw-r--r--meta-oe/recipes-support/librsync/librsync_2.3.1.bb2
-rw-r--r--meta-oe/recipes-support/libsoc/libsoc_0.8.2.bb2
-rw-r--r--meta-oe/recipes-support/libssh/files/CVE-2020-16135-1.patch40
-rw-r--r--meta-oe/recipes-support/libssh/files/CVE-2020-16135-2.patch42
-rw-r--r--meta-oe/recipes-support/libssh/files/CVE-2020-16135-3.patch70
-rw-r--r--meta-oe/recipes-support/libssh/files/CVE-2020-16135-4.patch34
-rw-r--r--meta-oe/recipes-support/libssh/libssh_0.8.9.bb8
-rw-r--r--meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch39
-rw-r--r--meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb1
-rw-r--r--meta-oe/recipes-support/libteam/libteam_1.30.bb2
-rw-r--r--meta-oe/recipes-support/libtinyxml2/libtinyxml2_8.0.0.bb2
-rw-r--r--meta-oe/recipes-support/libusbg/libusbg_git.bb2
-rw-r--r--meta-oe/recipes-support/libusbgx/libusbgx_git.bb2
-rw-r--r--meta-oe/recipes-support/libutempter/libutempter.bb2
-rw-r--r--meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb2
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2.inc2
-rw-r--r--meta-oe/recipes-support/mcelog/mce-inject_git.bb2
-rw-r--r--meta-oe/recipes-support/mcelog/mce-test_git.bb2
-rw-r--r--meta-oe/recipes-support/mcelog/mcelog_168.bb2
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/CVE-2022-41973.patch154
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/CVE-2022-41974.patch162
-rw-r--r--meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb7
-rw-r--r--meta-oe/recipes-support/ne10/ne10_1.2.1.bb2
-rw-r--r--meta-oe/recipes-support/nss/nss/0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch46
-rw-r--r--meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch75
-rw-r--r--meta-oe/recipes-support/nss/nss/CVE-2020-12403_1.patch65
-rw-r--r--meta-oe/recipes-support/nss/nss/CVE-2020-12403_2.patch80
-rw-r--r--meta-oe/recipes-support/nss/nss/CVE-2020-25648.patch163
-rw-r--r--meta-oe/recipes-support/nss/nss/CVE-2021-43527.patch283
-rw-r--r--meta-oe/recipes-support/nss/nss/CVE-2022-22747.patch63
-rw-r--r--meta-oe/recipes-support/nss/nss/CVE-2023-0767.patch124
-rw-r--r--meta-oe/recipes-support/nss/nss_3.51.1.bb14
-rw-r--r--meta-oe/recipes-support/numactl/numactl_git.bb2
-rw-r--r--meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Allow-only-X509-certs-to-verify-the-SAML-token-signa.patch35
-rw-r--r--meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Properly-check-authorization-on-incoming-guestOps-re.patch39
-rw-r--r--meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb4
-rw-r--r--meta-oe/recipes-support/opencl/clinfo_2.2.18.04.06.bb2
-rw-r--r--meta-oe/recipes-support/opencv/ade_0.1.1f.bb2
-rw-r--r--meta-oe/recipes-support/opencv/opencv_4.1.0.bb12
-rw-r--r--meta-oe/recipes-support/openldap/openldap/CVE-2021-27212.patch31
-rw-r--r--meta-oe/recipes-support/openldap/openldap/CVE-2022-29155.patch277
-rw-r--r--meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-1.patch30
-rw-r--r--meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-2.patch76
-rw-r--r--meta-oe/recipes-support/openldap/openldap_2.4.57.bb5
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40660.patch55
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-1.patch47
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-2.patch32
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-3.patch31
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-4.patch28
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-5.patch30
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-6.patch30
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-7.patch40
-rw-r--r--meta-oe/recipes-support/opensc/opensc_0.20.0.bb10
-rw-r--r--meta-oe/recipes-support/picocom/picocom_git.bb2
-rw-r--r--meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb2
-rw-r--r--meta-oe/recipes-support/pidgin/icyque_git.bb2
-rw-r--r--meta-oe/recipes-support/pidgin/purple-skypeweb_git.bb2
-rw-r--r--meta-oe/recipes-support/poco/poco_1.9.4.bb2
-rw-r--r--meta-oe/recipes-support/pps-tools/pps-tools_1.0.2.bb2
-rw-r--r--meta-oe/recipes-support/remmina/remmina_1.3.6.bb2
-rw-r--r--meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb2
-rw-r--r--meta-oe/recipes-support/sass/libsass_3.6.3.bb2
-rw-r--r--meta-oe/recipes-support/sass/sassc_git.bb2
-rw-r--r--meta-oe/recipes-support/satyr/satyr_0.28.bb2
-rw-r--r--meta-oe/recipes-support/serial-utils/pty-forward-native.bb2
-rw-r--r--meta-oe/recipes-support/serial-utils/serial-forward_git.bb2
-rw-r--r--meta-oe/recipes-support/span-lite/span-lite_git.bb2
-rw-r--r--meta-oe/recipes-support/spdlog/spdlog_1.5.0.bb2
-rw-r--r--meta-oe/recipes-support/spitools/spitools_git.bb2
-rw-r--r--meta-oe/recipes-support/syslog-ng/files/CVE-2022-38725.patch629
-rw-r--r--meta-oe/recipes-support/syslog-ng/syslog-ng_3.24.1.bb1
-rw-r--r--meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_0.8.5.bb2
-rw-r--r--meta-oe/recipes-support/toscoterm/toscoterm_git.bb2
-rw-r--r--meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch63
-rw-r--r--meta-oe/recipes-support/udisks/udisks2_git.bb3
-rw-r--r--meta-oe/recipes-support/uhubctl/uhubctl_2.1.0.bb2
-rw-r--r--meta-oe/recipes-support/uthash/uthash_2.1.0.bb2
-rw-r--r--meta-oe/recipes-support/utouch/utouch-evemu_git.bb2
-rw-r--r--meta-oe/recipes-support/utouch/utouch-frame_git.bb2
-rw-r--r--meta-oe/recipes-support/utouch/utouch-mtview_git.bb2
-rw-r--r--meta-oe/recipes-support/websocketpp/websocketpp_0.8.2.bb2
-rw-r--r--meta-oe/recipes-support/xdelta/xdelta3_3.1.0.bb2
-rw-r--r--meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb2
-rw-r--r--meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb2
-rw-r--r--meta-oe/recipes-support/xxhash/xxhash_0.7.3.bb2
-rw-r--r--meta-oe/recipes-support/zbar/zbar_git.bb2
-rw-r--r--meta-oe/recipes-support/zchunk/zchunk_1.1.6.bb2
-rw-r--r--meta-oe/recipes-test/bats/bats_1.1.0.bb2
-rw-r--r--meta-oe/recipes-test/catch2/catch2_2.9.2.bb2
-rw-r--r--meta-oe/recipes-test/evtest/evtest_1.34.bb2
-rw-r--r--meta-oe/recipes-test/fbtest/fb-test_git.bb2
-rw-r--r--meta-oe/recipes-test/googletest/googletest_git.bb2
-rw-r--r--meta-oe/recipes-test/pm-qa/pm-qa_git.bb3
-rw-r--r--meta-perl/recipes-perl/libconfig/libconfig-autoconf-perl_0.318.bb2
-rw-r--r--meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.068.bb2
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-dns-perl_1.24.bb2
-rw-r--r--meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.66.bb2
-rw-r--r--meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb2
-rw-r--r--meta-perl/recipes-perl/po4a/po4a_0.49.bb2
-rw-r--r--meta-python/recipes-connectivity/python-txws/python3-txws_0.9.1.bb2
-rw-r--r--meta-python/recipes-core/images/meta-python-image.bb3
-rw-r--r--meta-python/recipes-core/images/meta-python-ptest-image.bb2
-rw-r--r--meta-python/recipes-devtools/gyp/gyp.inc2
-rw-r--r--meta-python/recipes-devtools/python/python-feedformatter.inc2
-rw-r--r--meta-python/recipes-devtools/python/python-lxml.inc2
-rw-r--r--meta-python/recipes-devtools/python/python-pint.inc2
-rw-r--r--meta-python/recipes-devtools/python/python3-absl_0.7.0.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-astor_0.8.1.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-cmd2_0.9.23.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-cryptography/0001-chunked-update_into-5419.patch99
-rw-r--r--meta-python/recipes-devtools/python/python3-cryptography/0002-chunking-didn-t-actually-work-5499.patch43
-rw-r--r--meta-python/recipes-devtools/python/python3-cryptography/0003-correct-buffer-overflows-cause-by-integer-overflow-i.patch37
-rw-r--r--meta-python/recipes-devtools/python/python3-cryptography/CVE-2023-23931.patch45
-rw-r--r--meta-python/recipes-devtools/python/python3-cryptography_2.8.bb4
-rw-r--r--meta-python/recipes-devtools/python/python3-dbussy_1.2.1.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-dt-schema_git.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-fasteners_0.16.3.bb (renamed from meta-python/recipes-devtools/python/python3-fasteners_0.15.bb)9
-rw-r--r--meta-python/recipes-devtools/python/python3-gast_0.2.2.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-h5py_2.9.0.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-imageio_2.6.0.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-keras-applications_1.0.8.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-keras-preprocessing_1.1.0.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-lxml/CVE-2022-2309.patch94
-rw-r--r--meta-python/recipes-devtools/python/python3-matplotlib_3.2.1.bb3
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch26
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-1.patch31
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-2.patch54
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-3.patch44
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb8
-rw-r--r--meta-python/recipes-devtools/python/python3-pkgconfig_1.4.0.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-prctl_1.7.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-pyflakes_2.1.1.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-robotframework-seriallibrary_0.3.1.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-26137.patch72
-rw-r--r--meta-python/recipes-devtools/python/python3-urllib3/CVE-2021-33503.patch67
-rw-r--r--meta-python/recipes-devtools/python/python3-urllib3_1.25.7.bb6
-rw-r--r--meta-python/recipes-devtools/python/python3-wheel_0.33.6.bb2
-rw-r--r--meta-python/recipes-extended/python-blivet/python3-blivet_3.1.4.bb2
-rw-r--r--meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.10.bb2
-rw-r--r--meta-python/recipes-extended/python-cson/python3-cson_git.bb5
-rw-r--r--meta-python/recipes-extended/python-pyparted/python-pyparted.inc2
-rw-r--r--meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb2
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0001-configure-use-pkg-config-for-PCRE-detection.patch37
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch13
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch11
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch17
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0005-replace-lynx-to-curl-in-apachectl-script.patch4
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0006-apache2-fix-the-race-issue-of-parallel-installation.patch4
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0007-apache2-allow-to-disable-selinux-support.patch8
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0008-Fix-perl-install-directory-to-usr-bin.patch (renamed from meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch)10
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0009-support-apxs.in-force-destdir-to-be-empty-string.patch (renamed from meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch)10
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/0010-apache2-do-not-use-relative-path-for-gen_test_char.patch (renamed from meta-webserver/recipes-httpd/apache2/apache2/0008-apache2-do-not-use-relative-path-for-gen_test_char.patch)7
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.58.bb (renamed from meta-webserver/recipes-httpd/apache2/apache2_2.4.48.bb)11
-rw-r--r--meta-webserver/recipes-httpd/cherokee/cherokee_git.bb2
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/0001-HTTP-2-per-iteration-stream-handling-limit.patch92
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/CVE-2019-20372.patch39
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/CVE-2022-41741-CVE-2022-41742.patch319
-rw-r--r--meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb5
-rw-r--r--meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb2
-rw-r--r--meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb2
-rw-r--r--meta-webserver/recipes-support/fcgi/fcgi_git.bb2
-rw-r--r--meta-webserver/recipes-webadmin/netdata/netdata_git.bb2
-rw-r--r--meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb2
-rw-r--r--meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.3.bb2
-rw-r--r--meta-xfce/recipes-apps/xfce4-datetime-setter/xfce4-datetime-setter_3.32.2.bb2
-rw-r--r--meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb2
682 files changed, 23437 insertions, 1008 deletions
diff --git a/contrib/pw-am.sh b/contrib/pw-am.sh
index 8987eee8eb..d9d1187b0b 100755
--- a/contrib/pw-am.sh
+++ b/contrib/pw-am.sh
@@ -9,7 +9,7 @@
for patchnumber in $@;
do
- wget -nv http://patches.openembedded.org/patch/$patchnumber/mbox/ -O pw-am-$patchnumber.patch
+ wget -nv http://patchwork.yoctoproject.org/patch/$patchnumber/mbox/ -O pw-am-$patchnumber.patch
git am -s pw-am-$patchnumber.patch
rm pw-am-$patchnumber.patch
done
diff --git a/meta-filesystems/recipes-filesystems/logfsprogs/logfsprogs_git.bb b/meta-filesystems/recipes-filesystems/logfsprogs/logfsprogs_git.bb
index d9864ac3e8..e4a0f95692 100644
--- a/meta-filesystems/recipes-filesystems/logfsprogs/logfsprogs_git.bb
+++ b/meta-filesystems/recipes-filesystems/logfsprogs/logfsprogs_git.bb
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://fsck.c;md5=3859dc73da97909ff1d0125e88a27e02"
DEPENDS = "zlib"
-SRC_URI = "git://github.com/prasad-joshi/logfsprogs.git \
+SRC_URI = "git://github.com/prasad-joshi/logfsprogs.git;branch=master;protocol=https \
file://0001-Add-LDFLAGS-to-linker-cmdline.patch \
file://0001-btree-Avoid-conflicts-with-libc-namespace-about-setk.patch \
file://0001-include-sys-sysmacros.h-for-major-minor-definition.patch \
diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb
index 6f5cb6cee9..efb331d7b2 100644
--- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb
+++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb
@@ -10,8 +10,7 @@ SRC_URI = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${PV}.tgz \
file://0001-libntfs-3g-Makefile.am-fix-install-failed-while-host.patch \
"
S = "${WORKDIR}/ntfs-3g_ntfsprogs-${PV}"
-SRC_URI[md5sum] = "d97474ae1954f772c6d2fa386a6f462c"
-SRC_URI[sha256sum] = "3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5"
+SRC_URI[sha256sum] = "f20e36ee68074b845e3629e6bced4706ad053804cbaf062fbae60738f854170c"
UPSTREAM_CHECK_URI = "https://www.tuxera.com/community/open-source-ntfs-3g/"
UPSTREAM_CHECK_REGEX = "ntfs-3g_ntfsprogs-(?P<pver>\d+(\.\d+)+)\.tgz"
@@ -50,3 +49,5 @@ do_install_append() {
# Satisfy the -dev runtime dependency
ALLOW_EMPTY_${PN} = "1"
+
+CVE_PRODUCT = "tuxera:ntfs-3g"
diff --git a/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb b/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb
index 414084449f..9e546e8a39 100644
--- a/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb
+++ b/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=628b867016631792781a8735a04760e5 \
DEPENDS = "fuse virtual/libusb0"
# v3.2p3
SRCREV = "3744375dfaa350e31c9b360eb1e1a517bbeb5c47"
-SRC_URI = "git://github.com/owfs/owfs \
+SRC_URI = "git://github.com/owfs/owfs;branch=master;protocol=https \
file://0001-Add-build-rule-for-README.patch \
file://owhttpd \
file://owserver \
diff --git a/meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse_3.7.0.bb b/meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse_3.7.0.bb
index bf9c34dc97..9b776e9dc7 100644
--- a/meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse_3.7.0.bb
+++ b/meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse_3.7.0.bb
@@ -6,7 +6,7 @@ LICENSE = "GPLv2"
DEPENDS = "glib-2.0 fuse3"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "git://github.com/libfuse/sshfs"
+SRC_URI = "git://github.com/libfuse/sshfs;branch=master;protocol=https"
SRCREV = "a7e1038203c856cc7e052d439d1da49fe131339f"
S = "${WORKDIR}/git"
diff --git a/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.1.bb b/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.1.bb
index 3dd5c82ee5..13273f7bc8 100644
--- a/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.1.bb
+++ b/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_2.1.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://src/unionfs.c;beginline=3;endline=8;md5=30fa8de70fd8a
file://LICENSE;md5=7e5a37fce17307066eec6b23546da3b3 \
"
-SRC_URI = "git://github.com/rpodgorny/${BPN}.git;branch=master \
+SRC_URI = "git://github.com/rpodgorny/${BPN}.git;branch=master;protocol=https \
file://0001-support-cross-compiling.patch \
"
SRCREV = "8d732962423c3ca5be1f14b7ec139ff464e10a51"
diff --git a/meta-filesystems/recipes-support/fuse/fuse3_3.9.2.bb b/meta-filesystems/recipes-support/fuse/fuse3_3.9.2.bb
index 24b17fc93b..dc9132a82e 100644
--- a/meta-filesystems/recipes-support/fuse/fuse3_3.9.2.bb
+++ b/meta-filesystems/recipes-support/fuse/fuse3_3.9.2.bb
@@ -22,6 +22,8 @@ UPSTREAM_CHECK_REGEX = "fuse\-(?P<pver>3(\.\d+)+).tar.xz"
inherit meson pkgconfig
+CVE_PRODUCT = "fuse_project:fuse"
+
DEPENDS = "udev"
PACKAGES =+ "fuse3-utils"
diff --git a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb
index 49682b3cd4..4ec1213519 100644
--- a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb
+++ b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb
@@ -27,6 +27,8 @@ CVE_CHECK_WHITELIST += "CVE-2019-14860"
UPSTREAM_CHECK_URI = "https://github.com/libfuse/libfuse/releases"
UPSTREAM_CHECK_REGEX = "fuse\-(?P<pver>2(\.\d+)+).tar.gz"
+CVE_PRODUCT = "fuse_project:fuse"
+
inherit autotools pkgconfig update-rc.d systemd
INITSCRIPT_NAME = "fuse"
diff --git a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.13.0.bb b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.13.0.bb
index 98bd478f32..2c5a9e16b3 100644
--- a/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.13.0.bb
+++ b/meta-filesystems/recipes-utils/f2fs-tools/f2fs-tools_1.13.0.bb
@@ -9,7 +9,7 @@ DEPENDS = "util-linux"
# v1.13.0
SRCREV = "284f77f0075a16a2ad1f3b0fb89b7f64a1bc755d"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git;branch=master \
file://0001-f2fs-tools-Use-srcdir-prefix-to-denote-include-path.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-filesystems/recipes-utils/fatcat/fatcat_1.1.0.bb b/meta-filesystems/recipes-utils/fatcat/fatcat_1.1.0.bb
index c72671739d..c90a7ecc2b 100644
--- a/meta-filesystems/recipes-utils/fatcat/fatcat_1.1.0.bb
+++ b/meta-filesystems/recipes-utils/fatcat/fatcat_1.1.0.bb
@@ -7,7 +7,7 @@ HOMEPAGE = "https://github.com/Gregwar/fatcat"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=57fbbfebd0dd1d6ff21b8cecb552a03f"
-SRC_URI = "git://github.com/Gregwar/fatcat.git \
+SRC_URI = "git://github.com/Gregwar/fatcat.git;branch=master;protocol=https \
file://0001-Use-unistd.h-not-argp.h-for-all-POSIX-systems.patch \
"
diff --git a/meta-filesystems/recipes-utils/fatresize/fatresize_1.0.2.bb b/meta-filesystems/recipes-utils/fatresize/fatresize_1.0.2.bb
index 88d495b685..c258a128ee 100644
--- a/meta-filesystems/recipes-utils/fatresize/fatresize_1.0.2.bb
+++ b/meta-filesystems/recipes-utils/fatresize/fatresize_1.0.2.bb
@@ -3,7 +3,7 @@ SECTION = "console/tools"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-SRC_URI = "git://salsa.debian.org/parted-team/fatresize.git;protocol=https"
+SRC_URI = "git://salsa.debian.org/parted-team/fatresize.git;protocol=https;branch=master"
SRCREV = "3f80afc76ad82d4a1b852a6c8dea24cd9f5e7a24"
PV = "1.0.2-11"
diff --git a/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb b/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb
index 23583650b8..ed003ee7be 100644
--- a/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb
+++ b/meta-filesystems/recipes-utils/ufs-utils/ufs-utils_git.bb
@@ -8,7 +8,7 @@ BRANCH ?= "dev"
SRCREV = "a3cf93b66f4606a46354cf884d24aa966661f848"
-SRC_URI = "git://github.com/westerndigitalcorporation/ufs-utils.git;protocol=git;branch=${BRANCH} \
+SRC_URI = "git://github.com/westerndigitalcorporation/ufs-utils.git;protocol=https;branch=${BRANCH} \
file://0001-Replace-u_intXX_t-with-kernel-typedefs.patch \
"
diff --git a/meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb b/meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb
index a47bf6fcf8..b10efbedc5 100644
--- a/meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb
+++ b/meta-gnome/recipes-gnome/gdm/gdm_3.34.1.bb
@@ -10,7 +10,7 @@ DEPENDS = " \
libpam \
"
-REQUIRED_DISTRO_FEATURES = "x11 systemd pam"
+REQUIRED_DISTRO_FEATURES = "x11 systemd pam polkit"
inherit gnomebase gsettings gobject-introspection gettext systemd useradd upstream-version-is-even features_check
diff --git a/meta-gnome/recipes-gnome/libchamplain/libchamplain_0.12.20.bb b/meta-gnome/recipes-gnome/libchamplain/libchamplain_0.12.20.bb
index 90e5533015..7564275668 100644
--- a/meta-gnome/recipes-gnome/libchamplain/libchamplain_0.12.20.bb
+++ b/meta-gnome/recipes-gnome/libchamplain/libchamplain_0.12.20.bb
@@ -6,7 +6,7 @@ DEPENDS = "glib-2.0 gtk+3 gdk-pixbuf clutter-1.0 clutter-gtk-1.0 libsoup-2.4"
inherit meson gobject-introspection
SRCREV = "145e417f32e507b63c21ad4e915b808a6174099e"
-SRC_URI = "git://github.com/gnome/libchamplain.git"
+SRC_URI = "git://github.com/gnome/libchamplain.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-gnome/recipes-support/ibus/ibus.inc b/meta-gnome/recipes-support/ibus/ibus.inc
index 1bbeb2c481..2e03f7c6a7 100644
--- a/meta-gnome/recipes-support/ibus/ibus.inc
+++ b/meta-gnome/recipes-support/ibus/ibus.inc
@@ -10,7 +10,7 @@ PV = "1.5.22"
DEPENDS = "unicode-ucd"
SRC_URI = " \
- git://github.com/ibus/ibus.git \
+ git://github.com/ibus/ibus.git;branch=main;protocol=https \
file://0001-Do-not-try-to-start-dbus-we-do-not-have-dbus-lauch.patch \
"
SRCREV = "e3262f08b9e3efc57808700823b0622ec03a1b5f"
diff --git a/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb b/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
index d567d00d3f..fb4c816729 100644
--- a/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
+++ b/meta-gnome/recipes-support/keybinder/keybinder_3.0.bb
@@ -13,7 +13,7 @@ B = "${S}"
SRCREV = "736ccef40d39603b8111c8a3a0bca0319bbafdc0"
PV = "3.0+git${SRCPV}"
-SRC_URI = "git://github.com/engla/keybinder.git;branch=keybinder-3.0 \
+SRC_URI = "git://github.com/engla/keybinder.git;branch=keybinder-3.0;protocol=https \
"
RDEPENDS_${PN} = "gtk+"
diff --git a/meta-gnome/recipes-support/libhandy/libhandy_git.bb b/meta-gnome/recipes-support/libhandy/libhandy_git.bb
index 8c6159f998..6d63ddb86a 100644
--- a/meta-gnome/recipes-support/libhandy/libhandy_git.bb
+++ b/meta-gnome/recipes-support/libhandy/libhandy_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "A library full of GTK+ widgets for mobile phones"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-SRC_URI = "git://source.puri.sm/Librem5/${BPN}.git;protocol=https"
+SRC_URI = "git://source.puri.sm/Librem5/${BPN}.git;protocol=https;branch=master"
SRCREV = "ef7c4bf75ae239495141ada83d2fbaf034315563"
S = "${WORKDIR}/git"
PV = "0.0.12"
diff --git a/meta-gnome/recipes-support/libstemmer/libstemmer_git.bb b/meta-gnome/recipes-support/libstemmer/libstemmer_git.bb
index 96dd880b6a..837807ccf9 100644
--- a/meta-gnome/recipes-support/libstemmer/libstemmer_git.bb
+++ b/meta-gnome/recipes-support/libstemmer/libstemmer_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2750797da77c1d784e7626b3f7d7ff3e"
DEPENDS_class-target = "${BPN}-native"
SRC_URI = "\
- git://github.com/snowballstem/snowball.git \
+ git://github.com/snowballstem/snowball.git;branch=master;protocol=https \
file://0001-Build-so-lib.patch \
file://0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch \
"
diff --git a/meta-gnome/recipes-support/libwacom/libwacom_0.33.bb b/meta-gnome/recipes-support/libwacom/libwacom_0.33.bb
index 6fb3b82ef1..5db78b7cf7 100644
--- a/meta-gnome/recipes-support/libwacom/libwacom_0.33.bb
+++ b/meta-gnome/recipes-support/libwacom/libwacom_0.33.bb
@@ -9,6 +9,6 @@ DEPENDS = " \
inherit autotools pkgconfig
-SRC_URI = "git://github.com/linuxwacom/libwacom.git"
+SRC_URI = "git://github.com/linuxwacom/libwacom.git;branch=master;protocol=https"
SRCREV = "87cc710e21a6220e267dd08936bbec2932aa3658"
S = "${WORKDIR}/git"
diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
index ed3dece3f6..ee05045320 100644
--- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
+++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
PV = "0.6+git${SRCPV}"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/kexecboot/kexecboot.git"
+SRC_URI = "git://github.com/kexecboot/kexecboot.git;branch=master;protocol=https"
SRC_URI_append_libc-klibc = " file://0001-kexecboot-Use-new-reboot-API-with-klibc.patch "
SRCREV = "5a5e04be206140059f42ac786d424da1afaa04b6"
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index 13cf5f6ded..dd22b196fa 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -10,7 +10,7 @@ PV = "049"
# v048 tag
SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
-SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
+SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http;branch=master \
file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
file://0001-dracut.sh-improve-udevdir.patch \
file://0001-set-viriable-_drv-not-local.patch \
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb b/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
index 7403cf64f7..c890165b6a 100644
--- a/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
+++ b/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
@@ -14,7 +14,7 @@ DEPENDS_append_libc-musl = " libexecinfo"
S = "${WORKDIR}/git"
SRCREV = "79c5cfa02c567efdc5bb18cdd584789e2e35aa23"
-SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https; \
+SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https;branch=master \
file://grubby-rename-grub2-editenv-to-grub-editenv.patch \
file://run-ptest \
file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby_git.bb b/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
index 7248147a5c..9d3d7b55cc 100644
--- a/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
+++ b/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
@@ -14,7 +14,7 @@ DEPENDS_append_libc-musl = " libexecinfo"
S = "${WORKDIR}/git"
SRCREV = "a1d2ae93408c3408e672d7eba4550fdf27fb0201"
-SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https; \
+SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https;branch=main \
file://grubby-rename-grub2-editenv-to-grub-editenv.patch \
file://run-ptest \
file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb
index d322381621..fe5898a903 100644
--- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb
+++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_2.0.2.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
inherit autotools pkgconfig klibc
SRCREV = "64f61a9dc71b158c7084006cbce4ea23886f0b47"
-SRC_URI = "git://git.infradead.org/mtd-utils.git \
+SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
file://0001-libmissing.h-fix-klibc-build-when-using-glibc-toolch.patch \
file://0002-Instead-of-doing-preprocessor-magic-just-output-off_.patch \
file://0003-Makefile.am-only-build-ubi-utils.patch \
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
index 7ad55d8b8c..143ac6f433 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
@@ -12,7 +12,7 @@ DEPENDS = "zlib xz"
inherit klibc autotools
-SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
+SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git;branch=master"
SRCREV = "5750980cdbbc33ef75bfba6660295b932376ce15"
BUILD_PATCHES = "file://0001-force-static-build.patch \
diff --git a/meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb b/meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb
index 828e351be6..ef473c4896 100644
--- a/meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb
+++ b/meta-multimedia/recipes-connectivity/libupnp/libupnp_git.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=394a0f17b97f33426275571e15920434"
PV = "1.8.4+git${SRCPV}"
# release-1.8.4
SRCREV = "d5a01fc9895daae98a0c5a8c7d3afce46add529d"
-SRC_URI = "git://github.com/mrjimenez/pupnp.git;protocol=https \
+SRC_URI = "git://github.com/mrjimenez/pupnp.git;protocol=https;branch=master \
file://CVE-2020-13848.patch"
S="${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
index 20faef047e..32e74f08c3 100644
--- a/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
+++ b/meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb
@@ -8,7 +8,7 @@ DEPENDS = "avahi cmake-native dvb-apps libdvbcsa libpcre2 openssl uriparser zlib
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9cae5acac2e9ee2fc3aec01ac88ce5db"
-SRC_URI = "git://github.com/tvheadend/tvheadend.git \
+SRC_URI = "git://github.com/tvheadend/tvheadend.git;branch=master;protocol=https \
file://0001-adjust-for-64bit-time_t.patch \
file://0001-allocate-space-for-buf-on-heap.patch \
"
diff --git a/meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb b/meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb
index 1a51abc360..343b9d7915 100644
--- a/meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb
+++ b/meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb
@@ -4,7 +4,7 @@ LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c"
SRCREV = "b93deed1a231dd6dd7e39b9fe7d2abe05aa00158"
-SRC_URI = "git://github.com/foo86/dcadec.git;protocol=https \
+SRC_URI = "git://github.com/foo86/dcadec.git;protocol=https;branch=master \
file://0001-define-BASELIB-make-variable.patch \
"
diff --git a/meta-multimedia/recipes-multimedia/dleyna/dleyna-connector-dbus_0.3.0.bb b/meta-multimedia/recipes-multimedia/dleyna/dleyna-connector-dbus_0.3.0.bb
index f23bc6ca81..c89156dcf8 100644
--- a/meta-multimedia/recipes-multimedia/dleyna/dleyna-connector-dbus_0.3.0.bb
+++ b/meta-multimedia/recipes-multimedia/dleyna/dleyna-connector-dbus_0.3.0.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
DEPENDS = "glib-2.0 dbus dleyna-core"
-SRC_URI = "git://github.com/01org/${BPN}.git"
+SRC_URI = "git://github.com/01org/${BPN}.git;branch=master;protocol=https"
SRCREV = "de913c35e5c936e2d40ddbd276ee902cd802bd3a"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/dleyna/dleyna-core_0.6.0.bb b/meta-multimedia/recipes-multimedia/dleyna/dleyna-core_0.6.0.bb
index 8939cd36e2..647532d9fa 100644
--- a/meta-multimedia/recipes-multimedia/dleyna/dleyna-core_0.6.0.bb
+++ b/meta-multimedia/recipes-multimedia/dleyna/dleyna-core_0.6.0.bb
@@ -13,7 +13,7 @@ DEPENDS = "glib-2.0 gupnp"
PV .= "+git${SRCPV}"
-SRC_URI = "git://github.com/01org/${BPN}.git"
+SRC_URI = "git://github.com/01org/${BPN}.git;branch=master;protocol=https"
SRCREV = "1c6853f5bc697dc0a8774fd70dbc915c4dbe7c5b"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/dleyna/dleyna-renderer_0.6.0.bb b/meta-multimedia/recipes-multimedia/dleyna/dleyna-renderer_0.6.0.bb
index 642f21bd53..4b53763440 100644
--- a/meta-multimedia/recipes-multimedia/dleyna/dleyna-renderer_0.6.0.bb
+++ b/meta-multimedia/recipes-multimedia/dleyna/dleyna-renderer_0.6.0.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
DEPENDS = "glib-2.0 gssdp gupnp gupnp-av gupnp-dlna libsoup-2.4 dleyna-core"
RDEPENDS_${PN} = "dleyna-connector-dbus"
-SRC_URI = "git://github.com/01org/${BPN}.git \
+SRC_URI = "git://github.com/01org/${BPN}.git;branch=master;protocol=https \
file://0001-add-gupnp-1.2-API-support.patch \
"
SRCREV = "50fd1ec9d51328e7dea98874129dc8d6fe3ea1dd"
diff --git a/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb b/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb
index e31b7aea2a..5fa3e2373a 100644
--- a/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb
+++ b/meta-multimedia/recipes-multimedia/dleyna/dleyna-server_0.6.0.bb
@@ -12,7 +12,7 @@ DEPENDS = "glib-2.0 gssdp gupnp gupnp-av gupnp-dlna libsoup-2.4 libxml2 dleyna-c
RDEPENDS_${PN} = "dleyna-connector-dbus"
PV .= "+git${SRCPV}"
-SRC_URI = "git://github.com/01org/${BPN}.git"
+SRC_URI = "git://github.com/01org/${BPN}.git;branch=master;protocol=https"
SRCREV = "eb895ae82715e9889a948ffa810c0f828b4f4c76"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/fdk-aac/fdk-aac_2.0.1.bb b/meta-multimedia/recipes-multimedia/fdk-aac/fdk-aac_2.0.1.bb
index d7911681c7..c499119c6f 100644
--- a/meta-multimedia/recipes-multimedia/fdk-aac/fdk-aac_2.0.1.bb
+++ b/meta-multimedia/recipes-multimedia/fdk-aac/fdk-aac_2.0.1.bb
@@ -11,7 +11,7 @@ LICENSE = "Fraunhofer_FDK_AAC_Codec_Library_for_Android"
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://NOTICE;md5=5985e1e12f4afa710d64ed7bfd291875"
-SRC_URI = "git://github.com/mstorsjo/fdk-aac.git;protocol=git;branch=master"
+SRC_URI = "git://github.com/mstorsjo/fdk-aac.git;protocol=https;branch=master"
SRCREV = "d387d3b6ed79ff9a82c60440bdd86e6e5e324bec"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc b/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc
index fcc9df8c30..ee3e38cd93 100644
--- a/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc
+++ b/meta-multimedia/recipes-multimedia/fluidsynth/fluidsynth.inc
@@ -4,7 +4,7 @@ SECTION = "libs/multimedia"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594"
-SRC_URI = "git://github.com/FluidSynth/fluidsynth.git"
+SRC_URI = "git://github.com/FluidSynth/fluidsynth.git;branch=master;protocol=https"
SRCREV = "19a20eb8526465fdf940b740b13462d71e190a1a"
S = "${WORKDIR}/git"
PV = "2.1.3"
diff --git a/meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb b/meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb
index c96e4c52e9..2f9ceffab7 100644
--- a/meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb
+++ b/meta-multimedia/recipes-multimedia/gerbera/gerbera_git.bb
@@ -3,7 +3,7 @@ Description = "Gerbera - An UPnP media server"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=25cdec9afe3f1f26212ead6bd2f7fac8"
-SRC_URI = "git://github.com/v00d00/gerbera.git;protocol=https \
+SRC_URI = "git://github.com/v00d00/gerbera.git;protocol=https;branch=master \
"
PV = "1.3.2"
diff --git a/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb b/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb
index d047caef5f..19d43a4b74 100644
--- a/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb
+++ b/meta-multimedia/recipes-multimedia/gstreamer-1.0/gst-shark_git.bb
@@ -14,10 +14,10 @@ PV = "0.6.1"
SRCREV_base = "c41a05cc9e2310c2f73eda4b4f0b4477bf4479c5"
SRCREV_common = "88e512ca7197a45c4114f7fa993108f23245bf50"
-
+SRCREV_FORMAT = "base_common"
SRC_URI = " \
git://github.com/RidgeRun/gst-shark.git;protocol=https;branch=${SRCBRANCH};name=base \
- git://gitlab.freedesktop.org/gstreamer/common.git;protocol=https;destsuffix=git/common;name=common; \
+ git://gitlab.freedesktop.org/gstreamer/common.git;protocol=https;destsuffix=git/common;name=common;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb
index 3f8fe2f360..e16fd25962 100644
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "\
"
SRC_URI = " \
- git://linuxtv.org/libcamera.git;protocol=git \
+ git://linuxtv.org/libcamera.git;protocol=git;branch=master \
"
SRCREV = "a8be6e94e79f602d543a15afd44ef60e378b138f"
diff --git a/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb b/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb
index 7f042c382f..4cf8e2effc 100644
--- a/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb
+++ b/meta-multimedia/recipes-multimedia/libdvbcsa/libdvbcsa_1.1.0.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRCREV = "bc6c0b164a87ce05e9925785cc6fb3f54c02b026"
-SRC_URI = "git://code.videolan.org/videolan/libdvbcsa.git;protocol=https \
+SRC_URI = "git://code.videolan.org/videolan/libdvbcsa.git;protocol=https;branch=master \
file://libdvbcsa.pc \
"
diff --git a/meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb b/meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb
index f060f1e80d..cb42d943fc 100644
--- a/meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb
+++ b/meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://alpha.cpp;beginline=3;endline=22;md5=6665e479f71feb92
PV = "1.10+git${SRCPV}"
SRCREV = "52e7d93c5947f72380521116c05d97c528863ba8"
-SRC_URI = "git://github.com/OpenELEC/libsquish.git;protocol=https"
+SRC_URI = "git://github.com/OpenELEC/libsquish.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/mimic/mimic_1.2.0.2.bb b/meta-multimedia/recipes-multimedia/mimic/mimic_1.2.0.2.bb
index b313b110cc..4631b037be 100644
--- a/meta-multimedia/recipes-multimedia/mimic/mimic_1.2.0.2.bb
+++ b/meta-multimedia/recipes-multimedia/mimic/mimic_1.2.0.2.bb
@@ -20,7 +20,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=416ef1ca5167707fe381d7be33664a33"
DEPENDS = "curl-native icu"
SRCREV = "67e43bf0fa56008276b878ec3790aa5f32eb2a16"
-SRC_URI = "git://github.com/MycroftAI/mimic.git"
+SRC_URI = "git://github.com/MycroftAI/mimic.git;branch=master;protocol=https"
inherit autotools
diff --git a/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb b/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
index ca9d94a19c..253f995d88 100644
--- a/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
+++ b/meta-multimedia/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
@@ -8,7 +8,7 @@ DEPENDS = "expat libxml2 libxml2-native neon neon-native"
PV = "5.1.0+git${SRCPV}"
SRCREV = "44c05779dd996035758f5ec426766aeedce29cc3"
-SRC_URI = "git://github.com/metabrainz/libmusicbrainz.git \
+SRC_URI = "git://github.com/metabrainz/libmusicbrainz.git;branch=master;protocol=https \
file://allow-libdir-override.patch "
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.16.bb b/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.16.bb
index 235e63e481..84b7baab23 100644
--- a/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.16.bb
+++ b/meta-multimedia/recipes-multimedia/musicpd/libmpdclient_2.16.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "https://www.musicpd.org/libs/libmpdclient/"
inherit meson
SRC_URI = " \
- git://github.com/MusicPlayerDaemon/libmpdclient \
+ git://github.com/MusicPlayerDaemon/libmpdclient;branch=master;protocol=https \
"
SRCREV = "4e8d990eb5239566ee948f1cd79b7248e008620a"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpc_0.31.bb b/meta-multimedia/recipes-multimedia/musicpd/mpc_0.31.bb
index 41abe7108a..b4fce35df7 100644
--- a/meta-multimedia/recipes-multimedia/musicpd/mpc_0.31.bb
+++ b/meta-multimedia/recipes-multimedia/musicpd/mpc_0.31.bb
@@ -10,7 +10,7 @@ DEPENDS += " \
"
SRC_URI = " \
- git://github.com/MusicPlayerDaemon/mpc \
+ git://github.com/MusicPlayerDaemon/mpc;branch=master;protocol=https \
"
SRCREV = "59875acdf34e5f0eac0c11453c49daef54f78413"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb
index 133ee6e792..3f20515993 100644
--- a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb
+++ b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb
@@ -17,7 +17,7 @@ DEPENDS += " \
"
SRC_URI = " \
- git://github.com/MusicPlayerDaemon/MPD;branch=v0.20.x \
+ git://github.com/MusicPlayerDaemon/MPD;branch=v0.20.x;protocol=https \
file://mpd.conf.in \
file://0001-StringBuffer-Include-cstddef-for-size_t.patch \
file://0002-Include-stdexcept-for-runtime_error.patch \
diff --git a/meta-multimedia/recipes-multimedia/musicpd/ncmpc_0.34.bb b/meta-multimedia/recipes-multimedia/musicpd/ncmpc_0.34.bb
index 0c99c7c698..c92a4421a3 100644
--- a/meta-multimedia/recipes-multimedia/musicpd/ncmpc_0.34.bb
+++ b/meta-multimedia/recipes-multimedia/musicpd/ncmpc_0.34.bb
@@ -31,7 +31,7 @@ PACKAGECONFIG[outputs_screen] = "-Doutputs_screen=true,-Doutputs_screen=false"
PACKAGECONFIG[chat_screen] = "-Dchat_screen=true,-Dchat_screen=false"
SRC_URI = " \
- git://github.com/MusicPlayerDaemon/ncmpc \
+ git://github.com/MusicPlayerDaemon/ncmpc;branch=master;protocol=https \
"
SRCREV = "79cf9905355f25bc5cc6d5a05d2846d75342f554"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb
index 62d1ad7f74..e71cb87014 100644
--- a/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb
+++ b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb
@@ -7,7 +7,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=79aa497b11564d1d419ee889e7b498f6"
SRCREV = "913f29d3d550637934f9abf43a097eb2c30d76fc"
-SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master \
+SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master;protocol=https \
file://0001-Remove-python-venv.patch \
file://0002-dev_setup.sh-Remove-the-git-dependency.patch \
file://0003-dev_setup.sh-Remove-the-TERM-dependency.patch \
diff --git a/meta-multimedia/recipes-multimedia/openal/openal-soft_1.19.1.bb b/meta-multimedia/recipes-multimedia/openal/openal-soft_1.19.1.bb
index a9cdfac8a9..5787f22036 100644
--- a/meta-multimedia/recipes-multimedia/openal/openal-soft_1.19.1.bb
+++ b/meta-multimedia/recipes-multimedia/openal/openal-soft_1.19.1.bb
@@ -7,7 +7,7 @@ inherit cmake pkgconfig
# openal-soft-1.19.1
SRCREV = "6761218e51699f46bf25c377e65b3e9ea5e434b9"
-SRC_URI = "git://github.com/kcat/openal-soft \
+SRC_URI = "git://github.com/kcat/openal-soft;branch=master;protocol=https \
file://0001-Use-BUILD_CC-to-compile-native-tools.patch \
file://0002-makehrtf-Disable-Wstringop-truncation.patch \
"
diff --git a/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb b/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb
index 5f78be4f51..53ee2a82fb 100644
--- a/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb
+++ b/meta-multimedia/recipes-multimedia/rtmpdump/rtmpdump_2.4.bb
@@ -9,7 +9,7 @@ DEPENDS = "gnutls zlib"
SRCREV = "fa8646daeb19dfd12c181f7d19de708d623704c0"
SRC_URI = " \
- git://git.ffmpeg.org/rtmpdump \
+ git://git.ffmpeg.org/rtmpdump;branch=master \
file://fix-racing-build-issue.patch"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb b/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb
index c651d8113d..47f7af46bd 100644
--- a/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb
+++ b/meta-multimedia/recipes-multimedia/sample-content/bigbuckbunny-1080p.bb
@@ -3,7 +3,7 @@ LICENSE = "CC-BY-3.0"
# http://www.bigbuckbunny.org/index.php/about/
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/CC-BY-3.0;md5=dfa02b5755629022e267f10b9c0a2ab7"
-SRC_URI = "https://www.mediaspip.net/IMG/avi/big_buck_bunny_1080p_surround.avi"
+SRC_URI = "http://www.peach.themazzone.com/big_buck_bunny_1080p_surround.avi"
SRC_URI[md5sum] = "223991c8b33564eb77988a4c13c1c76a"
SRC_URI[sha256sum] = "69fe2cfe7154a6e752688e3a0d7d6b07b1605bbaf75b56f6470dc7b4c20c06ea"
diff --git a/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb b/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb
index 062096892e..68cf8795a6 100644
--- a/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb
+++ b/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb
@@ -7,7 +7,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://NOTICE;md5=dbdefe400d894b510a9de14813181d0b"
SRCREV = "8449529c7e50f432091539ba7b438e79b04059b5"
-SRC_URI = "git://github.com/tinyalsa/tinyalsa \
+SRC_URI = "git://github.com/tinyalsa/tinyalsa;branch=master;protocol=https \
file://0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch \
"
PV = "1.1.1+git${SRCPV}"
diff --git a/meta-multimedia/recipes-multimedia/tremor/tremor_20180319.bb b/meta-multimedia/recipes-multimedia/tremor/tremor_20180319.bb
index 6abf6080bd..f8ab1bf680 100644
--- a/meta-multimedia/recipes-multimedia/tremor/tremor_20180319.bb
+++ b/meta-multimedia/recipes-multimedia/tremor/tremor_20180319.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
file://os.h;beginline=3;endline=14;md5=5c0af5e1bedef3ce8178c89f48cd6f1f"
DEPENDS = "libogg"
-SRC_URI = "git://gitlab.xiph.org/xiph/tremor.git;protocol=https \
+SRC_URI = "git://gitlab.xiph.org/xiph/tremor.git;protocol=https;branch=master \
file://obsolete_automake_macros.patch;striplevel=0 \
file://tremor-arm-thumb2.patch \
"
diff --git a/meta-multimedia/recipes-support/crossguid/crossguid.bb b/meta-multimedia/recipes-support/crossguid/crossguid.bb
index 228b8b6540..f2d6e7a241 100644
--- a/meta-multimedia/recipes-support/crossguid/crossguid.bb
+++ b/meta-multimedia/recipes-support/crossguid/crossguid.bb
@@ -10,7 +10,7 @@ DEPENDS += "util-linux"
PV = "0.0+git${SRCPV}"
SRCREV = "b56957ac453575e91ca1b63a80c0077c2b0d011a"
-SRC_URI = "git://github.com/graeme-hill/crossguid;protocol=https"
+SRC_URI = "git://github.com/graeme-hill/crossguid;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-multimedia/recipes-support/gst-instruments/gst-instruments_git.bb b/meta-multimedia/recipes-support/gst-instruments/gst-instruments_git.bb
index feffa9fe19..50c69a9a08 100644
--- a/meta-multimedia/recipes-support/gst-instruments/gst-instruments_git.bb
+++ b/meta-multimedia/recipes-support/gst-instruments/gst-instruments_git.bb
@@ -9,7 +9,7 @@ DEPENDS = "gstreamer1.0"
S = "${WORKDIR}/git"
SRCREV = "3b862e52e5c53ad1023dc6808effa4cb75572c4b"
-SRC_URI = "git://github.com/kirushyk/gst-instruments.git;protocol=https;"
+SRC_URI = "git://github.com/kirushyk/gst-instruments.git;protocol=https;branch=master"
FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*a"
FILES_${PN} += "${libdir}/*"
diff --git a/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb b/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb
index d4a62bd92d..4cb85f8151 100644
--- a/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb
+++ b/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "a SocketCAN over Ethernet tunnel"
HOMEPAGE = "https://github.com/mguentner/cannelloni"
LICENSE = "GPLv2"
-SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https \
+SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https;branch=master \
file://0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch \
file://0002-include-missing-stdexcept-for-runtime_error.patch \
"
diff --git a/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb b/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
index 2820f9fa6d..e9c2056180 100644
--- a/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
+++ b/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=50bd1d7f135b50d7e218996ba28d0d88"
SRCREV = "4b440a339979852d5a51fb11a822952712231c23"
PV = "1.12+git${SRCPV}"
-SRC_URI = "git://github.com/civetweb/civetweb.git \
+SRC_URI = "git://github.com/civetweb/civetweb.git;branch=master;protocol=https \
file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \
"
diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
index 90051a319a..f856655904 100644
--- a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
+++ b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=7236695bb6d4461c105d685a8b61c4e3"
SRCREV = "c4b0ed52e751da7823dd9a36e91f93a6310e5525"
-SRC_URI = "git://github.com/tomaszmrugalski/dibbler \
+SRC_URI = "git://github.com/tomaszmrugalski/dibbler;branch=master;protocol=https \
file://dibbler_fix_getSize_crash.patch \
file://0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch \
"
diff --git a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb
index 2c39c4c443..1ea0cb16d3 100644
--- a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb
+++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb
@@ -13,7 +13,7 @@ LICENSE = "GPLv2 & LGPLv2+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc"
-SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x;lfs=0; \
+SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x;lfs=0;protocol=https \
file://freeradius \
file://volatiles.58_radiusd \
file://freeradius-enble-user-in-conf.patch \
diff --git a/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
index 5b27cfe155..c1a8146119 100644
--- a/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
+++ b/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9"
-SRC_URI = "git://github.com/dugsong/libdnet.git;nobranch=1"
+SRC_URI = "git://github.com/dugsong/libdnet.git;nobranch=1;protocol=https"
SRCREV = "12fca29a6d4e99d1b923d6820887fe7b24226904"
UPSTREAM_CHECK_GITTAGREGEX = "libdnet-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb b/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb
index 8444f0b739..66a7aaa6b2 100644
--- a/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb
+++ b/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=587b3fd7fd291e418ff4d2b8f3904755"
SECTION = "libs/networking"
-SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https"
+SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https;branch=master"
SRCREV = "1749fd7b039165a91b8d556b4df18e3e632ad830"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb b/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb
index 77be27ffaa..6d035f4039 100644
--- a/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb
+++ b/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb
@@ -8,7 +8,7 @@ SECTION = "libs/networking"
SRCREV = "53ae1a5ab37fdfc9ad5c236df3eaf4dd63f0fee9"
-SRC_URI = "git://github.com/nanomsg/nng.git;branch=v1.2.x"
+SRC_URI = "git://github.com/nanomsg/nng.git;branch=v1.2.x;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb b/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb
index 9f123c70fb..d91fc752e2 100644
--- a/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb
+++ b/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb
@@ -15,7 +15,7 @@ SRCREV = "5d22e9d22c4a3724d27b80b0cd9b898ae8f59d2b"
PV = "0.98+git${SRCPV}"
SRC_URI = " \
- git://github.com/CanonicalLtd/netplan.git \
+ git://github.com/CanonicalLtd/netplan.git;branch=master;protocol=https \
"
DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb
index 33a2b7c0ce..a28372dd1f 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb
@@ -33,11 +33,12 @@ SRC_URI_append_libc-musl = " \
file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \
file://musl/0004-Fix-build-with-musl-systemd-specific.patch \
"
-SRC_URI[sha256sum] = "2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77"
+SRC_URI[sha256sum] = "377aa053752eaa304b72c9906f9efcd9fbd5f7f6cb4cd4ad72425a68982cffc6"
S = "${WORKDIR}/NetworkManager-${PV}"
EXTRA_OECONF = " \
+ --disable-firewalld-zone \
--disable-ifcfg-rh \
--disable-more-warnings \
--with-iptables=${sbindir}/iptables \
diff --git a/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb b/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb
index 597c1920cf..144afb4843 100644
--- a/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb
+++ b/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb
@@ -3,7 +3,7 @@ LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=243b725d71bb5df4a1e5920b344b86ad"
SRC_URI = " \
- git://git.infradead.org/users/dwmw2/openconnect.git \
+ git://git.infradead.org/users/dwmw2/openconnect.git;branch=master \
file://0001-trojans-tncc-wrapper.py-convert-to-python3.patch \
"
SRCREV = "ea73851969ae7a6ea54fdd2d2b8c94776af24b2a"
diff --git a/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/meta-networking/recipes-connectivity/relayd/relayd_git.bb
index e3134e41fc..a75b43e062 100644
--- a/meta-networking/recipes-connectivity/relayd/relayd_git.bb
+++ b/meta-networking/recipes-connectivity/relayd/relayd_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://main.c;endline=17;md5=86aad799085683e0a2e1c2684a20bab
DEPENDS = "libubox"
-SRC_URI = "git://git.openwrt.org/project/relayd.git \
+SRC_URI = "git://git.openwrt.org/project/relayd.git;branch=master \
file://0001-rtnl_flush-Error-on-failed-write.patch \
"
diff --git a/meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch b/meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch
new file mode 100644
index 0000000000..0d1cbe5ad4
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/CVE-2023-42669.patch
@@ -0,0 +1,93 @@
+From 3f62a590b02bf4c888a995017e2575d3b2ec6ac9 Mon Sep 17 00:00:00 2001
+From: Andrew Bartlett <abartlet@samba.org>
+Date: Tue, 12 Sep 2023 18:59:44 +1200
+Subject: [PATCH] CVE-2023-42669 s4-rpc_server: Disable rpcecho server by
+ default
+
+The rpcecho server is useful in development and testing, but should never
+have been allowed into production, as it includes the facility to
+do a blocking sleep() in the single-threaded rpc worker.
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=15474
+
+Signed-off-by: Andrew Bartlett <abartlet@samba.org>
+
+Upstream-Status: Backport [https://www.samba.org/samba/ftp/patches/security/samba-4.17.12-security-2023-10-10.patch]
+CVE: CVE-2023-42669
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml | 2 +-
+ lib/param/loadparm.c | 2 +-
+ selftest/target/Samba4.pm | 2 +-
+ source3/param/loadparm.c | 2 +-
+ source4/rpc_server/wscript_build | 3 ++-
+ 5 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml b/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml
+index 8a217cc..c6642b7 100644
+--- a/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml
++++ b/docs-xml/smbdotconf/protocol/dcerpcendpointservers.xml
+@@ -6,6 +6,6 @@
+ <para>Specifies which DCE/RPC endpoint servers should be run.</para>
+ </description>
+
+-<value type="default">epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver</value>
++<value type="default">epmapper, wkssvc, samr, netlogon, lsarpc, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver</value>
+ <value type="example">rpcecho</value>
+ </samba:parameter>
+diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
+index 4c3dfff..db4ae5e 100644
+--- a/lib/param/loadparm.c
++++ b/lib/param/loadparm.c
+@@ -2653,7 +2653,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
+ lpcfg_do_global_parameter(lp_ctx, "ntvfs handler", "unixuid default");
+ lpcfg_do_global_parameter(lp_ctx, "max connections", "0");
+
+- lpcfg_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper wkssvc rpcecho samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver");
++ lpcfg_do_global_parameter(lp_ctx, "dcerpc endpoint servers", "epmapper wkssvc samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver");
+ lpcfg_do_global_parameter(lp_ctx, "server services", "s3fs rpc nbt wrepl ldap cldap kdc drepl winbindd ntp_signd kcc dnsupdate dns");
+ lpcfg_do_global_parameter(lp_ctx, "kccsrv:samba_kcc", "true");
+ /* the winbind method for domain controllers is for both RODC
+diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
+index a7a6c4c..ffa4b95 100755
+--- a/selftest/target/Samba4.pm
++++ b/selftest/target/Samba4.pm
+@@ -773,7 +773,7 @@ sub provision_raw_step1($$)
+ wins support = yes
+ server role = $ctx->{server_role}
+ server services = +echo $services
+- dcerpc endpoint servers = +winreg +srvsvc
++ dcerpc endpoint servers = +winreg +srvsvc +rpcecho
+ notify:inotify = false
+ ldb:nosync = true
+ ldap server require strong auth = yes
+diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
+index 0db44e9..b052d42 100644
+--- a/source3/param/loadparm.c
++++ b/source3/param/loadparm.c
+@@ -877,7 +877,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
+
+ Globals.server_services = str_list_make_v3_const(NULL, "s3fs rpc nbt wrepl ldap cldap kdc drepl winbindd ntp_signd kcc dnsupdate dns", NULL);
+
+- Globals.dcerpc_endpoint_servers = str_list_make_v3_const(NULL, "epmapper wkssvc rpcecho samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver", NULL);
++ Globals.dcerpc_endpoint_servers = str_list_make_v3_const(NULL, "epmapper wkssvc samr netlogon lsarpc drsuapi dssetup unixinfo browser eventlog6 backupkey dnsserver", NULL);
+
+ Globals.tls_enabled = true;
+ Globals.tls_verify_peer = TLS_VERIFY_PEER_AS_STRICT_AS_POSSIBLE;
+diff --git a/source4/rpc_server/wscript_build b/source4/rpc_server/wscript_build
+index 510335a..a95e070 100644
+--- a/source4/rpc_server/wscript_build
++++ b/source4/rpc_server/wscript_build
+@@ -36,7 +36,8 @@ bld.SAMBA_MODULE('dcerpc_rpcecho',
+ source='echo/rpc_echo.c',
+ subsystem='dcerpc_server',
+ init_function='dcerpc_server_rpcecho_init',
+- deps='ndr-standard events'
++ deps='ndr-standard events',
++ enabled=bld.CONFIG_GET('ENABLE_SELFTEST')
+ )
+
+
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb b/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
index d7b5864715..3b8da2b1cb 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb
@@ -30,6 +30,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
file://0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch \
file://CVE-2020-14318.patch \
file://CVE-2020-14383.patch \
+ file://CVE-2023-42669.patch \
"
SRC_URI_append_libc-musl = " \
file://samba-pam.patch \
diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
index 54e855a099..5d968f1476 100644
--- a/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
+++ b/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb
@@ -9,7 +9,7 @@ DEPENDS += "libgcrypt"
PV .= "r550-2jnpr1"
SRCREV = "b1243d29e0c00312ead038b04a2cf5e2fa31d740"
-SRC_URI = "git://github.com/ndpgroup/vpnc \
+SRC_URI = "git://github.com/ndpgroup/vpnc;branch=master;protocol=https \
file://long-help \
file://default.conf \
file://0001-search-for-log-help-in-build-dir.patch \
diff --git a/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb b/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb
index db7b0d486b..b9c545e155 100644
--- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb
+++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PROVIDES += "cyassl"
RPROVIDES_${PN} = "cyassl"
-SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https"
+SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master"
SRCREV = "e116c89a58af750421d82ece13f80516d2bde02e"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-daemons/atftp/atftp/0001-fix-buffer-overflow-in-atftpd.patch b/meta-networking/recipes-daemons/atftp/atftp/0001-fix-buffer-overflow-in-atftpd.patch
new file mode 100644
index 0000000000..88794aa7ab
--- /dev/null
+++ b/meta-networking/recipes-daemons/atftp/atftp/0001-fix-buffer-overflow-in-atftpd.patch
@@ -0,0 +1,111 @@
+From d255bf90834fb45be52decf9bc0b4fb46c90f205 Mon Sep 17 00:00:00 2001
+From: Martin Dummer <md11@users.sourceforge.net>
+Date: Sun, 12 Sep 2021 22:52:26 +0200
+Subject: [PATCH] fix buffer overflow in atftpd
+
+Andreas B. Mundt <andi@debian.org> reports:
+
+I've found a problem in atftpd that might be relevant for security.
+The daemon can be crashed by any client sending a crafted combination
+of TFTP options to the server. As TFTP is usually only used in the LAN,
+it's probably not too dramatic.
+
+Observations and how to reproduce the issue
+===========================================
+
+Install bullseye packages and prepare tftp-root:
+ sudo apt install atftp atftpd
+ mkdir tmp
+ touch tmp/file.txt
+
+Run server:
+ /usr/sbin/atftpd --user=$(id -un) --group=$(id -gn) --daemon --no-fork --trace \
+ --logfile=/dev/stdout --verbose=7 --port 2000 tmp
+
+Fetch file from client:
+ /usr/bin/atftp -g --trace --option "blksize 8" \
+ --remote-file file.txt -l /dev/null 127.0.0.1 2000
+
+Crash server by adding another option to the tiny blksize:
+ /usr/bin/atftp -g --trace --option "blksize 8" --option "timeout 3" \
+ --remote-file file.txt -l /dev/null 127.0.0.1 2000
+
+Analysis
+========
+
+The reason for the crash is a buffer overflow. The size of the buffer keeping the data
+to be sent with every segment is calculated by adding 4 bytes to the blksize (for opcode
+and block number). However, the same buffer is used for the OACK, which for a blksize=8
+overflows as soon as another option is set.
+
+Signed-off-by: Martin Dummer <md11@users.sourceforge.net>
+
+CVE: CVE-2021-41054
+Upstream-Status: Backport [https://github.com/madmartin/atftp/commit/d255bf90834fb45be52decf9bc0b4fb46c90f205.patch]
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+---
+ tftpd_file.c | 34 ++++++++++++++++++++++++++++++----
+ 1 file changed, 30 insertions(+), 4 deletions(-)
+
+diff --git a/tftpd_file.c b/tftpd_file.c
+index ff40e8d..37a0906 100644
+--- a/tftpd_file.c
++++ b/tftpd_file.c
+@@ -168,11 +168,24 @@ int tftpd_receive_file(struct thread_data *data)
+ logger(LOG_DEBUG, "timeout option -> %d", timeout);
+ }
+
+- /* blksize options */
++ /*
++ * blksize option, must be the last option evaluated,
++ * because data->data_buffer_size may be modified here,
++ * and may be smaller than the buffer containing options
++ */
+ if ((result = opt_get_blksize(data->tftp_options)) > -1)
+ {
+- if ((result < 8) || (result > 65464))
++ /*
++ * If we receive more options, we have to make sure our buffer for
++ * the OACK is not too small. Use the string representation of
++ * the options here for simplicity, which puts us on the save side.
++ * FIXME: Use independent buffers for OACK and data.
++ */
++ opt_options_to_string(data->tftp_options, string, MAXLEN);
++ if ((result < strlen(string)-2) || (result > 65464))
+ {
++ logger(LOG_NOTICE, "options <%s> require roughly a blksize of %d for the OACK.",
++ string, strlen(string)-2);
+ tftp_send_error(sockfd, sa, EOPTNEG, data->data_buffer, data->data_buffer_size);
+ if (data->trace)
+ logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", EOPTNEG,
+@@ -531,11 +544,24 @@ int tftpd_send_file(struct thread_data *data)
+ logger(LOG_INFO, "timeout option -> %d", timeout);
+ }
+
+- /* blksize options */
++ /*
++ * blksize option, must be the last option evaluated,
++ * because data->data_buffer_size may be modified here,
++ * and may be smaller than the buffer containing options
++ */
+ if ((result = opt_get_blksize(data->tftp_options)) > -1)
+ {
+- if ((result < 8) || (result > 65464))
++ /*
++ * If we receive more options, we have to make sure our buffer for
++ * the OACK is not too small. Use the string representation of
++ * the options here for simplicity, which puts us on the save side.
++ * FIXME: Use independent buffers for OACK and data.
++ */
++ opt_options_to_string(data->tftp_options, string, MAXLEN);
++ if ((result < strlen(string)-2) || (result > 65464))
+ {
++ logger(LOG_NOTICE, "options <%s> require roughly a blksize of %d for the OACK.",
++ string, strlen(string)-2);
+ tftp_send_error(sockfd, sa, EOPTNEG, data->data_buffer, data->data_buffer_size);
+ if (data->trace)
+ logger(LOG_DEBUG, "sent ERROR <code: %d, msg: %s>", EOPTNEG,
+--
+2.17.1
+
diff --git a/meta-networking/recipes-daemons/atftp/atftp/0001-options.c-Proper-fix-for-the-read-past-end-of-array.patch b/meta-networking/recipes-daemons/atftp/atftp/0001-options.c-Proper-fix-for-the-read-past-end-of-array.patch
new file mode 100644
index 0000000000..310728aaca
--- /dev/null
+++ b/meta-networking/recipes-daemons/atftp/atftp/0001-options.c-Proper-fix-for-the-read-past-end-of-array.patch
@@ -0,0 +1,48 @@
+From 9cf799c40738722001552618518279e9f0ef62e5 Mon Sep 17 00:00:00 2001
+From: Simon Rettberg <simon.rettberg@rz.uni-freiburg.de>
+Date: Wed, 10 Jan 2018 17:01:20 +0100
+Subject: [PATCH] options.c: Proper fix for the read-past-end-of-array
+
+This properly fixes what commit:b3e36dd tried to do.
+
+CVE: CVE-2021-46671
+Upstream-Status: Backport [https://github.com/madmartin/atftp/commit/9cf799c40738722001552618518279e9f0ef62e5.patch]
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+---
+ options.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/options.c b/options.c
+index ee419c6..c716994 100644
+--- a/options.c
++++ b/options.c
+@@ -43,6 +43,12 @@ int opt_parse_request(char *data, int data_size, struct tftp_opt *options)
+ struct tftphdr *tftp_data = (struct tftphdr *)data;
+ size_t size = data_size - sizeof(tftp_data->th_opcode);
+
++ /* sanity check - requests always end in a null byte,
++ * check to prevent argz_next from reading past the end of
++ * data, as it doesn't do bounds checks */
++ if (data_size == 0 || data[data_size-1] != '\0')
++ return ERR;
++
+ /* read filename */
+ entry = argz_next(tftp_data->th_stuff, size, entry);
+ if (!entry)
+@@ -79,6 +85,12 @@ int opt_parse_options(char *data, int data_size, struct tftp_opt *options)
+ struct tftphdr *tftp_data = (struct tftphdr *)data;
+ size_t size = data_size - sizeof(tftp_data->th_opcode);
+
++ /* sanity check - options always end in a null byte,
++ * check to prevent argz_next from reading past the end of
++ * data, as it doesn't do bounds checks */
++ if (data_size == 0 || data[data_size-1] != '\0')
++ return ERR;
++
+ while ((entry = argz_next(tftp_data->th_stuff, size, entry)))
+ {
+ tmp = entry;
+--
+2.17.1
+
diff --git a/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb b/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb
index ff9084dbf6..32b776e578 100644
--- a/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb
+++ b/meta-networking/recipes-daemons/atftp/atftp_0.7.2.bb
@@ -6,9 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
SRCREV = "52b71f0831dcbde508bd3a961d84abb80a62480f"
-SRC_URI = "git://git.code.sf.net/p/atftp/code \
+SRC_URI = "git://git.code.sf.net/p/atftp/code;branch=master \
file://atftpd.init \
file://atftpd.service \
+ file://0001-options.c-Proper-fix-for-the-read-past-end-of-array.patch \
+ file://0001-fix-buffer-overflow-in-atftpd.patch \
"
SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \
file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2022-24407.patch b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2022-24407.patch
new file mode 100644
index 0000000000..0ddea03c69
--- /dev/null
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/CVE-2022-24407.patch
@@ -0,0 +1,83 @@
+From 906b863c5308567086c6437ce17335b1922a78d1 Mon Sep 17 00:00:00 2001
+From: Hitendra Prajapati <hprajapati@mvista.com>
+Date: Wed, 15 Jun 2022 10:44:50 +0530
+Subject: [PATCH] CVE-2022-24407
+
+Upstream-Status: Backport [https://github.com/cyrusimap/cyrus-sasl/commit/9eff746c9daecbcc0041b09a5a51ba30738cdcbc]
+CVE: CVE-2022-24407
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ plugins/sql.c | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/sql.c b/plugins/sql.c
+index 95f5f707..5d20759b 100644
+--- a/plugins/sql.c
++++ b/plugins/sql.c
+@@ -1150,6 +1150,7 @@ static int sql_auxprop_store(void *glob_context,
+ char *statement = NULL;
+ char *escap_userid = NULL;
+ char *escap_realm = NULL;
++ char *escap_passwd = NULL;
+ const char *cmd;
+
+ sql_settings_t *settings;
+@@ -1221,6 +1222,11 @@ static int sql_auxprop_store(void *glob_context,
+ "Unable to begin transaction\n");
+ }
+ for (cur = to_store; ret == SASL_OK && cur->name; cur++) {
++ /* Free the buffer, current content is from previous loop. */
++ if (escap_passwd) {
++ sparams->utils->free(escap_passwd);
++ escap_passwd = NULL;
++ }
+
+ if (cur->name[0] == '*') {
+ continue;
+@@ -1242,19 +1248,32 @@ static int sql_auxprop_store(void *glob_context,
+ }
+ sparams->utils->free(statement);
+
++ if (cur->values[0]) {
++ escap_passwd = (char *)sparams->utils->malloc(strlen(cur->values[0])*2+1);
++ if (!escap_passwd) {
++ ret = SASL_NOMEM;
++ break;
++ }
++ settings->sql_engine->sql_escape_str(escap_passwd, cur->values[0]);
++ }
++
+ /* create a statement that we will use */
+ statement = sql_create_statement(cmd, cur->name, escap_userid,
+ escap_realm,
+- cur->values && cur->values[0] ?
+- cur->values[0] : SQL_NULL_VALUE,
++ escap_passwd ?
++ escap_passwd : SQL_NULL_VALUE,
+ sparams->utils);
++ if (!statement) {
++ ret = SASL_NOMEM;
++ break;
++ }
+
+ {
+ char *log_statement =
+ sql_create_statement(cmd, cur->name,
+ escap_userid,
+ escap_realm,
+- cur->values && cur->values[0] ?
++ escap_passwd ?
+ "<omitted>" : SQL_NULL_VALUE,
+ sparams->utils);
+ sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
+@@ -1287,6 +1306,7 @@ static int sql_auxprop_store(void *glob_context,
+ done:
+ if (escap_userid) sparams->utils->free(escap_userid);
+ if (escap_realm) sparams->utils->free(escap_realm);
++ if (escap_passwd) sparams->utils->free(escap_passwd);
+ if (conn) settings->sql_engine->sql_close(conn);
+ if (userid) sparams->utils->free(userid);
+ if (realm) sparams->utils->free(realm);
+--
+2.25.1
+
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
index d3983eb1ae..3e7056d67d 100644
--- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
SRCREV = "e41cfb986c1b1935770de554872247453fdbb079"
-SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \
+SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https;branch=master \
file://avoid-to-call-AC_TRY_RUN.patch \
file://Fix-hardcoded-libdir.patch \
file://debian_patches_0014_avoid_pic_overwrite.diff \
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \
file://0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch \
file://0001-makeinit.sh-fix-parallel-build-issue.patch \
file://CVE-2019-19906.patch \
+ file://CVE-2022-24407.patch \
"
UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives"
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb
index 4a9cf9db40..7cf8cfa94c 100644
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb
+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.1.3.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRCREV ?= "34e3ffb194f6fa3028c0eb2ff57e7db2d1026771"
-SRC_URI = "git://github.com/open-iscsi/open-iscsi \
+SRC_URI = "git://github.com/open-iscsi/open-iscsi;branch=master;protocol=https \
file://0001-Makefile-Do-not-set-Werror.patch \
file://initd.debian \
file://99_iscsi-initiator-utils \
diff --git a/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb b/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb
index 61d656b7ca..d5296f6a96 100644
--- a/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb
+++ b/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher_2.0.1.bb
@@ -13,7 +13,7 @@ RDEPENDS_${PN} = "python3-pygobject python3-dbus"
REQUIRED_DISTRO_FEATURES = "systemd"
SRCREV = "333ef1ed1d7c7c17264fcf7629e5c2f78ab4112c"
-SRC_URI = "git://gitlab.com/craftyguy/networkd-dispatcher;protocol=https"
+SRC_URI = "git://gitlab.com/craftyguy/networkd-dispatcher;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-daemons/postfix/files/0001-fix-build-with-glibc-2.34.patch b/meta-networking/recipes-daemons/postfix/files/0001-fix-build-with-glibc-2.34.patch
new file mode 100644
index 0000000000..b6ec8c70df
--- /dev/null
+++ b/meta-networking/recipes-daemons/postfix/files/0001-fix-build-with-glibc-2.34.patch
@@ -0,0 +1,46 @@
+From 1f25dae3f38548bad32c5a3ebee4c07938d8c1b8 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 30 Dec 2021 10:35:57 +0800
+Subject: [PATCH] fix build with glibc 2.34
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The closefrom() function which is introduced in glibc 2.34 conflicts
+with the one provided by postfix.
+
+Fixes:
+| In file included from attr_clnt.c:88:
+| /usr/include/unistd.h:363:13: error: conflicting types for ‘closefrom’; have ‘void(int)’
+| 363 | extern void closefrom (int __lowfd) __THROW;
+| | ^~~~~~~~~
+| In file included from attr_clnt.c:87:
+| ./sys_defs.h:1506:12: note: previous declaration of ‘closefrom’ with type ‘int(int)’
+| 1506 | extern int closefrom(int);
+| | ^~~~~~~~~
+
+Upstream-Status: Backport
+[https://github.com/vdukhovni/postfix/commit/3d966d3bd5f95b2c918aefb864549fa9f0442e24]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/util/sys_defs.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
+index 39daa16..5de5855 100644
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -827,6 +827,9 @@ extern int initgroups(const char *, int);
+ #define HAVE_POSIX_GETPW_R
+ #endif
+ #endif
++#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34)
++#define HAS_CLOSEFROM
++#endif
+
+ #endif
+
+--
+2.17.1
+
diff --git a/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb b/meta-networking/recipes-daemons/postfix/postfix_3.4.27.bb
index db5b41bfbd..2612e12be4 100644
--- a/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb
+++ b/meta-networking/recipes-daemons/postfix/postfix_3.4.27.bb
@@ -13,6 +13,7 @@ SRC_URI += "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${P
file://postfix-install.patch \
file://icu-config.patch \
file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \
+ file://0001-fix-build-with-glibc-2.34.patch \
"
-SRC_URI[sha256sum] = "18555183ae8b52a9e76067799279c86f9f2770cdef3836deb8462ee0a0855dec"
-UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz"
+SRC_URI[sha256sum] = "5f71658546d9b65863249dec3a189d084ea0596e23dc4613c579ad3ae75b10d2"
+UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.4(\.\d+)+).tar.gz"
diff --git a/meta-networking/recipes-daemons/proftpd/files/CVE-2021-46854.patch b/meta-networking/recipes-daemons/proftpd/files/CVE-2021-46854.patch
new file mode 100644
index 0000000000..712d5db07d
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/CVE-2021-46854.patch
@@ -0,0 +1,51 @@
+From ed31fe2cbd5b8b1148b467f84f7acea66fa43bb8 Mon Sep 17 00:00:00 2001
+From: Chris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
+Date: Tue, 3 Aug 2021 21:53:28 +0200
+Subject: [PATCH] CVE-2021-46854
+
+mod_radius: copy _only_ the password
+
+Upstream-Status: Backport [https://github.com/proftpd/proftpd/commit/10a227b4d50e0a2cd2faf87926f58d865da44e43]
+CVE: CVE-2021-46854
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ contrib/mod_radius.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/contrib/mod_radius.c b/contrib/mod_radius.c
+index b56cdfe..f234dd5 100644
+--- a/contrib/mod_radius.c
++++ b/contrib/mod_radius.c
+@@ -2319,21 +2319,26 @@ static void radius_add_passwd(radius_packet_t *packet, unsigned char type,
+
+ pwlen = strlen((const char *) passwd);
+
++ /* Clear the buffers. */
++ memset(pwhash, '\0', sizeof(pwhash));
++
+ if (pwlen == 0) {
+ pwlen = RADIUS_PASSWD_LEN;
+
+ } if ((pwlen & (RADIUS_PASSWD_LEN - 1)) != 0) {
++ /* pwlen is not a multiple of RADIUS_PASSWD_LEN, need to prepare a proper buffer */
++ memcpy(pwhash, passwd, pwlen);
+
+ /* Round up the length. */
+ pwlen += (RADIUS_PASSWD_LEN - 1);
+
+ /* Truncate the length, as necessary. */
+ pwlen &= ~(RADIUS_PASSWD_LEN - 1);
++ } else {
++ /* pwlen is a multiple of RADIUS_PASSWD_LEN, we can just use it. */
++ memcpy(pwhash, passwd, pwlen);
+ }
+
+- /* Clear the buffers. */
+- memset(pwhash, '\0', sizeof(pwhash));
+- memcpy(pwhash, passwd, pwlen);
+
+ /* Find the password attribute. */
+ attrib = radius_get_attrib(packet, RADIUS_PASSWORD);
+--
+2.25.1
+
diff --git a/meta-networking/recipes-daemons/proftpd/files/CVE-2023-51713.patch b/meta-networking/recipes-daemons/proftpd/files/CVE-2023-51713.patch
new file mode 100644
index 0000000000..12f6948075
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/CVE-2023-51713.patch
@@ -0,0 +1,278 @@
+From 97bbe68363ccf2de0c07f67170ec64a8b4d62592 Mon Sep 17 00:00:00 2001
+From: TJ Saunders <tj@castaglia.org>
+Date: Sun, 6 Aug 2023 13:16:26 -0700
+Subject: [PATCH] Issue #1683: Avoid an edge case when handling unexpectedly
+ formatted input text from client, caused by quote/backslash semantics, by
+ skipping those semantics.
+
+Upstream-Status: Backport [https://github.com/proftpd/proftpd/commit/97bbe68363ccf2de0c07f67170ec64a8b4d62592]
+CVE: CVE-2023-51713
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ include/str.h | 3 ++-
+ src/main.c | 35 +++++++++++++++++++++++++++++-----
+ src/str.c | 22 +++++++++++++---------
+ tests/api/str.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ 4 files changed, 94 insertions(+), 16 deletions(-)
+
+diff --git a/include/str.h b/include/str.h
+index 316a32a..049a1b2 100644
+--- a/include/str.h
++++ b/include/str.h
+@@ -1,6 +1,6 @@
+ /*
+ * ProFTPD - FTP server daemon
+- * Copyright (c) 2008-2017 The ProFTPD Project team
++ * Copyright (c) 2008-2023 The ProFTPD Project team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -121,6 +121,7 @@ const char *pr_gid2str(pool *, gid_t);
+ #define PR_STR_FL_PRESERVE_COMMENTS 0x0001
+ #define PR_STR_FL_PRESERVE_WHITESPACE 0x0002
+ #define PR_STR_FL_IGNORE_CASE 0x0004
++#define PR_STR_FL_IGNORE_QUOTES 0x0008
+
+ char *pr_str_get_token(char **, char *);
+ char *pr_str_get_token2(char **, char *, size_t *);
+diff --git a/src/main.c b/src/main.c
+index 1ead27f..01b1ef8 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -787,8 +787,24 @@ static cmd_rec *make_ftp_cmd(pool *p, char *buf, size_t buflen, int flags) {
+ return NULL;
+ }
+
++ /* By default, pr_str_get_word will handle quotes and backslashes for
++ * escaping characters. This can produce words which are shorter, use
++ * fewer bytes than the corresponding input buffer.
++ *
++ * In this particular situation, we use the length of this initial word
++ * for determining the length of the remaining buffer bytes, assumed to
++ * contain the FTP command arguments. If this initial word is thus
++ * unexpectedly "shorter", due to nonconformant FTP text, it can lead
++ * the subsequent buffer scan, looking for CRNUL sequencees, to access
++ * unexpected memory addresses (Issue #1683).
++ *
++ * Thus for this particular situation, we tell the function to ignore/skip
++ * such quote/backslash semantics, and treat them as any other character
++ * using the IGNORE_QUOTES flag.
++ */
++
+ ptr = buf;
+- wrd = pr_str_get_word(&ptr, str_flags);
++ wrd = pr_str_get_word(&ptr, str_flags|PR_STR_FL_IGNORE_QUOTES);
+ if (wrd == NULL) {
+ /* Nothing there...bail out. */
+ pr_trace_msg("ctrl", 5, "command '%s' is empty, ignoring", buf);
+@@ -796,6 +812,11 @@ static cmd_rec *make_ftp_cmd(pool *p, char *buf, size_t buflen, int flags) {
+ return NULL;
+ }
+
++ /* Note that this first word is the FTP command. This is why we make
++ * use of the ptr buffer, which advances through the input buffer as
++ * we read words from the buffer.
++ */
++
+ subpool = make_sub_pool(p);
+ pr_pool_tag(subpool, "make_ftp_cmd pool");
+ cmd = pcalloc(subpool, sizeof(cmd_rec));
+@@ -822,6 +843,7 @@ static cmd_rec *make_ftp_cmd(pool *p, char *buf, size_t buflen, int flags) {
+ arg_len = buflen - strlen(wrd);
+ arg = pcalloc(cmd->pool, arg_len + 1);
+
++ /* Remember that ptr here is advanced past the first word. */
+ for (i = 0, j = 0; i < arg_len; i++) {
+ pr_signals_handle();
+ if (i > 1 &&
+@@ -830,15 +852,13 @@ static cmd_rec *make_ftp_cmd(pool *p, char *buf, size_t buflen, int flags) {
+
+ /* Strip out the NUL by simply not copying it into the new buffer. */
+ have_crnul = TRUE;
+-
++
+ } else {
+ arg[j++] = ptr[i];
+ }
+ }
+
+- cmd->arg = arg;
+-
+- if (have_crnul) {
++ if (have_crnul == TRUE) {
+ char *dup_arg;
+
+ /* Now make a copy of the stripped argument; this is what we need to
+@@ -848,6 +868,11 @@ static cmd_rec *make_ftp_cmd(pool *p, char *buf, size_t buflen, int flags) {
+ ptr = dup_arg;
+ }
+
++ cmd->arg = arg;
++
++ /* Now we can read the remamining words, as command arguments, from the
++ * input buffer.
++ */
+ while ((wrd = pr_str_get_word(&ptr, str_flags)) != NULL) {
+ pr_signals_handle();
+ *((char **) push_array(tarr)) = pstrdup(cmd->pool, wrd);
+diff --git a/src/str.c b/src/str.c
+index eeed096..04188ce 100644
+--- a/src/str.c
++++ b/src/str.c
+@@ -1,6 +1,6 @@
+ /*
+ * ProFTPD - FTP server daemon
+- * Copyright (c) 2008-2017 The ProFTPD Project team
++ * Copyright (c) 2008-2023 The ProFTPD Project team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -1209,7 +1209,7 @@ int pr_str_get_nbytes(const char *str, const char *units, off_t *nbytes) {
+
+ char *pr_str_get_word(char **cp, int flags) {
+ char *res, *dst;
+- char quote_mode = 0;
++ int quote_mode = FALSE;
+
+ if (cp == NULL ||
+ !*cp ||
+@@ -1238,24 +1238,28 @@ char *pr_str_get_word(char **cp, int flags) {
+ }
+ }
+
+- if (**cp == '\"') {
+- quote_mode++;
+- (*cp)++;
++ if (!(flags & PR_STR_FL_IGNORE_QUOTES)) {
++ if (**cp == '\"') {
++ quote_mode = TRUE;
++ (*cp)++;
++ }
+ }
+
+ while (**cp && (quote_mode ? (**cp != '\"') : !PR_ISSPACE(**cp))) {
+ pr_signals_handle();
+
+- if (**cp == '\\' && quote_mode) {
+-
++ if (**cp == '\\' &&
++ quote_mode == TRUE) {
+ /* Escaped char */
+ if (*((*cp)+1)) {
+- *dst = *(++(*cp));
++ *dst++ = *(++(*cp));
++ (*cp)++;
++ continue;
+ }
+ }
+
+ *dst++ = **cp;
+- ++(*cp);
++ (*cp)++;
+ }
+
+ if (**cp) {
+diff --git a/tests/api/str.c b/tests/api/str.c
+index 7c6e110..77fda8f 100644
+--- a/tests/api/str.c
++++ b/tests/api/str.c
+@@ -1,6 +1,6 @@
+ /*
+ * ProFTPD - FTP server testsuite
+- * Copyright (c) 2008-2017 The ProFTPD Project team
++ * Copyright (c) 2008-2023 The ProFTPD Project team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -695,19 +695,23 @@ END_TEST
+ START_TEST (get_word_test) {
+ char *ok, *res, *str;
+
++ mark_point();
+ res = pr_str_get_word(NULL, 0);
+ fail_unless(res == NULL, "Failed to handle null arguments");
+ fail_unless(errno == EINVAL, "Failed to set errno to EINVAL");
+
++ mark_point();
+ str = NULL;
+ res = pr_str_get_word(&str, 0);
+ fail_unless(res == NULL, "Failed to handle null str argument");
+ fail_unless(errno == EINVAL, "Failed to set errno to EINVAL");
+
++ mark_point();
+ str = pstrdup(p, " ");
+ res = pr_str_get_word(&str, 0);
+ fail_unless(res == NULL, "Failed to handle whitespace argument");
+
++ mark_point();
+ str = pstrdup(p, " foo");
+ res = pr_str_get_word(&str, PR_STR_FL_PRESERVE_WHITESPACE);
+ fail_unless(res != NULL, "Failed to handle whitespace argument: %s",
+@@ -723,6 +727,7 @@ START_TEST (get_word_test) {
+ ok = "foo";
+ fail_unless(strcmp(res, ok) == 0, "Expected '%s', got '%s'", ok, res);
+
++ mark_point();
+ str = pstrdup(p, " # foo");
+ res = pr_str_get_word(&str, 0);
+ fail_unless(res == NULL, "Failed to handle commented argument");
+@@ -742,6 +747,8 @@ START_TEST (get_word_test) {
+ fail_unless(strcmp(res, ok) == 0, "Expected '%s', got '%s'", ok, res);
+
+ /* Test multiple embedded quotes. */
++
++ mark_point();
+ str = pstrdup(p, "foo \"bar baz\" qux \"quz norf\"");
+ res = pr_str_get_word(&str, 0);
+ fail_unless(res != NULL, "Failed to handle quoted argument: %s",
+@@ -770,6 +777,47 @@ START_TEST (get_word_test) {
+
+ ok = "quz norf";
+ fail_unless(strcmp(res, ok) == 0, "Expected '%s', got '%s'", ok, res);
++
++
++ /* Test embedded quotes with backslashes (Issue #1683). */
++ mark_point();
++
++ str = pstrdup(p, "\"\\\\SYST\"");
++ res = pr_str_get_word(&str, 0);
++ fail_unless(res != NULL, "Failed to handle quoted argument: %s",
++ strerror(errno));
++
++ ok = "\\SYST";
++ fail_unless(strcmp(res, ok) == 0, "Expected '%s', got '%s'", ok, res);
++
++ mark_point();
++ str = pstrdup(p, "\"\"\\\\SYST");
++ res = pr_str_get_word(&str, 0);
++ fail_unless(res != NULL, "Failed to handle quoted argument: %s",
++ strerror(errno));
++
++ /* Note that pr_str_get_word() is intended to be called multiple times
++ * on an advancing buffer, effectively tokenizing the buffer. This is
++ * why the function does NOT decrement its quote mode.
++ */
++ ok = "";
++ fail_unless(strcmp(res, ok) == 0, "Expected '%s', got '%s'", ok, res);
++
++ /* Now do the same tests with the IGNORE_QUOTES flag */
++ mark_point();
++
++ str = ok = pstrdup(p, "\"\\\\SYST\"");
++ res = pr_str_get_word(&str, PR_STR_FL_IGNORE_QUOTES);
++ fail_unless(res != NULL, "Failed to handle quoted argument: %s",
++ strerror(errno));
++ fail_unless(strcmp(res, ok) == 0, "Expected '%s', got '%s'", ok, res);
++
++ mark_point();
++ str = ok = pstrdup(p, "\"\"\\\\SYST");
++ res = pr_str_get_word(&str, PR_STR_FL_IGNORE_QUOTES);
++ fail_unless(res != NULL, "Failed to handle quoted argument: %s",
++ strerror(errno));
++ fail_unless(strcmp(res, ok) == 0, "Expected '%s', got '%s'", ok, res);
+ }
+ END_TEST
+
+--
+2.25.1
+
diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb
index 1e4697a633..aa1f9e4ef9 100644
--- a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb
+++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.6.bb
@@ -12,6 +12,8 @@ SRC_URI = "ftp://ftp.proftpd.org/distrib/source/${BPN}-${PV}.tar.gz \
file://contrib.patch \
file://build_fixup.patch \
file://proftpd.service \
+ file://CVE-2021-46854.patch \
+ file://CVE-2023-51713.patch \
"
SRC_URI[md5sum] = "13270911c42aac842435f18205546a1b"
SRC_URI[sha256sum] = "91ef74b143495d5ff97c4d4770c6804072a8c8eb1ad1ecc8cc541b40e152ecaf"
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2023-46728.patch b/meta-networking/recipes-daemons/squid/files/CVE-2023-46728.patch
new file mode 100644
index 0000000000..b11721041e
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2023-46728.patch
@@ -0,0 +1,608 @@
+Partial backport of:
+
+From 6ea12e8fb590ac6959e9356a81aa3370576568c3 Mon Sep 17 00:00:00 2001
+From: Alex Rousskov <rousskov@measurement-factory.com>
+Date: Tue, 26 Jul 2022 15:05:54 +0000
+Subject: [PATCH] Remove support for Gopher protocol (#1092)
+
+Gopher code quality remains too low for production use in most
+environments. The code is a persistent source of vulnerabilities and
+fixing it requires significant effort. We should not be spending scarce
+Project resources on improving that code, especially given the lack of
+strong demand for Gopher support.
+
+With this change, Gopher requests will be handled like any other request
+with an unknown (to Squid) protocol. For example, HTTP requests with
+Gopher URI scheme result in ERR_UNSUP_REQ.
+
+Default Squid configuration still considers TCP port 70 "safe". The
+corresponding Safe_ports ACL rule has not been removed for consistency
+sake: We consider WAIS port safe even though Squid refuses to forward
+WAIS requests:
+
+ acl Safe_ports port 70 # gopher
+ acl Safe_ports port 210 # wais
+
+Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/squid/tree/debian/patches/CVE-2023-46728.patch?h=ubuntu/focal-security&id=9ccd217ca9428c9a6597e9310a99552026b245fa
+Upstream commit https://github.com/squid-cache/squid/commit/6ea12e8fb590ac6959e9356a81aa3370576568c3]
+CVE: CVE-2023-46728
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ doc/Programming-Guide/Groups.dox | 5 -
+ doc/debug-sections.txt | 1 -
+ doc/manuals/de.po | 2 +-
+ doc/manuals/en.po | 2 +-
+ doc/manuals/en_AU.po | 2 +-
+ doc/manuals/es.po | 2 +-
+ doc/manuals/fr.po | 2 +-
+ doc/manuals/it.po | 2 +-
+ errors/af.po | 6 +-
+ errors/az.po | 6 +-
+ errors/bg.po | 6 +-
+ errors/ca.po | 6 +-
+ errors/cs.po | 6 +-
+ errors/da.po | 6 +-
+ errors/de.po | 6 +-
+ errors/el.po | 4 +-
+ errors/en.po | 6 +-
+ errors/errorpage.css | 2 +-
+ errors/es-mx.po | 3 +-
+ errors/es.po | 4 +-
+ errors/et.po | 6 +-
+ errors/fi.po | 7 +-
+ errors/fr.po | 6 +-
+ errors/he.po | 6 +-
+ errors/hu.po | 6 +-
+ errors/hy.po | 6 +-
+ errors/it.po | 4 +-
+ errors/ja.po | 6 +-
+ errors/ko.po | 6 +-
+ errors/lt.po | 6 +-
+ errors/lv.po | 6 +-
+ errors/nl.po | 6 +-
+ errors/pl.po | 6 +-
+ errors/pt-br.po | 6 +-
+ errors/pt.po | 6 +-
+ errors/ro.po | 4 +-
+ errors/ru.po | 6 +-
+ errors/sk.po | 6 +-
+ errors/sl.po | 6 +-
+ errors/sr-latn.po | 4 +-
+ errors/sv.po | 6 +-
+ errors/templates/ERR_UNSUP_REQ | 2 +-
+ errors/tr.po | 6 +-
+ errors/uk.po | 6 +-
+ errors/vi.po | 4 +-
+ errors/zh-hans.po | 6 +-
+ errors/zh-hant.po | 7 +-
+ src/FwdState.cc | 5 -
+ src/HttpRequest.cc | 6 -
+ src/IoStats.h | 2 +-
+ src/Makefile.am | 8 -
+ src/adaptation/ecap/Host.cc | 1 -
+ src/adaptation/ecap/MessageRep.cc | 2 -
+ src/anyp/ProtocolType.h | 1 -
+ src/anyp/Uri.cc | 1 -
+ src/anyp/UriScheme.cc | 3 -
+ src/cf.data.pre | 5 +-
+ src/client_side_request.cc | 4 -
+ src/error/forward.h | 2 +-
+ src/gopher.cc | 993 -----------------------
+ src/gopher.h | 29 -
+ src/http/Message.h | 1 -
+ src/mgr/IoAction.cc | 3 -
+ src/mgr/IoAction.h | 2 -
+ src/squid.8.in | 2 +-
+ src/stat.cc | 19 -
+ src/tests/Stub.am | 1 -
+ src/tests/stub_gopher.cc | 17 -
+ test-suite/squidconf/regressions-3.4.0.1 | 1 -
+ 69 files changed, 88 insertions(+), 1251 deletions(-)
+ delete mode 100644 src/gopher.cc
+ delete mode 100644 src/gopher.h
+ delete mode 100644 src/tests/stub_gopher.cc
+
+--- a/src/FwdState.cc
++++ b/src/FwdState.cc
+@@ -28,7 +28,6 @@
+ #include "fde.h"
+ #include "FwdState.h"
+ #include "globals.h"
+-#include "gopher.h"
+ #include "hier_code.h"
+ #include "http.h"
+ #include "http/Stream.h"
+@@ -1004,10 +1003,6 @@ FwdState::dispatch()
+ httpStart(this);
+ break;
+
+- case AnyP::PROTO_GOPHER:
+- gopherStart(this);
+- break;
+-
+ case AnyP::PROTO_FTP:
+ if (request->flags.ftpNative)
+ Ftp::StartRelay(this);
+--- a/src/HttpRequest.cc
++++ b/src/HttpRequest.cc
+@@ -18,7 +18,6 @@
+ #include "Downloader.h"
+ #include "err_detail_type.h"
+ #include "globals.h"
+-#include "gopher.h"
+ #include "http.h"
+ #include "http/one/RequestParser.h"
+ #include "http/Stream.h"
+@@ -556,11 +555,6 @@ HttpRequest::maybeCacheable()
+ return false;
+ break;
+
+- case AnyP::PROTO_GOPHER:
+- if (!gopherCachable(this))
+- return false;
+- break;
+-
+ case AnyP::PROTO_CACHE_OBJECT:
+ return false;
+
+--- a/src/IoStats.h
++++ b/src/IoStats.h
+@@ -22,7 +22,7 @@ public:
+ int writes;
+ int write_hist[histSize];
+ }
+- Http, Ftp, Gopher;
++ Http, Ftp;
+ };
+
+ #endif /* SQUID_IOSTATS_H_ */
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -306,8 +306,6 @@ squid_SOURCES = \
+ FwdState.h \
+ Generic.h \
+ globals.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ helper.h \
+ hier_code.h \
+@@ -1259,8 +1257,6 @@ tests_testCacheManager_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ hier_code.h \
+ helper.cc \
+ $(HTCPSOURCE) \
+@@ -1678,8 +1674,6 @@ tests_testEvent_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -1914,8 +1908,6 @@ tests_testEventLoop_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -2145,8 +2137,6 @@ tests_test_http_range_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -2461,8 +2451,6 @@ tests_testHttpRequest_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -3307,8 +3295,6 @@ tests_testURL_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+--- a/src/adaptation/ecap/Host.cc
++++ b/src/adaptation/ecap/Host.cc
+@@ -49,7 +49,6 @@ Adaptation::Ecap::Host::Host()
+ libecap::protocolHttp.assignHostId(AnyP::PROTO_HTTP);
+ libecap::protocolHttps.assignHostId(AnyP::PROTO_HTTPS);
+ libecap::protocolFtp.assignHostId(AnyP::PROTO_FTP);
+- libecap::protocolGopher.assignHostId(AnyP::PROTO_GOPHER);
+ libecap::protocolWais.assignHostId(AnyP::PROTO_WAIS);
+ libecap::protocolUrn.assignHostId(AnyP::PROTO_URN);
+ libecap::protocolWhois.assignHostId(AnyP::PROTO_WHOIS);
+--- a/src/adaptation/ecap/MessageRep.cc
++++ b/src/adaptation/ecap/MessageRep.cc
+@@ -140,8 +140,6 @@ Adaptation::Ecap::FirstLineRep::protocol
+ return libecap::protocolHttps;
+ case AnyP::PROTO_FTP:
+ return libecap::protocolFtp;
+- case AnyP::PROTO_GOPHER:
+- return libecap::protocolGopher;
+ case AnyP::PROTO_WAIS:
+ return libecap::protocolWais;
+ case AnyP::PROTO_WHOIS:
+--- a/src/anyp/ProtocolType.h
++++ b/src/anyp/ProtocolType.h
+@@ -27,7 +27,6 @@ typedef enum {
+ PROTO_HTTPS,
+ PROTO_COAP,
+ PROTO_COAPS,
+- PROTO_GOPHER,
+ PROTO_WAIS,
+ PROTO_CACHE_OBJECT,
+ PROTO_ICP,
+--- a/src/anyp/Uri.cc
++++ b/src/anyp/Uri.cc
+@@ -852,8 +852,6 @@ urlCheckRequest(const HttpRequest * r)
+ if (r->method == Http::METHOD_PUT)
+ rc = 1;
+
+- case AnyP::PROTO_GOPHER:
+-
+ case AnyP::PROTO_WAIS:
+
+ case AnyP::PROTO_WHOIS:
+--- a/src/anyp/UriScheme.cc
++++ b/src/anyp/UriScheme.cc
+@@ -87,9 +87,6 @@ AnyP::UriScheme::defaultPort() const
+ // Assuming IANA policy of allocating same port for base and TLS protocol versions will occur.
+ return 5683;
+
+- case AnyP::PROTO_GOPHER:
+- return 70;
+-
+ case AnyP::PROTO_WAIS:
+ return 210;
+
+--- a/src/client_side_request.cc
++++ b/src/client_side_request.cc
+@@ -33,7 +33,6 @@
+ #include "fd.h"
+ #include "fde.h"
+ #include "format/Token.h"
+-#include "gopher.h"
+ #include "helper.h"
+ #include "helper/Reply.h"
+ #include "http.h"
+@@ -965,9 +964,6 @@ clientHierarchical(ClientHttpRequest * h
+ if (request->url.getScheme() == AnyP::PROTO_HTTP)
+ return method.respMaybeCacheable();
+
+- if (request->url.getScheme() == AnyP::PROTO_GOPHER)
+- return gopherCachable(request);
+-
+ if (request->url.getScheme() == AnyP::PROTO_CACHE_OBJECT)
+ return 0;
+
+--- a/src/err_type.h
++++ b/src/err_type.h
+@@ -65,7 +65,7 @@ typedef enum {
+ ERR_GATEWAY_FAILURE,
+
+ /* Special Cases */
+- ERR_DIR_LISTING, /* Display of remote directory (FTP, Gopher) */
++ ERR_DIR_LISTING, /* Display of remote directory (FTP) */
+ ERR_SQUID_SIGNATURE, /* not really an error */
+ ERR_SHUTTING_DOWN,
+ ERR_PROTOCOL_UNKNOWN,
+--- a/src/HttpMsg.h
++++ b/src/HttpMsg.h
+@@ -38,7 +38,6 @@ public:
+ srcFtp = 1 << (16 + 1), ///< ftp_port or FTP server
+ srcIcap = 1 << (16 + 2), ///< traditional ICAP service without encryption
+ srcEcap = 1 << (16 + 3), ///< eCAP service that uses insecure libraries/daemons
+- srcGopher = 1 << (16 + 14), ///< Gopher server
+ srcWhois = 1 << (16 + 15), ///< Whois server
+ srcUnsafe = 0xFFFF0000, ///< Unsafe sources mask
+ srcSafe = 0x0000FFFF ///< Safe sources mask
+--- a/src/mgr/IoAction.cc
++++ b/src/mgr/IoAction.cc
+@@ -35,9 +35,6 @@ Mgr::IoActionData::operator += (const Io
+ ftp_reads += stats.ftp_reads;
+ for (int i = 0; i < IoStats::histSize; ++i)
+ ftp_read_hist[i] += stats.ftp_read_hist[i];
+- gopher_reads += stats.gopher_reads;
+- for (int i = 0; i < IoStats::histSize; ++i)
+- gopher_read_hist[i] += stats.gopher_read_hist[i];
+
+ return *this;
+ }
+--- a/src/mgr/IoAction.h
++++ b/src/mgr/IoAction.h
+@@ -27,10 +27,8 @@ public:
+ public:
+ double http_reads;
+ double ftp_reads;
+- double gopher_reads;
+ double http_read_hist[IoStats::histSize];
+ double ftp_read_hist[IoStats::histSize];
+- double gopher_read_hist[IoStats::histSize];
+ };
+
+ /// implement aggregated 'io' action
+--- a/src/stat.cc
++++ b/src/stat.cc
+@@ -206,12 +206,6 @@ GetIoStats(Mgr::IoActionData& stats)
+ for (i = 0; i < IoStats::histSize; ++i) {
+ stats.ftp_read_hist[i] = IOStats.Ftp.read_hist[i];
+ }
+-
+- stats.gopher_reads = IOStats.Gopher.reads;
+-
+- for (i = 0; i < IoStats::histSize; ++i) {
+- stats.gopher_read_hist[i] = IOStats.Gopher.read_hist[i];
+- }
+ }
+
+ void
+@@ -245,19 +239,6 @@ DumpIoStats(Mgr::IoActionData& stats, St
+ }
+
+ storeAppendPrintf(sentry, "\n");
+- storeAppendPrintf(sentry, "Gopher I/O\n");
+- storeAppendPrintf(sentry, "number of reads: %.0f\n", stats.gopher_reads);
+- storeAppendPrintf(sentry, "Read Histogram:\n");
+-
+- for (i = 0; i < IoStats::histSize; ++i) {
+- storeAppendPrintf(sentry, "%5d-%5d: %9.0f %2.0f%%\n",
+- i ? (1 << (i - 1)) + 1 : 1,
+- 1 << i,
+- stats.gopher_read_hist[i],
+- Math::doublePercent(stats.gopher_read_hist[i], stats.gopher_reads));
+- }
+-
+- storeAppendPrintf(sentry, "\n");
+ }
+
+ static const char *
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -263,7 +263,7 @@ am__squid_SOURCES_DIST = AclRegs.cc Auth
+ ExternalACL.h ExternalACLEntry.cc ExternalACLEntry.h \
+ FadingCounter.h FadingCounter.cc fatal.h fatal.cc fd.h fd.cc \
+ fde.cc fde.h FileMap.h filemap.cc fqdncache.h fqdncache.cc \
+- FwdState.cc FwdState.h Generic.h globals.h gopher.h gopher.cc \
++ FwdState.cc FwdState.h Generic.h globals.h \
+ helper.cc helper.h hier_code.h HierarchyLogEntry.h htcp.cc \
+ htcp.h http.cc http.h HttpHeaderFieldStat.h HttpHdrCc.h \
+ HttpHdrCc.cc HttpHdrCc.cci HttpHdrRange.cc HttpHdrSc.cc \
+@@ -352,7 +352,7 @@ am_squid_OBJECTS = $(am__objects_1) Acce
+ EventLoop.$(OBJEXT) external_acl.$(OBJEXT) \
+ ExternalACLEntry.$(OBJEXT) FadingCounter.$(OBJEXT) \
+ fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
+- fqdncache.$(OBJEXT) FwdState.$(OBJEXT) gopher.$(OBJEXT) \
++ fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
+ helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
+ HttpHdrCc.$(OBJEXT) HttpHdrRange.$(OBJEXT) HttpHdrSc.$(OBJEXT) \
+ HttpHdrScTarget.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
+@@ -539,7 +539,7 @@ am__tests_testCacheManager_SOURCES_DIST
+ tests/stub_ETag.cc event.cc external_acl.cc \
+ ExternalACLEntry.cc fatal.h tests/stub_fatal.cc fd.h fd.cc \
+ fde.cc FileMap.h filemap.cc fqdncache.h fqdncache.cc \
+- FwdState.cc FwdState.h gopher.h gopher.cc hier_code.h \
++ FwdState.cc FwdState.h hier_code.h \
+ helper.cc htcp.cc htcp.h http.cc HttpBody.h HttpBody.cc \
+ HttpHeader.h HttpHeader.cc HttpHeaderFieldInfo.h \
+ HttpHeaderTools.h HttpHeaderTools.cc HttpHeaderFieldStat.h \
+@@ -594,7 +594,7 @@ am_tests_testCacheManager_OBJECTS = Acce
+ event.$(OBJEXT) external_acl.$(OBJEXT) \
+ ExternalACLEntry.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
+ fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
+- fqdncache.$(OBJEXT) FwdState.$(OBJEXT) gopher.$(OBJEXT) \
++ fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
+ helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
+ HttpBody.$(OBJEXT) HttpHeader.$(OBJEXT) \
+ HttpHeaderTools.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+@@ -838,7 +838,7 @@ am__tests_testEvent_SOURCES_DIST = Acces
+ EventLoop.h EventLoop.cc external_acl.cc ExternalACLEntry.cc \
+ FadingCounter.cc fatal.h tests/stub_fatal.cc fd.h fd.cc fde.cc \
+ FileMap.h filemap.cc fqdncache.h fqdncache.cc FwdState.cc \
+- FwdState.h gopher.h gopher.cc helper.cc hier_code.h htcp.cc \
++ FwdState.h helper.cc hier_code.h htcp.cc \
+ htcp.h http.cc HttpBody.h HttpBody.cc \
+ tests/stub_HttpControlMsg.cc HttpHeader.h HttpHeader.cc \
+ HttpHeaderFieldInfo.h HttpHeaderTools.h HttpHeaderTools.cc \
+@@ -891,7 +891,7 @@ am_tests_testEvent_OBJECTS = AccessLogEn
+ external_acl.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
+ FadingCounter.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
+ fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
+- fqdncache.$(OBJEXT) FwdState.$(OBJEXT) gopher.$(OBJEXT) \
++ fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
+ helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
+ HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
+ HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
+@@ -975,8 +975,8 @@ am__tests_testEventLoop_SOURCES_DIST = A
+ tests/stub_ETag.cc EventLoop.h EventLoop.cc event.cc \
+ external_acl.cc ExternalACLEntry.cc FadingCounter.cc fatal.h \
+ tests/stub_fatal.cc fd.h fd.cc fde.cc FileMap.h filemap.cc \
+- fqdncache.h fqdncache.cc FwdState.cc FwdState.h gopher.h \
+- gopher.cc helper.cc hier_code.h htcp.cc htcp.h http.cc \
++ fqdncache.h fqdncache.cc FwdState.cc FwdState.h \
++ helper.cc hier_code.h htcp.cc htcp.h http.cc \
+ HttpBody.h HttpBody.cc tests/stub_HttpControlMsg.cc \
+ HttpHeader.h HttpHeader.cc HttpHeaderFieldInfo.h \
+ HttpHeaderTools.h HttpHeaderTools.cc HttpHeaderFieldStat.h \
+@@ -1029,7 +1029,7 @@ am_tests_testEventLoop_OBJECTS = AccessL
+ external_acl.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
+ FadingCounter.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
+ fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
+- fqdncache.$(OBJEXT) FwdState.$(OBJEXT) gopher.$(OBJEXT) \
++ fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
+ helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
+ HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
+ HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
+@@ -1187,7 +1187,7 @@ am__tests_testHttpRequest_SOURCES_DIST =
+ fs_io.cc dlink.h dlink.cc dns_internal.cc errorpage.cc \
+ tests/stub_ETag.cc external_acl.cc ExternalACLEntry.cc fatal.h \
+ tests/stub_fatal.cc fd.h fd.cc fde.cc fqdncache.h fqdncache.cc \
+- FwdState.cc FwdState.h gopher.h gopher.cc helper.cc \
++ FwdState.cc FwdState.h helper.cc \
+ hier_code.h htcp.cc htcp.h http.cc HttpBody.h HttpBody.cc \
+ tests/stub_HttpControlMsg.cc HttpHeader.h HttpHeader.cc \
+ HttpHeaderFieldInfo.h HttpHeaderTools.h HttpHeaderTools.cc \
+@@ -1243,7 +1243,7 @@ am_tests_testHttpRequest_OBJECTS = Acces
+ $(am__objects_4) errorpage.$(OBJEXT) tests/stub_ETag.$(OBJEXT) \
+ external_acl.$(OBJEXT) ExternalACLEntry.$(OBJEXT) \
+ tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
+- fqdncache.$(OBJEXT) FwdState.$(OBJEXT) gopher.$(OBJEXT) \
++ fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
+ helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
+ HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
+ HttpHeader.$(OBJEXT) HttpHeaderTools.$(OBJEXT) \
+@@ -1670,8 +1670,8 @@ am__tests_testURL_SOURCES_DIST = AccessL
+ fs_io.cc dlink.h dlink.cc dns_internal.cc errorpage.cc ETag.cc \
+ event.cc external_acl.cc ExternalACLEntry.cc fatal.h \
+ tests/stub_fatal.cc fd.h fd.cc fde.cc FileMap.h filemap.cc \
+- fqdncache.h fqdncache.cc FwdState.cc FwdState.h gopher.h \
+- gopher.cc helper.cc hier_code.h htcp.cc htcp.h http.cc \
++ fqdncache.h fqdncache.cc FwdState.cc FwdState.h \
++ helper.cc hier_code.h htcp.cc htcp.h http.cc \
+ HttpBody.h HttpBody.cc tests/stub_HttpControlMsg.cc \
+ HttpHeaderFieldStat.h HttpHdrCc.h HttpHdrCc.cc HttpHdrCc.cci \
+ HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
+@@ -1725,7 +1725,7 @@ am_tests_testURL_OBJECTS = AccessLogEntr
+ event.$(OBJEXT) external_acl.$(OBJEXT) \
+ ExternalACLEntry.$(OBJEXT) tests/stub_fatal.$(OBJEXT) \
+ fd.$(OBJEXT) fde.$(OBJEXT) filemap.$(OBJEXT) \
+- fqdncache.$(OBJEXT) FwdState.$(OBJEXT) gopher.$(OBJEXT) \
++ fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
+ helper.$(OBJEXT) $(am__objects_5) http.$(OBJEXT) \
+ HttpBody.$(OBJEXT) tests/stub_HttpControlMsg.$(OBJEXT) \
+ HttpHdrCc.$(OBJEXT) HttpHdrContRange.$(OBJEXT) \
+@@ -1925,8 +1925,8 @@ am__tests_test_http_range_SOURCES_DIST =
+ dns_internal.cc errorpage.cc tests/stub_ETag.cc event.cc \
+ FadingCounter.cc fatal.h tests/stub_libauth.cc \
+ tests/stub_fatal.cc fd.h fd.cc fde.cc FileMap.h filemap.cc \
+- fqdncache.h fqdncache.cc FwdState.cc FwdState.h gopher.h \
+- gopher.cc helper.cc hier_code.h htcp.cc htcp.h http.cc \
++ fqdncache.h fqdncache.cc FwdState.cc FwdState.h \
++ helper.cc hier_code.h htcp.cc htcp.h http.cc \
+ HttpBody.h HttpBody.cc tests/stub_HttpControlMsg.cc \
+ HttpHeaderFieldStat.h HttpHdrCc.h HttpHdrCc.cc HttpHdrCc.cci \
+ HttpHdrContRange.cc HttpHdrRange.cc HttpHdrSc.cc \
+@@ -1979,7 +1979,7 @@ am_tests_test_http_range_OBJECTS = Acces
+ FadingCounter.$(OBJEXT) tests/stub_libauth.$(OBJEXT) \
+ tests/stub_fatal.$(OBJEXT) fd.$(OBJEXT) fde.$(OBJEXT) \
+ filemap.$(OBJEXT) fqdncache.$(OBJEXT) FwdState.$(OBJEXT) \
+- gopher.$(OBJEXT) helper.$(OBJEXT) $(am__objects_5) \
++ helper.$(OBJEXT) $(am__objects_5) \
+ http.$(OBJEXT) HttpBody.$(OBJEXT) \
+ tests/stub_HttpControlMsg.$(OBJEXT) HttpHdrCc.$(OBJEXT) \
+ HttpHdrContRange.$(OBJEXT) HttpHdrRange.$(OBJEXT) \
+@@ -2131,7 +2131,7 @@ am__depfiles_remade = ./$(DEPDIR)/Access
+ ./$(DEPDIR)/external_acl.Po ./$(DEPDIR)/fatal.Po \
+ ./$(DEPDIR)/fd.Po ./$(DEPDIR)/fde.Po ./$(DEPDIR)/filemap.Po \
+ ./$(DEPDIR)/fqdncache.Po ./$(DEPDIR)/fs_io.Po \
+- ./$(DEPDIR)/globals.Po ./$(DEPDIR)/gopher.Po \
++ ./$(DEPDIR)/globals.Po \
+ ./$(DEPDIR)/helper.Po ./$(DEPDIR)/hier_code.Po \
+ ./$(DEPDIR)/htcp.Po ./$(DEPDIR)/http.Po \
+ ./$(DEPDIR)/icp_opcode.Po ./$(DEPDIR)/icp_v2.Po \
+@@ -3043,7 +3043,7 @@ squid_SOURCES = $(ACL_REGISTRATION_SOURC
+ ExternalACL.h ExternalACLEntry.cc ExternalACLEntry.h \
+ FadingCounter.h FadingCounter.cc fatal.h fatal.cc fd.h fd.cc \
+ fde.cc fde.h FileMap.h filemap.cc fqdncache.h fqdncache.cc \
+- FwdState.cc FwdState.h Generic.h globals.h gopher.h gopher.cc \
++ FwdState.cc FwdState.h Generic.h globals.h \
+ helper.cc helper.h hier_code.h HierarchyLogEntry.h \
+ $(HTCPSOURCE) http.cc http.h HttpHeaderFieldStat.h HttpHdrCc.h \
+ HttpHdrCc.cc HttpHdrCc.cci HttpHdrRange.cc HttpHdrSc.cc \
+@@ -3708,8 +3708,6 @@ tests_testCacheManager_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ hier_code.h \
+ helper.cc \
+ $(HTCPSOURCE) \
+@@ -4134,8 +4132,6 @@ tests_testEvent_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -4371,8 +4367,6 @@ tests_testEventLoop_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -4604,8 +4598,6 @@ tests_test_http_range_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -4924,8 +4916,6 @@ tests_testHttpRequest_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -5777,8 +5767,6 @@ tests_testURL_SOURCES = \
+ fqdncache.cc \
+ FwdState.cc \
+ FwdState.h \
+- gopher.h \
+- gopher.cc \
+ helper.cc \
+ hier_code.h \
+ $(HTCPSOURCE) \
+@@ -6823,7 +6811,6 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fqdncache.Po@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs_io.Po@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@ # am--include-marker
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gopher.Po@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper.Po@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hier_code.Po@am__quote@ # am--include-marker
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htcp.Po@am__quote@ # am--include-marker
+@@ -7804,7 +7791,6 @@ distclean: distclean-recursive
+ -rm -f ./$(DEPDIR)/fqdncache.Po
+ -rm -f ./$(DEPDIR)/fs_io.Po
+ -rm -f ./$(DEPDIR)/globals.Po
+- -rm -f ./$(DEPDIR)/gopher.Po
+ -rm -f ./$(DEPDIR)/helper.Po
+ -rm -f ./$(DEPDIR)/hier_code.Po
+ -rm -f ./$(DEPDIR)/htcp.Po
+@@ -8129,7 +8115,6 @@ maintainer-clean: maintainer-clean-recur
+ -rm -f ./$(DEPDIR)/fqdncache.Po
+ -rm -f ./$(DEPDIR)/fs_io.Po
+ -rm -f ./$(DEPDIR)/globals.Po
+- -rm -f ./$(DEPDIR)/gopher.Po
+ -rm -f ./$(DEPDIR)/helper.Po
+ -rm -f ./$(DEPDIR)/hier_code.Po
+ -rm -f ./$(DEPDIR)/htcp.Po
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2023-46846-pre1.patch b/meta-networking/recipes-daemons/squid/files/CVE-2023-46846-pre1.patch
new file mode 100644
index 0000000000..5b4e370d49
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2023-46846-pre1.patch
@@ -0,0 +1,1154 @@
+Backport of:
+
+From 417da4006cf5c97d44e74431b816fc58fec9e270 Mon Sep 17 00:00:00 2001
+From: Eduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
+Date: Mon, 18 Mar 2019 17:48:21 +0000
+Subject: [PATCH] Fix incremental parsing of chunked quoted extensions (#310)
+
+Before this change, incremental parsing of quoted chunked extensions
+was broken for two reasons:
+
+* Http::One::Parser::skipLineTerminator() unexpectedly threw after
+ partially received quoted chunk extension value.
+
+* When Http::One::Tokenizer was unable to parse a quoted extension,
+ it incorrectly restored the input buffer to the beginning of the
+ extension value (instead of the extension itself), thus making
+ further incremental parsing iterations impossible.
+
+IMO, the reason for this problem was that Http::One::Tokenizer::qdText()
+could not distinguish two cases (returning false in both):
+
+* the end of the quoted string not yet reached
+
+* an input error, e.g., wrong/unexpected character
+
+A possible approach could be to improve Http::One::Tokenizer, making it
+aware about "needs more data" state. However, to be acceptable,
+these improvements should be done in the base Parser::Tokenizer
+class instead. These changes seem to be non-trivial and could be
+done separately and later.
+
+Another approach, used here, is to simplify the complex and error-prone
+chunked extensions parsing algorithm, fixing incremental parsing bugs
+and still parse incrementally in almost all cases. The performance
+regression could be expected only in relatively rare cases of partially
+received or malformed extensions.
+
+Also:
+* fixed parsing of partial use-original-body extension values
+* do not treat an invalid use-original-body as an unknown extension
+* optimization: parse use-original-body extension only in ICAP context
+ (i.e., where it is expected)
+* improvement: added a new API to TeChunkedParser to specify known
+ chunked extensions list
+
+Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/squid/tree/debian/patches/CVE-2023-46846-pre1.patch?h=ubuntu/focal-security&id=9ccd217ca9428c9a6597e9310a99552026b245fa
+Upstream commit https://github.com/squid-cache/squid/commit/417da4006cf5c97d44e74431b816fc58fec9e270]
+CVE: CVE-2023-46846 #Dependency Patch1
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/adaptation/icap/ModXact.cc | 21 ++++-
+ src/adaptation/icap/ModXact.h | 20 +++++
+ src/http/one/Parser.cc | 35 ++++----
+ src/http/one/Parser.h | 10 ++-
+ src/http/one/RequestParser.cc | 16 ++--
+ src/http/one/RequestParser.h | 8 +-
+ src/http/one/ResponseParser.cc | 17 ++--
+ src/http/one/ResponseParser.h | 2 +-
+ src/http/one/TeChunkedParser.cc | 139 ++++++++++++++++++--------------
+ src/http/one/TeChunkedParser.h | 41 ++++++++--
+ src/http/one/Tokenizer.cc | 104 ++++++++++++------------
+ src/http/one/Tokenizer.h | 89 ++++++++------------
+ src/http/one/forward.h | 3 +
+ src/parser/BinaryTokenizer.h | 3 +-
+ src/parser/Makefile.am | 1 +
+ src/parser/Tokenizer.cc | 40 +++++++++
+ src/parser/Tokenizer.h | 13 +++
+ src/parser/forward.h | 22 +++++
+ 18 files changed, 364 insertions(+), 220 deletions(-)
+ create mode 100644 src/parser/forward.h
+
+--- a/src/adaptation/icap/ModXact.cc
++++ b/src/adaptation/icap/ModXact.cc
+@@ -25,12 +25,13 @@
+ #include "comm.h"
+ #include "comm/Connection.h"
+ #include "err_detail_type.h"
+-#include "http/one/TeChunkedParser.h"
+ #include "HttpHeaderTools.h"
+ #include "HttpMsg.h"
+ #include "HttpReply.h"
+ #include "HttpRequest.h"
+ #include "MasterXaction.h"
++#include "parser/Tokenizer.h"
++#include "sbuf/Stream.h"
+ #include "SquidTime.h"
+
+ // flow and terminology:
+@@ -44,6 +45,8 @@ CBDATA_NAMESPACED_CLASS_INIT(Adaptation:
+
+ static const size_t TheBackupLimit = BodyPipe::MaxCapacity;
+
++const SBuf Adaptation::Icap::ChunkExtensionValueParser::UseOriginalBodyName("use-original-body");
++
+ Adaptation::Icap::ModXact::State::State()
+ {
+ memset(this, 0, sizeof(*this));
+@@ -1108,6 +1111,7 @@ void Adaptation::Icap::ModXact::decideOn
+ state.parsing = State::psBody;
+ replyHttpBodySize = 0;
+ bodyParser = new Http1::TeChunkedParser;
++ bodyParser->parseExtensionValuesWith(&extensionParser);
+ makeAdaptedBodyPipe("adapted response from the ICAP server");
+ Must(state.sending == State::sendingAdapted);
+ } else {
+@@ -1142,9 +1146,8 @@ void Adaptation::Icap::ModXact::parseBod
+ }
+
+ if (parsed) {
+- if (state.readyForUob && bodyParser->useOriginBody >= 0) {
+- prepPartialBodyEchoing(
+- static_cast<uint64_t>(bodyParser->useOriginBody));
++ if (state.readyForUob && extensionParser.sawUseOriginalBody()) {
++ prepPartialBodyEchoing(extensionParser.useOriginalBody());
+ stopParsing();
+ return;
+ }
+@@ -2014,3 +2017,14 @@ void Adaptation::Icap::ModXactLauncher::
+ }
+ }
+
++void
++Adaptation::Icap::ChunkExtensionValueParser::parse(Tokenizer &tok, const SBuf &extName)
++{
++ if (extName == UseOriginalBodyName) {
++ useOriginalBody_ = tok.udec64("use-original-body");
++ assert(useOriginalBody_ >= 0);
++ } else {
++ Ignore(tok, extName);
++ }
++}
++
+--- a/src/adaptation/icap/ModXact.h
++++ b/src/adaptation/icap/ModXact.h
+@@ -15,6 +15,7 @@
+ #include "adaptation/icap/Xaction.h"
+ #include "BodyPipe.h"
+ #include "http/one/forward.h"
++#include "http/one/TeChunkedParser.h"
+
+ /*
+ * ICAPModXact implements ICAP REQMOD and RESPMOD transaction using
+@@ -105,6 +106,23 @@ private:
+ enum State { stDisabled, stWriting, stIeof, stDone } theState;
+ };
+
++/// handles ICAP-specific chunk extensions supported by Squid
++class ChunkExtensionValueParser: public Http1::ChunkExtensionValueParser
++{
++public:
++ /* Http1::ChunkExtensionValueParser API */
++ virtual void parse(Tokenizer &tok, const SBuf &extName) override;
++
++ bool sawUseOriginalBody() const { return useOriginalBody_ >= 0; }
++ uint64_t useOriginalBody() const { assert(sawUseOriginalBody()); return static_cast<uint64_t>(useOriginalBody_); }
++
++private:
++ static const SBuf UseOriginalBodyName;
++
++ /// the value of the parsed use-original-body chunk extension (or -1)
++ int64_t useOriginalBody_ = -1;
++};
++
+ class ModXact: public Xaction, public BodyProducer, public BodyConsumer
+ {
+ CBDATA_CLASS(ModXact);
+@@ -270,6 +288,8 @@ private:
+
+ int adaptHistoryId; ///< adaptation history slot reservation
+
++ ChunkExtensionValueParser extensionParser;
++
+ class State
+ {
+
+--- a/src/http/one/Parser.cc
++++ b/src/http/one/Parser.cc
+@@ -7,10 +7,11 @@
+ */
+
+ #include "squid.h"
++#include "base/CharacterSet.h"
+ #include "Debug.h"
+ #include "http/one/Parser.h"
+-#include "http/one/Tokenizer.h"
+ #include "mime_header.h"
++#include "parser/Tokenizer.h"
+ #include "SquidConfig.h"
+
+ /// RFC 7230 section 2.6 - 7 magic octets
+@@ -61,20 +62,19 @@ Http::One::Parser::DelimiterCharacters()
+ RelaxedDelimiterCharacters() : CharacterSet::SP;
+ }
+
+-bool
+-Http::One::Parser::skipLineTerminator(Http1::Tokenizer &tok) const
++void
++Http::One::Parser::skipLineTerminator(Tokenizer &tok) const
+ {
+ if (tok.skip(Http1::CrLf()))
+- return true;
++ return;
+
+ if (Config.onoff.relaxed_header_parser && tok.skipOne(CharacterSet::LF))
+- return true;
++ return;
+
+ if (tok.atEnd() || (tok.remaining().length() == 1 && tok.remaining().at(0) == '\r'))
+- return false; // need more data
++ throw InsufficientInput();
+
+ throw TexcHere("garbage instead of CRLF line terminator");
+- return false; // unreachable, but make naive compilers happy
+ }
+
+ /// all characters except the LF line terminator
+@@ -102,7 +102,7 @@ LineCharacters()
+ void
+ Http::One::Parser::cleanMimePrefix()
+ {
+- Http1::Tokenizer tok(mimeHeaderBlock_);
++ Tokenizer tok(mimeHeaderBlock_);
+ while (tok.skipOne(RelaxedDelimiterCharacters())) {
+ (void)tok.skipAll(LineCharacters()); // optional line content
+ // LF terminator is required.
+@@ -137,7 +137,7 @@ Http::One::Parser::cleanMimePrefix()
+ void
+ Http::One::Parser::unfoldMime()
+ {
+- Http1::Tokenizer tok(mimeHeaderBlock_);
++ Tokenizer tok(mimeHeaderBlock_);
+ const auto szLimit = mimeHeaderBlock_.length();
+ mimeHeaderBlock_.clear();
+ // prevent the mime sender being able to make append() realloc/grow multiple times.
+@@ -228,7 +228,7 @@ Http::One::Parser::getHostHeaderField()
+ debugs(25, 5, "looking for " << name);
+
+ // while we can find more LF in the SBuf
+- Http1::Tokenizer tok(mimeHeaderBlock_);
++ Tokenizer tok(mimeHeaderBlock_);
+ SBuf p;
+
+ while (tok.prefix(p, LineCharacters())) {
+@@ -250,7 +250,7 @@ Http::One::Parser::getHostHeaderField()
+ p.consume(namelen + 1);
+
+ // TODO: optimize SBuf::trim to take CharacterSet directly
+- Http1::Tokenizer t(p);
++ Tokenizer t(p);
+ t.skipAll(CharacterSet::WSP);
+ p = t.remaining();
+
+@@ -278,10 +278,15 @@ Http::One::ErrorLevel()
+ }
+
+ // BWS = *( SP / HTAB ) ; WhitespaceCharacters() may relax this RFC 7230 rule
+-bool
+-Http::One::ParseBws(Tokenizer &tok)
++void
++Http::One::ParseBws(Parser::Tokenizer &tok)
+ {
+- if (const auto count = tok.skipAll(Parser::WhitespaceCharacters())) {
++ const auto count = tok.skipAll(Parser::WhitespaceCharacters());
++
++ if (tok.atEnd())
++ throw InsufficientInput(); // even if count is positive
++
++ if (count) {
+ // Generating BWS is a MUST-level violation so warn about it as needed.
+ debugs(33, ErrorLevel(), "found " << count << " BWS octets");
+ // RFC 7230 says we MUST parse BWS, so we fall through even if
+@@ -289,6 +294,6 @@ Http::One::ParseBws(Tokenizer &tok)
+ }
+ // else we successfully "parsed" an empty BWS sequence
+
+- return true;
++ // success: no more BWS characters expected
+ }
+
+--- a/src/http/one/Parser.h
++++ b/src/http/one/Parser.h
+@@ -12,6 +12,7 @@
+ #include "anyp/ProtocolVersion.h"
+ #include "http/one/forward.h"
+ #include "http/StatusCode.h"
++#include "parser/forward.h"
+ #include "sbuf/SBuf.h"
+
+ namespace Http {
+@@ -40,6 +41,7 @@ class Parser : public RefCountable
+ {
+ public:
+ typedef SBuf::size_type size_type;
++ typedef ::Parser::Tokenizer Tokenizer;
+
+ Parser() : parseStatusCode(Http::scNone), parsingStage_(HTTP_PARSE_NONE), hackExpectsMime_(false) {}
+ virtual ~Parser() {}
+@@ -118,11 +120,11 @@ protected:
+ * detect and skip the CRLF or (if tolerant) LF line terminator
+ * consume from the tokenizer.
+ *
+- * throws if non-terminator is detected.
++ * \throws exception on bad or InsuffientInput.
+ * \retval true only if line terminator found.
+ * \retval false incomplete or missing line terminator, need more data.
+ */
+- bool skipLineTerminator(Http1::Tokenizer &tok) const;
++ void skipLineTerminator(Tokenizer &) const;
+
+ /**
+ * Scan to find the mime headers block for current message.
+@@ -159,8 +161,8 @@ private:
+ };
+
+ /// skips and, if needed, warns about RFC 7230 BWS ("bad" whitespace)
+-/// \returns true (always; unlike all the skip*() functions)
+-bool ParseBws(Tokenizer &tok);
++/// \throws InsufficientInput when the end of BWS cannot be confirmed
++void ParseBws(Parser::Tokenizer &);
+
+ /// the right debugs() level for logging HTTP violation messages
+ int ErrorLevel();
+--- a/src/http/one/RequestParser.cc
++++ b/src/http/one/RequestParser.cc
+@@ -9,8 +9,8 @@
+ #include "squid.h"
+ #include "Debug.h"
+ #include "http/one/RequestParser.h"
+-#include "http/one/Tokenizer.h"
+ #include "http/ProtocolVersion.h"
++#include "parser/Tokenizer.h"
+ #include "profiler/Profiler.h"
+ #include "SquidConfig.h"
+
+@@ -64,7 +64,7 @@ Http::One::RequestParser::skipGarbageLin
+ * RFC 7230 section 2.6, 3.1 and 3.5
+ */
+ bool
+-Http::One::RequestParser::parseMethodField(Http1::Tokenizer &tok)
++Http::One::RequestParser::parseMethodField(Tokenizer &tok)
+ {
+ // method field is a sequence of TCHAR.
+ // Limit to 32 characters to prevent overly long sequences of non-HTTP
+@@ -145,7 +145,7 @@ Http::One::RequestParser::RequestTargetC
+ }
+
+ bool
+-Http::One::RequestParser::parseUriField(Http1::Tokenizer &tok)
++Http::One::RequestParser::parseUriField(Tokenizer &tok)
+ {
+ /* Arbitrary 64KB URI upper length limit.
+ *
+@@ -178,7 +178,7 @@ Http::One::RequestParser::parseUriField(
+ }
+
+ bool
+-Http::One::RequestParser::parseHttpVersionField(Http1::Tokenizer &tok)
++Http::One::RequestParser::parseHttpVersionField(Tokenizer &tok)
+ {
+ static const SBuf http1p0("HTTP/1.0");
+ static const SBuf http1p1("HTTP/1.1");
+@@ -253,7 +253,7 @@ Http::One::RequestParser::skipDelimiter(
+
+ /// Parse CRs at the end of request-line, just before the terminating LF.
+ bool
+-Http::One::RequestParser::skipTrailingCrs(Http1::Tokenizer &tok)
++Http::One::RequestParser::skipTrailingCrs(Tokenizer &tok)
+ {
+ if (Config.onoff.relaxed_header_parser) {
+ (void)tok.skipAllTrailing(CharacterSet::CR); // optional; multiple OK
+@@ -289,12 +289,12 @@ Http::One::RequestParser::parseRequestFi
+ // Earlier, skipGarbageLines() took care of any leading LFs (if allowed).
+ // Now, the request line has to end at the first LF.
+ static const CharacterSet lineChars = CharacterSet::LF.complement("notLF");
+- ::Parser::Tokenizer lineTok(buf_);
++ Tokenizer lineTok(buf_);
+ if (!lineTok.prefix(line, lineChars) || !lineTok.skip('\n')) {
+ if (buf_.length() >= Config.maxRequestHeaderSize) {
+ /* who should we blame for our failure to parse this line? */
+
+- Http1::Tokenizer methodTok(buf_);
++ Tokenizer methodTok(buf_);
+ if (!parseMethodField(methodTok))
+ return -1; // blame a bad method (or its delimiter)
+
+@@ -308,7 +308,7 @@ Http::One::RequestParser::parseRequestFi
+ return 0;
+ }
+
+- Http1::Tokenizer tok(line);
++ Tokenizer tok(line);
+
+ if (!parseMethodField(tok))
+ return -1;
+--- a/src/http/one/RequestParser.h
++++ b/src/http/one/RequestParser.h
+@@ -54,11 +54,11 @@ private:
+ bool doParse(const SBuf &aBuf);
+
+ /* all these return false and set parseStatusCode on parsing failures */
+- bool parseMethodField(Http1::Tokenizer &);
+- bool parseUriField(Http1::Tokenizer &);
+- bool parseHttpVersionField(Http1::Tokenizer &);
++ bool parseMethodField(Tokenizer &);
++ bool parseUriField(Tokenizer &);
++ bool parseHttpVersionField(Tokenizer &);
+ bool skipDelimiter(const size_t count, const char *where);
+- bool skipTrailingCrs(Http1::Tokenizer &tok);
++ bool skipTrailingCrs(Tokenizer &tok);
+
+ bool http0() const {return !msgProtocol_.major;}
+ static const CharacterSet &RequestTargetCharacters();
+--- a/src/http/one/ResponseParser.cc
++++ b/src/http/one/ResponseParser.cc
+@@ -9,8 +9,8 @@
+ #include "squid.h"
+ #include "Debug.h"
+ #include "http/one/ResponseParser.h"
+-#include "http/one/Tokenizer.h"
+ #include "http/ProtocolVersion.h"
++#include "parser/Tokenizer.h"
+ #include "profiler/Profiler.h"
+ #include "SquidConfig.h"
+
+@@ -47,7 +47,7 @@ Http::One::ResponseParser::firstLineSize
+ // NP: we found the protocol version and consumed it already.
+ // just need the status code and reason phrase
+ int
+-Http::One::ResponseParser::parseResponseStatusAndReason(Http1::Tokenizer &tok, const CharacterSet &WspDelim)
++Http::One::ResponseParser::parseResponseStatusAndReason(Tokenizer &tok, const CharacterSet &WspDelim)
+ {
+ if (!completedStatus_) {
+ debugs(74, 9, "seek status-code in: " << tok.remaining().substr(0,10) << "...");
+@@ -87,14 +87,13 @@ Http::One::ResponseParser::parseResponse
+ static const CharacterSet phraseChars = CharacterSet::WSP + CharacterSet::VCHAR + CharacterSet::OBSTEXT;
+ (void)tok.prefix(reasonPhrase_, phraseChars); // optional, no error if missing
+ try {
+- if (skipLineTerminator(tok)) {
+- debugs(74, DBG_DATA, "parse remaining buf={length=" << tok.remaining().length() << ", data='" << tok.remaining() << "'}");
+- buf_ = tok.remaining(); // resume checkpoint
+- return 1;
+- }
++ skipLineTerminator(tok);
++ buf_ = tok.remaining(); // resume checkpoint
++ debugs(74, DBG_DATA, Raw("leftovers", buf_.rawContent(), buf_.length()));
++ return 1;
++ } catch (const InsufficientInput &) {
+ reasonPhrase_.clear();
+ return 0; // need more to be sure we have it all
+-
+ } catch (const std::exception &ex) {
+ debugs(74, 6, "invalid status-line: " << ex.what());
+ }
+@@ -119,7 +118,7 @@ Http::One::ResponseParser::parseResponse
+ int
+ Http::One::ResponseParser::parseResponseFirstLine()
+ {
+- Http1::Tokenizer tok(buf_);
++ Tokenizer tok(buf_);
+
+ const CharacterSet &WspDelim = DelimiterCharacters();
+
+--- a/src/http/one/ResponseParser.h
++++ b/src/http/one/ResponseParser.h
+@@ -43,7 +43,7 @@ public:
+
+ private:
+ int parseResponseFirstLine();
+- int parseResponseStatusAndReason(Http1::Tokenizer&, const CharacterSet &);
++ int parseResponseStatusAndReason(Tokenizer&, const CharacterSet &);
+
+ /// magic prefix for identifying ICY response messages
+ static const SBuf IcyMagic;
+--- a/src/http/one/TeChunkedParser.cc
++++ b/src/http/one/TeChunkedParser.cc
+@@ -13,10 +13,13 @@
+ #include "http/one/Tokenizer.h"
+ #include "http/ProtocolVersion.h"
+ #include "MemBuf.h"
++#include "parser/Tokenizer.h"
+ #include "Parsing.h"
++#include "sbuf/Stream.h"
+ #include "SquidConfig.h"
+
+-Http::One::TeChunkedParser::TeChunkedParser()
++Http::One::TeChunkedParser::TeChunkedParser():
++ customExtensionValueParser(nullptr)
+ {
+ // chunked encoding only exists in HTTP/1.1
+ Http1::Parser::msgProtocol_ = Http::ProtocolVersion(1,1);
+@@ -31,7 +34,11 @@ Http::One::TeChunkedParser::clear()
+ buf_.clear();
+ theChunkSize = theLeftBodySize = 0;
+ theOut = NULL;
+- useOriginBody = -1;
++ // XXX: We do not reset customExtensionValueParser here. Based on the
++ // clear() API description, we must, but it makes little sense and could
++ // break method callers if they appear because some of them may forget to
++ // reset customExtensionValueParser. TODO: Remove Http1::Parser as our
++ // parent class and this unnecessary method with it.
+ }
+
+ bool
+@@ -49,14 +56,14 @@ Http::One::TeChunkedParser::parse(const
+ if (parsingStage_ == Http1::HTTP_PARSE_NONE)
+ parsingStage_ = Http1::HTTP_PARSE_CHUNK_SZ;
+
+- Http1::Tokenizer tok(buf_);
++ Tokenizer tok(buf_);
+
+ // loop for as many chunks as we can
+ // use do-while instead of while so that we can incrementally
+ // restart in the middle of a chunk/frame
+ do {
+
+- if (parsingStage_ == Http1::HTTP_PARSE_CHUNK_EXT && !parseChunkExtension(tok, theChunkSize))
++ if (parsingStage_ == Http1::HTTP_PARSE_CHUNK_EXT && !parseChunkMetadataSuffix(tok))
+ return false;
+
+ if (parsingStage_ == Http1::HTTP_PARSE_CHUNK && !parseChunkBody(tok))
+@@ -80,7 +87,7 @@ Http::One::TeChunkedParser::needsMoreSpa
+
+ /// RFC 7230 section 4.1 chunk-size
+ bool
+-Http::One::TeChunkedParser::parseChunkSize(Http1::Tokenizer &tok)
++Http::One::TeChunkedParser::parseChunkSize(Tokenizer &tok)
+ {
+ Must(theChunkSize <= 0); // Should(), really
+
+@@ -104,66 +111,75 @@ Http::One::TeChunkedParser::parseChunkSi
+ return false; // should not be reachable
+ }
+
+-/**
+- * Parses chunk metadata suffix, looking for interesting extensions and/or
+- * getting to the line terminator. RFC 7230 section 4.1.1 and its Errata #4667:
+- *
+- * chunk-ext = *( BWS ";" BWS chunk-ext-name [ BWS "=" BWS chunk-ext-val ] )
+- * chunk-ext-name = token
+- * chunk-ext-val = token / quoted-string
+- *
+- * ICAP 'use-original-body=N' extension is supported.
+- */
+-bool
+-Http::One::TeChunkedParser::parseChunkExtension(Http1::Tokenizer &tok, bool skipKnown)
+-{
+- SBuf ext;
+- SBuf value;
+- while (
+- ParseBws(tok) && // Bug 4492: IBM_HTTP_Server sends SP after chunk-size
+- tok.skip(';') &&
+- ParseBws(tok) && // Bug 4492: ICAP servers send SP before chunk-ext-name
+- tok.prefix(ext, CharacterSet::TCHAR)) { // chunk-ext-name
+-
+- // whole value part is optional. if no '=' expect next chunk-ext
+- if (ParseBws(tok) && tok.skip('=') && ParseBws(tok)) {
+-
+- if (!skipKnown) {
+- if (ext.cmp("use-original-body",17) == 0 && tok.int64(useOriginBody, 10)) {
+- debugs(94, 3, "Found chunk extension " << ext << "=" << useOriginBody);
+- buf_ = tok.remaining(); // parse checkpoint
+- continue;
+- }
+- }
+-
+- debugs(94, 5, "skipping unknown chunk extension " << ext);
+-
+- // unknown might have a value token or quoted-string
+- if (tok.quotedStringOrToken(value) && !tok.atEnd()) {
+- buf_ = tok.remaining(); // parse checkpoint
+- continue;
+- }
+-
+- // otherwise need more data OR corrupt syntax
+- break;
+- }
+-
+- if (!tok.atEnd())
+- buf_ = tok.remaining(); // parse checkpoint (unless there might be more token name)
+- }
+-
+- if (skipLineTerminator(tok)) {
+- buf_ = tok.remaining(); // checkpoint
+- // non-0 chunk means data, 0-size means optional Trailer follows
++/// Parses "[chunk-ext] CRLF" from RFC 7230 section 4.1.1:
++/// chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
++/// last-chunk = 1*"0" [ chunk-ext ] CRLF
++bool
++Http::One::TeChunkedParser::parseChunkMetadataSuffix(Tokenizer &tok)
++{
++ // Code becomes much simpler when incremental parsing functions throw on
++ // bad or insufficient input, like in the code below. TODO: Expand up.
++ try {
++ parseChunkExtensions(tok); // a possibly empty chunk-ext list
++ skipLineTerminator(tok);
++ buf_ = tok.remaining();
+ parsingStage_ = theChunkSize ? Http1::HTTP_PARSE_CHUNK : Http1::HTTP_PARSE_MIME;
+ return true;
++ } catch (const InsufficientInput &) {
++ tok.reset(buf_); // backtrack to the last commit point
++ return false;
+ }
++ // other exceptions bubble up to kill message parsing
++}
++
++/// Parses the chunk-ext list (RFC 7230 section 4.1.1 and its Errata #4667):
++/// chunk-ext = *( BWS ";" BWS chunk-ext-name [ BWS "=" BWS chunk-ext-val ] )
++void
++Http::One::TeChunkedParser::parseChunkExtensions(Tokenizer &tok)
++{
++ do {
++ ParseBws(tok); // Bug 4492: IBM_HTTP_Server sends SP after chunk-size
+
+- return false;
++ if (!tok.skip(';'))
++ return; // reached the end of extensions (if any)
++
++ parseOneChunkExtension(tok);
++ buf_ = tok.remaining(); // got one extension
++ } while (true);
++}
++
++void
++Http::One::ChunkExtensionValueParser::Ignore(Tokenizer &tok, const SBuf &extName)
++{
++ const auto ignoredValue = tokenOrQuotedString(tok);
++ debugs(94, 5, extName << " with value " << ignoredValue);
++}
++
++/// Parses a single chunk-ext list element:
++/// chunk-ext = *( BWS ";" BWS chunk-ext-name [ BWS "=" BWS chunk-ext-val ] )
++void
++Http::One::TeChunkedParser::parseOneChunkExtension(Tokenizer &tok)
++{
++ ParseBws(tok); // Bug 4492: ICAP servers send SP before chunk-ext-name
++
++ const auto extName = tok.prefix("chunk-ext-name", CharacterSet::TCHAR);
++
++ ParseBws(tok);
++
++ if (!tok.skip('='))
++ return; // parsed a valueless chunk-ext
++
++ ParseBws(tok);
++
++ // optimization: the only currently supported extension needs last-chunk
++ if (!theChunkSize && customExtensionValueParser)
++ customExtensionValueParser->parse(tok, extName);
++ else
++ ChunkExtensionValueParser::Ignore(tok, extName);
+ }
+
+ bool
+-Http::One::TeChunkedParser::parseChunkBody(Http1::Tokenizer &tok)
++Http::One::TeChunkedParser::parseChunkBody(Tokenizer &tok)
+ {
+ if (theLeftBodySize > 0) {
+ buf_ = tok.remaining(); // sync buffers before buf_ use
+@@ -188,17 +204,20 @@ Http::One::TeChunkedParser::parseChunkBo
+ }
+
+ bool
+-Http::One::TeChunkedParser::parseChunkEnd(Http1::Tokenizer &tok)
++Http::One::TeChunkedParser::parseChunkEnd(Tokenizer &tok)
+ {
+ Must(theLeftBodySize == 0); // Should(), really
+
+- if (skipLineTerminator(tok)) {
++ try {
++ skipLineTerminator(tok);
+ buf_ = tok.remaining(); // parse checkpoint
+ theChunkSize = 0; // done with the current chunk
+ parsingStage_ = Http1::HTTP_PARSE_CHUNK_SZ;
+ return true;
+ }
+-
+- return false;
++ catch (const InsufficientInput &) {
++ return false;
++ }
++ // other exceptions bubble up to kill message parsing
+ }
+
+--- a/src/http/one/TeChunkedParser.h
++++ b/src/http/one/TeChunkedParser.h
+@@ -18,6 +18,26 @@ namespace Http
+ namespace One
+ {
+
++using ::Parser::InsufficientInput;
++
++// TODO: Move this class into http/one/ChunkExtensionValueParser.*
++/// A customizable parser of a single chunk extension value (chunk-ext-val).
++/// From RFC 7230 section 4.1.1 and its Errata #4667:
++/// chunk-ext = *( BWS ";" BWS chunk-ext-name [ BWS "=" BWS chunk-ext-val ] )
++/// chunk-ext-name = token
++/// chunk-ext-val = token / quoted-string
++class ChunkExtensionValueParser
++{
++public:
++ typedef ::Parser::Tokenizer Tokenizer;
++
++ /// extracts and ignores the value of a named extension
++ static void Ignore(Tokenizer &tok, const SBuf &extName);
++
++ /// extracts and then interprets (or ignores) the extension value
++ virtual void parse(Tokenizer &tok, const SBuf &extName) = 0;
++};
++
+ /**
+ * An incremental parser for chunked transfer coding
+ * defined in RFC 7230 section 4.1.
+@@ -25,7 +45,7 @@ namespace One
+ *
+ * The parser shovels content bytes from the raw
+ * input buffer into the content output buffer, both caller-supplied.
+- * Ignores chunk extensions except for ICAP's ieof.
++ * Chunk extensions like use-original-body are handled via parseExtensionValuesWith().
+ * Trailers are available via mimeHeader() if wanted.
+ */
+ class TeChunkedParser : public Http1::Parser
+@@ -37,6 +57,10 @@ public:
+ /// set the buffer to be used to store decoded chunk data
+ void setPayloadBuffer(MemBuf *parsedContent) {theOut = parsedContent;}
+
++ /// Instead of ignoring all chunk extension values, give the supplied
++ /// parser a chance to handle them. Only applied to last-chunk (for now).
++ void parseExtensionValuesWith(ChunkExtensionValueParser *parser) { customExtensionValueParser = parser; }
++
+ bool needsMoreSpace() const;
+
+ /* Http1::Parser API */
+@@ -45,17 +69,20 @@ public:
+ virtual Parser::size_type firstLineSize() const {return 0;} // has no meaning with multiple chunks
+
+ private:
+- bool parseChunkSize(Http1::Tokenizer &tok);
+- bool parseChunkExtension(Http1::Tokenizer &tok, bool skipKnown);
+- bool parseChunkBody(Http1::Tokenizer &tok);
+- bool parseChunkEnd(Http1::Tokenizer &tok);
++ bool parseChunkSize(Tokenizer &tok);
++ bool parseChunkMetadataSuffix(Tokenizer &);
++ void parseChunkExtensions(Tokenizer &);
++ void parseOneChunkExtension(Tokenizer &);
++ bool parseChunkBody(Tokenizer &tok);
++ bool parseChunkEnd(Tokenizer &tok);
+
+ MemBuf *theOut;
+ uint64_t theChunkSize;
+ uint64_t theLeftBodySize;
+
+-public:
+- int64_t useOriginBody;
++ /// An optional plugin for parsing and interpreting custom chunk-ext-val.
++ /// This "visitor" object is owned by our creator.
++ ChunkExtensionValueParser *customExtensionValueParser;
+ };
+
+ } // namespace One
+--- a/src/http/one/Tokenizer.cc
++++ b/src/http/one/Tokenizer.cc
+@@ -8,35 +8,18 @@
+
+ #include "squid.h"
+ #include "Debug.h"
++#include "http/one/Parser.h"
+ #include "http/one/Tokenizer.h"
++#include "parser/Tokenizer.h"
++#include "sbuf/Stream.h"
+
+-bool
+-Http::One::Tokenizer::quotedString(SBuf &returnedToken, const bool http1p0)
++/// Extracts quoted-string after the caller removes the initial '"'.
++/// \param http1p0 whether to prohibit \-escaped characters in quoted strings
++/// \throws InsufficientInput when input can be a token _prefix_
++/// \returns extracted quoted string (without quotes and with chars unescaped)
++static SBuf
++parseQuotedStringSuffix(Parser::Tokenizer &tok, const bool http1p0)
+ {
+- checkpoint();
+-
+- if (!skip('"'))
+- return false;
+-
+- return qdText(returnedToken, http1p0);
+-}
+-
+-bool
+-Http::One::Tokenizer::quotedStringOrToken(SBuf &returnedToken, const bool http1p0)
+-{
+- checkpoint();
+-
+- if (!skip('"'))
+- return prefix(returnedToken, CharacterSet::TCHAR);
+-
+- return qdText(returnedToken, http1p0);
+-}
+-
+-bool
+-Http::One::Tokenizer::qdText(SBuf &returnedToken, const bool http1p0)
+-{
+- // the initial DQUOTE has been skipped by the caller
+-
+ /*
+ * RFC 1945 - defines qdtext:
+ * inclusive of LWS (which includes CR and LF)
+@@ -61,12 +44,17 @@ Http::One::Tokenizer::qdText(SBuf &retur
+ // best we can do is a conditional reference since http1p0 value may change per-client
+ const CharacterSet &tokenChars = (http1p0 ? qdtext1p0 : qdtext1p1);
+
+- for (;;) {
+- SBuf::size_type prefixLen = buf().findFirstNotOf(tokenChars);
+- returnedToken.append(consume(prefixLen));
++ SBuf parsedToken;
++
++ while (!tok.atEnd()) {
++ SBuf qdText;
++ if (tok.prefix(qdText, tokenChars))
++ parsedToken.append(qdText);
++
++ if (!http1p0 && tok.skip('\\')) { // HTTP/1.1 allows quoted-pair, HTTP/1.0 does not
++ if (tok.atEnd())
++ break;
+
+- // HTTP/1.1 allows quoted-pair, HTTP/1.0 does not
+- if (!http1p0 && skip('\\')) {
+ /* RFC 7230 section 3.2.6
+ *
+ * The backslash octet ("\") can be used as a single-octet quoting
+@@ -78,32 +66,42 @@ Http::One::Tokenizer::qdText(SBuf &retur
+ */
+ static const CharacterSet qPairChars = CharacterSet::HTAB + CharacterSet::SP + CharacterSet::VCHAR + CharacterSet::OBSTEXT;
+ SBuf escaped;
+- if (!prefix(escaped, qPairChars, 1)) {
+- returnedToken.clear();
+- restoreLastCheckpoint();
+- return false;
+- }
+- returnedToken.append(escaped);
++ if (!tok.prefix(escaped, qPairChars, 1))
++ throw TexcHere("invalid escaped character in quoted-pair");
++
++ parsedToken.append(escaped);
+ continue;
++ }
+
+- } else if (skip('"')) {
+- break; // done
++ if (tok.skip('"'))
++ return parsedToken; // may be empty
+
+- } else if (atEnd()) {
+- // need more data
+- returnedToken.clear();
+- restoreLastCheckpoint();
+- return false;
+- }
++ if (tok.atEnd())
++ break;
+
+- // else, we have an error
+- debugs(24, 8, "invalid bytes for set " << tokenChars.name);
+- returnedToken.clear();
+- restoreLastCheckpoint();
+- return false;
++ throw TexcHere(ToSBuf("invalid bytes for set ", tokenChars.name));
+ }
+
+- // found the whole string
+- return true;
++ throw Http::One::InsufficientInput();
++}
++
++SBuf
++Http::One::tokenOrQuotedString(Parser::Tokenizer &tok, const bool http1p0)
++{
++ if (tok.skip('"'))
++ return parseQuotedStringSuffix(tok, http1p0);
++
++ if (tok.atEnd())
++ throw InsufficientInput();
++
++ SBuf parsedToken;
++ if (!tok.prefix(parsedToken, CharacterSet::TCHAR))
++ throw TexcHere("invalid input while expecting an HTTP token");
++
++ if (tok.atEnd())
++ throw InsufficientInput();
++
++ // got the complete token
++ return parsedToken;
+ }
+
+--- a/src/http/one/Tokenizer.h
++++ b/src/http/one/Tokenizer.h
+@@ -9,68 +9,47 @@
+ #ifndef SQUID_SRC_HTTP_ONE_TOKENIZER_H
+ #define SQUID_SRC_HTTP_ONE_TOKENIZER_H
+
+-#include "parser/Tokenizer.h"
++#include "parser/forward.h"
++#include "sbuf/forward.h"
+
+ namespace Http {
+ namespace One {
+
+ /**
+- * Lexical processor extended to tokenize HTTP/1.x syntax.
++ * Extracts either an HTTP/1 token or quoted-string while dealing with
++ * possibly incomplete input typical for incremental text parsers.
++ * Unescapes escaped characters in HTTP/1.1 quoted strings.
+ *
+- * \see ::Parser::Tokenizer for more detail
++ * \param http1p0 whether to prohibit \-escaped characters in quoted strings
++ * \throws InsufficientInput as appropriate, including on unterminated tokens
++ * \returns extracted token or quoted string (without quotes)
++ *
++ * Governed by:
++ * - RFC 1945 section 2.1
++ * "
++ * A string of text is parsed as a single word if it is quoted using
++ * double-quote marks.
++ *
++ * quoted-string = ( <"> *(qdtext) <"> )
++ *
++ * qdtext = <any CHAR except <"> and CTLs,
++ * but including LWS>
++ *
++ * Single-character quoting using the backslash ("\") character is not
++ * permitted in HTTP/1.0.
++ * "
++ *
++ * - RFC 7230 section 3.2.6
++ * "
++ * A string of text is parsed as a single value if it is quoted using
++ * double-quote marks.
++ *
++ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
++ * qdtext = HTAB / SP /%x21 / %x23-5B / %x5D-7E / obs-text
++ * obs-text = %x80-FF
++ * "
+ */
+-class Tokenizer : public ::Parser::Tokenizer
+-{
+-public:
+- Tokenizer(SBuf &s) : ::Parser::Tokenizer(s), savedStats_(0) {}
+-
+- /**
+- * Attempt to parse a quoted-string lexical construct.
+- *
+- * Governed by:
+- * - RFC 1945 section 2.1
+- * "
+- * A string of text is parsed as a single word if it is quoted using
+- * double-quote marks.
+- *
+- * quoted-string = ( <"> *(qdtext) <"> )
+- *
+- * qdtext = <any CHAR except <"> and CTLs,
+- * but including LWS>
+- *
+- * Single-character quoting using the backslash ("\") character is not
+- * permitted in HTTP/1.0.
+- * "
+- *
+- * - RFC 7230 section 3.2.6
+- * "
+- * A string of text is parsed as a single value if it is quoted using
+- * double-quote marks.
+- *
+- * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
+- * qdtext = HTAB / SP /%x21 / %x23-5B / %x5D-7E / obs-text
+- * obs-text = %x80-FF
+- * "
+- *
+- * \param escaped HTTP/1.0 does not permit \-escaped characters
+- */
+- bool quotedString(SBuf &value, const bool http1p0 = false);
+-
+- /**
+- * Attempt to parse a (token / quoted-string ) lexical construct.
+- */
+- bool quotedStringOrToken(SBuf &value, const bool http1p0 = false);
+-
+-private:
+- /// parse the internal component of a quote-string, and terminal DQUOTE
+- bool qdText(SBuf &value, const bool http1p0);
+-
+- void checkpoint() { savedCheckpoint_ = buf(); savedStats_ = parsedSize(); }
+- void restoreLastCheckpoint() { undoParse(savedCheckpoint_, savedStats_); }
+-
+- SBuf savedCheckpoint_;
+- SBuf::size_type savedStats_;
+-};
++SBuf tokenOrQuotedString(Parser::Tokenizer &tok, const bool http1p0 = false);
+
+ } // namespace One
+ } // namespace Http
+--- a/src/http/one/forward.h
++++ b/src/http/one/forward.h
+@@ -10,6 +10,7 @@
+ #define SQUID_SRC_HTTP_ONE_FORWARD_H
+
+ #include "base/RefCount.h"
++#include "parser/forward.h"
+ #include "sbuf/forward.h"
+
+ namespace Http {
+@@ -31,6 +32,8 @@ typedef RefCount<Http::One::ResponsePars
+ /// CRLF textual representation
+ const SBuf &CrLf();
+
++using ::Parser::InsufficientInput;
++
+ } // namespace One
+ } // namespace Http
+
+--- a/src/parser/BinaryTokenizer.h
++++ b/src/parser/BinaryTokenizer.h
+@@ -9,6 +9,7 @@
+ #ifndef SQUID_SRC_PARSER_BINARYTOKENIZER_H
+ #define SQUID_SRC_PARSER_BINARYTOKENIZER_H
+
++#include "parser/forward.h"
+ #include "sbuf/SBuf.h"
+
+ namespace Parser
+@@ -44,7 +45,7 @@ public:
+ class BinaryTokenizer
+ {
+ public:
+- class InsufficientInput {}; // thrown when a method runs out of data
++ typedef ::Parser::InsufficientInput InsufficientInput;
+ typedef uint64_t size_type; // enough for the largest supported offset
+
+ BinaryTokenizer();
+--- a/src/parser/Makefile.am
++++ b/src/parser/Makefile.am
+@@ -13,6 +13,7 @@ noinst_LTLIBRARIES = libparser.la
+ libparser_la_SOURCES = \
+ BinaryTokenizer.h \
+ BinaryTokenizer.cc \
++ forward.h \
+ Tokenizer.h \
+ Tokenizer.cc
+
+--- a/src/parser/Tokenizer.cc
++++ b/src/parser/Tokenizer.cc
+@@ -10,7 +10,9 @@
+
+ #include "squid.h"
+ #include "Debug.h"
++#include "parser/forward.h"
+ #include "parser/Tokenizer.h"
++#include "sbuf/Stream.h"
+
+ #include <cerrno>
+ #if HAVE_CTYPE_H
+@@ -96,6 +98,23 @@ Parser::Tokenizer::prefix(SBuf &returned
+ return true;
+ }
+
++SBuf
++Parser::Tokenizer::prefix(const char *description, const CharacterSet &tokenChars, const SBuf::size_type limit)
++{
++ if (atEnd())
++ throw InsufficientInput();
++
++ SBuf result;
++
++ if (!prefix(result, tokenChars, limit))
++ throw TexcHere(ToSBuf("cannot parse ", description));
++
++ if (atEnd())
++ throw InsufficientInput();
++
++ return result;
++}
++
+ bool
+ Parser::Tokenizer::suffix(SBuf &returnedToken, const CharacterSet &tokenChars, const SBuf::size_type limit)
+ {
+@@ -283,3 +302,24 @@ Parser::Tokenizer::int64(int64_t & resul
+ return success(s - range.rawContent());
+ }
+
++int64_t
++Parser::Tokenizer::udec64(const char *description, const SBuf::size_type limit)
++{
++ if (atEnd())
++ throw InsufficientInput();
++
++ int64_t result = 0;
++
++ // Since we only support unsigned decimals, a parsing failure with a
++ // non-empty input always implies invalid/malformed input (or a buggy
++ // limit=0 caller). TODO: Support signed and non-decimal integers by
++ // refactoring int64() to detect insufficient input.
++ if (!int64(result, 10, false, limit))
++ throw TexcHere(ToSBuf("cannot parse ", description));
++
++ if (atEnd())
++ throw InsufficientInput(); // more digits may be coming
++
++ return result;
++}
++
+--- a/src/parser/Tokenizer.h
++++ b/src/parser/Tokenizer.h
+@@ -143,6 +143,19 @@ public:
+ */
+ bool int64(int64_t &result, int base = 0, bool allowSign = true, SBuf::size_type limit = SBuf::npos);
+
++ /*
++ * The methods below mimic their counterparts documented above, but they
++ * throw on errors, including InsufficientInput. The field description
++ * parameter is used for error reporting and debugging.
++ */
++
++ /// prefix() wrapper but throws InsufficientInput if input contains
++ /// nothing but the prefix (i.e. if the prefix is not "terminated")
++ SBuf prefix(const char *description, const CharacterSet &tokenChars, SBuf::size_type limit = SBuf::npos);
++
++ /// int64() wrapper but limited to unsigned decimal integers (for now)
++ int64_t udec64(const char *description, SBuf::size_type limit = SBuf::npos);
++
+ protected:
+ SBuf consume(const SBuf::size_type n);
+ SBuf::size_type success(const SBuf::size_type n);
+--- /dev/null
++++ b/src/parser/forward.h
+@@ -0,0 +1,22 @@
++/*
++ * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
++ *
++ * Squid software is distributed under GPLv2+ license and includes
++ * contributions from numerous individuals and organizations.
++ * Please see the COPYING and CONTRIBUTORS files for details.
++ */
++
++#ifndef SQUID_PARSER_FORWARD_H
++#define SQUID_PARSER_FORWARD_H
++
++namespace Parser {
++class Tokenizer;
++class BinaryTokenizer;
++
++// TODO: Move this declaration (to parser/Elements.h) if we need more like it.
++/// thrown by modern "incremental" parsers when they need more data
++class InsufficientInput {};
++} // namespace Parser
++
++#endif /* SQUID_PARSER_FORWARD_H */
++
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2023-46846.patch b/meta-networking/recipes-daemons/squid/files/CVE-2023-46846.patch
new file mode 100644
index 0000000000..a6d0965e7a
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2023-46846.patch
@@ -0,0 +1,169 @@
+From 05f6af2f4c85cc99323cfff6149c3d74af661b6d Mon Sep 17 00:00:00 2001
+From: Amos Jeffries <yadij@users.noreply.github.com>
+Date: Fri, 13 Oct 2023 08:44:16 +0000
+Subject: [PATCH] RFC 9112: Improve HTTP chunked encoding compliance (#1498)
+
+Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/squid/tree/debian/patches/CVE-2023-46846.patch?h=ubuntu/focal-security&id=9ccd217ca9428c9a6597e9310a99552026b245fa
+Upstream commit https://github.com/squid-cache/squid/commit/05f6af2f4c85cc99323cfff6149c3d74af661b6d]
+CVE: CVE-2023-46846
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/http/one/Parser.cc | 8 +-------
+ src/http/one/Parser.h | 4 +---
+ src/http/one/TeChunkedParser.cc | 23 ++++++++++++++++++-----
+ src/parser/Tokenizer.cc | 12 ++++++++++++
+ src/parser/Tokenizer.h | 7 +++++++
+ 5 files changed, 39 insertions(+), 15 deletions(-)
+
+--- a/src/http/one/Parser.cc
++++ b/src/http/one/Parser.cc
+@@ -65,16 +65,10 @@ Http::One::Parser::DelimiterCharacters()
+ void
+ Http::One::Parser::skipLineTerminator(Tokenizer &tok) const
+ {
+- if (tok.skip(Http1::CrLf()))
+- return;
+-
+ if (Config.onoff.relaxed_header_parser && tok.skipOne(CharacterSet::LF))
+ return;
+
+- if (tok.atEnd() || (tok.remaining().length() == 1 && tok.remaining().at(0) == '\r'))
+- throw InsufficientInput();
+-
+- throw TexcHere("garbage instead of CRLF line terminator");
++ tok.skipRequired("line-terminating CRLF", Http1::CrLf());
+ }
+
+ /// all characters except the LF line terminator
+--- a/src/http/one/Parser.h
++++ b/src/http/one/Parser.h
+@@ -120,9 +120,7 @@ protected:
+ * detect and skip the CRLF or (if tolerant) LF line terminator
+ * consume from the tokenizer.
+ *
+- * \throws exception on bad or InsuffientInput.
+- * \retval true only if line terminator found.
+- * \retval false incomplete or missing line terminator, need more data.
++ * \throws exception on bad or InsufficientInput
+ */
+ void skipLineTerminator(Tokenizer &) const;
+
+--- a/src/http/one/TeChunkedParser.cc
++++ b/src/http/one/TeChunkedParser.cc
+@@ -91,6 +91,11 @@ Http::One::TeChunkedParser::parseChunkSi
+ {
+ Must(theChunkSize <= 0); // Should(), really
+
++ static const SBuf bannedHexPrefixLower("0x");
++ static const SBuf bannedHexPrefixUpper("0X");
++ if (tok.skip(bannedHexPrefixLower) || tok.skip(bannedHexPrefixUpper))
++ throw TextException("chunk starts with 0x", Here());
++
+ int64_t size = -1;
+ if (tok.int64(size, 16, false) && !tok.atEnd()) {
+ if (size < 0)
+@@ -121,7 +126,7 @@ Http::One::TeChunkedParser::parseChunkMe
+ // bad or insufficient input, like in the code below. TODO: Expand up.
+ try {
+ parseChunkExtensions(tok); // a possibly empty chunk-ext list
+- skipLineTerminator(tok);
++ tok.skipRequired("CRLF after [chunk-ext]", Http1::CrLf());
+ buf_ = tok.remaining();
+ parsingStage_ = theChunkSize ? Http1::HTTP_PARSE_CHUNK : Http1::HTTP_PARSE_MIME;
+ return true;
+@@ -132,12 +137,14 @@ Http::One::TeChunkedParser::parseChunkMe
+ // other exceptions bubble up to kill message parsing
+ }
+
+-/// Parses the chunk-ext list (RFC 7230 section 4.1.1 and its Errata #4667):
++/// Parses the chunk-ext list (RFC 9112 section 7.1.1:
+ /// chunk-ext = *( BWS ";" BWS chunk-ext-name [ BWS "=" BWS chunk-ext-val ] )
+ void
+-Http::One::TeChunkedParser::parseChunkExtensions(Tokenizer &tok)
++Http::One::TeChunkedParser::parseChunkExtensions(Tokenizer &callerTok)
+ {
+ do {
++ auto tok = callerTok;
++
+ ParseBws(tok); // Bug 4492: IBM_HTTP_Server sends SP after chunk-size
+
+ if (!tok.skip(';'))
+@@ -145,6 +152,7 @@ Http::One::TeChunkedParser::parseChunkEx
+
+ parseOneChunkExtension(tok);
+ buf_ = tok.remaining(); // got one extension
++ callerTok = tok;
+ } while (true);
+ }
+
+@@ -158,11 +166,14 @@ Http::One::ChunkExtensionValueParser::Ig
+ /// Parses a single chunk-ext list element:
+ /// chunk-ext = *( BWS ";" BWS chunk-ext-name [ BWS "=" BWS chunk-ext-val ] )
+ void
+-Http::One::TeChunkedParser::parseOneChunkExtension(Tokenizer &tok)
++Http::One::TeChunkedParser::parseOneChunkExtension(Tokenizer &callerTok)
+ {
++ auto tok = callerTok;
++
+ ParseBws(tok); // Bug 4492: ICAP servers send SP before chunk-ext-name
+
+ const auto extName = tok.prefix("chunk-ext-name", CharacterSet::TCHAR);
++ callerTok = tok; // in case we determine that this is a valueless chunk-ext
+
+ ParseBws(tok);
+
+@@ -176,6 +187,8 @@ Http::One::TeChunkedParser::parseOneChun
+ customExtensionValueParser->parse(tok, extName);
+ else
+ ChunkExtensionValueParser::Ignore(tok, extName);
++
++ callerTok = tok;
+ }
+
+ bool
+@@ -209,7 +222,7 @@ Http::One::TeChunkedParser::parseChunkEn
+ Must(theLeftBodySize == 0); // Should(), really
+
+ try {
+- skipLineTerminator(tok);
++ tok.skipRequired("chunk CRLF", Http1::CrLf());
+ buf_ = tok.remaining(); // parse checkpoint
+ theChunkSize = 0; // done with the current chunk
+ parsingStage_ = Http1::HTTP_PARSE_CHUNK_SZ;
+--- a/src/parser/Tokenizer.cc
++++ b/src/parser/Tokenizer.cc
+@@ -147,6 +147,18 @@ Parser::Tokenizer::skipAll(const Charact
+ return success(prefixLen);
+ }
+
++void
++Parser::Tokenizer::skipRequired(const char *description, const SBuf &tokenToSkip)
++{
++ if (skip(tokenToSkip) || tokenToSkip.isEmpty())
++ return;
++
++ if (tokenToSkip.startsWith(buf_))
++ throw InsufficientInput();
++
++ throw TextException(ToSBuf("cannot skip ", description), Here());
++}
++
+ bool
+ Parser::Tokenizer::skipOne(const CharacterSet &chars)
+ {
+--- a/src/parser/Tokenizer.h
++++ b/src/parser/Tokenizer.h
+@@ -115,6 +115,13 @@ public:
+ */
+ SBuf::size_type skipAll(const CharacterSet &discardables);
+
++ /** skips a given character sequence (string);
++ * does nothing if the sequence is empty
++ *
++ * \throws exception on mismatching prefix or InsufficientInput
++ */
++ void skipRequired(const char *description, const SBuf &tokenToSkip);
++
+ /** Removes a single trailing character from the set.
+ *
+ * \return whether a character was removed
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2023-46847.patch b/meta-networking/recipes-daemons/squid/files/CVE-2023-46847.patch
new file mode 100644
index 0000000000..d9f29569d1
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2023-46847.patch
@@ -0,0 +1,47 @@
+From 052cf082b0faaef4eaaa4e94119d7a1437aac4a3 Mon Sep 17 00:00:00 2001
+From: squidadm <squidadm@users.noreply.github.com>
+Date: Wed, 18 Oct 2023 04:50:56 +1300
+Subject: [PATCH] Fix stack buffer overflow when parsing Digest Authorization
+ (#1517)
+
+The bug was discovered and detailed by Joshua Rogers at
+https://megamansec.github.io/Squid-Security-Audit/digest-overflow.html
+where it was filed as "Stack Buffer Overflow in Digest Authentication".
+
+---------
+
+Co-authored-by: Alex Bason <nonsleepr@gmail.com>
+Co-authored-by: Amos Jeffries <yadij@users.noreply.github.com>
+
+Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/052cf082b0faaef4eaaa4e94119d7a1437aac4a3]
+CVE: CVE-2023-46847
+Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
+---
+ src/auth/digest/Config.cc | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/auth/digest/Config.cc b/src/auth/digest/Config.cc
+index 2d25fee..4c206e1 100644
+--- a/src/auth/digest/Config.cc
++++ b/src/auth/digest/Config.cc
+@@ -862,11 +862,15 @@ Auth::Digest::Config::decode(char const *proxy_auth, const char *aRequestRealm)
+ break;
+
+ case DIGEST_NC:
+- if (value.size() != 8) {
++ if (value.size() == 8) {
++ // for historical reasons, the nc value MUST be exactly 8 bytes
++ static_assert(sizeof(digest_request->nc) == 8 + 1, "bad nc buffer size");
++ xstrncpy(digest_request->nc, value.rawBuf(), value.size() + 1);
++ debugs(29, 9, "Found noncecount '" << digest_request->nc << "'");
++ } else {
+ debugs(29, 9, "Invalid nc '" << value << "' in '" << temp << "'");
++ digest_request->nc[0] = 0;
+ }
+- xstrncpy(digest_request->nc, value.rawBuf(), value.size() + 1);
+- debugs(29, 9, "Found noncecount '" << digest_request->nc << "'");
+ break;
+
+ case DIGEST_CNONCE:
+--
+2.40.1
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2023-49285.patch b/meta-networking/recipes-daemons/squid/files/CVE-2023-49285.patch
new file mode 100644
index 0000000000..d3cc549f98
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2023-49285.patch
@@ -0,0 +1,35 @@
+From 77b3fb4df0f126784d5fd4967c28ed40eb8d521b Mon Sep 17 00:00:00 2001
+From: Alex Rousskov <rousskov@measurement-factory.com>
+Date: Wed, 25 Oct 2023 19:41:45 +0000
+Subject: [PATCH] RFC 1123: Fix date parsing (#1538)
+
+The bug was discovered and detailed by Joshua Rogers at
+https://megamansec.github.io/Squid-Security-Audit/datetime-overflow.html
+where it was filed as "1-Byte Buffer OverRead in RFC 1123 date/time
+Handling".
+
+Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/77b3fb4df0f126784d5fd4967c28ed40eb8d521b]
+CVE: CVE-2023-49285
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ lib/rfc1123.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/rfc1123.c b/lib/rfc1123.c
+index e5bf9a4d705..cb484cc002b 100644
+--- a/lib/rfc1123.c
++++ b/lib/rfc1123.c
+@@ -50,7 +50,13 @@ make_month(const char *s)
+ char month[3];
+
+ month[0] = xtoupper(*s);
++ if (!month[0])
++ return -1; // protects *(s + 1) below
++
+ month[1] = xtolower(*(s + 1));
++ if (!month[1])
++ return -1; // protects *(s + 2) below
++
+ month[2] = xtolower(*(s + 2));
+
+ for (i = 0; i < 12; i++)
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2023-49286.patch b/meta-networking/recipes-daemons/squid/files/CVE-2023-49286.patch
new file mode 100644
index 0000000000..8e0bdf387c
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2023-49286.patch
@@ -0,0 +1,87 @@
+From 6014c6648a2a54a4ecb7f952ea1163e0798f9264 Mon Sep 17 00:00:00 2001
+From: Alex Rousskov <rousskov@measurement-factory.com>
+Date: Fri, 27 Oct 2023 21:27:20 +0000
+Subject: [PATCH] Exit without asserting when helper process startup fails
+ (#1543)
+
+... to dup() after fork() and before execvp().
+
+Assertions are for handling program logic errors. Helper initialization
+code already handled system call errors correctly (i.e. by exiting the
+newly created helper process with an error), except for a couple of
+assert()s that could be triggered by dup(2) failures.
+
+This bug was discovered and detailed by Joshua Rogers at
+https://megamansec.github.io/Squid-Security-Audit/ipc-assert.html
+where it was filed as 'Assertion in Squid "Helper" Process Creator'.
+
+Origin: http://www.squid-cache.org/Versions/v6/SQUID-2023_8.patch
+
+Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/6014c6648a2a54a4ecb7f952ea1163e0798f9264]
+CVE: CVE-2023-49286
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/ipc.cc | 33 +++++++++++++++++++++++++++------
+ 1 file changed, 27 insertions(+), 6 deletions(-)
+
+--- a/src/ipc.cc
++++ b/src/ipc.cc
+@@ -20,6 +20,12 @@
+ #include "SquidIpc.h"
+ #include "tools.h"
+
++#include <cstdlib>
++
++#if HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++
+ static const char *hello_string = "hi there\n";
+ #ifndef HELLO_BUF_SZ
+ #define HELLO_BUF_SZ 32
+@@ -365,6 +371,22 @@
+ }
+
+ PutEnvironment();
++
++ // A dup(2) wrapper that reports and exits the process on errors. The
++ // exiting logic is only suitable for this child process context.
++ const auto dupOrExit = [prog,name](const int oldFd) {
++ const auto newFd = dup(oldFd);
++ if (newFd < 0) {
++ const auto savedErrno = errno;
++ debugs(54, DBG_CRITICAL, "ERROR: Helper process initialization failure: " << name);
++ debugs(54, DBG_CRITICAL, "helper (CHILD) PID: " << getpid());
++ debugs(54, DBG_CRITICAL, "helper program name: " << prog);
++ debugs(54, DBG_CRITICAL, "dup(2) system call error for FD " << oldFd << ": " << xstrerr(savedErrno));
++ _exit(1);
++ }
++ return newFd;
++ };
++
+ /*
+ * This double-dup stuff avoids problems when one of
+ * crfd, cwfd, or debug_log are in the rage 0-2.
+@@ -372,17 +394,16 @@
+
+ do {
+ /* First make sure 0-2 is occupied by something. Gets cleaned up later */
+- x = dup(crfd);
+- assert(x > -1);
+- } while (x < 3 && x > -1);
++ x = dupOrExit(crfd);
++ } while (x < 3);
+
+ close(x);
+
+- t1 = dup(crfd);
++ t1 = dupOrExit(crfd);
+
+- t2 = dup(cwfd);
++ t2 = dupOrExit(cwfd);
+
+- t3 = dup(fileno(debug_log));
++ t3 = dupOrExit(fileno(debug_log));
+
+ assert(t1 > 2 && t2 > 2 && t3 > 2);
+
diff --git a/meta-networking/recipes-daemons/squid/files/CVE-2023-50269.patch b/meta-networking/recipes-daemons/squid/files/CVE-2023-50269.patch
new file mode 100644
index 0000000000..51c895e0ef
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/CVE-2023-50269.patch
@@ -0,0 +1,62 @@
+From: Markus Koschany <apo@debian.org>
+Date: Tue, 26 Dec 2023 19:58:12 +0100
+Subject: CVE-2023-50269
+
+Bug-Debian: https://bugs.debian.org/1058721
+Origin: http://www.squid-cache.org/Versions/v5/SQUID-2023_10.patch
+
+Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/squid/tree/debian/patches/CVE-2023-50269.patch?h=ubuntu/focal-security&id=9ccd217ca9428c9a6597e9310a99552026b245fa
+Upstream commit https://github.com/squid-cache/squid/commit/9f7136105bff920413042a8806cc5de3f6086d6d]
+CVE: CVE-2023-50269
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/ClientRequestContext.h | 4 ++++
+ src/client_side_request.cc | 17 +++++++++++++++--
+ 2 files changed, 19 insertions(+), 2 deletions(-)
+
+--- a/src/ClientRequestContext.h
++++ b/src/ClientRequestContext.h
+@@ -81,6 +81,10 @@
+ #endif
+ ErrorState *error; ///< saved error page for centralized/delayed processing
+ bool readNextRequest; ///< whether Squid should read after error handling
++
++#if FOLLOW_X_FORWARDED_FOR
++ size_t currentXffHopNumber = 0; ///< number of X-Forwarded-For header values processed so far
++#endif
+ };
+
+ #endif /* SQUID_CLIENTREQUESTCONTEXT_H */
+--- a/src/client_side_request.cc
++++ b/src/client_side_request.cc
+@@ -78,6 +78,11 @@
+ static const char *const crlf = "\r\n";
+
+ #if FOLLOW_X_FORWARDED_FOR
++
++#if !defined(SQUID_X_FORWARDED_FOR_HOP_MAX)
++#define SQUID_X_FORWARDED_FOR_HOP_MAX 64
++#endif
++
+ static void clientFollowXForwardedForCheck(allow_t answer, void *data);
+ #endif /* FOLLOW_X_FORWARDED_FOR */
+
+@@ -485,8 +490,16 @@
+ /* override the default src_addr tested if we have to go deeper than one level into XFF */
+ Filled(calloutContext->acl_checklist)->src_addr = request->indirect_client_addr;
+ }
+- calloutContext->acl_checklist->nonBlockingCheck(clientFollowXForwardedForCheck, data);
+- return;
++ if (++calloutContext->currentXffHopNumber < SQUID_X_FORWARDED_FOR_HOP_MAX) {
++ calloutContext->acl_checklist->nonBlockingCheck(clientFollowXForwardedForCheck, data);
++ return;
++ }
++ const auto headerName = Http::HeaderLookupTable.lookup(Http::HdrType::X_FORWARDED_FOR).name;
++ debugs(28, DBG_CRITICAL, "ERROR: Ignoring trailing " << headerName << " addresses");
++ debugs(28, DBG_CRITICAL, "addresses allowed by follow_x_forwarded_for: " << calloutContext->currentXffHopNumber);
++ debugs(28, DBG_CRITICAL, "last/accepted address: " << request->indirect_client_addr);
++ debugs(28, DBG_CRITICAL, "ignored trailing addresses: " << request->x_forwarded_for_iterator);
++ // fall through to resume clientAccessCheck() processing
+ }
+ }
+
diff --git a/meta-networking/recipes-daemons/squid/squid_4.9.bb b/meta-networking/recipes-daemons/squid/squid_4.9.bb
index 19949acd84..09c0a2cd7c 100644
--- a/meta-networking/recipes-daemons/squid/squid_4.9.bb
+++ b/meta-networking/recipes-daemons/squid/squid_4.9.bb
@@ -24,6 +24,13 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2
file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
file://0001-tools.cc-fixed-unused-result-warning.patch \
file://0001-splay.cc-fix-bind-is-not-a-member-of-std.patch \
+ file://CVE-2023-46847.patch \
+ file://CVE-2023-46728.patch \
+ file://CVE-2023-46846-pre1.patch \
+ file://CVE-2023-46846.patch \
+ file://CVE-2023-49285.patch \
+ file://CVE-2023-49286.patch \
+ file://CVE-2023-50269.patch \
"
SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"
diff --git a/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb b/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb
index 115353fec7..071002c5e7 100644
--- a/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb
+++ b/meta-networking/recipes-filter/arno-iptables-firewall/arno-iptables-firewall_2.1.0.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://gpl_license.txt;md5=11c7b65c4a4acb9d5175f7e9bf99c403"
SRCREV = "39276d14b659684c4c0612725ab83ea841c6ef99"
-SRC_URI = "git://github.com/arno-iptables-firewall/aif"
+SRC_URI = "git://github.com/arno-iptables-firewall/aif;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb b/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb
index 2f627d458e..994825cb7e 100644
--- a/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb
+++ b/meta-networking/recipes-filter/libnetfilter/libnetfilter-log_1.0.1.bb
@@ -8,7 +8,7 @@ DEPENDS = "libnfnetlink libmnl"
SRCREV = "ba196a97e810746e5660fe3f57c87c0ed0f2b324"
PV .= "+git${SRCPV}"
-SRC_URI = "git://git.netfilter.org/libnetfilter_log"
+SRC_URI = "git://git.netfilter.org/libnetfilter_log;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb b/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb
index 896cfdfaa4..1bbab6f3cb 100644
--- a/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb
+++ b/meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.3.bb
@@ -8,7 +8,7 @@ DEPENDS = "libnfnetlink libmnl"
SRCREV = "601abd1c71ccdf90753cf294c120ad43fb25dc54"
-SRC_URI = "git://git.netfilter.org/libnetfilter_queue \
+SRC_URI = "git://git.netfilter.org/libnetfilter_queue;branch=master \
file://0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch \
"
diff --git a/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb b/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb
index 4ff00bf873..fee9967ebd 100644
--- a/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb
+++ b/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.7.bb
@@ -5,7 +5,7 @@ SECTION = "libs"
DEPENDS = "libmnl"
SRCREV = "eedafeb6db330b8adff1b7cdd3dac325f9144195"
-SRC_URI = "git://git.netfilter.org/libnftnl \
+SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \
file://0001-avoid-naming-local-function-as-one-of-printf-family.patch \
"
diff --git a/meta-networking/recipes-irc/znc/znc_1.7.5.bb b/meta-networking/recipes-irc/znc/znc_1.7.5.bb
index a3d4b7cc55..d7467ff4a6 100644
--- a/meta-networking/recipes-irc/znc/znc_1.7.5.bb
+++ b/meta-networking/recipes-irc/znc/znc_1.7.5.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
DEPENDS = "openssl zlib icu"
-SRC_URI = "git://github.com/znc/znc.git;name=znc \
- git://github.com/jimloco/Csocket.git;destsuffix=git/third_party/Csocket;name=Csocket \
+SRC_URI = "git://github.com/znc/znc.git;name=znc;branch=master;protocol=https \
+ git://github.com/jimloco/Csocket.git;destsuffix=git/third_party/Csocket;name=Csocket;branch=master;protocol=https \
"
SRCREV_znc = "c7f72f8bc800115ac985e7e13eace78031cb1b50"
SRCREV_Csocket = "e8d9e0bb248c521c2c7fa01e1c6a116d929c41b4"
diff --git a/meta-networking/recipes-kernel/wireguard/files/0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch b/meta-networking/recipes-kernel/wireguard/files/0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch
deleted file mode 100644
index a9dc9dc2b7..0000000000
--- a/meta-networking/recipes-kernel/wireguard/files/0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ce8faa3ee266ea69431805e6ed4bd7102d982508 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 12 Nov 2020 09:43:38 +0100
-Subject: [PATCH] compat: SYM_FUNC_{START,END} were backported to 5.4
-
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-
-Upstream-Status: Backport
-Fixes build failure in Dunfell.
-
-Signed-off-by: Armin Kuster <akuster808@gmail.com>
-
----
- compat/compat-asm.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: src/compat/compat-asm.h
-===================================================================
---- src.orig/compat/compat-asm.h
-+++ src/compat/compat-asm.h
-@@ -40,7 +40,7 @@
- #undef pull
- #endif
-
--#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 76)
- #define SYM_FUNC_START ENTRY
- #define SYM_FUNC_END ENDPROC
- #endif
diff --git a/meta-networking/recipes-kernel/wireguard/files/0001-compat-icmp_ndo_send-functions-were-backported-exten.patch b/meta-networking/recipes-kernel/wireguard/files/0001-compat-icmp_ndo_send-functions-were-backported-exten.patch
deleted file mode 100644
index f01cfe4e1c..0000000000
--- a/meta-networking/recipes-kernel/wireguard/files/0001-compat-icmp_ndo_send-functions-were-backported-exten.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 122f06bfd8fc7b06a0899fa9adc4ce8e06900d98 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Sun, 7 Mar 2021 08:14:33 -0700
-Subject: [PATCH] compat: icmp_ndo_send functions were backported extensively
-
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-
-Upstream-Status: Backport
-
-Fixes build with 5.4.103 update.
-/include/linux/icmpv6.h:56:6: note: previous declaration of 'icmpv6_ndo_send' was here
-| 56 | void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info);
-
-Signed-of-by: Armin Kuster <akuster808@gmail.com>
-
----
- src/compat/compat.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: src/compat/compat.h
-===================================================================
---- src.orig/compat/compat.h
-+++ src/compat/compat.h
-@@ -946,7 +946,7 @@ static inline int skb_ensure_writable(st
- }
- #endif
-
--#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 102) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 178) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 223) && LINUX_VERSION_CODE > KERNEL_VERSION(4, 10, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 259) || defined(ISRHEL8) || defined(ISUBUNTU1804)
- #if IS_ENABLED(CONFIG_NF_NAT)
- #include <linux/ip.h>
- #include <linux/icmpv6.h>
diff --git a/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20200401.bb b/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20200401.bb
deleted file mode 100644
index 6ed988bafa..0000000000
--- a/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20200401.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require wireguard.inc
-
-SRCREV = "43f57dac7b8305024f83addc533c9eede6509129"
-
-SRC_URI = "git://git.zx2c4.com/wireguard-linux-compat \
- file://0001-compat-SYM_FUNC_-START-END-were-backported-to-5.4.patch \
- file://0001-compat-icmp_ndo_send-functions-were-backported-exten.patch "
-
-inherit module kernel-module-split
-
-DEPENDS = "virtual/kernel libmnl"
-
-# This module requires Linux 3.10 higher and several networking related
-# configuration options. For exact kernel requirements visit:
-# https://www.wireguard.io/install/#kernel-requirements
-
-EXTRA_OEMAKE_append = " \
- KERNELDIR=${STAGING_KERNEL_DIR} \
- "
-
-MAKE_TARGETS = "module"
-
-RRECOMMENDS_${PN} = "kernel-module-xt-hashlimit"
-MODULE_NAME = "wireguard"
-
-module_do_install() {
- install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME}
- install -m 0644 ${MODULE_NAME}.ko \
- ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME}/${MODULE_NAME}.ko
-}
diff --git a/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20220627.bb b/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20220627.bb
new file mode 100644
index 0000000000..df2db15349
--- /dev/null
+++ b/meta-networking/recipes-kernel/wireguard/wireguard-module_1.0.20220627.bb
@@ -0,0 +1,23 @@
+require wireguard.inc
+
+SRCREV = "18fbcd68a35a892527345dc5679d0b2d860ee004"
+
+SRC_URI = "git://git.zx2c4.com/wireguard-linux-compat;protocol=https;branch=master"
+
+inherit module kernel-module-split
+
+DEPENDS = "virtual/kernel libmnl"
+
+# This module requires Linux 3.10 higher and several networking related
+# configuration options. For exact kernel requirements visit:
+# https://www.wireguard.io/install/#kernel-requirements
+
+EXTRA_OEMAKE_append = " \
+ KERNELDIR=${STAGING_KERNEL_DIR} \
+ "
+
+MAKE_TARGETS = "module"
+MODULES_INSTALL_TARGET = "module-install"
+
+RRECOMMENDS_${PN} = "kernel-module-xt-hashlimit"
+MODULE_NAME = "wireguard"
diff --git a/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20200319.bb b/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20210914.bb
index f698b9a9af..b63ef88182 100644
--- a/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20200319.bb
+++ b/meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20210914.bb
@@ -1,7 +1,7 @@
require wireguard.inc
-SRCREV = "a8063adc8ae9b4fc9848500e93f94bee8ad2e585"
-SRC_URI = "git://git.zx2c4.com/wireguard-tools"
+SRCREV = "3ba6527130c502144e7388b900138bca6260f4e8"
+SRC_URI = "git://git.zx2c4.com/wireguard-tools;branch=master"
inherit bash-completion systemd pkgconfig
@@ -9,7 +9,7 @@ DEPENDS += "wireguard-module libmnl"
do_install () {
oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
- SYSTEMDUNITDIR="${systemd_unitdir}" \
+ SYSTEMDUNITDIR="${systemd_system_unitdir}" \
WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
WITH_BASHCOMPLETION=yes \
WITH_WGQUICK=yes \
diff --git a/meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb b/meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb
index 6dd15ad9fc..fdcd906516 100644
--- a/meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb
+++ b/meta-networking/recipes-protocols/babeld/babeld_1.9.1.bb
@@ -12,7 +12,7 @@ SECTION = "net"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENCE;md5=411a48ac3c2e9e0911b8dd9aed26f754"
-SRC_URI = "git://github.com/jech/babeld.git;protocol=git"
+SRC_URI = "git://github.com/jech/babeld.git;protocol=https;branch=master"
SRCREV = "0835d5d894ea016ab7b81562466cade2c51a12d4"
UPSTREAM_CHECK_GITTAGREGEX = "babeld-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2022-44792-CVE-2022-44793.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2022-44792-CVE-2022-44793.patch
new file mode 100644
index 0000000000..4e537c8859
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/CVE-2022-44792-CVE-2022-44793.patch
@@ -0,0 +1,116 @@
+From 4589352dac3ae111c7621298cf231742209efd9b Mon Sep 17 00:00:00 2001
+From: Bill Fenner <fenner@gmail.com>
+Date: Fri, 25 Nov 2022 08:41:24 -0800
+Subject: [PATCH ] snmp_agent: disallow SET with NULL varbind
+
+Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/be804106fd0771a7d05236cff36e199af077af57]
+CVE: CVE-2022-44792 & CVE-2022-44793
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ agent/snmp_agent.c | 32 +++++++++++++++++++
+ apps/snmpset.c | 1 +
+ .../default/T0142snmpv2csetnull_simple | 31 ++++++++++++++++++
+ 3 files changed, 64 insertions(+)
+ create mode 100644 testing/fulltests/default/T0142snmpv2csetnull_simple
+
+diff --git a/agent/snmp_agent.c b/agent/snmp_agent.c
+index 26653f4..eba5b4e 100644
+--- a/agent/snmp_agent.c
++++ b/agent/snmp_agent.c
+@@ -3708,12 +3708,44 @@ netsnmp_handle_request(netsnmp_agent_session *asp, int status)
+ return 1;
+ }
+
++static int
++check_set_pdu_for_null_varbind(netsnmp_agent_session *asp)
++{
++ int i;
++ netsnmp_variable_list *v = NULL;
++
++ for (i = 1, v = asp->pdu->variables; v != NULL; i++, v = v->next_variable) {
++ if (v->type == ASN_NULL) {
++ /*
++ * Protect SET implementations that do not protect themselves
++ * against wrong type.
++ */
++ DEBUGMSGTL(("snmp_agent", "disallowing SET with NULL var for varbind %d\n", i));
++ asp->index = i;
++ return SNMP_ERR_WRONGTYPE;
++ }
++ }
++ return SNMP_ERR_NOERROR;
++}
++
+ int
+ handle_pdu(netsnmp_agent_session *asp)
+ {
+ int status, inclusives = 0;
+ netsnmp_variable_list *v = NULL;
+
++#ifndef NETSNMP_NO_WRITE_SUPPORT
++ /*
++ * Check for ASN_NULL in SET request
++ */
++ if (asp->pdu->command == SNMP_MSG_SET) {
++ status = check_set_pdu_for_null_varbind(asp);
++ if (status != SNMP_ERR_NOERROR) {
++ return status;
++ }
++ }
++#endif /* NETSNMP_NO_WRITE_SUPPORT */
++
+ /*
+ * for illegal requests, mark all nodes as ASN_NULL
+ */
+diff --git a/apps/snmpset.c b/apps/snmpset.c
+index a2374bc..cd01b9a 100644
+--- a/apps/snmpset.c
++++ b/apps/snmpset.c
+@@ -182,6 +182,7 @@ main(int argc, char *argv[])
+ case 'x':
+ case 'd':
+ case 'b':
++ case 'n': /* undocumented */
+ #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
+ case 'I':
+ case 'U':
+diff --git a/testing/fulltests/default/T0142snmpv2csetnull_simple b/testing/fulltests/default/T0142snmpv2csetnull_simple
+new file mode 100644
+index 0000000..0f1b8f3
+--- /dev/null
++++ b/testing/fulltests/default/T0142snmpv2csetnull_simple
+@@ -0,0 +1,31 @@
++#!/bin/sh
++
++. ../support/simple_eval_tools.sh
++
++HEADER SNMPv2c set of system.sysContact.0 with NULL varbind
++
++SKIPIF NETSNMP_DISABLE_SET_SUPPORT
++SKIPIF NETSNMP_NO_WRITE_SUPPORT
++SKIPIF NETSNMP_DISABLE_SNMPV2C
++SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE
++
++#
++# Begin test
++#
++
++# standard V2C configuration: testcomunnity
++snmp_write_access='all'
++. ./Sv2cconfig
++STARTAGENT
++
++CAPTURE "snmpget -On $SNMP_FLAGS -c testcommunity -v 2c $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.4.0"
++
++CHECK ".1.3.6.1.2.1.1.4.0 = STRING:"
++
++CAPTURE "snmpset -On $SNMP_FLAGS -c testcommunity -v 2c $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.4.0 n x"
++
++CHECK "Reason: wrongType"
++
++STOPAGENT
++
++FINISHED
+--
+2.25.1
+
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
index 6b4b6ce8ed..79f2c1d89d 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
@@ -35,6 +35,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
file://CVE-2020-15861-0004.patch \
file://CVE-2020-15861-0005.patch \
file://CVE-2020-15862.patch \
+ file://CVE-2022-44792-CVE-2022-44793.patch \
"
SRC_URI[md5sum] = "63bfc65fbb86cdb616598df1aff6458a"
SRC_URI[sha256sum] = "b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf"
diff --git a/meta-networking/recipes-protocols/openflow/openflow.inc b/meta-networking/recipes-protocols/openflow/openflow.inc
index cccbfa19a6..c425b48e19 100644
--- a/meta-networking/recipes-protocols/openflow/openflow.inc
+++ b/meta-networking/recipes-protocols/openflow/openflow.inc
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2"
-SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git"
+SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git;branch=master"
DEPENDS = "virtual/libc"
@@ -35,3 +35,7 @@ do_install_append() {
# Remove /var/run as it is created on startup
rm -rf ${D}${localstatedir}/run
}
+
+# This CVE is not for this product but cve-check assumes it is
+# because two CPE collides when checking the NVD database
+CVE_CHECK_WHITELIST = "CVE-2018-1078"
diff --git a/meta-networking/recipes-protocols/quagga/files/CVE-2021-44038.patch b/meta-networking/recipes-protocols/quagga/files/CVE-2021-44038.patch
new file mode 100644
index 0000000000..bdb48a3993
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/CVE-2021-44038.patch
@@ -0,0 +1,117 @@
+From b2484f4df6414a6b3dd68b4069b79279c746cc27 Mon Sep 17 00:00:00 2001
+From: Marius Tomaschewski <mt@suse.com>
+Date: Fri Nov 11 09:07:22 UTC 2022
+Subject: [PATCH] quagga: unsafe chown/chmod operations may lead to privileges escalation
+
+Reference: https://bugzilla.suse.com/show_bug.cgi?id=1191890
+
+Patch taken from https://build.opensuse.org/package/view_file/network/quagga/remove-chown-chmod.service.patch
+
+CVE: CVE-2021-44038
+Signed-off-by: Marius Tomaschewski <mt@suse.com>
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ redhat/bgpd.service | 2 --
+ redhat/isisd.service | 2 --
+ redhat/ospf6d.service | 2 --
+ redhat/ospfd.service | 2 --
+ redhat/ripd.service | 2 --
+ redhat/ripngd.service | 2 --
+ redhat/zebra.service | 3 ---
+ 7 files changed, 15 deletions(-)
+
+diff --git a/redhat/bgpd.service b/redhat/bgpd.service
+index a50bfff..6f46a97 100644
+--- a/redhat/bgpd.service
++++ b/redhat/bgpd.service
+@@ -10,8 +10,6 @@ Documentation=man:bgpd
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/sysconfig/quagga
+-ExecStartPre=-/bin/chmod -f 640 /etc/quagga/bgpd.conf
+-ExecStartPre=-/bin/chown -f $QUAGGA_USER:$QUAGGA_GROUP /etc/quagga/bgpd.conf
+ ExecStart=/usr/sbin/bgpd -d $BGPD_OPTS -f /etc/quagga/bgpd.conf
+ Restart=on-abort
+
+diff --git a/redhat/isisd.service b/redhat/isisd.service
+index 93663aa..c1464c0 100644
+--- a/redhat/isisd.service
++++ b/redhat/isisd.service
+@@ -10,8 +10,6 @@ Documentation=man:isisd
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/sysconfig/quagga
+-ExecStartPre=-/bin/chmod -f 640 /etc/quagga/isisd.conf
+-ExecStartPre=-/bin/chown -f $QUAGGA_USER:$QUAGGA_GROUP /etc/quagga/isisd.conf
+ ExecStart=/usr/sbin/isisd -d $ISISD_OPTS -f /etc/quagga/isisd.conf
+ Restart=on-abort
+
+diff --git a/redhat/ospf6d.service b/redhat/ospf6d.service
+index 3c1c978..d493429 100644
+--- a/redhat/ospf6d.service
++++ b/redhat/ospf6d.service
+@@ -10,8 +10,6 @@ Documentation=man:ospf6d
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/sysconfig/quagga
+-ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ospf6d.conf
+-ExecStartPre=-/bin/chown -f $QUAGGA_USER:$QUAGGA_GROUP /etc/quagga/ospf6d.conf
+ ExecStart=/usr/sbin/ospf6d -d $OSPF6D_OPTS -f /etc/quagga/ospf6d.conf
+ Restart=on-abort
+
+diff --git a/redhat/ospfd.service b/redhat/ospfd.service
+index 0084b6c..6c84580 100644
+--- a/redhat/ospfd.service
++++ b/redhat/ospfd.service
+@@ -10,8 +10,6 @@ Documentation=man:ospfd
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/sysconfig/quagga
+-ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ospfd.conf
+-ExecStartPre=-/bin/chown -f $QUAGGA_USER:$QUAGGA_GROUP /etc/quagga/ospfd.conf
+ ExecStart=/usr/sbin/ospfd -d $OSPFD_OPTS -f /etc/quagga/ospfd.conf
+ Restart=on-abort
+
+diff --git a/redhat/ripd.service b/redhat/ripd.service
+index 103b5a9..be0f75c 100644
+--- a/redhat/ripd.service
++++ b/redhat/ripd.service
+@@ -10,8 +10,6 @@ Documentation=man:ripd
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/sysconfig/quagga
+-ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ripd.conf
+-ExecStartPre=-/bin/chown -f $QUAGGA_USER:$QUAGGA_GROUP /etc/quagga/ripd.conf
+ ExecStart=/usr/sbin/ripd -d $RIPD_OPTS -f /etc/quagga/ripd.conf
+ Restart=on-abort
+
+diff --git a/redhat/ripngd.service b/redhat/ripngd.service
+index 6fe6ba8..23447da 100644
+--- a/redhat/ripngd.service
++++ b/redhat/ripngd.service
+@@ -10,8 +10,6 @@ Documentation=man:ripngd
+ [Service]
+ Type=forking
+ EnvironmentFile=/etc/sysconfig/quagga
+-ExecStartPre=-/bin/chmod -f 640 /etc/quagga/ripngd.conf
+-ExecStartPre=-/bin/chown -f $QUAGGA_USER:$QUAGGA_GROUP /etc/quagga/ripngd.conf
+ ExecStart=/usr/sbin/ripngd -d $RIPNGD_OPTS -f /etc/quagga/ripngd.conf
+ Restart=on-abort
+
+diff --git a/redhat/zebra.service b/redhat/zebra.service
+index fa5a004..e3cf0ab 100644
+--- a/redhat/zebra.service
++++ b/redhat/zebra.service
+@@ -10,9 +10,6 @@ Documentation=man:zebra
+ Type=forking
+ EnvironmentFile=-/etc/sysconfig/quagga
+ ExecStartPre=/sbin/ip route flush proto zebra
+-ExecStartPre=-/bin/chmod -f 640 /etc/quagga/vtysh.conf /etc/quagga/zebra.conf
+-ExecStartPre=-/bin/chown -f $QUAGGA_USER:$QUAGGA_GROUP /run/quagga /etc/quagga/zebra.conf
+-ExecStartPre=-/bin/chown -f ${QUAGGA_USER}${VTY_GROUP:+":$VTY_GROUP"} quaggavty /etc/quagga/vtysh.conf
+ ExecStart=/usr/sbin/zebra -d $ZEBRA_OPTS -f /etc/quagga/zebra.conf
+ Restart=on-abort
+
+--
+2.25.1
+
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
index 134a33d478..5ef3843b15 100644
--- a/meta-networking/recipes-protocols/quagga/quagga.inc
+++ b/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -34,8 +34,8 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quagga/quagga-${PV}.tar.gz; \
file://ripd.service \
file://ripngd.service \
file://zebra.service \
+ file://CVE-2021-44038.patch \
"
-
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
PACKAGECONFIG[pam] = "--with-libpam, --without-libpam, libpam"
diff --git a/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb b/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb
index 4f8e4d4282..dcfa7406d2 100644
--- a/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb
+++ b/meta-networking/recipes-protocols/usrsctp/usrsctp_git.bb
@@ -23,3 +23,5 @@ PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,"
PACKAGECONFIG[inet6] = "--enable-inet6,--disable-inet6,"
EXTRA_OECONF += "--disable-debug"
+
+CVE_VERSION = "0.9.3.0"
diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb
index b02e183db7..181698d778 100644
--- a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb
+++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.14.bb
@@ -8,7 +8,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "git://github.com/xelerance/xl2tpd.git"
+SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https"
SRCREV = "ba619c79c4790c78c033df0abde4a9a5de744a08"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/arptables/arptables_git.bb b/meta-networking/recipes-support/arptables/arptables_git.bb
index c02a19944d..b59dc4ca1b 100644
--- a/meta-networking/recipes-support/arptables/arptables_git.bb
+++ b/meta-networking/recipes-support/arptables/arptables_git.bb
@@ -6,7 +6,7 @@ SRCREV = "efae8949e31f8b2eb6290f377a28384cecaf105a"
PV = "0.0.5+git${SRCPV}"
SRC_URI = " \
- git://git.netfilter.org/arptables \
+ git://git.netfilter.org/arptables;branch=master \
file://0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch \
file://arptables-arpt-get-target-fix.patch \
file://arptables.service \
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
index 1c87c48bfa..4b195ededa 100644
--- a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
+++ b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.6.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37"
SRCREV = "42c1aefc303fdf891fbb099ea51f00dca83ab606"
SRC_URI = "\
- git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git \
+ git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git;branch=main \
file://kernel-headers.patch \
file://0005-build-don-t-ignore-CFLAGS-from-environment.patch \
file://0006-libbridge-Modifying-the-AR-to-cross-toolchain.patch \
diff --git a/meta-networking/recipes-support/cifs/cifs-utils_6.10.bb b/meta-networking/recipes-support/cifs/cifs-utils_6.10.bb
index 8d82ee4546..e76481cc1b 100644
--- a/meta-networking/recipes-support/cifs/cifs-utils_6.10.bb
+++ b/meta-networking/recipes-support/cifs/cifs-utils_6.10.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PV = "6.10"
SRCREV = "5ff5fc2ecc10353fd39ad508db5c2828fd2d8d9a"
-SRC_URI = "git://git.samba.org/cifs-utils.git"
+SRC_URI = "git://git.samba.org/cifs-utils.git;branch=master"
S = "${WORKDIR}/git"
DEPENDS += "libtalloc"
diff --git a/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb b/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
index 799cf8611c..3da651c478 100644
--- a/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
+++ b/meta-networking/recipes-support/curlpp/curlpp_0.8.1.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=fd0c9adf285a69aa3b4faf34384e1029"
DEPENDS = "curl"
DEPENDS_class-native = "curl-native"
-SRC_URI = "git://github.com/jpbarrette/curlpp.git"
+SRC_URI = "git://github.com/jpbarrette/curlpp.git;branch=master;protocol=https"
SRCREV = "592552a165cc569dac7674cb7fc9de3dc829906f"
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2021-3448.patch b/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2021-3448.patch
new file mode 100644
index 0000000000..360931a83b
--- /dev/null
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2021-3448.patch
@@ -0,0 +1,1040 @@
+From 74d4fcd756a85bc1823232ea74334f7ccfb9d5d2 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Mon, 15 Mar 2021 21:59:51 +0000
+Subject: [PATCH] Use random source ports where possible if source
+ addresses/interfaces in use.
+
+CVE-2021-3448 applies.
+
+It's possible to specify the source address or interface to be
+used when contacting upstream nameservers: server=8.8.8.8@1.2.3.4
+or server=8.8.8.8@1.2.3.4#66 or server=8.8.8.8@eth0, and all of
+these have, until now, used a single socket, bound to a fixed
+port. This was originally done to allow an error (non-existent
+interface, or non-local address) to be detected at start-up. This
+means that any upstream servers specified in such a way don't use
+random source ports, and are more susceptible to cache-poisoning
+attacks.
+
+We now use random ports where possible, even when the
+source is specified, so server=8.8.8.8@1.2.3.4 or
+server=8.8.8.8@eth0 will use random source
+ports. server=8.8.8.8@1.2.3.4#66 or any use of --query-port will
+use the explicitly configured port, and should only be done with
+understanding of the security implications.
+Note that this change changes non-existing interface, or non-local
+source address errors from fatal to run-time. The error will be
+logged and communiction with the server not possible.
+
+Upstream-Status: Backport
+CVE: CVE-2021-3448
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ CHANGELOG | 22 +++
+ man/dnsmasq.8 | 4 +-
+ src/dnsmasq.c | 31 ++--
+ src/dnsmasq.h | 26 ++--
+ src/forward.c | 392 ++++++++++++++++++++++++++++++--------------------
+ src/loop.c | 20 +--
+ src/network.c | 110 +++++---------
+ src/option.c | 3 +-
+ src/tftp.c | 6 +-
+ src/util.c | 2 +-
+ 10 files changed, 344 insertions(+), 272 deletions(-)
+
+Index: dnsmasq-2.81/man/dnsmasq.8
+===================================================================
+--- dnsmasq-2.81.orig/man/dnsmasq.8
++++ dnsmasq-2.81/man/dnsmasq.8
+@@ -489,7 +489,7 @@ source address specified but the port ma
+ part of the source address. Forcing queries to an interface is not
+ implemented on all platforms supported by dnsmasq.
+ .TP
+-.B --rev-server=<ip-address>/<prefix-len>[,<ipaddr>][#<port>][@<source-ip>|<interface>[#<port>]]
++.B --rev-server=<ip-address>/<prefix-len>[,<ipaddr>][#<port>][@<interface>][@<source-ip>[#<port>]]
+ This is functionally the same as
+ .B --server,
+ but provides some syntactic sugar to make specifying address-to-name queries easier. For example
+Index: dnsmasq-2.81/src/dnsmasq.c
+===================================================================
+--- dnsmasq-2.81.orig/src/dnsmasq.c
++++ dnsmasq-2.81/src/dnsmasq.c
+@@ -1668,6 +1668,7 @@ static int set_dns_listeners(time_t now)
+ {
+ struct serverfd *serverfdp;
+ struct listener *listener;
++ struct randfd_list *rfl;
+ int wait = 0, i;
+
+ #ifdef HAVE_TFTP
+@@ -1688,11 +1689,14 @@ static int set_dns_listeners(time_t now)
+ for (serverfdp = daemon->sfds; serverfdp; serverfdp = serverfdp->next)
+ poll_listen(serverfdp->fd, POLLIN);
+
+- if (daemon->port != 0 && !daemon->osport)
+- for (i = 0; i < RANDOM_SOCKS; i++)
+- if (daemon->randomsocks[i].refcount != 0)
+- poll_listen(daemon->randomsocks[i].fd, POLLIN);
+-
++ for (i = 0; i < RANDOM_SOCKS; i++)
++ if (daemon->randomsocks[i].refcount != 0)
++ poll_listen(daemon->randomsocks[i].fd, POLLIN);
++
++ /* Check overflow random sockets too. */
++ for (rfl = daemon->rfl_poll; rfl; rfl = rfl->next)
++ poll_listen(rfl->rfd->fd, POLLIN);
++
+ for (listener = daemon->listeners; listener; listener = listener->next)
+ {
+ /* only listen for queries if we have resources */
+@@ -1729,18 +1733,23 @@ static void check_dns_listeners(time_t n
+ {
+ struct serverfd *serverfdp;
+ struct listener *listener;
++ struct randfd_list *rfl;
+ int i;
+ int pipefd[2];
+
+ for (serverfdp = daemon->sfds; serverfdp; serverfdp = serverfdp->next)
+ if (poll_check(serverfdp->fd, POLLIN))
+- reply_query(serverfdp->fd, serverfdp->source_addr.sa.sa_family, now);
++ reply_query(serverfdp->fd, now);
+
+- if (daemon->port != 0 && !daemon->osport)
+- for (i = 0; i < RANDOM_SOCKS; i++)
+- if (daemon->randomsocks[i].refcount != 0 &&
+- poll_check(daemon->randomsocks[i].fd, POLLIN))
+- reply_query(daemon->randomsocks[i].fd, daemon->randomsocks[i].family, now);
++ for (i = 0; i < RANDOM_SOCKS; i++)
++ if (daemon->randomsocks[i].refcount != 0 &&
++ poll_check(daemon->randomsocks[i].fd, POLLIN))
++ reply_query(daemon->randomsocks[i].fd, now);
++
++ /* Check overflow random sockets too. */
++ for (rfl = daemon->rfl_poll; rfl; rfl = rfl->next)
++ if (poll_check(rfl->rfd->fd, POLLIN))
++ reply_query(rfl->rfd->fd, now);
+
+ /* Races. The child process can die before we read all of the data from the
+ pipe, or vice versa. Therefore send tcp_pids to zero when we wait() the
+Index: dnsmasq-2.81/src/dnsmasq.h
+===================================================================
+--- dnsmasq-2.81.orig/src/dnsmasq.h
++++ dnsmasq-2.81/src/dnsmasq.h
+@@ -542,13 +542,20 @@ struct serverfd {
+ };
+
+ struct randfd {
++ struct server *serv;
+ int fd;
+- unsigned short refcount, family;
++ unsigned short refcount; /* refcount == 0xffff means overflow record. */
+ };
+-
++
++struct randfd_list {
++ struct randfd *rfd;
++ struct randfd_list *next;
++};
++
+ struct server {
+ union mysockaddr addr, source_addr;
+ char interface[IF_NAMESIZE+1];
++ unsigned int ifindex; /* corresponding to interface, above */
+ struct serverfd *sfd;
+ char *domain; /* set if this server only handles a domain. */
+ int flags, tcpfd, edns_pktsz;
+@@ -669,8 +676,7 @@ struct frec {
+ struct frec_src *next;
+ } frec_src;
+ struct server *sentto; /* NULL means free */
+- struct randfd *rfd4;
+- struct randfd *rfd6;
++ struct randfd_list *rfds;
+ unsigned short new_id;
+ int fd, forwardall, flags;
+ time_t time;
+@@ -1100,11 +1106,12 @@ extern struct daemon {
+ int forwardcount;
+ struct server *srv_save; /* Used for resend on DoD */
+ size_t packet_len; /* " " */
+- struct randfd *rfd_save; /* " " */
++ int fd_save; /* " " */
+ pid_t tcp_pids[MAX_PROCS];
+ int tcp_pipes[MAX_PROCS];
+ int pipe_to_parent;
+ struct randfd randomsocks[RANDOM_SOCKS];
++ struct randfd_list *rfl_spare, *rfl_poll;
+ int v6pktinfo;
+ struct addrlist *interface_addrs; /* list of all addresses/prefix lengths associated with all local interfaces */
+ int log_id, log_display_id; /* ids of transactions for logging */
+@@ -1275,7 +1282,7 @@ void safe_strncpy(char *dest, const char
+ void safe_pipe(int *fd, int read_noblock);
+ void *whine_malloc(size_t size);
+ int sa_len(union mysockaddr *addr);
+-int sockaddr_isequal(union mysockaddr *s1, union mysockaddr *s2);
++int sockaddr_isequal(const union mysockaddr *s1, const union mysockaddr *s2);
+ int hostname_isequal(const char *a, const char *b);
+ int hostname_issubdomain(char *a, char *b);
+ time_t dnsmasq_time(void);
+@@ -1326,7 +1333,7 @@ char *parse_server(char *arg, union myso
+ int option_read_dynfile(char *file, int flags);
+
+ /* forward.c */
+-void reply_query(int fd, int family, time_t now);
++void reply_query(int fd, time_t now);
+ void receive_query(struct listener *listen, time_t now);
+ unsigned char *tcp_request(int confd, time_t now,
+ union mysockaddr *local_addr, struct in_addr netmask, int auth_dns);
+@@ -1336,13 +1343,12 @@ int send_from(int fd, int nowild, char *
+ union mysockaddr *to, union all_addr *source,
+ unsigned int iface);
+ void resend_query(void);
+-struct randfd *allocate_rfd(int family);
+-void free_rfd(struct randfd *rfd);
++int allocate_rfd(struct randfd_list **fdlp, struct server *serv);
++void free_rfds(struct randfd_list **fdlp);
+
+ /* network.c */
+ int indextoname(int fd, int index, char *name);
+ int local_bind(int fd, union mysockaddr *addr, char *intname, unsigned int ifindex, int is_tcp);
+-int random_sock(int family);
+ void pre_allocate_sfds(void);
+ int reload_servers(char *fname);
+ void mark_servers(int flag);
+Index: dnsmasq-2.81/src/forward.c
+===================================================================
+--- dnsmasq-2.81.orig/src/forward.c
++++ dnsmasq-2.81/src/forward.c
+@@ -16,7 +16,7 @@
+
+ #include "dnsmasq.h"
+
+-static struct frec *lookup_frec(unsigned short id, int fd, int family, void *hash);
++static struct frec *lookup_frec(unsigned short id, int fd, void *hash);
+ static struct frec *lookup_frec_by_sender(unsigned short id,
+ union mysockaddr *addr,
+ void *hash);
+@@ -307,26 +307,18 @@ static int forward_query(int udpfd, unio
+ if (find_pseudoheader(header, plen, NULL, &pheader, &is_sign, NULL) && !is_sign)
+ PUTSHORT(SAFE_PKTSZ, pheader);
+
+- if (forward->sentto->addr.sa.sa_family == AF_INET)
+- log_query(F_NOEXTRA | F_DNSSEC | F_IPV4, "retry", (union all_addr *)&forward->sentto->addr.in.sin_addr, "dnssec");
+- else
+- log_query(F_NOEXTRA | F_DNSSEC | F_IPV6, "retry", (union all_addr *)&forward->sentto->addr.in6.sin6_addr, "dnssec");
+-
+-
+- if (forward->sentto->sfd)
+- fd = forward->sentto->sfd->fd;
+- else
++ if ((fd = allocate_rfd(&forward->rfds, forward->sentto)) != -1)
+ {
+- if (forward->sentto->addr.sa.sa_family == AF_INET6)
+- fd = forward->rfd6->fd;
++ if (forward->sentto->addr.sa.sa_family == AF_INET)
++ log_query(F_NOEXTRA | F_DNSSEC | F_IPV4, "retry", (union all_addr *)&forward->sentto->addr.in.sin_addr, "dnssec");
+ else
+- fd = forward->rfd4->fd;
++ log_query(F_NOEXTRA | F_DNSSEC | F_IPV6, "retry", (union all_addr *)&forward->sentto->addr.in6.sin6_addr, "dnssec");
++
++ while (retry_send(sendto(fd, (char *)header, plen, 0,
++ &forward->sentto->addr.sa,
++ sa_len(&forward->sentto->addr))));
+ }
+
+- while (retry_send(sendto(fd, (char *)header, plen, 0,
+- &forward->sentto->addr.sa,
+- sa_len(&forward->sentto->addr))));
+-
+ return 1;
+ }
+ #endif
+@@ -501,49 +493,28 @@ static int forward_query(int udpfd, unio
+
+ while (1)
+ {
++ int fd;
++
+ /* only send to servers dealing with our domain.
+ domain may be NULL, in which case server->domain
+ must be NULL also. */
+
+ if (type == (start->flags & SERV_TYPE) &&
+ (type != SERV_HAS_DOMAIN || hostname_isequal(domain, start->domain)) &&
+- !(start->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)))
++ !(start->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)) &&
++ ((fd = allocate_rfd(&forward->rfds, start)) != -1))
+ {
+- int fd;
+-
+- /* find server socket to use, may need to get random one. */
+- if (start->sfd)
+- fd = start->sfd->fd;
+- else
+- {
+- if (start->addr.sa.sa_family == AF_INET6)
+- {
+- if (!forward->rfd6 &&
+- !(forward->rfd6 = allocate_rfd(AF_INET6)))
+- break;
+- daemon->rfd_save = forward->rfd6;
+- fd = forward->rfd6->fd;
+- }
+- else
+- {
+- if (!forward->rfd4 &&
+- !(forward->rfd4 = allocate_rfd(AF_INET)))
+- break;
+- daemon->rfd_save = forward->rfd4;
+- fd = forward->rfd4->fd;
+- }
+
+ #ifdef HAVE_CONNTRACK
+- /* Copy connection mark of incoming query to outgoing connection. */
+- if (option_bool(OPT_CONNTRACK))
+- {
+- unsigned int mark;
+- if (get_incoming_mark(&forward->source, &forward->dest, 0, &mark))
+- setsockopt(fd, SOL_SOCKET, SO_MARK, &mark, sizeof(unsigned int));
+- }
+-#endif
++ /* Copy connection mark of incoming query to outgoing connection. */
++ if (option_bool(OPT_CONNTRACK))
++ {
++ unsigned int mark;
++ if (get_incoming_mark(&forward->frec_src.source, &forward->frec_src.dest, 0, &mark))
++ setsockopt(fd, SOL_SOCKET, SO_MARK, &mark, sizeof(unsigned int));
+ }
+-
++#endif
++
+ #ifdef HAVE_DNSSEC
+ if (option_bool(OPT_DNSSEC_VALID) && (forward->flags & FREC_ADDED_PHEADER))
+ {
+@@ -574,6 +545,7 @@ static int forward_query(int udpfd, unio
+ /* Keep info in case we want to re-send this packet */
+ daemon->srv_save = start;
+ daemon->packet_len = plen;
++ daemon->fd_save = fd;
+
+ if (!gotname)
+ strcpy(daemon->namebuff, "query");
+@@ -590,7 +562,7 @@ static int forward_query(int udpfd, unio
+ break;
+ forward->forwardall++;
+ }
+- }
++ }
+
+ if (!(start = start->next))
+ start = daemon->servers;
+@@ -805,7 +777,7 @@ static size_t process_reply(struct dns_h
+ }
+
+ /* sets new last_server */
+-void reply_query(int fd, int family, time_t now)
++void reply_query(int fd, time_t now)
+ {
+ /* packet from peer server, extract data for cache, and send to
+ original requester */
+@@ -820,9 +792,9 @@ void reply_query(int fd, int family, tim
+
+ /* packet buffer overwritten */
+ daemon->srv_save = NULL;
+-
++
+ /* Determine the address of the server replying so that we can mark that as good */
+- if ((serveraddr.sa.sa_family = family) == AF_INET6)
++ if (serveraddr.sa.sa_family == AF_INET6)
+ serveraddr.in6.sin6_flowinfo = 0;
+
+ header = (struct dns_header *)daemon->packet;
+@@ -845,7 +817,7 @@ void reply_query(int fd, int family, tim
+
+ hash = hash_questions(header, n, daemon->namebuff);
+
+- if (!(forward = lookup_frec(ntohs(header->id), fd, family, hash)))
++ if (!(forward = lookup_frec(ntohs(header->id), fd, hash)))
+ return;
+
+ #ifdef HAVE_DUMPFILE
+@@ -900,25 +872,8 @@ void reply_query(int fd, int family, tim
+ }
+
+
+- if (start->sfd)
+- fd = start->sfd->fd;
+- else
+- {
+- if (start->addr.sa.sa_family == AF_INET6)
+- {
+- /* may have changed family */
+- if (!forward->rfd6)
+- forward->rfd6 = allocate_rfd(AF_INET6);
+- fd = forward->rfd6->fd;
+- }
+- else
+- {
+- /* may have changed family */
+- if (!forward->rfd4)
+- forward->rfd4 = allocate_rfd(AF_INET);
+- fd = forward->rfd4->fd;
+- }
+- }
++ if ((fd = allocate_rfd(&forward->rfds, start)) == -1)
++ return;
+
+ #ifdef HAVE_DUMPFILE
+ dump_packet(DUMP_SEC_QUERY, (void *)header, (size_t)plen, NULL, &start->addr);
+@@ -1126,8 +1081,7 @@ void reply_query(int fd, int family, tim
+ }
+
+ new->sentto = server;
+- new->rfd4 = NULL;
+- new->rfd6 = NULL;
++ new->rfds = NULL;
+ new->frec_src.next = NULL;
+ new->flags &= ~(FREC_DNSKEY_QUERY | FREC_DS_QUERY | FREC_HAS_EXTRADATA);
+ new->forwardall = 0;
+@@ -1166,24 +1120,7 @@ void reply_query(int fd, int family, tim
+ /* Don't resend this. */
+ daemon->srv_save = NULL;
+
+- if (server->sfd)
+- fd = server->sfd->fd;
+- else
+- {
+- fd = -1;
+- if (server->addr.sa.sa_family == AF_INET6)
+- {
+- if (new->rfd6 || (new->rfd6 = allocate_rfd(AF_INET6)))
+- fd = new->rfd6->fd;
+- }
+- else
+- {
+- if (new->rfd4 || (new->rfd4 = allocate_rfd(AF_INET)))
+- fd = new->rfd4->fd;
+- }
+- }
+-
+- if (fd != -1)
++ if ((fd = allocate_rfd(&new->rfds, server)) != -1)
+ {
+ #ifdef HAVE_CONNTRACK
+ /* Copy connection mark of incoming query to outgoing connection. */
+@@ -1344,7 +1281,7 @@ void receive_query(struct listener *list
+
+ /* packet buffer overwritten */
+ daemon->srv_save = NULL;
+-
++
+ dst_addr_4.s_addr = dst_addr.addr4.s_addr = 0;
+ netmask.s_addr = 0;
+
+@@ -2207,9 +2144,8 @@ static struct frec *allocate_frec(time_t
+ f->next = daemon->frec_list;
+ f->time = now;
+ f->sentto = NULL;
+- f->rfd4 = NULL;
++ f->rfds = NULL;
+ f->flags = 0;
+- f->rfd6 = NULL;
+ #ifdef HAVE_DNSSEC
+ f->dependent = NULL;
+ f->blocking_query = NULL;
+@@ -2221,46 +2157,192 @@ static struct frec *allocate_frec(time_t
+ return f;
+ }
+
+-struct randfd *allocate_rfd(int family)
++/* return a UDP socket bound to a random port, have to cope with straying into
++ occupied port nos and reserved ones. */
++static int random_sock(struct server *s)
++{
++ int fd;
++
++ if ((fd = socket(s->source_addr.sa.sa_family, SOCK_DGRAM, 0)) != -1)
++ {
++ if (local_bind(fd, &s->source_addr, s->interface, s->ifindex, 0))
++ return fd;
++
++ if (s->interface[0] == 0)
++ (void)prettyprint_addr(&s->source_addr, daemon->namebuff);
++ else
++ strcpy(daemon->namebuff, s->interface);
++
++ my_syslog(LOG_ERR, _("failed to bind server socket to %s: %s"),
++ daemon->namebuff, strerror(errno));
++ close(fd);
++ }
++
++ return -1;
++}
++
++/* compare source addresses and interface, serv2 can be null. */
++static int server_isequal(const struct server *serv1,
++ const struct server *serv2)
++{
++ return (serv2 &&
++ serv2->ifindex == serv1->ifindex &&
++ sockaddr_isequal(&serv2->source_addr, &serv1->source_addr) &&
++ strncmp(serv2->interface, serv1->interface, IF_NAMESIZE) == 0);
++}
++
++/* fdlp points to chain of randomfds already in use by transaction.
++ If there's already a suitable one, return it, else allocate a
++ new one and add it to the list.
++
++ Not leaking any resources in the face of allocation failures
++ is rather convoluted here.
++
++ Note that rfd->serv may be NULL, when a server goes away.
++*/
++int allocate_rfd(struct randfd_list **fdlp, struct server *serv)
+ {
+ static int finger = 0;
+- int i;
++ int i, j = 0;
++ struct randfd_list *rfl;
++ struct randfd *rfd = NULL;
++ int fd = 0;
++
++ /* If server has a pre-allocated fd, use that. */
++ if (serv->sfd)
++ return serv->sfd->fd;
++
++ /* existing suitable random port socket linked to this transaction? */
++ for (rfl = *fdlp; rfl; rfl = rfl->next)
++ if (server_isequal(serv, rfl->rfd->serv))
++ return rfl->rfd->fd;
++
++ /* No. need new link. */
++ if ((rfl = daemon->rfl_spare))
++ daemon->rfl_spare = rfl->next;
++ else if (!(rfl = whine_malloc(sizeof(struct randfd_list))))
++ return -1;
+
+ /* limit the number of sockets we have open to avoid starvation of
+ (eg) TFTP. Once we have a reasonable number, randomness should be OK */
+-
+ for (i = 0; i < RANDOM_SOCKS; i++)
+ if (daemon->randomsocks[i].refcount == 0)
+ {
+- if ((daemon->randomsocks[i].fd = random_sock(family)) == -1)
+- break;
+-
+- daemon->randomsocks[i].refcount = 1;
+- daemon->randomsocks[i].family = family;
+- return &daemon->randomsocks[i];
++ if ((fd = random_sock(serv)) != -1)
++ {
++ rfd = &daemon->randomsocks[i];
++ rfd->serv = serv;
++ rfd->fd = fd;
++ rfd->refcount = 1;
++ }
++ break;
+ }
+
+ /* No free ones or cannot get new socket, grab an existing one */
+- for (i = 0; i < RANDOM_SOCKS; i++)
++ if (!rfd)
++ for (j = 0; j < RANDOM_SOCKS; j++)
++ {
++ i = (j + finger) % RANDOM_SOCKS;
++ if (daemon->randomsocks[i].refcount != 0 &&
++ server_isequal(serv, daemon->randomsocks[i].serv) &&
++ daemon->randomsocks[i].refcount != 0xfffe)
++ {
++ finger = i + 1;
++ rfd = &daemon->randomsocks[i];
++ rfd->refcount++;
++ break;
++ }
++ }
++
++ if (j == RANDOM_SOCKS)
+ {
+- int j = (i+finger) % RANDOM_SOCKS;
+- if (daemon->randomsocks[j].refcount != 0 &&
+- daemon->randomsocks[j].family == family &&
+- daemon->randomsocks[j].refcount != 0xffff)
++ struct randfd_list *rfl_poll;
++
++ /* there are no free slots, and non with the same parameters we can piggy-back on.
++ We're going to have to allocate a new temporary record, distinguished by
++ refcount == 0xffff. This will exist in the frec randfd list, never be shared,
++ and be freed when no longer in use. It will also be held on
++ the daemon->rfl_poll list so the poll system can find it. */
++
++ if ((rfl_poll = daemon->rfl_spare))
++ daemon->rfl_spare = rfl_poll->next;
++ else
++ rfl_poll = whine_malloc(sizeof(struct randfd_list));
++
++ if (!rfl_poll ||
++ !(rfd = whine_malloc(sizeof(struct randfd))) ||
++ (fd = random_sock(serv)) == -1)
+ {
+- finger = j;
+- daemon->randomsocks[j].refcount++;
+- return &daemon->randomsocks[j];
++
++ /* Don't leak anything we may already have */
++ rfl->next = daemon->rfl_spare;
++ daemon->rfl_spare = rfl;
++
++ if (rfl_poll)
++ {
++ rfl_poll->next = daemon->rfl_spare;
++ daemon->rfl_spare = rfl_poll;
++ }
++
++ if (rfd)
++ free(rfd);
++
++ return -1; /* doom */
+ }
++
++ /* Note rfd->serv not set here, since it's not reused */
++ rfd->fd = fd;
++ rfd->refcount = 0xffff; /* marker for temp record */
++
++ rfl_poll->rfd = rfd;
++ rfl_poll->next = daemon->rfl_poll;
++ daemon->rfl_poll = rfl_poll;
+ }
+
+- return NULL; /* doom */
++ rfl->rfd = rfd;
++ rfl->next = *fdlp;
++ *fdlp = rfl;
++
++ return rfl->rfd->fd;
+ }
+
+-void free_rfd(struct randfd *rfd)
++void free_rfds(struct randfd_list **fdlp)
+ {
+- if (rfd && --(rfd->refcount) == 0)
+- close(rfd->fd);
++ struct randfd_list *tmp, *rfl, *poll, *next, **up;
++
++ for (rfl = *fdlp; rfl; rfl = tmp)
++ {
++ if (rfl->rfd->refcount == 0xffff || --(rfl->rfd->refcount) == 0)
++ close(rfl->rfd->fd);
++
++ /* temporary overflow record */
++ if (rfl->rfd->refcount == 0xffff)
++ {
++ free(rfl->rfd);
++
++ /* go through the link of all these by steam to delete.
++ This list is expected to be almost always empty. */
++ for (poll = daemon->rfl_poll, up = &daemon->rfl_poll; poll; poll = next)
++ {
++ next = poll->next;
++
++ if (poll->rfd == rfl->rfd)
++ {
++ *up = poll->next;
++ poll->next = daemon->rfl_spare;
++ daemon->rfl_spare = poll;
++ }
++ else
++ up = &poll->next;
++ }
++ }
++
++ tmp = rfl->next;
++ rfl->next = daemon->rfl_spare;
++ daemon->rfl_spare = rfl;
++ }
++
++ *fdlp = NULL;
+ }
+
+ static void free_frec(struct frec *f)
+@@ -2276,12 +2358,9 @@ static void free_frec(struct frec *f)
+ }
+
+ f->frec_src.next = NULL;
+- free_rfd(f->rfd4);
+- f->rfd4 = NULL;
++ free_rfds(&f->rfds);
+ f->sentto = NULL;
+ f->flags = 0;
+- free_rfd(f->rfd6);
+- f->rfd6 = NULL;
+
+ #ifdef HAVE_DNSSEC
+ if (f->stash)
+@@ -2389,26 +2468,39 @@ struct frec *get_new_frec(time_t now, in
+ }
+
+ /* crc is all-ones if not known. */
+-static struct frec *lookup_frec(unsigned short id, int fd, int family, void *hash)
++static struct frec *lookup_frec(unsigned short id, int fd, void *hash)
+ {
+ struct frec *f;
++ struct server *s;
++ int type;
++ struct randfd_list *fdl;
+
+ for(f = daemon->frec_list; f; f = f->next)
+ if (f->sentto && f->new_id == id &&
+ (memcmp(hash, f->hash, HASH_SIZE) == 0))
+ {
+ /* sent from random port */
+- if (family == AF_INET && f->rfd4 && f->rfd4->fd == fd)
++ for (fdl = f->rfds; fdl; fdl = fdl->next)
++ if (fdl->rfd->fd == fd)
+ return f;
++ }
+
+- if (family == AF_INET6 && f->rfd6 && f->rfd6->fd == fd)
+- return f;
++ /* Sent to upstream from socket associated with a server.
++ Note we have to iterate over all the possible servers, since they may
++ have different bound sockets. */
++ type = f->sentto->flags & SERV_TYPE;
++ s = f->sentto;
++ do {
++ if ((type == (s->flags & SERV_TYPE)) &&
++ (type != SERV_HAS_DOMAIN ||
++ (s->domain && hostname_isequal(f->sentto->domain, s->domain))) &&
++ !(s->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)) &&
++ s->sfd && s->sfd->fd == fd)
++ return f;
++
++ s = s->next ? s->next : daemon->servers;
++ } while (s != f->sentto);
+
+- /* sent to upstream from bound socket. */
+- if (f->sentto->sfd && f->sentto->sfd->fd == fd)
+- return f;
+- }
+-
+ return NULL;
+ }
+
+@@ -2454,30 +2546,26 @@ static struct frec *lookup_frec_by_query
+ void resend_query()
+ {
+ if (daemon->srv_save)
+- {
+- int fd;
+-
+- if (daemon->srv_save->sfd)
+- fd = daemon->srv_save->sfd->fd;
+- else if (daemon->rfd_save && daemon->rfd_save->refcount != 0)
+- fd = daemon->rfd_save->fd;
+- else
+- return;
+-
+- while(retry_send(sendto(fd, daemon->packet, daemon->packet_len, 0,
+- &daemon->srv_save->addr.sa,
+- sa_len(&daemon->srv_save->addr))));
+- }
++ while(retry_send(sendto(daemon->fd_save, daemon->packet, daemon->packet_len, 0,
++ &daemon->srv_save->addr.sa,
++ sa_len(&daemon->srv_save->addr))));
+ }
+
+ /* A server record is going away, remove references to it */
+ void server_gone(struct server *server)
+ {
+ struct frec *f;
++ int i;
+
+ for (f = daemon->frec_list; f; f = f->next)
+ if (f->sentto && f->sentto == server)
+ free_frec(f);
++
++ /* If any random socket refers to this server, NULL the reference.
++ No more references to the socket will be created in the future. */
++ for (i = 0; i < RANDOM_SOCKS; i++)
++ if (daemon->randomsocks[i].refcount != 0 && daemon->randomsocks[i].serv == server)
++ daemon->randomsocks[i].serv = NULL;
+
+ if (daemon->last_server == server)
+ daemon->last_server = NULL;
+Index: dnsmasq-2.81/src/loop.c
+===================================================================
+--- dnsmasq-2.81.orig/src/loop.c
++++ dnsmasq-2.81/src/loop.c
+@@ -22,6 +22,7 @@ static ssize_t loop_make_probe(u32 uid);
+ void loop_send_probes()
+ {
+ struct server *serv;
++ struct randfd_list *rfds = NULL;
+
+ if (!option_bool(OPT_LOOP_DETECT))
+ return;
+@@ -34,22 +35,15 @@ void loop_send_probes()
+ {
+ ssize_t len = loop_make_probe(serv->uid);
+ int fd;
+- struct randfd *rfd = NULL;
+
+- if (serv->sfd)
+- fd = serv->sfd->fd;
+- else
+- {
+- if (!(rfd = allocate_rfd(serv->addr.sa.sa_family)))
+- continue;
+- fd = rfd->fd;
+- }
++ if ((fd = allocate_rfd(&rfds, serv)) == -1)
++ continue;
+
+ while (retry_send(sendto(fd, daemon->packet, len, 0,
+ &serv->addr.sa, sa_len(&serv->addr))));
+-
+- free_rfd(rfd);
+ }
++
++ free_rfds(&rfds);
+ }
+
+ static ssize_t loop_make_probe(u32 uid)
+Index: dnsmasq-2.81/src/network.c
+===================================================================
+--- dnsmasq-2.81.orig/src/network.c
++++ dnsmasq-2.81/src/network.c
+@@ -545,6 +545,7 @@ int enumerate_interfaces(int reset)
+ #ifdef HAVE_AUTH
+ struct auth_zone *zone;
+ #endif
++ struct server *serv;
+
+ /* Do this max once per select cycle - also inhibits netlink socket use
+ in TCP child processes. */
+@@ -562,7 +563,21 @@ int enumerate_interfaces(int reset)
+
+ if ((param.fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1)
+ return 0;
+-
++
++ /* iface indexes can change when interfaces are created/destroyed.
++ We use them in the main forwarding control path, when the path
++ to a server is specified by an interface, so cache them.
++ Update the cache here. */
++ for (serv = daemon->servers; serv; serv = serv->next)
++ if (strlen(serv->interface) != 0)
++ {
++ struct ifreq ifr;
++
++ safe_strncpy(ifr.ifr_name, serv->interface, IF_NAMESIZE);
++ if (ioctl(param.fd, SIOCGIFINDEX, &ifr) != -1)
++ serv->ifindex = ifr.ifr_ifindex;
++ }
++
+ /* Mark interfaces for garbage collection */
+ for (iface = daemon->interfaces; iface; iface = iface->next)
+ iface->found = 0;
+@@ -658,7 +673,7 @@ int enumerate_interfaces(int reset)
+
+ errno = errsave;
+ spare = param.spare;
+-
++
+ return ret;
+ }
+
+@@ -798,10 +813,10 @@ int tcp_interface(int fd, int af)
+ /* use mshdr so that the CMSDG_* macros are available */
+ msg.msg_control = daemon->packet;
+ msg.msg_controllen = len = daemon->packet_buff_sz;
+-
++
+ /* we overwrote the buffer... */
+ daemon->srv_save = NULL;
+-
++
+ if (af == AF_INET)
+ {
+ if (setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &opt, sizeof(opt)) != -1 &&
+@@ -1102,59 +1117,6 @@ void join_multicast(int dienow)
+ }
+ #endif
+
+-/* return a UDP socket bound to a random port, have to cope with straying into
+- occupied port nos and reserved ones. */
+-int random_sock(int family)
+-{
+- int fd;
+-
+- if ((fd = socket(family, SOCK_DGRAM, 0)) != -1)
+- {
+- union mysockaddr addr;
+- unsigned int ports_avail = ((unsigned short)daemon->max_port - (unsigned short)daemon->min_port) + 1;
+- int tries = ports_avail < 30 ? 3 * ports_avail : 100;
+-
+- memset(&addr, 0, sizeof(addr));
+- addr.sa.sa_family = family;
+-
+- /* don't loop forever if all ports in use. */
+-
+- if (fix_fd(fd))
+- while(tries--)
+- {
+- unsigned short port = htons(daemon->min_port + (rand16() % ((unsigned short)ports_avail)));
+-
+- if (family == AF_INET)
+- {
+- addr.in.sin_addr.s_addr = INADDR_ANY;
+- addr.in.sin_port = port;
+-#ifdef HAVE_SOCKADDR_SA_LEN
+- addr.in.sin_len = sizeof(struct sockaddr_in);
+-#endif
+- }
+- else
+- {
+- addr.in6.sin6_addr = in6addr_any;
+- addr.in6.sin6_port = port;
+-#ifdef HAVE_SOCKADDR_SA_LEN
+- addr.in6.sin6_len = sizeof(struct sockaddr_in6);
+-#endif
+- }
+-
+- if (bind(fd, (struct sockaddr *)&addr, sa_len(&addr)) == 0)
+- return fd;
+-
+- if (errno != EADDRINUSE && errno != EACCES)
+- break;
+- }
+-
+- close(fd);
+- }
+-
+- return -1;
+-}
+-
+-
+ int local_bind(int fd, union mysockaddr *addr, char *intname, unsigned int ifindex, int is_tcp)
+ {
+ union mysockaddr addr_copy = *addr;
+@@ -1199,38 +1161,33 @@ int local_bind(int fd, union mysockaddr
+ return 1;
+ }
+
+-static struct serverfd *allocate_sfd(union mysockaddr *addr, char *intname)
++static struct serverfd *allocate_sfd(union mysockaddr *addr, char *intname, unsigned int ifindex)
+ {
+ struct serverfd *sfd;
+- unsigned int ifindex = 0;
+ int errsave;
+ int opt = 1;
+
+ /* when using random ports, servers which would otherwise use
+- the INADDR_ANY/port0 socket have sfd set to NULL */
+- if (!daemon->osport && intname[0] == 0)
++ the INADDR_ANY/port0 socket have sfd set to NULL, this is
++ anything without an explictly set source port. */
++ if (!daemon->osport)
+ {
+ errno = 0;
+
+ if (addr->sa.sa_family == AF_INET &&
+- addr->in.sin_addr.s_addr == INADDR_ANY &&
+ addr->in.sin_port == htons(0))
+ return NULL;
+
+ if (addr->sa.sa_family == AF_INET6 &&
+- memcmp(&addr->in6.sin6_addr, &in6addr_any, sizeof(in6addr_any)) == 0 &&
+ addr->in6.sin6_port == htons(0))
+ return NULL;
+ }
+
+- if (intname && strlen(intname) != 0)
+- ifindex = if_nametoindex(intname); /* index == 0 when not binding to an interface */
+-
+ /* may have a suitable one already */
+ for (sfd = daemon->sfds; sfd; sfd = sfd->next )
+- if (sockaddr_isequal(&sfd->source_addr, addr) &&
+- strcmp(intname, sfd->interface) == 0 &&
+- ifindex == sfd->ifindex)
++ if (ifindex == sfd->ifindex &&
++ sockaddr_isequal(&sfd->source_addr, addr) &&
++ strcmp(intname, sfd->interface) == 0)
+ return sfd;
+
+ /* need to make a new one. */
+@@ -1281,7 +1238,7 @@ void pre_allocate_sfds(void)
+ #ifdef HAVE_SOCKADDR_SA_LEN
+ addr.in.sin_len = sizeof(struct sockaddr_in);
+ #endif
+- if ((sfd = allocate_sfd(&addr, "")))
++ if ((sfd = allocate_sfd(&addr, "", 0)))
+ sfd->preallocated = 1;
+
+ memset(&addr, 0, sizeof(addr));
+@@ -1291,13 +1248,13 @@ void pre_allocate_sfds(void)
+ #ifdef HAVE_SOCKADDR_SA_LEN
+ addr.in6.sin6_len = sizeof(struct sockaddr_in6);
+ #endif
+- if ((sfd = allocate_sfd(&addr, "")))
++ if ((sfd = allocate_sfd(&addr, "", 0)))
+ sfd->preallocated = 1;
+ }
+
+ for (srv = daemon->servers; srv; srv = srv->next)
+ if (!(srv->flags & (SERV_LITERAL_ADDRESS | SERV_NO_ADDR | SERV_USE_RESOLV | SERV_NO_REBIND)) &&
+- !allocate_sfd(&srv->source_addr, srv->interface) &&
++ !allocate_sfd(&srv->source_addr, srv->interface, srv->ifindex) &&
+ errno != 0 &&
+ option_bool(OPT_NOWILD))
+ {
+@@ -1506,7 +1463,7 @@ void check_servers(void)
+
+ /* Do we need a socket set? */
+ if (!serv->sfd &&
+- !(serv->sfd = allocate_sfd(&serv->source_addr, serv->interface)) &&
++ !(serv->sfd = allocate_sfd(&serv->source_addr, serv->interface, serv->ifindex)) &&
+ errno != 0)
+ {
+ my_syslog(LOG_WARNING,
+Index: dnsmasq-2.81/src/option.c
+===================================================================
+--- dnsmasq-2.81.orig/src/option.c
++++ dnsmasq-2.81/src/option.c
+@@ -810,7 +810,8 @@ char *parse_server(char *arg, union myso
+ if (interface_opt)
+ {
+ #if defined(SO_BINDTODEVICE)
+- safe_strncpy(interface, interface_opt, IF_NAMESIZE);
++ safe_strncpy(interface, source, IF_NAMESIZE);
++ source = interface_opt;
+ #else
+ return _("interface binding not supported");
+ #endif
+Index: dnsmasq-2.81/src/tftp.c
+===================================================================
+--- dnsmasq-2.81.orig/src/tftp.c
++++ dnsmasq-2.81/src/tftp.c
+@@ -601,7 +601,7 @@ void check_tftp_listeners(time_t now)
+
+ /* we overwrote the buffer... */
+ daemon->srv_save = NULL;
+-
++
+ if ((len = get_block(daemon->packet, transfer)) == -1)
+ {
+ len = tftp_err_oops(daemon->packet, transfer->file->filename);
+Index: dnsmasq-2.81/src/util.c
+===================================================================
+--- dnsmasq-2.81.orig/src/util.c
++++ dnsmasq-2.81/src/util.c
+@@ -316,7 +316,7 @@ void *whine_malloc(size_t size)
+ return ret;
+ }
+
+-int sockaddr_isequal(union mysockaddr *s1, union mysockaddr *s2)
++int sockaddr_isequal(const union mysockaddr *s1, const union mysockaddr *s2)
+ {
+ if (s1->sa.sa_family == s2->sa.sa_family)
+ {
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2022-0934.patch b/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2022-0934.patch
new file mode 100644
index 0000000000..b2ef22c06f
--- /dev/null
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2022-0934.patch
@@ -0,0 +1,188 @@
+From 70df9f9104c8f0661966298b58caf794b99e26e1 Mon Sep 17 00:00:00 2001
+From: Hitendra Prajapati <hprajapati@mvista.com>
+Date: Thu, 22 Sep 2022 17:39:21 +0530
+Subject: [PATCH] CVE-2022-0934
+
+Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=03345ecefeb0d82e3c3a4c28f27c3554f0611b39]
+CVE: CVE-2022-0934
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ CHANGELOG | 2 ++
+ src/rfc3315.c | 48 +++++++++++++++++++++++++++---------------------
+ 2 files changed, 29 insertions(+), 21 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 60b08d0..d1d7e41 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -88,6 +88,8 @@ version 2.81
+
+ Add --script-on-renewal option.
+
++ Fix write-after-free error in DHCPv6 server code.
++ CVE-2022-0934 refers.
+
+ version 2.80
+ Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method
+diff --git a/src/rfc3315.c b/src/rfc3315.c
+index b3f0a0a..eef1360 100644
+--- a/src/rfc3315.c
++++ b/src/rfc3315.c
+@@ -33,9 +33,9 @@ struct state {
+ unsigned int mac_len, mac_type;
+ };
+
+-static int dhcp6_maybe_relay(struct state *state, void *inbuff, size_t sz,
++static int dhcp6_maybe_relay(struct state *state, unsigned char *inbuff, size_t sz,
+ struct in6_addr *client_addr, int is_unicast, time_t now);
+-static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_t sz, int is_unicast, time_t now);
++static int dhcp6_no_relay(struct state *state, int msg_type, unsigned char *inbuff, size_t sz, int is_unicast, time_t now);
+ static void log6_opts(int nest, unsigned int xid, void *start_opts, void *end_opts);
+ static void log6_packet(struct state *state, char *type, struct in6_addr *addr, char *string);
+ static void log6_quiet(struct state *state, char *type, struct in6_addr *addr, char *string);
+@@ -104,12 +104,12 @@ unsigned short dhcp6_reply(struct dhcp_context *context, int interface, char *if
+ }
+
+ /* This cost me blood to write, it will probably cost you blood to understand - srk. */
+-static int dhcp6_maybe_relay(struct state *state, void *inbuff, size_t sz,
++static int dhcp6_maybe_relay(struct state *state, unsigned char *inbuff, size_t sz,
+ struct in6_addr *client_addr, int is_unicast, time_t now)
+ {
+ void *end = inbuff + sz;
+ void *opts = inbuff + 34;
+- int msg_type = *((unsigned char *)inbuff);
++ int msg_type = *inbuff;
+ unsigned char *outmsgtypep;
+ void *opt;
+ struct dhcp_vendor *vendor;
+@@ -259,15 +259,15 @@ static int dhcp6_maybe_relay(struct state *state, void *inbuff, size_t sz,
+ return 1;
+ }
+
+-static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_t sz, int is_unicast, time_t now)
++static int dhcp6_no_relay(struct state *state, int msg_type, unsigned char *inbuff, size_t sz, int is_unicast, time_t now)
+ {
+ void *opt;
+- int i, o, o1, start_opts;
++ int i, o, o1, start_opts, start_msg;
+ struct dhcp_opt *opt_cfg;
+ struct dhcp_netid *tagif;
+ struct dhcp_config *config = NULL;
+ struct dhcp_netid known_id, iface_id, v6_id;
+- unsigned char *outmsgtypep;
++ unsigned char outmsgtype;
+ struct dhcp_vendor *vendor;
+ struct dhcp_context *context_tmp;
+ struct dhcp_mac *mac_opt;
+@@ -296,12 +296,13 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ v6_id.next = state->tags;
+ state->tags = &v6_id;
+
+- /* copy over transaction-id, and save pointer to message type */
+- if (!(outmsgtypep = put_opt6(inbuff, 4)))
++ start_msg = save_counter(-1);
++ /* copy over transaction-id */
++ if (!put_opt6(inbuff, 4))
+ return 0;
+ start_opts = save_counter(-1);
+- state->xid = outmsgtypep[3] | outmsgtypep[2] << 8 | outmsgtypep[1] << 16;
+-
++ state->xid = inbuff[3] | inbuff[2] << 8 | inbuff[1] << 16;
++
+ /* We're going to be linking tags from all context we use.
+ mark them as unused so we don't link one twice and break the list */
+ for (context_tmp = state->context; context_tmp; context_tmp = context_tmp->current)
+@@ -347,7 +348,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ (msg_type == DHCP6REQUEST || msg_type == DHCP6RENEW || msg_type == DHCP6RELEASE || msg_type == DHCP6DECLINE))
+
+ {
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+ o1 = new_opt6(OPTION6_STATUS_CODE);
+ put_opt6_short(DHCP6USEMULTI);
+ put_opt6_string("Use multicast");
+@@ -619,11 +620,11 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ struct dhcp_netid *solicit_tags;
+ struct dhcp_context *c;
+
+- *outmsgtypep = DHCP6ADVERTISE;
++ outmsgtype = DHCP6ADVERTISE;
+
+ if (opt6_find(state->packet_options, state->end, OPTION6_RAPID_COMMIT, 0))
+ {
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+ state->lease_allocate = 1;
+ o = new_opt6(OPTION6_RAPID_COMMIT);
+ end_opt6(o);
+@@ -809,7 +810,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ int start = save_counter(-1);
+
+ /* set reply message type */
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+ state->lease_allocate = 1;
+
+ log6_quiet(state, "DHCPREQUEST", NULL, ignore ? _("ignored") : NULL);
+@@ -921,7 +922,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ case DHCP6RENEW:
+ {
+ /* set reply message type */
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+
+ log6_quiet(state, "DHCPRENEW", NULL, NULL);
+
+@@ -1033,7 +1034,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ int good_addr = 0;
+
+ /* set reply message type */
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+
+ log6_quiet(state, "DHCPCONFIRM", NULL, NULL);
+
+@@ -1097,7 +1098,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ log6_quiet(state, "DHCPINFORMATION-REQUEST", NULL, ignore ? _("ignored") : state->hostname);
+ if (ignore)
+ return 0;
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+ tagif = add_options(state, 1);
+ break;
+ }
+@@ -1106,7 +1107,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ case DHCP6RELEASE:
+ {
+ /* set reply message type */
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+
+ log6_quiet(state, "DHCPRELEASE", NULL, NULL);
+
+@@ -1171,7 +1172,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ case DHCP6DECLINE:
+ {
+ /* set reply message type */
+- *outmsgtypep = DHCP6REPLY;
++ outmsgtype = DHCP6REPLY;
+
+ log6_quiet(state, "DHCPDECLINE", NULL, NULL);
+
+@@ -1251,7 +1252,12 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
+ }
+
+ }
+-
++
++ /* Fill in the message type. Note that we store the offset,
++ not a direct pointer, since the packet memory may have been
++ reallocated. */
++ ((unsigned char *)(daemon->outpacket.iov_base))[start_msg] = outmsgtype;
++
+ log_tags(tagif, state->xid);
+ log6_opts(0, state->xid, daemon->outpacket.iov_base + start_opts, daemon->outpacket.iov_base + save_counter(-1));
+
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2023-28450.patch b/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2023-28450.patch
new file mode 100644
index 0000000000..dd3bd27408
--- /dev/null
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq/CVE-2023-28450.patch
@@ -0,0 +1,63 @@
+From eb92fb32b746f2104b0f370b5b295bb8dd4bd5e5 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Tue, 7 Mar 2023 22:07:46 +0000
+Subject: [PATCH] Set the default maximum DNS UDP packet size to 1232.
+
+Upstream-Status: Backport [https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=eb92fb32b746f2104b0f370b5b295bb8dd4bd5e5]
+CVE: CVE-2023-28450
+Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
+---
+ CHANGELOG | 8 ++++++++
+ man/dnsmasq.8 | 3 ++-
+ src/config.h | 2 +-
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index d1d7e41..7a560d3 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -91,6 +91,14 @@ version 2.81
+ Fix write-after-free error in DHCPv6 server code.
+ CVE-2022-0934 refers.
+
++ Set the default maximum DNS UDP packet sice to 1232. This
++ has been the recommended value since 2020 because it's the
++ largest value that avoid fragmentation, and fragmentation
++ is just not reliable on the modern internet, especially
++ for IPv6. It's still possible to override this with
++ --edns-packet-max for special circumstances.
++
++
+ version 2.80
+ Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method
+ for the initial patch and motivation.
+diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
+index f2803f9..3cca4bc 100644
+--- a/man/dnsmasq.8
++++ b/man/dnsmasq.8
+@@ -168,7 +168,8 @@ to zero completely disables DNS function, leaving only DHCP and/or TFTP.
+ .TP
+ .B \-P, --edns-packet-max=<size>
+ Specify the largest EDNS.0 UDP packet which is supported by the DNS
+-forwarder. Defaults to 4096, which is the RFC5625-recommended size.
++forwarder. Defaults to 1232, which is the recommended size following the
++DNS flag day in 2020. Only increase if you know what you are doing.
+ .TP
+ .B \-Q, --query-port=<query_port>
+ Send outbound DNS queries from, and listen for their replies on, the
+diff --git a/src/config.h b/src/config.h
+index 54f6f48..29ac3e7 100644
+--- a/src/config.h
++++ b/src/config.h
+@@ -19,7 +19,7 @@
+ #define CHILD_LIFETIME 150 /* secs 'till terminated (RFC1035 suggests > 120s) */
+ #define TCP_MAX_QUERIES 100 /* Maximum number of queries per incoming TCP connection */
+ #define TCP_BACKLOG 32 /* kernel backlog limit for TCP connections */
+-#define EDNS_PKTSZ 4096 /* default max EDNS.0 UDP packet from RFC5625 */
++#define EDNS_PKTSZ 1232 /* default max EDNS.0 UDP packet from from /dnsflagday.net/2020 */
+ #define SAFE_PKTSZ 1280 /* "go anywhere" UDP packet size */
+ #define KEYBLOCK_LEN 40 /* choose to minimise fragmentation when storing DNSSEC keys */
+ #define DNSSEC_WORK 50 /* Max number of queries to validate one question */
+--
+2.18.2
+
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb
index a1dc0f3a0a..f2b8feac56 100644
--- a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.81.bb
@@ -10,4 +10,7 @@ SRC_URI += "\
file://CVE-2020-25685-2.patch \
file://CVE-2020-25686-1.patch \
file://CVE-2020-25686-2.patch \
+ file://CVE-2021-3448.patch \
+ file://CVE-2022-0934.patch \
+ file://CVE-2023-28450.patch \
"
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0001-auth-mech-rpa-Fail-on-zero-len-buffer.patch b/meta-networking/recipes-support/dovecot/dovecot/0001-auth-mech-rpa-Fail-on-zero-len-buffer.patch
new file mode 100644
index 0000000000..5580cd409f
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0001-auth-mech-rpa-Fail-on-zero-len-buffer.patch
@@ -0,0 +1,30 @@
+From bd9d2fe7da833f0e4705a8280efc56930371806b Mon Sep 17 00:00:00 2001
+From: Aki Tuomi <aki.tuomi@open-xchange.com>
+Date: Wed, 6 May 2020 13:40:36 +0300
+Subject: [PATCH 1/3] auth: mech-rpa - Fail on zero len buffer
+
+---
+ src/auth/mech-rpa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12674
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/auth/mech-rpa.c b/src/auth/mech-rpa.c
+index 08298ebdd6..2de8705b4f 100644
+--- a/src/auth/mech-rpa.c
++++ b/src/auth/mech-rpa.c
+@@ -224,7 +224,7 @@ rpa_read_buffer(pool_t pool, const unsigned char **data,
+ return 0;
+
+ len = *p++;
+- if (p + len > end)
++ if (p + len > end || len == 0)
+ return 0;
+
+ *buffer = p_malloc(pool, len);
+--
+2.11.0
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch b/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
index f86235076e..3f87714dcc 100644
--- a/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
+++ b/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch
@@ -13,11 +13,11 @@ Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
configure.ac | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
-diff --git a/configure.ac b/configure.ac
-index 3b32614..94ec002 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -519,13 +519,10 @@ have_ioloop=no
+Index: dovecot-2.2.36.4/configure.ac
+===================================================================
+--- dovecot-2.2.36.4.orig/configure.ac
++++ dovecot-2.2.36.4/configure.ac
+@@ -490,13 +490,10 @@ have_ioloop=no
if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then
AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[
@@ -34,7 +34,7 @@ index 3b32614..94ec002 100644
], [
i_cv_epoll_works=yes
], [
-@@ -653,7 +650,7 @@ fi
+@@ -596,7 +593,7 @@ fi
dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
dnl * It may also be broken in AIX.
AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
@@ -43,7 +43,7 @@ index 3b32614..94ec002 100644
#define _XOPEN_SOURCE 600
#include <stdio.h>
#include <stdlib.h>
-@@ -662,7 +659,7 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+@@ -605,7 +602,7 @@ AC_CACHE_CHECK([whether posix_fallocate(
#if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
possibly broken posix_fallocate
#endif
@@ -52,7 +52,7 @@ index 3b32614..94ec002 100644
int fd = creat("conftest.temp", 0600);
int ret;
if (fd == -1) {
-@@ -671,8 +668,6 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[
+@@ -614,8 +611,6 @@ AC_CACHE_CHECK([whether posix_fallocate(
}
ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0;
unlink("conftest.temp");
@@ -61,6 +61,3 @@ index 3b32614..94ec002 100644
], [
i_cv_posix_fallocate_works=yes
], [
---
-1.8.4.2
-
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch b/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
index 65ae9bf910..3170ae8658 100644
--- a/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
+++ b/meta-networking/recipes-support/dovecot/dovecot/0001-doveadm-Fix-parallel-build.patch
@@ -18,11 +18,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
src/doveadm/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am
-index c644646..6ae9144 100644
---- a/src/doveadm/Makefile.am
-+++ b/src/doveadm/Makefile.am
-@@ -180,8 +180,8 @@ test_libs = \
+Index: dovecot-2.2.36.4/src/doveadm/Makefile.am
+===================================================================
+--- dovecot-2.2.36.4.orig/src/doveadm/Makefile.am
++++ dovecot-2.2.36.4/src/doveadm/Makefile.am
+@@ -182,8 +182,8 @@ test_libs = \
../lib/liblib.la
test_deps = $(noinst_LTLIBRARIES) $(test_libs)
@@ -33,6 +33,3 @@ index c644646..6ae9144 100644
test_doveadm_util_DEPENDENCIES = $(test_deps)
check: check-am check-test
---
-2.14.2
-
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0001-lib-mail-message-parser-Add-a-message_part_finish-he.patch b/meta-networking/recipes-support/dovecot/dovecot/0001-lib-mail-message-parser-Add-a-message_part_finish-he.patch
new file mode 100644
index 0000000000..583f71ca58
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0001-lib-mail-message-parser-Add-a-message_part_finish-he.patch
@@ -0,0 +1,76 @@
+From 667d353b0f217372e8cc43ea4fe13466689c7ed0 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 11:33:31 +0300
+Subject: [PATCH 01/13] lib-mail: message-parser - Add a message_part_finish()
+ helper function
+
+---
+ src/lib-mail/message-parser.c | 25 ++++++++++++-------------
+ 1 file changed, 12 insertions(+), 13 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index b1de1950a..aaa8dd8b7 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -195,6 +195,13 @@ message_part_append(pool_t pool, struct message_part *parent)
+ return part;
+ }
+
++static void message_part_finish(struct message_parser_ctx *ctx)
++{
++ message_size_add(&ctx->part->parent->body_size, &ctx->part->body_size);
++ message_size_add(&ctx->part->parent->body_size, &ctx->part->header_size);
++ ctx->part = ctx->part->parent;
++}
++
+ static void parse_next_body_multipart_init(struct message_parser_ctx *ctx)
+ {
+ struct message_boundary *b;
+@@ -312,19 +319,16 @@ static int parse_part_finish(struct message_parser_ctx *ctx,
+ struct message_boundary *boundary,
+ struct message_block *block_r, bool first_line)
+ {
+- struct message_part *part;
+ size_t line_size;
+
+ i_assert(ctx->last_boundary == NULL);
+
+ /* get back to parent MIME part, summing the child MIME part sizes
+ into parent's body sizes */
+- for (part = ctx->part; part != boundary->part; part = part->parent) {
+- message_size_add(&part->parent->body_size, &part->body_size);
+- message_size_add(&part->parent->body_size, &part->header_size);
++ while (ctx->part != boundary->part) {
++ message_part_finish(ctx);
++ i_assert(ctx->part != NULL);
+ }
+- i_assert(part != NULL);
+- ctx->part = part;
+
+ if (boundary->epilogue_found) {
+ /* this boundary isn't needed anymore */
+@@ -1132,13 +1136,8 @@ int message_parser_parse_next_block(struct message_parser_ctx *ctx,
+ i_assert(ctx->input->eof || ctx->input->closed ||
+ ctx->input->stream_errno != 0 ||
+ ctx->broken_reason != NULL);
+- while (ctx->part->parent != NULL) {
+- message_size_add(&ctx->part->parent->body_size,
+- &ctx->part->body_size);
+- message_size_add(&ctx->part->parent->body_size,
+- &ctx->part->header_size);
+- ctx->part = ctx->part->parent;
+- }
++ while (ctx->part->parent != NULL)
++ message_part_finish(ctx);
+ }
+
+ if (block_r->size == 0) {
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0002-lib-mail-message-parser-Change-message_part_append-t.patch b/meta-networking/recipes-support/dovecot/dovecot/0002-lib-mail-message-parser-Change-message_part_append-t.patch
new file mode 100644
index 0000000000..9f24320ebf
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0002-lib-mail-message-parser-Change-message_part_append-t.patch
@@ -0,0 +1,71 @@
+From de0da7bc8df55521db8fa787f88e293618c96386 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 11:34:22 +0300
+Subject: [PATCH 02/13] lib-mail: message-parser - Change message_part_append()
+ to do all work internally
+
+---
+ src/lib-mail/message-parser.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index aaa8dd8b7..2edf3e7a6 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -167,16 +167,17 @@ static int message_parser_read_more(struct message_parser_ctx *ctx,
+ return 1;
+ }
+
+-static struct message_part *
+-message_part_append(pool_t pool, struct message_part *parent)
++static void
++message_part_append(struct message_parser_ctx *ctx)
+ {
++ struct message_part *parent = ctx->part;
+ struct message_part *p, *part, **list;
+
+ i_assert(parent != NULL);
+ i_assert((parent->flags & (MESSAGE_PART_FLAG_MULTIPART |
+ MESSAGE_PART_FLAG_MESSAGE_RFC822)) != 0);
+
+- part = p_new(pool, struct message_part, 1);
++ part = p_new(ctx->part_pool, struct message_part, 1);
+ part->parent = parent;
+ for (p = parent; p != NULL; p = p->parent)
+ p->children_count++;
+@@ -192,7 +193,7 @@ message_part_append(pool_t pool, struct message_part *parent)
+ list = &(*list)->next;
+
+ *list = part;
+- return part;
++ ctx->part = part;
+ }
+
+ static void message_part_finish(struct message_parser_ctx *ctx)
+@@ -220,7 +221,7 @@ static void parse_next_body_multipart_init(struct message_parser_ctx *ctx)
+ static int parse_next_body_message_rfc822_init(struct message_parser_ctx *ctx,
+ struct message_block *block_r)
+ {
+- ctx->part = message_part_append(ctx->part_pool, ctx->part);
++ message_part_append(ctx);
+ return parse_next_header_init(ctx, block_r);
+ }
+
+@@ -270,7 +271,7 @@ boundary_line_find(struct message_parser_ctx *ctx,
+ static int parse_next_mime_header_init(struct message_parser_ctx *ctx,
+ struct message_block *block_r)
+ {
+- ctx->part = message_part_append(ctx->part_pool, ctx->part);
++ message_part_append(ctx);
+ ctx->part->flags |= MESSAGE_PART_FLAG_IS_MIME;
+
+ return parse_next_header_init(ctx, block_r);
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0002-lib-ntlm-Check-buffer-length-on-responses.patch b/meta-networking/recipes-support/dovecot/dovecot/0002-lib-ntlm-Check-buffer-length-on-responses.patch
new file mode 100644
index 0000000000..81aead8aad
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0002-lib-ntlm-Check-buffer-length-on-responses.patch
@@ -0,0 +1,37 @@
+Backport of:
+
+From 1c6405d3026e5ceae3d214d63945bba85251af4c Mon Sep 17 00:00:00 2001
+From: Aki Tuomi <aki.tuomi@open-xchange.com>
+Date: Mon, 18 May 2020 12:33:39 +0300
+Subject: [PATCH 2/3] lib-ntlm: Check buffer length on responses
+
+Add missing check for buffer length.
+
+If this is not checked, it is possible to send message which
+causes read past buffer bug.
+
+Broken in c7480644202e5451fbed448508ea29a25cffc99c
+---
+ src/lib-ntlm/ntlm-message.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12673
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+--- a/src/lib-ntlm/ntlm-message.c
++++ b/src/lib-ntlm/ntlm-message.c
+@@ -184,6 +184,11 @@ static int ntlmssp_check_buffer(const st
+ if (length == 0 && space == 0)
+ return 1;
+
++ if (length > data_size) {
++ *error = "buffer length out of bounds";
++ return 0;
++ }
++
+ if (offset >= data_size) {
+ *error = "buffer offset out of bounds";
+ return 0;
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0003-lib-mail-message-parser-Optimize-updating-children_c.patch b/meta-networking/recipes-support/dovecot/dovecot/0003-lib-mail-message-parser-Optimize-updating-children_c.patch
new file mode 100644
index 0000000000..e530902350
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0003-lib-mail-message-parser-Optimize-updating-children_c.patch
@@ -0,0 +1,49 @@
+From a9800b436fcf1f9633c2b136a9c5cb7a486a8a52 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 11:36:48 +0300
+Subject: [PATCH 03/13] lib-mail: message-parser - Optimize updating
+ children_count
+
+---
+ src/lib-mail/message-parser.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 2edf3e7a6..05768a058 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -171,7 +171,7 @@ static void
+ message_part_append(struct message_parser_ctx *ctx)
+ {
+ struct message_part *parent = ctx->part;
+- struct message_part *p, *part, **list;
++ struct message_part *part, **list;
+
+ i_assert(parent != NULL);
+ i_assert((parent->flags & (MESSAGE_PART_FLAG_MULTIPART |
+@@ -179,8 +179,6 @@ message_part_append(struct message_parser_ctx *ctx)
+
+ part = p_new(ctx->part_pool, struct message_part, 1);
+ part->parent = parent;
+- for (p = parent; p != NULL; p = p->parent)
+- p->children_count++;
+
+ /* set child position */
+ part->physical_pos =
+@@ -200,6 +198,7 @@ static void message_part_finish(struct message_parser_ctx *ctx)
+ {
+ message_size_add(&ctx->part->parent->body_size, &ctx->part->body_size);
+ message_size_add(&ctx->part->parent->body_size, &ctx->part->header_size);
++ ctx->part->parent->children_count += 1 + ctx->part->children_count;
+ ctx->part = ctx->part->parent;
+ }
+
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0004-lib-mail-message-parser-Optimize-appending-new-part-.patch b/meta-networking/recipes-support/dovecot/dovecot/0004-lib-mail-message-parser-Optimize-appending-new-part-.patch
new file mode 100644
index 0000000000..ba6667fa99
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0004-lib-mail-message-parser-Optimize-appending-new-part-.patch
@@ -0,0 +1,90 @@
+From 99ee7596712cf0ea0a288b712bc898ecb2b35f9b Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 12:00:38 +0300
+Subject: [PATCH 04/13] lib-mail: message-parser - Optimize appending new part
+ to linked list
+
+---
+ src/lib-mail/message-parser.c | 28 ++++++++++++++++++++++------
+ 1 file changed, 22 insertions(+), 6 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+Index: dovecot-2.2.36.4/src/lib-mail/message-parser.c
+===================================================================
+--- dovecot-2.2.36.4.orig/src/lib-mail/message-parser.c
++++ dovecot-2.2.36.4/src/lib-mail/message-parser.c
+@@ -1,7 +1,7 @@
+ /* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
+
+ #include "lib.h"
+-#include "buffer.h"
++#include "array.h"
+ #include "str.h"
+ #include "istream.h"
+ #include "rfc822-parser.h"
+@@ -34,6 +34,9 @@ struct message_parser_ctx {
+ const char *last_boundary;
+ struct message_boundary *boundaries;
+
++ struct message_part **next_part;
++ ARRAY(struct message_part **) next_part_stack;
++
+ size_t skip;
+ char last_chr;
+ unsigned int want_count;
+@@ -171,7 +174,7 @@ static void
+ message_part_append(struct message_parser_ctx *ctx)
+ {
+ struct message_part *parent = ctx->part;
+- struct message_part *part, **list;
++ struct message_part *part;
+
+ i_assert(parent != NULL);
+ i_assert((parent->flags & (MESSAGE_PART_FLAG_MULTIPART |
+@@ -186,16 +189,27 @@ message_part_append(struct message_parse
+ parent->body_size.physical_size +
+ parent->header_size.physical_size;
+
+- list = &part->parent->children;
+- while (*list != NULL)
+- list = &(*list)->next;
++ /* add to parent's linked list */
++ *ctx->next_part = part;
++ /* update the parent's end-of-linked-list pointer */
++ struct message_part **next_part = &part->next;
++ array_append(&ctx->next_part_stack, &next_part, 1);
++ /* This part is now the new parent for the next message_part_append()
++ call. Its linked list begins with the children pointer. */
++ ctx->next_part = &part->children;
+
+- *list = part;
+ ctx->part = part;
+ }
+
+ static void message_part_finish(struct message_parser_ctx *ctx)
+ {
++ struct message_part **const *parent_next_partp;
++ unsigned int count = array_count(&ctx->next_part_stack);
++
++ parent_next_partp = array_idx(&ctx->next_part_stack, count-1);
++ array_delete(&ctx->next_part_stack, count-1, 1);
++ ctx->next_part = *parent_next_partp;
++
+ message_size_add(&ctx->part->parent->body_size, &ctx->part->body_size);
+ message_size_add(&ctx->part->parent->body_size, &ctx->part->header_size);
+ ctx->part->parent->children_count += 1 + ctx->part->children_count;
+@@ -1062,7 +1076,9 @@ message_parser_init(pool_t part_pool, st
+ ctx = message_parser_init_int(input, hdr_flags, flags);
+ ctx->part_pool = part_pool;
+ ctx->parts = ctx->part = p_new(part_pool, struct message_part, 1);
++ ctx->next_part = &ctx->part->children;
+ ctx->parse_next_block = parse_next_header_init;
++ p_array_init(&ctx->next_part_stack, ctx->parser_pool, 4);
+ return ctx;
+ }
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0005-lib-mail-message-parser-Minor-code-cleanup-to-findin.patch b/meta-networking/recipes-support/dovecot/dovecot/0005-lib-mail-message-parser-Minor-code-cleanup-to-findin.patch
new file mode 100644
index 0000000000..4e63509b45
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0005-lib-mail-message-parser-Minor-code-cleanup-to-findin.patch
@@ -0,0 +1,45 @@
+From e39c95b248917eb2b596ca55a957f3cbc7fd406f Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 12:10:07 +0300
+Subject: [PATCH 05/13] lib-mail: message-parser - Minor code cleanup to
+ finding the end of boundary line
+
+---
+ src/lib-mail/message-parser.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index ff4e09e5a..6c6a680b5 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -260,17 +260,16 @@ boundary_line_find(struct message_parser_ctx *ctx,
+ }
+
+ /* need to find the end of line */
+- if (memchr(data + 2, '\n', size - 2) == NULL &&
+- size < BOUNDARY_END_MAX_LEN &&
++ data += 2;
++ size -= 2;
++ if (memchr(data, '\n', size) == NULL &&
++ size+2 < BOUNDARY_END_MAX_LEN &&
+ !ctx->input->eof && !full) {
+ /* no LF found */
+ ctx->want_count = BOUNDARY_END_MAX_LEN;
+ return 0;
+ }
+
+- data += 2;
+- size -= 2;
+-
+ *boundary_r = boundary_find(ctx->boundaries, data, size);
+ if (*boundary_r == NULL)
+ return -1;
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0006-lib-mail-message-parser-Truncate-excessively-long-MI.patch b/meta-networking/recipes-support/dovecot/dovecot/0006-lib-mail-message-parser-Truncate-excessively-long-MI.patch
new file mode 100644
index 0000000000..1012d7983e
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0006-lib-mail-message-parser-Truncate-excessively-long-MI.patch
@@ -0,0 +1,163 @@
+From aed125484a346b4893c1a169088c39fe7ced01f3 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 12:53:12 +0300
+Subject: [PATCH 06/13] lib-mail: message-parser - Truncate excessively long
+ MIME boundaries
+
+RFC 2046 requires that the boundaries are a maximum of 70 characters
+(excluding the "--" prefix and suffix). We allow 80 characters for a bit of
+extra safety. Anything longer than that is truncated and treated the same
+as if it was just 80 characters.
+---
+ src/lib-mail/message-parser.c | 7 ++-
+ src/lib-mail/test-message-parser.c | 95 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 100 insertions(+), 2 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 6c6a680b5..92f541b02 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -10,7 +10,8 @@
+
+ /* RFC-2046 requires boundaries are max. 70 chars + "--" prefix + "--" suffix.
+ We'll add a bit more just in case. */
+-#define BOUNDARY_END_MAX_LEN (70 + 2 + 2 + 10)
++#define BOUNDARY_STRING_MAX_LEN (70 + 10)
++#define BOUNDARY_END_MAX_LEN (BOUNDARY_STRING_MAX_LEN + 2 + 2)
+
+ struct message_boundary {
+ struct message_boundary *next;
+@@ -526,8 +527,10 @@ static void parse_content_type(struct message_parser_ctx *ctx,
+ rfc2231_parse(&parser, &results);
+ for (; *results != NULL; results += 2) {
+ if (strcasecmp(results[0], "boundary") == 0) {
++ /* truncate excessively long boundaries */
+ ctx->last_boundary =
+- p_strdup(ctx->parser_pool, results[1]);
++ p_strndup(ctx->parser_pool, results[1],
++ BOUNDARY_STRING_MAX_LEN);
+ break;
+ }
+ }
+diff --git a/src/lib-mail/test-message-parser.c b/src/lib-mail/test-message-parser.c
+index 1f1aa1437..94aa3eb7c 100644
+--- a/src/lib-mail/test-message-parser.c
++++ b/src/lib-mail/test-message-parser.c
+@@ -642,6 +642,100 @@ static void test_message_parser_no_eoh(void)
+ test_end();
+ }
+
++static void test_message_parser_long_mime_boundary(void)
++{
++ /* Close the boundaries in wrong reverse order. But because all
++ boundaries are actually truncated to the same size (..890) it
++ works the same as if all of them were duplicate boundaries. */
++static const char input_msg[] =
++"Content-Type: multipart/mixed; boundary=\"1234567890123456789012345678901234567890123456789012345678901234567890123456789012\"\n"
++"\n"
++"--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\n"
++"Content-Type: multipart/mixed; boundary=\"123456789012345678901234567890123456789012345678901234567890123456789012345678901\"\n"
++"\n"
++"--123456789012345678901234567890123456789012345678901234567890123456789012345678901\n"
++"Content-Type: multipart/mixed; boundary=\"12345678901234567890123456789012345678901234567890123456789012345678901234567890\"\n"
++"\n"
++"--12345678901234567890123456789012345678901234567890123456789012345678901234567890\n"
++"Content-Type: text/plain\n"
++"\n"
++"1\n"
++"--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\n"
++"Content-Type: text/plain\n"
++"\n"
++"22\n"
++"--123456789012345678901234567890123456789012345678901234567890123456789012345678901\n"
++"Content-Type: text/plain\n"
++"\n"
++"333\n"
++"--12345678901234567890123456789012345678901234567890123456789012345678901234567890\n"
++"Content-Type: text/plain\n"
++"\n"
++"4444\n";
++ struct message_parser_ctx *parser;
++ struct istream *input;
++ struct message_part *parts, *part;
++ struct message_block block;
++ pool_t pool;
++ int ret;
++
++ test_begin("message parser long mime boundary");
++ pool = pool_alloconly_create("message parser", 10240);
++ input = test_istream_create(input_msg);
++
++ parser = message_parser_init(pool, input, 0, 0);
++ while ((ret = message_parser_parse_next_block(parser, &block)) > 0) ;
++ test_assert(ret < 0);
++ message_parser_deinit(&parser, &parts);
++
++ part = parts;
++ test_assert(part->children_count == 6);
++ test_assert(part->flags == (MESSAGE_PART_FLAG_MULTIPART | MESSAGE_PART_FLAG_IS_MIME));
++ test_assert(part->header_size.lines == 2);
++ test_assert(part->header_size.physical_size == 126);
++ test_assert(part->header_size.virtual_size == 126+2);
++ test_assert(part->body_size.lines == 22);
++ test_assert(part->body_size.physical_size == 871);
++ test_assert(part->body_size.virtual_size == 871+22);
++
++ part = parts->children;
++ test_assert(part->children_count == 5);
++ test_assert(part->flags == (MESSAGE_PART_FLAG_MULTIPART | MESSAGE_PART_FLAG_IS_MIME));
++ test_assert(part->header_size.lines == 2);
++ test_assert(part->header_size.physical_size == 125);
++ test_assert(part->header_size.virtual_size == 125+2);
++ test_assert(part->body_size.lines == 19);
++ test_assert(part->body_size.physical_size == 661);
++ test_assert(part->body_size.virtual_size == 661+19);
++
++ part = parts->children->children;
++ test_assert(part->children_count == 4);
++ test_assert(part->flags == (MESSAGE_PART_FLAG_MULTIPART | MESSAGE_PART_FLAG_IS_MIME));
++ test_assert(part->header_size.lines == 2);
++ test_assert(part->header_size.physical_size == 124);
++ test_assert(part->header_size.virtual_size == 124+2);
++ test_assert(part->body_size.lines == 16);
++ test_assert(part->body_size.physical_size == 453);
++ test_assert(part->body_size.virtual_size == 453+16);
++
++ part = parts->children->children->children;
++ for (unsigned int i = 1; i <= 3; i++, part = part->next) {
++ test_assert(part->children_count == 0);
++ test_assert(part->flags == (MESSAGE_PART_FLAG_TEXT | MESSAGE_PART_FLAG_IS_MIME));
++ test_assert(part->header_size.lines == 2);
++ test_assert(part->header_size.physical_size == 26);
++ test_assert(part->header_size.virtual_size == 26+2);
++ test_assert(part->body_size.lines == 0);
++ test_assert(part->body_size.physical_size == i);
++ test_assert(part->body_size.virtual_size == i);
++ }
++
++ test_parsed_parts(input, parts);
++ i_stream_unref(&input);
++ pool_unref(&pool);
++ test_end();
++}
++
+ int main(void)
+ {
+ static void (*test_functions[])(void) = {
+@@ -654,6 +748,7 @@ int main(void)
+ test_message_parser_garbage_suffix_mime_boundary,
+ test_message_parser_continuing_mime_boundary,
+ test_message_parser_continuing_truncated_mime_boundary,
++ test_message_parser_long_mime_boundary,
+ test_message_parser_no_eoh,
+ NULL
+ };
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0007-lib-mail-message-parser-Optimize-boundary-lookups-wh.patch b/meta-networking/recipes-support/dovecot/dovecot/0007-lib-mail-message-parser-Optimize-boundary-lookups-wh.patch
new file mode 100644
index 0000000000..eeb6c96f1a
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0007-lib-mail-message-parser-Optimize-boundary-lookups-wh.patch
@@ -0,0 +1,72 @@
+From 5f8de52fec3191a1aa68a399ee2068485737dc4f Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 13:06:02 +0300
+Subject: [PATCH 07/13] lib-mail: message-parser - Optimize boundary lookups
+ when exact boundary is found
+
+When an exact boundary is found, there's no need to continue looking for
+more boundaries.
+---
+ src/lib-mail/message-parser.c | 26 ++++++++++++++++++++++----
+ 1 file changed, 22 insertions(+), 4 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 92f541b02..c2934c761 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -80,8 +80,14 @@ boundary_find(struct message_boundary *boundaries,
+ while (boundaries != NULL) {
+ if (boundaries->len <= len &&
+ memcmp(boundaries->boundary, data, boundaries->len) == 0 &&
+- (best == NULL || best->len < boundaries->len))
++ (best == NULL || best->len < boundaries->len)) {
+ best = boundaries;
++ if (best->len == len) {
++ /* This is exactly the wanted boundary. There
++ can't be a better one. */
++ break;
++ }
++ }
+
+ boundaries = boundaries->next;
+ }
+@@ -263,15 +269,27 @@ boundary_line_find(struct message_parser_ctx *ctx,
+ /* need to find the end of line */
+ data += 2;
+ size -= 2;
+- if (memchr(data, '\n', size) == NULL &&
++ const unsigned char *lf_pos = memchr(data, '\n', size);
++ if (lf_pos == NULL &&
+ size+2 < BOUNDARY_END_MAX_LEN &&
+ !ctx->input->eof && !full) {
+ /* no LF found */
+ ctx->want_count = BOUNDARY_END_MAX_LEN;
+ return 0;
+ }
+-
+- *boundary_r = boundary_find(ctx->boundaries, data, size);
++ size_t find_size = size;
++
++ if (lf_pos != NULL) {
++ find_size = lf_pos - data;
++ if (find_size > 0 && data[find_size-1] == '\r')
++ find_size--;
++ if (find_size > 2 && data[find_size-1] == '-' &&
++ data[find_size-2] == '-')
++ find_size -= 2;
++ } else if (find_size > BOUNDARY_END_MAX_LEN)
++ find_size = BOUNDARY_END_MAX_LEN;
++
++ *boundary_r = boundary_find(ctx->boundaries, data, find_size);
+ if (*boundary_r == NULL)
+ return -1;
+
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0008-lib-mail-message-parser-Add-boundary_remove_until-he.patch b/meta-networking/recipes-support/dovecot/dovecot/0008-lib-mail-message-parser-Add-boundary_remove_until-he.patch
new file mode 100644
index 0000000000..4af070a879
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0008-lib-mail-message-parser-Add-boundary_remove_until-he.patch
@@ -0,0 +1,50 @@
+From 929396767d831bedbdec6392aaa835b045332fd3 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 14:53:27 +0300
+Subject: [PATCH 08/13] lib-mail: message-parser - Add boundary_remove_until()
+ helper function
+
+---
+ src/lib-mail/message-parser.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index c2934c761..028f74159 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -223,6 +223,13 @@ static void message_part_finish(struct message_parser_ctx *ctx)
+ ctx->part = ctx->part->parent;
+ }
+
++static void
++boundary_remove_until(struct message_parser_ctx *ctx,
++ struct message_boundary *boundary)
++{
++ ctx->boundaries = boundary;
++}
++
+ static void parse_next_body_multipart_init(struct message_parser_ctx *ctx)
+ {
+ struct message_boundary *b;
+@@ -364,10 +371,10 @@ static int parse_part_finish(struct message_parser_ctx *ctx,
+
+ if (boundary->epilogue_found) {
+ /* this boundary isn't needed anymore */
+- ctx->boundaries = boundary->next;
++ boundary_remove_until(ctx, boundary->next);
+ } else {
+ /* forget about the boundaries we possibly skipped */
+- ctx->boundaries = boundary;
++ boundary_remove_until(ctx, boundary);
+ }
+
+ /* the boundary itself should already be in buffer. add that. */
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0009-lib-mail-message-parser-Don-t-use-memory-pool-for-pa.patch b/meta-networking/recipes-support/dovecot/dovecot/0009-lib-mail-message-parser-Don-t-use-memory-pool-for-pa.patch
new file mode 100644
index 0000000000..aade7dc2b3
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0009-lib-mail-message-parser-Don-t-use-memory-pool-for-pa.patch
@@ -0,0 +1,169 @@
+From d53d83214b1d635446a8cf8ff9438cc530133d62 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 15:00:57 +0300
+Subject: [PATCH 09/13] lib-mail: message-parser - Don't use memory pool for
+ parser
+
+This reduces memory usage when parsing many MIME parts where boundaries are
+being added and removed constantly.
+---
+ src/lib-mail/message-parser.c | 48 ++++++++++++++++++++++++++++---------------
+ 1 file changed, 32 insertions(+), 16 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 028f74159..8970d8e0e 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -17,14 +17,14 @@ struct message_boundary {
+ struct message_boundary *next;
+
+ struct message_part *part;
+- const char *boundary;
++ char *boundary;
+ size_t len;
+
+ unsigned int epilogue_found:1;
+ };
+
+ struct message_parser_ctx {
+- pool_t parser_pool, part_pool;
++ pool_t part_pool;
+ struct istream *input;
+ struct message_part *parts, *part;
+ const char *broken_reason;
+@@ -32,7 +32,7 @@ struct message_parser_ctx {
+ enum message_header_parser_flags hdr_flags;
+ enum message_parser_flags flags;
+
+- const char *last_boundary;
++ char *last_boundary;
+ struct message_boundary *boundaries;
+
+ struct message_part **next_part;
+@@ -223,10 +223,24 @@ static void message_part_finish(struct message_parser_ctx *ctx)
+ ctx->part = ctx->part->parent;
+ }
+
++static void message_boundary_free(struct message_boundary *b)
++{
++ i_free(b->boundary);
++ i_free(b);
++}
++
+ static void
+ boundary_remove_until(struct message_parser_ctx *ctx,
+ struct message_boundary *boundary)
+ {
++ while (ctx->boundaries != boundary) {
++ struct message_boundary *cur = ctx->boundaries;
++
++ i_assert(cur != NULL);
++ ctx->boundaries = cur->next;
++ message_boundary_free(cur);
++
++ }
+ ctx->boundaries = boundary;
+ }
+
+@@ -234,15 +248,14 @@ static void parse_next_body_multipart_init(struct message_parser_ctx *ctx)
+ {
+ struct message_boundary *b;
+
+- b = p_new(ctx->parser_pool, struct message_boundary, 1);
++ b = i_new(struct message_boundary, 1);
+ b->part = ctx->part;
+ b->boundary = ctx->last_boundary;
++ ctx->last_boundary = NULL;
+ b->len = strlen(b->boundary);
+
+ b->next = ctx->boundaries;
+ ctx->boundaries = b;
+-
+- ctx->last_boundary = NULL;
+ }
+
+ static int parse_next_body_message_rfc822_init(struct message_parser_ctx *ctx,
+@@ -359,6 +372,8 @@ static int parse_part_finish(struct message_parser_ctx *ctx,
+ struct message_block *block_r, bool first_line)
+ {
+ size_t line_size;
++ size_t boundary_len = boundary->len;
++ bool boundary_epilogue_found = boundary->epilogue_found;
+
+ i_assert(ctx->last_boundary == NULL);
+
+@@ -391,7 +406,7 @@ static int parse_part_finish(struct message_parser_ctx *ctx,
+ i_assert(block_r->data[0] == '\n');
+ line_size = 1;
+ }
+- line_size += 2 + boundary->len + (boundary->epilogue_found ? 2 : 0);
++ line_size += 2 + boundary_len + (boundary_epilogue_found ? 2 : 0);
+ i_assert(block_r->size >= ctx->skip + line_size);
+ block_r->size = line_size;
+ parse_body_add_block(ctx, block_r);
+@@ -553,9 +568,9 @@ static void parse_content_type(struct message_parser_ctx *ctx,
+ for (; *results != NULL; results += 2) {
+ if (strcasecmp(results[0], "boundary") == 0) {
+ /* truncate excessively long boundaries */
++ i_free(ctx->last_boundary);
+ ctx->last_boundary =
+- p_strndup(ctx->parser_pool, results[1],
+- BOUNDARY_STRING_MAX_LEN);
++ i_strndup(results[1], BOUNDARY_STRING_MAX_LEN);
+ break;
+ }
+ }
+@@ -678,7 +693,7 @@ static int parse_next_header(struct message_parser_ctx *ctx,
+ i_assert(!ctx->multipart);
+ part->flags = 0;
+ }
+- ctx->last_boundary = NULL;
++ i_free(ctx->last_boundary);
+
+ if (!ctx->part_seen_content_type ||
+ (part->flags & MESSAGE_PART_FLAG_IS_MIME) == 0) {
+@@ -1081,11 +1096,8 @@ message_parser_init_int(struct istream *input,
+ enum message_parser_flags flags)
+ {
+ struct message_parser_ctx *ctx;
+- pool_t pool;
+
+- pool = pool_alloconly_create("Message Parser", 1024);
+- ctx = p_new(pool, struct message_parser_ctx, 1);
+- ctx->parser_pool = pool;
++ ctx = i_new(struct message_parser_ctx, 1);
+ ctx->hdr_flags = hdr_flags;
+ ctx->flags = flags;
+ ctx->input = input;
+@@ -1105,7 +1117,7 @@ message_parser_init(pool_t part_pool, struct istream *input,
+ ctx->parts = ctx->part = p_new(part_pool, struct message_part, 1);
+ ctx->next_part = &ctx->part->children;
+ ctx->parse_next_block = parse_next_header_init;
+- p_array_init(&ctx->next_part_stack, ctx->parser_pool, 4);
++ i_array_init(&ctx->next_part_stack, 4);
+ return ctx;
+ }
+
+@@ -1146,8 +1158,12 @@ int message_parser_deinit_from_parts(struct message_parser_ctx **_ctx,
+
+ if (ctx->hdr_parser_ctx != NULL)
+ message_parse_header_deinit(&ctx->hdr_parser_ctx);
++ boundary_remove_until(ctx, NULL);
+ i_stream_unref(&ctx->input);
+- pool_unref(&ctx->parser_pool);
++ if (array_is_created(&ctx->next_part_stack))
++ array_free(&ctx->next_part_stack);
++ i_free(ctx->last_boundary);
++ i_free(ctx);
+ i_assert(ret < 0 || *parts_r != NULL);
+ return ret;
+ }
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0010-lib-mail-message-parser-Support-limiting-max-number-.patch b/meta-networking/recipes-support/dovecot/dovecot/0010-lib-mail-message-parser-Support-limiting-max-number-.patch
new file mode 100644
index 0000000000..ae52544665
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0010-lib-mail-message-parser-Support-limiting-max-number-.patch
@@ -0,0 +1,188 @@
+From df9e0d358ef86e3342525dcdefcf79dc2d749a30 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 16:59:40 +0300
+Subject: [PATCH 10/13] lib-mail: message-parser - Support limiting max number
+ of nested MIME parts
+
+The default is to allow 100 nested MIME parts. When the limit is reached,
+the innermost MIME part's body contains all the rest of the inner bodies
+until a parent MIME part is reached.
+---
+ src/lib-mail/message-parser.c | 43 +++++++++++++++++++++++++++++++-------
+ src/lib-mail/test-message-parser.c | 31 +++++++++++++++++++++++++++
+ 2 files changed, 67 insertions(+), 7 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 8970d8e0e..721615f76 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -13,6 +13,8 @@
+ #define BOUNDARY_STRING_MAX_LEN (70 + 10)
+ #define BOUNDARY_END_MAX_LEN (BOUNDARY_STRING_MAX_LEN + 2 + 2)
+
++#define MESSAGE_PARSER_DEFAULT_MAX_NESTED_MIME_PARTS 100
++
+ struct message_boundary {
+ struct message_boundary *next;
+
+@@ -28,9 +30,11 @@ struct message_parser_ctx {
+ struct istream *input;
+ struct message_part *parts, *part;
+ const char *broken_reason;
++ unsigned int nested_parts_count;
+
+ enum message_header_parser_flags hdr_flags;
+ enum message_parser_flags flags;
++ unsigned int max_nested_mime_parts;
+
+ char *last_boundary;
+ struct message_boundary *boundaries;
+@@ -206,6 +210,8 @@ message_part_append(struct message_parser_ctx *ctx)
+ ctx->next_part = &part->children;
+
+ ctx->part = part;
++ ctx->nested_parts_count++;
++ i_assert(ctx->nested_parts_count < ctx->max_nested_mime_parts);
+ }
+
+ static void message_part_finish(struct message_parser_ctx *ctx)
+@@ -213,8 +219,12 @@ static void message_part_finish(struct message_parser_ctx *ctx)
+ struct message_part **const *parent_next_partp;
+ unsigned int count = array_count(&ctx->next_part_stack);
+
++ i_assert(ctx->nested_parts_count > 0);
++ ctx->nested_parts_count--;
++
+ parent_next_partp = array_idx(&ctx->next_part_stack, count-1);
+ array_delete(&ctx->next_part_stack, count-1, 1);
++
+ ctx->next_part = *parent_next_partp;
+
+ message_size_add(&ctx->part->parent->body_size, &ctx->part->body_size);
+@@ -592,6 +602,11 @@ static bool block_is_at_eoh(const struct message_block *block)
+ return FALSE;
+ }
+
++static bool parse_too_many_nested_mime_parts(struct message_parser_ctx *ctx)
++{
++ return ctx->nested_parts_count > ctx->max_nested_mime_parts;
++}
++
+ #define MUTEX_FLAGS \
+ (MESSAGE_PART_FLAG_MESSAGE_RFC822 | MESSAGE_PART_FLAG_MULTIPART)
+
+@@ -616,8 +631,12 @@ static int parse_next_header(struct message_parser_ctx *ctx,
+ "\n--boundary" belongs to us or to a previous boundary.
+ this is a problem if the boundary prefixes are identical,
+ because MIME requires only the prefix to match. */
+- parse_next_body_multipart_init(ctx);
+- ctx->multipart = TRUE;
++ if (!parse_too_many_nested_mime_parts(ctx)) {
++ parse_next_body_multipart_init(ctx);
++ ctx->multipart = TRUE;
++ } else {
++ part->flags &= ~MESSAGE_PART_FLAG_MULTIPART;
++ }
+ }
+
+ /* before parsing the header see if we can find a --boundary from here.
+@@ -721,12 +740,16 @@ static int parse_next_header(struct message_parser_ctx *ctx,
+ i_assert(ctx->last_boundary == NULL);
+ ctx->multipart = FALSE;
+ ctx->parse_next_block = parse_next_body_to_boundary;
+- } else if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822)
++ } else if ((part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) != 0 &&
++ !parse_too_many_nested_mime_parts(ctx)) {
+ ctx->parse_next_block = parse_next_body_message_rfc822_init;
+- else if (ctx->boundaries != NULL)
+- ctx->parse_next_block = parse_next_body_to_boundary;
+- else
+- ctx->parse_next_block = parse_next_body_to_eof;
++ } else {
++ part->flags &= ~MESSAGE_PART_FLAG_MESSAGE_RFC822;
++ if (ctx->boundaries != NULL)
++ ctx->parse_next_block = parse_next_body_to_boundary;
++ else
++ ctx->parse_next_block = parse_next_body_to_eof;
++ }
+
+ ctx->want_count = 1;
+
+@@ -1100,6 +1123,8 @@ message_parser_init_int(struct istream *input,
+ ctx = i_new(struct message_parser_ctx, 1);
+ ctx->hdr_flags = hdr_flags;
+ ctx->flags = flags;
++ ctx->max_nested_mime_parts =
++ MESSAGE_PARSER_DEFAULT_MAX_NESTED_MIME_PARTS;
+ ctx->input = input;
+ i_stream_ref(input);
+ return ctx;
+@@ -1159,6 +1184,10 @@ int message_parser_deinit_from_parts(struct message_parser_ctx **_ctx,
+ if (ctx->hdr_parser_ctx != NULL)
+ message_parse_header_deinit(&ctx->hdr_parser_ctx);
+ boundary_remove_until(ctx, NULL);
++ /* caller might have stopped the parsing early */
++ i_assert(ctx->nested_parts_count == 0 ||
++ i_stream_have_bytes_left(ctx->input));
++
+ i_stream_unref(&ctx->input);
+ if (array_is_created(&ctx->next_part_stack))
+ array_free(&ctx->next_part_stack);
+diff --git a/src/lib-mail/test-message-parser.c b/src/lib-mail/test-message-parser.c
+index 94aa3eb7c..481d05942 100644
+--- a/src/lib-mail/test-message-parser.c
++++ b/src/lib-mail/test-message-parser.c
+@@ -166,6 +166,36 @@ static void test_message_parser_small_blocks(void)
+ test_end();
+ }
+
++static void test_message_parser_stop_early(void)
++{
++ struct message_parser_ctx *parser;
++ struct istream *input;
++ struct message_part *parts;
++ struct message_block block;
++ unsigned int i;
++ pool_t pool;
++ int ret;
++
++ test_begin("message parser stop early");
++ pool = pool_alloconly_create("message parser", 10240);
++ input = test_istream_create(test_msg);
++
++ test_istream_set_allow_eof(input, FALSE);
++ for (i = 1; i <= TEST_MSG_LEN+1; i++) {
++ i_stream_seek(input, 0);
++ test_istream_set_size(input, i);
++ parser = message_parser_init(pool, input, 0, 0);
++ while ((ret = message_parser_parse_next_block(parser,
++ &block)) > 0) ;
++ test_assert(ret == 0);
++ message_parser_deinit(&parser, &parts);
++ }
++
++ i_stream_unref(&input);
++ pool_unref(&pool);
++ test_end();
++}
++
+ static void test_message_parser_truncated_mime_headers(void)
+ {
+ static const char input_msg[] =
+@@ -740,6 +770,7 @@ int main(void)
+ {
+ static void (*test_functions[])(void) = {
+ test_message_parser_small_blocks,
++ test_message_parser_stop_early,
+ test_message_parser_truncated_mime_headers,
+ test_message_parser_truncated_mime_headers2,
+ test_message_parser_truncated_mime_headers3,
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0011-lib-mail-message-parser-Support-limiting-max-number-.patch b/meta-networking/recipes-support/dovecot/dovecot/0011-lib-mail-message-parser-Support-limiting-max-number-.patch
new file mode 100644
index 0000000000..52848bf3a7
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0011-lib-mail-message-parser-Support-limiting-max-number-.patch
@@ -0,0 +1,87 @@
+From d7bba401dd234802bcdb55ff27dfb99bffdab804 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 23 Apr 2020 17:09:33 +0300
+Subject: [PATCH 11/13] lib-mail: message-parser - Support limiting max number
+ of MIME parts
+
+The default is to allow 10000 MIME parts. When it's reached, no more
+MIME boundary lines will be recognized, so the rest of the mail belongs
+to the last added MIME part.
+---
+ src/lib-mail/message-parser.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 721615f76..646307802 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -14,6 +14,7 @@
+ #define BOUNDARY_END_MAX_LEN (BOUNDARY_STRING_MAX_LEN + 2 + 2)
+
+ #define MESSAGE_PARSER_DEFAULT_MAX_NESTED_MIME_PARTS 100
++#define MESSAGE_PARSER_DEFAULT_MAX_TOTAL_MIME_PARTS 10000
+
+ struct message_boundary {
+ struct message_boundary *next;
+@@ -31,10 +32,12 @@ struct message_parser_ctx {
+ struct message_part *parts, *part;
+ const char *broken_reason;
+ unsigned int nested_parts_count;
++ unsigned int total_parts_count;
+
+ enum message_header_parser_flags hdr_flags;
+ enum message_parser_flags flags;
+ unsigned int max_nested_mime_parts;
++ unsigned int max_total_mime_parts;
+
+ char *last_boundary;
+ struct message_boundary *boundaries;
+@@ -211,7 +214,9 @@ message_part_append(struct message_parser_ctx *ctx)
+
+ ctx->part = part;
+ ctx->nested_parts_count++;
++ ctx->total_parts_count++;
+ i_assert(ctx->nested_parts_count < ctx->max_nested_mime_parts);
++ i_assert(ctx->total_parts_count <= ctx->max_total_mime_parts);
+ }
+
+ static void message_part_finish(struct message_parser_ctx *ctx)
+@@ -296,6 +301,12 @@ boundary_line_find(struct message_parser_ctx *ctx,
+ return -1;
+ }
+
++ if (ctx->total_parts_count >= ctx->max_total_mime_parts) {
++ /* can't add any more MIME parts. just stop trying to find
++ more boundaries. */
++ return -1;
++ }
++
+ /* need to find the end of line */
+ data += 2;
+ size -= 2;
+@@ -1125,6 +1136,8 @@ message_parser_init_int(struct istream *input,
+ ctx->flags = flags;
+ ctx->max_nested_mime_parts =
+ MESSAGE_PARSER_DEFAULT_MAX_NESTED_MIME_PARTS;
++ ctx->max_total_mime_parts =
++ MESSAGE_PARSER_DEFAULT_MAX_TOTAL_MIME_PARTS;
+ ctx->input = input;
+ i_stream_ref(input);
+ return ctx;
+@@ -1142,6 +1155,7 @@ message_parser_init(pool_t part_pool, struct istream *input,
+ ctx->parts = ctx->part = p_new(part_pool, struct message_part, 1);
+ ctx->next_part = &ctx->part->children;
+ ctx->parse_next_block = parse_next_header_init;
++ ctx->total_parts_count = 1;
+ i_array_init(&ctx->next_part_stack, 4);
+ return ctx;
+ }
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0012-lib-mail-Fix-handling-trailing-in-MIME-boundaries.patch b/meta-networking/recipes-support/dovecot/dovecot/0012-lib-mail-Fix-handling-trailing-in-MIME-boundaries.patch
new file mode 100644
index 0000000000..a81177d2ba
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0012-lib-mail-Fix-handling-trailing-in-MIME-boundaries.patch
@@ -0,0 +1,133 @@
+From 0c9d56b41b992a868f299e05677a67c4d0495523 Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Thu, 2 Jul 2020 17:31:19 +0300
+Subject: [PATCH 12/13] lib-mail: Fix handling trailing "--" in MIME boundaries
+
+Broken by 5b8ec27fae941d06516c30476dcf4820c6d200ab
+---
+ src/lib-mail/message-parser.c | 14 ++++++++----
+ src/lib-mail/test-message-parser.c | 46 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 56 insertions(+), 4 deletions(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 646307802..175d4b488 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -75,7 +75,7 @@ static int preparsed_parse_next_header_init(struct message_parser_ctx *ctx,
+
+ static struct message_boundary *
+ boundary_find(struct message_boundary *boundaries,
+- const unsigned char *data, size_t len)
++ const unsigned char *data, size_t len, bool trailing_dashes)
+ {
+ struct message_boundary *best = NULL;
+
+@@ -89,7 +89,11 @@ boundary_find(struct message_boundary *boundaries,
+ memcmp(boundaries->boundary, data, boundaries->len) == 0 &&
+ (best == NULL || best->len < boundaries->len)) {
+ best = boundaries;
+- if (best->len == len) {
++ /* If we see "foo--", it could either mean that there
++ is a boundary named "foo" that ends now or there's
++ a boundary "foo--" which continues. */
++ if (best->len == len ||
++ (best->len == len-2 && trailing_dashes)) {
+ /* This is exactly the wanted boundary. There
+ can't be a better one. */
+ break;
+@@ -319,6 +323,7 @@ boundary_line_find(struct message_parser_ctx *ctx,
+ return 0;
+ }
+ size_t find_size = size;
++ bool trailing_dashes = FALSE;
+
+ if (lf_pos != NULL) {
+ find_size = lf_pos - data;
+@@ -326,11 +331,12 @@ boundary_line_find(struct message_parser_ctx *ctx,
+ find_size--;
+ if (find_size > 2 && data[find_size-1] == '-' &&
+ data[find_size-2] == '-')
+- find_size -= 2;
++ trailing_dashes = TRUE;
+ } else if (find_size > BOUNDARY_END_MAX_LEN)
+ find_size = BOUNDARY_END_MAX_LEN;
+
+- *boundary_r = boundary_find(ctx->boundaries, data, find_size);
++ *boundary_r = boundary_find(ctx->boundaries, data, find_size,
++ trailing_dashes);
+ if (*boundary_r == NULL)
+ return -1;
+
+diff --git a/src/lib-mail/test-message-parser.c b/src/lib-mail/test-message-parser.c
+index 481d05942..113454ea0 100644
+--- a/src/lib-mail/test-message-parser.c
++++ b/src/lib-mail/test-message-parser.c
+@@ -510,6 +510,51 @@ static const char input_msg[] =
+ test_end();
+ }
+
++static void test_message_parser_trailing_dashes(void)
++{
++static const char input_msg[] =
++"Content-Type: multipart/mixed; boundary=\"a--\"\n"
++"\n"
++"--a--\n"
++"Content-Type: multipart/mixed; boundary=\"a----\"\n"
++"\n"
++"--a----\n"
++"Content-Type: text/plain\n"
++"\n"
++"body\n"
++"--a------\n"
++"Content-Type: text/html\n"
++"\n"
++"body2\n"
++"--a----";
++ struct message_parser_ctx *parser;
++ struct istream *input;
++ struct message_part *parts;
++ struct message_block block;
++ pool_t pool;
++ int ret;
++
++ test_begin("message parser trailing dashes");
++ pool = pool_alloconly_create("message parser", 10240);
++ input = test_istream_create(input_msg);
++
++ parser = message_parser_init(pool, input, 0, 0);
++ while ((ret = message_parser_parse_next_block(parser, &block)) > 0) ;
++ test_assert(ret < 0);
++ message_parser_deinit(&parser, &parts);
++
++ test_assert(parts->children_count == 2);
++ test_assert(parts->children->next == NULL);
++ test_assert(parts->children->children_count == 1);
++ test_assert(parts->children->children->next == NULL);
++ test_assert(parts->children->children->children_count == 0);
++
++ test_parsed_parts(input, parts);
++ i_stream_unref(&input);
++ pool_unref(&pool);
++ test_end();
++}
++
+ static void test_message_parser_continuing_mime_boundary(void)
+ {
+ static const char input_msg[] =
+@@ -777,6 +822,7 @@ int main(void)
+ test_message_parser_empty_multipart,
+ test_message_parser_duplicate_mime_boundary,
+ test_message_parser_garbage_suffix_mime_boundary,
++ test_message_parser_trailing_dashes,
+ test_message_parser_continuing_mime_boundary,
+ test_message_parser_continuing_truncated_mime_boundary,
+ test_message_parser_long_mime_boundary,
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0013-lib-mail-Fix-parse_too_many_nested_mime_parts.patch b/meta-networking/recipes-support/dovecot/dovecot/0013-lib-mail-Fix-parse_too_many_nested_mime_parts.patch
new file mode 100644
index 0000000000..97068345fb
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/0013-lib-mail-Fix-parse_too_many_nested_mime_parts.patch
@@ -0,0 +1,32 @@
+From f77a2b6c3ffe2ea96f4a4b05ec38dc9d53266ecb Mon Sep 17 00:00:00 2001
+From: Timo Sirainen <timo.sirainen@open-xchange.com>
+Date: Wed, 27 May 2020 11:35:55 +0300
+Subject: [PATCH 13/13] lib-mail: Fix parse_too_many_nested_mime_parts()
+
+This was originally correct, until it was "optimized" wrong and got merged.
+---
+ src/lib-mail/message-parser.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+diff --git a/src/lib-mail/message-parser.c b/src/lib-mail/message-parser.c
+index 175d4b488..5b11772ff 100644
+--- a/src/lib-mail/message-parser.c
++++ b/src/lib-mail/message-parser.c
+@@ -621,7 +621,7 @@ static bool block_is_at_eoh(const struct message_block *block)
+
+ static bool parse_too_many_nested_mime_parts(struct message_parser_ctx *ctx)
+ {
+- return ctx->nested_parts_count > ctx->max_nested_mime_parts;
++ return ctx->nested_parts_count+1 >= ctx->max_nested_mime_parts;
+ }
+
+ #define MUTEX_FLAGS \
+--
+2.11.0
+
diff --git a/meta-networking/recipes-support/dovecot/dovecot/buffer_free_fix.patch b/meta-networking/recipes-support/dovecot/dovecot/buffer_free_fix.patch
new file mode 100644
index 0000000000..44f6564f89
--- /dev/null
+++ b/meta-networking/recipes-support/dovecot/dovecot/buffer_free_fix.patch
@@ -0,0 +1,27 @@
+From 1a6ff0beebf0ab0c71081eaff1d5d7fd26015a94 Mon Sep 17 00:00:00 2001
+From: Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
+Date: Tue, 19 Sep 2017 13:26:57 +0300
+Subject: [PATCH] lib: buffer_free(NULL) should be a no-op
+
+---
+ src/lib/buffer.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+CVE: CVE-2020-12100
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/d/dovecot/dovecot_2.2.33.2-1ubuntu4.7.debian.tar.xz]
+Comment: No change in any hunk
+
+--- a/src/lib/buffer.c
++++ b/src/lib/buffer.c
+@@ -148,6 +148,9 @@ void buffer_free(buffer_t **_buf)
+ {
+ struct real_buffer *buf = (struct real_buffer *)*_buf;
+
++ if (buf == NULL)
++ return;
++
+ *_buf = NULL;
+ if (buf->alloced)
+ p_free(buf->pool, buf->w_buffer);
diff --git a/meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb b/meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb
index e21a94ad64..29905196b6 100644
--- a/meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb
+++ b/meta-networking/recipes-support/dovecot/dovecot_2.2.36.4.bb
@@ -10,6 +10,22 @@ SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \
file://dovecot.service \
file://dovecot.socket \
file://0001-doveadm-Fix-parallel-build.patch \
+ file://0001-lib-mail-message-parser-Add-a-message_part_finish-he.patch \
+ file://0002-lib-mail-message-parser-Change-message_part_append-t.patch \
+ file://0003-lib-mail-message-parser-Optimize-updating-children_c.patch \
+ file://0004-lib-mail-message-parser-Optimize-appending-new-part-.patch \
+ file://0005-lib-mail-message-parser-Minor-code-cleanup-to-findin.patch \
+ file://0006-lib-mail-message-parser-Truncate-excessively-long-MI.patch \
+ file://0007-lib-mail-message-parser-Optimize-boundary-lookups-wh.patch \
+ file://0008-lib-mail-message-parser-Add-boundary_remove_until-he.patch \
+ file://0009-lib-mail-message-parser-Don-t-use-memory-pool-for-pa.patch \
+ file://0010-lib-mail-message-parser-Support-limiting-max-number-.patch \
+ file://0011-lib-mail-message-parser-Support-limiting-max-number-.patch \
+ file://0012-lib-mail-Fix-handling-trailing-in-MIME-boundaries.patch \
+ file://0013-lib-mail-Fix-parse_too_many_nested_mime_parts.patch \
+ file://buffer_free_fix.patch \
+ file://0002-lib-ntlm-Check-buffer-length-on-responses.patch \
+ file://0001-auth-mech-rpa-Fail-on-zero-len-buffer.patch \
"
SRC_URI[md5sum] = "66c4d71858b214afee5b390ee602dee2"
diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb b/meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb
index 5dabdd51d0..cad2fa7d71 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb
+++ b/meta-networking/recipes-support/drbd/drbd-utils_9.12.0.bb
@@ -8,13 +8,14 @@ SECTION = "admin"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
-SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils \
- git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers \
+SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \
+ git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
"
# v9.12.0
SRCREV_drbd-utils = "91629a4cce49ca0d4f917fe0bffa25cfe8db3052"
SRCREV_drbd-headers = "233006b4d26cf319638be0ef6d16ec7dee287b66"
+SRCREV_FORMAT = "drbd-utils_drbd-headers"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb b/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb
index ed5c3a9799..8301c65bfa 100644
--- a/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb
+++ b/meta-networking/recipes-support/geoip/geoip-perl_1.51.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e4f3ea6e9b28af88dc0321190a1f8250"
S = "${WORKDIR}/git"
SRCREV = "4cdfdc38eca237c19c22a8b90490446ce6d970fa"
-SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;protocol=https; \
+SRC_URI = "git://github.com/maxmind/geoip-api-perl.git;protocol=https;branch=master \
file://run-ptest \
"
diff --git a/meta-networking/recipes-support/geoip/geoip_1.6.12.bb b/meta-networking/recipes-support/geoip/geoip_1.6.12.bb
index 4271c2e155..0efcbec1fc 100644
--- a/meta-networking/recipes-support/geoip/geoip_1.6.12.bb
+++ b/meta-networking/recipes-support/geoip/geoip_1.6.12.bb
@@ -10,7 +10,7 @@ SECTION = "libdevel"
GEOIP_DATABASE_VERSION = "20181205"
-SRC_URI = "git://github.com/maxmind/geoip-api-c.git \
+SRC_URI = "git://github.com/maxmind/geoip-api-c.git;branch=main;protocol=https \
http://sources.openembedded.org/GeoIP.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIP-dat; \
http://sources.openembedded.org/GeoIPv6.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoIPv6-dat; \
http://sources.openembedded.org/GeoLiteCity.dat.${GEOIP_DATABASE_VERSION}.gz;apply=no;name=GeoLiteCity-dat; \
diff --git a/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb b/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
index 125b59e760..9c15490dcb 100644
--- a/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
+++ b/meta-networking/recipes-support/ifenslave/ifenslave_2.9.bb
@@ -9,7 +9,7 @@ inherit manpages
MAN_PKG = "${PN}"
SRCREV = "42bfbb9beb924672ca86b86e9679ac3d6b87d992"
-SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https"
+SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb b/meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb
index ad0ec27001..59e540a710 100644
--- a/meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb
+++ b/meta-networking/recipes-support/ipcalc/ipcalc_0.2.3.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
S = "${WORKDIR}/git"
SRCREV = "c3ee70c878b9c5833a77a1f339f1ca4dc6f225c5"
SRC_URI = "\
- git://github.com/nmav/ipcalc.git;protocol=https; \
+ git://github.com/nmav/ipcalc.git;protocol=https;branch=master \
file://0001-Makefile-pass-extra-linker-flags.patch \
"
diff --git a/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb b/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb
index 3cabc4ff8d..7a229c7b1e 100644
--- a/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb
+++ b/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.18.bb
@@ -14,7 +14,7 @@ PV .= "+git${SRCPV}"
LK_REL = "1.0.18"
SRC_URI = " \
- git://github.com/sctp/lksctp-tools.git \
+ git://github.com/sctp/lksctp-tools.git;branch=master;protocol=https \
file://0001-withsctp-use-PACKAGE_VERSION-in-withsctp.h.patch \
file://0001-configure.ac-add-CURRENT-REVISION-and-AGE-for-libsct.patch \
file://0001-build-fix-netinet-sctp.h-not-to-be-installed.patch \
diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
index 5917cfb3e1..e073561655 100644
--- a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
+++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS = "flex-native bison-native libnl python"
PV = "0.3.1+git${SRCPV}"
-SRC_URI = "git://github.com/linux-wpan/lowpan-tools \
+SRC_URI = "git://github.com/linux-wpan/lowpan-tools;branch=master;protocol=https \
file://no-help2man.patch \
file://0001-Fix-build-errors-with-clang.patch \
file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \
diff --git a/meta-networking/recipes-support/mtr/mtr_0.93.bb b/meta-networking/recipes-support/mtr/mtr_0.93.bb
index dd150700a9..4db7f7bbf8 100644
--- a/meta-networking/recipes-support/mtr/mtr_0.93.bb
+++ b/meta-networking/recipes-support/mtr/mtr_0.93.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://ui/mtr.c;beginline=5;endline=16;md5=00a894a39d53726a27386534d1c4e468"
SRCREV = "304349bad86229aedbc62c07d5e98a8292967991"
-SRC_URI = "git://github.com/traviscross/mtr"
+SRC_URI = "git://github.com/traviscross/mtr;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/nbdkit/nbdkit_git.bb b/meta-networking/recipes-support/nbdkit/nbdkit_git.bb
index a63e49ec55..0876c6f354 100644
--- a/meta-networking/recipes-support/nbdkit/nbdkit_git.bb
+++ b/meta-networking/recipes-support/nbdkit/nbdkit_git.bb
@@ -9,7 +9,7 @@ HOMEPAGE = "https://github.com/libguestfs/nbdkit"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4332a97808994cf2133a65b6c6f33eaf"
-SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https \
+SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https;branch=master \
file://0001-server-Fix-build-when-printf-is-a-macro.patch \
"
diff --git a/meta-networking/recipes-support/ndisc6/ndisc6_git.bb b/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
index 5f866052c6..d359b620b8 100644
--- a/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
+++ b/meta-networking/recipes-support/ndisc6/ndisc6_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PV = "1.0.4+git${SRCPV}"
SRCREV = "4c794b5512d23c649def1f94a684225dcbb6ac3e"
-SRC_URI = "git://git.remlab.net/git/ndisc6.git;protocol=http \
+SRC_URI = "git://git.remlab.net/git/ndisc6.git;protocol=http;branch=master \
file://0001-replace-VLAIS-with-malloc-free-pair.patch \
file://0002-Do-not-undef-_GNU_SOURCE.patch \
file://0001-autogen-Do-not-symlink-gettext.h-from-build-host.patch \
diff --git a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
index 14d743f820..1e113de519 100644
--- a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
+++ b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
@@ -16,6 +16,8 @@ SRC_URI[sha256sum] = "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df0967
inherit autotools
+CVE_PRODUCT = "netcat_project:netcat"
+
do_install_append() {
install -d ${D}${bindir}
mv ${D}${bindir}/nc ${D}${bindir}/nc.${BPN}
diff --git a/meta-networking/recipes-support/netcf/netcf_0.2.8.bb b/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
index a180571f2d..af617ce922 100644
--- a/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
+++ b/meta-networking/recipes-support/netcf/netcf_0.2.8.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
SRCREV = "2c5d4255857531bc09d91dcd02e86545f29004d4"
PV .= "+git${SRCPV}"
-SRC_URI = "git://pagure.io/netcf.git;protocol=https \
+SRC_URI = "git://pagure.io/netcf.git;protocol=https;branch=master \
"
UPSTREAM_CHECK_GITTAGREGEX = "release-(?P<pver>(\d+(\.\d+)+))"
diff --git a/meta-networking/recipes-support/netperf/netperf_git.bb b/meta-networking/recipes-support/netperf/netperf_git.bb
index d48f3aeabd..f6ea211f7a 100644
--- a/meta-networking/recipes-support/netperf/netperf_git.bb
+++ b/meta-networking/recipes-support/netperf/netperf_git.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6"
PV = "2.7.0+git${SRCPV}"
-SRC_URI = "git://github.com/HewlettPackard/netperf.git \
+SRC_URI = "git://github.com/HewlettPackard/netperf.git;branch=master;protocol=https \
file://cpu_set.patch \
file://vfork.patch \
file://init \
diff --git a/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb b/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
index bb401666c6..0c67f67d70 100644
--- a/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
+++ b/meta-networking/recipes-support/nis/yp-tools_4.2.3.bb
@@ -14,7 +14,7 @@ and ypdomainname. \
# v4.2.3
SRCREV = "1bfda29c342a81b97cb1995ffd9e8da5de63e7ab"
-SRC_URI = "git://github.com/thkukuk/yp-tools \
+SRC_URI = "git://github.com/thkukuk/yp-tools;branch=master;protocol=https \
file://domainname.service \
"
diff --git a/meta-networking/recipes-support/ntimed/ntimed_git.bb b/meta-networking/recipes-support/ntimed/ntimed_git.bb
index a749b16593..43ed1abe38 100644
--- a/meta-networking/recipes-support/ntimed/ntimed_git.bb
+++ b/meta-networking/recipes-support/ntimed/ntimed_git.bb
@@ -8,7 +8,7 @@ SECTION = "net"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://main.c;beginline=2;endline=24;md5=89db8e76f2951f3fad167e7aa9718a44"
-SRC_URI = "git://github.com/bsdphk/Ntimed \
+SRC_URI = "git://github.com/bsdphk/Ntimed;branch=master;protocol=https \
file://use-ldflags.patch"
PV = "0.0+git${SRCPV}"
diff --git a/meta-networking/recipes-support/ntp/ntp/CVE-2023-2655x.patch b/meta-networking/recipes-support/ntp/ntp/CVE-2023-2655x.patch
new file mode 100644
index 0000000000..734c6f197b
--- /dev/null
+++ b/meta-networking/recipes-support/ntp/ntp/CVE-2023-2655x.patch
@@ -0,0 +1,340 @@
+ntp: backport patch for 5 CVEs CVE-2023-26551/2/3/4/5
+
+Upstream-Status: Backport [https://archive.ntp.org/ntp4/ntp-4.2/ntp-4.2.8p15-3806-3807.patch]
+CVE: CVE-2023-26551
+CVE: CVE-2023-26552
+CVE: CVE-2023-26553
+CVE: CVE-2023-26554
+CVE: CVE-2023-26555
+
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ include/ntp_fp.h | 4 +-
+ libntp/mstolfp.c | 108 +++++++++++++++------------------------
+ ntpd/refclock_palisade.c | 50 +++++++++++++++---
+ tests/libntp/strtolfp.c | 33 +++++++-----
+ 4 files changed, 104 insertions(+), 91 deletions(-)
+
+diff --git a/include/ntp_fp.h b/include/ntp_fp.h
+index afd1f82..fe6e390 100644
+--- a/include/ntp_fp.h
++++ b/include/ntp_fp.h
+@@ -195,9 +195,9 @@ typedef u_int32 u_fp;
+ do { \
+ int32 add_f = (int32)(f); \
+ if (add_f >= 0) \
+- M_ADD((r_i), (r_f), 0, (uint32)( add_f)); \
++ M_ADD((r_i), (r_f), 0, (u_int32)( add_f)); \
+ else \
+- M_SUB((r_i), (r_f), 0, (uint32)(-add_f)); \
++ M_SUB((r_i), (r_f), 0, (u_int32)(-add_f)); \
+ } while(0)
+
+ #define M_ISNEG(v_i) /* v < 0 */ \
+diff --git a/libntp/mstolfp.c b/libntp/mstolfp.c
+index 3dfc4ef..a906d76 100644
+--- a/libntp/mstolfp.c
++++ b/libntp/mstolfp.c
+@@ -14,86 +14,58 @@ mstolfp(
+ l_fp *lfp
+ )
+ {
+- register const char *cp;
+- register char *bp;
+- register const char *cpdec;
+- char buf[100];
++ int ch, neg = 0;
++ u_int32 q, r;
+
+ /*
+ * We understand numbers of the form:
+ *
+ * [spaces][-|+][digits][.][digits][spaces|\n|\0]
+ *
+- * This is one enormous hack. Since I didn't feel like
+- * rewriting the decoding routine for milliseconds, what
+- * is essentially done here is to make a copy of the string
+- * with the decimal moved over three places so the seconds
+- * decoding routine can be used.
++ * This is kinda hack. We use 'atolfp' to do the basic parsing
++ * (after some initial checks) and then divide the result by
++ * 1000. The original implementation avoided that by
++ * hacking up the input string to move the decimal point, but
++ * that needed string manipulations prone to buffer overruns.
++ * To avoid that trouble we do the conversion first and adjust
++ * the result.
+ */
+- bp = buf;
+- cp = str;
+- while (isspace((unsigned char)*cp))
+- cp++;
+
+- if (*cp == '-' || *cp == '+') {
+- *bp++ = *cp++;
+- }
+-
+- if (*cp != '.' && !isdigit((unsigned char)*cp))
+- return 0;
+-
++ while (isspace(ch = *(const unsigned char*)str))
++ ++str;
+
+- /*
+- * Search forward for the decimal point or the end of the string.
+- */
+- cpdec = cp;
+- while (isdigit((unsigned char)*cpdec))
+- cpdec++;
+-
+- /*
+- * Found something. If we have more than three digits copy the
+- * excess over, else insert a leading 0.
+- */
+- if ((cpdec - cp) > 3) {
+- do {
+- *bp++ = (char)*cp++;
+- } while ((cpdec - cp) > 3);
+- } else {
+- *bp++ = '0';
++ switch (ch) {
++ case '-': neg = TRUE;
++ case '+': ++str;
++ default : break;
+ }
+
+- /*
+- * Stick the decimal in. If we've got less than three digits in
+- * front of the millisecond decimal we insert the appropriate number
+- * of zeros.
+- */
+- *bp++ = '.';
+- if ((cpdec - cp) < 3) {
+- size_t i = 3 - (cpdec - cp);
+- do {
+- *bp++ = '0';
+- } while (--i > 0);
+- }
++ if (!isdigit(ch = *(const unsigned char*)str) && (ch != '.'))
++ return 0;
++ if (!atolfp(str, lfp))
++ return 0;
+
+- /*
+- * Copy the remainder up to the millisecond decimal. If cpdec
+- * is pointing at a decimal point, copy in the trailing number too.
++ /* now do a chained/overlapping division by 1000 to get from
++ * seconds to msec. 1000 is small enough to go with temporary
++ * 32bit accus for Q and R.
+ */
+- while (cp < cpdec)
+- *bp++ = (char)*cp++;
+-
+- if (*cp == '.') {
+- cp++;
+- while (isdigit((unsigned char)*cp))
+- *bp++ = (char)*cp++;
+- }
+- *bp = '\0';
++ q = lfp->l_ui / 1000u;
++ r = lfp->l_ui - (q * 1000u);
++ lfp->l_ui = q;
+
+- /*
+- * Check to make sure the string is properly terminated. If
+- * so, give the buffer to the decoding routine.
+- */
+- if (*cp != '\0' && !isspace((unsigned char)*cp))
+- return 0;
+- return atolfp(buf, lfp);
++ r = (r << 16) | (lfp->l_uf >> 16);
++ q = r / 1000u;
++ r = ((r - q * 1000) << 16) | (lfp->l_uf & 0x0FFFFu);
++ lfp->l_uf = q << 16;
++ q = r / 1000;
++ lfp->l_uf |= q;
++ r -= q * 1000u;
++
++ /* fix sign */
++ if (neg)
++ L_NEG(lfp);
++ /* round */
++ if (r >= 500)
++ L_ADDF(lfp, (neg ? -1 : 1));
++ return 1;
+ }
+diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c
+index cb68255..15c21d8 100644
+--- a/ntpd/refclock_palisade.c
++++ b/ntpd/refclock_palisade.c
+@@ -1225,9 +1225,9 @@ palisade_poll (
+ return; /* using synchronous packet input */
+
+ if(up->type == CLK_PRAECIS) {
+- if(write(peer->procptr->io.fd,"SPSTAT\r\n",8) < 0)
++ if (write(peer->procptr->io.fd,"SPSTAT\r\n",8) < 0) {
+ msyslog(LOG_ERR, "Palisade(%d) write: %m:",unit);
+- else {
++ } else {
+ praecis_msg = 1;
+ return;
+ }
+@@ -1249,20 +1249,53 @@ praecis_parse (
+
+ pp = peer->procptr;
+
+- memcpy(buf+p,rbufp->recv_space.X_recv_buffer, rbufp->recv_length);
++ if (p + rbufp->recv_length >= sizeof buf) {
++ struct palisade_unit *up;
++ up = pp->unitptr;
++
++ /*
++ * We COULD see if there is a \r\n in the incoming
++ * buffer before it overflows, and then process the
++ * current line.
++ *
++ * Similarly, if we already have a hunk of data that
++ * we're now flushing, that will cause the line of
++ * data we're in the process of collecting to be garbage.
++ *
++ * Since we now check for this overflow and log when it
++ * happens, we're now in a better place to easily see
++ * what's going on and perhaps better choices can be made.
++ */
++
++ /* Do we need to log the size of the overflow? */
++ msyslog(LOG_ERR, "Palisade(%d) praecis_parse(): input buffer overflow",
++ up->unit);
++
++ p = 0;
++ praecis_msg = 0;
++
++ refclock_report(peer, CEVNT_BADREPLY);
++
++ return;
++ }
++
++ memcpy(buf+p, rbufp->recv_buffer, rbufp->recv_length);
+ p += rbufp->recv_length;
+
+- if(buf[p-2] == '\r' && buf[p-1] == '\n') {
++ if ( p >= 2
++ && buf[p-2] == '\r'
++ && buf[p-1] == '\n') {
+ buf[p-2] = '\0';
+ record_clock_stats(&peer->srcadr, buf);
+
+ p = 0;
+ praecis_msg = 0;
+
+- if (HW_poll(pp) < 0)
++ if (HW_poll(pp) < 0) {
+ refclock_report(peer, CEVNT_FAULT);
+-
++ }
+ }
++ return;
+ }
+
+ static void
+@@ -1407,7 +1440,10 @@ HW_poll (
+
+ /* Edge trigger */
+ if (up->type == CLK_ACUTIME)
+- write (pp->io.fd, "", 1);
++ if (write (pp->io.fd, "", 1) != 1)
++ msyslog(LOG_WARNING,
++ "Palisade(%d) HW_poll: failed to send trigger: %m",
++ up->unit);
+
+ if (ioctl(pp->io.fd, TIOCMSET, &x) < 0) {
+ #ifdef DEBUG
+diff --git a/tests/libntp/strtolfp.c b/tests/libntp/strtolfp.c
+index 6855d9b..9090159 100644
+--- a/tests/libntp/strtolfp.c
++++ b/tests/libntp/strtolfp.c
+@@ -26,6 +26,13 @@ setUp(void)
+ return;
+ }
+
++static const char* fmtLFP(const l_fp *e, const l_fp *a)
++{
++ static char buf[100];
++ snprintf(buf, sizeof(buf), "e=$%08x.%08x, a=$%08x.%08x",
++ e->l_ui, e->l_uf, a->l_ui, a->l_uf);
++ return buf;
++}
+
+ void test_PositiveInteger(void) {
+ const char *str = "500";
+@@ -37,8 +44,8 @@ void test_PositiveInteger(void) {
+ TEST_ASSERT_TRUE(atolfp(str, &actual));
+ TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+- TEST_ASSERT_TRUE(IsEqual(expected, actual));
+- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual), fmtLFP(&expected, &actual));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual_ms), fmtLFP(&expected, &actual_ms));
+ }
+
+ void test_NegativeInteger(void) {
+@@ -54,8 +61,8 @@ void test_NegativeInteger(void) {
+ TEST_ASSERT_TRUE(atolfp(str, &actual));
+ TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+- TEST_ASSERT_TRUE(IsEqual(expected, actual));
+- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual), fmtLFP(&expected, &actual));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual_ms), fmtLFP(&expected, &actual_ms));
+ }
+
+ void test_PositiveFraction(void) {
+@@ -68,8 +75,8 @@ void test_PositiveFraction(void) {
+ TEST_ASSERT_TRUE(atolfp(str, &actual));
+ TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+- TEST_ASSERT_TRUE(IsEqual(expected, actual));
+- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual), fmtLFP(&expected, &actual));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual_ms), fmtLFP(&expected, &actual_ms));
+ }
+
+ void test_NegativeFraction(void) {
+@@ -85,8 +92,8 @@ void test_NegativeFraction(void) {
+ TEST_ASSERT_TRUE(atolfp(str, &actual));
+ TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+- TEST_ASSERT_TRUE(IsEqual(expected, actual));
+- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual), fmtLFP(&expected, &actual));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual_ms), fmtLFP(&expected, &actual_ms));
+ }
+
+ void test_PositiveMsFraction(void) {
+@@ -100,9 +107,8 @@ void test_PositiveMsFraction(void) {
+ TEST_ASSERT_TRUE(atolfp(str, &actual));
+ TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+- TEST_ASSERT_TRUE(IsEqual(expected, actual));
+- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
+-
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual), fmtLFP(&expected, &actual));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual_ms), fmtLFP(&expected, &actual_ms));
+ }
+
+ void test_NegativeMsFraction(void) {
+@@ -118,9 +124,8 @@ void test_NegativeMsFraction(void) {
+ TEST_ASSERT_TRUE(atolfp(str, &actual));
+ TEST_ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+- TEST_ASSERT_TRUE(IsEqual(expected, actual));
+- TEST_ASSERT_TRUE(IsEqual(expected, actual_ms));
+-
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual), fmtLFP(&expected, &actual));
++ TEST_ASSERT_TRUE_MESSAGE(IsEqual(expected, actual_ms), fmtLFP(&expected, &actual_ms));
+ }
+
+ void test_InvalidChars(void) {
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb b/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
index 7e168825e0..1a223db6fa 100644
--- a/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
+++ b/meta-networking/recipes-support/ntp/ntp_4.2.8p15.bb
@@ -22,8 +22,8 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g
file://sntp.service \
file://sntp \
file://ntpd.list \
+ file://CVE-2023-2655x.patch \
"
-
SRC_URI[sha256sum] = "f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19"
inherit autotools update-rc.d useradd systemd pkgconfig
@@ -61,6 +61,14 @@ PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging"
PACKAGECONFIG[mdns] = "ac_cv_header_dns_sd_h=yes,ac_cv_header_dns_sd_h=no,mdns"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+do_configure_append() {
+ # tests are generated but also checked-in to source control
+ # when CVE-2023-2655x.patch changes timestamp of test source file, Makefile detects it and tries to regenerate it
+ # however it fails because of missing ruby interpretter; adding ruby-native as dependency fixes it
+ # since the regenerated file is identical to the one from source control, touch the generated file instead of adding heavy dependency
+ touch ${S}/tests/libntp/run-strtolfp.c
+}
+
do_install_append() {
install -d ${D}${sysconfdir}/init.d
install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
diff --git a/meta-networking/recipes-support/open-isns/open-isns_0.99.bb b/meta-networking/recipes-support/open-isns/open-isns_0.99.bb
index a03b92f5fe..1bf7c48e09 100644
--- a/meta-networking/recipes-support/open-isns/open-isns_0.99.bb
+++ b/meta-networking/recipes-support/open-isns/open-isns_0.99.bb
@@ -13,7 +13,7 @@ SECTION = "net"
DEPENDS = "openssl"
-SRC_URI = "git://github.com/open-iscsi/open-isns"
+SRC_URI = "git://github.com/open-iscsi/open-isns;branch=master;protocol=https"
SRCREV = "cfdbcff867ee580a71bc9c18c3a38a6057df0150"
diff --git a/meta-networking/recipes-support/openvpn/openvpn_2.4.9.bb b/meta-networking/recipes-support/openvpn/openvpn_2.4.12.bb
index 529e3912bb..55e66036b7 100644
--- a/meta-networking/recipes-support/openvpn/openvpn_2.4.9.bb
+++ b/meta-networking/recipes-support/openvpn/openvpn_2.4.12.bb
@@ -14,8 +14,11 @@ SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
-SRC_URI[md5sum] = "52863fa9b98e5a3d7f8bec1d5785a2ba"
-SRC_URI[sha256sum] = "46b268ef88e67ca6de2e9f19943eb9e5ac8544e55f5c1f3af677298d03e64b6e"
+SRC_URI[md5sum] = "e83d430947fb7c9ad1a174987317d1dc"
+SRC_URI[sha256sum] = "66952d9c95490e5875f04c9f8fa313b5e816d1b7b4d6cda3fb2ff749ad405dee"
+
+# CVE-2020-7224 and CVE-2020-27569 are for Aviatrix OpenVPN client, not for openvpn.
+CVE_CHECK_WHITELIST += "CVE-2020-7224 CVE-2020-27569"
SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/meta-networking/recipes-support/phytool/phytool.bb b/meta-networking/recipes-support/phytool/phytool.bb
index 29499d6d7a..7fde88c447 100644
--- a/meta-networking/recipes-support/phytool/phytool.bb
+++ b/meta-networking/recipes-support/phytool/phytool.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
PV = "2+git${SRCPV}"
SRCREV = "8882328c08ba2efb13c049812098f1d0cb8adf0c"
-SRC_URI = "git://github.com/wkz/phytool.git"
+SRC_URI = "git://github.com/wkz/phytool.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb b/meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb
index 15fd7ff663..5cb4e67c28 100644
--- a/meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb
+++ b/meta-networking/recipes-support/rdma-core/rdma-core_28.0.bb
@@ -6,7 +6,7 @@ DEPENDS = "libnl"
RDEPENDS_${PN} = "bash perl"
BRANCH = "stable-v${@d.getVar('PV').split('.')[0]}"
-SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=${BRANCH} \
+SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=${BRANCH};protocol=https \
file://0001-Remove-man-files-which-cant-be-built.patch \
"
SRCREV = "f12c953f0864691eacc9fcc4cda489b92ffd5a85"
diff --git a/meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb b/meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb
index 0b63f79aca..d8a1f6140f 100644
--- a/meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb
+++ b/meta-networking/recipes-support/smcroute/smcroute_2.4.4.bb
@@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SRCREV = "a8e5847e5f7e411be424f9b52a6cdf9d2ed4aeb5"
-SRC_URI = "git://github.com/troglobit/smcroute.git;branch=master;protocol=git"
+SRC_URI = "git://github.com/troglobit/smcroute.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/spice/spice-protocol_git.bb b/meta-networking/recipes-support/spice/spice-protocol_git.bb
index 1d56bea17c..ca683bf220 100644
--- a/meta-networking/recipes-support/spice/spice-protocol_git.bb
+++ b/meta-networking/recipes-support/spice/spice-protocol_git.bb
@@ -18,7 +18,7 @@ PV = "0.14.1+git${SRCPV}"
SRCREV = "e0ec178a72aa33e307ee5ac02b63bf336da921a5"
SRC_URI = " \
- git://anongit.freedesktop.org/spice/spice-protocol \
+ git://anongit.freedesktop.org/spice/spice-protocol;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
index 9d3a0e6cb5..3d47f5a54a 100644
--- a/meta-networking/recipes-support/spice/spice_git.bb
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -21,8 +21,8 @@ SRCREV_spice-common = "4fc4c2db36c7f07b906e9a326a9d3dc0ae6a2671"
SRCREV_FORMAT = "spice_spice-common"
SRC_URI = " \
- git://anongit.freedesktop.org/spice/spice;name=spice \
- git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/subprojects/spice-common;name=spice-common \
+ git://anongit.freedesktop.org/spice/spice;name=spice;branch=master \
+ git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/subprojects/spice-common;name=spice-common;branch=master \
file://0001-Convert-pthread_t-to-be-numeric.patch \
file://0001-Fix-compile-errors-on-Linux-32bit-system.patch \
"
diff --git a/meta-networking/recipes-support/spice/usbredir_0.8.0.bb b/meta-networking/recipes-support/spice/usbredir_0.8.0.bb
index 9ee43be1ea..f07fb3b50c 100644
--- a/meta-networking/recipes-support/spice/usbredir_0.8.0.bb
+++ b/meta-networking/recipes-support/spice/usbredir_0.8.0.bb
@@ -10,7 +10,7 @@ DEPENDS = "libusb1"
SRCREV = "07b98b8e71f620dfdd57e92ddef6b677b259a092"
SRC_URI = " \
- git://anongit.freedesktop.org/spice/usbredir \
+ git://anongit.freedesktop.org/spice/usbredir;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-networking/recipes-support/strongswan/files/CVE-2021-41990.patch b/meta-networking/recipes-support/strongswan/files/CVE-2021-41990.patch
new file mode 100644
index 0000000000..b7118ba1fb
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/files/CVE-2021-41990.patch
@@ -0,0 +1,62 @@
+From 423a5d56274a1d343e0d2107dfc4fbf0df2dcca5 Mon Sep 17 00:00:00 2001
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Tue, 28 Sep 2021 17:52:08 +0200
+Subject: [PATCH] Reject RSASSA-PSS params with negative salt length
+
+The `salt_len` member in the struct is of type `ssize_t` because we use
+negative values for special automatic salt lengths when generating
+signatures.
+
+Not checking this could lead to an integer overflow. The value is assigned
+to the `len` field of a chunk (`size_t`), which is further used in
+calculations to check the padding structure and (if that is passed by a
+matching crafted signature value) eventually a memcpy() that will result
+in a segmentation fault.
+
+Fixes: a22316520b91 ("signature-params: Add functions to parse/build ASN.1 RSASSA-PSS params")
+Fixes: 7d6b81648b2d ("gmp: Add support for RSASSA-PSS signature verification")
+Fixes: CVE-2021-41990
+
+Upstream-Status: Backport [https://download.strongswan.org/security/CVE-2021-41990]
+CVE: CVE-2021-41990
+
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+
+---
+ src/libstrongswan/credentials/keys/signature_params.c | 6 +++++-
+ src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c | 2 +-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/libstrongswan/credentials/keys/signature_params.c b/src/libstrongswan/credentials/keys/signature_params.c
+index d89bd2c96bb5..837de8443d43 100644
+--- a/src/libstrongswan/credentials/keys/signature_params.c
++++ b/src/libstrongswan/credentials/keys/signature_params.c
+@@ -322,7 +322,11 @@ bool rsa_pss_params_parse(chunk_t asn1, int level0, rsa_pss_params_t *params)
+ case RSASSA_PSS_PARAMS_SALT_LEN:
+ if (object.len)
+ {
+- params->salt_len = (size_t)asn1_parse_integer_uint64(object);
++ params->salt_len = (ssize_t)asn1_parse_integer_uint64(object);
++ if (params->salt_len < 0)
++ {
++ goto end;
++ }
+ }
+ break;
+ case RSASSA_PSS_PARAMS_TRAILER:
+diff --git a/src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c b/src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c
+index f9bd1d314dec..3a775090883e 100644
+--- a/src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c
++++ b/src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c
+@@ -168,7 +168,7 @@ static bool verify_emsa_pss_signature(private_gmp_rsa_public_key_t *this,
+ int i;
+ bool success = FALSE;
+
+- if (!params)
++ if (!params || params->salt_len < 0)
+ {
+ return FALSE;
+ }
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/strongswan/files/CVE-2021-41991.patch b/meta-networking/recipes-support/strongswan/files/CVE-2021-41991.patch
new file mode 100644
index 0000000000..2d898fa5cf
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/files/CVE-2021-41991.patch
@@ -0,0 +1,41 @@
+From b667237b3a84f601ef5a707ce8eb861c3a5002d3 Mon Sep 17 00:00:00 2001
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Tue, 28 Sep 2021 19:38:22 +0200
+Subject: [PATCH] cert-cache: Prevent crash due to integer overflow/sign change
+
+random() allocates values in the range [0, RAND_MAX], with RAND_MAX usually
+equaling INT_MAX = 2^31-1. Previously, values between 0 and 31 were added
+directly to that offset before applying`% CACHE_SIZE` to get an index into
+the cache array. If the random value was very high, this resulted in an
+integer overflow and a negative index value and, therefore, an out-of-bounds
+access of the array and in turn dereferencing invalid pointers when trying
+to acquire the read lock. This most likely results in a segmentation fault.
+
+Fixes: 764e8b2211ce ("reimplemented certificate cache")
+Fixes: CVE-2021-41991
+
+Upstream-Status: Backport [https://download.strongswan.org/security/CVE-2021-41991]
+CVE: CVE-2021-41991
+
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+
+---
+ src/libstrongswan/credentials/sets/cert_cache.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libstrongswan/credentials/sets/cert_cache.c b/src/libstrongswan/credentials/sets/cert_cache.c
+index f1579c60a9bc..ceebb3843725 100644
+--- a/src/libstrongswan/credentials/sets/cert_cache.c
++++ b/src/libstrongswan/credentials/sets/cert_cache.c
+@@ -151,7 +151,7 @@ static void cache(private_cert_cache_t *this,
+ for (try = 0; try < REPLACE_TRIES; try++)
+ {
+ /* replace a random relation */
+- offset = random();
++ offset = random() % CACHE_SIZE;
+ for (i = 0; i < CACHE_SIZE; i++)
+ {
+ rel = &this->relations[(i + offset) % CACHE_SIZE];
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/strongswan/files/CVE-2021-45079.patch b/meta-networking/recipes-support/strongswan/files/CVE-2021-45079.patch
new file mode 100644
index 0000000000..97aa6a0efc
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/files/CVE-2021-45079.patch
@@ -0,0 +1,156 @@
+From 76968cdd6b79f6ae40d674554e902ced192fd33e Mon Sep 17 00:00:00 2001
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Tue, 14 Dec 2021 10:51:35 +0100
+Subject: [PATCH] eap-authenticator: Enforce failure if MSK generation fails
+
+Without this, the authentication succeeded if the server sent an early
+EAP-Success message for mutual, key-generating EAP methods like EAP-TLS,
+which may be used in EAP-only scenarios but would complete without server
+or client authentication. For clients configured for such EAP-only
+scenarios, a rogue server could capture traffic after the tunnel is
+established or even access hosts behind the client. For non-mutual EAP
+methods, public key server authentication has been enforced for a while.
+
+A server previously could also crash a client by sending an EAP-Success
+immediately without initiating an actual EAP method.
+
+Fixes: 0706c39cda52 ("added support for EAP methods not establishing an MSK")
+Fixes: CVE-2021-45079
+
+Upstream-Status: Backport [https://download.strongswan.org/security/CVE-2021-45079/strongswan-5.5.0-5.9.4_eap_success.patch]
+CVE: CVE-2021-45079
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+---
+ src/libcharon/plugins/eap_gtc/eap_gtc.c | 2 +-
+ src/libcharon/plugins/eap_md5/eap_md5.c | 2 +-
+ src/libcharon/plugins/eap_radius/eap_radius.c | 4 ++-
+ src/libcharon/sa/eap/eap_method.h | 8 ++++-
+ .../ikev2/authenticators/eap_authenticator.c | 32 ++++++++++++++++---
+ 5 files changed, 40 insertions(+), 8 deletions(-)
+
+diff --git a/src/libcharon/plugins/eap_gtc/eap_gtc.c b/src/libcharon/plugins/eap_gtc/eap_gtc.c
+index 95ba090b79ce..cffb6222c2f8 100644
+--- a/src/libcharon/plugins/eap_gtc/eap_gtc.c
++++ b/src/libcharon/plugins/eap_gtc/eap_gtc.c
+@@ -195,7 +195,7 @@ METHOD(eap_method_t, get_type, eap_type_t,
+ METHOD(eap_method_t, get_msk, status_t,
+ private_eap_gtc_t *this, chunk_t *msk)
+ {
+- return FAILED;
++ return NOT_SUPPORTED;
+ }
+
+ METHOD(eap_method_t, get_identifier, uint8_t,
+diff --git a/src/libcharon/plugins/eap_md5/eap_md5.c b/src/libcharon/plugins/eap_md5/eap_md5.c
+index ab5f7ff6a823..3a92ad7c0a04 100644
+--- a/src/libcharon/plugins/eap_md5/eap_md5.c
++++ b/src/libcharon/plugins/eap_md5/eap_md5.c
+@@ -213,7 +213,7 @@ METHOD(eap_method_t, get_type, eap_type_t,
+ METHOD(eap_method_t, get_msk, status_t,
+ private_eap_md5_t *this, chunk_t *msk)
+ {
+- return FAILED;
++ return NOT_SUPPORTED;
+ }
+
+ METHOD(eap_method_t, is_mutual, bool,
+diff --git a/src/libcharon/plugins/eap_radius/eap_radius.c b/src/libcharon/plugins/eap_radius/eap_radius.c
+index 2dc7a423e702..5336dead13d9 100644
+--- a/src/libcharon/plugins/eap_radius/eap_radius.c
++++ b/src/libcharon/plugins/eap_radius/eap_radius.c
+@@ -733,7 +733,9 @@ METHOD(eap_method_t, get_msk, status_t,
+ *out = msk;
+ return SUCCESS;
+ }
+- return FAILED;
++ /* we assume the selected method did not establish an MSK, if it failed
++ * to establish one, process() would have failed */
++ return NOT_SUPPORTED;
+ }
+
+ METHOD(eap_method_t, get_identifier, uint8_t,
+diff --git a/src/libcharon/sa/eap/eap_method.h b/src/libcharon/sa/eap/eap_method.h
+index 0b5218dfec15..33564831f86e 100644
+--- a/src/libcharon/sa/eap/eap_method.h
++++ b/src/libcharon/sa/eap/eap_method.h
+@@ -114,10 +114,16 @@ struct eap_method_t {
+ * Not all EAP methods establish a shared secret. For implementations of
+ * the EAP-Identity method, get_msk() returns the received identity.
+ *
++ * @note Returning NOT_SUPPORTED is important for implementations of EAP
++ * methods that don't establish an MSK. In particular as client because
++ * key-generating EAP methods MUST fail to process EAP-Success messages if
++ * no MSK is established.
++ *
+ * @param msk chunk receiving internal stored MSK
+ * @return
+- * - SUCCESS, or
++ * - SUCCESS, if MSK is established
+ * - FAILED, if MSK not established (yet)
++ * - NOT_SUPPORTED, for non-MSK-establishing methods
+ */
+ status_t (*get_msk) (eap_method_t *this, chunk_t *msk);
+
+diff --git a/src/libcharon/sa/ikev2/authenticators/eap_authenticator.c b/src/libcharon/sa/ikev2/authenticators/eap_authenticator.c
+index e1e6cd7ee6f3..87548fc471a6 100644
+--- a/src/libcharon/sa/ikev2/authenticators/eap_authenticator.c
++++ b/src/libcharon/sa/ikev2/authenticators/eap_authenticator.c
+@@ -305,9 +305,17 @@ static eap_payload_t* server_process_eap(private_eap_authenticator_t *this,
+ this->method->destroy(this->method);
+ return server_initiate_eap(this, FALSE);
+ }
+- if (this->method->get_msk(this->method, &this->msk) == SUCCESS)
++ switch (this->method->get_msk(this->method, &this->msk))
+ {
+- this->msk = chunk_clone(this->msk);
++ case SUCCESS:
++ this->msk = chunk_clone(this->msk);
++ break;
++ case NOT_SUPPORTED:
++ break;
++ case FAILED:
++ default:
++ DBG1(DBG_IKE, "failed to establish MSK");
++ goto failure;
+ }
+ if (vendor)
+ {
+@@ -326,6 +334,7 @@ static eap_payload_t* server_process_eap(private_eap_authenticator_t *this,
+ return eap_payload_create_code(EAP_SUCCESS, in->get_identifier(in));
+ case FAILED:
+ default:
++failure:
+ /* type might have changed for virtual methods */
+ type = this->method->get_type(this->method, &vendor);
+ if (vendor)
+@@ -661,9 +670,24 @@ METHOD(authenticator_t, process_client, status_t,
+ uint32_t vendor;
+ auth_cfg_t *cfg;
+
+- if (this->method->get_msk(this->method, &this->msk) == SUCCESS)
++ if (!this->method)
+ {
+- this->msk = chunk_clone(this->msk);
++ DBG1(DBG_IKE, "received unexpected %N",
++ eap_code_names, eap_payload->get_code(eap_payload));
++ return FAILED;
++ }
++ switch (this->method->get_msk(this->method, &this->msk))
++ {
++ case SUCCESS:
++ this->msk = chunk_clone(this->msk);
++ break;
++ case NOT_SUPPORTED:
++ break;
++ case FAILED:
++ default:
++ DBG1(DBG_IKE, "received %N but failed to establish MSK",
++ eap_code_names, eap_payload->get_code(eap_payload));
++ return FAILED;
+ }
+ type = this->method->get_type(this->method, &vendor);
+ if (vendor)
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/strongswan/files/CVE-2022-40617.patch b/meta-networking/recipes-support/strongswan/files/CVE-2022-40617.patch
new file mode 100644
index 0000000000..66e5047125
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/files/CVE-2022-40617.patch
@@ -0,0 +1,210 @@
+From 66d3b2e0e596a6eac1ebcd15c83a8d9368fe7b34 Mon Sep 17 00:00:00 2001
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Fri, 22 Jul 2022 15:37:43 +0200
+Subject: [PATCH] credential-manager: Do online revocation checks only after
+ basic trust chain validation
+
+This avoids querying URLs of potentially untrusted certificates, e.g. if
+an attacker sends a specially crafted end-entity and intermediate CA
+certificate with a CDP that points to a server that completes the
+TCP handshake but then does not send any further data, which will block
+the fetcher thread (depending on the plugin) for as long as the default
+timeout for TCP. Doing that multiple times will block all worker threads,
+leading to a DoS attack.
+
+The logging during the certificate verification obviously changes. The
+following example shows the output of `pki --verify` for the current
+strongswan.org certificate:
+
+new:
+
+ using certificate "CN=www.strongswan.org"
+ using trusted intermediate ca certificate "C=US, O=Let's Encrypt, CN=R3"
+ using trusted ca certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
+ reached self-signed root ca with a path length of 1
+checking certificate status of "CN=www.strongswan.org"
+ requesting ocsp status from 'http://r3.o.lencr.org' ...
+ ocsp response correctly signed by "C=US, O=Let's Encrypt, CN=R3"
+ ocsp response is valid: until Jul 27 12:59:58 2022
+certificate status is good
+checking certificate status of "C=US, O=Let's Encrypt, CN=R3"
+ocsp response verification failed, no signer certificate 'C=US, O=Let's Encrypt, CN=R3' found
+ fetching crl from 'http://x1.c.lencr.org/' ...
+ using trusted certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
+ crl correctly signed by "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
+ crl is valid: until Apr 18 01:59:59 2023
+certificate status is good
+certificate trusted, lifetimes valid, certificate not revoked
+
+old:
+
+ using certificate "CN=www.strongswan.org"
+ using trusted intermediate ca certificate "C=US, O=Let's Encrypt, CN=R3"
+checking certificate status of "CN=www.strongswan.org"
+ requesting ocsp status from 'http://r3.o.lencr.org' ...
+ ocsp response correctly signed by "C=US, O=Let's Encrypt, CN=R3"
+ ocsp response is valid: until Jul 27 12:59:58 2022
+certificate status is good
+ using trusted ca certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
+checking certificate status of "C=US, O=Let's Encrypt, CN=R3"
+ocsp response verification failed, no signer certificate 'C=US, O=Let's Encrypt, CN=R3' found
+ fetching crl from 'http://x1.c.lencr.org/' ...
+ using trusted certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
+ crl correctly signed by "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
+ crl is valid: until Apr 18 01:59:59 2023
+certificate status is good
+ reached self-signed root ca with a path length of 1
+certificate trusted, lifetimes valid, certificate not revoked
+
+Note that this also fixes an issue with the previous dual-use of the
+`trusted` flag. It not only indicated whether the chain is trusted but
+also whether the current issuer is the root anchor (the corresponding
+flag in the `cert_validator_t` interface is called `anchor`). This was
+a problem when building multi-level trust chains for pre-trusted
+end-entity certificates (i.e. where `trusted` is TRUE from the start).
+This caused the main loop to get aborted after the first intermediate CA
+certificate and the mentioned `anchor` flag wasn't correct in any calls
+to `cert_validator_t` implementations.
+
+Fixes: CVE-2022-40617
+
+CVE: CVE-2022-40617
+Upstream-Status: Backport [https://download.strongswan.org/security/CVE-2022-40617/strongswan-5.1.0-5.9.7_cert_online_validate.patch]
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+---
+ .../credentials/credential_manager.c | 54 +++++++++++++++----
+ 1 file changed, 45 insertions(+), 9 deletions(-)
+
+diff --git a/src/libstrongswan/credentials/credential_manager.c b/src/libstrongswan/credentials/credential_manager.c
+index e93b5943a3a7..798785544e41 100644
+--- a/src/libstrongswan/credentials/credential_manager.c
++++ b/src/libstrongswan/credentials/credential_manager.c
+@@ -556,7 +556,7 @@ static void cache_queue(private_credential_manager_t *this)
+ */
+ static bool check_lifetime(private_credential_manager_t *this,
+ certificate_t *cert, char *label,
+- int pathlen, bool trusted, auth_cfg_t *auth)
++ int pathlen, bool anchor, auth_cfg_t *auth)
+ {
+ time_t not_before, not_after;
+ cert_validator_t *validator;
+@@ -571,7 +571,7 @@ static bool check_lifetime(private_credential_manager_t *this,
+ continue;
+ }
+ status = validator->check_lifetime(validator, cert,
+- pathlen, trusted, auth);
++ pathlen, anchor, auth);
+ if (status != NEED_MORE)
+ {
+ break;
+@@ -604,13 +604,13 @@ static bool check_lifetime(private_credential_manager_t *this,
+ */
+ static bool check_certificate(private_credential_manager_t *this,
+ certificate_t *subject, certificate_t *issuer, bool online,
+- int pathlen, bool trusted, auth_cfg_t *auth)
++ int pathlen, bool anchor, auth_cfg_t *auth)
+ {
+ cert_validator_t *validator;
+ enumerator_t *enumerator;
+
+ if (!check_lifetime(this, subject, "subject", pathlen, FALSE, auth) ||
+- !check_lifetime(this, issuer, "issuer", pathlen + 1, trusted, auth))
++ !check_lifetime(this, issuer, "issuer", pathlen + 1, anchor, auth))
+ {
+ return FALSE;
+ }
+@@ -623,7 +623,7 @@ static bool check_certificate(private_credential_manager_t *this,
+ continue;
+ }
+ if (!validator->validate(validator, subject, issuer,
+- online, pathlen, trusted, auth))
++ online, pathlen, anchor, auth))
+ {
+ enumerator->destroy(enumerator);
+ return FALSE;
+@@ -726,6 +726,7 @@ static bool verify_trust_chain(private_credential_manager_t *this,
+ auth_cfg_t *auth;
+ signature_params_t *scheme;
+ int pathlen;
++ bool is_anchor = FALSE;
+
+ auth = auth_cfg_create();
+ get_key_strength(subject, auth);
+@@ -743,7 +744,7 @@ static bool verify_trust_chain(private_credential_manager_t *this,
+ auth->add(auth, AUTH_RULE_CA_CERT, issuer->get_ref(issuer));
+ DBG1(DBG_CFG, " using trusted ca certificate \"%Y\"",
+ issuer->get_subject(issuer));
+- trusted = TRUE;
++ trusted = is_anchor = TRUE;
+ }
+ else
+ {
+@@ -778,11 +779,18 @@ static bool verify_trust_chain(private_credential_manager_t *this,
+ DBG1(DBG_CFG, " issuer is \"%Y\"",
+ current->get_issuer(current));
+ call_hook(this, CRED_HOOK_NO_ISSUER, current);
++ if (trusted)
++ {
++ DBG1(DBG_CFG, " reached end of incomplete trust chain for "
++ "trusted certificate \"%Y\"",
++ subject->get_subject(subject));
++ }
+ break;
+ }
+ }
+- if (!check_certificate(this, current, issuer, online,
+- pathlen, trusted, auth))
++ /* don't do online verification here */
++ if (!check_certificate(this, current, issuer, FALSE,
++ pathlen, is_anchor, auth))
+ {
+ trusted = FALSE;
+ issuer->destroy(issuer);
+@@ -794,7 +802,7 @@ static bool verify_trust_chain(private_credential_manager_t *this,
+ }
+ current->destroy(current);
+ current = issuer;
+- if (trusted)
++ if (is_anchor)
+ {
+ DBG1(DBG_CFG, " reached self-signed root ca with a "
+ "path length of %d", pathlen);
+@@ -807,6 +815,34 @@ static bool verify_trust_chain(private_credential_manager_t *this,
+ DBG1(DBG_CFG, "maximum path length of %d exceeded", MAX_TRUST_PATH_LEN);
+ call_hook(this, CRED_HOOK_EXCEEDED_PATH_LEN, subject);
+ }
++ else if (trusted && online)
++ {
++ enumerator_t *enumerator;
++ auth_rule_t rule;
++
++ /* do online revocation checks after basic validation of the chain */
++ pathlen = 0;
++ current = subject;
++ enumerator = auth->create_enumerator(auth);
++ while (enumerator->enumerate(enumerator, &rule, &issuer))
++ {
++ if (rule == AUTH_RULE_CA_CERT || rule == AUTH_RULE_IM_CERT)
++ {
++ if (!check_certificate(this, current, issuer, TRUE, pathlen++,
++ rule == AUTH_RULE_CA_CERT, auth))
++ {
++ trusted = FALSE;
++ break;
++ }
++ else if (rule == AUTH_RULE_CA_CERT)
++ {
++ break;
++ }
++ current = issuer;
++ }
++ }
++ enumerator->destroy(enumerator);
++ }
+ if (trusted)
+ {
+ result->merge(result, auth, FALSE);
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/strongswan/files/CVE-2023-41913.patch b/meta-networking/recipes-support/strongswan/files/CVE-2023-41913.patch
new file mode 100644
index 0000000000..c0de1f1588
--- /dev/null
+++ b/meta-networking/recipes-support/strongswan/files/CVE-2023-41913.patch
@@ -0,0 +1,46 @@
+From 027421cbd2e6e628f5f959c74d722afadc477485 Mon Sep 17 00:00:00 2001
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Tue, 11 Jul 2023 12:12:25 +0200
+Subject: [PATCH] charon-tkm: Validate DH public key to fix potential buffer
+ overflow
+
+Seems this was forgotten in the referenced commit and actually could lead
+to a buffer overflow. Since charon-tkm is untrusted this isn't that
+much of an issue but could at least be easily exploited for a DoS attack
+as DH public values are set when handling IKE_SA_INIT requests.
+
+Fixes: 0356089d0f94 ("diffie-hellman: Verify public DH values in backends")
+Fixes: CVE-2023-41913
+
+Upstream-Status: Backport [https://download.strongswan.org/security/CVE-2023-41913/strongswan-5.3.0-5.9.6_charon_tkm_dh_len.patch]
+CVE: CVE-2023-41913
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/charon-tkm/src/tkm/tkm_diffie_hellman.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/charon-tkm/src/tkm/tkm_diffie_hellman.c b/src/charon-tkm/src/tkm/tkm_diffie_hellman.c
+index 2b2d103d03e9..6999ad360d7e 100644
+--- a/src/charon-tkm/src/tkm/tkm_diffie_hellman.c
++++ b/src/charon-tkm/src/tkm/tkm_diffie_hellman.c
+@@ -70,11 +70,16 @@ METHOD(key_exchange_t, get_shared_secret, bool,
+ return TRUE;
+ }
+
+-
+ METHOD(diffie_hellman_t, set_other_public_value, bool,
+ private_tkm_diffie_hellman_t *this, chunk_t value)
+ {
+ dh_pubvalue_type othervalue;
++
++ if (!key_exchange_verify_pubkey(this->group, value) ||
++ value.len > sizeof(othervalue.data))
++ {
++ return FALSE;
++ }
+ othervalue.size = value.len;
+ memcpy(&othervalue.data, value.ptr, value.len);
+
+--
+2.34.1
+
diff --git a/meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb b/meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb
index 8a8809243a..9f676d0b18 100644
--- a/meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb
+++ b/meta-networking/recipes-support/strongswan/strongswan_5.8.4.bb
@@ -11,6 +11,11 @@ SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
file://fix-funtion-parameter.patch \
file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
file://0001-Remove-obsolete-setting-regarding-the-Standard-Outpu.patch \
+ file://CVE-2021-41990.patch \
+ file://CVE-2021-41991.patch \
+ file://CVE-2021-45079.patch \
+ file://CVE-2022-40617.patch \
+ file://CVE-2023-41913.patch \
"
SRC_URI[md5sum] = "0634e7f40591bd3f6770e583c3f27d29"
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch b/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch
index 9b74e00c5b..84d4716f38 100644
--- a/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch
+++ b/meta-networking/recipes-support/tcpdump/tcpdump/0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch
@@ -9,6 +9,7 @@ if we haven't captured all of it.
(backported from commit e4add0b010ed6f2180dcb05a13026242ed935334)
+CVE: CVE-2020-8037
Upstream-Status: Backport
Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com>
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump/CVE-2018-16301.patch b/meta-networking/recipes-support/tcpdump/tcpdump/CVE-2018-16301.patch
new file mode 100644
index 0000000000..5f5c68ccd6
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump/CVE-2018-16301.patch
@@ -0,0 +1,111 @@
+From 8ab211a7ec728bb0ad8c766c8eeb12deb0a13b86 Mon Sep 17 00:00:00 2001
+From: Guy Harris <gharris@sonic.net>
+Date: Wed, 30 Sep 2020 11:37:30 -0700
+Subject: [PATCH] Handle very large -f files by rejecting them.
+
+_read(), on Windows, has a 32-bit size argument and a 32-bit return
+value, so reject -f files that have more than 2^31-1 characters.
+
+Add some #defines so that, on Windows, we use _fstati64 to get the size
+of that file, to handle large files.
+
+Don't assume that our definition for ssize_t is the same size as size_t;
+by the time we want to print the return value of the read, we know it'll
+fit into an int, so just cast it to int and print it with %d.
+
+(cherry picked from commit faf8fb70af3a013e5d662b8283dec742fd6b1a77)
+
+CVE: CVE-2022-25308
+Upstream-Status: Backport [https://github.com/the-tcpdump-group/tcpdump/commit/8ab211a7ec728bb0ad8c766c8eeb12deb0a13b86]
+
+Signed-off-by: Riyaz Ahmed Khan <Riyaz.Khan@kpit.com>
+
+---
+ netdissect-stdinc.h | 16 +++++++++++++++-
+ tcpdump.c | 15 ++++++++++++---
+ 2 files changed, 27 insertions(+), 4 deletions(-)
+
+diff --git a/netdissect-stdinc.h b/netdissect-stdinc.h
+index 8282c5846..9941c2a16 100644
+--- a/netdissect-stdinc.h
++++ b/netdissect-stdinc.h
+@@ -149,10 +149,17 @@
+ #ifdef _MSC_VER
+ #define stat _stat
+ #define open _open
+-#define fstat _fstat
+ #define read _read
+ #define close _close
+ #define O_RDONLY _O_RDONLY
++
++/*
++ * We define our_fstat64 as _fstati64, and define our_statb as
++ * struct _stati64, so we get 64-bit file sizes.
++ */
++#define our_fstat _fstati64
++#define our_statb struct _stati64
++
+ #endif /* _MSC_VER */
+
+ /*
+@@ -211,6 +218,13 @@ typedef char* caddr_t;
+
+ #include <arpa/inet.h>
+
++/*
++ * We should have large file support enabled, if it's available,
++ * so just use fstat as our_fstat and struct stat as our_statb.
++ */
++#define our_fstat fstat
++#define our_statb struct stat
++
+ #endif /* _WIN32 */
+
+ #ifndef HAVE___ATTRIBUTE__
+diff --git a/tcpdump.c b/tcpdump.c
+index 043bda1d7..8f27ba2a4 100644
+--- a/tcpdump.c
++++ b/tcpdump.c
+@@ -108,6 +108,7 @@ The Regents of the University of California. All rights reserved.\n";
+ #endif /* HAVE_CAP_NG_H */
+ #endif /* HAVE_LIBCAP_NG */
+
++#include "netdissect-stdinc.h"
+ #include "netdissect.h"
+ #include "interface.h"
+ #include "addrtoname.h"
+@@ -861,15 +862,22 @@ read_infile(char *fname)
+ {
+ register int i, fd, cc;
+ register char *cp;
+- struct stat buf;
++ our_statb buf;
+
+ fd = open(fname, O_RDONLY|O_BINARY);
+ if (fd < 0)
+ error("can't open %s: %s", fname, pcap_strerror(errno));
+
+- if (fstat(fd, &buf) < 0)
++ if (our_fstat(fd, &buf) < 0)
+ error("can't stat %s: %s", fname, pcap_strerror(errno));
+
++ /*
++ * Reject files whose size doesn't fit into an int; a filter
++ * *that* large will probably be too big.
++ */
++ if (buf.st_size > INT_MAX)
++ error("%s is too large", fname);
++
+ cp = malloc((u_int)buf.st_size + 1);
+ if (cp == NULL)
+ error("malloc(%d) for %s: %s", (u_int)buf.st_size + 1,
+@@ -878,7 +886,8 @@ read_infile(char *fname)
+ if (cc < 0)
+ error("read %s: %s", fname, pcap_strerror(errno));
+ if (cc != buf.st_size)
+- error("short read %s (%d != %d)", fname, cc, (int)buf.st_size);
++ error("short read %s (%d != %d)", fname, (int) cc,
++ (int)buf.st_size);
+
+ close(fd);
+ /* replace "# comment" with spaces */
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb
index 2ea493863a..66bf217751 100644
--- a/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb
+++ b/meta-networking/recipes-support/tcpdump/tcpdump_4.9.3.bb
@@ -18,6 +18,7 @@ SRC_URI = " \
file://add-ptest.patch \
file://run-ptest \
file://0001-PPP-When-un-escaping-don-t-allocate-a-too-large-buff.patch \
+ file://CVE-2018-16301.patch \
"
SRC_URI[md5sum] = "a4ead41d371f91aa0a2287f589958bae"
diff --git a/meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch b/meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch
new file mode 100644
index 0000000000..3ca9a831f4
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/CVE-2020-24265-and-CVE-2020-24266.patch
@@ -0,0 +1,37 @@
+From d3110859064b15408dbca1294dc7e31c2208504d Mon Sep 17 00:00:00 2001
+From: Gabriel Ganne <gabriel.ganne@gmail.com>
+Date: Mon, 3 Aug 2020 08:26:38 +0200
+Subject: [PATCH] fix heap-buffer-overflow when DLT_JUNIPER_ETHER
+
+The test logic on datalen was inverted.
+
+Processing truncated packats should now raise a warning like the
+following:
+ Warning: <pcap> was captured using a snaplen of 4 bytes. This may mean you have truncated packets.
+
+Fixes #616 #617
+
+CVE: CVE-2020-24265
+CVE: CVE-2020-24266
+Upstream-Status: Backport [https://github.com/appneta/tcpreplay/commit/d3110859064b15408dbca1294dc7e31c2208504d]
+
+Signed-off-by: Gabriel Ganne <gabriel.ganne@gmail.com>
+Signed-off-by: Akash Hadke <akash.hadke@kpit.com>
+Signed-off-by: Akash Hadke <hadkeakash4@gmail.com>
+---
+ src/common/get.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/common/get.c b/src/common/get.c
+index f9ee92d3..0517bf0a 100644
+--- a/src/common/get.c
++++ b/src/common/get.c
+@@ -178,7 +178,7 @@ get_l2len(const u_char *pktdata, const int datalen, const int datalink)
+ break;
+
+ case DLT_JUNIPER_ETHER:
+- if (datalen >= 5) {
++ if (datalen < 5) {
+ l2_len = -1;
+ break;
+ }
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
index 39be950ad4..557d323311 100644
--- a/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
+++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_4.3.3.bb
@@ -6,7 +6,8 @@ SECTION = "net"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=890b830b22fd632e9ffd996df20338f8"
-SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz"
+SRC_URI = "https://github.com/appneta/tcpreplay/releases/download/v${PV}/tcpreplay-${PV}.tar.gz \
+ file://CVE-2020-24265-and-CVE-2020-24266.patch"
SRC_URI[md5sum] = "53b52bf64f0b6b9443428e657b37bc6b"
SRC_URI[sha256sum] = "ed2402caa9434ff5c74b2e7b31178c73e7c7c5c4ea1e1d0e2e39a7dc46958fde"
diff --git a/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb b/meta-networking/recipes-support/traceroute/traceroute_2.1.3.bb
index 19bbf03f1d..c1ad203bc0 100644
--- a/meta-networking/recipes-support/traceroute/traceroute_2.1.0.bb
+++ b/meta-networking/recipes-support/traceroute/traceroute_2.1.3.bb
@@ -19,8 +19,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/traceroute/traceroute/${BP}/${BP}.tar.gz \
file://filter-out-the-patches-from-subdirs.patch \
"
-SRC_URI[md5sum] = "84d329d67abc3fb83fc8cb12aeaddaba"
-SRC_URI[sha256sum] = "3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6"
+SRC_URI[sha256sum] = "05ebc7aba28a9100f9bbae54ceecbf75c82ccf46bdfce8b5d64806459a7e0412"
EXTRA_OEMAKE = "VPATH=${STAGING_LIBDIR}"
diff --git a/meta-networking/recipes-support/unbound/unbound_1.9.4.bb b/meta-networking/recipes-support/unbound/unbound_1.9.4.bb
index 6200214acb..f4b3c28ae4 100644
--- a/meta-networking/recipes-support/unbound/unbound_1.9.4.bb
+++ b/meta-networking/recipes-support/unbound/unbound_1.9.4.bb
@@ -9,7 +9,7 @@ SECTION = "net"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06"
-SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=http;branch=master \
+SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=http;branch=master;protocol=https \
file://0001-contrib-add-yocto-compatible-startup-scripts.patch \
"
SRCREV="b60c4a472c856f0a98120b7259e991b3a6507eb5"
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2022-0585-CVE-2023-2879.patch b/meta-networking/recipes-support/wireshark/files/CVE-2022-0585-CVE-2023-2879.patch
new file mode 100644
index 0000000000..1fc4a5fe38
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2022-0585-CVE-2023-2879.patch
@@ -0,0 +1,93 @@
+From 5a7a80e139396c07d45e70d63c6d3974c50ae5e8 Mon Sep 17 00:00:00 2001
+From: John Thacker <johnthacker@gmail.com>
+Date: Sat, 13 May 2023 21:45:16 -0400
+Subject: GDSDB: Make sure our offset advances.
+
+add_uint_string() returns the next offset to use, not the number
+of bytes consumed. So to consume all the bytes and make sure the
+offset advances, return the entire reported tvb length, not the
+number of bytes remaining.
+
+Fixup 8d3c2177793e900cfc7cfaac776a2807e4ea289f
+
+Fixes #19068
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/8d3c2177793e900cfc7cfaac776a2807e4ea289f && https://gitlab.com/wireshark/wireshark/-/commit/118815ca7c9f82c1f83f8f64d9e0e54673f31677]
+CVE: CVE-2022-0585 & CVE-2023-2879
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/dissectors/packet-gdsdb.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/epan/dissectors/packet-gdsdb.c b/epan/dissectors/packet-gdsdb.c
+index 95fed7e..950d68f 100644
+--- a/epan/dissectors/packet-gdsdb.c
++++ b/epan/dissectors/packet-gdsdb.c
+@@ -15,6 +15,7 @@
+ #include "config.h"
+
+ #include <epan/packet.h>
++#include <epan/expert.h>
+
+ void proto_register_gdsdb(void);
+ void proto_reg_handoff_gdsdb(void);
+@@ -182,6 +183,8 @@ static int hf_gdsdb_cursor_type = -1;
+ static int hf_gdsdb_sqlresponse_messages = -1;
+ #endif
+
++static expert_field ei_gdsdb_invalid_length = EI_INIT;
++
+ enum
+ {
+ op_void = 0,
+@@ -474,7 +477,12 @@ static int add_uint_string(proto_tree *tree, int hf_string, tvbuff_t *tvb, int o
+ offset, 4, ENC_ASCII|ENC_BIG_ENDIAN);
+ length = dword_align(tvb_get_ntohl(tvb, offset))+4;
+ proto_item_set_len(ti, length);
+- return offset + length;
++ int ret_offset = offset + length;
++ if (length < 4 || ret_offset < offset) {
++ expert_add_info_format(NULL, ti, &ei_gdsdb_invalid_length, "Invalid length: %d", length);
++ return tvb_reported_length(tvb);
++ }
++ return ret_offset;
+ }
+
+ static int add_byte_array(proto_tree *tree, int hf_len, int hf_byte, tvbuff_t *tvb, int offset)
+@@ -1407,7 +1415,12 @@ dissect_gdsdb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
+ offset, 4, ENC_BIG_ENDIAN);
+
+ /* opcode < op_max */
++ int old_offset = offset;
+ offset = gdsdb_handle_opcode[opcode](tvb, pinfo, gdsdb_tree, offset+4);
++ if (offset <= old_offset) {
++ expert_add_info(NULL, ti, &ei_gdsdb_invalid_length);
++ return tvb_reported_length_remaining(tvb, old_offset);
++ }
+ if (offset < 0)
+ {
+ /* But at this moment we don't know how much we will need */
+@@ -2022,12 +2035,20 @@ proto_register_gdsdb(void)
+ &ett_gdsdb_connect_pref
+ };
+
++/* Expert info */
++ static ei_register_info ei[] = {
++ { &ei_gdsdb_invalid_length, { "gdsdb.invalid_length", PI_MALFORMED, PI_ERROR,
++ "Invalid length", EXPFILL }},
++ };
++
+ proto_gdsdb = proto_register_protocol(
+ "Firebird SQL Database Remote Protocol",
+ "FB/IB GDS DB", "gdsdb");
+
+ proto_register_field_array(proto_gdsdb, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
++ expert_module_t *expert_gdsdb = expert_register_protocol(proto_gdsdb);
++ expert_register_field_array(expert_gdsdb, ei, array_length(ei));
+ }
+
+ void
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2022-4345.patch b/meta-networking/recipes-support/wireshark/files/CVE-2022-4345.patch
new file mode 100644
index 0000000000..938b7cf772
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2022-4345.patch
@@ -0,0 +1,52 @@
+From 39db474f80af87449ce0f034522dccc80ed4153f Mon Sep 17 00:00:00 2001
+From: John Thacker <johnthacker@gmail.com>
+Date: Thu, 1 Dec 2022 20:46:15 -0500
+Subject: [PATCH] openflow_v6: Prevent infinite loops in too short ofp_stats
+
+The ofp_stats struct length field includes the fixed 4 bytes.
+If the length is smaller than that, report the length error
+and break out. In particular, a value of zero can cause
+infinite loops if this isn't done.
+
+
+(cherry picked from commit 13823bb1059cf70f401892ba1b1eaa2400cdf3db)
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/39db474f80af87449ce0f034522dccc80ed4153f]
+CVE: CVE-2022-4345
+Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
+---
+ epan/dissectors/packet-openflow_v6.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/epan/dissectors/packet-openflow_v6.c b/epan/dissectors/packet-openflow_v6.c
+index f3bd0ef..96a3233 100644
+--- a/epan/dissectors/packet-openflow_v6.c
++++ b/epan/dissectors/packet-openflow_v6.c
+@@ -1118,17 +1118,23 @@ dissect_openflow_v6_oxs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
+ static int
+ dissect_openflow_stats_v6(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length _U_)
+ {
++ proto_item *ti;
+ guint32 stats_length;
+ int oxs_end;
+ guint32 padding;
+
+ proto_tree_add_item(tree, hf_openflow_v6_stats_reserved, tvb, offset, 2, ENC_NA);
+
+- proto_tree_add_item_ret_uint(tree, hf_openflow_v6_stats_length, tvb, offset+2, 2, ENC_BIG_ENDIAN, &stats_length);
++ ti = proto_tree_add_item_ret_uint(tree, hf_openflow_v6_stats_length, tvb, offset+2, 2, ENC_BIG_ENDIAN, &stats_length);
+
+ oxs_end = offset + stats_length;
+ offset+=4;
+
++ if (stats_length < 4) {
++ expert_add_info(pinfo, ti, &ei_openflow_v6_length_too_short);
++ return offset;
++ }
++
+ while (offset < oxs_end) {
+ offset = dissect_openflow_v6_oxs(tvb, pinfo, tree, offset, oxs_end - offset);
+ }
+--
+2.40.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-0667-pre1.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-0667-pre1.patch
new file mode 100644
index 0000000000..e6fc158c3a
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-0667-pre1.patch
@@ -0,0 +1,153 @@
+From 35418a73f7c9cefebe392b1ea0f012fccaf89801 Mon Sep 17 00:00:00 2001
+From: Guy Harris <gharris@sonic.net>
+Date: Wed, 19 Aug 2020 23:58:20 -0700
+Subject: [PATCH] Add format_text_string(), which gets the length with
+ strlen().
+
+format_text(alloc, string, strlen(string)) is a common idiom; provide
+format_text_string(), which does the strlen(string) for you. (Any
+string used in a %s to set the text of a protocol tree item, if it was
+directly extracted from the packet, should be run through a format_text
+routine, to ensure that it's valid UTF-8 and that control characters are
+handled correctly.)
+
+Update comments while we're at it.
+
+Change-Id: Ia8549efa1c96510ffce97178ed4ff7be4b02eb6e
+Reviewed-on: https://code.wireshark.org/review/38202
+Petri-Dish: Guy Harris <gharris@sonic.net>
+Tested-by: Petri Dish Buildbot
+Reviewed-by: Guy Harris <gharris@sonic.net>
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/35418a73f7c9cefebe392b1ea0f012fccaf89801]
+Comment: to backport fix for CVE-2023-0667, add function format_text_string().
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/strutil.c | 33 ++++++++++++++++++++++++++++----
+ epan/strutil.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++----
+ 2 files changed, 76 insertions(+), 8 deletions(-)
+
+diff --git a/epan/strutil.c b/epan/strutil.c
+index 347a173..bc3b19e 100644
+--- a/epan/strutil.c
++++ b/epan/strutil.c
+@@ -193,10 +193,11 @@ get_token_len(const guchar *linep, const guchar *lineend,
+ #define UNPOOP 0x1F4A9
+
+ /*
+- * Given a string, expected to be in UTF-8 but possibly containing
+- * invalid sequences (as it may have come from packet data), generate
+- * a valid UTF-8 string from it, allocated with the specified wmem
+- * allocator, that:
++ * Given a wmem scope, a not-necessarily-null-terminated string,
++ * expected to be in UTF-8 but possibly containing invalid sequences
++ * (as it may have come from packet data), and the length of the string,
++ * generate a valid UTF-8 string from it, allocated in the specified
++ * wmem scope, that:
+ *
+ * shows printable Unicode characters as themselves;
+ *
+@@ -493,6 +494,30 @@ format_text(wmem_allocator_t* allocator, const guchar *string, size_t len)
+ return fmtbuf;
+ }
+
++/** Given a wmem scope and a null-terminated string, expected to be in
++ * UTF-8 but possibly containing invalid sequences (as it may have come
++ * from packet data), and the length of the string, generate a valid
++ * UTF-8 string from it, allocated in the specified wmem scope, that:
++ *
++ * shows printable Unicode characters as themselves;
++ *
++ * shows non-printable ASCII characters as C-style escapes (octal
++ * if not one of the standard ones such as LF -> '\n');
++ *
++ * shows non-printable Unicode-but-not-ASCII characters as
++ * their universal character names;
++ *
++ * shows illegal UTF-8 sequences as a sequence of bytes represented
++ * as C-style hex escapes;
++ *
++ * and return a pointer to it.
++ */
++gchar *
++format_text_string(wmem_allocator_t* allocator, const guchar *string)
++{
++ return format_text(allocator, string, strlen(string));
++}
++
+ /*
+ * Given a string, generate a string from it that shows non-printable
+ * characters as C-style escapes except a whitespace character
+diff --git a/epan/strutil.h b/epan/strutil.h
+index 2046cb0..705beb5 100644
+--- a/epan/strutil.h
++++ b/epan/strutil.h
+@@ -46,18 +46,61 @@ WS_DLL_PUBLIC
+ int get_token_len(const guchar *linep, const guchar *lineend,
+ const guchar **next_token);
+
+-/** Given a string, generate a string from it that shows non-printable
+- * characters as C-style escapes, and return a pointer to it.
++/** Given a wmem scope, a not-necessarily-null-terminated string,
++ * expected to be in UTF-8 but possibly containing invalid sequences
++ * (as it may have come from packet data), and the length of the string,
++ * generate a valid UTF-8 string from it, allocated in the specified
++ * wmem scope, that:
++ *
++ * shows printable Unicode characters as themselves;
++ *
++ * shows non-printable ASCII characters as C-style escapes (octal
++ * if not one of the standard ones such as LF -> '\n');
++ *
++ * shows non-printable Unicode-but-not-ASCII characters as
++ * their universal character names;
++ *
++ * shows illegal UTF-8 sequences as a sequence of bytes represented
++ * as C-style hex escapes;
++ *
++ * and return a pointer to it.
+ *
+ * @param allocator The wmem scope
+- * @param line A pointer to the input string
++ * @param string A pointer to the input string
+ * @param len The length of the input string
+ * @return A pointer to the formatted string
+ *
+ * @see tvb_format_text()
+ */
+ WS_DLL_PUBLIC
+-gchar* format_text(wmem_allocator_t* allocator, const guchar *line, size_t len);
++gchar* format_text(wmem_allocator_t* allocator, const guchar *string, size_t len);
++
++/** Given a wmem scope and a null-terminated string, expected to be in
++ * UTF-8 but possibly containing invalid sequences (as it may have come
++ * from packet data), and the length of the string, generate a valid
++ * UTF-8 string from it, allocated in the specified wmem scope, that:
++ *
++ * shows printable Unicode characters as themselves;
++ *
++ * shows non-printable ASCII characters as C-style escapes (octal
++ * if not one of the standard ones such as LF -> '\n');
++ *
++ * shows non-printable Unicode-but-not-ASCII characters as
++ * their universal character names;
++ *
++ * shows illegal UTF-8 sequences as a sequence of bytes represented
++ * as C-style hex escapes;
++ *
++ * and return a pointer to it.
++ *
++ * @param allocator The wmem scope
++ * @param string A pointer to the input string
++ * @return A pointer to the formatted string
++ *
++ * @see tvb_format_text()
++ */
++WS_DLL_PUBLIC
++gchar* format_text_string(wmem_allocator_t* allocator, const guchar *string);
+
+ /**
+ * Given a string, generate a string from it that shows non-printable
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-0667.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-0667.patch
new file mode 100644
index 0000000000..3fc5296073
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-0667.patch
@@ -0,0 +1,66 @@
+From 85fbca8adb09ea8e1af635db3d92727fbfa1e28a Mon Sep 17 00:00:00 2001
+From: John Thacker <johnthacker@gmail.com>
+Date: Thu, 18 May 2023 18:06:36 -0400
+Subject: [PATCH] MS-MMS: Use format_text_string()
+
+The length of a string transcoded from UTF-16 to UTF-8 can be
+shorter (or longer) than the original length in bytes in the packet.
+Use the new string length, not the original length.
+
+Use format_text_string, which is a convenience function that
+calls strlen.
+
+Fix #19086
+
+(cherry picked from commit 1c45a899f83fa88e60ab69936bea3c4754e7808b)
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/85fbca8adb09ea8e1af635db3d92727fbfa1e28a]
+CVE: CVE-2023-0667
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/dissectors/packet-ms-mms.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/epan/dissectors/packet-ms-mms.c b/epan/dissectors/packet-ms-mms.c
+index db1d2cc..3d5c7ee 100644
+--- a/epan/dissectors/packet-ms-mms.c
++++ b/epan/dissectors/packet-ms-mms.c
+@@ -739,7 +739,7 @@ static void dissect_client_transport_info(tvbuff_t *tvb, packet_info *pinfo, pro
+ transport_info, "Transport: (%s)", transport_info);
+
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
+- format_text(wmem_packet_scope(), (guchar*)transport_info, length_remaining - 20));
++ format_text_string(pinfo->pool, (const guchar*)transport_info));
+
+
+ /* Try to extract details from this string */
+@@ -836,7 +836,7 @@ static void dissect_server_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
+ ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &server_version);
+
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (version='%s')",
+- format_text(wmem_packet_scope(), (const guchar*)server_version, strlen(server_version)));
++ format_text_string(pinfo->pool, (const guchar*)server_version));
+ }
+ offset += (server_version_length*2);
+
+@@ -890,7 +890,7 @@ static void dissect_client_player_info(tvbuff_t *tvb, packet_info *pinfo, proto_
+ ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &player_info);
+
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
+- format_text(wmem_packet_scope(), (const guchar*)player_info, strlen(player_info)));
++ format_text_string(pinfo->pool, (const guchar*)player_info));
+ }
+
+ /* Dissect info about where client wants to start playing from */
+@@ -965,7 +965,7 @@ static void dissect_request_server_file(tvbuff_t *tvb, packet_info *pinfo, proto
+ ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &server_file);
+
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
+- format_text(wmem_packet_scope(), (const guchar*)server_file, strlen(server_file)));
++ format_text_string(pinfo->pool, (const guchar*)server_file));
+ }
+
+ /* Dissect media details from server */
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-0668.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-0668.patch
new file mode 100644
index 0000000000..42f8108301
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-0668.patch
@@ -0,0 +1,33 @@
+From c4f37d77b29ec6a9754795d0efb6f68d633728d9 Mon Sep 17 00:00:00 2001
+From: John Thacker <johnthacker@gmail.com>
+Date: Sat, 20 May 2023 23:08:08 -0400
+Subject: [PATCH] synphasor: Use val_to_str_const
+
+Don't use a value from packet data to directly index a value_string,
+particularly when the value string doesn't cover all possible values.
+
+Fix #19087
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/c4f37d77b29ec6a9754795d0efb6f68d633728d9]
+CVE: CVE-2023-0668
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/dissectors/packet-synphasor.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c
+index 2d2f4ad..47120f5 100644
+--- a/epan/dissectors/packet-synphasor.c
++++ b/epan/dissectors/packet-synphasor.c
+@@ -1130,7 +1130,7 @@ static gint dissect_PHSCALE(tvbuff_t *tvb, proto_tree *tree, gint offset, gint c
+
+ data_flag_tree = proto_tree_add_subtree_format(single_phasor_scaling_and_flags_tree, tvb, offset, 4,
+ ett_conf_phflags, NULL, "Phasor Data flags: %s",
+- conf_phasor_type[tvb_get_guint8(tvb, offset + 2)].strptr);
++ val_to_str_const(tvb_get_guint8(tvb, offset + 2), conf_phasor_type, "Unknown"));
+
+ /* first and second bytes - phasor modification flags*/
+ phasor_flag1_tree = proto_tree_add_subtree_format(data_flag_tree, tvb, offset, 2, ett_conf_phmod_flags,
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-1992.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-1992.patch
new file mode 100644
index 0000000000..2fbef6bae0
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-1992.patch
@@ -0,0 +1,62 @@
+From 3c8be14c827f1587da3c2b3bb0d9c04faff57413 Mon Sep 17 00:00:00 2001
+From: John Thacker <johnthacker@gmail.com>
+Date: Sun, 19 Mar 2023 15:16:39 -0400
+Subject: [PATCH] RPCoRDMA: Frame end cleanup for global write offsets
+
+Add a frame end routine for a global which is assigned to packet
+scoped memory. It really should be made proto data, but is used
+in a function in the header (that doesn't take the packet info
+struct as an argument) and this fix needs to be made in stable
+branches.
+
+Fix #18852
+---
+Upstream-Status: Backport from [https://gitlab.com/colin.mcinnes/wireshark/-/commit/3c8be14c827f1587da3c2b3bb0d9c04faff57413]
+CVE: CVE-2023-1992
+Signed-off-by: Ashish Sharma <asharma@mvista.com>
+
+ epan/dissectors/packet-rpcrdma.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/epan/dissectors/packet-rpcrdma.c b/epan/dissectors/packet-rpcrdma.c
+index 680187b2653..3f250f0ea1c 100644
+--- a/epan/dissectors/packet-rpcrdma.c
++++ b/epan/dissectors/packet-rpcrdma.c
+@@ -24,6 +24,7 @@
+ #include <epan/addr_resolv.h>
+
+ #include "packet-rpcrdma.h"
++#include "packet-frame.h"
+ #include "packet-infiniband.h"
+ #include "packet-iwarp-ddp-rdmap.h"
+
+@@ -285,6 +286,18 @@ void rpcrdma_insert_offset(gint offset)
+ wmem_array_append_one(gp_rdma_write_offsets, offset);
+ }
+
++/*
++ * Reset the array of write offsets at the end of the frame. These
++ * are packet scoped, so they don't need to be freed, but we want
++ * to ensure that the global doesn't point to no longer allocated
++ * memory in a later packet.
++ */
++static void
++reset_write_offsets(void)
++{
++ gp_rdma_write_offsets = NULL;
++}
++
+ /* Get conversation state, it is created if it does not exist */
+ static rdma_conv_info_t *get_rdma_conv_info(packet_info *pinfo)
+ {
+@@ -1600,6 +1613,7 @@ dissect_rpcrdma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
+ if (write_size > 0 && !pinfo->fd->visited) {
+ /* Initialize array of write chunk offsets */
+ gp_rdma_write_offsets = wmem_array_new(wmem_packet_scope(), sizeof(gint));
++ register_frame_end_routine(pinfo, reset_write_offsets);
+ TRY {
+ /*
+ * Call the upper layer dissector to get a list of offsets
+--
+GitLab
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-2855.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-2855.patch
new file mode 100644
index 0000000000..a6370f91cf
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-2855.patch
@@ -0,0 +1,117 @@
+From 0181fafb2134a177328443a60b5e29c4ee1041cb Mon Sep 17 00:00:00 2001
+From: Guy Harris <gharris@sonic.net>
+Date: Tue, 16 May 2023 12:05:07 -0700
+Subject: [PATCH] candump: check for a too-long frame length.
+
+If the frame length is longer than the maximum, report an error in the
+file.
+
+Fixes #19062, preventing the overflow on a buffer on the stack (assuming
+your compiler doesn't call a bounds-checknig version of memcpy() if the
+size of the target space is known).
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/0181fafb2134a177328443a60b5e29c4ee1041cb]
+CVE: CVE-2023-2855
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ wiretap/candump.c | 47 ++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 34 insertions(+), 13 deletions(-)
+
+diff --git a/wiretap/candump.c b/wiretap/candump.c
+index 3eb17dd..954b509 100644
+--- a/wiretap/candump.c
++++ b/wiretap/candump.c
+@@ -26,8 +26,9 @@ static gboolean candump_seek_read(wtap *wth, gint64 seek_off,
+ wtap_rec *rec, Buffer *buf,
+ int *err, gchar **err_info);
+
+-static void
+-candump_write_packet(wtap_rec *rec, Buffer *buf, const msg_t *msg)
++static gboolean
++candump_write_packet(wtap_rec *rec, Buffer *buf, const msg_t *msg, int *err,
++ gchar **err_info)
+ {
+ static const char *can_proto_name = "can-hostendian";
+ static const char *canfd_proto_name = "canfd";
+@@ -57,9 +58,20 @@ candump_write_packet(wtap_rec *rec, Buffer *buf, const msg_t *msg)
+
+ if (msg->is_fd)
+ {
+- canfd_frame_t canfd_frame;
++ canfd_frame_t canfd_frame = {0};
++
++ /*
++ * There's a maximum of CANFD_MAX_DLEN bytes in a CAN-FD frame.
++ */
++ if (msg->data.length > CANFD_MAX_DLEN) {
++ *err = WTAP_ERR_BAD_FILE;
++ if (err_info != NULL) {
++ *err_info = g_strdup_printf("candump: File has %u-byte CAN FD packet, bigger than maximum of %u",
++ msg->data.length, CANFD_MAX_DLEN);
++ }
++ return FALSE;
++ }
+
+- memset(&canfd_frame, 0, sizeof(canfd_frame));
+ canfd_frame.can_id = msg->id;
+ canfd_frame.flags = msg->flags;
+ canfd_frame.len = msg->data.length;
+@@ -69,10 +81,21 @@ candump_write_packet(wtap_rec *rec, Buffer *buf, const msg_t *msg)
+ }
+ else
+ {
+- can_frame_t can_frame;
++ can_frame_t can_frame = {0};
++
++ /*
++ * There's a maximum of CAN_MAX_DLEN bytes in a CAN frame.
++ */
++ if (msg->data.length > CAN_MAX_DLEN) {
++ *err = WTAP_ERR_BAD_FILE;
++ if (err_info != NULL) {
++ *err_info = g_strdup_printf("candump: File has %u-byte CAN packet, bigger than maximum of %u",
++ msg->data.length, CAN_MAX_DLEN);
++ }
++ return FALSE;
++ }
+
+- memset(&can_frame, 0, sizeof(can_frame));
+- can_frame.can_id = msg->id;
++ can_frame.can_id = msg->id;
+ can_frame.can_dlc = msg->data.length;
+ memcpy(can_frame.data, msg->data.data, msg->data.length);
+
+@@ -86,6 +109,8 @@ candump_write_packet(wtap_rec *rec, Buffer *buf, const msg_t *msg)
+
+ rec->rec_header.packet_header.caplen = packet_length;
+ rec->rec_header.packet_header.len = packet_length;
++
++ return TRUE;
+ }
+
+ static gboolean
+@@ -193,9 +218,7 @@ candump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, gchar **err_info,
+ ws_debug_printf("%s: Stopped at offset %" PRIi64 "\n", G_STRFUNC, file_tell(wth->fh));
+ #endif
+
+- candump_write_packet(rec, buf, &msg);
+-
+- return TRUE;
++ return candump_write_packet(rec, buf, &msg, err, err_info);
+ }
+
+ static gboolean
+@@ -219,9 +242,7 @@ candump_seek_read(wtap *wth , gint64 seek_off, wtap_rec *rec,
+ if (!candump_parse(wth->random_fh, &msg, NULL, err, err_info))
+ return FALSE;
+
+- candump_write_packet(rec, buf, &msg);
+-
+- return TRUE;
++ return candump_write_packet(rec, buf, &msg, err, err_info);
+ }
+
+ /*
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-2856.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-2856.patch
new file mode 100644
index 0000000000..1fb75353b4
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-2856.patch
@@ -0,0 +1,68 @@
+From db5135826de3a5fdb3618225c2ff02f4207012ca Mon Sep 17 00:00:00 2001
+From: Guy Harris <gharris@sonic.net>
+Date: Thu, 18 May 2023 15:03:23 -0700
+Subject: [PATCH] vms: fix the search for the packet length field.
+
+The packet length field is of the form
+
+ Total Length = DDD = ^xXXX
+
+where "DDD" is the length in decimal and "XXX" is the length in
+hexadecimal.
+
+Search for "length ". not just "Length", as we skip past "Length ", not
+just "Length", so if we assume we found "Length " but only found
+"Length", we'd skip past the end of the string.
+
+While we're at it, fail if we don't find a length field, rather than
+just blithely acting as if the packet length were zero.
+
+Fixes #19083.
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/db5135826de3a5fdb3618225c2ff02f4207012ca]
+CVE: CVE-2023-2856
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ wiretap/vms.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/wiretap/vms.c b/wiretap/vms.c
+index 84e3def..fa77689 100644
+--- a/wiretap/vms.c
++++ b/wiretap/vms.c
+@@ -310,6 +310,7 @@ parse_vms_packet(FILE_T fh, wtap_rec *rec, Buffer *buf, int *err, gchar **err_in
+ {
+ char line[VMS_LINE_LENGTH + 1];
+ int num_items_scanned;
++ gboolean have_pkt_len = FALSE;
+ guint32 pkt_len = 0;
+ int pktnum;
+ int csec = 101;
+@@ -366,7 +367,7 @@ parse_vms_packet(FILE_T fh, wtap_rec *rec, Buffer *buf, int *err, gchar **err_in
+ return FALSE;
+ }
+ }
+- if ( (! pkt_len) && (p = strstr(line, "Length"))) {
++ if ( (! have_pkt_len) && (p = strstr(line, "Length "))) {
+ p += sizeof("Length ");
+ while (*p && ! g_ascii_isdigit(*p))
+ p++;
+@@ -382,9 +383,15 @@ parse_vms_packet(FILE_T fh, wtap_rec *rec, Buffer *buf, int *err, gchar **err_in
+ *err_info = g_strdup_printf("vms: Length field '%s' not valid", p);
+ return FALSE;
+ }
++ have_pkt_len = TRUE;
+ break;
+ }
+ } while (! isdumpline(line));
++ if (! have_pkt_len) {
++ *err = WTAP_ERR_BAD_FILE;
++ *err_info = g_strdup_printf("vms: Length field not found");
++ return FALSE;
++ }
+ if (pkt_len > WTAP_MAX_PACKET_SIZE_STANDARD) {
+ /*
+ * Probably a corrupt capture file; return an error,
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-2858.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-2858.patch
new file mode 100644
index 0000000000..150b4609bb
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-2858.patch
@@ -0,0 +1,94 @@
+From cb190d6839ddcd4596b0205844f45553f1e77105 Mon Sep 17 00:00:00 2001
+From: Guy Harris <gharris@sonic.net>
+Date: Fri, 19 May 2023 16:29:45 -0700
+Subject: [PATCH] netscaler: add more checks to make sure the record is within
+ the page.
+
+Whie we're at it, restructure some other checks to test-before-casting -
+it's OK to test afterwards, but testing before makes it follow the
+pattern used elsewhere.
+
+Fixes #19081.
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/cb190d6839ddcd4596b0205844f45553f1e77105]
+CVE: CVE-2023-2858
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ wiretap/netscaler.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/wiretap/netscaler.c b/wiretap/netscaler.c
+index 93da9a2..f835dfa 100644
+--- a/wiretap/netscaler.c
++++ b/wiretap/netscaler.c
+@@ -1082,13 +1082,13 @@ static gboolean nstrace_set_start_time(wtap *wth, int *err, gchar **err_info)
+
+ #define PACKET_DESCRIBE(rec,buf,FULLPART,fullpart,ver,type,HEADERVER) \
+ do {\
+- nspr_pktrace##fullpart##_v##ver##_t *type = (nspr_pktrace##fullpart##_v##ver##_t *) &nstrace_buf[nstrace_buf_offset];\
+ /* Make sure the record header is entirely contained in the page */\
+- if ((nstrace_buflen - nstrace_buf_offset) < sizeof *type) {\
++ if ((nstrace_buflen - nstrace_buf_offset) < sizeof(nspr_pktrace##fullpart##_v##ver##_t)) {\
+ *err = WTAP_ERR_BAD_FILE;\
+ *err_info = g_strdup("nstrace: record header crosses page boundary");\
+ return FALSE;\
+ }\
++ nspr_pktrace##fullpart##_v##ver##_t *type = (nspr_pktrace##fullpart##_v##ver##_t *) &nstrace_buf[nstrace_buf_offset];\
+ /* Check sanity of record size */\
+ if (pletoh16(&type->nsprRecordSize) < sizeof *type) {\
+ *err = WTAP_ERR_BAD_FILE;\
+@@ -1153,6 +1153,8 @@ static gboolean nstrace_read_v10(wtap *wth, wtap_rec *rec, Buffer *buf,
+
+ case NSPR_ABSTIME_V10:
+ {
++ if (!nstrace_ensure_buflen(nstrace, nstrace_buf_offset, sizeof(nspr_pktracefull_v10_t), err, err_info))
++ return FALSE;
+ nspr_pktracefull_v10_t *fp = (nspr_pktracefull_v10_t *) &nstrace_buf[nstrace_buf_offset];
+ if (pletoh16(&fp->nsprRecordSize) == 0) {
+ *err = WTAP_ERR_BAD_FILE;
+@@ -1166,6 +1168,8 @@ static gboolean nstrace_read_v10(wtap *wth, wtap_rec *rec, Buffer *buf,
+
+ case NSPR_RELTIME_V10:
+ {
++ if (!nstrace_ensure_buflen(nstrace, nstrace_buf_offset, sizeof(nspr_pktracefull_v10_t), err, err_info))
++ return FALSE;
+ nspr_pktracefull_v10_t *fp = (nspr_pktracefull_v10_t *) &nstrace_buf[nstrace_buf_offset];
+ if (pletoh16(&fp->nsprRecordSize) == 0) {
+ *err = WTAP_ERR_BAD_FILE;
+@@ -1183,6 +1187,8 @@ static gboolean nstrace_read_v10(wtap *wth, wtap_rec *rec, Buffer *buf,
+
+ default:
+ {
++ if (!nstrace_ensure_buflen(nstrace, nstrace_buf_offset, sizeof(nspr_pktracefull_v10_t), err, err_info))
++ return FALSE;
+ nspr_pktracefull_v10_t *fp = (nspr_pktracefull_v10_t *) &nstrace_buf[nstrace_buf_offset];
+ if (pletoh16(&fp->nsprRecordSize) == 0) {
+ *err = WTAP_ERR_BAD_FILE;
+@@ -1466,14 +1472,14 @@ static gboolean nstrace_read_v20(wtap *wth, wtap_rec *rec, Buffer *buf,
+
+ #define PACKET_DESCRIBE(rec,buf,FULLPART,ver,enumprefix,type,structname,HEADERVER)\
+ do {\
+- nspr_##structname##_t *fp = (nspr_##structname##_t *) &nstrace_buf[nstrace_buf_offset];\
+ /* Make sure the record header is entirely contained in the page */\
+- if ((nstrace->nstrace_buflen - nstrace_buf_offset) < sizeof *fp) {\
++ if ((nstrace->nstrace_buflen - nstrace_buf_offset) < sizeof(nspr_##structname##_t)) {\
+ *err = WTAP_ERR_BAD_FILE;\
+ *err_info = g_strdup("nstrace: record header crosses page boundary");\
+ g_free(nstrace_tmpbuff);\
+ return FALSE;\
+ }\
++ nspr_##structname##_t *fp = (nspr_##structname##_t *) &nstrace_buf[nstrace_buf_offset];\
+ (rec)->rec_type = REC_TYPE_PACKET;\
+ TIMEDEFV##ver((rec),fp,type);\
+ FULLPART##SIZEDEFV##ver((rec),fp,ver);\
+@@ -1580,7 +1586,6 @@ static gboolean nstrace_read_v30(wtap *wth, wtap_rec *rec, Buffer *buf,
+ g_free(nstrace_tmpbuff);
+ return FALSE;
+ }
+-
+ hdp = (nspr_hd_v20_t *) &nstrace_buf[nstrace_buf_offset];
+ if (nspr_getv20recordsize(hdp) == 0) {
+ *err = WTAP_ERR_BAD_FILE;
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-2906.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-2906.patch
new file mode 100644
index 0000000000..3a81a3c714
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-2906.patch
@@ -0,0 +1,38 @@
+From 44dc70cc5aadca91cb8ba3710c59c3651b7b0d4d Mon Sep 17 00:00:00 2001
+From: Jaap Keuter <jaap.keuter@xs4all.nl>
+Date: Thu, 27 Jul 2023 20:21:19 +0200
+Subject: [PATCH] CP2179: Handle timetag info response without records
+
+Fixes #19229
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/44dc70cc5aadca91cb8ba3710c59c3651b7b0d4d]
+CVE: CVE-2023-2906
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/dissectors/packet-cp2179.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/epan/dissectors/packet-cp2179.c b/epan/dissectors/packet-cp2179.c
+index 142cac3..9fc9a47 100644
+--- a/epan/dissectors/packet-cp2179.c
++++ b/epan/dissectors/packet-cp2179.c
+@@ -721,11 +721,14 @@ dissect_response_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int
+ proto_tree_add_item(cp2179_proto_tree, hf_cp2179_timetag_numsets, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+
+ num_records = tvb_get_guint8(tvb, offset) & 0x7F;
++ offset += 1;
++
++ if (num_records == 0 || numberofcharacters <= 1)
++ break;
++
+ recordsize = (numberofcharacters-1) / num_records;
+ num_values = (recordsize-6) / 2; /* Determine how many 16-bit analog values are present in each event record */
+
+- offset += 1;
+-
+ for (x = 0; x < num_records; x++)
+ {
+ cp2179_event_tree = proto_tree_add_subtree_format(cp2179_proto_tree, tvb, offset, recordsize, ett_cp2179_event, NULL, "Event Record # %d", x+1);
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-2952.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-2952.patch
new file mode 100644
index 0000000000..82098271ec
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-2952.patch
@@ -0,0 +1,97 @@
+From ce87eac0325581b600b3093fcd75080df14ccfda Mon Sep 17 00:00:00 2001
+From: Gerald Combs <gerald@wireshark.org>
+Date: Tue, 23 May 2023 13:52:03 -0700
+Subject: [PATCH] XRA: Fix an infinite loop
+
+C compilers don't care what size a value was on the wire. Use
+naturally-sized ints, including in dissect_message_channel_mb where we
+would otherwise overflow and loop infinitely.
+
+Fixes #19100
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/e18d0e369729b0fff5f76f41cbae67e97c2e52e5]
+CVE: CVE-2023-2952
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/dissectors/packet-xra.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/epan/dissectors/packet-xra.c b/epan/dissectors/packet-xra.c
+index f59d899..6c1445f 100644
+--- a/epan/dissectors/packet-xra.c
++++ b/epan/dissectors/packet-xra.c
+@@ -478,7 +478,7 @@ dissect_xra_tlv_cw_info(tvbuff_t * tvb, proto_tree * tree, void* data _U_, guint
+ it = proto_tree_add_item (tree, hf_xra_tlv_cw_info, tvb, 0, tlv_length, ENC_NA);
+ xra_tlv_cw_info_tree = proto_item_add_subtree (it, ett_xra_tlv_cw_info);
+
+- guint32 tlv_index =0;
++ unsigned tlv_index = 0;
+ while (tlv_index < tlv_length) {
+ guint8 type = tvb_get_guint8 (tvb, tlv_index);
+ ++tlv_index;
+@@ -533,7 +533,7 @@ dissect_xra_tlv_ms_info(tvbuff_t * tvb, proto_tree * tree, void* data _U_, guint
+ it = proto_tree_add_item (tree, hf_xra_tlv_ms_info, tvb, 0, tlv_length, ENC_NA);
+ xra_tlv_ms_info_tree = proto_item_add_subtree (it, ett_xra_tlv_ms_info);
+
+- guint32 tlv_index =0;
++ unsigned tlv_index = 0;
+ while (tlv_index < tlv_length) {
+ guint8 type = tvb_get_guint8 (tvb, tlv_index);
+ ++tlv_index;
+@@ -567,7 +567,7 @@ dissect_xra_tlv_burst_info(tvbuff_t * tvb, proto_tree * tree, void* data _U_, gu
+ it = proto_tree_add_item (tree, hf_xra_tlv_burst_info, tvb, 0, tlv_length, ENC_NA);
+ xra_tlv_burst_info_tree = proto_item_add_subtree (it, ett_xra_tlv_burst_info);
+
+- guint32 tlv_index =0;
++ unsigned tlv_index = 0;
+ while (tlv_index < tlv_length) {
+ guint8 type = tvb_get_guint8 (tvb, tlv_index);
+ ++tlv_index;
+@@ -607,7 +607,7 @@ dissect_xra_tlv(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* da
+ it = proto_tree_add_item (tree, hf_xra_tlv, tvb, 0, tlv_length, ENC_NA);
+ xra_tlv_tree = proto_item_add_subtree (it, ett_xra_tlv);
+
+- guint32 tlv_index =0;
++ unsigned tlv_index = 0;
+ tvbuff_t *xra_tlv_cw_info_tvb, *xra_tlv_ms_info_tvb, *xra_tlv_burst_info_tvb;
+
+ while (tlv_index < tlv_length) {
+@@ -751,7 +751,7 @@ dissect_message_channel_mb(tvbuff_t * tvb, packet_info * pinfo, proto_tree* tree
+ if(packet_start_pointer_field_present) {
+ proto_tree_add_item_ret_uint (tree, hf_plc_mb_mc_psp, tvb, 1, 2, FALSE, &packet_start_pointer);
+
+- guint16 docsis_start = 3 + packet_start_pointer;
++ unsigned docsis_start = 3 + packet_start_pointer;
+ while (docsis_start + 6 < remaining_length) {
+ /*DOCSIS header in packet*/
+ guint8 fc = tvb_get_guint8(tvb,docsis_start + 0);
+@@ -760,7 +760,7 @@ dissect_message_channel_mb(tvbuff_t * tvb, packet_info * pinfo, proto_tree* tree
+ docsis_start += 1;
+ continue;
+ }
+- guint16 docsis_length = 256*tvb_get_guint8(tvb,docsis_start + 2) + tvb_get_guint8(tvb,docsis_start + 3);
++ unsigned docsis_length = 256*tvb_get_guint8(tvb,docsis_start + 2) + tvb_get_guint8(tvb,docsis_start + 3);
+ if (docsis_start + 6 + docsis_length <= remaining_length) {
+ /*DOCSIS packet included in packet*/
+ tvbuff_t *docsis_tvb;
+@@ -830,7 +830,7 @@ dissect_ncp_message_block(tvbuff_t * tvb, proto_tree * tree) {
+ static int
+ dissect_plc(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_) {
+
+- guint16 offset = 0;
++ int offset = 0;
+ proto_tree *plc_tree;
+ proto_item *plc_item;
+ tvbuff_t *mb_tvb;
+@@ -890,7 +890,7 @@ dissect_plc(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _
+
+ static int
+ dissect_ncp(tvbuff_t * tvb, proto_tree * tree, void* data _U_) {
+- guint16 offset = 0;
++ int offset = 0;
+ proto_tree *ncp_tree;
+ proto_item *ncp_item;
+ tvbuff_t *ncp_mb_tvb;
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2023-3649.patch b/meta-networking/recipes-support/wireshark/files/CVE-2023-3649.patch
new file mode 100644
index 0000000000..5e92bd8a28
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2023-3649.patch
@@ -0,0 +1,231 @@
+From 75e0ffcb42f3816e5f2fdef12f3c9ae906130b0c Mon Sep 17 00:00:00 2001
+From: John Thacker <johnthacker@gmail.com>
+Date: Sat, 24 Jun 2023 00:34:50 -0400
+Subject: [PATCH] iscsi: Check bounds when extracting TargetAddress
+
+Use tvb_ functions that do bounds checking when parsing the
+TargetAddress string, instead of incrementing a pointer to an
+extracted char* and sometimes accidentally overrunning the
+string.
+
+While we're there, go ahead and add support for IPv6 addresses.
+
+Fix #19164
+
+(backported from commit 94349bbdaeb384b12d554dd65e7be7ceb0e93d21)
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/75e0ffcb42f3816e5f2fdef12f3c9ae906130b0c]
+CVE: CVE-2023-3649
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/dissectors/packet-iscsi.c | 146 +++++++++++++++++----------------
+ 1 file changed, 75 insertions(+), 71 deletions(-)
+
+diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c
+index 8a80f49..08f44a8 100644
+--- a/epan/dissectors/packet-iscsi.c
++++ b/epan/dissectors/packet-iscsi.c
+@@ -20,8 +20,6 @@
+
+ #include "config.h"
+
+-#include <stdio.h>
+-
+ #include <epan/packet.h>
+ #include <epan/prefs.h>
+ #include <epan/conversation.h>
+@@ -29,6 +27,7 @@
+ #include "packet-scsi.h"
+ #include <epan/crc32-tvb.h>
+ #include <wsutil/crc32.h>
++#include <wsutil/inet_addr.h>
+ #include <wsutil/strtoi.h>
+
+ void proto_register_iscsi(void);
+@@ -512,70 +511,81 @@ typedef struct _iscsi_conv_data {
+ dissector for the address/port that TargetAddress points to.
+ (it starts to be common to use redirectors to point to non-3260 ports)
+ */
++static address null_address = ADDRESS_INIT_NONE;
++
+ static void
+-iscsi_dissect_TargetAddress(packet_info *pinfo, tvbuff_t* tvb, proto_tree *tree, char *val, guint offset)
++iscsi_dissect_TargetAddress(packet_info *pinfo, tvbuff_t* tvb, proto_tree *tree, guint offset)
+ {
+- address *addr = NULL;
++ address addr = ADDRESS_INIT_NONE;
+ guint16 port;
+- char *value = wmem_strdup(wmem_packet_scope(), val);
+- char *p = NULL, *pgt = NULL;
+-
+- if (value[0] == '[') {
+- /* this looks like an ipv6 address */
+- p = strchr(value, ']');
+- if (p != NULL) {
+- *p = 0;
+- p += 2; /* skip past "]:" */
+-
+- pgt = strchr(p, ',');
+- if (pgt != NULL) {
+- *pgt++ = 0;
+- }
++ int colon_offset;
++ int end_offset;
++ char *ip_str, *port_str;
++
++ colon_offset = tvb_find_guint8(tvb, offset, -1, ':');
++ if (colon_offset == -1) {
++ /* RFC 7143 13.8 TargetAddress "If the TCP port is not specified,
++ * it is assumed to be the IANA-assigned default port for iSCSI",
++ * so nothing to do here.
++ */
++ return;
++ }
+
+- /* can't handle ipv6 yet */
++ /* We found a colon, so there's at least one byte and this won't fail. */
++ if (tvb_get_guint8(tvb, offset) == '[') {
++ offset++;
++ /* could be an ipv6 address */
++ end_offset = tvb_find_guint8(tvb, offset, -1, ']');
++ if (end_offset == -1) {
++ return;
+ }
+- } else {
+- /* This is either a ipv4 address or a dns name */
+- int i0,i1,i2,i3;
+- if (sscanf(value, "%d.%d.%d.%d", &i0,&i1,&i2,&i3) == 4) {
+- /* looks like a ipv4 address */
+- p = strchr(value, ':');
+- if (p != NULL) {
+- char *addr_data;
+-
+- *p++ = 0;
+-
+- pgt = strchr(p, ',');
+- if (pgt != NULL) {
+- *pgt++ = 0;
+- }
+
+- addr_data = (char *) wmem_alloc(wmem_packet_scope(), 4);
+- addr_data[0] = i0;
+- addr_data[1] = i1;
+- addr_data[2] = i2;
+- addr_data[3] = i3;
+-
+- addr = wmem_new(wmem_packet_scope(), address);
+- addr->type = AT_IPv4;
+- addr->len = 4;
+- addr->data = addr_data;
++ /* look for the colon before the port, if any */
++ colon_offset = tvb_find_guint8(tvb, end_offset, -1, ':');
++ if (colon_offset == -1) {
++ return;
++ }
+
+- if (!ws_strtou16(p, NULL, &port)) {
+- proto_tree_add_expert_format(tree, pinfo, &ei_iscsi_keyvalue_invalid,
+- tvb, offset + (guint)strlen(value), (guint)strlen(p), "Invalid port: %s", p);
+- }
+- }
++ ws_in6_addr *ip6_addr = wmem_new(pinfo->pool, ws_in6_addr);
++ ip_str = tvb_get_string_enc(pinfo->pool, tvb, offset, end_offset - offset, ENC_ASCII);
++ if (ws_inet_pton6(ip_str, ip6_addr)) {
++ /* looks like a ipv6 address */
++ set_address(&addr, AT_IPv6, sizeof(ws_in6_addr), ip6_addr);
++ }
+
++ } else {
++ /* This is either a ipv4 address or a dns name */
++ ip_str = tvb_get_string_enc(pinfo->pool, tvb, offset, colon_offset - offset, ENC_ASCII);
++ ws_in4_addr *ip4_addr = wmem_new(pinfo->pool, ws_in4_addr);
++ if (ws_inet_pton4(ip_str, ip4_addr)) {
++ /* looks like a ipv4 address */
++ set_address(&addr, AT_IPv4, 4, ip4_addr);
+ }
++ /* else a DNS host name; we could, theoretically, try to use
++ * name resolution information in the capture to lookup the address.
++ */
+ }
+
++ /* Extract the port */
++ end_offset = tvb_find_guint8(tvb, colon_offset, -1, ',');
++ int port_len;
++ if (end_offset == -1) {
++ port_len = tvb_reported_length_remaining(tvb, colon_offset + 1);
++ } else {
++ port_len = end_offset - (colon_offset + 1);
++ }
++ port_str = tvb_get_string_enc(pinfo->pool, tvb, colon_offset + 1, port_len, ENC_ASCII);
++ if (!ws_strtou16(port_str, NULL, &port)) {
++ proto_tree_add_expert_format(tree, pinfo, &ei_iscsi_keyvalue_invalid,
++ tvb, colon_offset + 1, port_len, "Invalid port: %s", port_str);
++ return;
++ }
+
+ /* attach a conversation dissector to this address/port tuple */
+- if (addr && !pinfo->fd->visited) {
++ if (!addresses_equal(&addr, &null_address) && !pinfo->fd->visited) {
+ conversation_t *conv;
+
+- conv = conversation_new(pinfo->num, addr, addr, ENDPOINT_TCP, port, port, NO_ADDR2|NO_PORT2);
++ conv = conversation_new(pinfo->num, &addr, &null_address, ENDPOINT_TCP, port, 0, NO_ADDR2|NO_PORT2);
+ if (conv == NULL) {
+ return;
+ }
+@@ -587,30 +597,24 @@ iscsi_dissect_TargetAddress(packet_info *pinfo, tvbuff_t* tvb, proto_tree *tree,
+ static gint
+ addTextKeys(packet_info *pinfo, proto_tree *tt, tvbuff_t *tvb, gint offset, guint32 text_len) {
+ const gint limit = offset + text_len;
++ tvbuff_t *keyvalue_tvb;
++ int len, value_offset;
+
+ while(offset < limit) {
+- char *key = NULL, *value = NULL;
+- gint len = tvb_strnlen(tvb, offset, limit - offset);
+-
+- if(len == -1) {
+- len = limit - offset;
+- } else {
+- len = len + 1;
+- }
+-
+- key = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
+- if (key == NULL) {
+- break;
+- }
+- value = strchr(key, '=');
+- if (value == NULL) {
++ /* RFC 7143 6.1 Text Format: "Every key=value pair, including the
++ * last or only pair in a LTDS, MUST be followed by one null (0x00)
++ * delimiter.
++ */
++ proto_tree_add_item_ret_length(tt, hf_iscsi_KeyValue, tvb, offset, -1, ENC_ASCII, &len);
++ keyvalue_tvb = tvb_new_subset_length(tvb, offset, len);
++ value_offset = tvb_find_guint8(keyvalue_tvb, 0, len, '=');
++ if (value_offset == -1) {
+ break;
+ }
+- *value++ = 0;
++ value_offset++;
+
+- proto_tree_add_item(tt, hf_iscsi_KeyValue, tvb, offset, len, ENC_ASCII|ENC_NA);
+- if (!strcmp(key, "TargetAddress")) {
+- iscsi_dissect_TargetAddress(pinfo, tvb, tt, value, offset + (guint)strlen("TargetAddress") + 2);
++ if (tvb_strneql(keyvalue_tvb, 0, "TargetAddress=", strlen("TargetAddress=")) == 0) {
++ iscsi_dissect_TargetAddress(pinfo, keyvalue_tvb, tt, value_offset);
+ }
+
+ offset += len;
+@@ -2941,7 +2945,7 @@ proto_register_iscsi(void)
+ },
+ { &hf_iscsi_KeyValue,
+ { "KeyValue", "iscsi.keyvalue",
+- FT_STRING, BASE_NONE, NULL, 0,
++ FT_STRINGZ, BASE_NONE, NULL, 0,
+ "Key/value pair", HFILL }
+ },
+ { &hf_iscsi_Text_F,
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2024-0208.patch b/meta-networking/recipes-support/wireshark/files/CVE-2024-0208.patch
new file mode 100644
index 0000000000..c4dfb6c37d
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2024-0208.patch
@@ -0,0 +1,42 @@
+From a8586fde3a6512466afb2a660538ef3fe712076b Mon Sep 17 00:00:00 2001
+From: John Thacker <johnthacker@gmail.com>
+Date: Thu, 23 Nov 2023 13:47:51 -0500
+Subject: [PATCH] gvcp: Don't try to add a NULL string to a column
+
+This was caught as an invalid argument by g_strlcpy before 4.2,
+but it was never a good idea.
+
+Fix #19496
+
+Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/a8586fde3a6512466afb2a660538ef3fe712076b]
+CVE: CVE-2024-0208
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ epan/dissectors/packet-gvcp.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/epan/dissectors/packet-gvcp.c b/epan/dissectors/packet-gvcp.c
+index 2de4552..b94ddea 100644
+--- a/epan/dissectors/packet-gvcp.c
++++ b/epan/dissectors/packet-gvcp.c
+@@ -2222,15 +2222,12 @@ static void dissect_readreg_ack(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb, p
+ if (addr_list_size > 0)
+ {
+ address_string = get_register_name_from_address(*((guint32*)wmem_array_index(gvcp_trans->addr_list, 0)), gvcp_info, &is_custom_register);
++ col_append_str(pinfo->cinfo, COL_INFO, address_string);
+ }
+
+ if (num_registers)
+ {
+- col_append_fstr(pinfo->cinfo, COL_INFO, "%s Value=0x%08X", address_string, tvb_get_ntohl(tvb, offset));
+- }
+- else
+- {
+- col_append_str(pinfo->cinfo, COL_INFO, address_string);
++ col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "Value=0x%08X", tvb_get_ntohl(tvb, offset));
+ }
+ }
+ }
+--
+2.25.1
+
diff --git a/meta-networking/recipes-support/wireshark/files/fix_lemon_path.patch b/meta-networking/recipes-support/wireshark/files/fix_lemon_path.patch
new file mode 100644
index 0000000000..54438dd870
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/fix_lemon_path.patch
@@ -0,0 +1,22 @@
+Fix update to build for alt arch machine.
+
+Commit 9ca6e39c7ee26570e29dc87332ffb0f6c1d0e4a4 changed the UseLemon to use
+the target lemon built by the target wireshark. Revert to use the one built by
+wireshark-native.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off: Armin Kuster <akuster@mvista.com>
+
+Index: wireshark-3.2.18/cmake/modules/UseLemon.cmake
+===================================================================
+--- wireshark-3.2.18.orig/cmake/modules/UseLemon.cmake
++++ wireshark-3.2.18/cmake/modules/UseLemon.cmake
+@@ -13,7 +13,7 @@ MACRO(ADD_LEMON_FILES _source _generated
+ # These files are generated as side-effect
+ ${_out}.h
+ ${_out}.out
+- COMMAND $<TARGET_FILE:lemon>
++ COMMAND lemon
+ -T${_lemonpardir}/lempar.c
+ -d.
+ ${_in}
diff --git a/meta-networking/recipes-support/wireshark/wireshark_3.2.15.bb b/meta-networking/recipes-support/wireshark/wireshark_3.2.18.bb
index 36e84d0ccd..8054cbb5aa 100644
--- a/meta-networking/recipes-support/wireshark/wireshark_3.2.15.bb
+++ b/meta-networking/recipes-support/wireshark/wireshark_3.2.18.bb
@@ -8,11 +8,25 @@ DEPENDS = "pcre expat glib-2.0 glib-2.0-native libgcrypt libgpg-error libxml2 bi
DEPENDS_append_class-target = " wireshark-native chrpath-replacement-native "
-SRC_URI = "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-${PV}.tar.xz"
-
+SRC_URI = "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-${PV}.tar.xz \
+ file://fix_lemon_path.patch \
+ file://CVE-2023-2855.patch \
+ file://CVE-2023-2856.patch \
+ file://CVE-2023-2858.patch \
+ file://CVE-2023-2952.patch \
+ file://CVE-2023-0667-pre1.patch \
+ file://CVE-2023-0667.patch \
+ file://CVE-2023-0668.patch \
+ file://CVE-2023-2906.patch \
+ file://CVE-2023-3649.patch \
+ file://CVE-2022-0585-CVE-2023-2879.patch \
+ file://CVE-2022-4345.patch \
+ file://CVE-2024-0208.patch \
+ file://CVE-2023-1992.patch \
+ "
UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"
-SRC_URI[sha256sum] = "32f6cfd67b00903a1bfca02ecc4ccf72db6b70d4fda33e4a099fefb03e849bdb"
+SRC_URI[sha256sum] = "bbe75d909b052fcd67a850f149f0d5b1e2531026fc2413946b48570293306887"
PE = "1"
diff --git a/meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb b/meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb
index bab75fee3f..6b83cbd522 100644
--- a/meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb
+++ b/meta-networking/recipes-support/wpan-tools/wpan-tools_0.9.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4cfd939b1d7e6aba9fcefb7f6e2fd45d"
DEPENDS = "libnl"
-SRC_URI = "git://github.com/linux-wpan/wpan-tools"
+SRC_URI = "git://github.com/linux-wpan/wpan-tools;branch=master;protocol=https"
SRCREV = "a316ca2caa746d60817400e5bf646c2820f09273"
S = "${WORKDIR}/git"
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-benchmark/speedtest-cli/speedtest-cli_2.1.2.bb b/meta-oe/dynamic-layers/meta-python/recipes-benchmark/speedtest-cli/speedtest-cli_2.1.2.bb
index de4fa16426..75a206c6b8 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-benchmark/speedtest-cli/speedtest-cli_2.1.2.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-benchmark/speedtest-cli/speedtest-cli_2.1.2.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
inherit setuptools3
-SRC_URI = "git://github.com/sivel/speedtest-cli.git"
+SRC_URI = "git://github.com/sivel/speedtest-cli.git;branch=master;protocol=https"
SRCREV = "c58ad3367bf27f4b4a4d5b1bca29ebd574731c5d"
S = "${WORKDIR}/git"
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb
index 065243ccfe..604d989ed9 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb
@@ -21,8 +21,8 @@ SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
SRCREV_FORMAT = "rwmem_inih"
SRC_URI = " \
- git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
- git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+ git://github.com/tomba/rwmem.git;protocol=https;name=rwmem;branch=master \
+ git://github.com/benhoyt/inih.git;protocol=https;name=inih;branch=master;destsuffix=git/ext/inih \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
index 58841ef319..cc15a8de31 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb
@@ -14,7 +14,7 @@ inherit scons dos2unix siteinfo python3native
PV = "4.2.2"
#v4.2.2
SRCREV = "a0bbbff6ada159e19298d37946ac8dc4b497eadf"
-SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \
+SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2;protocol=https \
file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
file://0001-Use-long-long-instead-of-int64_t.patch \
file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
@@ -56,6 +56,8 @@ EXTRA_OESCONS = "--prefix=${D}${prefix} \
LINKFLAGS='${LDFLAGS}' \
CXXFLAGS='${CXXFLAGS}' \
TARGET_ARCH=${TARGET_ARCH} \
+ MONGO_VERSION=${PV} \
+ OBJCOPY=${OBJCOPY} \
--ssl \
--disable-warnings-as-errors \
--use-system-zlib \
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb
index 275b984e47..f0a0c67975 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/lcdproc/lcdproc_git.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
PV = "0.5.9+git${SRCPV}"
SRCREV = "3a3d622d9bb74c44fa67bc20573751a207514134"
-SRC_URI = "git://github.com/lcdproc/lcdproc \
+SRC_URI = "git://github.com/lcdproc/lcdproc;branch=master;protocol=https \
file://0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch \
file://0002-Include-limits.h-for-PATH_MAX-definition.patch \
file://0003-Fix-non-x86-platforms-on-musl.patch \
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-support/smem/smem_1.5.bb b/meta-oe/dynamic-layers/meta-python/recipes-support/smem/smem_1.5.bb
index 90db9c3f3e..fa1bad021c 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-support/smem/smem_1.5.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-support/smem/smem_1.5.bb
@@ -39,5 +39,3 @@ RRECOMMENDS_${PN} = "python3-matplotlib python3-numpy"
PACKAGE_BEFORE_PN = "smemcap"
FILES_smemcap = "${bindir}/smemcap"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-benchmark/cpuburn/cpuburn-arm_git.bb b/meta-oe/recipes-benchmark/cpuburn/cpuburn-arm_git.bb
index b21212a430..de2341da4c 100644
--- a/meta-oe/recipes-benchmark/cpuburn/cpuburn-arm_git.bb
+++ b/meta-oe/recipes-benchmark/cpuburn/cpuburn-arm_git.bb
@@ -9,7 +9,7 @@ SRCREV = "ad7e646700d14b81413297bda02fb7fe96613c3f"
PV = "1.0+git${SRCPV}"
-SRC_URI = "git://github.com/ssvb/cpuburn-arm.git \
+SRC_URI = "git://github.com/ssvb/cpuburn-arm.git;branch=master;protocol=https \
file://0001-cpuburn-a8.S-Remove-.func-.endfunc.patch \
file://0002-burn.S-Add.patch \
file://0003-burn.S-Remove-.func-.endfunc.patch \
diff --git a/meta-oe/recipes-benchmark/fio/fio_3.17.bb b/meta-oe/recipes-benchmark/fio/fio_3.17.bb
index 759d1087c0..bb3243a5cc 100644
--- a/meta-oe/recipes-benchmark/fio/fio_3.17.bb
+++ b/meta-oe/recipes-benchmark/fio/fio_3.17.bb
@@ -23,7 +23,7 @@ PACKAGECONFIG ??= "${PACKAGECONFIG_NUMA}"
PACKAGECONFIG[numa] = ",--disable-numa,numactl"
SRCREV = "08ce9dc20b8a4e55db7af6d869ddfa49b4a02d03"
-SRC_URI = "git://git.kernel.dk/fio.git \
+SRC_URI = "git://git.kernel.dk/fio.git;branch=master \
file://0001-update-the-interpreter-paths.patch \
file://python3_shebangs.patch \
"
diff --git a/meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch b/meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch
new file mode 100644
index 0000000000..c56fa64e58
--- /dev/null
+++ b/meta-oe/recipes-benchmark/glmark2/files/0001-waflib-fix-compatibility-with-python-3.11.patch
@@ -0,0 +1,76 @@
+From b85ba8c3ff3fb9ae708576ccef03434d2ef73054 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 14 Jun 2022 09:54:18 +0000
+Subject: [PATCH] waflib: fix compatibility with python-3.11
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api
+
+ open(), io.open(), codecs.open() and fileinput.FileInput no longer
+ accept 'U' (“universal newlineâ€) in the file mode. This flag was
+ deprecated since Python 3.3. In Python 3, the “universal newline†is
+ used by default when a file is open in text mode. The newline parameter
+ of open() controls how universal newlines works. (Contributed by Victor
+ Stinner in bpo-37330.)
+
+* fixes:
+Waf: The wscript in '/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git' is unreadable
+Traceback (most recent call last):
+ File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Scripting.py", line 104, in waf_entry_point
+ set_main_module(os.path.normpath(os.path.join(Context.run_dir,Context.WSCRIPT_FILE)))
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Scripting.py", line 135, in set_main_module
+ Context.g_module=Context.load_module(file_path)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Context.py", line 343, in load_module
+ code=Utils.readf(path,m='rU',encoding=encoding)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/OE/build/luneos-langdale/webos-ports/tmp-glibc/work/core2-64-webos-linux/glmark2/2021.12-r0/git/waflib/Utils.py", line 117, in readf
+ f=open(fname,m)
+ ^^^^^^^^^^^^^
+ValueError: invalid mode: 'rUb'
+
+Upstream-Status: Submitted [https://github.com/glmark2/glmark2/pull/178]
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ waflib/ConfigSet.py | 2 +-
+ waflib/Context.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/waflib/ConfigSet.py b/waflib/ConfigSet.py
+index 16142a2..87de4ad 100644
+--- a/waflib/ConfigSet.py
++++ b/waflib/ConfigSet.py
+@@ -140,7 +140,7 @@ class ConfigSet(object):
+ Utils.writef(filename,''.join(buf))
+ def load(self,filename):
+ tbl=self.table
+- code=Utils.readf(filename,m='rU')
++ code=Utils.readf(filename,m='r')
+ for m in re_imp.finditer(code):
+ g=m.group
+ tbl[g(2)]=eval(g(3))
+diff --git a/waflib/Context.py b/waflib/Context.py
+index 8f2cbfb..f3e35ae 100644
+--- a/waflib/Context.py
++++ b/waflib/Context.py
+@@ -109,7 +109,7 @@ class Context(ctx):
+ cache[node]=True
+ self.pre_recurse(node)
+ try:
+- function_code=node.read('rU',encoding)
++ function_code=node.read('r',encoding)
+ exec(compile(function_code,node.abspath(),'exec'),self.exec_dict)
+ finally:
+ self.post_recurse(node)
+@@ -340,7 +340,7 @@ def load_module(path,encoding=None):
+ pass
+ module=imp.new_module(WSCRIPT_FILE)
+ try:
+- code=Utils.readf(path,m='rU',encoding=encoding)
++ code=Utils.readf(path,encoding=encoding)
+ except EnvironmentError:
+ raise Errors.WafError('Could not read the file %r'%path)
+ module_dir=os.path.dirname(path)
diff --git a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
index 6d20bbdaf1..2b2ff53c7e 100644
--- a/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
+++ b/meta-oe/recipes-benchmark/glmark2/glmark2_git.bb
@@ -14,10 +14,11 @@ PV = "20191226+${SRCPV}"
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '.*-linux*', 'null', d)}"
-SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https \
- file://python3.patch"
+SRC_URI = "git://github.com/glmark2/glmark2.git;protocol=https;branch=master \
+ file://python3.patch \
+ file://0001-waflib-fix-compatibility-with-python-3.11.patch \
+ "
SRCREV = "72dabc5d72b49c6d45badeb8a941ba4d829b0bd6"
-
S = "${WORKDIR}/git"
inherit waf pkgconfig features_check
diff --git a/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.13.bb b/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.13.bb
index 4a520e3be5..86e5fef530 100644
--- a/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.13.bb
+++ b/meta-oe/recipes-benchmark/iperf2/iperf2_2.0.13.bb
@@ -19,3 +19,5 @@ EXTRA_OECONF = "--exec-prefix=${STAGING_DIR_HOST}${layout_exec_prefix}"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+CVE_PRODUCT = "iperf_project:iperf"
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3/0001-Fix-memory-allocation-hazard-1542-.-1543.patch b/meta-oe/recipes-benchmark/iperf3/iperf3/0001-Fix-memory-allocation-hazard-1542-.-1543.patch
new file mode 100644
index 0000000000..450cdde1f8
--- /dev/null
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3/0001-Fix-memory-allocation-hazard-1542-.-1543.patch
@@ -0,0 +1,46 @@
+From 0ef151550d96cc4460f98832df84b4a1e87c65e9 Mon Sep 17 00:00:00 2001
+From: "Bruce A. Mah" <bmah@es.net>
+Date: Fri, 7 Jul 2023 11:35:02 -0700
+Subject: [PATCH] Fix memory allocation hazard (#1542). (#1543)
+
+Reported by: @someusername123 on GitHub
+---
+ src/iperf_api.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/iperf_api.c b/src/iperf_api.c
+index f2d4162..a95e024 100644
+--- a/src/iperf_api.c
++++ b/src/iperf_api.c
+@@ -2670,6 +2670,7 @@ static cJSON *
+ JSON_read(int fd)
+ {
+ uint32_t hsize, nsize;
++ size_t strsize;
+ char *str;
+ cJSON *json = NULL;
+ int rc;
+@@ -2682,7 +2683,9 @@ JSON_read(int fd)
+ if (Nread(fd, (char*) &nsize, sizeof(nsize), Ptcp) >= 0) {
+ hsize = ntohl(nsize);
+ /* Allocate a buffer to hold the JSON */
+- str = (char *) calloc(sizeof(char), hsize+1); /* +1 for trailing null */
++ strsize = hsize + 1; /* +1 for trailing NULL */
++ if (strsize) {
++ str = (char *) calloc(sizeof(char), strsize);
+ if (str != NULL) {
+ rc = Nread(fd, str, hsize, Ptcp);
+ if (rc >= 0) {
+@@ -2701,6 +2704,10 @@ JSON_read(int fd)
+ }
+ }
+ free(str);
++ }
++ else {
++ printf("WARNING: Data length overflow\n");
++ }
+ }
+ return json;
+ }
+--
+2.25.1
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3_3.7.bb b/meta-oe/recipes-benchmark/iperf3/iperf3_3.7.bb
index 98d2faabfd..19be5d94c0 100644
--- a/meta-oe/recipes-benchmark/iperf3/iperf3_3.7.bb
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3_3.7.bb
@@ -13,8 +13,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f9088fe7ffdccd042f7645f1012d7f70"
DEPENDS = "openssl"
-SRC_URI = "git://github.com/esnet/iperf.git \
+SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https \
file://0002-Remove-pg-from-profile_CFLAGS.patch \
+ file://0001-Fix-memory-allocation-hazard-1542-.-1543.patch \
"
SRCREV = "dfcea9f6a09ead01089a3c9d20c7032f2c0af2c1"
@@ -28,3 +29,5 @@ PACKAGECONFIG[lksctp] = "ac_cv_header_netinet_sctp_h=yes,ac_cv_header_netinet_sc
CFLAGS += "-D_GNU_SOURCE"
EXTRA_OECONF = "--with-openssl=${RECIPE_SYSROOT}${prefix}"
+
+CVE_PRODUCT = "iperf_project:iperf"
diff --git a/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb b/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb
index e813894316..60286c3249 100644
--- a/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb
+++ b/meta-oe/recipes-benchmark/libc-bench/libc-bench_git.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9a825c63897c53f487ef900598c31527"
SRCREV = "b6b2ce5f9f87a09b14499cb00c600c601f022634"
PV = "20110206+git${SRCPV}"
-SRC_URI = "git://git.musl-libc.org/libc-bench \
+SRC_URI = "git://git.musl-libc.org/libc-bench;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
index 4768d7b63a..d6c35d0b3a 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -12,7 +12,7 @@ PE = "1"
SRCREV = "e6499ff92b4a7dcffbd131d1f5d24933e48c3f20"
SRC_URI = " \
- git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \
+ git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https;branch=master \
file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \
file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \
file://tests-Makefile-install-static-4G-edge-testcases.patch \
diff --git a/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb b/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb
index a2966e99dd..d30ea5a01b 100644
--- a/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb
+++ b/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=55ea9d559f985fb4834317d8ed6b9e58"
SRCREV = "fb72e5e5f0879231f38e0e826a98a6ca2d1ca38e"
-SRC_URI = "git://github.com/stressapptest/stressapptest \
+SRC_URI = "git://github.com/stressapptest/stressapptest;branch=master;protocol=https \
file://libcplusplus-compat.patch \
file://read_sysfs_for_cachesize.patch \
"
diff --git a/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb b/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb
index 2ce10f9c44..9c20d68ef2 100644
--- a/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb
+++ b/meta-oe/recipes-benchmark/tinymembench/tinymembench_git.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://main.c;endline=22;md5=879b9bbb60851454885b5fa47eb6b34
PV = "0.4.0+git${SRCPV}"
SRCREV = "a2cf6d7e382e3aea1eb39173174d9fa28cad15f3"
-SRC_URI = "git://github.com/ssvb/tinymembench.git \
+SRC_URI = "git://github.com/ssvb/tinymembench.git;branch=master;protocol=https \
file://0001-asm-Delete-.func-.endfunc-directives.patch \
"
diff --git a/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb b/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb
index 88fcc0200f..589d62717c 100644
--- a/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb
+++ b/meta-oe/recipes-bsp/cpufrequtils/cpufrequtils_008.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRCREV = "a2f0c39d5f21596bb9f5223e895c0ff210b265d0"
# SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/cpufreq/cpufrequtils.git
-SRC_URI = "git://github.com/emagii/cpufrequtils.git \
+SRC_URI = "git://github.com/emagii/cpufrequtils.git;branch=master;protocol=https \
file://0001-dont-unset-cflags.patch \
"
diff --git a/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb b/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb
index b89fe6771c..e42adc6dc0 100644
--- a/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb
+++ b/meta-oe/recipes-bsp/edac-utils/edac-utils_git.bb
@@ -11,7 +11,7 @@ PV = "0.18+git${SRCPV}"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/grondo/edac-utils \
+SRC_URI = "git://github.com/grondo/edac-utils;branch=master;protocol=https \
file://make-init-script-be-able-to-automatically-load-EDAC-.patch \
file://add-restart-to-initscript.patch \
file://edac.service \
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
index f9ae9aad9a..1a9cb18c5c 100644
--- a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
+++ b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
@@ -16,7 +16,7 @@ inherit autotools systemd
SYSTEMD_SERVICE_${PN} = "ledmon.service"
# 0.93
-SRC_URI = "git://github.com/intel/ledmon;branch=master \
+SRC_URI = "git://github.com/intel/ledmon;branch=master;protocol=https \
file://0002-include-sys-select.h-and-sys-types.h.patch \
file://0001-Don-t-build-with-Werror-to-fix-compile-error.patch \
"
diff --git a/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb b/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb
index 890db55bcc..37a98a0996 100644
--- a/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb
+++ b/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.6.0.bb
@@ -10,7 +10,7 @@ DEPENDS = " \
virtual/libiconv \
"
-SRC_URI = "git://github.com/lm-sensors/lm-sensors.git;protocol=https \
+SRC_URI = "git://github.com/lm-sensors/lm-sensors.git;protocol=https;branch=master \
file://fancontrol.init \
file://sensord.init \
"
@@ -95,7 +95,7 @@ RDEPENDS_${PN} += " \
${PN}-sensorsdetect \
${PN}-sensorsconfconvert \
${PN}-pwmconfig \
- ${PN}-isatools \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'x86', '${PN}-isatools', '', d)} \
"
# libsensors packages
diff --git a/meta-oe/recipes-bsp/nvme-cli/nvme-cli_1.10.1.bb b/meta-oe/recipes-bsp/nvme-cli/nvme-cli_1.10.1.bb
index 4f4bb2dfab..9344c17dce 100644
--- a/meta-oe/recipes-bsp/nvme-cli/nvme-cli_1.10.1.bb
+++ b/meta-oe/recipes-bsp/nvme-cli/nvme-cli_1.10.1.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8264535c0c4e9c6c335635c4026a8022"
DEPENDS = "util-linux"
PV .= "+git${SRCPV}"
-SRC_URI = "git://github.com/linux-nvme/nvme-cli.git \
+SRC_URI = "git://github.com/linux-nvme/nvme-cli.git;branch=master;protocol=https \
file://0001-fix-musl-compilation.patch \
"
SRCREV = "1d84d6ae0c7d7ceff5a73fe174dde8b0005f6108"
diff --git a/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb b/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb
index 6b4decce51..64595d59c1 100644
--- a/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb
+++ b/meta-oe/recipes-connectivity/gattlib/gattlib_git.bb
@@ -9,7 +9,7 @@ DEPENDS += "glib-2.0-native"
PV = "0.2+git${SRCPV}"
-SRC_URI = "git://github.com/labapart/gattlib.git \
+SRC_URI = "git://github.com/labapart/gattlib.git;branch=master;protocol=https \
file://dbus-avoid-strange-chars-from-the-build-dir.patch \
file://0001-cmake-Use-GNUInstallDirs.patch \
"
@@ -28,5 +28,5 @@ EXTRA_OECMAKE += "-DGATTLIB_BUILD_DOCS=OFF"
inherit pkgconfig cmake
-FILES_${PN} = "${libdir}/* ${includedir}/*"
-FILES_${PN}-dev = "${includedir}/*"
+FILES_${PN} = "${libdir}/*"
+FILES_${PN}-dev = "${includedir}/* ${libdir}/pkgconfig"
diff --git a/meta-oe/recipes-connectivity/gensio/gensio_1.5.3.bb b/meta-oe/recipes-connectivity/gensio/gensio_1.5.3.bb
index 8c97662df5..bee757d5a6 100644
--- a/meta-oe/recipes-connectivity/gensio/gensio_1.5.3.bb
+++ b/meta-oe/recipes-connectivity/gensio/gensio_1.5.3.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a0fd36908af843bcee10cb6dfc47fa67 \
SRCREV = "95ec1ab31ee97411fc37156d12061adcf0331598"
PV = "1.5.3+git${SRCPV}"
-SRC_URI = "git://github.com/cminyard/gensio;protocol=https \
+SRC_URI = "git://github.com/cminyard/gensio;protocol=https;branch=master \
file://0001-filter-Rename-some-variables-to-tr_stdxxx.patch \
"
diff --git a/meta-oe/recipes-connectivity/iwd/iwd_1.9.bb b/meta-oe/recipes-connectivity/iwd/iwd_1.9.bb
index 25500e6501..1606f10cf9 100644
--- a/meta-oe/recipes-connectivity/iwd/iwd_1.9.bb
+++ b/meta-oe/recipes-connectivity/iwd/iwd_1.9.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
DEPENDS = "ell"
-SRC_URI = "git://git.kernel.org/pub/scm/network/wireless/iwd.git"
+SRC_URI = "git://git.kernel.org/pub/scm/network/wireless/iwd.git;branch=master"
SRCREV = "aa3dc1b95348dea177e9d8c2c3063b29e20fe2e9"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/CVE-2022-42898.patch b/meta-oe/recipes-connectivity/krb5/krb5/CVE-2022-42898.patch
new file mode 100644
index 0000000000..6d04bf8980
--- /dev/null
+++ b/meta-oe/recipes-connectivity/krb5/krb5/CVE-2022-42898.patch
@@ -0,0 +1,110 @@
+From 4e661f0085ec5f969c76c0896a34322c6c432de4 Mon Sep 17 00:00:00 2001
+From: Greg Hudson <ghudson@mit.edu>
+Date: Mon, 17 Oct 2022 20:25:11 -0400
+Subject: [PATCH] Fix integer overflows in PAC parsing
+
+In krb5_parse_pac(), check for buffer counts large enough to threaten
+integer overflow in the header length and memory length calculations.
+Avoid potential integer overflows when checking the length of each
+buffer. Credit to OSS-Fuzz for discovering one of the issues.
+
+CVE-2022-42898:
+
+In MIT krb5 releases 1.8 and later, an authenticated attacker may be
+able to cause a KDC or kadmind process to crash by reading beyond the
+bounds of allocated memory, creating a denial of service. A
+privileged attacker may similarly be able to cause a Kerberos or GSS
+application service to crash. On 32-bit platforms, an attacker can
+also cause insufficient memory to be allocated for the result,
+potentially leading to remote code execution in a KDC, kadmind, or GSS
+or Kerberos application server process. An attacker with the
+privileges of a cross-realm KDC may be able to extract secrets from a
+KDC process's memory by having them copied into the PAC of a new
+ticket.
+
+(cherry picked from commit ea92d2f0fcceb54a70910fa32e9a0d7a5afc3583)
+
+ticket: 9074
+version_fixed: 1.19.4
+
+Upstream-Status: Backport [https://github.com/krb5/krb5/commit/4e661f0085ec5f969c76c0896a34322c6c432de4]
+CVE: CVE-2022-42898
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ src/lib/krb5/krb/pac.c | 9 +++++++--
+ src/lib/krb5/krb/t_pac.c | 18 ++++++++++++++++++
+ 2 files changed, 25 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/krb5/krb/pac.c b/src/lib/krb5/krb/pac.c
+index cc74f37..70428a1 100644
+--- a/src/lib/krb5/krb/pac.c
++++ b/src/lib/krb5/krb/pac.c
+@@ -27,6 +27,8 @@
+ #include "k5-int.h"
+ #include "authdata.h"
+
++#define MAX_BUFFERS 4096
++
+ /* draft-brezak-win2k-krb-authz-00 */
+
+ /*
+@@ -316,6 +318,9 @@ krb5_pac_parse(krb5_context context,
+ if (version != 0)
+ return EINVAL;
+
++ if (cbuffers < 1 || cbuffers > MAX_BUFFERS)
++ return ERANGE;
++
+ header_len = PACTYPE_LENGTH + (cbuffers * PAC_INFO_BUFFER_LENGTH);
+ if (len < header_len)
+ return ERANGE;
+@@ -348,8 +353,8 @@ krb5_pac_parse(krb5_context context,
+ krb5_pac_free(context, pac);
+ return EINVAL;
+ }
+- if (buffer->Offset < header_len ||
+- buffer->Offset + buffer->cbBufferSize > len) {
++ if (buffer->Offset < header_len || buffer->Offset > len ||
++ buffer->cbBufferSize > len - buffer->Offset) {
+ krb5_pac_free(context, pac);
+ return ERANGE;
+ }
+diff --git a/src/lib/krb5/krb/t_pac.c b/src/lib/krb5/krb/t_pac.c
+index 7b756a2..2353e9f 100644
+--- a/src/lib/krb5/krb/t_pac.c
++++ b/src/lib/krb5/krb/t_pac.c
+@@ -431,6 +431,16 @@ static const unsigned char s4u_pac_ent_xrealm[] = {
+ 0x8a, 0x81, 0x9c, 0x9c, 0x00, 0x00, 0x00, 0x00
+ };
+
++static const unsigned char fuzz1[] = {
++ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
++ 0x06, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf5
++};
++
++static const unsigned char fuzz2[] = {
++ 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
++ 0x20, 0x20
++};
++
+ static const char *s4u_principal = "w2k8u@ACME.COM";
+ static const char *s4u_enterprise = "w2k8u@abc@ACME.COM";
+
+@@ -646,6 +656,14 @@ main(int argc, char **argv)
+ krb5_free_principal(context, sep);
+ }
+
++ /* Check problematic PACs found by fuzzing. */
++ ret = krb5_pac_parse(context, fuzz1, sizeof(fuzz1), &pac);
++ if (!ret)
++ err(context, ret, "krb5_pac_parse should have failed");
++ ret = krb5_pac_parse(context, fuzz2, sizeof(fuzz2), &pac);
++ if (!ret)
++ err(context, ret, "krb5_pac_parse should have failed");
++
+ /*
+ * Test empty free
+ */
+--
+2.25.1
+
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.17.1.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.17.1.bb
index ae58e2df35..ebcfbc524c 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5_1.17.1.bb
+++ b/meta-oe/recipes-connectivity/krb5/krb5_1.17.1.bb
@@ -31,6 +31,7 @@ SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \
file://krb5-kdc.service \
file://krb5-admin-server.service \
file://CVE-2021-36222.patch \
+ file://CVE-2022-42898.patch;striplevel=2 \
"
SRC_URI[md5sum] = "417d654c72526ac51466e7fe84608878"
SRC_URI[sha256sum] = "3706d7ec2eaa773e0e32d3a87bf742ebaecae7d064e190443a3acddfd8afb181"
diff --git a/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb b/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb
index 908b98d8c5..b1a9ed7ec6 100644
--- a/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb
+++ b/meta-oe/recipes-connectivity/libimobiledevice/libimobiledevice_git.bb
@@ -12,7 +12,7 @@ DEPENDS = "libplist usbmuxd libusbmuxd libtasn1 gnutls libgcrypt"
SRCREV = "fb71aeef10488ed7b0e60a1c8a553193301428c0"
PV = "1.2.0+git${SRCPV}"
SRC_URI = "\
- git://github.com/libimobiledevice/libimobiledevice;protocol=https \
+ git://github.com/libimobiledevice/libimobiledevice;protocol=https;branch=master \
file://configure-fix-largefile.patch \
"
diff --git a/meta-oe/recipes-connectivity/libndp/libndp_1.7.bb b/meta-oe/recipes-connectivity/libndp/libndp_1.7.bb
index 07a7a1d239..2537963dda 100644
--- a/meta-oe/recipes-connectivity/libndp/libndp_1.7.bb
+++ b/meta-oe/recipes-connectivity/libndp/libndp_1.7.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://libndp.org/"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-SRC_URI = "git://github.com/jpirko/libndp \
+SRC_URI = "git://github.com/jpirko/libndp;branch=master;protocol=https \
"
# tag for v1.6
SRCREV = "96674e7d4f4d569c2c961e865cc16152dfab5f09"
diff --git a/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb b/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb
index 3ee69554b6..b4094dd6f3 100644
--- a/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb
+++ b/meta-oe/recipes-connectivity/libtorrent/libtorrent_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "zlib libsigc++-2.0 openssl cppunit"
-SRC_URI = "git://github.com/rakshasa/libtorrent \
+SRC_URI = "git://github.com/rakshasa/libtorrent;branch=master;protocol=https \
file://don-t-run-code-while-configuring-package.patch \
"
SRCREV = "756f70010779927dc0691e1e722ed433d5d295e1"
diff --git a/meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-1.patch b/meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-1.patch
new file mode 100644
index 0000000000..426388c3bf
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-1.patch
@@ -0,0 +1,32 @@
+From 40dad53252e82eb4ee6e0c000e0c9ab15c7af312 Mon Sep 17 00:00:00 2001
+From: Ben Noordhuis <info@bnoordhuis.nl>
+Date: Thu, 18 Jan 2024 14:51:40 +0100
+Subject: [PATCH] fix: always zero-terminate idna output
+
+CVE: CVE-2024-24806
+Upstream commit: 0f2d7e784a256b54b2385043438848047bc2a629
+
+Fixes: https://github.com/libuv/libuv/security/advisories/GHSA-f74f-cvh7-c6q6
+---
+ src/idna.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/idna.c b/src/idna.c
+index 13ffac6b..874f1caf 100644
+--- a/src/idna.c
++++ b/src/idna.c
+@@ -284,8 +284,9 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) {
+ return rc;
+ }
+
+- if (d < de)
+- *d++ = '\0';
++ if (d >= de)
++ return UV_EINVAL;
+
++ *d++ = '\0';
+ return d - ds; /* Number of bytes written. */
+ }
+--
+2.43.0
+
diff --git a/meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-2.patch b/meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-2.patch
new file mode 100644
index 0000000000..f231cf96b9
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-2.patch
@@ -0,0 +1,30 @@
+From 6b8bce71f3ea435fcb286d49df1204c23ef3ea01 Mon Sep 17 00:00:00 2001
+From: Ben Noordhuis <info@bnoordhuis.nl>
+Date: Thu, 18 Jan 2024 14:52:38 +0100
+Subject: [PATCH] fix: reject zero-length idna inputs
+
+CVE: CVE-2024-24806
+Upstream commit: 3530bcc30350d4a6ccf35d2f7b33e23292b9de70
+
+Fixes: https://github.com/libuv/libuv/security/advisories/GHSA-f74f-cvh7-c6q6
+---
+ src/idna.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/idna.c b/src/idna.c
+index 874f1caf..97edf06c 100644
+--- a/src/idna.c
++++ b/src/idna.c
+@@ -254,6 +254,9 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) {
+ char* ds;
+ int rc;
+
++ if (s == se)
++ return UV_EINVAL;
++
+ ds = d;
+
+ for (si = s; si < se; /* empty */) {
+--
+2.43.0
+
diff --git a/meta-oe/recipes-connectivity/libuv/libuv_1.36.0.bb b/meta-oe/recipes-connectivity/libuv/libuv_1.36.0.bb
index 7577207318..da99b41fdd 100644
--- a/meta-oe/recipes-connectivity/libuv/libuv_1.36.0.bb
+++ b/meta-oe/recipes-connectivity/libuv/libuv_1.36.0.bb
@@ -5,8 +5,10 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a68902a430e32200263d182d44924d47"
SRCREV = "533b738838ad8407032e14b6772b29ef9af63cfa"
-SRC_URI = "git://github.com/libuv/libuv;branch=v1.x \
- file://CVE-2020-8252.patch"
+SRC_URI = "git://github.com/libuv/libuv;branch=v1.x;protocol=https \
+ file://CVE-2020-8252.patch \
+ file://CVE-2024-24806-1.patch \
+ file://CVE-2024-24806-2.patch"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
new file mode 100644
index 0000000000..83bdae858f
--- /dev/null
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch
@@ -0,0 +1,42 @@
+From dfd38cb29c0768692f886d3ab9158bd2b3132582 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 22 Nov 2022 15:20:48 +0800
+Subject: [PATCH] makefile: use conditional assignment for KBUILD_OUTPUT
+
+Refer [1],from make 4.4, all variables that are marked as export will
+also be passed to the shell started by the shell function. use "=" will
+make KBUILD_OUTPUT always empty for shell function, use "?=" to make
+"export KBUILD_OUTPUT" in enrironment can work.
+
+[snip of 4.4 NEWS]
+* WARNING: Backward-incompatibility!
+ Previously makefile variables marked as export were not exported to commands
+ started by the $(shell ...) function. Now, all exported variables are
+ exported to $(shell ...).
+[snip]
+
+[1] https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4&id=ed493f6c9116cc217b99c2cfa6a95f15803235a2#n74
+
+Upstream-Status: Backport [d3dd51ba611802d7cbb28631cb943cb882fa4aac]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makefile b/makefile
+index 529d8a0..3db60fa 100644
+--- a/makefile
++++ b/makefile
+@@ -15,7 +15,7 @@
+ # with this program; if not, write to the Free Software Foundation, Inc.,
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+-KBUILD_OUTPUT =
++KBUILD_OUTPUT ?=
+
+ DEBUG =
+ CC ?= $(CROSS_COMPILE)gcc
+--
+2.25.1
+
diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb
index c989767790..b848575e13 100644
--- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb
+++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.1.bb
@@ -2,14 +2,14 @@ DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 for
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \
+SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v2.0/linuxptp-${PV}.tgz \
file://build-Allow-CC-and-prefix-to-be-overriden.patch \
file://Use-cross-cpp-in-incdefs.patch \
file://time_t_maybe_long_long.patch \
+ file://0001-makefile-use-conditional-assignment-for-KBUILD_OUTPU.patch \
"
-SRC_URI[md5sum] = "d8bb7374943bb747db7786ac26f17f11"
-SRC_URI[sha256sum] = "0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d"
+SRC_URI[sha256sum] = "6f4669db1733747427217a9e74c8b5ca25c4245947463e9cdb860ec8f5ec797a"
EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} EXTRA_CFLAGS='${CFLAGS}'"
diff --git a/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb b/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb
index 3a1222e89e..d070111e95 100644
--- a/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb
+++ b/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = " \
file://about.html;md5=e5662cbb5f8fd5c9faac526e4077898e \
"
-SRC_URI = "git://github.com/eclipse/paho.mqtt.c;protocol=http \
+SRC_URI = "git://github.com/eclipse/paho.mqtt.c;protocol=http;branch=master;protocol=https \
file://0001-Fix-bug-of-free-with-musl.patch"
SRCREV = "3148fe2d5f4b87e16266dfe559c0764e16ca0546"
diff --git a/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.10.0.bb b/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.10.0.bb
index 2ef6b187e9..bbc311ee1e 100644
--- a/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.10.0.bb
+++ b/meta-oe/recipes-connectivity/rabbitmq-c/rabbitmq-c_0.10.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/alanxz/rabbitmq-c"
LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=6b7424f9db80cfb11fdd5c980b583f53"
LICENSE = "MIT"
-SRC_URI = "git://github.com/alanxz/rabbitmq-c.git"
+SRC_URI = "git://github.com/alanxz/rabbitmq-c.git;branch=master;protocol=https"
# v0.10.0-master
SRCREV = "ffe918a5fcef72038a88054dca3c56762b1953d4"
diff --git a/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb b/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb
index 331f978f86..41fb1ec826 100644
--- a/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb
+++ b/meta-oe/recipes-connectivity/rtorrent/rtorrent_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "libsigc++-2.0 curl cppunit libtorrent ncurses"
-SRC_URI = "git://github.com/rakshasa/rtorrent \
+SRC_URI = "git://github.com/rakshasa/rtorrent;branch=master;protocol=https \
file://don-t-run-code-while-configuring-package.patch \
"
# v0.9.8
diff --git a/meta-oe/recipes-connectivity/ser2net/ser2net_4.1.8.bb b/meta-oe/recipes-connectivity/ser2net/ser2net_4.1.8.bb
index 4a91fa4f4d..ae93ff561c 100644
--- a/meta-oe/recipes-connectivity/ser2net/ser2net_4.1.8.bb
+++ b/meta-oe/recipes-connectivity/ser2net/ser2net_4.1.8.bb
@@ -14,5 +14,3 @@ SRC_URI[sha256sum] = "cffb5147021202b064eb0a9389d0db63d1bb2dcde5a896f7785f97b1b5
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/ser2net/files/ser2net"
inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb b/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb
index 7284234326..7993e608db 100644
--- a/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb
+++ b/meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb
@@ -10,7 +10,7 @@ inherit autotools pkgconfig gitpkgv systemd
PKGV = "${GITPKGVTAG}"
SRCREV = "ee85938c21043ef5f7cd4dfbc7677f385814d4d8"
-SRC_URI = "git://github.com/libimobiledevice/usbmuxd;protocol=https"
+SRC_URI = "git://github.com/libimobiledevice/usbmuxd;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb b/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
index 99cfb32051..dd2b4392c2 100644
--- a/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
+++ b/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
@@ -9,7 +9,7 @@ SECTION = "test"
S = "${WORKDIR}/git"
SRCREV = "f7a8d7ef7d1a831c1bb47de21fa083536ea2f3a9"
-SRC_URI = "git://github.com/Wi-FiTestSuite/Wi-FiTestSuite-Linux-DUT.git \
+SRC_URI = "git://github.com/Wi-FiTestSuite/Wi-FiTestSuite-Linux-DUT.git;branch=master;protocol=https \
file://0001-Use-toolchain-from-environment-variables.patch \
file://0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch \
file://0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch \
diff --git a/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb b/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
index 0b66970a9d..2a435897d3 100644
--- a/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
+++ b/meta-oe/recipes-connectivity/zeromq/cppzmq_git.bb
@@ -7,7 +7,7 @@ DEPENDS = "zeromq"
SRCREV = "8d5c9a88988dcbebb72939ca0939d432230ffde1"
PV = "4.6.0"
-SRC_URI = "git://github.com/zeromq/cppzmq.git"
+SRC_URI = "git://github.com/zeromq/cppzmq.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-connectivity/zeromq/czmq_4.2.0.bb b/meta-oe/recipes-connectivity/zeromq/czmq_4.2.0.bb
index 7c9a33e8c1..75d534ea66 100644
--- a/meta-oe/recipes-connectivity/zeromq/czmq_4.2.0.bb
+++ b/meta-oe/recipes-connectivity/zeromq/czmq_4.2.0.bb
@@ -27,6 +27,3 @@ PACKAGECONFIG[lz4] = ",-DCMAKE_DISABLE_FIND_PACKAGE_lz4=TRUE,lz4"
PACKAGECONFIG[uuid] = ",-DCMAKE_DISABLE_FIND_PACKAGE_uuid=TRUE,util-linux"
PACKAGECONFIG[curl] = ",-DCMAKE_DISABLE_FIND_PACKAGE_libcurl=TRUE,curl"
PACKAGECONFIG[systemd] = ",-DCMAKE_DISABLE_FIND_PACKAGE_systemd=TRUE,systemd"
-
-BBCLASSEXTEND = "nativesdk"
-
diff --git a/meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch b/meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch
index eb3dee4d31..31f6529225 100644
--- a/meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch
+++ b/meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch
@@ -19,8 +19,8 @@ Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1210,7 +1210,7 @@
- target_link_libraries(libzmq ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+@@ -1440,7 +1440,7 @@ if(BUILD_SHARED)
+ endif()
if(SODIUM_FOUND)
- target_link_libraries(libzmq ${SODIUM_LIBRARIES})
@@ -28,8 +28,8 @@ Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
# On Solaris, libsodium depends on libssp
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(libzmq ssp)
-@@ -1240,7 +1240,7 @@
- target_link_libraries(libzmq-static ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+@@ -1485,7 +1485,7 @@ if(BUILD_STATIC)
+ endif()
if(SODIUM_FOUND)
- target_link_libraries(libzmq-static ${SODIUM_LIBRARIES})
diff --git a/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb b/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.4.bb
index 02a4c04fd7..4381f2d6d6 100644
--- a/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb
+++ b/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.4.bb
@@ -10,8 +10,8 @@ SRC_URI = "http://github.com/zeromq/libzmq/releases/download/v${PV}/zeromq-${PV}
file://0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "2047e917c2cc93505e2579bcba67a573"
-SRC_URI[sha256sum] = "ebd7b5c830d6428956b67a0454a7f8cbed1de74b3b01e5c33c5378e22740f763"
+SRC_URI[md5sum] = "c897d4005a3f0b8276b00b7921412379"
+SRC_URI[sha256sum] = "c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5"
UPSTREAM_CHECK_URI = "https://github.com/${BPN}/libzmq/releases"
diff --git a/meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch b/meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch
index 2c4ca057f2..1c2fc3813f 100644
--- a/meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch
+++ b/meta-oe/recipes-core/dbus/dbus-daemon-proxy/0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch
@@ -21,7 +21,7 @@ index 009e4fd..f3f0d80 100644
if (!dbus_conn)
- return;
-+ DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
if (verbose)
g_print ("New message from server: type='%d' path='%s' iface='%s'"
diff --git a/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb b/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb
index 42cd032c22..f40b48836a 100644
--- a/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb
+++ b/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb
@@ -6,7 +6,7 @@ SRCREV = "1226a0a1374628ff191f6d8a56000be5e53e7608"
PV = "0.0.0+gitr${SRCPV}"
PR = "r1.59"
-SRC_URI = "git://github.com/alban/dbus-daemon-proxy \
+SRC_URI = "git://github.com/alban/dbus-daemon-proxy;branch=master;protocol=https \
file://0001-dbus-daemon-proxy-Return-DBUS_HANDLER_RESULT_NOT_YET.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-core/emlog/emlog.inc b/meta-oe/recipes-core/emlog/emlog.inc
index 9a0f9ba928..fb3cd3f712 100644
--- a/meta-oe/recipes-core/emlog/emlog.inc
+++ b/meta-oe/recipes-core/emlog/emlog.inc
@@ -3,9 +3,9 @@ most recent (and only the most recent) output from a process"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-SRC_URI = "git://github.com/nicupavel/emlog.git;protocol=http"
+SRC_URI = "git://github.com/nicupavel/emlog.git;protocol=http;branch=master;protocol=https"
SRCREV = "aee53e8dee862f35291242ba41b0ca88010f6c71"
-
+PV = "0.70+git${SRCPV}"
S = "${WORKDIR}/git"
EXTRA_OEMAKE += " \
diff --git a/meta-oe/recipes-core/emlog/emlog_git.bb b/meta-oe/recipes-core/emlog/emlog_git.bb
index 387dd67123..a503ab82b8 100644
--- a/meta-oe/recipes-core/emlog/emlog_git.bb
+++ b/meta-oe/recipes-core/emlog/emlog_git.bb
@@ -24,3 +24,16 @@ do_install() {
}
RRECOMMENDS_${PN} += "kernel-module-emlog"
+
+# The NVD database doesn't have a CPE for this product,
+# the name of this product is exactly the same as github.com/emlog/emlog
+# but it's not related in any way. The following CVEs are from that project
+# so they can be safely ignored
+CVE_CHECK_WHITELIST += "\
+ CVE-2019-16868 \
+ CVE-2019-17073 \
+ CVE-2021-44584 \
+ CVE-2022-1526 \
+ CVE-2022-3968 \
+ CVE-2023-43291 \
+"
diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
index 0fcf716c8e..c920cbd507 100644
--- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
+++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
@@ -12,7 +12,7 @@ inherit pkgconfig cmake features_check
PV .= "+git${SRCPV}"
SRCREV = "781fbbadb0bccc749058177b1385c82da9ace880"
-SRC_URI = "git://github.com/glfw/glfw.git"
+SRC_URI = "git://github.com/glfw/glfw.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-core/libnfc/libnfc_git.bb b/meta-oe/recipes-core/libnfc/libnfc_git.bb
index 2851ecf9fe..65586247a2 100644
--- a/meta-oe/recipes-core/libnfc/libnfc_git.bb
+++ b/meta-oe/recipes-core/libnfc/libnfc_git.bb
@@ -11,7 +11,7 @@ PV = "1.7.1+git${SRCPV}"
S = "${WORKDIR}/git"
SRCREV = "2d4543673e9b76c02679ca8b89259659f1afd932"
-SRC_URI = "git://github.com/nfc-tools/libnfc.git \
+SRC_URI = "git://github.com/nfc-tools/libnfc.git;branch=master;protocol=https \
file://0001-usbbus-Include-stdint.h-for-uintX_t.patch \
"
diff --git a/meta-oe/recipes-core/mdbus2/mdbus2_git.bb b/meta-oe/recipes-core/mdbus2/mdbus2_git.bb
index 82f2cf8c94..fa98e1cb46 100644
--- a/meta-oe/recipes-core/mdbus2/mdbus2_git.bb
+++ b/meta-oe/recipes-core/mdbus2/mdbus2_git.bb
@@ -6,7 +6,7 @@ DEPENDS = "readline"
PV = "2.3.3+git${SRCPV}"
-SRC_URI = "git://github.com/freesmartphone/mdbus.git;protocol=http"
+SRC_URI = "git://github.com/freesmartphone/mdbus.git;protocol=http;branch=master;protocol=https"
SRCREV = "28202692d0b441000f4ddb8f347f72d1355021aa"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-core/ndctl/ndctl_v67.bb b/meta-oe/recipes-core/ndctl/ndctl_v67.bb
index da0c6563a7..19d96414d3 100644
--- a/meta-oe/recipes-core/ndctl/ndctl_v67.bb
+++ b/meta-oe/recipes-core/ndctl/ndctl_v67.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e66651809cac5da60c8b80e9e4e79e08"
inherit autotools-brokensep pkgconfig bash-completion systemd
SRCREV = "637bb424dc317a044c722a671355ef9df0e0d30f"
-SRC_URI = "git://github.com/pmem/ndctl.git"
+SRC_URI = "git://github.com/pmem/ndctl.git;branch=master;protocol=https"
DEPENDS = "kmod udev json-c keyutils"
diff --git a/meta-oe/recipes-core/opencl-headers/opencl-headers_git.bb b/meta-oe/recipes-core/opencl-headers/opencl-headers_git.bb
index dec1bea566..1d86f48aee 100644
--- a/meta-oe/recipes-core/opencl-headers/opencl-headers_git.bb
+++ b/meta-oe/recipes-core/opencl-headers/opencl-headers_git.bb
@@ -6,7 +6,7 @@ SECTION = "base"
S = "${WORKDIR}/git"
SRCREV = "40c5d226c7c0706f0176884e9b94b3886679c983"
-SRC_URI = "git://github.com/KhronosGroup/OpenCL-Headers.git"
+SRC_URI = "git://github.com/KhronosGroup/OpenCL-Headers.git;branch=main;protocol=https"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
diff --git a/meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb b/meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb
index 7c49c8d552..de355d29d6 100644
--- a/meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb
+++ b/meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb
@@ -8,7 +8,7 @@ inherit pkgconfig cmake
S = "${WORKDIR}/git"
SRCREV = "b342ff7b7f70a4b3f2cfc53215af8fa20adc3d86"
-SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git"
+SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git;branch=main;protocol=https"
do_install () {
install -d ${D}${bindir}
diff --git a/meta-oe/recipes-core/safec/safec_3.5.1.bb b/meta-oe/recipes-core/safec/safec_3.5.1.bb
index 91d8fc65a0..29158094a1 100644
--- a/meta-oe/recipes-core/safec/safec_3.5.1.bb
+++ b/meta-oe/recipes-core/safec/safec_3.5.1.bb
@@ -9,7 +9,7 @@ inherit autotools pkgconfig
S = "${WORKDIR}/git"
# v08112019
SRCREV = "ad76c7b1dbd0403b0c9decf54164fcce271c590f"
-SRC_URI = "git://github.com/rurban/safeclib.git \
+SRC_URI = "git://github.com/rurban/safeclib.git;branch=master;protocol=https \
"
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64|mips).*-linux'
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.1/0001-Try-to-first-find-googletest-in-the-system-before-do.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.1/0001-Try-to-first-find-googletest-in-the-system-before-do.patch
new file mode 100644
index 0000000000..89cb593e60
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.1/0001-Try-to-first-find-googletest-in-the-system-before-do.patch
@@ -0,0 +1,96 @@
+From b073e1c2b9a8138da83300f598b9a56fc9762b4b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stanislav=20Angelovi=C4=8D?= <angelovic.s@gmail.com>
+Date: Mon, 16 Nov 2020 17:05:36 +0100
+Subject: [PATCH] Try to first find googletest in the system before downloading
+ it (#125)
+
+Upstream-Status: Backport [d6fdaca]
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+---
+ tests/CMakeLists.txt | 62 ++++++++++++++++++++++++++++----------------
+ 1 file changed, 40 insertions(+), 22 deletions(-)
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 97f7c1a..7ecc327 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -2,26 +2,44 @@
+ # DOWNLOAD AND BUILD OF GOOGLETEST
+ #-------------------------------
+
+-include(FetchContent)
+-
+-message("Fetching googletest...")
+-FetchContent_Declare(googletest
+- GIT_REPOSITORY https://github.com/google/googletest.git
+- GIT_TAG master
+- GIT_SHALLOW 1
+- UPDATE_COMMAND "")
+-
+-#FetchContent_MakeAvailable(googletest) # Not available in CMake 3.13 :-( Let's do it manually:
+-FetchContent_GetProperties(googletest)
+-if(NOT googletest_POPULATED)
+- FetchContent_Populate(googletest)
+- set(gtest_force_shared_crt ON CACHE INTERNAL "" FORCE)
+- set(BUILD_GMOCK ON CACHE INTERNAL "" FORCE)
+- set(INSTALL_GTEST OFF CACHE INTERNAL "" FORCE)
+- set(BUILD_SHARED_LIBS_BAK ${BUILD_SHARED_LIBS})
+- set(BUILD_SHARED_LIBS OFF)
+- add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
+- set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_BAK})
++set(GOOGLETEST_VERSION 1.10.0 CACHE STRING "Version of gmock to use")
++set(GOOGLETEST_GIT_REPO "https://github.com/google/googletest.git" CACHE STRING "A git repo to clone and build googletest from if gmock is not found in the system")
++
++find_package(GTest ${GOOGLETEST_VERSION} CONFIG)
++if (NOT TARGET GTest::gmock)
++ # Try pkg-config if GTest was not found through CMake config
++ find_package(PkgConfig)
++ if (PkgConfig_FOUND)
++ pkg_check_modules(GMock IMPORTED_TARGET GLOBAL gmock>=${GOOGLETEST_VERSION})
++ if(TARGET PkgConfig::GMock)
++ add_library(GTest::gmock ALIAS PkgConfig::GMock)
++ endif()
++ endif()
++ # GTest was not found in the system, build it on our own
++ if (NOT TARGET GTest::gmock)
++ include(FetchContent)
++
++ message("Fetching googletest...")
++ FetchContent_Declare(googletest
++ GIT_REPOSITORY ${GOOGLETEST_GIT_REPO}
++ GIT_TAG release-${GOOGLETEST_VERSION}
++ GIT_SHALLOW 1
++ UPDATE_COMMAND "")
++
++ #FetchContent_MakeAvailable(googletest) # Not available in CMake 3.13 :-( Let's do it manually:
++ FetchContent_GetProperties(googletest)
++ if(NOT googletest_POPULATED)
++ FetchContent_Populate(googletest)
++ set(gtest_force_shared_crt ON CACHE INTERNAL "" FORCE)
++ set(BUILD_GMOCK ON CACHE INTERNAL "" FORCE)
++ set(INSTALL_GTEST OFF CACHE INTERNAL "" FORCE)
++ set(BUILD_SHARED_LIBS_BAK ${BUILD_SHARED_LIBS})
++ set(BUILD_SHARED_LIBS OFF)
++ add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
++ set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_BAK})
++ add_library(GTest::gmock ALIAS gmock)
++ endif()
++ endif()
+ endif()
+
+ #-------------------------------
+@@ -87,11 +105,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+ add_executable(sdbus-c++-unit-tests ${UNITTESTS_SRCS})
+ target_compile_definitions(sdbus-c++-unit-tests PRIVATE LIBSYSTEMD_VERSION=${LIBSYSTEMD_VERSION})
+-target_link_libraries(sdbus-c++-unit-tests sdbus-c++-objlib gmock gmock_main)
++target_link_libraries(sdbus-c++-unit-tests sdbus-c++-objlib GTest::gmock)
+
+ add_executable(sdbus-c++-integration-tests ${INTEGRATIONTESTS_SRCS})
+ target_compile_definitions(sdbus-c++-integration-tests PRIVATE LIBSYSTEMD_VERSION=${LIBSYSTEMD_VERSION})
+-target_link_libraries(sdbus-c++-integration-tests sdbus-c++ gmock gmock_main)
++target_link_libraries(sdbus-c++-integration-tests sdbus-c++ GTest::gmock)
+
+ # Manual performance and stress tests
+ option(ENABLE_PERF_TESTS "Build and install manual performance tests (default OFF)" OFF)
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb
index c8e81a4123..f0e928d0da 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb
@@ -12,7 +12,7 @@ DEPENDS += "gperf-native gettext-native util-linux libcap"
SRCREV = "efb536d0cbe2e58f80e501d19999928c75e08f6a"
SRCBRANCH = "v243-stable"
-SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
SRC_URI += "file://static-libsystemd-pkgconfig.patch"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.1.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.1.bb
index c4d63fd272..a94fb8deff 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.1.bb
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.1.bb
@@ -12,13 +12,16 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-exte
${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap"
PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd"
-PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF"
+PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF,googletest gmock"
DEPENDS += "expat"
SRCREV = "3a4f343fb924650e7639660efa5f143961162044"
-SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master"
-SRC_URI += "file://run-ptest"
+
+SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master \
+ file://0001-Try-to-first-find-googletest-in-the-system-before-do.patch \
+ file://run-ptest \
+"
EXTRA_OECMAKE = "-DBUILD_CODE_GEN=ON \
-DBUILD_DOC=ON \
diff --git a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.2.bb b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.7.bb
index b9668eb099..d303f27ebb 100644
--- a/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.2.bb
+++ b/meta-oe/recipes-crypto/cryptsetup/cryptsetup_2.3.7.bb
@@ -21,8 +21,8 @@ RDEPENDS_${PN} = " \
"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}/${BP}.tar.xz"
-SRC_URI[md5sum] = "6e4ffb6d35a73f7539a5d0c1354654cd"
-SRC_URI[sha256sum] = "a89e13dff0798fd0280e801d5f0cc8cfdb2aa5b1929bec1b7322e13d3eca95fb"
+SRC_URI[md5sum] = "9c5952cebb836ee783b0b76c5380a964"
+SRC_URI[sha256sum] = "61835132a5986217af17b8943013aa3fe6d47bdc1a07386343526765e2ce27a9"
inherit autotools gettext pkgconfig
@@ -54,7 +54,7 @@ PACKAGECONFIG[veritysetup] = "--enable-veritysetup,--disable-veritysetup"
PACKAGECONFIG[cryptsetup-reencrypt] = "--enable-cryptsetup-reencrypt,--disable-cryptsetup-reencrypt"
PACKAGECONFIG[integritysetup] = "--enable-integritysetup,--disable-integritysetup"
PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux"
-PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,,udev"
+PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,,udev lvm2-udevrules"
PACKAGECONFIG[kernel_crypto] = "--enable-kernel_crypto,--disable-kernel_crypto"
# gcrypt-pkbdf2 requries --with-crypto_backend=gcrypt or the flag isn't
# recognized.
diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb b/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb
index 4e217a351d..ad5355ea64 100644
--- a/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb
+++ b/meta-oe/recipes-crypto/libkcapi/libkcapi_git.bb
@@ -9,7 +9,7 @@ S = "${WORKDIR}/git"
SRCREV = "5649050d201856bf06c8738b5d2aa1710c86ac2f"
PV = "1.1.5"
SRC_URI = " \
- git://github.com/smuellerDD/libkcapi.git \
+ git://github.com/smuellerDD/libkcapi.git;branch=master;protocol=https \
file://0001-kcapi-kdf-Move-code-to-fix.patch \
file://0001-Use-__builtin_bswap32-on-Clang-if-supported.patch \
"
diff --git a/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.26.bb b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.26.bb
index 9b6e7ccbe2..321aa4fdc1 100644
--- a/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.26.bb
+++ b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.26.bb
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = " \
file://COPYING.GPL;md5=8a71d0475d08eee76d8b6d0c6dbec543 \
file://COPYING.BSD;md5=66b7a37c3c10483c1fd86007726104d7 \
"
-SRC_URI = "git://github.com/OpenSC/${BPN}.git"
+SRC_URI = "git://github.com/OpenSC/${BPN}.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
# v1.26
diff --git a/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb b/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb
index b597ef1ea8..48f2fd8ac1 100644
--- a/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb
+++ b/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://github.com/google/leveldb"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d"
-SRC_URI = "git://github.com/google/${BPN}.git \
+SRC_URI = "git://github.com/google/${BPN}.git;branch=main;protocol=https \
file://run-ptest"
SRCREV = "78b39d68c15ba020c0d60a3906fb66dbf1697595"
diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.4.20.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.4.28.bb
index e1a038dfa3..e1a038dfa3 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb-native_10.4.20.bb
+++ b/meta-oe/recipes-dbs/mysql/mariadb-native_10.4.28.bb
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 0fb0c95ec3..e4eb48492a 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -15,12 +15,11 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \
file://sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \
file://0001-disable-ucontext-on-musl.patch \
- file://c11_atomics.patch \
- file://clang_version_header_conflict.patch \
file://fix-arm-atomic.patch \
+ file://CVE-2022-47015.patch \
"
-SRC_URI[md5sum] = "c3bc7a3eca3b0bbae5748f7b22a55c0c"
-SRC_URI[sha256sum] = "87d5e29ee1f18de153266ec658138607703ed2a05b3ffb1f89091d33f4abf545"
+
+SRC_URI[sha256sum] = "003fd23f3c6ee516176e1b62b0b43cdb6cdd3dcd4e30f855c1c5ab2baaf5a86c"
UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/CVE-2022-47015.patch b/meta-oe/recipes-dbs/mysql/mariadb/CVE-2022-47015.patch
new file mode 100644
index 0000000000..0ddcdc028c
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/CVE-2022-47015.patch
@@ -0,0 +1,269 @@
+From be0a46b3d52b58956fd0d47d040b9f4514406954 Mon Sep 17 00:00:00 2001
+From: Nayuta Yanagisawa <nayuta.yanagisawa@hey.com>
+Date: Tue, 27 Sep 2022 15:22:57 +0900
+Subject: [PATCH] MDEV-29644 a potential bug of null pointer dereference in
+ spider_db_mbase::print_warnings()
+
+Upstream-Status: Backport [https://github.com/MariaDB/server/commit/be0a46b3d52b58956fd0d47d040b9f4514406954]
+CVE: CVE-2022-47015
+Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
+---
+ .../spider/bugfix/r/mdev_29644.result | 44 ++++++++++
+ .../mysql-test/spider/bugfix/t/mdev_29644.cnf | 3 +
+ .../spider/bugfix/t/mdev_29644.test | 58 ++++++++++++
+ storage/spider/spd_db_mysql.cc | 88 ++++++++-----------
+ storage/spider/spd_db_mysql.h | 4 +-
+ 5 files changed, 141 insertions(+), 56 deletions(-)
+ create mode 100644 spider/mysql-test/spider/bugfix/r/mdev_29644.result
+ create mode 100644 spider/mysql-test/spider/bugfix/t/mdev_29644.cnf
+ create mode 100644 spider/mysql-test/spider/bugfix/t/mdev_29644.test
+
+diff --git a/spider/mysql-test/spider/bugfix/r/mdev_29644.result b/spider/mysql-test/spider/bugfix/r/mdev_29644.result
+new file mode 100644
+index 00000000..eb725602
+--- /dev/null
++++ b/spider/mysql-test/spider/bugfix/r/mdev_29644.result
+@@ -0,0 +1,44 @@
++#
++# MDEV-29644 a potential bug of null pointer dereference in spider_db_mbase::print_warnings()
++#
++for master_1
++for child2
++child2_1
++child2_2
++child2_3
++for child3
++connection child2_1;
++CREATE DATABASE auto_test_remote;
++USE auto_test_remote;
++CREATE TABLE tbl_a (
++a CHAR(5)
++) ENGINE=InnoDB DEFAULT CHARSET=utf8;
++set @orig_sql_mode=@@global.sql_mode;
++SET GLOBAL sql_mode='';
++connection master_1;
++CREATE DATABASE auto_test_local;
++USE auto_test_local;
++CREATE TABLE tbl_a (
++a CHAR(255)
++) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
++SET @orig_sql_mode=@@global.sql_mode;
++SET GLOBAL sql_mode='';
++INSERT INTO tbl_a VALUES ("this will be truncated");
++NOT FOUND /\[WARN SPIDER RESULT\].* Warning 1265 Data truncated for column 'a' at row 1.*/ in mysqld.1.1.err
++SET @orig_log_result_errors=@@global.spider_log_result_errors;
++SET GLOBAL spider_log_result_errors=4;
++INSERT INTO tbl_a VALUES ("this will be truncated");
++FOUND 1 /\[WARN SPIDER RESULT\].* Warning 1265 Data truncated for column 'a' at row 1.*/ in mysqld.1.1.err
++connection master_1;
++SET GLOBAL spider_log_result_errors=@orig_log_result_errors;
++SET GLOBAL sql_mode=@orig_sql_mode;
++DROP DATABASE IF EXISTS auto_test_local;
++connection child2_1;
++SET GLOBAL sql_mode=@orig_sql_mode;
++DROP DATABASE IF EXISTS auto_test_remote;
++for master_1
++for child2
++child2_1
++child2_2
++child2_3
++for child3
+diff --git a/spider/mysql-test/spider/bugfix/t/mdev_29644.cnf b/spider/mysql-test/spider/bugfix/t/mdev_29644.cnf
+new file mode 100644
+index 00000000..05dfd8a0
+--- /dev/null
++++ b/spider/mysql-test/spider/bugfix/t/mdev_29644.cnf
+@@ -0,0 +1,3 @@
++!include include/default_mysqld.cnf
++!include ../my_1_1.cnf
++!include ../my_2_1.cnf
+diff --git a/spider/mysql-test/spider/bugfix/t/mdev_29644.test b/spider/mysql-test/spider/bugfix/t/mdev_29644.test
+new file mode 100644
+index 00000000..4ebdf317
+--- /dev/null
++++ b/spider/mysql-test/spider/bugfix/t/mdev_29644.test
+@@ -0,0 +1,58 @@
++--echo #
++--echo # MDEV-29644 a potential bug of null pointer dereference in spider_db_mbase::print_warnings()
++--echo #
++
++# The test case below does not cause the potential null pointer dereference.
++# It is just for checking spider_db_mbase::fetch_and_print_warnings() works.
++
++--disable_query_log
++--disable_result_log
++--source ../../t/test_init.inc
++--enable_result_log
++--enable_query_log
++
++--connection child2_1
++CREATE DATABASE auto_test_remote;
++USE auto_test_remote;
++eval CREATE TABLE tbl_a (
++ a CHAR(5)
++) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
++set @orig_sql_mode=@@global.sql_mode;
++SET GLOBAL sql_mode='';
++
++--connection master_1
++CREATE DATABASE auto_test_local;
++USE auto_test_local;
++eval CREATE TABLE tbl_a (
++ a CHAR(255)
++) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a", srv "s_2_1"';
++
++SET @orig_sql_mode=@@global.sql_mode;
++SET GLOBAL sql_mode='';
++
++let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.1.err;
++let SEARCH_PATTERN= \[WARN SPIDER RESULT\].* Warning 1265 Data truncated for column 'a' at row 1.*;
++
++INSERT INTO tbl_a VALUES ("this will be truncated");
++--source include/search_pattern_in_file.inc # should not find
++
++SET @orig_log_result_errors=@@global.spider_log_result_errors;
++SET GLOBAL spider_log_result_errors=4;
++
++INSERT INTO tbl_a VALUES ("this will be truncated");
++--source include/search_pattern_in_file.inc # should find
++
++--connection master_1
++SET GLOBAL spider_log_result_errors=@orig_log_result_errors;
++SET GLOBAL sql_mode=@orig_sql_mode;
++DROP DATABASE IF EXISTS auto_test_local;
++
++--connection child2_1
++SET GLOBAL sql_mode=@orig_sql_mode;
++DROP DATABASE IF EXISTS auto_test_remote;
++
++--disable_query_log
++--disable_result_log
++--source ../t/test_deinit.inc
++--enable_query_log
++--enable_result_log
+diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc
+index 85f910aa..7d6bd599 100644
+--- a/storage/spider/spd_db_mysql.cc
++++ b/storage/spider/spd_db_mysql.cc
+@@ -2197,7 +2197,7 @@ int spider_db_mbase::exec_query(
+ db_conn->affected_rows, db_conn->insert_id,
+ db_conn->server_status, db_conn->warning_count);
+ if (spider_param_log_result_errors() >= 3)
+- print_warnings(l_time);
++ fetch_and_print_warnings(l_time);
+ } else if (log_result_errors >= 4)
+ {
+ time_t cur_time = (time_t) time((time_t*) 0);
+@@ -2279,61 +2279,43 @@ bool spider_db_mbase::is_xa_nota_error(
+ DBUG_RETURN(xa_nota);
+ }
+
+-void spider_db_mbase::print_warnings(
+- struct tm *l_time
+-) {
+- DBUG_ENTER("spider_db_mbase::print_warnings");
+- DBUG_PRINT("info",("spider this=%p", this));
+- if (db_conn->status == MYSQL_STATUS_READY)
++void spider_db_mbase::fetch_and_print_warnings(struct tm *l_time)
++{
++ DBUG_ENTER("spider_db_mbase::fetch_and_print_warnings");
++
++ if (spider_param_dry_access() || db_conn->status != MYSQL_STATUS_READY ||
++ db_conn->server_status & SERVER_MORE_RESULTS_EXISTS)
++ DBUG_VOID_RETURN;
++
++ if (mysql_real_query(db_conn, SPIDER_SQL_SHOW_WARNINGS_STR,
++ SPIDER_SQL_SHOW_WARNINGS_LEN))
++ DBUG_VOID_RETURN;
++
++ MYSQL_RES *res= mysql_store_result(db_conn);
++ if (!res)
++ DBUG_VOID_RETURN;
++
++ uint num_fields= mysql_num_fields(res);
++ if (num_fields != 3)
+ {
+-#if MYSQL_VERSION_ID < 50500
+- if (!(db_conn->last_used_con->server_status & SERVER_MORE_RESULTS_EXISTS))
+-#else
+- if (!(db_conn->server_status & SERVER_MORE_RESULTS_EXISTS))
+-#endif
+- {
+- if (
+- spider_param_dry_access() ||
+- !mysql_real_query(db_conn, SPIDER_SQL_SHOW_WARNINGS_STR,
+- SPIDER_SQL_SHOW_WARNINGS_LEN)
+- ) {
+- MYSQL_RES *res = NULL;
+- MYSQL_ROW row = NULL;
+- uint num_fields;
+- if (
+- spider_param_dry_access() ||
+- !(res = mysql_store_result(db_conn)) ||
+- !(row = mysql_fetch_row(res))
+- ) {
+- if (mysql_errno(db_conn))
+- {
+- if (res)
+- mysql_free_result(res);
+- DBUG_VOID_RETURN;
+- }
+- /* no record is ok */
+- }
+- num_fields = mysql_num_fields(res);
+- if (num_fields != 3)
+- {
+- mysql_free_result(res);
+- DBUG_VOID_RETURN;
+- }
+- while (row)
+- {
+- fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [WARN SPIDER RESULT] "
+- "from [%s] %ld to %ld: %s %s %s\n",
++ mysql_free_result(res);
++ DBUG_VOID_RETURN;
++ }
++
++ MYSQL_ROW row= mysql_fetch_row(res);
++ while (row)
++ {
++ fprintf(stderr,
++ "%04d%02d%02d %02d:%02d:%02d [WARN SPIDER RESULT] from [%s] %ld "
++ "to %ld: %s %s %s\n",
+ l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+- l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+- conn->tgt_host, (ulong) db_conn->thread_id,
+- (ulong) current_thd->thread_id, row[0], row[1], row[2]);
+- row = mysql_fetch_row(res);
+- }
+- if (res)
+- mysql_free_result(res);
+- }
+- }
++ l_time->tm_hour, l_time->tm_min, l_time->tm_sec, conn->tgt_host,
++ (ulong) db_conn->thread_id, (ulong) current_thd->thread_id, row[0],
++ row[1], row[2]);
++ row= mysql_fetch_row(res);
+ }
++ mysql_free_result(res);
++
+ DBUG_VOID_RETURN;
+ }
+
+diff --git a/storage/spider/spd_db_mysql.h b/storage/spider/spd_db_mysql.h
+index 626bb4d5..82c7c0ec 100644
+--- a/storage/spider/spd_db_mysql.h
++++ b/storage/spider/spd_db_mysql.h
+@@ -439,9 +439,7 @@ class spider_db_mbase: public spider_db_conn
+ bool is_xa_nota_error(
+ int error_num
+ );
+- void print_warnings(
+- struct tm *l_time
+- );
++ void fetch_and_print_warnings(struct tm *l_time);
+ spider_db_result *store_result(
+ spider_db_result_buffer **spider_res_buf,
+ st_spider_db_request_key *request_key,
+--
+2.25.1
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch b/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch
deleted file mode 100644
index b1ce963602..0000000000
--- a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
-Date: Fri Dec 21 19:14:04 2018 +0200
-
- Link with libatomic to enable C11 atomics support
-
- Some architectures (mips) require libatomic to support proper
- atomic operations. Check first if support is available without
- linking, otherwise use the library.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: mariadb-10.4.17/configure.cmake
-===================================================================
---- mariadb-10.4.17.orig/configure.cmake
-+++ mariadb-10.4.17/configure.cmake
-@@ -863,7 +863,25 @@ int main()
- long long int *ptr= &var;
- return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
- }"
--HAVE_GCC_C11_ATOMICS)
-+HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
-+IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
-+ SET(HAVE_GCC_C11_ATOMICS True)
-+ELSE()
-+ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
-+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-+ CHECK_CXX_SOURCE_COMPILES("
-+ int main()
-+ {
-+ long long int var= 1;
-+ long long int *ptr= &var;
-+ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
-+ }"
-+ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+ SET(HAVE_GCC_C11_ATOMICS True)
-+ ENDIF()
-+ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
-+ENDIF()
-
- IF(WITH_VALGRIND)
- SET(HAVE_valgrind 1)
-Index: mariadb-10.4.17/mysys/CMakeLists.txt
-===================================================================
---- mariadb-10.4.17.orig/mysys/CMakeLists.txt
-+++ mariadb-10.4.17/mysys/CMakeLists.txt
-@@ -78,6 +78,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings
- ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY})
- DTRACE_INSTRUMENT(mysys)
-
-+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+ TARGET_LINK_LIBRARIES(mysys atomic)
-+ENDIF()
-+
- IF(HAVE_BFD_H)
- TARGET_LINK_LIBRARIES(mysys bfd)
- ENDIF(HAVE_BFD_H)
-Index: mariadb-10.4.17/sql/CMakeLists.txt
-===================================================================
---- mariadb-10.4.17.orig/sql/CMakeLists.txt
-+++ mariadb-10.4.17/sql/CMakeLists.txt
-@@ -196,6 +196,10 @@ ELSE()
- SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
- ENDIF()
-
-+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+ TARGET_LINK_LIBRARIES(sql atomic)
-+ENDIF()
-+
-
- IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS)
-
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch b/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch
deleted file mode 100644
index c77a869441..0000000000
--- a/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-libc++ also has a file called version and this file and how cflags are specified
-it ends up including this file and resulting in compile errors
-
-fixes errors like
-storage/mroonga/version:1:1: error: expected unqualified-id
-7.07
-^
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/storage/mroonga/CMakeLists.txt
-+++ b/storage/mroonga/CMakeLists.txt
-@@ -80,7 +80,7 @@ else()
- set(MRN_SOURCE_DIR ${CMAKE_SOURCE_DIR})
- endif()
-
--file(READ ${MRN_SOURCE_DIR}/version MRN_VERSION)
-+file(READ ${MRN_SOURCE_DIR}/ver MRN_VERSION)
- file(READ ${MRN_SOURCE_DIR}/version_major MRN_VERSION_MAJOR)
- file(READ ${MRN_SOURCE_DIR}/version_minor MRN_VERSION_MINOR)
- file(READ ${MRN_SOURCE_DIR}/version_micro MRN_VERSION_MICRO)
---- /dev/null
-+++ b/storage/mroonga/ver
-@@ -0,0 +1 @@
-+7.07
-\ No newline at end of file
---- a/storage/mroonga/version
-+++ /dev/null
-@@ -1 +0,0 @@
--7.07
-\ No newline at end of file
diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.4.20.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.4.28.bb
index c0b53379d9..c0b53379d9 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb_10.4.20.bb
+++ b/meta-oe/recipes-dbs/mysql/mariadb_10.4.28.bb
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
index 865ad3287b..e5fb85170b 100644
--- a/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
@@ -9,11 +9,11 @@ extending the existing aarch64 macro works.
src/include/storage/s_lock.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
-index 3fe29ce..7cd578f 100644
---- a/src/include/storage/s_lock.h
-+++ b/src/include/storage/s_lock.h
-@@ -316,11 +316,12 @@ tas(volatile slock_t *lock)
+Index: postgresql-12.16/src/include/storage/s_lock.h
+===================================================================
+--- postgresql-12.16.orig/src/include/storage/s_lock.h
++++ postgresql-12.16/src/include/storage/s_lock.h
+@@ -317,11 +317,12 @@ tas(volatile slock_t *lock)
/*
* On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available.
@@ -27,7 +27,7 @@ index 3fe29ce..7cd578f 100644
#ifdef HAVE_GCC__SYNC_INT32_TAS
#define HAS_TEST_AND_SET
-@@ -337,7 +338,7 @@ tas(volatile slock_t *lock)
+@@ -338,7 +339,7 @@ tas(volatile slock_t *lock)
#define S_UNLOCK(lock) __sync_lock_release(lock)
#endif /* HAVE_GCC__SYNC_INT32_TAS */
@@ -36,6 +36,3 @@ index 3fe29ce..7cd578f 100644
/* S/390 and S/390x Linux (32- and 64-bit zSeries) */
---
-2.9.3
-
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
index 32b7f42845..70c813adf5 100644
--- a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
@@ -19,11 +19,11 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
src/common/Makefile | 4 ----
1 file changed, 4 deletions(-)
-diff --git a/src/common/Makefile b/src/common/Makefile
-index 1fc2c66..5e6c457 100644
---- a/src/common/Makefile
-+++ b/src/common/Makefile
-@@ -27,10 +27,6 @@ include $(top_builddir)/src/Makefile.global
+Index: postgresql-12.16/src/common/Makefile
+===================================================================
+--- postgresql-12.16.orig/src/common/Makefile
++++ postgresql-12.16/src/common/Makefile
+@@ -31,10 +31,6 @@ include $(top_builddir)/src/Makefile.glo
# don't include subdirectory-path-dependent -I and -L switches
STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
@@ -34,6 +34,3 @@ index 1fc2c66..5e6c457 100644
override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
---
-2.7.4
-
diff --git a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
index 22b62d9ded..eb6226b179 100644
--- a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
@@ -19,11 +19,11 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/configure.in b/configure.in
-index b98b9bb..8584677 100644
---- a/configure.in
-+++ b/configure.in
-@@ -2211,7 +2211,7 @@ Use --without-tcl to disable building PL/Tcl.])
+Index: postgresql-12.16/configure.in
+===================================================================
+--- postgresql-12.16.orig/configure.in
++++ postgresql-12.16/configure.in
+@@ -2357,7 +2357,7 @@ Use --without-tcl to disable building PL
fi
# check for <perl.h>
@@ -32,6 +32,3 @@ index b98b9bb..8584677 100644
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $perl_includespec"
AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
---
-2.7.4
-
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_12.7.bb b/meta-oe/recipes-dbs/postgresql/postgresql_12.17.bb
index 18ba2178f4..e9f9f50a21 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql_12.7.bb
+++ b/meta-oe/recipes-dbs/postgresql/postgresql_12.17.bb
@@ -1,6 +1,6 @@
require postgresql.inc
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=255f15687738db8068fbe9b938c90217"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=c31f662bb2bfb3b4187fe9a53e0ffe7c"
SRC_URI += "\
file://not-check-libperl.patch \
@@ -8,4 +8,4 @@ SRC_URI += "\
file://0001-Improve-reproducibility.patch \
"
-SRC_URI[sha256sum] = "8490741f47c88edc8b6624af009ce19fda4dc9b31c4469ce2551d84075d5d995"
+SRC_URI[sha256sum] = "93e8e1b23981d5f03c6c5763f77b28184c1ce4db7194fa466e2edb65d9c1c5f6"
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index b9038df81d..f971319915 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -10,7 +10,7 @@ SRCREV = "551a110918493a19d11243f53408b97485de1411"
SRCBRANCH = "6.6.fb"
PV = "6.6.4"
-SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
+SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=https \
file://0001-db-write_thread.cc-Initialize-state.patch \
file://0001-cmake-Add-check-for-atomic-support.patch \
"
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
index e874e4a5ea..87f9c23ebf 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
PV = "20190808+git${SRCPV}"
SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde"
BRANCH = "lts_2019_08_08"
-SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH} \
+SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \
file://0001-Remove-maes-option-from-cross-compilation.patch \
file://0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch \
file://0003-Add-fPIC-option.patch \
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
index fb6125e2a5..ef440471bf 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
+++ b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
@@ -19,6 +19,7 @@ SRCREV_libhardware = "be55eb1f4d840c82ffaf7c47460df17ff5bc4d9b"
SRCREV_libselinux = "07e9e1339ad1ba608acfba9dce2d0f474b252feb"
SRCREV_build = "16e987def3d7d8f7d30805eb95cef69e52a87dbc"
+SRCREV_FORMAT = "core_extras_libhardware_libselinux_build"
SRC_URI = " \
git://${ANDROID_MIRROR}/platform/system/core;name=core;protocol=https;nobranch=1;destsuffix=git/system/core \
git://${ANDROID_MIRROR}/platform/system/extras;name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \
diff --git a/meta-oe/recipes-devtools/bootchart/bootchart_git.bb b/meta-oe/recipes-devtools/bootchart/bootchart_git.bb
index 2b75eaac9d..79754050d0 100644
--- a/meta-oe/recipes-devtools/bootchart/bootchart_git.bb
+++ b/meta-oe/recipes-devtools/bootchart/bootchart_git.bb
@@ -8,7 +8,7 @@ PV = "1.17"
PR = "r1"
PE = "1"
-SRC_URI = "git://gitorious.org/meego-developer-tools/bootchart.git;protocol=https \
+SRC_URI = "git://gitorious.org/meego-developer-tools/bootchart.git;protocol=https;branch=master \
file://0001-svg-add-rudimentary-support-for-ARM-cpuinfo.patch \
file://0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch \
"
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb b/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
index daf262ed66..1e474225a2 100644
--- a/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
+++ b/meta-oe/recipes-devtools/breakpad/breakpad_git.bb
@@ -26,11 +26,11 @@ SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac"
SRCREV_lss = "8048ece6c16c91acfe0d36d1d3cc0890ab6e945c"
SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770"
-SRC_URI = "git://github.com/google/breakpad;name=breakpad \
- git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest \
- git://github.com/google/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf \
- git://chromium.googlesource.com/linux-syscall-support;protocol=https;destsuffix=git/src/third_party/lss;name=lss \
- git://chromium.googlesource.com/external/gyp;protocol=https;destsuffix=git/src/tools/gyp;name=gyp \
+SRC_URI = "git://github.com/google/breakpad;name=breakpad;branch=main;protocol=https \
+ git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest;branch=main;protocol=https \
+ git://github.com/google/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf;branch=main;protocol=https \
+ git://chromium.googlesource.com/linux-syscall-support;protocol=https;destsuffix=git/src/third_party/lss;name=lss;branch=main \
+ git://chromium.googlesource.com/external/gyp;protocol=https;destsuffix=git/src/tools/gyp;name=gyp;branch=master \
file://0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch \
file://0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch \
file://0001-Turn-off-sign-compare-for-musl-libc.patch \
diff --git a/meta-oe/recipes-devtools/capnproto/capnproto_0.7.0.bb b/meta-oe/recipes-devtools/capnproto/capnproto_0.7.0.bb
index c6bab5ec2b..fa1751e566 100644
--- a/meta-oe/recipes-devtools/capnproto/capnproto_0.7.0.bb
+++ b/meta-oe/recipes-devtools/capnproto/capnproto_0.7.0.bb
@@ -5,7 +5,9 @@ SECTION = "console/tools"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://../LICENSE;md5=a05663ae6cca874123bf667a60dca8c9"
-SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV}"
+SRC_URI = "git://github.com/sandstorm-io/capnproto.git;branch=release-${PV};protocol=https \
+ file://CVE-2022-46149.patch \
+"
SRCREV = "3f44c6db0f0f6c0cab0633f15f15d0a2acd01d19"
S = "${WORKDIR}/git/c++"
diff --git a/meta-oe/recipes-devtools/capnproto/files/CVE-2022-46149.patch b/meta-oe/recipes-devtools/capnproto/files/CVE-2022-46149.patch
new file mode 100644
index 0000000000..b6b1fa6514
--- /dev/null
+++ b/meta-oe/recipes-devtools/capnproto/files/CVE-2022-46149.patch
@@ -0,0 +1,49 @@
+From 25d34c67863fd960af34fc4f82a7ca3362ee74b9 Mon Sep 17 00:00:00 2001
+From: Kenton Varda <kenton@cloudflare.com>
+Date: Wed, 23 Nov 2022 12:02:29 -0600
+Subject: [PATCH] Apply data offset for list-of-pointers at access time rather
+ than ListReader creation time.
+
+Baking this offset into `ptr` reduced ops needed at access time but made the interpretation of `ptr` inconsistent depending on what type of list was expected.
+
+CVE: CVE-2022-46149
+Upstream-Status: Backport [https://github.com/capnproto/capnproto/commit/25d34c67863fd960af34fc4f82a7ca3362ee74b9]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+---
+ c++/src/capnp/layout.c++ | 4 ----
+ c++/src/capnp/layout.h | 6 +++++-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+Index: c++/src/capnp/layout.c++
+===================================================================
+--- c++.orig/src/capnp/layout.c++
++++ c++/src/capnp/layout.c++
+@@ -2322,10 +2322,6 @@ struct WireHelpers {
+ break;
+
+ case ElementSize::POINTER:
+- // We expected a list of pointers but got a list of structs. Assuming the first field
+- // in the struct is the pointer we were looking for, we want to munge the pointer to
+- // point at the first element's pointer section.
+- ptr += tag->structRef.dataSize.get();
+ KJ_REQUIRE(tag->structRef.ptrCount.get() > ZERO * POINTERS,
+ "Expected a pointer list, but got a list of data-only structs.") {
+ goto useDefault;
+Index: c++/src/capnp/layout.h
+===================================================================
+--- c++.orig/src/capnp/layout.h
++++ c++/src/capnp/layout.h
+@@ -1235,8 +1235,12 @@ inline Void ListReader::getDataElement<V
+ }
+
+ inline PointerReader ListReader::getPointerElement(ElementCount index) const {
++ // If the list elements have data sections we need to skip those. Note that for pointers to be
++ // present at all (which already must be true if we get here), then `structDataSize` must be a
++ // whole number of words, so we don't have to worry about unaligned reads here.
++ auto offset = structDataSize / BITS_PER_BYTE;
+ return PointerReader(segment, capTable, reinterpret_cast<const WirePointer*>(
+- ptr + upgradeBound<uint64_t>(index) * step / BITS_PER_BYTE), nestingLimit);
++ ptr + offset + upgradeBound<uint64_t>(index) * step / BITS_PER_BYTE), nestingLimit);
+ }
+
+ // -------------------------------------------------------------------
diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.13.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.13.bb
index e6174821ff..7af05acf9a 100644
--- a/meta-oe/recipes-devtools/cjson/cjson_1.7.13.bb
+++ b/meta-oe/recipes-devtools/cjson/cjson_1.7.13.bb
@@ -5,7 +5,7 @@ SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0"
-SRC_URI = "git://github.com/DaveGamble/cJSON.git"
+SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https"
SRCREV = "39853e5148dad8dc5d32ea2b00943cf4a0c6f120"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb b/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb
index 8c6cf7db20..996314a758 100644
--- a/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb
+++ b/meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb
@@ -10,7 +10,7 @@ SECTION = "base"
PV = "0.5.1+git${SRCPV}"
SRCREV = "f97d3da5c375ac2fc5a9173cdd36cb828915a2e1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a0b24c1a8f9ad516a297d055b0294231"
-SRC_URI = "git://github.com/concurrencykit/ck.git \
+SRC_URI = "git://github.com/concurrencykit/ck.git;branch=master;protocol=https \
file://cross.patch \
"
diff --git a/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb b/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb
index 406494ebbc..d1b7134b83 100644
--- a/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb
+++ b/meta-oe/recipes-devtools/dnf-plugin-tui/dnf-plugin-tui_git.bb
@@ -3,11 +3,11 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "git://github.com/ubinux/dnf-plugin-tui.git;branch=master "
+SRC_URI = "git://github.com/ubinux/dnf-plugin-tui.git;branch=master;protocol=https"
SRCREV = "c5416adeb210154dc4ccc4c3e1c5297d83ebd41e"
PV = "1.1"
-SRC_URI_append_class-target = "file://oe-remote.repo.sample"
+SRC_URI_append_class-target = " file://oe-remote.repo.sample"
inherit distutils3-base
diff --git a/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.12.0.bb b/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.12.0.bb
index 7b8d47d8df..c4f3594f36 100644
--- a/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.12.0.bb
+++ b/meta-oe/recipes-devtools/flatbuffers/flatbuffers_1.12.0.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRCREV = "6df40a2471737b27271bdd9b900ab5f3aec746c7"
-SRC_URI = "git://github.com/google/flatbuffers.git"
+SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https"
# affects only flatbuffers rust crate
CVE_CHECK_WHITELIST += "CVE-2020-35864"
@@ -24,12 +24,17 @@ BUILD_CXXFLAGS += "-std=c++11 -fPIC"
# BUILD_TYPE=Release is required, otherwise flatc is not installed
EXTRA_OECMAKE += "\
-DCMAKE_BUILD_TYPE=Release \
- -DFLATBUFFERS_BUILD_TESTS=OFF \
+ -DFLATBUFFERS_BUILD_TESTS=OFF \
-DFLATBUFFERS_BUILD_SHAREDLIB=ON \
"
inherit cmake
+rm_flatc_cmaketarget_for_target() {
+ rm -f "${SYSROOT_DESTDIR}/${libdir}/cmake/flatbuffers/FlatcTargets.cmake"
+}
+SYSROOT_PREPROCESS_FUNCS:class-target += "rm_flatc_cmaketarget_for_target"
+
S = "${WORKDIR}/git"
FILES_${PN}-compiler = "${bindir}"
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb b/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb
index 752562eb33..8a055412f2 100644
--- a/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb
+++ b/meta-oe/recipes-devtools/grpc/grpc_1.24.3.bb
@@ -15,9 +15,10 @@ SRCREV_grpc = "2de2e8dd8921e1f7d043e01faf7fe8a291fbb072"
SRCREV_upb = "9effcbcb27f0a665f9f345030188c0b291e32482"
BRANCH = "v1.24.x"
SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \
- git://github.com/protocolbuffers/upb;name=upb;destsuffix=git/third_party/upb \
+ git://github.com/protocolbuffers/upb;name=upb;destsuffix=git/third_party/upb;branch=main;protocol=https \
file://0001-CMakeLists.txt-Fix-libraries-installation-for-Linux.patch \
"
+SRCREV_FORMAT = "grpc_upb"
SRC_URI_append_class-target = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch \
"
SRC_URI_append_class-nativesdk = " file://0001-CMakeLists.txt-Fix-grpc_cpp_plugin-path-during-cross.patch"
@@ -62,6 +63,6 @@ do_configure_prepend_toolchain-clang_x86() {
BBCLASSEXTEND = "native nativesdk"
-SYSROOT_DIRS_BLACKLIST_append_class-target = "${baselib}/cmake/grpc"
+SYSROOT_DIRS_BLACKLIST_append_class-target = " ${baselib}/cmake/grpc"
FILES_${PN}-dev += "${bindir}"
diff --git a/meta-oe/recipes-devtools/guider/guider_3.9.7.bb b/meta-oe/recipes-devtools/guider/guider_3.9.7.bb
index 88fad936ba..cc81443d5d 100644
--- a/meta-oe/recipes-devtools/guider/guider_3.9.7.bb
+++ b/meta-oe/recipes-devtools/guider/guider_3.9.7.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2"
PV = "3.9.7+git${SRCPV}"
-SRC_URI = "git://github.com/iipeace/${BPN}"
+SRC_URI = "git://github.com/iipeace/${BPN};branch=master;protocol=https"
SRCREV = "459b5189a46023fc98e19888b196bdc2674022fd"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
new file mode 100644
index 0000000000..784f175eea
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
@@ -0,0 +1,52 @@
+From 2d5a94aeeab01f0448b5a0bb8d4a9a23a5b790d5 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <lorne@cons.org.nz>
+Date: Sat, 28 Dec 2019 16:04:24 +0900
+Subject: [PATCH] json_writer: fix inverted sense in isAnyCharRequiredQuoting
+ (#1120)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This bug is only affects platforms where `char` is unsigned.
+
+When char is a signed type, values >= 0x80 are also considered < 0,
+and hence require escaping due to the < ' ' condition.
+
+When char is an unsigned type, values >= 0x80 match none of the
+conditions and are considered safe to emit without escaping.
+
+This shows up as a test failure:
+
+* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
+/build/source/src/test_lib_json/main.cpp(3370): expected == result
+ Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
+ '
+ Actual : '["\"","\\","\b","\f","\n","\r","\t","ɸ","𤭢"]
+ '
+Upstream-Status: Backport [https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb]
+
+Signed-off-by: Viktor Rosendahl <Viktor.Rosendahl@bmw.de>
+
+---
+ src/lib_json/json_writer.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
+index 519ce23..b68a638 100644
+--- a/src/lib_json/json_writer.cpp
++++ b/src/lib_json/json_writer.cpp
+@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t n) {
+
+ char const* const end = s + n;
+ for (char const* cur = s; cur < end; ++cur) {
+- if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
+- static_cast<unsigned char>(*cur) < 0x80)
++ if (*cur == '\\' || *cur == '\"' ||
++ static_cast<unsigned char>(*cur) < ' ' ||
++ static_cast<unsigned char>(*cur) >= 0x80)
+ return true;
+ }
+ return false;
+--
+2.17.1
+
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
index 8a5db3da3c..ae4b4c9840 100644
--- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
@@ -14,7 +14,10 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
SRCREV = "d2e6a971f4544c55b8e3b25cf96db266971b778f"
-SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
+SRC_URI = "\
+ git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https \
+ file://0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch \
+ "
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.3.0.bb b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.3.0.bb
index ca9675ed64..e9672ea4dd 100644
--- a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.3.0.bb
+++ b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.3.0.bb
@@ -9,7 +9,7 @@ SECTION = "libs"
DEPENDS = "curl jsoncpp libmicrohttpd hiredis"
-SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp"
+SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https"
SRCREV = "c696f6932113b81cd20cd4a34fdb1808e773f23e"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.9.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.9.0.bb
index 62d4df5e09..72f06ae44f 100644
--- a/meta-oe/recipes-devtools/lapack/lapack_3.9.0.bb
+++ b/meta-oe/recipes-devtools/lapack/lapack_3.9.0.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=930f8aa500a47c7dab0f8efb5a1c9a40"
DEPENDS = "libgfortran"
SRCREV = "6acc99d5f39130be7cec00fb835606042101a970"
-SRC_URI = "git://github.com/Reference-LAPACK/lapack.git;protocol=https"
+SRC_URI = "git://github.com/Reference-LAPACK/lapack.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON "
diff --git a/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb b/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb
index b83e86a488..2dc3776e81 100644
--- a/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb
+++ b/meta-oe/recipes-devtools/libsombok3/libsombok3_2.4.0.bb
@@ -7,7 +7,7 @@ Cluster segmentation described in Annex #29 (UAX #29)."
LICENSE = "Artistic-1.0 | GPLv1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5b122a36d0f6dc55279a0ebc69f3c60b"
-SRC_URI = "git://github.com/hatukanezumi/sombok.git;protocol=https \
+SRC_URI = "git://github.com/hatukanezumi/sombok.git;protocol=https;branch=master \
file://0001-configure.ac-fix-cross-compiling-issue.patch \
"
diff --git a/meta-oe/recipes-devtools/libubox/libubox_git.bb b/meta-oe/recipes-devtools/libubox/libubox_git.bb
index 7dbefa1152..18f26b009b 100644
--- a/meta-oe/recipes-devtools/libubox/libubox_git.bb
+++ b/meta-oe/recipes-devtools/libubox/libubox_git.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "\
"
SRC_URI = "\
- git://git.openwrt.org/project/libubox.git \
+ git://git.openwrt.org/project/libubox.git;branch=master \
file://0001-version-libraries.patch \
file://fix-libdir.patch \
file://0001-blobmsg-fix-array-out-of-bounds-GCC-10-warning.patch \
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index 5710943d74..339841acf3 100644
--- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -14,7 +14,7 @@ PV = "7.91+git${SRCPV}"
SRCREV = "c22d359433b333937ee3d803450dc41998115685"
DEPENDS = "elfutils"
-SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http \
+SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http;protocol=https \
file://configure-allow-to-disable-selinux-support.patch \
file://0001-replace-readdir_r-with-readdir.patch \
file://0001-Use-correct-enum-type.patch \
diff --git a/meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch b/meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch
new file mode 100644
index 0000000000..606c9ea98c
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch
@@ -0,0 +1,73 @@
+From a38684e4cb4e1439e5f2f7370724496d5b363b32 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Mon, 18 Apr 2022 09:04:08 -1000
+Subject: [PATCH] lua: fix CVE-2022-28805
+
+singlevar in lparser.c in Lua through 5.4.4 lacks a certain luaK_exp2anyregup
+call, leading to a heap-based buffer over-read that might affect a system that
+compiles untrusted Lua code.
+
+https://nvd.nist.gov/vuln/detail/CVE-2022-28805
+
+(From OE-Core rev: d2ba3b8850d461bc7b773240cdf15b22b31a3f9e)
+
+Signed-off-by: Sana Kazi <sana.kazi@kpit.com>
+Signed-off-by: Steve Sakoman <steve@sakoman.com>
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+(cherry picked from commit 91e14d3a8e6e67267047473f5c449f266b44f354)
+Signed-off-by: Omkar Patil <omkar.patil@kpit.com>
+---
+ .../lua/lua/CVE-2022-28805.patch | 28 +++++++++++++++++++
+ meta-oe/recipes-devtools/lua/lua_5.3.6.bb | 1 +
+ 2 files changed, 29 insertions(+)
+ create mode 100644 meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
+
+diff --git a/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
+new file mode 100644
+index 000000000..0a21d1ce7
+--- /dev/null
++++ b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
+@@ -0,0 +1,28 @@
++From 1f3c6f4534c6411313361697d98d1145a1f030fa Mon Sep 17 00:00:00 2001
++From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
++Date: Tue, 15 Feb 2022 12:28:46 -0300
++Subject: [PATCH] Bug: Lua can generate wrong code when _ENV is <const>
++
++CVE: CVE-2022-28805
++
++Upstream-Status: Backport [https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa]
++
++Signed-off-by: Sana Kazi <sana.kazi@kpit.com>
++Signed-off-by: Steve Sakoman <steve@sakoman.com>
++---
++ src/lparser.c | 1 +
++ 1 files changed, 1 insertions(+)
++
++diff --git a/src/lparser.c b/src/lparser.c
++index 3abe3d751..a5cd55257 100644
++--- a/src/lparser.c
+++++ b/src/lparser.c
++@@ -300,6 +300,7 @@
++ expdesc key;
++ singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
++ lua_assert(var->k != VVOID); /* this one must exist */
+++ luaK_exp2anyregup(fs, var); /* but could be a constant */
++ codestring(ls, &key, varname); /* key is variable name */
++ luaK_indexed(fs, var, &key); /* env[varname] */
++ }
++
+diff --git a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
+index 342ed1b54..0137cc3c5 100644
+--- a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
++++ b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
+@@ -10,6 +10,7 @@ SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
+ file://CVE-2020-15888.patch \
+ file://CVE-2020-15945.patch \
+ file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
++ file://CVE-2022-28805.patch \
+ "
+
+ # if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
+--
+2.17.1
+
diff --git a/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
new file mode 100644
index 0000000000..0a21d1ce77
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
@@ -0,0 +1,28 @@
+From 1f3c6f4534c6411313361697d98d1145a1f030fa Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
+Date: Tue, 15 Feb 2022 12:28:46 -0300
+Subject: [PATCH] Bug: Lua can generate wrong code when _ENV is <const>
+
+CVE: CVE-2022-28805
+
+Upstream-Status: Backport [https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa]
+
+Signed-off-by: Sana Kazi <sana.kazi@kpit.com>
+Signed-off-by: Steve Sakoman <steve@sakoman.com>
+---
+ src/lparser.c | 1 +
+ 1 files changed, 1 insertions(+)
+
+diff --git a/src/lparser.c b/src/lparser.c
+index 3abe3d751..a5cd55257 100644
+--- a/src/lparser.c
++++ b/src/lparser.c
+@@ -300,6 +300,7 @@
+ expdesc key;
+ singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
+ lua_assert(var->k != VVOID); /* this one must exist */
++ luaK_exp2anyregup(fs, var); /* but could be a constant */
+ codestring(ls, &key, varname); /* key is variable name */
+ luaK_indexed(fs, var, &key); /* env[varname] */
+ }
+
diff --git a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
index 342ed1b547..d46d402aa3 100644
--- a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
+++ b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
@@ -10,6 +10,7 @@ SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
file://CVE-2020-15888.patch \
file://CVE-2020-15945.patch \
file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
+ file://CVE-2022-28805.patch \
"
# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
@@ -31,7 +32,7 @@ PACKAGECONFIG ??= "readline"
PACKAGECONFIG[readline] = ",,readline"
UCLIBC_PATCHES += "file://uclibc-pthread.patch"
-SRC_URI_append_libc-uclibc = "${UCLIBC_PATCHES}"
+SRC_URI_append_libc-uclibc = " ${UCLIBC_PATCHES}"
TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'"
diff --git a/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb b/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb
index 1bee9fe0b9..83f6aa0f42 100644
--- a/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb
+++ b/meta-oe/recipes-devtools/luaposix/luaposix_33.4.0.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7dd2aad04bb7ca212e69127ba8d58f9f"
DEPENDS += "lua-native lua"
-SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release \
+SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release;protocol=https \
file://0001-fix-avoid-race-condition-between-test-and-mkdir.patch \
"
SRCREV = "8e4902ed81c922ed8f76a7ed85be1eaa3fd7e66d"
diff --git a/meta-oe/recipes-devtools/msgpack/msgpack-c_3.2.1.bb b/meta-oe/recipes-devtools/msgpack/msgpack-c_3.2.1.bb
index d410dc6e0a..90b55ad2df 100644
--- a/meta-oe/recipes-devtools/msgpack/msgpack-c_3.2.1.bb
+++ b/meta-oe/recipes-devtools/msgpack/msgpack-c_3.2.1.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \
PV .= "+git${SRCPV}"
-SRC_URI = "git://github.com/msgpack/msgpack-c \
+SRC_URI = "git://github.com/msgpack/msgpack-c;branch=master;protocol=https \
"
# cpp-3.2.1
SRCREV = "8085ab8721090a447cf98bb802d1406ad7afe420"
diff --git a/meta-oe/recipes-devtools/nanopb/nanopb_0.4.0.bb b/meta-oe/recipes-devtools/nanopb/nanopb_0.4.0.bb
index 21d110aeea..9de6f8c99d 100644
--- a/meta-oe/recipes-devtools/nanopb/nanopb_0.4.0.bb
+++ b/meta-oe/recipes-devtools/nanopb/nanopb_0.4.0.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f"
DEPENDS = "protobuf-native"
-SRC_URI = "git://github.com/nanopb/nanopb.git"
+SRC_URI = "git://github.com/nanopb/nanopb.git;branch=master;protocol=https"
SRCREV = "70f0de9877b1ce12abc0229d5df84db6349fcbfc"
S = "${WORKDIR}/git"
@@ -25,6 +25,6 @@ RDEPENDS_${PN} += "\
protobuf-compiler \
"
-BBCLASSEXTEND = "native nativesdk"
+BBCLASSEXTEND = "nativesdk"
PNBLACKLIST[nanopb] = "Needs forward porting to use python3"
diff --git a/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb b/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb
index a97eb53c1d..62fdecf6ff 100644
--- a/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb
+++ b/meta-oe/recipes-devtools/nlohmann-fifo/nlohmann-fifo_git.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=b67209a1e36b682a8226de19d265b1e0"
-SRC_URI = "git://github.com/nlohmann/fifo_map.git"
+SRC_URI = "git://github.com/nlohmann/fifo_map.git;branch=master;protocol=https"
PV = "1.0.0+git${SRCPV}"
diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb
index 5766194d26..a7ba46c8d1 100644
--- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb
+++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=f5f7c71504da070bcf4f090205ce1080"
-SRC_URI = "git://github.com/nlohmann/json.git;nobranch=1 \
+SRC_URI = "git://github.com/nlohmann/json.git;branch=develop;protocol=https \
file://0001-Templatize-basic_json-ctor-from-json_ref.patch \
file://0001-typo-fix.patch \
"
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps-nodejs14.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps-nodejs14.patch
new file mode 100644
index 0000000000..c719c9c3b0
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps-nodejs14.patch
@@ -0,0 +1,22 @@
+From 7d94bfe53beeb2d25eb5f2ff6b1d509df7e6ab80 Mon Sep 17 00:00:00 2001
+From: Zuzana Svetlikova <zsvetlik@redhat.com>
+Date: Thu, 27 Apr 2017 14:25:42 +0200
+Subject: [PATCH] Disable running gyp on shared deps
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 93d63110..79caaec2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -138,7 +138,7 @@ with-code-cache test-code-cache:
+ $(warning '$@' target is a noop)
+
+ out/Makefile: config.gypi common.gypi node.gyp \
+- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
++ deps/llhttp/llhttp.gyp \
+ tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
+ tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
+ $(PYTHON) tools/gyp_node.py -f make
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-jinja-tests.py-add-py-3.10-fix-nodejs14.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-jinja-tests.py-add-py-3.10-fix-nodejs14.patch
new file mode 100644
index 0000000000..8c5f75112d
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-jinja-tests.py-add-py-3.10-fix-nodejs14.patch
@@ -0,0 +1,40 @@
+From e1d838089cd461d9efcf4d29d9f18f65994d2d6b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sun, 3 Oct 2021 22:48:39 +0200
+Subject: [PATCH] jinja/tests.py: add py 3.10 fix
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ deps/v8/third_party/jinja2/tests.py | 2 +-
+ tools/inspector_protocol/jinja2/tests.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/deps/v8/third_party/jinja2/tests.py b/deps/v8/third_party/jinja2/tests.py
+index 0adc3d4..b14f85f 100644
+--- a/deps/v8/third_party/jinja2/tests.py
++++ b/deps/v8/third_party/jinja2/tests.py
+@@ -10,7 +10,7 @@
+ """
+ import operator
+ import re
+-from collections import Mapping
++from collections.abc import Mapping
+ from jinja2.runtime import Undefined
+ from jinja2._compat import text_type, string_types, integer_types
+ import decimal
+diff --git a/tools/inspector_protocol/jinja2/tests.py b/tools/inspector_protocol/jinja2/tests.py
+index 0adc3d4..b14f85f 100644
+--- a/tools/inspector_protocol/jinja2/tests.py
++++ b/tools/inspector_protocol/jinja2/tests.py
+@@ -10,7 +10,7 @@
+ """
+ import operator
+ import re
+-from collections import Mapping
++from collections.abc import Mapping
+ from jinja2.runtime import Undefined
+ from jinja2._compat import text_type, string_types, integer_types
+ import decimal
+--
+2.20.1
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang-nodejs14.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang-nodejs14.patch
new file mode 100644
index 0000000000..ee287bf94a
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang-nodejs14.patch
@@ -0,0 +1,27 @@
+From 0976af0f3b328436ea44a74a406f311adb2ab211 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Jun 2021 19:01:31 -0700
+Subject: [PATCH] ppc64: Do not use -mminimal-toc with clang
+
+clang does not support this option
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ common.gypi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common.gypi b/common.gypi
+index ee91fb1d..049c8f8c 100644
+--- a/common.gypi
++++ b/common.gypi
+@@ -413,7 +413,7 @@
+ 'ldflags': [ '-m32' ],
+ }],
+ [ 'target_arch=="ppc64" and OS!="aix"', {
+- 'cflags': [ '-m64', '-mminimal-toc' ],
++ 'cflags': [ '-m64' ],
+ 'ldflags': [ '-m64' ],
+ }],
+ [ 'target_arch=="s390x"', {
+--
+2.32.0
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries-nodejs14.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries-nodejs14.patch
new file mode 100644
index 0000000000..c6fc2dcd76
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries-nodejs14.patch
@@ -0,0 +1,62 @@
+From 6c3ac20477a4bac643088f24df3c042e627fafa9 Mon Sep 17 00:00:00 2001
+From: Guillaume Burel <guillaume.burel@stormshield.eu>
+Date: Fri, 3 Jan 2020 11:25:54 +0100
+Subject: [PATCH] Using native binaries
+
+---
+ node.gyp | 4 ++--
+ tools/v8_gypfiles/v8.gyp | 11 ++++-------
+ 2 files changed, 6 insertions(+), 9 deletions(-)
+
+--- a/node.gyp
++++ b/node.gyp
+@@ -487,6 +487,7 @@
+ 'action_name': 'run_mkcodecache',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(mkcodecache_exec)',
+ ],
+ 'outputs': [
+@@ -512,6 +513,7 @@
+ 'action_name': 'node_mksnapshot',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(node_mksnapshot_exec)',
+ ],
+ 'outputs': [
+--- a/tools/v8_gypfiles/v8.gyp
++++ b/tools/v8_gypfiles/v8.gyp
+@@ -220,6 +220,7 @@
+ {
+ 'action_name': 'run_torque_action',
+ 'inputs': [ # Order matters.
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)',
+ '<@(torque_files)',
+ ],
+@@ -351,6 +352,7 @@
+ {
+ 'action_name': 'generate_bytecode_builtins_list_action',
+ 'inputs': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)',
+ ],
+ 'outputs': [
+@@ -533,6 +535,7 @@
+ ],
+ },
+ 'inputs': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(mksnapshot_exec)',
+ ],
+ 'outputs': [
+@@ -1448,6 +1451,7 @@
+ {
+ 'action_name': 'run_gen-regexp-special-case_action',
+ 'inputs': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen-regexp-special-case<(EXECUTABLE_SUFFIX)',
+ ],
+ 'outputs': [
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir-nodejs14.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir-nodejs14.patch
new file mode 100644
index 0000000000..3c4b2317d8
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir-nodejs14.patch
@@ -0,0 +1,84 @@
+From 5b22fac923d1ca3e9fefb97f5a171124a88f5e22 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Date: Tue, 19 Mar 2019 23:22:40 -0400
+Subject: [PATCH] Install both binaries and use libdir.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This allows us to build with a shared library for other users while
+still providing the normal executable.
+
+Taken from - https://src.fedoraproject.org/rpms/nodejs/raw/rawhide/f/0002-Install-both-binaries-and-use-libdir.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.py | 7 +++++++
+ tools/install.py | 21 +++++++++------------
+ 2 files changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index e6f7e4db..6cf5c45d 100755
+--- a/configure.py
++++ b/configure.py
+@@ -626,6 +626,12 @@ parser.add_option('--shared',
+ help='compile shared library for embedding node in another project. ' +
+ '(This mode is not officially supported for regular applications)')
+
++parser.add_option('--libdir',
++ action='store',
++ dest='libdir',
++ default='lib',
++ help='a directory to install the shared library into')
++
+ parser.add_option('--without-v8-platform',
+ action='store_true',
+ dest='without_v8_platform',
+@@ -1202,6 +1208,7 @@ def configure_node(o):
+ o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
+
+ o['variables']['node_shared'] = b(options.shared)
++ o['variables']['libdir'] = options.libdir
+ node_module_version = getmoduleversion.get_version()
+
+ if options.dest_os == 'android':
+diff --git a/tools/install.py b/tools/install.py
+index 729b416f..9bfc6234 100755
+--- a/tools/install.py
++++ b/tools/install.py
+@@ -121,22 +121,19 @@ def subdir_files(path, dest, action):
+
+ def files(action):
+ is_windows = sys.platform == 'win32'
+- output_file = 'node'
+ output_prefix = 'out/Release/'
++ output_libprefix = output_prefix
+
+- if 'false' == variables.get('node_shared'):
+- if is_windows:
+- output_file += '.exe'
++ if is_windows:
++ output_bin = 'node.exe'
++ output_lib = 'node.dll'
+ else:
+- if is_windows:
+- output_file += '.dll'
+- else:
+- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
++ output_bin = 'node'
++ output_lib = 'libnode.' + variables.get('shlib_suffix')
+
+- if 'false' == variables.get('node_shared'):
+- action([output_prefix + output_file], 'bin/' + output_file)
+- else:
+- action([output_prefix + output_file], 'lib/' + output_file)
++ action([output_prefix + output_bin], 'bin/' + output_bin)
++ if 'true' == variables.get('node_shared'):
++ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib)
+
+ if 'true' == variables.get('node_use_dtrace'):
+ action(['out/Release/node.d'], 'lib/dtrace/node.d')
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-32212.patch b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-32212.patch
new file mode 100644
index 0000000000..f7b4b61f47
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-32212.patch
@@ -0,0 +1,133 @@
+commit 48c5aa5cab718d04473fa2761d532657c84b8131
+Author: Tobias Nießen <tniessen@tnie.de>
+Date: Fri May 27 21:18:49 2022 +0000
+
+ src: fix IPv4 validation in inspector_socket
+
+ Co-authored-by: RafaelGSS <rafael.nunu@hotmail.com>
+ PR-URL: https://github.com/nodejs-private/node-private/pull/320
+ Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/325
+ Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
+ Reviewed-By: RafaelGSS <rafael.nunu@hotmail.com>
+ CVE-ID: CVE-2022-32212
+
+CVE: CVE-2022-32212
+Upstream-Status: Backport [https://sources.debian.org/src/nodejs/12.22.12~dfsg-1~deb11u3/debian/patches/cve-2022-32212.patch]
+Comment: No hunks refreshed
+Signed-off-by: Poonam Jadhav <Poonam.Jadhav@kpit.com>
+
+Index: nodejs-12.22.12~dfsg/src/inspector_socket.cc
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/src/inspector_socket.cc
++++ nodejs-12.22.12~dfsg/src/inspector_socket.cc
+@@ -168,14 +168,22 @@ static std::string TrimPort(const std::s
+ static bool IsIPAddress(const std::string& host) {
+ if (host.length() >= 4 && host.front() == '[' && host.back() == ']')
+ return true;
+- int quads = 0;
++ uint_fast16_t accum = 0;
++ uint_fast8_t quads = 0;
++ bool empty = true;
++ auto endOctet = [&accum, &quads, &empty](bool final = false) {
++ return !empty && accum <= 0xff && ++quads <= 4 && final == (quads == 4) &&
++ (empty = true) && !(accum = 0);
++ };
+ for (char c : host) {
+- if (c == '.')
+- quads++;
+- else if (!isdigit(c))
++ if (isdigit(c)) {
++ if ((accum = (accum * 10) + (c - '0')) > 0xff) return false;
++ empty = false;
++ } else if (c != '.' || !endOctet()) {
+ return false;
++ }
+ }
+- return quads == 3;
++ return endOctet(true);
+ }
+
+ // Constants for hybi-10 frame format.
+Index: nodejs-12.22.12~dfsg/test/cctest/test_inspector_socket.cc
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/test/cctest/test_inspector_socket.cc
++++ nodejs-12.22.12~dfsg/test/cctest/test_inspector_socket.cc
+@@ -851,4 +851,78 @@ TEST_F(InspectorSocketTest, HostCheckedF
+ expect_failure_no_delegate(UPGRADE_REQUEST);
+ }
+
++TEST_F(InspectorSocketTest, HostIPChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 10.0.2.555:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostNegativeIPChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 10.0.-23.255:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpOctetOutOfIntRangeChecked) {
++ const std::string INVALID_HOST_IP_REQUEST =
++ "GET /json HTTP/1.1\r\n"
++ "Host: 127.0.0.4294967296:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpOctetFarOutOfIntRangeChecked) {
++ const std::string INVALID_HOST_IP_REQUEST =
++ "GET /json HTTP/1.1\r\n"
++ "Host: 127.0.0.18446744073709552000:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpEmptyOctetStartChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: .0.0.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpEmptyOctetMidChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 127..0.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpEmptyOctetEndChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 127.0.0.:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpTooFewOctetsChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 127.0.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpTooManyOctetsChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 127.0.0.0.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
+ } // anonymous namespace
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-35255.patch b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-35255.patch
new file mode 100644
index 0000000000..e9c2e7404a
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-35255.patch
@@ -0,0 +1,237 @@
+Origin: https://github.com/nodejs/node/commit/0c2a5723beff39d1f62daec96b5389da3d427e79
+Reviewed-by: Aron Xu <aron@debian.org>
+Last-Update: 2022-01-05
+Comment:
+ Although WebCrypto is not implemented in 12.x series, this fix is introducing
+ enhancment to the crypto setup of V8:EntropySource().
+
+commit 0c2a5723beff39d1f62daec96b5389da3d427e79
+Author: Ben Noordhuis <info@bnoordhuis.nl>
+Date: Sun Sep 11 10:48:34 2022 +0200
+
+ crypto: fix weak randomness in WebCrypto keygen
+
+ Commit dae283d96f from August 2020 introduced a call to EntropySource()
+ in SecretKeyGenTraits::DoKeyGen() in src/crypto/crypto_keygen.cc. There
+ are two problems with that:
+
+ 1. It does not check the return value, it assumes EntropySource() always
+ succeeds, but it can (and sometimes will) fail.
+
+ 2. The random data returned byEntropySource() may not be
+ cryptographically strong and therefore not suitable as keying
+ material.
+
+ An example is a freshly booted system or a system without /dev/random or
+ getrandom(2).
+
+ EntropySource() calls out to openssl's RAND_poll() and RAND_bytes() in a
+ best-effort attempt to obtain random data. OpenSSL has a built-in CSPRNG
+ but that can fail to initialize, in which case it's possible either:
+
+ 1. No random data gets written to the output buffer, i.e., the output is
+ unmodified, or
+
+ 2. Weak random data is written. It's theoretically possible for the
+ output to be fully predictable because the CSPRNG starts from a
+ predictable state.
+
+ Replace EntropySource() and CheckEntropy() with new function CSPRNG()
+ that enforces checking of the return value. Abort on startup when the
+ entropy pool fails to initialize because that makes it too easy to
+ compromise the security of the process.
+
+ Refs: https://hackerone.com/bugs?report_id=1690000
+ Refs: https://github.com/nodejs/node/pull/35093
+
+ Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
+ Reviewed-By: Tobias Nießen <tniessen@tnie.de>
+ PR-URL: #346
+ Backport-PR-URL: #351
+ CVE-ID: CVE-2022-35255
+
+CVE: CVE-2022-35255
+Upstream-Status: Backport [https://sources.debian.org/src/nodejs/12.22.12~dfsg-1~deb11u3/debian/patches/cve-2022-35255.patch]
+Comment: No hunks refreshed
+Signed-off-by: Poonam Jadhav <Poonam.Jadhav@kpit.com>
+
+Index: nodejs-12.22.12~dfsg/node.gyp
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/node.gyp
++++ nodejs-12.22.12~dfsg/node.gyp
+@@ -743,6 +743,8 @@
+ 'openssl_default_cipher_list%': '',
+ },
+
++ 'cflags': ['-Werror=unused-result'],
++
+ 'defines': [
+ 'NODE_ARCH="<(target_arch)"',
+ 'NODE_PLATFORM="<(OS)"',
+Index: nodejs-12.22.12~dfsg/src/node_crypto.cc
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/src/node_crypto.cc
++++ nodejs-12.22.12~dfsg/src/node_crypto.cc
+@@ -386,48 +386,14 @@ void ThrowCryptoError(Environment* env,
+ env->isolate()->ThrowException(exception);
+ }
+
++MUST_USE_RESULT CSPRNGResult CSPRNG(void* buffer, size_t length) {
++ do {
++ if (1 == RAND_status())
++ if (1 == RAND_bytes(static_cast<unsigned char*>(buffer), length))
++ return {true};
++ } while (1 == RAND_poll());
+
+-// Ensure that OpenSSL has enough entropy (at least 256 bits) for its PRNG.
+-// The entropy pool starts out empty and needs to fill up before the PRNG
+-// can be used securely. Once the pool is filled, it never dries up again;
+-// its contents is stirred and reused when necessary.
+-//
+-// OpenSSL normally fills the pool automatically but not when someone starts
+-// generating random numbers before the pool is full: in that case OpenSSL
+-// keeps lowering the entropy estimate to thwart attackers trying to guess
+-// the initial state of the PRNG.
+-//
+-// When that happens, we will have to wait until enough entropy is available.
+-// That should normally never take longer than a few milliseconds.
+-//
+-// OpenSSL draws from /dev/random and /dev/urandom. While /dev/random may
+-// block pending "true" randomness, /dev/urandom is a CSPRNG that doesn't
+-// block under normal circumstances.
+-//
+-// The only time when /dev/urandom may conceivably block is right after boot,
+-// when the whole system is still low on entropy. That's not something we can
+-// do anything about.
+-inline void CheckEntropy() {
+- for (;;) {
+- int status = RAND_status();
+- CHECK_GE(status, 0); // Cannot fail.
+- if (status != 0)
+- break;
+-
+- // Give up, RAND_poll() not supported.
+- if (RAND_poll() == 0)
+- break;
+- }
+-}
+-
+-
+-bool EntropySource(unsigned char* buffer, size_t length) {
+- // Ensure that OpenSSL's PRNG is properly seeded.
+- CheckEntropy();
+- // RAND_bytes() can return 0 to indicate that the entropy data is not truly
+- // random. That's okay, it's still better than V8's stock source of entropy,
+- // which is /dev/urandom on UNIX platforms and the current time on Windows.
+- return RAND_bytes(buffer, length) != -1;
++ return {false};
+ }
+
+ void SecureContext::Initialize(Environment* env, Local<Object> target) {
+@@ -649,9 +615,9 @@ void SecureContext::Init(const FunctionC
+ // OpenSSL 1.1.0 changed the ticket key size, but the OpenSSL 1.0.x size was
+ // exposed in the public API. To retain compatibility, install a callback
+ // which restores the old algorithm.
+- if (RAND_bytes(sc->ticket_key_name_, sizeof(sc->ticket_key_name_)) <= 0 ||
+- RAND_bytes(sc->ticket_key_hmac_, sizeof(sc->ticket_key_hmac_)) <= 0 ||
+- RAND_bytes(sc->ticket_key_aes_, sizeof(sc->ticket_key_aes_)) <= 0) {
++ if (CSPRNG(sc->ticket_key_name_, sizeof(sc->ticket_key_name_)).is_err() ||
++ CSPRNG(sc->ticket_key_hmac_, sizeof(sc->ticket_key_hmac_)).is_err() ||
++ CSPRNG(sc->ticket_key_aes_, sizeof(sc->ticket_key_aes_)).is_err()) {
+ return env->ThrowError("Error generating ticket keys");
+ }
+ SSL_CTX_set_tlsext_ticket_key_cb(sc->ctx_.get(), TicketCompatibilityCallback);
+@@ -1643,7 +1609,7 @@ int SecureContext::TicketCompatibilityCa
+
+ if (enc) {
+ memcpy(name, sc->ticket_key_name_, sizeof(sc->ticket_key_name_));
+- if (RAND_bytes(iv, 16) <= 0 ||
++ if (CSPRNG(iv, 16).is_err() ||
+ EVP_EncryptInit_ex(ectx, EVP_aes_128_cbc(), nullptr,
+ sc->ticket_key_aes_, iv) <= 0 ||
+ HMAC_Init_ex(hctx, sc->ticket_key_hmac_, sizeof(sc->ticket_key_hmac_),
+@@ -5867,8 +5833,7 @@ struct RandomBytesJob : public CryptoJob
+ : CryptoJob(env), rc(Nothing<int>()) {}
+
+ inline void DoThreadPoolWork() override {
+- CheckEntropy(); // Ensure that OpenSSL's PRNG is properly seeded.
+- rc = Just(RAND_bytes(data, size));
++ rc = Just(int(CSPRNG(data, size).is_ok()));
+ if (0 == rc.FromJust()) errors.Capture();
+ }
+
+@@ -6318,8 +6283,8 @@ class GenerateKeyPairJob : public Crypto
+ }
+
+ inline bool GenerateKey() {
+- // Make sure that the CSPRNG is properly seeded so the results are secure.
+- CheckEntropy();
++ // Make sure that the CSPRNG is properly seeded.
++ CHECK(CSPRNG(nullptr, 0).is_ok());
+
+ // Create the key generation context.
+ EVPKeyCtxPointer ctx = config_->Setup();
+Index: nodejs-12.22.12~dfsg/src/node_crypto.h
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/src/node_crypto.h
++++ nodejs-12.22.12~dfsg/src/node_crypto.h
+@@ -840,7 +840,19 @@ class ECDH final : public BaseObject {
+ const EC_GROUP* group_;
+ };
+
+-bool EntropySource(unsigned char* buffer, size_t length);
++struct CSPRNGResult {
++ const bool ok;
++ MUST_USE_RESULT bool is_ok() const { return ok; }
++ MUST_USE_RESULT bool is_err() const { return !ok; }
++};
++
++// Either succeeds with exactly |length| bytes of cryptographically
++// strong pseudo-random data, or fails. This function may block.
++// Don't assume anything about the contents of |buffer| on error.
++// As a special case, |length == 0| can be used to check if the CSPRNG
++// is properly seeded without consuming entropy.
++MUST_USE_RESULT CSPRNGResult CSPRNG(void* buffer, size_t length);
++
+ #ifndef OPENSSL_NO_ENGINE
+ void SetEngine(const v8::FunctionCallbackInfo<v8::Value>& args);
+ #endif // !OPENSSL_NO_ENGINE
+Index: nodejs-12.22.12~dfsg/src/inspector_io.cc
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/src/inspector_io.cc
++++ nodejs-12.22.12~dfsg/src/inspector_io.cc
+@@ -46,8 +46,7 @@ std::string ScriptPath(uv_loop_t* loop,
+ // Used ver 4 - with numbers
+ std::string GenerateID() {
+ uint16_t buffer[8];
+- CHECK(crypto::EntropySource(reinterpret_cast<unsigned char*>(buffer),
+- sizeof(buffer)));
++ CHECK(crypto::CSPRNG(buffer, sizeof(buffer)).is_ok());
+
+ char uuid[256];
+ snprintf(uuid, sizeof(uuid), "%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+Index: nodejs-12.22.12~dfsg/src/node.cc
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/src/node.cc
++++ nodejs-12.22.12~dfsg/src/node.cc
+@@ -969,9 +969,17 @@ InitializationResult InitializeOncePerPr
+ // the random source is properly initialized first.
+ OPENSSL_init();
+ #endif // NODE_FIPS_MODE
+- // V8 on Windows doesn't have a good source of entropy. Seed it from
+- // OpenSSL's pool.
+- V8::SetEntropySource(crypto::EntropySource);
++ // Ensure CSPRNG is properly seeded.
++ CHECK(crypto::CSPRNG(nullptr, 0).is_ok());
++
++ V8::SetEntropySource([](unsigned char* buffer, size_t length) {
++ // V8 falls back to very weak entropy when this function fails
++ // and /dev/urandom isn't available. That wouldn't be so bad if
++ // the entropy was only used for Math.random() but it's also used for
++ // hash table and address space layout randomization. Better to abort.
++ CHECK(crypto::CSPRNG(buffer, length).is_ok());
++ return true;
++ });
+ #endif // HAVE_OPENSSL
+
+ per_process::v8_platform.Initialize(
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-43548.patch b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-43548.patch
new file mode 100644
index 0000000000..54da1fba99
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-2022-43548.patch
@@ -0,0 +1,214 @@
+commit 2b433af094fb79cf80f086038b7f36342cb6826f
+Author: Tobias Nießen <tniessen@tnie.de>
+Date: Sun Sep 25 12:34:05 2022 +0000
+
+ inspector: harden IP address validation again
+
+ Use inet_pton() to parse IP addresses, which restricts IP addresses
+ to a small number of well-defined formats. In particular, octal and
+ hexadecimal number formats are not allowed, and neither are leading
+ zeros. Also explicitly reject 0.0.0.0/8 and ::/128 as non-routable.
+
+ Refs: https://hackerone.com/reports/1710652
+ CVE-ID: CVE-2022-43548
+ PR-URL: https://github.com/nodejs-private/node-private/pull/354
+ Reviewed-by: Michael Dawson <midawson@redhat.com>
+ Reviewed-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
+ Reviewed-by: Rich Trott <rtrott@gmail.com>
+
+CVE: CVE-2022-43548
+Upstream-Status: Backport [https://sources.debian.org/src/nodejs/12.22.12~dfsg-1~deb11u3/debian/patches/cve-2022-43548.patch]
+Comment: No hunks refreshed
+Signed-off-by: Poonam Jadhav <Poonam.Jadhav@kpit.com>
+
+Index: nodejs-12.22.12~dfsg/src/inspector_socket.cc
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/src/inspector_socket.cc
++++ nodejs-12.22.12~dfsg/src/inspector_socket.cc
+@@ -10,6 +10,7 @@
+
+ #include "openssl/sha.h" // Sha-1 hash
+
++#include <algorithm>
+ #include <cstring>
+ #include <map>
+
+@@ -166,25 +167,71 @@ static std::string TrimPort(const std::s
+ }
+
+ static bool IsIPAddress(const std::string& host) {
+- if (host.length() >= 4 && host.front() == '[' && host.back() == ']')
++ // TODO(tniessen): add CVEs to the following bullet points
++ // To avoid DNS rebinding attacks, we are aware of the following requirements:
++ // * the host name must be an IP address,
++ // * the IP address must be routable, and
++ // * the IP address must be formatted unambiguously.
++
++ // The logic below assumes that the string is null-terminated, so ensure that
++ // we did not somehow end up with null characters within the string.
++ if (host.find('\0') != std::string::npos) return false;
++
++ // All IPv6 addresses must be enclosed in square brackets, and anything
++ // enclosed in square brackets must be an IPv6 address.
++ if (host.length() >= 4 && host.front() == '[' && host.back() == ']') {
++ // INET6_ADDRSTRLEN is the maximum length of the dual format (including the
++ // terminating null character), which is the longest possible representation
++ // of an IPv6 address: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:ddd.ddd.ddd.ddd
++ if (host.length() - 2 >= INET6_ADDRSTRLEN) return false;
++
++ // Annoyingly, libuv's implementation of inet_pton() deviates from other
++ // implementations of the function in that it allows '%' in IPv6 addresses.
++ if (host.find('%') != std::string::npos) return false;
++
++ // Parse the IPv6 address to ensure it is syntactically valid.
++ char ipv6_str[INET6_ADDRSTRLEN];
++ std::copy(host.begin() + 1, host.end() - 1, ipv6_str);
++ ipv6_str[host.length()] = '\0';
++ unsigned char ipv6[sizeof(struct in6_addr)];
++ if (uv_inet_pton(AF_INET6, ipv6_str, ipv6) != 0) return false;
++
++ // The only non-routable IPv6 address is ::/128. It should not be necessary
++ // to explicitly reject it because it will still be enclosed in square
++ // brackets and not even macOS should make DNS requests in that case, but
++ // history has taught us that we cannot be careful enough.
++ // Note that RFC 4291 defines both "IPv4-Compatible IPv6 Addresses" and
++ // "IPv4-Mapped IPv6 Addresses", which means that there are IPv6 addresses
++ // (other than ::/128) that represent non-routable IPv4 addresses. However,
++ // this translation assumes that the host is interpreted as an IPv6 address
++ // in the first place, at which point DNS rebinding should not be an issue.
++ if (std::all_of(ipv6, ipv6 + sizeof(ipv6), [](auto b) { return b == 0; })) {
++ return false;
++ }
++
++ // It is a syntactically valid and routable IPv6 address enclosed in square
++ // brackets. No client should be able to misinterpret this.
+ return true;
+- uint_fast16_t accum = 0;
+- uint_fast8_t quads = 0;
+- bool empty = true;
+- auto endOctet = [&accum, &quads, &empty](bool final = false) {
+- return !empty && accum <= 0xff && ++quads <= 4 && final == (quads == 4) &&
+- (empty = true) && !(accum = 0);
+- };
+- for (char c : host) {
+- if (isdigit(c)) {
+- if ((accum = (accum * 10) + (c - '0')) > 0xff) return false;
+- empty = false;
+- } else if (c != '.' || !endOctet()) {
+- return false;
+- }
+- }
+- return endOctet(true);
+-}
++ }
++
++ // Anything not enclosed in square brackets must be an IPv4 address. It is
++ // important here that inet_pton() accepts only the so-called dotted-decimal
++ // notation, which is a strict subset of the so-called numbers-and-dots
++ // notation that is allowed by inet_aton() and inet_addr(). This subset does
++ // not allow hexadecimal or octal number formats.
++ unsigned char ipv4[sizeof(struct in_addr)];
++ if (uv_inet_pton(AF_INET, host.c_str(), ipv4) != 0) return false;
++
++ // The only strictly non-routable IPv4 address is 0.0.0.0, and macOS will make
++ // DNS requests for this IP address, so we need to explicitly reject it. In
++ // fact, we can safely reject all of 0.0.0.0/8 (see Section 3.2 of RFC 791 and
++ // Section 3.2.1.3 of RFC 1122).
++ // Note that inet_pton() stores the IPv4 address in network byte order.
++ if (ipv4[0] == 0) return false;
++
++ // It is a routable IPv4 address in dotted-decimal notation.
++ return true;
++ }
+
+ // Constants for hybi-10 frame format.
+
+Index: nodejs-12.22.12~dfsg/test/cctest/test_inspector_socket.cc
+===================================================================
+--- nodejs-12.22.12~dfsg.orig/test/cctest/test_inspector_socket.cc
++++ nodejs-12.22.12~dfsg/test/cctest/test_inspector_socket.cc
+@@ -925,4 +925,84 @@ TEST_F(InspectorSocketTest, HostIpTooMan
+ expect_handshake_failure();
+ }
+
++TEST_F(InspectorSocketTest, HostIpInvalidOctalOctetStartChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 08.1.1.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpInvalidOctalOctetMidChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 1.09.1.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpInvalidOctalOctetEndChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 1.1.1.009:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpLeadingZeroStartChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 01.1.1.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpLeadingZeroMidChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 1.1.001.1:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIpLeadingZeroEndChecked) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: 1.1.1.01:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIPv6NonRoutable) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: [::]:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIPv6NonRoutableDual) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: [::0.0.0.0]:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIPv4InSquareBrackets) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: [127.0.0.1]:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
++TEST_F(InspectorSocketTest, HostIPv6InvalidAbbreviation) {
++ const std::string INVALID_HOST_IP_REQUEST = "GET /json HTTP/1.1\r\n"
++ "Host: [:::1]:9229\r\n\r\n";
++ send_in_chunks(INVALID_HOST_IP_REQUEST.c_str(),
++ INVALID_HOST_IP_REQUEST.length());
++ expect_handshake_failure();
++}
++
+ } // anonymous namespace
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/CVE-llhttp.patch b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-llhttp.patch
new file mode 100644
index 0000000000..790cf92d2e
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/CVE-llhttp.patch
@@ -0,0 +1,4348 @@
+Reviewed-by: Aron Xu <aron@debian.org>
+Last-Update: 2023-01-05
+Comment:
+ This patch updates the embeded copy of llhttp from version 2.1.4 to 2.1.6,
+ which is upstream's actual fix for CVE-2022-32213, CVE-2022-32214, CVE-2022-32215,
+ CVE-2022-35256.
+ Test cases are ported to use mustCall() to replace the later introduced
+ mustSucceed(), to avoid pulling in too many dependent new test codes.
+References:
+ * https://github.com/nodejs/node/commit/da0fda0fe81d372e24c0cb11aec37534985708dd
+ * https://github.com/nodejs/node/commit/a9f1146b8827855e342834458a71f2367346ace0
+
+CVE: CVE-2022-32213 CVE-2022-32214 CVE-2022-32215 CVE-2022-35256
+Upstream-Status: Backport [https://sources.debian.org/src/nodejs/12.22.12~dfsg-1~deb11u3/debian/patches/cve-llhttp.patch]
+Comment: No hunks refreshed
+Signed-off-by: Poonam Jadhav <Poonam.Jadhav@kpit.com>
+
+--- nodejs-12.22.12~dfsg/deps/llhttp/include/llhttp.h
++++ nodejs-12.22.12~dfsg/deps/llhttp/include/llhttp.h
+@@ -3,7 +3,7 @@
+
+ #define LLHTTP_VERSION_MAJOR 2
+ #define LLHTTP_VERSION_MINOR 1
+-#define LLHTTP_VERSION_PATCH 4
++#define LLHTTP_VERSION_PATCH 6
+
+ #ifndef LLHTTP_STRICT_MODE
+ # define LLHTTP_STRICT_MODE 0
+@@ -58,6 +58,7 @@
+ HPE_OK = 0,
+ HPE_INTERNAL = 1,
+ HPE_STRICT = 2,
++ HPE_CR_EXPECTED = 25,
+ HPE_LF_EXPECTED = 3,
+ HPE_UNEXPECTED_CONTENT_LENGTH = 4,
+ HPE_CLOSED_CONNECTION = 5,
+@@ -78,7 +79,7 @@
+ HPE_CB_CHUNK_COMPLETE = 20,
+ HPE_PAUSED = 21,
+ HPE_PAUSED_UPGRADE = 22,
+- HPE_USER = 23
++ HPE_USER = 24
+ };
+ typedef enum llhttp_errno llhttp_errno_t;
+
+@@ -153,6 +154,7 @@
+ XX(0, OK, OK) \
+ XX(1, INTERNAL, INTERNAL) \
+ XX(2, STRICT, STRICT) \
++ XX(25, CR_EXPECTED, CR_EXPECTED) \
+ XX(3, LF_EXPECTED, LF_EXPECTED) \
+ XX(4, UNEXPECTED_CONTENT_LENGTH, UNEXPECTED_CONTENT_LENGTH) \
+ XX(5, CLOSED_CONNECTION, CLOSED_CONNECTION) \
+@@ -173,7 +175,7 @@
+ XX(20, CB_CHUNK_COMPLETE, CB_CHUNK_COMPLETE) \
+ XX(21, PAUSED, PAUSED) \
+ XX(22, PAUSED_UPGRADE, PAUSED_UPGRADE) \
+- XX(23, USER, USER) \
++ XX(24, USER, USER) \
+
+
+ #define HTTP_METHOD_MAP(XX) \
+--- nodejs-12.22.12~dfsg/deps/llhttp/src/llhttp.c
++++ nodejs-12.22.12~dfsg/deps/llhttp/src/llhttp.c
+@@ -325,6 +325,7 @@
+ s_n_llhttp__internal__n_header_value_lws,
+ s_n_llhttp__internal__n_header_value_almost_done,
+ s_n_llhttp__internal__n_header_value_lenient,
++ s_n_llhttp__internal__n_error_25,
+ s_n_llhttp__internal__n_header_value_otherwise,
+ s_n_llhttp__internal__n_header_value_connection_token,
+ s_n_llhttp__internal__n_header_value_connection_ws,
+@@ -332,14 +333,16 @@
+ s_n_llhttp__internal__n_header_value_connection_2,
+ s_n_llhttp__internal__n_header_value_connection_3,
+ s_n_llhttp__internal__n_header_value_connection,
+- s_n_llhttp__internal__n_error_26,
+ s_n_llhttp__internal__n_error_27,
++ s_n_llhttp__internal__n_error_28,
+ s_n_llhttp__internal__n_header_value_content_length_ws,
+ s_n_llhttp__internal__n_header_value_content_length,
+- s_n_llhttp__internal__n_header_value_te_chunked_last,
++ s_n_llhttp__internal__n_error_30,
++ s_n_llhttp__internal__n_error_29,
+ s_n_llhttp__internal__n_header_value_te_token_ows,
+ s_n_llhttp__internal__n_header_value,
+ s_n_llhttp__internal__n_header_value_te_token,
++ s_n_llhttp__internal__n_header_value_te_chunked_last,
+ s_n_llhttp__internal__n_header_value_te_chunked,
+ s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1,
+ s_n_llhttp__internal__n_header_value_discard_ws,
+@@ -734,7 +737,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_2(
++int llhttp__internal__c_update_header_state_3(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -742,7 +745,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_4(
++int llhttp__internal__c_update_header_state_1(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -750,7 +753,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_5(
++int llhttp__internal__c_update_header_state_6(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -758,7 +761,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_6(
++int llhttp__internal__c_update_header_state_7(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -766,7 +769,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_test_flags_6(
++int llhttp__internal__c_test_flags_7(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -807,6 +810,13 @@
+ return 0;
+ }
+
++int llhttp__internal__c_test_flags_8(
++ llhttp__internal_t* state,
++ const unsigned char* p,
++ const unsigned char* endp) {
++ return (state->flags & 8) == 8;
++}
++
+ int llhttp__internal__c_or_flags_16(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+@@ -823,7 +833,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_7(
++int llhttp__internal__c_update_header_state_8(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -831,7 +841,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_or_flags_17(
++int llhttp__internal__c_or_flags_18(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -1554,7 +1564,7 @@
+ goto s_n_llhttp__internal__n_header_value_discard_lws;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_22;
++ goto s_n_llhttp__internal__n_error_23;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -1567,13 +1577,13 @@
+ }
+ switch (*p) {
+ case 9: {
+- goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_3;
+ }
+ case ' ': {
+- goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_3;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_load_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_4;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -1590,7 +1600,7 @@
+ goto s_n_llhttp__internal__n_header_value_lws;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_23;
++ goto s_n_llhttp__internal__n_error_24;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -1603,10 +1613,10 @@
+ }
+ switch (*p) {
+ case 10: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3;
+ }
+ case 13: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4;
+ }
+ default: {
+ p++;
+@@ -1616,20 +1626,27 @@
+ /* UNREACHABLE */;
+ abort();
+ }
++ case s_n_llhttp__internal__n_error_25:
++ s_n_llhttp__internal__n_error_25: {
++ state->error = 0xa;
++ state->reason = "Invalid header value char";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
++ /* UNREACHABLE */;
++ abort();
++ }
+ case s_n_llhttp__internal__n_header_value_otherwise:
+ s_n_llhttp__internal__n_header_value_otherwise: {
+ if (p == endp) {
+ return s_n_llhttp__internal__n_header_value_otherwise;
+ }
+ switch (*p) {
+- case 10: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
+- }
+ case 13: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_test_flags_5;
++ goto s_n_llhttp__internal__n_invoke_test_flags_6;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -1692,10 +1709,10 @@
+ }
+ case ',': {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_load_header_state_4;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_5;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_4;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_5;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -1713,7 +1730,7 @@
+ switch (match_seq.status) {
+ case kMatchComplete: {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_update_header_state_2;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_3;
+ }
+ case kMatchPause: {
+ return s_n_llhttp__internal__n_header_value_connection_1;
+@@ -1737,7 +1754,7 @@
+ switch (match_seq.status) {
+ case kMatchComplete: {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_update_header_state_5;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_6;
+ }
+ case kMatchPause: {
+ return s_n_llhttp__internal__n_header_value_connection_2;
+@@ -1761,7 +1778,7 @@
+ switch (match_seq.status) {
+ case kMatchComplete: {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_update_header_state_6;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_7;
+ }
+ case kMatchPause: {
+ return s_n_llhttp__internal__n_header_value_connection_3;
+@@ -1806,8 +1823,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- case s_n_llhttp__internal__n_error_26:
+- s_n_llhttp__internal__n_error_26: {
++ case s_n_llhttp__internal__n_error_27:
++ s_n_llhttp__internal__n_error_27: {
+ state->error = 0xb;
+ state->reason = "Content-Length overflow";
+ state->error_pos = (const char*) p;
+@@ -1816,8 +1833,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- case s_n_llhttp__internal__n_error_27:
+- s_n_llhttp__internal__n_error_27: {
++ case s_n_llhttp__internal__n_error_28:
++ s_n_llhttp__internal__n_error_28: {
+ state->error = 0xb;
+ state->reason = "Invalid character in Content-Length";
+ state->error_pos = (const char*) p;
+@@ -1843,7 +1860,7 @@
+ goto s_n_llhttp__internal__n_header_value_content_length_ws;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -1912,26 +1929,23 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- case s_n_llhttp__internal__n_header_value_te_chunked_last:
+- s_n_llhttp__internal__n_header_value_te_chunked_last: {
+- if (p == endp) {
+- return s_n_llhttp__internal__n_header_value_te_chunked_last;
+- }
+- switch (*p) {
+- case 10: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_7;
+- }
+- case 13: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_7;
+- }
+- case ' ': {
+- p++;
+- goto s_n_llhttp__internal__n_header_value_te_chunked_last;
+- }
+- default: {
+- goto s_n_llhttp__internal__n_header_value_te_chunked;
+- }
+- }
++ case s_n_llhttp__internal__n_error_30:
++ s_n_llhttp__internal__n_error_30: {
++ state->error = 0xf;
++ state->reason = "Invalid `Transfer-Encoding` header value";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
++ /* UNREACHABLE */;
++ abort();
++ }
++ case s_n_llhttp__internal__n_error_29:
++ s_n_llhttp__internal__n_error_29: {
++ state->error = 0xf;
++ state->reason = "Invalid `Transfer-Encoding` header value";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
+ /* UNREACHABLE */;
+ abort();
+ }
+@@ -2048,8 +2062,34 @@
+ goto s_n_llhttp__internal__n_header_value_te_token_ows;
+ }
+ default: {
++ goto s_n_llhttp__internal__n_invoke_update_header_state_9;
++ }
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ case s_n_llhttp__internal__n_header_value_te_chunked_last:
++ s_n_llhttp__internal__n_header_value_te_chunked_last: {
++ if (p == endp) {
++ return s_n_llhttp__internal__n_header_value_te_chunked_last;
++ }
++ switch (*p) {
++ case 10: {
++ goto s_n_llhttp__internal__n_invoke_update_header_state_8;
++ }
++ case 13: {
+ goto s_n_llhttp__internal__n_invoke_update_header_state_8;
+ }
++ case ' ': {
++ p++;
++ goto s_n_llhttp__internal__n_header_value_te_chunked_last;
++ }
++ case ',': {
++ goto s_n_llhttp__internal__n_invoke_load_type_1;
++ }
++ default: {
++ goto s_n_llhttp__internal__n_header_value_te_token;
++ }
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -2101,7 +2141,7 @@
+ }
+ case 10: {
+ p++;
+- goto s_n_llhttp__internal__n_header_value_discard_lws;
++ goto s_n_llhttp__internal__n_invoke_test_flags_5;
+ }
+ case 13: {
+ p++;
+@@ -2128,7 +2168,7 @@
+ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_28;
++ goto s_n_llhttp__internal__n_error_31;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2218,7 +2258,7 @@
+ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_9;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_10;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2243,7 +2283,7 @@
+ return s_n_llhttp__internal__n_header_field_3;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2268,7 +2308,7 @@
+ return s_n_llhttp__internal__n_header_field_4;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2289,7 +2329,7 @@
+ goto s_n_llhttp__internal__n_header_field_4;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2313,7 +2353,7 @@
+ return s_n_llhttp__internal__n_header_field_1;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2338,7 +2378,7 @@
+ return s_n_llhttp__internal__n_header_field_5;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2363,7 +2403,7 @@
+ return s_n_llhttp__internal__n_header_field_6;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2388,7 +2428,7 @@
+ return s_n_llhttp__internal__n_header_field_7;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2417,7 +2457,7 @@
+ goto s_n_llhttp__internal__n_header_field_7;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2508,7 +2548,7 @@
+ goto s_n_llhttp__internal__n_url_to_http_09;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_29;
++ goto s_n_llhttp__internal__n_error_32;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2533,7 +2573,7 @@
+ goto s_n_llhttp__internal__n_url_skip_lf_to_http09_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_29;
++ goto s_n_llhttp__internal__n_error_32;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2550,7 +2590,7 @@
+ goto s_n_llhttp__internal__n_header_field_start;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_30;
++ goto s_n_llhttp__internal__n_error_33;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2571,7 +2611,7 @@
+ goto s_n_llhttp__internal__n_req_http_end_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_30;
++ goto s_n_llhttp__internal__n_error_33;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2634,7 +2674,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_minor;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_31;
++ goto s_n_llhttp__internal__n_error_34;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2651,7 +2691,7 @@
+ goto s_n_llhttp__internal__n_req_http_minor;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_32;
++ goto s_n_llhttp__internal__n_error_35;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2714,7 +2754,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_major;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_33;
++ goto s_n_llhttp__internal__n_error_36;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2738,7 +2778,7 @@
+ return s_n_llhttp__internal__n_req_http_start_1;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_35;
++ goto s_n_llhttp__internal__n_error_38;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2762,7 +2802,7 @@
+ return s_n_llhttp__internal__n_req_http_start_2;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_35;
++ goto s_n_llhttp__internal__n_error_38;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2787,7 +2827,7 @@
+ goto s_n_llhttp__internal__n_req_http_start_2;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_35;
++ goto s_n_llhttp__internal__n_error_38;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2878,7 +2918,7 @@
+ goto s_n_llhttp__internal__n_url_fragment;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_36;
++ goto s_n_llhttp__internal__n_error_39;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2939,7 +2979,7 @@
+ goto s_n_llhttp__internal__n_span_end_stub_query_3;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_37;
++ goto s_n_llhttp__internal__n_error_40;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -2977,7 +3017,7 @@
+ goto s_n_llhttp__internal__n_url_query;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_38;
++ goto s_n_llhttp__internal__n_error_41;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3102,10 +3142,10 @@
+ }
+ case 8: {
+ p++;
+- goto s_n_llhttp__internal__n_error_39;
++ goto s_n_llhttp__internal__n_error_42;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_40;
++ goto s_n_llhttp__internal__n_error_43;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3164,7 +3204,7 @@
+ goto s_n_llhttp__internal__n_url_server_with_at;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_41;
++ goto s_n_llhttp__internal__n_error_44;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3181,7 +3221,7 @@
+ goto s_n_llhttp__internal__n_url_server;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_43;
++ goto s_n_llhttp__internal__n_error_46;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3199,7 +3239,7 @@
+ }
+ case 10: {
+ p++;
+- goto s_n_llhttp__internal__n_error_42;
++ goto s_n_llhttp__internal__n_error_45;
+ }
+ case 12: {
+ p++;
+@@ -3207,18 +3247,18 @@
+ }
+ case 13: {
+ p++;
+- goto s_n_llhttp__internal__n_error_42;
++ goto s_n_llhttp__internal__n_error_45;
+ }
+ case ' ': {
+ p++;
+- goto s_n_llhttp__internal__n_error_42;
++ goto s_n_llhttp__internal__n_error_45;
+ }
+ case '/': {
+ p++;
+ goto s_n_llhttp__internal__n_url_schema_delim_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_43;
++ goto s_n_llhttp__internal__n_error_46;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3264,7 +3304,7 @@
+ }
+ case 2: {
+ p++;
+- goto s_n_llhttp__internal__n_error_42;
++ goto s_n_llhttp__internal__n_error_45;
+ }
+ case 3: {
+ goto s_n_llhttp__internal__n_span_end_stub_schema;
+@@ -3274,7 +3314,7 @@
+ goto s_n_llhttp__internal__n_url_schema;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_44;
++ goto s_n_llhttp__internal__n_error_47;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3310,7 +3350,7 @@
+ }
+ case 2: {
+ p++;
+- goto s_n_llhttp__internal__n_error_42;
++ goto s_n_llhttp__internal__n_error_45;
+ }
+ case 3: {
+ goto s_n_llhttp__internal__n_span_start_stub_path_2;
+@@ -3319,7 +3359,7 @@
+ goto s_n_llhttp__internal__n_url_schema;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_45;
++ goto s_n_llhttp__internal__n_error_48;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3417,7 +3457,7 @@
+ goto s_n_llhttp__internal__n_req_spaces_before_url;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_46;
++ goto s_n_llhttp__internal__n_error_49;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3442,7 +3482,7 @@
+ return s_n_llhttp__internal__n_start_req_1;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3467,7 +3507,7 @@
+ return s_n_llhttp__internal__n_start_req_2;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3492,7 +3532,7 @@
+ return s_n_llhttp__internal__n_start_req_4;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3517,7 +3557,7 @@
+ return s_n_llhttp__internal__n_start_req_6;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3535,7 +3575,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3556,7 +3596,7 @@
+ goto s_n_llhttp__internal__n_start_req_7;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3577,7 +3617,7 @@
+ goto s_n_llhttp__internal__n_start_req_5;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3602,7 +3642,7 @@
+ return s_n_llhttp__internal__n_start_req_8;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3627,7 +3667,7 @@
+ return s_n_llhttp__internal__n_start_req_9;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3652,7 +3692,7 @@
+ return s_n_llhttp__internal__n_start_req_10;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3677,7 +3717,7 @@
+ return s_n_llhttp__internal__n_start_req_12;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3702,7 +3742,7 @@
+ return s_n_llhttp__internal__n_start_req_13;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3723,7 +3763,7 @@
+ goto s_n_llhttp__internal__n_start_req_13;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3748,7 +3788,7 @@
+ return s_n_llhttp__internal__n_start_req_15;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3773,7 +3813,7 @@
+ return s_n_llhttp__internal__n_start_req_16;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3798,7 +3838,7 @@
+ return s_n_llhttp__internal__n_start_req_18;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3823,7 +3863,7 @@
+ return s_n_llhttp__internal__n_start_req_20;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3841,7 +3881,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3862,7 +3902,7 @@
+ goto s_n_llhttp__internal__n_start_req_21;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3883,7 +3923,7 @@
+ goto s_n_llhttp__internal__n_start_req_19;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3908,7 +3948,7 @@
+ return s_n_llhttp__internal__n_start_req_22;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3937,7 +3977,7 @@
+ goto s_n_llhttp__internal__n_start_req_22;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3962,7 +4002,7 @@
+ return s_n_llhttp__internal__n_start_req_23;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -3987,7 +4027,7 @@
+ return s_n_llhttp__internal__n_start_req_24;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4012,7 +4052,7 @@
+ return s_n_llhttp__internal__n_start_req_26;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4037,7 +4077,7 @@
+ return s_n_llhttp__internal__n_start_req_27;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4062,7 +4102,7 @@
+ return s_n_llhttp__internal__n_start_req_31;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4087,7 +4127,7 @@
+ return s_n_llhttp__internal__n_start_req_32;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4108,7 +4148,7 @@
+ goto s_n_llhttp__internal__n_start_req_32;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4125,7 +4165,7 @@
+ goto s_n_llhttp__internal__n_start_req_30;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4147,7 +4187,7 @@
+ goto s_n_llhttp__internal__n_start_req_29;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4172,7 +4212,7 @@
+ return s_n_llhttp__internal__n_start_req_34;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4194,7 +4234,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4223,7 +4263,7 @@
+ goto s_n_llhttp__internal__n_start_req_33;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4248,7 +4288,7 @@
+ return s_n_llhttp__internal__n_start_req_37;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4273,7 +4313,7 @@
+ return s_n_llhttp__internal__n_start_req_38;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4294,7 +4334,7 @@
+ goto s_n_llhttp__internal__n_start_req_38;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4311,7 +4351,7 @@
+ goto s_n_llhttp__internal__n_start_req_36;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4336,7 +4376,7 @@
+ return s_n_llhttp__internal__n_start_req_40;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4361,7 +4401,7 @@
+ return s_n_llhttp__internal__n_start_req_41;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4386,7 +4426,7 @@
+ return s_n_llhttp__internal__n_start_req_42;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4411,7 +4451,7 @@
+ goto s_n_llhttp__internal__n_start_req_42;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4436,7 +4476,7 @@
+ return s_n_llhttp__internal__n_start_req_43;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4461,7 +4501,7 @@
+ return s_n_llhttp__internal__n_start_req_46;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4486,7 +4526,7 @@
+ return s_n_llhttp__internal__n_start_req_48;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4511,7 +4551,7 @@
+ return s_n_llhttp__internal__n_start_req_49;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4532,7 +4572,7 @@
+ goto s_n_llhttp__internal__n_start_req_49;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4557,7 +4597,7 @@
+ return s_n_llhttp__internal__n_start_req_50;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4582,7 +4622,7 @@
+ goto s_n_llhttp__internal__n_start_req_50;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4599,7 +4639,7 @@
+ goto s_n_llhttp__internal__n_start_req_45;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4672,7 +4712,7 @@
+ goto s_n_llhttp__internal__n_start_req_44;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_55;
++ goto s_n_llhttp__internal__n_error_58;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4689,7 +4729,7 @@
+ goto s_n_llhttp__internal__n_header_field_start;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4764,7 +4804,7 @@
+ goto s_n_llhttp__internal__n_res_status_start;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_49;
++ goto s_n_llhttp__internal__n_error_52;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4844,7 +4884,7 @@
+ goto s_n_llhttp__internal__n_invoke_update_status_code;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_50;
++ goto s_n_llhttp__internal__n_error_53;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4907,7 +4947,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_51;
++ goto s_n_llhttp__internal__n_error_54;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4924,7 +4964,7 @@
+ goto s_n_llhttp__internal__n_res_http_minor;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_52;
++ goto s_n_llhttp__internal__n_error_55;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -4987,7 +5027,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_major_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_53;
++ goto s_n_llhttp__internal__n_error_56;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -5011,7 +5051,7 @@
+ return s_n_llhttp__internal__n_start_res;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_56;
++ goto s_n_llhttp__internal__n_error_59;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -5036,7 +5076,7 @@
+ return s_n_llhttp__internal__n_req_or_res_method_2;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_54;
++ goto s_n_llhttp__internal__n_error_57;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -5060,7 +5100,7 @@
+ return s_n_llhttp__internal__n_req_or_res_method_3;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_54;
++ goto s_n_llhttp__internal__n_error_57;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -5081,7 +5121,7 @@
+ goto s_n_llhttp__internal__n_req_or_res_method_3;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_54;
++ goto s_n_llhttp__internal__n_error_57;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -5098,7 +5138,7 @@
+ goto s_n_llhttp__internal__n_req_or_res_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_54;
++ goto s_n_llhttp__internal__n_error_57;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -5167,7 +5207,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_42: {
++ s_n_llhttp__internal__n_error_45: {
+ state->error = 0x7;
+ state->reason = "Invalid characters in url";
+ state->error_pos = (const char*) p;
+@@ -5655,7 +5695,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_21: {
++ s_n_llhttp__internal__n_error_22: {
+ state->error = 0xb;
+ state->reason = "Empty Content-Length";
+ state->error_pos = (const char*) p;
+@@ -5740,14 +5780,33 @@
+ s_n_llhttp__internal__n_invoke_load_header_state: {
+ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
+ case 2:
+- goto s_n_llhttp__internal__n_error_21;
++ goto s_n_llhttp__internal__n_error_22;
+ default:
+ goto s_n_llhttp__internal__n_invoke_load_header_state_1;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_22: {
++ s_n_llhttp__internal__n_error_21: {
++ state->error = 0xa;
++ state->reason = "Invalid header value char";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_test_flags_5: {
++ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_header_value_discard_lws;
++ default:
++ goto s_n_llhttp__internal__n_error_21;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_error_23: {
+ state->error = 0x2;
+ state->reason = "Expected LF after CR";
+ state->error_pos = (const char*) p;
+@@ -5757,6 +5816,24 @@
+ abort();
+ }
+ s_n_llhttp__internal__n_invoke_update_header_state_1: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
++ default:
++ goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_load_header_state_3: {
++ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
++ case 8:
++ goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ default:
++ goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_update_header_state_2: {
+ switch (llhttp__internal__c_update_header_state(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_field_start;
+@@ -5767,7 +5844,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_7: {
+ switch (llhttp__internal__c_or_flags_3(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -5775,7 +5852,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_8: {
+ switch (llhttp__internal__c_or_flags_4(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -5783,7 +5860,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_9: {
+ switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -5796,7 +5873,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_load_header_state_3: {
++ s_n_llhttp__internal__n_invoke_load_header_state_4: {
+ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
+ case 5:
+ goto s_n_llhttp__internal__n_invoke_or_flags_7;
+@@ -5812,7 +5889,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_23: {
++ s_n_llhttp__internal__n_error_24: {
+ state->error = 0x3;
+ state->reason = "Missing expected LF after header value";
+ state->error_pos = (const char*) p;
+@@ -5830,6 +5907,24 @@
+ err = llhttp__on_header_value(state, start, p);
+ if (err != 0) {
+ state->error = err;
++ state->error_pos = (const char*) (p + 1);
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
++ return s_error;
++ }
++ p++;
++ goto s_n_llhttp__internal__n_header_value_almost_done;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: {
++ const unsigned char* start;
++ int err;
++
++ start = state->_span_pos0;
++ state->_span_pos0 = NULL;
++ err = llhttp__on_header_value(state, start, p);
++ if (err != 0) {
++ state->error = err;
+ state->error_pos = (const char*) p;
+ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
+ return s_error;
+@@ -5838,7 +5933,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: {
+ const unsigned char* start;
+ int err;
+
+@@ -5856,7 +5951,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: {
+ const unsigned char* start;
+ int err;
+
+@@ -5865,35 +5960,25 @@
+ err = llhttp__on_header_value(state, start, p);
+ if (err != 0) {
+ state->error = err;
+- state->error_pos = (const char*) (p + 1);
+- state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_25;
+ return s_error;
+ }
+- p++;
+- goto s_n_llhttp__internal__n_header_value_almost_done;
+- /* UNREACHABLE */;
+- abort();
+- }
+- s_n_llhttp__internal__n_error_24: {
+- state->error = 0xa;
+- state->reason = "Invalid header value char";
+- state->error_pos = (const char*) p;
+- state->_current = (void*) (intptr_t) s_error;
+- return s_error;
++ goto s_n_llhttp__internal__n_error_25;
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_test_flags_5: {
++ s_n_llhttp__internal__n_invoke_test_flags_6: {
+ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
+ case 1:
+ goto s_n_llhttp__internal__n_header_value_lenient;
+ default:
+- goto s_n_llhttp__internal__n_error_24;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_3: {
++ s_n_llhttp__internal__n_invoke_update_header_state_4: {
+ switch (llhttp__internal__c_update_header_state(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection;
+@@ -5904,7 +5989,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_11: {
+ switch (llhttp__internal__c_or_flags_3(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_4;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -5912,7 +5997,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_12: {
+ switch (llhttp__internal__c_or_flags_4(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_4;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -5920,7 +6005,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_13: {
+ switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_4;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -5933,7 +6018,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_load_header_state_4: {
++ s_n_llhttp__internal__n_invoke_load_header_state_5: {
+ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
+ case 5:
+ goto s_n_llhttp__internal__n_invoke_or_flags_11;
+@@ -5949,39 +6034,39 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_4: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_5: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_token;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_2: {
+- switch (llhttp__internal__c_update_header_state_2(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_3: {
++ switch (llhttp__internal__c_update_header_state_3(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_ws;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_5: {
+- switch (llhttp__internal__c_update_header_state_5(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_6: {
++ switch (llhttp__internal__c_update_header_state_6(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_ws;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_6: {
+- switch (llhttp__internal__c_update_header_state_6(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_7: {
++ switch (llhttp__internal__c_update_header_state_7(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_ws;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: {
+ const unsigned char* start;
+ int err;
+
+@@ -5991,17 +6076,17 @@
+ if (err != 0) {
+ state->error = err;
+ state->error_pos = (const char*) p;
+- state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_26;
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_27;
+ return s_error;
+ }
+- goto s_n_llhttp__internal__n_error_26;
++ goto s_n_llhttp__internal__n_error_27;
+ /* UNREACHABLE */;
+ abort();
+ }
+ s_n_llhttp__internal__n_invoke_mul_add_content_length_1: {
+ switch (llhttp__internal__c_mul_add_content_length_1(state, p, endp, match)) {
+ case 1:
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5;
+ default:
+ goto s_n_llhttp__internal__n_header_value_content_length;
+ }
+@@ -6016,7 +6101,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6: {
+ const unsigned char* start;
+ int err;
+
+@@ -6026,14 +6111,14 @@
+ if (err != 0) {
+ state->error = err;
+ state->error_pos = (const char*) p;
+- state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_27;
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_28;
+ return s_error;
+ }
+- goto s_n_llhttp__internal__n_error_27;
++ goto s_n_llhttp__internal__n_error_28;
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_25: {
++ s_n_llhttp__internal__n_error_26: {
+ state->error = 0x4;
+ state->reason = "Duplicate Content-Length";
+ state->error_pos = (const char*) p;
+@@ -6042,26 +6127,82 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_test_flags_6: {
+- switch (llhttp__internal__c_test_flags_6(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_test_flags_7: {
++ switch (llhttp__internal__c_test_flags_7(state, p, endp)) {
+ case 0:
+ goto s_n_llhttp__internal__n_header_value_content_length;
+ default:
+- goto s_n_llhttp__internal__n_error_25;
++ goto s_n_llhttp__internal__n_error_26;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_7: {
+- switch (llhttp__internal__c_update_header_state_7(state, p, endp)) {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8: {
++ const unsigned char* start;
++ int err;
++
++ start = state->_span_pos0;
++ state->_span_pos0 = NULL;
++ err = llhttp__on_header_value(state, start, p);
++ if (err != 0) {
++ state->error = err;
++ state->error_pos = (const char*) (p + 1);
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_30;
++ return s_error;
++ }
++ p++;
++ goto s_n_llhttp__internal__n_error_30;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_update_header_state_8: {
++ switch (llhttp__internal__c_update_header_state_8(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_otherwise;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_8: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7: {
++ const unsigned char* start;
++ int err;
++
++ start = state->_span_pos0;
++ state->_span_pos0 = NULL;
++ err = llhttp__on_header_value(state, start, p);
++ if (err != 0) {
++ state->error = err;
++ state->error_pos = (const char*) (p + 1);
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_29;
++ return s_error;
++ }
++ p++;
++ goto s_n_llhttp__internal__n_error_29;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_test_flags_9: {
++ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
++ case 0:
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7;
++ default:
++ goto s_n_llhttp__internal__n_header_value_te_chunked;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_load_type_1: {
++ switch (llhttp__internal__c_load_type(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_invoke_test_flags_9;
++ default:
++ goto s_n_llhttp__internal__n_header_value_te_chunked;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_update_header_state_9: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value;
+ }
+@@ -6076,6 +6217,34 @@
+ /* UNREACHABLE */;
+ abort();
+ }
++ s_n_llhttp__internal__n_invoke_or_flags_17: {
++ switch (llhttp__internal__c_or_flags_16(state, p, endp)) {
++ default:
++ goto s_n_llhttp__internal__n_invoke_and_flags;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_test_flags_10: {
++ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
++ case 0:
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8;
++ default:
++ goto s_n_llhttp__internal__n_invoke_or_flags_17;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_load_type_2: {
++ switch (llhttp__internal__c_load_type(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_invoke_test_flags_10;
++ default:
++ goto s_n_llhttp__internal__n_invoke_or_flags_17;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
+ s_n_llhttp__internal__n_invoke_or_flags_16: {
+ switch (llhttp__internal__c_or_flags_16(state, p, endp)) {
+ default:
+@@ -6084,10 +6253,20 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_or_flags_17: {
+- switch (llhttp__internal__c_or_flags_17(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_test_flags_8: {
++ switch (llhttp__internal__c_test_flags_8(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_invoke_load_type_2;
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_8;
++ goto s_n_llhttp__internal__n_invoke_or_flags_16;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_or_flags_18: {
++ switch (llhttp__internal__c_or_flags_18(state, p, endp)) {
++ default:
++ goto s_n_llhttp__internal__n_invoke_update_header_state_9;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -6097,11 +6276,11 @@
+ case 1:
+ goto s_n_llhttp__internal__n_header_value_connection;
+ case 2:
+- goto s_n_llhttp__internal__n_invoke_test_flags_6;
++ goto s_n_llhttp__internal__n_invoke_test_flags_7;
+ case 3:
+- goto s_n_llhttp__internal__n_invoke_or_flags_16;
++ goto s_n_llhttp__internal__n_invoke_test_flags_8;
+ case 4:
+- goto s_n_llhttp__internal__n_invoke_or_flags_17;
++ goto s_n_llhttp__internal__n_invoke_or_flags_18;
+ default:
+ goto s_n_llhttp__internal__n_header_value;
+ }
+@@ -6144,7 +6323,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_28: {
++ s_n_llhttp__internal__n_error_31: {
+ state->error = 0xa;
+ state->reason = "Invalid header token";
+ state->error_pos = (const char*) p;
+@@ -6153,8 +6332,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_9: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_10: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_field_general;
+ }
+@@ -6169,8 +6348,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_10: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_11: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_field_general;
+ }
+@@ -6210,7 +6389,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_29: {
++ s_n_llhttp__internal__n_error_32: {
+ state->error = 0x7;
+ state->reason = "Expected CRLF";
+ state->error_pos = (const char*) p;
+@@ -6236,7 +6415,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_30: {
++ s_n_llhttp__internal__n_error_33: {
+ state->error = 0x9;
+ state->reason = "Expected CRLF after version";
+ state->error_pos = (const char*) p;
+@@ -6253,7 +6432,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_31: {
++ s_n_llhttp__internal__n_error_34: {
+ state->error = 0x9;
+ state->reason = "Invalid minor version";
+ state->error_pos = (const char*) p;
+@@ -6262,7 +6441,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_32: {
++ s_n_llhttp__internal__n_error_35: {
+ state->error = 0x9;
+ state->reason = "Expected dot";
+ state->error_pos = (const char*) p;
+@@ -6279,7 +6458,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_33: {
++ s_n_llhttp__internal__n_error_36: {
+ state->error = 0x9;
+ state->reason = "Invalid major version";
+ state->error_pos = (const char*) p;
+@@ -6288,7 +6467,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_35: {
++ s_n_llhttp__internal__n_error_38: {
+ state->error = 0x8;
+ state->reason = "Expected HTTP/";
+ state->error_pos = (const char*) p;
+@@ -6297,7 +6476,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_34: {
++ s_n_llhttp__internal__n_error_37: {
+ state->error = 0x8;
+ state->reason = "Expected SOURCE method for ICE/x.x request";
+ state->error_pos = (const char*) p;
+@@ -6309,7 +6488,7 @@
+ s_n_llhttp__internal__n_invoke_is_equal_method_1: {
+ switch (llhttp__internal__c_is_equal_method_1(state, p, endp)) {
+ case 0:
+- goto s_n_llhttp__internal__n_error_34;
++ goto s_n_llhttp__internal__n_error_37;
+ default:
+ goto s_n_llhttp__internal__n_req_http_major;
+ }
+@@ -6384,7 +6563,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_36: {
++ s_n_llhttp__internal__n_error_39: {
+ state->error = 0x7;
+ state->reason = "Invalid char in url fragment start";
+ state->error_pos = (const char*) p;
+@@ -6444,7 +6623,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_37: {
++ s_n_llhttp__internal__n_error_40: {
+ state->error = 0x7;
+ state->reason = "Invalid char in url query";
+ state->error_pos = (const char*) p;
+@@ -6453,7 +6632,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_38: {
++ s_n_llhttp__internal__n_error_41: {
+ state->error = 0x7;
+ state->reason = "Invalid char in url path";
+ state->error_pos = (const char*) p;
+@@ -6564,7 +6743,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_39: {
++ s_n_llhttp__internal__n_error_42: {
+ state->error = 0x7;
+ state->reason = "Double @ in url";
+ state->error_pos = (const char*) p;
+@@ -6573,7 +6752,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_40: {
++ s_n_llhttp__internal__n_error_43: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url server";
+ state->error_pos = (const char*) p;
+@@ -6582,7 +6761,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_41: {
++ s_n_llhttp__internal__n_error_44: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url server";
+ state->error_pos = (const char*) p;
+@@ -6591,7 +6770,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_43: {
++ s_n_llhttp__internal__n_error_46: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url schema";
+ state->error_pos = (const char*) p;
+@@ -6600,7 +6779,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_44: {
++ s_n_llhttp__internal__n_error_47: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url schema";
+ state->error_pos = (const char*) p;
+@@ -6609,7 +6788,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_45: {
++ s_n_llhttp__internal__n_error_48: {
+ state->error = 0x7;
+ state->reason = "Unexpected start char in url";
+ state->error_pos = (const char*) p;
+@@ -6628,7 +6807,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_46: {
++ s_n_llhttp__internal__n_error_49: {
+ state->error = 0x6;
+ state->reason = "Expected space after method";
+ state->error_pos = (const char*) p;
+@@ -6645,7 +6824,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_55: {
++ s_n_llhttp__internal__n_error_58: {
+ state->error = 0x6;
+ state->reason = "Invalid method encountered";
+ state->error_pos = (const char*) p;
+@@ -6654,7 +6833,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_47: {
++ s_n_llhttp__internal__n_error_50: {
+ state->error = 0xd;
+ state->reason = "Response overflow";
+ state->error_pos = (const char*) p;
+@@ -6666,14 +6845,14 @@
+ s_n_llhttp__internal__n_invoke_mul_add_status_code: {
+ switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) {
+ case 1:
+- goto s_n_llhttp__internal__n_error_47;
++ goto s_n_llhttp__internal__n_error_50;
+ default:
+ goto s_n_llhttp__internal__n_res_status_code;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_48: {
++ s_n_llhttp__internal__n_error_51: {
+ state->error = 0x2;
+ state->reason = "Expected LF after CR";
+ state->error_pos = (const char*) p;
+@@ -6718,7 +6897,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_49: {
++ s_n_llhttp__internal__n_error_52: {
+ state->error = 0xd;
+ state->reason = "Invalid response status";
+ state->error_pos = (const char*) p;
+@@ -6735,7 +6914,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_50: {
++ s_n_llhttp__internal__n_error_53: {
+ state->error = 0x9;
+ state->reason = "Expected space after version";
+ state->error_pos = (const char*) p;
+@@ -6752,7 +6931,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_51: {
++ s_n_llhttp__internal__n_error_54: {
+ state->error = 0x9;
+ state->reason = "Invalid minor version";
+ state->error_pos = (const char*) p;
+@@ -6761,7 +6940,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_52: {
++ s_n_llhttp__internal__n_error_55: {
+ state->error = 0x9;
+ state->reason = "Expected dot";
+ state->error_pos = (const char*) p;
+@@ -6778,7 +6957,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_53: {
++ s_n_llhttp__internal__n_error_56: {
+ state->error = 0x9;
+ state->reason = "Invalid major version";
+ state->error_pos = (const char*) p;
+@@ -6787,7 +6966,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_56: {
++ s_n_llhttp__internal__n_error_59: {
+ state->error = 0x8;
+ state->reason = "Expected HTTP/";
+ state->error_pos = (const char*) p;
+@@ -6812,7 +6991,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_54: {
++ s_n_llhttp__internal__n_error_57: {
+ state->error = 0x8;
+ state->reason = "Invalid word encountered";
+ state->error_pos = (const char*) p;
+@@ -7244,6 +7423,7 @@
+ s_n_llhttp__internal__n_header_value_lws,
+ s_n_llhttp__internal__n_header_value_almost_done,
+ s_n_llhttp__internal__n_header_value_lenient,
++ s_n_llhttp__internal__n_error_19,
+ s_n_llhttp__internal__n_header_value_otherwise,
+ s_n_llhttp__internal__n_header_value_connection_token,
+ s_n_llhttp__internal__n_header_value_connection_ws,
+@@ -7251,14 +7431,16 @@
+ s_n_llhttp__internal__n_header_value_connection_2,
+ s_n_llhttp__internal__n_header_value_connection_3,
+ s_n_llhttp__internal__n_header_value_connection,
+- s_n_llhttp__internal__n_error_20,
+ s_n_llhttp__internal__n_error_21,
++ s_n_llhttp__internal__n_error_22,
+ s_n_llhttp__internal__n_header_value_content_length_ws,
+ s_n_llhttp__internal__n_header_value_content_length,
+- s_n_llhttp__internal__n_header_value_te_chunked_last,
++ s_n_llhttp__internal__n_error_24,
++ s_n_llhttp__internal__n_error_23,
+ s_n_llhttp__internal__n_header_value_te_token_ows,
+ s_n_llhttp__internal__n_header_value,
+ s_n_llhttp__internal__n_header_value_te_token,
++ s_n_llhttp__internal__n_header_value_te_chunked_last,
+ s_n_llhttp__internal__n_header_value_te_chunked,
+ s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1,
+ s_n_llhttp__internal__n_header_value_discard_ws,
+@@ -7648,7 +7830,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_2(
++int llhttp__internal__c_update_header_state_3(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -7656,7 +7838,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_4(
++int llhttp__internal__c_update_header_state_1(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -7664,7 +7846,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_5(
++int llhttp__internal__c_update_header_state_6(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -7672,7 +7854,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_6(
++int llhttp__internal__c_update_header_state_7(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -7680,7 +7862,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_test_flags_6(
++int llhttp__internal__c_test_flags_7(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -7721,6 +7903,13 @@
+ return 0;
+ }
+
++int llhttp__internal__c_test_flags_8(
++ llhttp__internal_t* state,
++ const unsigned char* p,
++ const unsigned char* endp) {
++ return (state->flags & 8) == 8;
++}
++
+ int llhttp__internal__c_or_flags_16(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+@@ -7737,7 +7926,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_update_header_state_7(
++int llhttp__internal__c_update_header_state_8(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -7745,7 +7934,7 @@
+ return 0;
+ }
+
+-int llhttp__internal__c_or_flags_17(
++int llhttp__internal__c_or_flags_18(
+ llhttp__internal_t* state,
+ const unsigned char* p,
+ const unsigned char* endp) {
+@@ -8432,13 +8621,13 @@
+ }
+ switch (*p) {
+ case 9: {
+- goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_3;
+ }
+ case ' ': {
+- goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_3;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_load_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_4;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -8455,7 +8644,7 @@
+ goto s_n_llhttp__internal__n_header_value_lws;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_17;
++ goto s_n_llhttp__internal__n_error_18;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -8468,10 +8657,10 @@
+ }
+ switch (*p) {
+ case 10: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3;
+ }
+ case 13: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4;
+ }
+ default: {
+ p++;
+@@ -8481,20 +8670,27 @@
+ /* UNREACHABLE */;
+ abort();
+ }
++ case s_n_llhttp__internal__n_error_19:
++ s_n_llhttp__internal__n_error_19: {
++ state->error = 0xa;
++ state->reason = "Invalid header value char";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
++ /* UNREACHABLE */;
++ abort();
++ }
+ case s_n_llhttp__internal__n_header_value_otherwise:
+ s_n_llhttp__internal__n_header_value_otherwise: {
+ if (p == endp) {
+ return s_n_llhttp__internal__n_header_value_otherwise;
+ }
+ switch (*p) {
+- case 10: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
+- }
+ case 13: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_test_flags_5;
++ goto s_n_llhttp__internal__n_invoke_test_flags_6;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -8557,10 +8753,10 @@
+ }
+ case ',': {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_load_header_state_4;
++ goto s_n_llhttp__internal__n_invoke_load_header_state_5;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_4;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_5;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -8578,7 +8774,7 @@
+ switch (match_seq.status) {
+ case kMatchComplete: {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_update_header_state_2;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_3;
+ }
+ case kMatchPause: {
+ return s_n_llhttp__internal__n_header_value_connection_1;
+@@ -8602,7 +8798,7 @@
+ switch (match_seq.status) {
+ case kMatchComplete: {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_update_header_state_5;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_6;
+ }
+ case kMatchPause: {
+ return s_n_llhttp__internal__n_header_value_connection_2;
+@@ -8626,7 +8822,7 @@
+ switch (match_seq.status) {
+ case kMatchComplete: {
+ p++;
+- goto s_n_llhttp__internal__n_invoke_update_header_state_6;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_7;
+ }
+ case kMatchPause: {
+ return s_n_llhttp__internal__n_header_value_connection_3;
+@@ -8671,8 +8867,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- case s_n_llhttp__internal__n_error_20:
+- s_n_llhttp__internal__n_error_20: {
++ case s_n_llhttp__internal__n_error_21:
++ s_n_llhttp__internal__n_error_21: {
+ state->error = 0xb;
+ state->reason = "Content-Length overflow";
+ state->error_pos = (const char*) p;
+@@ -8681,8 +8877,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- case s_n_llhttp__internal__n_error_21:
+- s_n_llhttp__internal__n_error_21: {
++ case s_n_llhttp__internal__n_error_22:
++ s_n_llhttp__internal__n_error_22: {
+ state->error = 0xb;
+ state->reason = "Invalid character in Content-Length";
+ state->error_pos = (const char*) p;
+@@ -8708,7 +8904,7 @@
+ goto s_n_llhttp__internal__n_header_value_content_length_ws;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -8777,26 +8973,23 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- case s_n_llhttp__internal__n_header_value_te_chunked_last:
+- s_n_llhttp__internal__n_header_value_te_chunked_last: {
+- if (p == endp) {
+- return s_n_llhttp__internal__n_header_value_te_chunked_last;
+- }
+- switch (*p) {
+- case 10: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_7;
+- }
+- case 13: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_7;
+- }
+- case ' ': {
+- p++;
+- goto s_n_llhttp__internal__n_header_value_te_chunked_last;
+- }
+- default: {
+- goto s_n_llhttp__internal__n_header_value_te_chunked;
+- }
+- }
++ case s_n_llhttp__internal__n_error_24:
++ s_n_llhttp__internal__n_error_24: {
++ state->error = 0xf;
++ state->reason = "Invalid `Transfer-Encoding` header value";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
++ /* UNREACHABLE */;
++ abort();
++ }
++ case s_n_llhttp__internal__n_error_23:
++ s_n_llhttp__internal__n_error_23: {
++ state->error = 0xf;
++ state->reason = "Invalid `Transfer-Encoding` header value";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
+ /* UNREACHABLE */;
+ abort();
+ }
+@@ -8913,8 +9106,34 @@
+ goto s_n_llhttp__internal__n_header_value_te_token_ows;
+ }
+ default: {
++ goto s_n_llhttp__internal__n_invoke_update_header_state_9;
++ }
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ case s_n_llhttp__internal__n_header_value_te_chunked_last:
++ s_n_llhttp__internal__n_header_value_te_chunked_last: {
++ if (p == endp) {
++ return s_n_llhttp__internal__n_header_value_te_chunked_last;
++ }
++ switch (*p) {
++ case 10: {
+ goto s_n_llhttp__internal__n_invoke_update_header_state_8;
+ }
++ case 13: {
++ goto s_n_llhttp__internal__n_invoke_update_header_state_8;
++ }
++ case ' ': {
++ p++;
++ goto s_n_llhttp__internal__n_header_value_te_chunked_last;
++ }
++ case ',': {
++ goto s_n_llhttp__internal__n_invoke_load_type_1;
++ }
++ default: {
++ goto s_n_llhttp__internal__n_header_value_te_token;
++ }
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -8966,7 +9185,7 @@
+ }
+ case 10: {
+ p++;
+- goto s_n_llhttp__internal__n_header_value_discard_lws;
++ goto s_n_llhttp__internal__n_invoke_test_flags_5;
+ }
+ case 13: {
+ p++;
+@@ -8993,7 +9212,7 @@
+ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_2;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_22;
++ goto s_n_llhttp__internal__n_error_25;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9083,7 +9302,7 @@
+ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_9;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_10;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9108,7 +9327,7 @@
+ return s_n_llhttp__internal__n_header_field_3;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9133,7 +9352,7 @@
+ return s_n_llhttp__internal__n_header_field_4;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9154,7 +9373,7 @@
+ goto s_n_llhttp__internal__n_header_field_4;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9178,7 +9397,7 @@
+ return s_n_llhttp__internal__n_header_field_1;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9203,7 +9422,7 @@
+ return s_n_llhttp__internal__n_header_field_5;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9228,7 +9447,7 @@
+ return s_n_llhttp__internal__n_header_field_6;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9253,7 +9472,7 @@
+ return s_n_llhttp__internal__n_header_field_7;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9282,7 +9501,7 @@
+ goto s_n_llhttp__internal__n_header_field_7;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_invoke_update_header_state_10;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_11;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9347,7 +9566,7 @@
+ return s_n_llhttp__internal__n_url_skip_lf_to_http09;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_23;
++ goto s_n_llhttp__internal__n_error_26;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9364,7 +9583,7 @@
+ goto s_n_llhttp__internal__n_header_field_start;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_24;
++ goto s_n_llhttp__internal__n_error_27;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9385,7 +9604,7 @@
+ goto s_n_llhttp__internal__n_req_http_end_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_24;
++ goto s_n_llhttp__internal__n_error_27;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9448,7 +9667,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_minor;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_25;
++ goto s_n_llhttp__internal__n_error_28;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9465,7 +9684,7 @@
+ goto s_n_llhttp__internal__n_req_http_minor;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_26;
++ goto s_n_llhttp__internal__n_error_29;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9528,7 +9747,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_major;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_27;
++ goto s_n_llhttp__internal__n_error_30;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9552,7 +9771,7 @@
+ return s_n_llhttp__internal__n_req_http_start_1;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_29;
++ goto s_n_llhttp__internal__n_error_32;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9576,7 +9795,7 @@
+ return s_n_llhttp__internal__n_req_http_start_2;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_29;
++ goto s_n_llhttp__internal__n_error_32;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9601,7 +9820,7 @@
+ goto s_n_llhttp__internal__n_req_http_start_2;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_29;
++ goto s_n_llhttp__internal__n_error_32;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9655,7 +9874,7 @@
+ goto s_n_llhttp__internal__n_span_end_llhttp__on_url_8;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_30;
++ goto s_n_llhttp__internal__n_error_33;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9712,7 +9931,7 @@
+ goto s_n_llhttp__internal__n_span_end_stub_query_3;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_31;
++ goto s_n_llhttp__internal__n_error_34;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9742,7 +9961,7 @@
+ goto s_n_llhttp__internal__n_url_query;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_32;
++ goto s_n_llhttp__internal__n_error_35;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9883,10 +10102,10 @@
+ }
+ case 7: {
+ p++;
+- goto s_n_llhttp__internal__n_error_33;
++ goto s_n_llhttp__internal__n_error_36;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_34;
++ goto s_n_llhttp__internal__n_error_37;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9941,7 +10160,7 @@
+ goto s_n_llhttp__internal__n_url_server_with_at;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_35;
++ goto s_n_llhttp__internal__n_error_38;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9958,7 +10177,7 @@
+ goto s_n_llhttp__internal__n_url_server;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_37;
++ goto s_n_llhttp__internal__n_error_40;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -9972,22 +10191,22 @@
+ switch (*p) {
+ case 10: {
+ p++;
+- goto s_n_llhttp__internal__n_error_36;
++ goto s_n_llhttp__internal__n_error_39;
+ }
+ case 13: {
+ p++;
+- goto s_n_llhttp__internal__n_error_36;
++ goto s_n_llhttp__internal__n_error_39;
+ }
+ case ' ': {
+ p++;
+- goto s_n_llhttp__internal__n_error_36;
++ goto s_n_llhttp__internal__n_error_39;
+ }
+ case '/': {
+ p++;
+ goto s_n_llhttp__internal__n_url_schema_delim_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_37;
++ goto s_n_llhttp__internal__n_error_40;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10029,7 +10248,7 @@
+ switch (lookup_table[(uint8_t) *p]) {
+ case 1: {
+ p++;
+- goto s_n_llhttp__internal__n_error_36;
++ goto s_n_llhttp__internal__n_error_39;
+ }
+ case 2: {
+ goto s_n_llhttp__internal__n_span_end_stub_schema;
+@@ -10039,7 +10258,7 @@
+ goto s_n_llhttp__internal__n_url_schema;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_38;
++ goto s_n_llhttp__internal__n_error_41;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10071,7 +10290,7 @@
+ switch (lookup_table[(uint8_t) *p]) {
+ case 1: {
+ p++;
+- goto s_n_llhttp__internal__n_error_36;
++ goto s_n_llhttp__internal__n_error_39;
+ }
+ case 2: {
+ goto s_n_llhttp__internal__n_span_start_stub_path_2;
+@@ -10080,7 +10299,7 @@
+ goto s_n_llhttp__internal__n_url_schema;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_39;
++ goto s_n_llhttp__internal__n_error_42;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10136,7 +10355,7 @@
+ goto s_n_llhttp__internal__n_req_spaces_before_url;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_40;
++ goto s_n_llhttp__internal__n_error_43;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10161,7 +10380,7 @@
+ return s_n_llhttp__internal__n_start_req_1;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10186,7 +10405,7 @@
+ return s_n_llhttp__internal__n_start_req_2;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10211,7 +10430,7 @@
+ return s_n_llhttp__internal__n_start_req_4;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10236,7 +10455,7 @@
+ return s_n_llhttp__internal__n_start_req_6;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10254,7 +10473,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10275,7 +10494,7 @@
+ goto s_n_llhttp__internal__n_start_req_7;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10296,7 +10515,7 @@
+ goto s_n_llhttp__internal__n_start_req_5;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10321,7 +10540,7 @@
+ return s_n_llhttp__internal__n_start_req_8;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10346,7 +10565,7 @@
+ return s_n_llhttp__internal__n_start_req_9;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10371,7 +10590,7 @@
+ return s_n_llhttp__internal__n_start_req_10;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10396,7 +10615,7 @@
+ return s_n_llhttp__internal__n_start_req_12;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10421,7 +10640,7 @@
+ return s_n_llhttp__internal__n_start_req_13;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10442,7 +10661,7 @@
+ goto s_n_llhttp__internal__n_start_req_13;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10467,7 +10686,7 @@
+ return s_n_llhttp__internal__n_start_req_15;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10492,7 +10711,7 @@
+ return s_n_llhttp__internal__n_start_req_16;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10517,7 +10736,7 @@
+ return s_n_llhttp__internal__n_start_req_18;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10542,7 +10761,7 @@
+ return s_n_llhttp__internal__n_start_req_20;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10560,7 +10779,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10581,7 +10800,7 @@
+ goto s_n_llhttp__internal__n_start_req_21;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10602,7 +10821,7 @@
+ goto s_n_llhttp__internal__n_start_req_19;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10627,7 +10846,7 @@
+ return s_n_llhttp__internal__n_start_req_22;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10656,7 +10875,7 @@
+ goto s_n_llhttp__internal__n_start_req_22;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10681,7 +10900,7 @@
+ return s_n_llhttp__internal__n_start_req_23;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10706,7 +10925,7 @@
+ return s_n_llhttp__internal__n_start_req_24;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10731,7 +10950,7 @@
+ return s_n_llhttp__internal__n_start_req_26;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10756,7 +10975,7 @@
+ return s_n_llhttp__internal__n_start_req_27;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10781,7 +11000,7 @@
+ return s_n_llhttp__internal__n_start_req_31;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10806,7 +11025,7 @@
+ return s_n_llhttp__internal__n_start_req_32;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10827,7 +11046,7 @@
+ goto s_n_llhttp__internal__n_start_req_32;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10844,7 +11063,7 @@
+ goto s_n_llhttp__internal__n_start_req_30;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10866,7 +11085,7 @@
+ goto s_n_llhttp__internal__n_start_req_29;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10891,7 +11110,7 @@
+ return s_n_llhttp__internal__n_start_req_34;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10913,7 +11132,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10942,7 +11161,7 @@
+ goto s_n_llhttp__internal__n_start_req_33;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10967,7 +11186,7 @@
+ return s_n_llhttp__internal__n_start_req_37;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -10992,7 +11211,7 @@
+ return s_n_llhttp__internal__n_start_req_38;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11013,7 +11232,7 @@
+ goto s_n_llhttp__internal__n_start_req_38;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11030,7 +11249,7 @@
+ goto s_n_llhttp__internal__n_start_req_36;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11055,7 +11274,7 @@
+ return s_n_llhttp__internal__n_start_req_40;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11080,7 +11299,7 @@
+ return s_n_llhttp__internal__n_start_req_41;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11105,7 +11324,7 @@
+ return s_n_llhttp__internal__n_start_req_42;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11130,7 +11349,7 @@
+ goto s_n_llhttp__internal__n_start_req_42;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11155,7 +11374,7 @@
+ return s_n_llhttp__internal__n_start_req_43;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11180,7 +11399,7 @@
+ return s_n_llhttp__internal__n_start_req_46;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11205,7 +11424,7 @@
+ return s_n_llhttp__internal__n_start_req_48;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11230,7 +11449,7 @@
+ return s_n_llhttp__internal__n_start_req_49;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11251,7 +11470,7 @@
+ goto s_n_llhttp__internal__n_start_req_49;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11276,7 +11495,7 @@
+ return s_n_llhttp__internal__n_start_req_50;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11301,7 +11520,7 @@
+ goto s_n_llhttp__internal__n_start_req_50;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11318,7 +11537,7 @@
+ goto s_n_llhttp__internal__n_start_req_45;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11391,7 +11610,7 @@
+ goto s_n_llhttp__internal__n_start_req_44;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_48;
++ goto s_n_llhttp__internal__n_error_51;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11476,7 +11695,7 @@
+ goto s_n_llhttp__internal__n_res_status_start;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_42;
++ goto s_n_llhttp__internal__n_error_45;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11556,7 +11775,7 @@
+ goto s_n_llhttp__internal__n_invoke_update_status_code;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_43;
++ goto s_n_llhttp__internal__n_error_46;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11619,7 +11838,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_44;
++ goto s_n_llhttp__internal__n_error_47;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11636,7 +11855,7 @@
+ goto s_n_llhttp__internal__n_res_http_minor;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_45;
++ goto s_n_llhttp__internal__n_error_48;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11699,7 +11918,7 @@
+ goto s_n_llhttp__internal__n_invoke_store_http_major_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_46;
++ goto s_n_llhttp__internal__n_error_49;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11723,7 +11942,7 @@
+ return s_n_llhttp__internal__n_start_res;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_49;
++ goto s_n_llhttp__internal__n_error_52;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11748,7 +11967,7 @@
+ return s_n_llhttp__internal__n_req_or_res_method_2;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_47;
++ goto s_n_llhttp__internal__n_error_50;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11772,7 +11991,7 @@
+ return s_n_llhttp__internal__n_req_or_res_method_3;
+ }
+ case kMatchMismatch: {
+- goto s_n_llhttp__internal__n_error_47;
++ goto s_n_llhttp__internal__n_error_50;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11793,7 +12012,7 @@
+ goto s_n_llhttp__internal__n_req_or_res_method_3;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_47;
++ goto s_n_llhttp__internal__n_error_50;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11810,7 +12029,7 @@
+ goto s_n_llhttp__internal__n_req_or_res_method_1;
+ }
+ default: {
+- goto s_n_llhttp__internal__n_error_47;
++ goto s_n_llhttp__internal__n_error_50;
+ }
+ }
+ /* UNREACHABLE */;
+@@ -11870,7 +12089,7 @@
+ /* UNREACHABLE */
+ abort();
+ }
+- s_n_llhttp__internal__n_error_36: {
++ s_n_llhttp__internal__n_error_39: {
+ state->error = 0x7;
+ state->reason = "Invalid characters in url";
+ state->error_pos = (const char*) p;
+@@ -12314,7 +12533,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_16: {
++ s_n_llhttp__internal__n_error_17: {
+ state->error = 0xb;
+ state->reason = "Empty Content-Length";
+ state->error_pos = (const char*) p;
+@@ -12399,14 +12618,51 @@
+ s_n_llhttp__internal__n_invoke_load_header_state: {
+ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
+ case 2:
+- goto s_n_llhttp__internal__n_error_16;
++ goto s_n_llhttp__internal__n_error_17;
+ default:
+ goto s_n_llhttp__internal__n_invoke_load_header_state_1;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
++ s_n_llhttp__internal__n_error_16: {
++ state->error = 0xa;
++ state->reason = "Invalid header value char";
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_error;
++ return s_error;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_test_flags_5: {
++ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_header_value_discard_lws;
++ default:
++ goto s_n_llhttp__internal__n_error_16;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
+ s_n_llhttp__internal__n_invoke_update_header_state_1: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
++ default:
++ goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_load_header_state_3: {
++ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
++ case 8:
++ goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ default:
++ goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_update_header_state_2: {
+ switch (llhttp__internal__c_update_header_state(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_field_start;
+@@ -12417,7 +12673,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_7: {
+ switch (llhttp__internal__c_or_flags_3(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -12425,7 +12681,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_8: {
+ switch (llhttp__internal__c_or_flags_4(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -12433,7 +12689,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_9: {
+ switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_1;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -12446,7 +12702,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_load_header_state_3: {
++ s_n_llhttp__internal__n_invoke_load_header_state_4: {
+ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
+ case 5:
+ goto s_n_llhttp__internal__n_invoke_or_flags_7;
+@@ -12462,7 +12718,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_17: {
++ s_n_llhttp__internal__n_error_18: {
+ state->error = 0x3;
+ state->reason = "Missing expected LF after header value";
+ state->error_pos = (const char*) p;
+@@ -12480,6 +12736,24 @@
+ err = llhttp__on_header_value(state, start, p);
+ if (err != 0) {
+ state->error = err;
++ state->error_pos = (const char*) (p + 1);
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
++ return s_error;
++ }
++ p++;
++ goto s_n_llhttp__internal__n_header_value_almost_done;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: {
++ const unsigned char* start;
++ int err;
++
++ start = state->_span_pos0;
++ state->_span_pos0 = NULL;
++ err = llhttp__on_header_value(state, start, p);
++ if (err != 0) {
++ state->error = err;
+ state->error_pos = (const char*) p;
+ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
+ return s_error;
+@@ -12488,7 +12762,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: {
+ const unsigned char* start;
+ int err;
+
+@@ -12506,7 +12780,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: {
+ const unsigned char* start;
+ int err;
+
+@@ -12515,35 +12789,25 @@
+ err = llhttp__on_header_value(state, start, p);
+ if (err != 0) {
+ state->error = err;
+- state->error_pos = (const char*) (p + 1);
+- state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
++ state->error_pos = (const char*) p;
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_19;
+ return s_error;
+ }
+- p++;
+- goto s_n_llhttp__internal__n_header_value_almost_done;
++ goto s_n_llhttp__internal__n_error_19;
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_18: {
+- state->error = 0xa;
+- state->reason = "Invalid header value char";
+- state->error_pos = (const char*) p;
+- state->_current = (void*) (intptr_t) s_error;
+- return s_error;
+- /* UNREACHABLE */;
+- abort();
+- }
+- s_n_llhttp__internal__n_invoke_test_flags_5: {
++ s_n_llhttp__internal__n_invoke_test_flags_6: {
+ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
+ case 1:
+ goto s_n_llhttp__internal__n_header_value_lenient;
+ default:
+- goto s_n_llhttp__internal__n_error_18;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_3: {
++ s_n_llhttp__internal__n_invoke_update_header_state_4: {
+ switch (llhttp__internal__c_update_header_state(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection;
+@@ -12554,7 +12818,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_11: {
+ switch (llhttp__internal__c_or_flags_3(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_4;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -12562,7 +12826,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_12: {
+ switch (llhttp__internal__c_or_flags_4(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_4;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -12570,7 +12834,7 @@
+ s_n_llhttp__internal__n_invoke_or_flags_13: {
+ switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_3;
++ goto s_n_llhttp__internal__n_invoke_update_header_state_4;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -12583,7 +12847,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_load_header_state_4: {
++ s_n_llhttp__internal__n_invoke_load_header_state_5: {
+ switch (llhttp__internal__c_load_header_state(state, p, endp)) {
+ case 5:
+ goto s_n_llhttp__internal__n_invoke_or_flags_11;
+@@ -12599,39 +12863,39 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_4: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_5: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_token;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_2: {
+- switch (llhttp__internal__c_update_header_state_2(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_3: {
++ switch (llhttp__internal__c_update_header_state_3(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_ws;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_5: {
+- switch (llhttp__internal__c_update_header_state_5(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_6: {
++ switch (llhttp__internal__c_update_header_state_6(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_ws;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_6: {
+- switch (llhttp__internal__c_update_header_state_6(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_7: {
++ switch (llhttp__internal__c_update_header_state_7(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_connection_ws;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: {
+ const unsigned char* start;
+ int err;
+
+@@ -12641,17 +12905,17 @@
+ if (err != 0) {
+ state->error = err;
+ state->error_pos = (const char*) p;
+- state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_20;
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_21;
+ return s_error;
+ }
+- goto s_n_llhttp__internal__n_error_20;
++ goto s_n_llhttp__internal__n_error_21;
+ /* UNREACHABLE */;
+ abort();
+ }
+ s_n_llhttp__internal__n_invoke_mul_add_content_length_1: {
+ switch (llhttp__internal__c_mul_add_content_length_1(state, p, endp, match)) {
+ case 1:
+- goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4;
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5;
+ default:
+ goto s_n_llhttp__internal__n_header_value_content_length;
+ }
+@@ -12666,7 +12930,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_6: {
+ const unsigned char* start;
+ int err;
+
+@@ -12676,14 +12940,14 @@
+ if (err != 0) {
+ state->error = err;
+ state->error_pos = (const char*) p;
+- state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_21;
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_22;
+ return s_error;
+ }
+- goto s_n_llhttp__internal__n_error_21;
++ goto s_n_llhttp__internal__n_error_22;
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_19: {
++ s_n_llhttp__internal__n_error_20: {
+ state->error = 0x4;
+ state->reason = "Duplicate Content-Length";
+ state->error_pos = (const char*) p;
+@@ -12692,26 +12956,82 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_test_flags_6: {
+- switch (llhttp__internal__c_test_flags_6(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_test_flags_7: {
++ switch (llhttp__internal__c_test_flags_7(state, p, endp)) {
+ case 0:
+ goto s_n_llhttp__internal__n_header_value_content_length;
+ default:
+- goto s_n_llhttp__internal__n_error_19;
++ goto s_n_llhttp__internal__n_error_20;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_7: {
+- switch (llhttp__internal__c_update_header_state_7(state, p, endp)) {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8: {
++ const unsigned char* start;
++ int err;
++
++ start = state->_span_pos0;
++ state->_span_pos0 = NULL;
++ err = llhttp__on_header_value(state, start, p);
++ if (err != 0) {
++ state->error = err;
++ state->error_pos = (const char*) (p + 1);
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_24;
++ return s_error;
++ }
++ p++;
++ goto s_n_llhttp__internal__n_error_24;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_update_header_state_8: {
++ switch (llhttp__internal__c_update_header_state_8(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value_otherwise;
+ }
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_8: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7: {
++ const unsigned char* start;
++ int err;
++
++ start = state->_span_pos0;
++ state->_span_pos0 = NULL;
++ err = llhttp__on_header_value(state, start, p);
++ if (err != 0) {
++ state->error = err;
++ state->error_pos = (const char*) (p + 1);
++ state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_23;
++ return s_error;
++ }
++ p++;
++ goto s_n_llhttp__internal__n_error_23;
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_test_flags_9: {
++ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
++ case 0:
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_7;
++ default:
++ goto s_n_llhttp__internal__n_header_value_te_chunked;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_load_type_1: {
++ switch (llhttp__internal__c_load_type(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_invoke_test_flags_9;
++ default:
++ goto s_n_llhttp__internal__n_header_value_te_chunked;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_update_header_state_9: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_value;
+ }
+@@ -12726,6 +13046,34 @@
+ /* UNREACHABLE */;
+ abort();
+ }
++ s_n_llhttp__internal__n_invoke_or_flags_17: {
++ switch (llhttp__internal__c_or_flags_16(state, p, endp)) {
++ default:
++ goto s_n_llhttp__internal__n_invoke_and_flags;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_test_flags_10: {
++ switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
++ case 0:
++ goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_8;
++ default:
++ goto s_n_llhttp__internal__n_invoke_or_flags_17;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_load_type_2: {
++ switch (llhttp__internal__c_load_type(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_invoke_test_flags_10;
++ default:
++ goto s_n_llhttp__internal__n_invoke_or_flags_17;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
+ s_n_llhttp__internal__n_invoke_or_flags_16: {
+ switch (llhttp__internal__c_or_flags_16(state, p, endp)) {
+ default:
+@@ -12734,10 +13082,20 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_or_flags_17: {
+- switch (llhttp__internal__c_or_flags_17(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_test_flags_8: {
++ switch (llhttp__internal__c_test_flags_8(state, p, endp)) {
++ case 1:
++ goto s_n_llhttp__internal__n_invoke_load_type_2;
+ default:
+- goto s_n_llhttp__internal__n_invoke_update_header_state_8;
++ goto s_n_llhttp__internal__n_invoke_or_flags_16;
++ }
++ /* UNREACHABLE */;
++ abort();
++ }
++ s_n_llhttp__internal__n_invoke_or_flags_18: {
++ switch (llhttp__internal__c_or_flags_18(state, p, endp)) {
++ default:
++ goto s_n_llhttp__internal__n_invoke_update_header_state_9;
+ }
+ /* UNREACHABLE */;
+ abort();
+@@ -12747,11 +13105,11 @@
+ case 1:
+ goto s_n_llhttp__internal__n_header_value_connection;
+ case 2:
+- goto s_n_llhttp__internal__n_invoke_test_flags_6;
++ goto s_n_llhttp__internal__n_invoke_test_flags_7;
+ case 3:
+- goto s_n_llhttp__internal__n_invoke_or_flags_16;
++ goto s_n_llhttp__internal__n_invoke_test_flags_8;
+ case 4:
+- goto s_n_llhttp__internal__n_invoke_or_flags_17;
++ goto s_n_llhttp__internal__n_invoke_or_flags_18;
+ default:
+ goto s_n_llhttp__internal__n_header_value;
+ }
+@@ -12794,7 +13152,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_22: {
++ s_n_llhttp__internal__n_error_25: {
+ state->error = 0xa;
+ state->reason = "Invalid header token";
+ state->error_pos = (const char*) p;
+@@ -12803,8 +13161,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_9: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_10: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_field_general;
+ }
+@@ -12819,8 +13177,8 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_invoke_update_header_state_10: {
+- switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
++ s_n_llhttp__internal__n_invoke_update_header_state_11: {
++ switch (llhttp__internal__c_update_header_state_1(state, p, endp)) {
+ default:
+ goto s_n_llhttp__internal__n_header_field_general;
+ }
+@@ -12860,7 +13218,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_23: {
++ s_n_llhttp__internal__n_error_26: {
+ state->error = 0x7;
+ state->reason = "Expected CRLF";
+ state->error_pos = (const char*) p;
+@@ -12886,7 +13244,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_24: {
++ s_n_llhttp__internal__n_error_27: {
+ state->error = 0x9;
+ state->reason = "Expected CRLF after version";
+ state->error_pos = (const char*) p;
+@@ -12903,7 +13261,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_25: {
++ s_n_llhttp__internal__n_error_28: {
+ state->error = 0x9;
+ state->reason = "Invalid minor version";
+ state->error_pos = (const char*) p;
+@@ -12912,7 +13270,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_26: {
++ s_n_llhttp__internal__n_error_29: {
+ state->error = 0x9;
+ state->reason = "Expected dot";
+ state->error_pos = (const char*) p;
+@@ -12929,7 +13287,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_27: {
++ s_n_llhttp__internal__n_error_30: {
+ state->error = 0x9;
+ state->reason = "Invalid major version";
+ state->error_pos = (const char*) p;
+@@ -12938,7 +13296,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_29: {
++ s_n_llhttp__internal__n_error_32: {
+ state->error = 0x8;
+ state->reason = "Expected HTTP/";
+ state->error_pos = (const char*) p;
+@@ -12947,7 +13305,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_28: {
++ s_n_llhttp__internal__n_error_31: {
+ state->error = 0x8;
+ state->reason = "Expected SOURCE method for ICE/x.x request";
+ state->error_pos = (const char*) p;
+@@ -12959,7 +13317,7 @@
+ s_n_llhttp__internal__n_invoke_is_equal_method_1: {
+ switch (llhttp__internal__c_is_equal_method_1(state, p, endp)) {
+ case 0:
+- goto s_n_llhttp__internal__n_error_28;
++ goto s_n_llhttp__internal__n_error_31;
+ default:
+ goto s_n_llhttp__internal__n_req_http_major;
+ }
+@@ -13034,7 +13392,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_30: {
++ s_n_llhttp__internal__n_error_33: {
+ state->error = 0x7;
+ state->reason = "Invalid char in url fragment start";
+ state->error_pos = (const char*) p;
+@@ -13094,7 +13452,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_31: {
++ s_n_llhttp__internal__n_error_34: {
+ state->error = 0x7;
+ state->reason = "Invalid char in url query";
+ state->error_pos = (const char*) p;
+@@ -13103,7 +13461,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_32: {
++ s_n_llhttp__internal__n_error_35: {
+ state->error = 0x7;
+ state->reason = "Invalid char in url path";
+ state->error_pos = (const char*) p;
+@@ -13214,7 +13572,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_33: {
++ s_n_llhttp__internal__n_error_36: {
+ state->error = 0x7;
+ state->reason = "Double @ in url";
+ state->error_pos = (const char*) p;
+@@ -13223,7 +13581,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_34: {
++ s_n_llhttp__internal__n_error_37: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url server";
+ state->error_pos = (const char*) p;
+@@ -13232,7 +13590,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_35: {
++ s_n_llhttp__internal__n_error_38: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url server";
+ state->error_pos = (const char*) p;
+@@ -13241,7 +13599,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_37: {
++ s_n_llhttp__internal__n_error_40: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url schema";
+ state->error_pos = (const char*) p;
+@@ -13250,7 +13608,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_38: {
++ s_n_llhttp__internal__n_error_41: {
+ state->error = 0x7;
+ state->reason = "Unexpected char in url schema";
+ state->error_pos = (const char*) p;
+@@ -13259,7 +13617,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_39: {
++ s_n_llhttp__internal__n_error_42: {
+ state->error = 0x7;
+ state->reason = "Unexpected start char in url";
+ state->error_pos = (const char*) p;
+@@ -13278,7 +13636,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_40: {
++ s_n_llhttp__internal__n_error_43: {
+ state->error = 0x6;
+ state->reason = "Expected space after method";
+ state->error_pos = (const char*) p;
+@@ -13295,7 +13653,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_48: {
++ s_n_llhttp__internal__n_error_51: {
+ state->error = 0x6;
+ state->reason = "Invalid method encountered";
+ state->error_pos = (const char*) p;
+@@ -13304,7 +13662,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_41: {
++ s_n_llhttp__internal__n_error_44: {
+ state->error = 0xd;
+ state->reason = "Response overflow";
+ state->error_pos = (const char*) p;
+@@ -13316,7 +13674,7 @@
+ s_n_llhttp__internal__n_invoke_mul_add_status_code: {
+ switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) {
+ case 1:
+- goto s_n_llhttp__internal__n_error_41;
++ goto s_n_llhttp__internal__n_error_44;
+ default:
+ goto s_n_llhttp__internal__n_res_status_code;
+ }
+@@ -13359,7 +13717,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_42: {
++ s_n_llhttp__internal__n_error_45: {
+ state->error = 0xd;
+ state->reason = "Invalid response status";
+ state->error_pos = (const char*) p;
+@@ -13376,7 +13734,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_43: {
++ s_n_llhttp__internal__n_error_46: {
+ state->error = 0x9;
+ state->reason = "Expected space after version";
+ state->error_pos = (const char*) p;
+@@ -13393,7 +13751,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_44: {
++ s_n_llhttp__internal__n_error_47: {
+ state->error = 0x9;
+ state->reason = "Invalid minor version";
+ state->error_pos = (const char*) p;
+@@ -13402,7 +13760,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_45: {
++ s_n_llhttp__internal__n_error_48: {
+ state->error = 0x9;
+ state->reason = "Expected dot";
+ state->error_pos = (const char*) p;
+@@ -13419,7 +13777,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_46: {
++ s_n_llhttp__internal__n_error_49: {
+ state->error = 0x9;
+ state->reason = "Invalid major version";
+ state->error_pos = (const char*) p;
+@@ -13428,7 +13786,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_49: {
++ s_n_llhttp__internal__n_error_52: {
+ state->error = 0x8;
+ state->reason = "Expected HTTP/";
+ state->error_pos = (const char*) p;
+@@ -13453,7 +13811,7 @@
+ /* UNREACHABLE */;
+ abort();
+ }
+- s_n_llhttp__internal__n_error_47: {
++ s_n_llhttp__internal__n_error_50: {
+ state->error = 0x8;
+ state->reason = "Invalid word encountered";
+ state->error_pos = (const char*) p;
+--- nodejs-12.22.12~dfsg/test/parallel/test-http-invalid-te.js
++++ nodejs-12.22.12~dfsg/test/parallel/test-http-invalid-te.js
+@@ -13,7 +13,7 @@ Content-Type: text/plain; charset=utf-8
+ Host: hacker.exploit.com
+ Connection: keep-alive
+ Content-Length: 10
+-Transfer-Encoding: chunked, eee
++Transfer-Encoding: eee, chunked
+
+ HELLOWORLDPOST / HTTP/1.1
+ Content-Type: text/plain; charset=utf-8
+--- nodejs-12.22.12~dfsg/test/parallel/test-http-missing-header-separator-cr.js
++++ nodejs-12.22.12~dfsg/test/parallel/test-http-missing-header-separator-cr.js
+@@ -0,0 +1,83 @@
++'use strict';
++
++const common = require('../common');
++const assert = require('assert');
++
++const http = require('http');
++const net = require('net');
++
++function serverHandler(server, msg) {
++ const client = net.connect(server.address().port, 'localhost');
++
++ let response = '';
++
++ client.on('data', common.mustCall((chunk) => {
++ response += chunk.toString('utf-8');
++ }));
++
++ client.setEncoding('utf8');
++ client.on('error', common.mustNotCall());
++ client.on('end', common.mustCall(() => {
++ assert.strictEqual(
++ response,
++ 'HTTP/1.1 400 Bad Request\r\nConnection: close\r\n\r\n'
++ );
++ server.close();
++ }));
++ client.write(msg);
++ client.resume();
++}
++
++{
++ const msg = [
++ 'GET / HTTP/1.1',
++ 'Host: localhost',
++ 'Dummy: x\nContent-Length: 23',
++ '',
++ 'GET / HTTP/1.1',
++ 'Dummy: GET /admin HTTP/1.1',
++ 'Host: localhost',
++ '',
++ '',
++ ].join('\r\n');
++
++ const server = http.createServer(common.mustNotCall());
++
++ server.listen(0, common.mustCall(serverHandler.bind(null, server, msg)));
++}
++
++{
++ const msg = [
++ 'POST / HTTP/1.1',
++ 'Host: localhost',
++ 'x:x\nTransfer-Encoding: chunked',
++ '',
++ '1',
++ 'A',
++ '0',
++ '',
++ '',
++ ].join('\r\n');
++
++ const server = http.createServer(common.mustNotCall());
++
++ server.listen(0, common.mustCall(serverHandler.bind(null, server, msg)));
++}
++
++{
++ const msg = [
++ 'POST / HTTP/1.1',
++ 'Host: localhost',
++ 'x:\nTransfer-Encoding: chunked',
++ '',
++ '1',
++ 'A',
++ '0',
++ '',
++ '',
++ ].join('\r\n');
++
++ const server = http.createServer(common.mustNotCall());
++
++ server.listen(0, common.mustCall(serverHandler.bind(null, server, msg)));
++}
+--- /dev/null
++++ nodejs-12.22.12~dfsg/test/parallel/test-http-transfer-encoding-repeated-chunked.js
+@@ -0,0 +1,51 @@
++'use strict';
++
++const common = require('../common');
++const assert = require('assert');
++
++const http = require('http');
++const net = require('net');
++
++const msg = [
++ 'POST / HTTP/1.1',
++ 'Host: 127.0.0.1',
++ 'Transfer-Encoding: chunkedchunked',
++ '',
++ '1',
++ 'A',
++ '0',
++ '',
++].join('\r\n');
++
++const server = http.createServer(common.mustCall((req, res) => {
++ // Verify that no data is received
++
++ req.on('data', common.mustNotCall());
++
++ req.on('end', common.mustNotCall(() => {
++ res.writeHead(200, { 'Content-Type': 'text/plain' });
++ res.end();
++ }));
++}, 1));
++
++server.listen(0, common.mustCall(() => {
++ const client = net.connect(server.address().port, 'localhost');
++
++ let response = '';
++
++ client.on('data', common.mustCall((chunk) => {
++ response += chunk.toString('utf-8');
++ }));
++
++ client.setEncoding('utf8');
++ client.on('error', common.mustNotCall());
++ client.on('end', common.mustCall(() => {
++ assert.strictEqual(
++ response,
++ 'HTTP/1.1 400 Bad Request\r\nConnection: close\r\n\r\n'
++ );
++ server.close();
++ }));
++ client.write(msg);
++ client.resume();
++}));
+--- nodejs-12.22.12~dfsg/test/parallel/test-http-transfer-encoding-smuggling.js
++++ nodejs-12.22.12~dfsg/test/parallel/test-http-transfer-encoding-smuggling.js
+@@ -1,46 +1,89 @@
+ 'use strict';
+
+ const common = require('../common');
+-
+ const assert = require('assert');
++
+ const http = require('http');
+ const net = require('net');
+
+-const msg = [
+- 'POST / HTTP/1.1',
+- 'Host: 127.0.0.1',
+- 'Transfer-Encoding: chunked',
+- 'Transfer-Encoding: chunked-false',
+- 'Connection: upgrade',
+- '',
+- '1',
+- 'A',
+- '0',
+- '',
+- 'GET /flag HTTP/1.1',
+- 'Host: 127.0.0.1',
+- '',
+- '',
+-].join('\r\n');
+-
+-// Verify that the server is called only once even with a smuggled request.
+-
+-const server = http.createServer(common.mustCall((req, res) => {
+- res.end();
+-}, 1));
+-
+-function send(next) {
+- const client = net.connect(server.address().port, 'localhost');
+- client.setEncoding('utf8');
+- client.on('error', common.mustNotCall());
+- client.on('end', next);
+- client.write(msg);
+- client.resume();
++{
++ const msg = [
++ 'POST / HTTP/1.1',
++ 'Host: 127.0.0.1',
++ 'Transfer-Encoding: chunked',
++ 'Transfer-Encoding: chunked-false',
++ 'Connection: upgrade',
++ '',
++ '1',
++ 'A',
++ '0',
++ '',
++ 'GET /flag HTTP/1.1',
++ 'Host: 127.0.0.1',
++ '',
++ '',
++ ].join('\r\n');
++
++ const server = http.createServer(common.mustNotCall((req, res) => {
++ res.end();
++ }, 1));
++
++ server.listen(0, common.mustCall(() => {
++ const client = net.connect(server.address().port, 'localhost');
++
++ let response = '';
++
++ // Verify that the server listener is never called
++
++ client.on('data', common.mustCall((chunk) => {
++ response += chunk.toString('utf-8');
++ }));
++
++ client.setEncoding('utf8');
++ client.on('error', common.mustNotCall());
++ client.on('end', common.mustCall(() => {
++ assert.strictEqual(
++ response,
++ 'HTTP/1.1 400 Bad Request\r\nConnection: close\r\n\r\n'
++ );
++ server.close();
++ }));
++ client.write(msg);
++ client.resume();
++ }));
+ }
+
+-server.listen(0, common.mustCall((err) => {
+- assert.ifError(err);
+- send(common.mustCall(() => {
+- server.close();
++{
++ const msg = [
++ 'POST / HTTP/1.1',
++ 'Host: 127.0.0.1',
++ 'Transfer-Encoding: chunked',
++ ' , chunked-false',
++ 'Connection: upgrade',
++ '',
++ '1',
++ 'A',
++ '0',
++ '',
++ 'GET /flag HTTP/1.1',
++ 'Host: 127.0.0.1',
++ '',
++ '',
++ ].join('\r\n');
++
++ const server = http.createServer(common.mustCall((request, response) => {
++ assert.notStrictEqual(request.url, '/admin');
++ response.end('hello world');
++ }), 1);
++
++ server.listen(0, common.mustCall(() => {
++ const client = net.connect(server.address().port, 'localhost');
++
++ client.on('end', common.mustCall(function() {
++ server.close();
++ }));
++
++ client.write(msg);
++ client.resume();
+ }));
+-}));
++}
+--- nodejs-12.22.12~dfsg/test/parallel/test-http-header-overflow.js
++++ nodejs-12.22.12~dfsg/test/parallel/test-http-header-overflow.js
+@@ -1,3 +1,5 @@
++// Flags: --expose-internals
++
+ 'use strict';
+ const { expectsError, mustCall } = require('../common');
+ const assert = require('assert');
+@@ -8,7 +10,7 @@ const CRLF = '\r\n';
+ const DUMMY_HEADER_NAME = 'Cookie: ';
+ const DUMMY_HEADER_VALUE = 'a'.repeat(
+ // Plus one is to make it 1 byte too big
+- maxHeaderSize - DUMMY_HEADER_NAME.length - (2 * CRLF.length) + 1
++ maxHeaderSize - DUMMY_HEADER_NAME.length + 2
+ );
+ const PAYLOAD_GET = 'GET /blah HTTP/1.1';
+ const PAYLOAD = PAYLOAD_GET + CRLF +
+@@ -21,7 +23,7 @@ server.on('connection', mustCall((socket
+ name: 'Error',
+ message: 'Parse Error: Header overflow',
+ code: 'HPE_HEADER_OVERFLOW',
+- bytesParsed: maxHeaderSize + PAYLOAD_GET.length,
++ bytesParsed: maxHeaderSize + PAYLOAD_GET.length + (CRLF.length * 2) + 1,
+ rawPacket: Buffer.from(PAYLOAD)
+ }));
+ }));
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/gcc13.patch b/meta-oe/recipes-devtools/nodejs/nodejs/gcc13.patch
new file mode 100644
index 0000000000..dd21af6b3a
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/gcc13.patch
@@ -0,0 +1,63 @@
+From 576aed71db7b40c90b44c623580629792a606928 Mon Sep 17 00:00:00 2001
+From: Jiawen Geng <technicalcute@gmail.com>
+Date: Fri, 14 Oct 2022 09:54:33 +0800
+Subject: [PATCH] deps: V8: cherry-pick c2792e58035f
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Original commit message:
+
+ [base] Fix build with gcc-13
+
+ See https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes.
+
+ Also see Gentoo Linux bug report: https://bugs.gentoo.org/865981
+
+ Change-Id: I421f396b02ba37e12ee70048ee33e034f8113566
+ Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3934140
+ Reviewed-by: Clemens Backes <clemensb@chromium.org>
+ Reviewed-by: Simon Zund <szuend@chromium.org>
+ Commit-Queue: Clemens Backes <clemensb@chromium.org>
+ Cr-Commit-Position: refs/heads/main@{#83587}
+
+Refs: https://github.com/v8/v8/commit/c2792e58035fcbaa16d0cb70998852fbeb5df4cc
+PR-URL: https://github.com/nodejs/node/pull/44961
+Fixes: https://github.com/nodejs/node/issues/43642
+Reviewed-By: Michael Zasso <targos@protonmail.com>
+Reviewed-By: Richard Lau <rlau@redhat.com>
+Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
+Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
+
+Upstream-Status: Backport [https://github.com/nodejs/node/commit/0be1c5728173ea9ac42843058e26b6268568acf0]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ deps/v8/AUTHORS | 1 +
+ deps/v8/src/base/logging.h | 1 +
+ deps/v8/src/inspector/v8-string-conversions.h | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/deps/v8/src/base/logging.h b/deps/v8/src/base/logging.h
+index 08db24a9..38be165f 100644
+--- a/deps/v8/src/base/logging.h
++++ b/deps/v8/src/base/logging.h
+@@ -5,6 +5,7 @@
+ #ifndef V8_BASE_LOGGING_H_
+ #define V8_BASE_LOGGING_H_
+
++#include <cstdint>
+ #include <cstring>
+ #include <sstream>
+ #include <string>
+diff --git a/deps/v8/src/inspector/v8-string-conversions.h b/deps/v8/src/inspector/v8-string-conversions.h
+index c1d69c18..eb33c681 100644
+--- a/deps/v8/src/inspector/v8-string-conversions.h
++++ b/deps/v8/src/inspector/v8-string-conversions.h
+@@ -5,6 +5,7 @@
+ #ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
+ #define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
+
++#include <cstdint>
+ #include <string>
+
+ // Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic-nodejs14.patch b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic-nodejs14.patch
new file mode 100644
index 0000000000..cdf6bc8e23
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic-nodejs14.patch
@@ -0,0 +1,21 @@
+Link mksnapshot with libatomic on x86
+
+Clang-12 on x86 emits atomic builtins
+
+Fixes
+| module-compiler.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x558): un
+defined reference to `__atomic_load'
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/tools/v8_gypfiles/v8.gyp
++++ b/tools/v8_gypfiles/v8.gyp
+@@ -1336,6 +1336,7 @@
+ {
+ 'target_name': 'mksnapshot',
+ 'type': 'executable',
++ 'libraries': [ '-latomic' ],
+ 'dependencies': [
+ 'v8_base_without_compiler',
+ 'v8_compiler_for_mksnapshot',
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory-nodejs14.patch b/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory-nodejs14.patch
new file mode 100644
index 0000000000..21a2281231
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory-nodejs14.patch
@@ -0,0 +1,32 @@
+Description: mksnapshot uses too much memory on 32-bit mipsel
+Author: Jérémy Lal <kapouer@melix.org>
+Last-Update: 2020-06-03
+Forwarded: https://bugs.chromium.org/p/v8/issues/detail?id=10586
+
+This ensures that we reserve 500M instead of 2G range for codegen
+ensures that qemu-mips can allocate such large ranges
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/deps/v8/src/common/globals.h
++++ b/deps/v8/src/common/globals.h
+@@ -224,7 +224,7 @@ constexpr size_t kMinimumCodeRangeSize =
+ constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux
+ #elif V8_TARGET_ARCH_MIPS
+ constexpr bool kPlatformRequiresCodeRange = false;
+-constexpr size_t kMaximalCodeRangeSize = 2048LL * MB;
++constexpr size_t kMaximalCodeRangeSize = 512 * MB;
+ constexpr size_t kMinimumCodeRangeSize = 0 * MB;
+ constexpr size_t kMinExpectedOSPageSize = 4 * KB; // OS page.
+ #else
+--- a/deps/v8/src/codegen/mips/constants-mips.h
++++ b/deps/v8/src/codegen/mips/constants-mips.h
+@@ -140,7 +140,7 @@ const uint32_t kLeastSignificantByteInIn
+ namespace v8 {
+ namespace internal {
+
+-constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096;
++constexpr size_t kMaxPCRelativeCodeRangeInMB = 1024;
+
+ // -----------------------------------------------------------------------------
+ // Registers and FPURegisters.
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/python-3.11-invalid-mode-rU.patch b/meta-oe/recipes-devtools/nodejs/nodejs/python-3.11-invalid-mode-rU.patch
new file mode 100644
index 0000000000..588ffc1eee
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/python-3.11-invalid-mode-rU.patch
@@ -0,0 +1,46 @@
+From e4d6f2e4091a4c7b6f3281be0e281b32ee6e5a33 Mon Sep 17 00:00:00 2001
+From: Christian Clauss <cclauss@me.com>
+Date: Thu, 26 Nov 2020 12:39:11 +0100
+Subject: [PATCH] Fix ValueError: invalid mode: 'rU' while trying to load
+ binding.gyp
+
+Fixes nodejs/node-gyp#2219
+File mode `U` is deprecated in Python 3 https://docs.python.org/3/library/functions.html#open
+https://github.com/asottile/pyupgrade#redundant-open-modes
+
+Upstream-Status: Backport [https://github.com/nodejs/gyp-next/commit/3f8cb33ea4d191df41f4fb7a1dfbd302507f7260]
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py | 2 +-
+ tools/gyp/pylib/gyp/input.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
+index d174280..2f34bc0 100644
+--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
++++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
+@@ -226,7 +226,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes,
+ # Open the build file for read ('r') with universal-newlines mode ('U')
+ # to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n'
+ # which otherwise will fail eval()
+- if sys.platform == 'zos':
++ if PY3 or sys.platform == 'zos':
+ # On z/OS, universal-newlines mode treats the file as an ascii file. But since
+ # node-gyp produces ebcdic files, do not use that mode.
+ build_file_contents = open(build_file_path, 'r').read()
+diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py
+index 1f40abb..fd12e78 100644
+--- a/tools/gyp/pylib/gyp/input.py
++++ b/tools/gyp/pylib/gyp/input.py
+@@ -226,7 +226,7 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes,
+ # Open the build file for read ('r') with universal-newlines mode ('U')
+ # to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n'
+ # which otherwise will fail eval()
+- if sys.platform == 'zos':
++ if PY3 or sys.platform == 'zos':
+ # On z/OS, universal-newlines mode treats the file as an ascii file. But since
+ # node-gyp produces ebcdic files, do not use that mode.
+ build_file_contents = open(build_file_path, 'r').read()
+--
+2.38.1
+
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.22.12.bb
index b9e3821776..f004671a6e 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.22.12.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
HOMEPAGE = "http://nodejs.org"
LICENSE = "MIT & BSD & Artistic-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8c66ff8861d9f96076a7cb61e3d75f54"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=93997aa7a45ba0f25f9c61aaab153ab8"
DEPENDS = "openssl"
DEPENDS_append_class-target = " nodejs-native"
@@ -22,14 +22,22 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
file://big-endian.patch \
file://mips-warnings.patch \
file://0001-Remove-use-of-register-r7-because-llvm-now-issues-an.patch \
+ file://CVE-2022-32212.patch \
+ file://CVE-2022-35255.patch \
+ file://CVE-2022-43548.patch \
+ file://CVE-llhttp.patch \
+ file://python-3.11-invalid-mode-rU.patch \
+ file://gcc13.patch \
"
SRC_URI_append_class-target = " \
file://0002-Using-native-binaries.patch \
"
-SRC_URI[sha256sum] = "052f37ace6f569b513b5a1154b2a45d3c4d8b07d7d7c807b79f1566db61e979d"
+SRC_URI[sha256sum] = "bc42b7f8495b9bfc7f7850dd180bb02a5bdf139cc232b8c6f02a6967e20714f2"
S = "${WORKDIR}/node-v${PV}"
+CVE_PRODUCT += "node.js"
+
# v8 errors out if you have set CCACHE
CCACHE = ""
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_14.18.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_14.18.1.bb
new file mode 100644
index 0000000000..b64a57f941
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_14.18.1.bb
@@ -0,0 +1,211 @@
+DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
+HOMEPAGE = "http://nodejs.org"
+LICENSE = "MIT & BSD & Artistic-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6768abdfc4dae4fde59d6b4df96930f3"
+
+DEFAULT_PREFERENCE = "-1"
+
+DEPENDS = "openssl"
+DEPENDS:append:class-target = " qemu-native"
+DEPENDS:append:class-native = " c-ares-native"
+
+inherit pkgconfig python3native qemu
+
+COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*"
+COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*"
+COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*"
+
+COMPATIBLE_HOST:riscv64 = "null"
+COMPATIBLE_HOST:riscv32 = "null"
+
+SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
+ file://0001-Disable-running-gyp-files-for-bundled-deps-nodejs14.patch \
+ file://0003-Install-both-binaries-and-use-libdir-nodejs14.patch \
+ file://0004-v8-don-t-override-ARM-CFLAGS.patch \
+ file://big-endian.patch \
+ file://mips-warnings.patch \
+ file://mips-less-memory-nodejs14.patch \
+ file://0001-jinja-tests.py-add-py-3.10-fix-nodejs14.patch \
+ file://CVE-2022-32212.patch \
+ file://CVE-2022-35255.patch \
+ file://CVE-2022-43548.patch \
+ file://gcc13.patch \
+ "
+SRC_URI:append:class-target = " \
+ file://0002-Using-native-binaries-nodejs14.patch \
+ "
+SRC_URI:append:toolchain-clang:x86 = " \
+ file://libatomic-nodejs14.patch \
+ "
+SRC_URI:append:toolchain-clang:powerpc64le = " \
+ file://0001-ppc64-Do-not-use-mminimal-toc-with-clang-nodejs14.patch \
+ "
+SRC_URI[sha256sum] = "3fa1d71adddfab2f5e3e41874b4eddbdf92b65cade4a43922fb1e437afcf89ed"
+
+S = "${WORKDIR}/node-v${PV}"
+
+CVE_PRODUCT += "node.js"
+
+# v8 errors out if you have set CCACHE
+CCACHE = ""
+
+def map_nodejs_arch(a, d):
+ import re
+
+ if re.match('i.86$', a): return 'ia32'
+ elif re.match('x86_64$', a): return 'x64'
+ elif re.match('aarch64$', a): return 'arm64'
+ elif re.match('(powerpc64|powerpc64le|ppc64le)$', a): return 'ppc64'
+ elif re.match('powerpc$', a): return 'ppc'
+ return a
+
+ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
+ ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
+ bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
+ bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
+ '--with-arm-fpu=vfp', d), d), d)}"
+GYP_DEFINES:append:mipsel = " mips_arch_variant='r1' "
+ARCHFLAGS ?= ""
+
+PACKAGECONFIG ??= "brotli icu zlib"
+
+PACKAGECONFIG[ares] = "--shared-cares,,c-ares"
+PACKAGECONFIG[brotli] = "--shared-brotli,,brotli"
+PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu"
+PACKAGECONFIG[libuv] = "--shared-libuv,,libuv"
+PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2"
+PACKAGECONFIG[shared] = "--shared"
+PACKAGECONFIG[zlib] = "--shared-zlib,,zlib"
+
+# We don't want to cross-compile during target compile,
+# and we need to use the right flags during host compile,
+# too.
+EXTRA_OEMAKE = "\
+ CC.host='${CC}' \
+ CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \
+ CXX.host='${CXX}' \
+ CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \
+ LDFLAGS.host='${LDFLAGS}' \
+ AR.host='${AR}' \
+ \
+ builddir_name=./ \
+"
+
+python do_unpack() {
+ import shutil
+
+ bb.build.exec_func('base_do_unpack', d)
+
+ if 'ares' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/cares', True)
+ if 'brotli' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/brotli', True)
+ if 'libuv' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/uv', True)
+ if 'nghttp2' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True)
+ if 'zlib' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/zlib', True)
+}
+
+# V8's JIT infrastructure requires binaries such as mksnapshot and
+# mkpeephole to be run in the host during the build. However, these
+# binaries must have the same bit-width as the target (e.g. a x86_64
+# host targeting ARMv6 needs to produce a 32-bit binary). Instead of
+# depending on a third Yocto toolchain, we just build those binaries
+# for the target and run them on the host with QEMU.
+python do_create_v8_qemu_wrapper () {
+ """Creates a small wrapper that invokes QEMU to run some target V8 binaries
+ on the host."""
+ qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'),
+ d.expand('${STAGING_DIR_HOST}${base_libdir}')]
+ qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST', True),
+ qemu_libdirs)
+ wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh')
+ with open(wrapper_path, 'w') as wrapper_file:
+ wrapper_file.write("""#!/bin/sh
+
+# This file has been generated automatically.
+# It invokes QEMU to run binaries built for the target in the host during the
+# build process.
+
+%s "$@"
+""" % qemu_cmd)
+ os.chmod(wrapper_path, 0o755)
+}
+
+do_create_v8_qemu_wrapper[dirs] = "${B}"
+addtask create_v8_qemu_wrapper after do_configure before do_compile
+
+# Work around compatibility issues with gcc-13 on host
+BUILD_CXXFLAGS += "-fpermissive"
+
+LDFLAGS:append:x86 = " -latomic"
+
+# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
+do_configure () {
+ export LD="${CXX}"
+ GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
+ # $TARGET_ARCH settings don't match --dest-cpu settings
+ python3 configure.py --prefix=${prefix} --cross-compiling \
+ --without-dtrace \
+ --without-etw \
+ --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
+ --dest-os=linux \
+ --libdir=${D}${libdir} \
+ ${ARCHFLAGS} \
+ ${PACKAGECONFIG_CONFARGS}
+}
+
+do_compile () {
+ export LD="${CXX}"
+ install -Dm 0755 ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh
+ oe_runmake BUILDTYPE=Release
+}
+
+do_install () {
+ oe_runmake install DESTDIR=${D}
+
+ # wasn't updated since 2009 and is the only thing requiring python2 in runtime
+ # ERROR: nodejs-12.14.1-r0 do_package_qa: QA Issue: /usr/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples contained in package nodejs-npm requires /usr/bin/python, but no providers found in RDEPENDS:nodejs-npm? [file-rdeps]
+ rm -f ${D}${exec_prefix}/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples
+}
+
+do_install:append:class-native() {
+ # use node from PATH instead of absolute path to sysroot
+ # node-v0.10.25/tools/install.py is using:
+ # shebang = os.path.join(node_prefix, 'bin/node')
+ # update_shebang(link_path, shebang)
+ # and node_prefix can be very long path to bindir in native sysroot and
+ # when it exceeds 128 character shebang limit it's stripped to incorrect path
+ # and npm fails to execute like in this case with 133 characters show in log.do_install:
+ # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node
+ # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
+ # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
+ # npm-cli.js continues to use old shebang
+ sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+
+ # Install the native binaries to provide it within sysroot for the target compilation
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque
+ install -m 0755 ${S}/out/Release/bytecode_builtins_list_generator ${D}${bindir}/bytecode_builtins_list_generator
+ if ${@bb.utils.contains('PACKAGECONFIG','icu','true','false',d)}; then
+ install -m 0755 ${S}/out/Release/gen-regexp-special-case ${D}${bindir}/gen-regexp-special-case
+ fi
+ install -m 0755 ${S}/out/Release/mkcodecache ${D}${bindir}/mkcodecache
+ install -m 0755 ${S}/out/Release/node_mksnapshot ${D}${bindir}/node_mksnapshot
+}
+
+do_install:append:class-target() {
+ sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+}
+
+PACKAGES =+ "${PN}-npm"
+FILES:${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
+RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \
+ python3-misc python3-multiprocessing"
+
+PACKAGES =+ "${PN}-systemtap"
+FILES:${PN}-systemtap = "${datadir}/systemtap"
+
+BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-devtools/openocd/openocd_git.bb b/meta-oe/recipes-devtools/openocd/openocd_git.bb
index e95f1cfa54..9ff23d17af 100644
--- a/meta-oe/recipes-devtools/openocd/openocd_git.bb
+++ b/meta-oe/recipes-devtools/openocd/openocd_git.bb
@@ -5,10 +5,10 @@ DEPENDS = "libusb-compat libftdi"
RDEPENDS_${PN} = "libusb1"
SRC_URI = " \
- git://repo.or.cz/openocd.git;protocol=http;name=openocd \
- git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl \
- git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl \
- git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink \
+ git://repo.or.cz/openocd.git;protocol=http;name=openocd;branch=master \
+ git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl;branch=master \
+ git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl;branch=master \
+ git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \
file://0001-Do-not-include-syscrtl.h-with-glibc.patch \
"
diff --git a/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb b/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb
index 107d5a8b72..84f6c3ce24 100644
--- a/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb
+++ b/meta-oe/recipes-devtools/pcimem/pcimem_2.0.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
COMPATIBLE_HOST = "(x86_64|aarch64|arm)"
SRCREV = "09724edb1783a98da2b7ae53c5aaa87493aabc9b"
-SRC_URI = "git://github.com/billfarrow/pcimem.git "
+SRC_URI = "git://github.com/billfarrow/pcimem.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/perl/ipc-run_20180523.0.bb b/meta-oe/recipes-devtools/perl/ipc-run_20180523.0.bb
index c812ae1374..03812e901b 100644
--- a/meta-oe/recipes-devtools/perl/ipc-run_20180523.0.bb
+++ b/meta-oe/recipes-devtools/perl/ipc-run_20180523.0.bb
@@ -9,7 +9,7 @@ LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0ebd37caf53781e8b7223e6b99b63f4e"
DEPENDS = "perl"
-SRC_URI = "git://github.com/toddr/IPC-Run.git"
+SRC_URI = "git://github.com/toddr/IPC-Run.git;branch=master;protocol=https"
SRCREV = "0b409702490729eeb97ae65f5b94d949ec083134"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb
index 049dc665dd..760c0ad0a5 100644
--- a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb
+++ b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb
@@ -15,7 +15,7 @@ DEPENDS += "libdev-checklib-perl-native libdbi-perl-native libmysqlclient"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c"
SRCREV = "9b5b70ea372f49fe9bc9e592dae3870596d1e3d6"
-SRC_URI = "git://github.com/perl5-dbi/DBD-mysql.git;protocol=https"
+SRC_URI = "git://github.com/perl5-dbi/DBD-mysql.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb b/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
index 4e5a8a6ff2..29bc99e141 100644
--- a/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
+++ b/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://README;beginline=1171;endline=1176;md5=3be2cb8159d094
DEPENDS += "perl"
-SRC_URI = "git://github.com/makamaka/JSON.git;protocol=https"
+SRC_URI = "git://github.com/makamaka/JSON.git;protocol=https;branch=master"
SRCREV = "42a6324df654e92419512cee80c0b49155d9e56d"
diff --git a/meta-oe/recipes-devtools/php/php/CVE-2022-4900.patch b/meta-oe/recipes-devtools/php/php/CVE-2022-4900.patch
new file mode 100644
index 0000000000..4bfd94c9fd
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/CVE-2022-4900.patch
@@ -0,0 +1,48 @@
+From 789a37f14405e2d1a05a76c9fb4ed2d49d4580d5 Mon Sep 17 00:00:00 2001
+From: guoyiyuan <yguoaz@gmail.com>
+Date: Wed, 13 Jul 2022 20:55:51 +0800
+Subject: [PATCH] Prevent potential buffer overflow for large value of
+ php_cli_server_workers_max
+
+Fixes #8989.
+Closes #9000
+
+Upstream-Status: Backport [https://github.com/php/php-src/commit/789a37f14405e2d1a05a76c9fb4ed2d49d4580d5]
+CVE: CVE-2022-4900
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ sapi/cli/php_cli_server.c | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
+index c3097861..48f8309d 100644
+--- a/sapi/cli/php_cli_server.c
++++ b/sapi/cli/php_cli_server.c
+@@ -517,13 +517,8 @@ static int sapi_cli_server_startup(sapi_module_struct *sapi_module) /* {{{ */
+ if (php_cli_server_workers_max > 1) {
+ zend_long php_cli_server_worker;
+
+- php_cli_server_workers = calloc(
+- php_cli_server_workers_max, sizeof(pid_t));
+- if (!php_cli_server_workers) {
+- php_cli_server_workers_max = 1;
+-
+- return SUCCESS;
+- }
++ php_cli_server_workers = pecalloc(
++ php_cli_server_workers_max, sizeof(pid_t), 1);
+
+ php_cli_server_master = getpid();
+
+@@ -2361,7 +2356,7 @@ static void php_cli_server_dtor(php_cli_server *server) /* {{{ */
+ !WIFSIGNALED(php_cli_server_worker_status));
+ }
+
+- free(php_cli_server_workers);
++ pefree(php_cli_server_workers, 1);
+ }
+ #endif
+ } /* }}} */
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/CVE-2023-3247-1.patch b/meta-oe/recipes-devtools/php/php/CVE-2023-3247-1.patch
new file mode 100644
index 0000000000..db9e41796c
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/CVE-2023-3247-1.patch
@@ -0,0 +1,87 @@
+From ac4254ad764c70cb1f05c9270d8d12689fc3aeb6 Mon Sep 17 00:00:00 2001
+From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
+Date: Sun, 16 Apr 2023 15:05:03 +0200
+Subject: [PATCH] Fix missing randomness check and insufficient random bytes
+ for SOAP HTTP Digest
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If php_random_bytes_throw fails, the nonce will be uninitialized, but
+still sent to the server. The client nonce is intended to protect
+against a malicious server. See section 5.10 and 5.12 of RFC 7616 [1],
+and bullet point 2 below.
+
+Tim pointed out that even though it's the MD5 of the nonce that gets sent,
+enumerating 31 bits is trivial. So we have still a stack information leak
+of 31 bits.
+
+Furthermore, Tim found the following issues:
+* The small size of cnonce might cause the server to erroneously reject
+ a request due to a repeated (cnonce, nc) pair. As per the birthday
+ problem 31 bits of randomness will return a duplication with 50%
+ chance after less than 55000 requests and nc always starts counting at 1.
+* The cnonce is intended to protect the client and password against a
+ malicious server that returns a constant server nonce where the server
+ precomputed a rainbow table between passwords and correct client response.
+ As storage is fairly cheap, a server could precompute the client responses
+ for (a subset of) client nonces and still have a chance of reversing the
+ client response with the same probability as the cnonce duplication.
+
+ Precomputing the rainbow table for all 2^31 cnonces increases the rainbow
+ table size by factor 2 billion, which is infeasible. But precomputing it
+ for 2^14 cnonces only increases the table size by factor 16k and the server
+ would still have a 10% chance of successfully reversing a password with a
+ single client request.
+
+This patch fixes the issues by increasing the nonce size, and checking
+the return value of php_random_bytes_throw(). In the process we also get
+rid of the MD5 hashing of the nonce.
+
+[1] RFC 7616: https://www.rfc-editor.org/rfc/rfc7616
+
+Co-authored-by: Tim Düsterhus <timwolla@php.net>
+
+Upstream-Status: Backport [https://github.com/php/php-src/commit/ac4254ad764c70cb1f05c9270d8d12689fc3aeb6]
+CVE: CVE-2023-3247
+Signed-off-by: Ashish Sharma <asharma@mvista.com>
+
+ ext/soap/php_http.c | 21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
+index 1da286ad875f..e796dba9619a 100644
+--- a/ext/soap/php_http.c
++++ b/ext/soap/php_http.c
+@@ -664,18 +664,23 @@ int make_http_soap_request(zval *this_ptr,
+ if ((digest = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_digest", sizeof("_digest")-1)) != NULL) {
+ if (Z_TYPE_P(digest) == IS_ARRAY) {
+ char HA1[33], HA2[33], response[33], cnonce[33], nc[9];
+- zend_long nonce;
++ unsigned char nonce[16];
+ PHP_MD5_CTX md5ctx;
+ unsigned char hash[16];
+
+- php_random_bytes_throw(&nonce, sizeof(nonce));
+- nonce &= 0x7fffffff;
++ if (UNEXPECTED(php_random_bytes_throw(&nonce, sizeof(nonce)) != SUCCESS)) {
++ ZEND_ASSERT(EG(exception));
++ php_stream_close(stream);
++ convert_to_null(Z_CLIENT_HTTPURL_P(this_ptr));
++ convert_to_null(Z_CLIENT_HTTPSOCKET_P(this_ptr));
++ convert_to_null(Z_CLIENT_USE_PROXY_P(this_ptr));
++ smart_str_free(&soap_headers_z);
++ smart_str_free(&soap_headers);
++ return FALSE;
++ }
+
+- PHP_MD5Init(&md5ctx);
+- snprintf(cnonce, sizeof(cnonce), ZEND_LONG_FMT, nonce);
+- PHP_MD5Update(&md5ctx, (unsigned char*)cnonce, strlen(cnonce));
+- PHP_MD5Final(hash, &md5ctx);
+- make_digest(cnonce, hash);
++ php_hash_bin2hex(cnonce, nonce, sizeof(nonce));
++ cnonce[32] = 0;
+
+ if ((tmp = zend_hash_str_find(Z_ARRVAL_P(digest), "nc", sizeof("nc")-1)) != NULL &&
+ Z_TYPE_P(tmp) == IS_LONG) {
diff --git a/meta-oe/recipes-devtools/php/php/CVE-2023-3247-2.patch b/meta-oe/recipes-devtools/php/php/CVE-2023-3247-2.patch
new file mode 100644
index 0000000000..80c1961aa1
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/CVE-2023-3247-2.patch
@@ -0,0 +1,29 @@
+From 32c7c433ac1983c4497349051681a4f361d3d33e Mon Sep 17 00:00:00 2001
+From: Pierrick Charron <pierrick@php.net>
+Date: Tue, 6 Jun 2023 18:49:32 -0400
+Subject: [PATCH] Fix wrong backporting of previous soap patch
+
+Upstream-Status: Backport [https://github.com/php/php-src/commit/32c7c433ac1983c4497349051681a4f361d3d33e]
+CVE: CVE-2023-3247
+Signed-off-by: Ashish Sharma <asharma@mvista.com>
+
+ ext/soap/php_http.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
+index 77ed21d4f0f4..37250a6bdcd1 100644
+--- a/ext/soap/php_http.c
++++ b/ext/soap/php_http.c
+@@ -672,9 +672,9 @@ int make_http_soap_request(zval *this_ptr,
+ if (UNEXPECTED(php_random_bytes_throw(&nonce, sizeof(nonce)) != SUCCESS)) {
+ ZEND_ASSERT(EG(exception));
+ php_stream_close(stream);
+- convert_to_null(Z_CLIENT_HTTPURL_P(this_ptr));
+- convert_to_null(Z_CLIENT_HTTPSOCKET_P(this_ptr));
+- convert_to_null(Z_CLIENT_USE_PROXY_P(this_ptr));
++ zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpurl", sizeof("httpurl")-1);
++ zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket")-1);
++ zend_hash_str_del(Z_OBJPROP_P(this_ptr), "_use_proxy", sizeof("_use_proxy")-1);
+ smart_str_free(&soap_headers_z);
+ smart_str_free(&soap_headers);
+ return FALSE;
diff --git a/meta-oe/recipes-devtools/php/php/CVE-2023-3824.patch b/meta-oe/recipes-devtools/php/php/CVE-2023-3824.patch
new file mode 100644
index 0000000000..953b5258e1
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/CVE-2023-3824.patch
@@ -0,0 +1,91 @@
+From 80316123f3e9dcce8ac419bd9dd43546e2ccb5ef Mon Sep 17 00:00:00 2001
+From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
+Date: Mon, 10 Jul 2023 13:25:34 +0200
+Subject: [PATCH] Fix buffer mismanagement in phar_dir_read()
+
+Fixes GHSA-jqcx-ccgc-xwhv.
+
+Upstream-Status: Backport from [https://github.com/php/php-src/commit/80316123f3e9dcce8ac419bd9dd43546e2ccb5ef]
+CVE: CVE-2023-3824
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ ext/phar/dirstream.c | 15 ++++++++------
+ ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt | 27 +++++++++++++++++++++++++
+ 2 files changed, 36 insertions(+), 6 deletions(-)
+ create mode 100644 ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt
+
+diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c
+index 4710703c..490b1452 100644
+--- a/ext/phar/dirstream.c
++++ b/ext/phar/dirstream.c
+@@ -91,25 +91,28 @@ static int phar_dir_seek(php_stream *stream, zend_off_t offset, int whence, zend
+ */
+ static ssize_t phar_dir_read(php_stream *stream, char *buf, size_t count) /* {{{ */
+ {
+- size_t to_read;
+ HashTable *data = (HashTable *)stream->abstract;
+ zend_string *str_key;
+ zend_ulong unused;
+
++ if (count != sizeof(php_stream_dirent)) {
++ return -1;
++ }
++
+ if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key(data, &str_key, &unused)) {
+ return 0;
+ }
+
+ zend_hash_move_forward(data);
+- to_read = MIN(ZSTR_LEN(str_key), count);
+
+- if (to_read == 0 || count < ZSTR_LEN(str_key)) {
++ php_stream_dirent *dirent = (php_stream_dirent *) buf;
++
++ if (sizeof(dirent->d_name) <= ZSTR_LEN(str_key)) {
+ return 0;
+ }
+
+- memset(buf, 0, sizeof(php_stream_dirent));
+- memcpy(((php_stream_dirent *) buf)->d_name, ZSTR_VAL(str_key), to_read);
+- ((php_stream_dirent *) buf)->d_name[to_read + 1] = '\0';
++ memset(dirent, 0, sizeof(php_stream_dirent));
++ PHP_STRLCPY(dirent->d_name, ZSTR_VAL(str_key), sizeof(dirent->d_name), ZSTR_LEN(str_key));
+
+ return sizeof(php_stream_dirent);
+ }
+diff --git a/ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt b/ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt
+new file mode 100644
+index 00000000..4e12f05f
+--- /dev/null
++++ b/ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt
+@@ -0,0 +1,27 @@
++--TEST--
++GHSA-jqcx-ccgc-xwhv (Buffer overflow and overread in phar_dir_read())
++--SKIPIF--
++<?php if (!extension_loaded("phar")) die("skip"); ?>
++--INI--
++phar.readonly=0
++--FILE--
++<?php
++$phar = new Phar(__DIR__. '/GHSA-jqcx-ccgc-xwhv.phar');
++$phar->startBuffering();
++$phar->addFromString(str_repeat('A', PHP_MAXPATHLEN - 1), 'This is the content of file 1.');
++$phar->addFromString(str_repeat('B', PHP_MAXPATHLEN - 1).'C', 'This is the content of file 2.');
++$phar->stopBuffering();
++
++$handle = opendir('phar://' . __DIR__ . '/GHSA-jqcx-ccgc-xwhv.phar');
++var_dump(strlen(readdir($handle)));
++// Must not be a string of length PHP_MAXPATHLEN+1
++var_dump(readdir($handle));
++closedir($handle);
++?>
++--CLEAN--
++<?php
++unlink(__DIR__. '/GHSA-jqcx-ccgc-xwhv.phar');
++?>
++--EXPECTF--
++int(%d)
++bool(false)
+--
+2.24.4
+
diff --git a/meta-oe/recipes-devtools/php/php_7.4.21.bb b/meta-oe/recipes-devtools/php/php_7.4.33.bb
index c7c00ac30e..74606e4883 100644
--- a/meta-oe/recipes-devtools/php/php_7.4.21.bb
+++ b/meta-oe/recipes-devtools/php/php_7.4.33.bb
@@ -16,6 +16,8 @@ SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \
file://debian-php-fixheader.patch \
file://0001-configure.ac-don-t-include-build-libtool.m4.patch \
file://0001-php.m4-don-t-unset-cache-variables.patch \
+ file://CVE-2023-3824.patch \
+ file://CVE-2022-4900.patch \
"
SRC_URI_append_class-target = " \
@@ -30,10 +32,12 @@ SRC_URI_append_class-target = " \
file://phar-makefile.patch \
file://0001-opcache-config.m4-enable-opcache.patch \
file://xfail_two_bug_tests.patch \
+ file://CVE-2023-3247-1.patch \
+ file://CVE-2023-3247-2.patch \
"
S = "${WORKDIR}/php-${PV}"
-SRC_URI[sha256sum] = "36ec6102e757e2c2b7742057a700bbff77c76fa0ccbe9c860398c3d24e32822a"
+SRC_URI[sha256sum] = "4e8117458fe5a475bf203128726b71bcbba61c42ad463dffadee5667a198a98a"
inherit autotools pkgconfig python3native gettext
diff --git a/meta-oe/recipes-devtools/ply/ply_git.bb b/meta-oe/recipes-devtools/ply/ply_git.bb
index 7d693b36da..bf789488d7 100644
--- a/meta-oe/recipes-devtools/ply/ply_git.bb
+++ b/meta-oe/recipes-devtools/ply/ply_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS += "bison-native"
-SRC_URI = "git://github.com/iovisor/ply"
+SRC_URI = "git://github.com/iovisor/ply;branch=master;protocol=https"
SRCREV = "aa5b9ac31307ec1acece818be334ef801c802a12"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/pmtools/pmtools_git.bb b/meta-oe/recipes-devtools/pmtools/pmtools_git.bb
index 9afcbbb7f5..f605d2c90d 100644
--- a/meta-oe/recipes-devtools/pmtools/pmtools_git.bb
+++ b/meta-oe/recipes-devtools/pmtools/pmtools_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
PV = "20130209+git${SRCPV}"
-SRC_URI = "git://github.com/anyc/pmtools.git \
+SRC_URI = "git://github.com/anyc/pmtools.git;branch=master;protocol=https \
file://pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch \
"
SRCREV = "3ebe0e54c54061b4c627236cbe35d820de2e1168"
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb
index ed8773443e..7bc1f23e70 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.3.bb
@@ -14,7 +14,7 @@ DEPENDS = "protobuf-native protobuf"
SRCREV = "f20a3fa131c275a0e795d99a28f94b4dbbb5af26"
-SRC_URI = "git://github.com/protobuf-c/protobuf-c.git \
+SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https \
file://0001-avoid-race-condition.patch \
"
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch b/meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch
new file mode 100644
index 0000000000..bb9594e968
--- /dev/null
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/CVE-2021-22570.patch
@@ -0,0 +1,73 @@
+From f5ce0700d80c776186b0fb0414ef20966a3a6a03 Mon Sep 17 00:00:00 2001
+From: "Sana.Kazi" <Sana.Kazi@kpit.com>
+Date: Wed, 23 Feb 2022 15:50:16 +0530
+Subject: [PATCH] protobuf: Fix CVE-2021-22570
+
+CVE: CVE-2021-22570
+Upstream-Status: Backport [https://src.fedoraproject.org/rpms/protobuf/blob/394beeacb500861f76473d47e10314e6a3600810/f/CVE-2021-22570.patch]
+Comment: Removed first and second hunk
+Signed-off-by: Sana.Kazi <Sana.Kazi@kpit.com>
+
+---
+ src/google/protobuf/descriptor.cc | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc
+index 6835a3cde..1514ae531 100644
+--- a/src/google/protobuf/descriptor.cc
++++ b/src/google/protobuf/descriptor.cc
+@@ -2603,6 +2603,8 @@ void Descriptor::DebugString(int depth, std::string* contents,
+ const Descriptor::ReservedRange* range = reserved_range(i);
+ if (range->end == range->start + 1) {
+ strings::SubstituteAndAppend(contents, "$0, ", range->start);
++ } else if (range->end > FieldDescriptor::kMaxNumber) {
++ strings::SubstituteAndAppend(contents, "$0 to max, ", range->start);
+ } else {
+ strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start,
+ range->end - 1);
+@@ -2815,6 +2817,8 @@ void EnumDescriptor::DebugString(
+ const EnumDescriptor::ReservedRange* range = reserved_range(i);
+ if (range->end == range->start) {
+ strings::SubstituteAndAppend(contents, "$0, ", range->start);
++ } else if (range->end == INT_MAX) {
++ strings::SubstituteAndAppend(contents, "$0 to max, ", range->start);
+ } else {
+ strings::SubstituteAndAppend(contents, "$0 to $1, ", range->start,
+ range->end);
+@@ -4002,6 +4006,11 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name,
+ // Use its file as the parent instead.
+ if (parent == nullptr) parent = file_;
+
++ if (full_name.find('\0') != std::string::npos) {
++ AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME,
++ "\"" + full_name + "\" contains null character.");
++ return false;
++ }
+ if (tables_->AddSymbol(full_name, symbol)) {
+ if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) {
+ // This is only possible if there was already an error adding something of
+@@ -4041,6 +4050,11 @@ bool DescriptorBuilder::AddSymbol(const std::string& full_name,
+ void DescriptorBuilder::AddPackage(const std::string& name,
+ const Message& proto,
+ const FileDescriptor* file) {
++ if (name.find('\0') != std::string::npos) {
++ AddError(name, proto, DescriptorPool::ErrorCollector::NAME,
++ "\"" + name + "\" contains null character.");
++ return;
++ }
+ if (tables_->AddSymbol(name, Symbol(file))) {
+ // Success. Also add parent package, if any.
+ std::string::size_type dot_pos = name.find_last_of('.');
+@@ -4354,6 +4368,12 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
+ }
+ result->pool_ = pool_;
+
++ if (result->name().find('\0') != std::string::npos) {
++ AddError(result->name(), proto, DescriptorPool::ErrorCollector::NAME,
++ "\"" + result->name() + "\" contains null character.");
++ return nullptr;
++ }
++
+ // Add to tables.
+ if (!tables_->AddFile(result)) {
+ AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER,
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb
index 4d6c5b2557..55d56ff08e 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb
@@ -12,11 +12,12 @@ DEPENDS_append_class-target = " protobuf-native"
SRCREV = "d0bfd5221182da1a7cc280f3337b5e41a89539cf"
-SRC_URI = "git://github.com/google/protobuf.git;branch=3.11.x \
+SRC_URI = "git://github.com/google/protobuf.git;branch=3.11.x;protocol=https \
file://run-ptest \
file://0001-protobuf-fix-configure-error.patch \
file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \
file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
+ file://CVE-2021-22570.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
index 5b5c8b2570..bc90bffe5e 100644
--- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
+++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125"
-SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1"
+SRC_URI = "git://github.com/miloyip/rapidjson.git;branch=master;protocol=https"
SRCREV = "0ccdbf364c577803e2a751f5aededce935314313"
diff --git a/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb b/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb
index cd5e0a4e5c..20cad69b53 100644
--- a/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb
+++ b/meta-oe/recipes-devtools/serialcheck/serialcheck_1.0.0.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://git.breakpoint.cc/cgit/bigeasy/serialcheck.git/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "git://git.breakpoint.cc/bigeasy/serialcheck.git \
+SRC_URI = "git://git.breakpoint.cc/bigeasy/serialcheck.git;branch=master \
file://0001-Add-option-to-enable-internal-loopback.patch \
file://0002-Restore-original-loopback-config.patch \
file://0001-Makefile-Change-order-of-link-flags.patch \
diff --git a/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb
index 4a27e4b2a5..9d07405560 100644
--- a/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb
+++ b/meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb
@@ -8,7 +8,7 @@ inherit cmake
DEPENDS += "sqlite3"
SRCREV = "e8a9e9416f421303f4b8970caab26dadf8bae98b"
-SRC_URI = "git://github.com/fnc12/sqlite_orm;protocol=https"
+SRC_URI = "git://github.com/fnc12/sqlite_orm;protocol=https;branch=master"
S = "${WORKDIR}/git"
EXTRA_OECMAKE += "-DSqliteOrm_BuildTests=OFF"
diff --git a/meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb b/meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb
index 46a9408031..3280dba49b 100644
--- a/meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb
+++ b/meta-oe/recipes-devtools/tclap/tclap_1.2.2.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=0ca8b9c5c5445cfa7af7e78fd27e60ed"
SRCREV = "75f440bcac1276c847f5351e14216f6e91def44d"
-SRC_URI = "git://git.code.sf.net/p/tclap/code \
+SRC_URI = "git://git.code.sf.net/p/tclap/code;branch=master \
file://Makefile.am-disable-docs.patch \
"
diff --git a/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb b/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb
index c33fa048cf..a78eecfea3 100644
--- a/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb
+++ b/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb
@@ -12,7 +12,7 @@ inherit autotools
# v0.9.4
SRCREV = "d648bbffedef529220896283fb59e35531c13804"
-SRC_URI = "git://github.com/namhyung/${BPN} \
+SRC_URI = "git://github.com/namhyung/${BPN};branch=master;protocol=https \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/valijson/valijson_git.bb b/meta-oe/recipes-devtools/valijson/valijson_git.bb
index c3254d16e7..5cff40752a 100644
--- a/meta-oe/recipes-devtools/valijson/valijson_git.bb
+++ b/meta-oe/recipes-devtools/valijson/valijson_git.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/tristanpenman/valijson"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=015106c62262b2383f6c72063f0998f2"
-SRC_URI = "git://github.com/tristanpenman/valijson.git"
+SRC_URI = "git://github.com/tristanpenman/valijson.git;branch=master;protocol=https"
PV = "0.1+git${SRCPV}"
SRCREV = "c2f22fddf599d04dc33fcd7ed257c698a05345d9"
diff --git a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.51.03.bb b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.51.03.bb
index 6c31b69817..34df701260 100644
--- a/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.51.03.bb
+++ b/meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.51.03.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://xmlrpc-c.sourceforge.net/"
LICENSE = "BSD & MIT"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=aefbf81ba0750f02176b6f86752ea951"
-SRC_URI = "git://github.com/mirror/xmlrpc-c.git \
+SRC_URI = "git://github.com/mirror/xmlrpc-c.git;branch=master;protocol=https \
file://0001-test-cpp-server_abyss-Fix-build-with-clang-libc.patch \
file://0002-fix-formatting-issues.patch \
"
diff --git a/meta-oe/recipes-devtools/yajl/yajl/CVE-2023-33460.patch b/meta-oe/recipes-devtools/yajl/yajl/CVE-2023-33460.patch
new file mode 100644
index 0000000000..169784d427
--- /dev/null
+++ b/meta-oe/recipes-devtools/yajl/yajl/CVE-2023-33460.patch
@@ -0,0 +1,29 @@
+From 23a122eddaa28165a6c219000adcc31ff9a8a698 Mon Sep 17 00:00:00 2001
+From: "zhang.jiujiu" <282627424@qq.com>
+Date: Tue, 7 Dec 2021 22:37:02 +0800
+Subject: [PATCH] fix memory leaks
+
+Upstream-Status: Backport [https://github.com/openEuler-BaseService/yajl/commit/23a122eddaa28165a6c219000adcc31ff9a8a698]
+CVE: CVE-2023-33460
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ src/yajl_tree.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/yajl_tree.c b/src/yajl_tree.c
+index 3d357a3..a71167e 100644
+--- a/src/yajl_tree.c
++++ b/src/yajl_tree.c
+@@ -445,6 +445,9 @@ yajl_val yajl_tree_parse (const char *input,
+ YA_FREE(&(handle->alloc), internal_err_str);
+ }
+ yajl_free (handle);
++ //If the requested memory is not released in time, it will cause memory leakage
++ if(ctx.root)
++ yajl_tree_free(ctx.root);
+ return NULL;
+ }
+
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb b/meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb
index e112a5e30f..186f2c8ed0 100644
--- a/meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb
+++ b/meta-oe/recipes-devtools/yajl/yajl_1.0.12.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=da2e9aa80962d54e7c726f232a2bd1e8"
# Use 1.0.12 tag
SRCREV = "17b1790fb9c8abbb3c0f7e083864a6a014191d56"
-SRC_URI = "git://github.com/lloyd/yajl;nobranch=1"
+SRC_URI = "git://github.com/lloyd/yajl;nobranch=1;protocol=https"
inherit cmake lib_package
diff --git a/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb b/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb
index d9a5821cbb..697f54d9fb 100644
--- a/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb
+++ b/meta-oe/recipes-devtools/yajl/yajl_2.1.0.bb
@@ -8,7 +8,9 @@ HOMEPAGE = "http://lloyd.github.com/yajl/"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://COPYING;md5=39af6eb42999852bdd3ea00ad120a36d"
-SRC_URI = "git://github.com/lloyd/yajl"
+SRC_URI = "git://github.com/lloyd/yajl;branch=master;protocol=https \
+ file://CVE-2023-33460.patch \
+ "
SRCREV = "a0ecdde0c042b9256170f2f8890dd9451a4240aa"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-devtools/yasm/yasm_git.bb b/meta-oe/recipes-devtools/yasm/yasm_git.bb
index 53856263f7..6aae29ad8c 100644
--- a/meta-oe/recipes-devtools/yasm/yasm_git.bb
+++ b/meta-oe/recipes-devtools/yasm/yasm_git.bb
@@ -9,7 +9,7 @@ DEPENDS += "flex-native bison-native xmlto-native"
PV = "1.3.0+git${SRCPV}"
# v1.3.0
SRCREV = "ba463d3c26c0ece2e797b8d6381b161633b5971a"
-SRC_URI = "git://github.com/yasm/yasm.git"
+SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/brotli/brotli/0001-brotli-fix-CVE-2020-8927.patch b/meta-oe/recipes-extended/brotli/brotli/0001-brotli-fix-CVE-2020-8927.patch
new file mode 100644
index 0000000000..c21794d147
--- /dev/null
+++ b/meta-oe/recipes-extended/brotli/brotli/0001-brotli-fix-CVE-2020-8927.patch
@@ -0,0 +1,44 @@
+From 95ab3786ce0f16e08e41f7bf216969a37dc86cad Mon Sep 17 00:00:00 2001
+From: Jan Kraemer <jan@spectrejan.de>
+Date: Thu, 7 Oct 2021 12:48:04 +0200
+Subject: [PATCH] brotli: fix CVE-2020-8927
+
+[No upstream tracking] --
+
+This fixes a potential overflow when input chunk is >2GiB in
+BrotliGetAvailableBits by capping the returned value to 2^30
+
+Fixed in brotli version 1.0.8
+https://github.com/google/brotli as of commit id
+223d80cfbec8fd346e32906c732c8ede21f0cea6
+
+Patch taken from Debian Buster: 1.0.7-2+deb10u1
+http://deb.debian.org/debian/pool/main/b/brotli/brotli_1.0.7-2+deb10u1.dsc
+https://security-tracker.debian.org/tracker/CVE-2020-8927
+
+
+Upstream-Status: Backported
+CVE: CVE-2020-8927
+
+Signed-off-by: Jan Kraemer <jan@spectrejan.de>
+---
+ c/dec/bit_reader.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/c/dec/bit_reader.h b/c/dec/bit_reader.h
+index c06e914..0d20312 100644
+--- a/c/dec/bit_reader.h
++++ b/c/dec/bit_reader.h
+@@ -87,8 +87,11 @@ static BROTLI_INLINE uint32_t BrotliGetAvailableBits(
+ }
+
+ /* Returns amount of unread bytes the bit reader still has buffered from the
+- BrotliInput, including whole bytes in br->val_. */
++ BrotliInput, including whole bytes in br->val_. Result is capped with
++ maximal ring-buffer size (larger number won't be utilized anyway). */
+ static BROTLI_INLINE size_t BrotliGetRemainingBytes(BrotliBitReader* br) {
++ static const size_t kCap = (size_t)1 << 30;
++ if (br->avail_in > kCap) return kCap;
+ return br->avail_in + (BrotliGetAvailableBits(br) >> 3);
+ }
+
diff --git a/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb b/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb
index 70dbcaffb1..77fef778a4 100644
--- a/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb
+++ b/meta-oe/recipes-extended/brotli/brotli_1.0.7.bb
@@ -6,7 +6,9 @@ BUGTRACKER = "https://github.com/google/brotli/issues"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=941ee9cd1609382f946352712a319b4b"
-SRC_URI = "git://github.com/google/brotli.git"
+SRC_URI = "git://github.com/google/brotli.git;branch=master;protocol=https \
+ file://0001-brotli-fix-CVE-2020-8927.patch \
+ "
# tag 1.0.7
SRCREV= "d6d98957ca8ccb1ef45922e978bb10efca0ea541"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb
index 6c71d534be..388feb703b 100644
--- a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb
+++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_1.0.1.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b19ee058d2d5f69af45da98051d91064"
SECTION = "Development/Libraries"
DEPENDS = "swig-native python3 sblim-cmpi-devel"
-SRC_URI = "git://github.com/kkaempf/cmpi-bindings.git;protocol=http \
+SRC_URI = "git://github.com/kkaempf/cmpi-bindings.git;protocol=http;branch=master;protocol=https \
file://cmpi-bindings-0.4.17-no-ruby-perl.patch \
file://cmpi-bindings-0.4.17-sblim-sigsegv.patch \
file://cmpi-bindings-0.9.5-python-lib-dir.patch \
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.7.bb b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.7.bb
index 842652889c..2a045f5790 100644
--- a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.7.bb
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.7.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8184208060df880fe3137b93eb88aeea"
DEPENDS = "zlib gzip-native json-c"
-SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=https \
+SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=https;branch=master \
file://0002-Don-t-execute-processes-as-a-specific-user.patch \
file://0004-Modify-systemd-config-directory.patch \
file://317.patch \
diff --git a/meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb b/meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb
index aa55ebf84d..162f5aa339 100644
--- a/meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb
+++ b/meta-oe/recipes-extended/docopt.cpp/docopt.cpp_git.bb
@@ -18,7 +18,7 @@ SRCREV = "3dd23e3280f213bacefdf5fcb04857bf52e90917"
PV = "0.6.2+git${SRCPV}"
SRC_URI = "\
- git://github.com/docopt/docopt.cpp.git;protocol=https \
+ git://github.com/docopt/docopt.cpp.git;protocol=https;branch=master \
file://0001-Set-library-VERSION-and-SOVERSION.patch \
"
diff --git a/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.2.bb b/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.2.bb
index 09eab9dcd0..eb00092c7b 100644
--- a/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.2.bb
+++ b/meta-oe/recipes-extended/dumb-init/dumb-init_1.2.2.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5940d39995ea6857d01b8227109c2e9c"
SRCREV = "b1e978e486114797347deefcc03ab12629a13cc3"
-SRC_URI = "git://github.com/Yelp/dumb-init"
+SRC_URI = "git://github.com/Yelp/dumb-init;branch=master;protocol=https"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS} ${LDFLAGS}'"
diff --git a/meta-oe/recipes-extended/figlet/figlet_git.bb b/meta-oe/recipes-extended/figlet/figlet_git.bb
index 4611646b9b..61b050aac6 100644
--- a/meta-oe/recipes-extended/figlet/figlet_git.bb
+++ b/meta-oe/recipes-extended/figlet/figlet_git.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.figlet.org/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1688bcd97b27704f1afcac7336409857"
-SRC_URI = "git://github.com/cmatsuoka/figlet.git \
+SRC_URI = "git://github.com/cmatsuoka/figlet.git;branch=master;protocol=https \
file://0001-build-add-autotools-support-to-allow-easy-cross-comp.patch"
SRCREV = "5bbcd7383a8c3a531299b216b0c734e1495c6db3"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.8.bb b/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.8.bb
index 926d8851d2..b2c41756e5 100644
--- a/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.8.bb
+++ b/meta-oe/recipes-extended/gnuplot/gnuplot_5.2.8.bb
@@ -32,7 +32,7 @@ BBCLASSEXTEND = "native"
DEPENDS_class-native = "readline-native"
PACKAGECONFIG_class-native = ""
-SRC_URI_append_class-native = "file://0001-reduce-build-to-conversion-tools-for-native-build.patch"
+SRC_URI_append_class-native = " file://0001-reduce-build-to-conversion-tools-for-native-build.patch"
do_install_class-native() {
install -d ${D}${bindir}
diff --git a/meta-oe/recipes-extended/haveged/haveged_1.9.13.bb b/meta-oe/recipes-extended/haveged/haveged_1.9.13.bb
index 50326ea2f4..19b0d8dbd7 100644
--- a/meta-oe/recipes-extended/haveged/haveged_1.9.13.bb
+++ b/meta-oe/recipes-extended/haveged/haveged_1.9.13.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
# v1.9.9
SRCREV = "1283a65c541c4a83e152024a63faf7b267b9b1cd"
-SRC_URI = "git://github.com/jirka-h/haveged.git \
+SRC_URI = "git://github.com/jirka-h/haveged.git;branch=master;protocol=https \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb b/meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb
index 050b7da3d7..c0d1b1b8bb 100644
--- a/meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb
+++ b/meta-oe/recipes-extended/hexedit/hexedit_1.4.2.bb
@@ -6,7 +6,7 @@ DEPENDS = "ncurses"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-SRC_URI = "git://github.com/pixel/hexedit.git \
+SRC_URI = "git://github.com/pixel/hexedit.git;branch=master;protocol=https \
"
SRCREV = "800e4b2e6280531a84fd23ee0b48e16baeb90878"
diff --git a/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb b/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb
index 29f8de8d2f..cee1f342bd 100644
--- a/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb
+++ b/meta-oe/recipes-extended/hiredis/hiredis_0.14.0.bb
@@ -6,7 +6,7 @@ DEPENDS = "redis"
LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"
SRCREV = "685030652cd98c5414ce554ff5b356dfe8437870"
-SRC_URI = "git://github.com/redis/hiredis;protocol=git \
+SRC_URI = "git://github.com/redis/hiredis;protocol=https;branch=master \
file://0001-Makefile-remove-hardcoding-of-CC.patch"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/iotop/iotop_0.6.bb b/meta-oe/recipes-extended/iotop/iotop_0.6.bb
index 3a597218db..19af46cb16 100644
--- a/meta-oe/recipes-extended/iotop/iotop_0.6.bb
+++ b/meta-oe/recipes-extended/iotop/iotop_0.6.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
PV .= "+git${SRCPV}"
SRCREV = "1bfb3bc70febb1ffb95146b6dcd65257228099a3"
-SRC_URI = "git://repo.or.cz/iotop.git"
+SRC_URI = "git://repo.or.cz/iotop.git;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb b/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb
index b7899a11b6..2f4724a336 100644
--- a/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb
+++ b/meta-oe/recipes-extended/isomd5sum/isomd5sum_1.2.3.bb
@@ -7,7 +7,7 @@ RDEPENDS_${BPN} = "openssl curl"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-SRC_URI = "git://github.com/rhinstaller/isomd5sum.git;branch=master \
+SRC_URI = "git://github.com/rhinstaller/isomd5sum.git;branch=master;protocol=https \
file://0001-tweak-install-prefix.patch \
file://0002-fix-parallel-error.patch \
"
diff --git a/meta-oe/recipes-extended/jansson/jansson_2.13.1.bb b/meta-oe/recipes-extended/jansson/jansson_2.13.1.bb
index d6e56ea768..7beea9f1e7 100644
--- a/meta-oe/recipes-extended/jansson/jansson_2.13.1.bb
+++ b/meta-oe/recipes-extended/jansson/jansson_2.13.1.bb
@@ -11,4 +11,7 @@ SRC_URI[sha256sum] = "f4f377da17b10201a60c1108613e78ee15df6b12016b116b6de42209f4
inherit autotools pkgconfig
+# upstream considers it isn't a real bug https://github.com/akheron/jansson/issues/548
+CVE_CHECK_WHITELIST = "CVE-2020-36325 "
+
BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb b/meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb
index 50dd74b685..ba1fece05c 100644
--- a/meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb
+++ b/meta-oe/recipes-extended/jpnevulator/jpnevulator_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
PV = "2.3.5+git${SRCPV}"
-SRC_URI = "git://github.com/snarlistic/jpnevulator.git;protocol=http"
+SRC_URI = "git://github.com/snarlistic/jpnevulator.git;protocol=http;branch=master;protocol=https"
SRCREV = "c2d857091c0dfed05139ac07ea9b0f36ad259638"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb b/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb
index e6d5663f85..977aabf040 100644
--- a/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb
+++ b/meta-oe/recipes-extended/konkretcmpi/konkretcmpi_0.9.2.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f673270bfc350d9ce1efc8724c6c1873"
DEPENDS_append_class-target = " swig-native sblim-cmpi-devel python3"
DEPENDS_append_class-native = " cmpi-bindings-native"
-SRC_URI = "git://github.com/rnovacek/konkretcmpi.git \
+SRC_URI = "git://github.com/rnovacek/konkretcmpi.git;branch=master;protocol=https \
file://0001-CMakeLists.txt-fix-lib64-can-not-be-shiped-in-64bit-.patch \
file://0001-drop-including-rpath-cmake-module.patch \
"
diff --git a/meta-oe/recipes-extended/libblockdev/libblockdev_2.24.bb b/meta-oe/recipes-extended/libblockdev/libblockdev_2.24.bb
index 99cdee5bba..c1023e625e 100644
--- a/meta-oe/recipes-extended/libblockdev/libblockdev_2.24.bb
+++ b/meta-oe/recipes-extended/libblockdev/libblockdev_2.24.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c"
inherit autotools gobject-introspection
-SRC_URI = "git://github.com/storaged-project/libblockdev;branch=2.x-branch"
+SRC_URI = "git://github.com/storaged-project/libblockdev;branch=2.x-branch;protocol=https"
SRCREV = "f5a4ba8bb298f8cbc435707d0b19b4b2ff836a8e"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/libcec/libcec_git.bb b/meta-oe/recipes-extended/libcec/libcec_git.bb
index 39ceb489e2..07320e42bd 100644
--- a/meta-oe/recipes-extended/libcec/libcec_git.bb
+++ b/meta-oe/recipes-extended/libcec/libcec_git.bb
@@ -12,7 +12,7 @@ DEPENDS_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ''
PV = "5.0.0"
SRCREV = "43bc27fe7be491149e6f57d14110e02abdac2f24"
-SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release \
+SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release;protocol=https \
file://0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch \
file://0001-Enhance-reproducibility.patch \
"
diff --git a/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb b/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb
index b7c1958eef..e763a701e5 100644
--- a/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb
+++ b/meta-oe/recipes-extended/libdivecomputer/libdivecomputer_git.bb
@@ -11,7 +11,7 @@ inherit autotools pkgconfig
PV = "0.6.0"
SRCREV = "1195abc2f4acc7b10175d570ec73549d0938c83e"
-SRC_URI = "git://github.com/libdivecomputer/libdivecomputer.git;protocol=https \
+SRC_URI = "git://github.com/libdivecomputer/libdivecomputer.git;protocol=https;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist_2.1.0.bb b/meta-oe/recipes-extended/libimobiledevice/libplist_2.1.0.bb
index a990deb91f..0906e9a645 100644
--- a/meta-oe/recipes-extended/libimobiledevice/libplist_2.1.0.bb
+++ b/meta-oe/recipes-extended/libimobiledevice/libplist_2.1.0.bb
@@ -9,7 +9,7 @@ DEPENDS = "libxml2 glib-2.0 swig python3"
inherit autotools pkgconfig python3native python3targetconfig
SRCREV = "3df02d4d0e9008771e8622fdc10de8333b3f0d85"
-SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https \
+SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/libimobiledevice/libusbmuxd_git.bb b/meta-oe/recipes-extended/libimobiledevice/libusbmuxd_git.bb
index 36fc5c858c..5901057840 100644
--- a/meta-oe/recipes-extended/libimobiledevice/libusbmuxd_git.bb
+++ b/meta-oe/recipes-extended/libimobiledevice/libusbmuxd_git.bb
@@ -7,9 +7,10 @@ DEPENDS = "udev libusb1 libplist"
inherit autotools pkgconfig gitpkgv
PKGV = "${GITPKGVTAG}"
+PV = "1.0.10+git${SRCPV}"
SRCREV = "78df9be5fc8222ed53846cb553de9b5d24c85c6c"
-SRC_URI = "git://github.com/libimobiledevice/libusbmuxd;protocol=https"
+SRC_URI = "git://github.com/libimobiledevice/libusbmuxd;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb b/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb
index 7fc5997983..bbfee1ff7a 100644
--- a/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb
+++ b/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=84dcc94da3adb52b53ae4fa38fe49e5d"
inherit cmake pkgconfig
-SRC_URI = "git://github.com/Jacajack/liblightmodbus.git;protocol=https \
+SRC_URI = "git://github.com/Jacajack/liblightmodbus.git;protocol=https;branch=master \
file://0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch \
"
SRCREV = "59d2b405f95701e5b04326589786dbb43ce49e81"
diff --git a/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2022-0367.patch b/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2022-0367.patch
new file mode 100644
index 0000000000..2aec818574
--- /dev/null
+++ b/meta-oe/recipes-extended/libmodbus/libmodbus/CVE-2022-0367.patch
@@ -0,0 +1,38 @@
+From 790ff6dad16b70e68804a2d53ad54db40412e889 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Sat, 8 Jan 2022 20:00:50 +0100
+Subject: [PATCH] modbus_reply: fix copy & paste error in sanity check (fixes
+ #614)
+
+[ Upstream commit b4ef4c17d618eba0adccc4c7d9e9a1ef809fc9b6 ]
+
+While handling MODBUS_FC_WRITE_AND_READ_REGISTERS, both address offsets
+must be checked, i.e. the read and the write address must be within the
+mapping range.
+
+At the moment, only the read address was considered, it looks like a
+simple copy and paste error, so let's fix it.
+
+CVE: CVE-2022-0367
+
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+---
+ src/modbus.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modbus.c b/src/modbus.c
+index 68a28a3..c871152 100644
+--- a/src/modbus.c
++++ b/src/modbus.c
+@@ -961,7 +961,7 @@ int modbus_reply(modbus_t *ctx, const uint8_t *req,
+ nb_write, nb, MODBUS_MAX_WR_WRITE_REGISTERS, MODBUS_MAX_WR_READ_REGISTERS);
+ } else if (mapping_address < 0 ||
+ (mapping_address + nb) > mb_mapping->nb_registers ||
+- mapping_address < 0 ||
++ mapping_address_write < 0 ||
+ (mapping_address_write + nb_write) > mb_mapping->nb_registers) {
+ rsp_length = response_exception(
+ ctx, &sft, MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS, rsp, FALSE,
+--
+2.39.1
+
diff --git a/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb b/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb
index 075487ae90..5c59312760 100644
--- a/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb
+++ b/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb
@@ -2,7 +2,10 @@ require libmodbus.inc
SRC_URI += "file://f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d.patch \
file://Fix-float-endianness-issue-on-big-endian-arch.patch \
- file://Fix-typo.patch"
+ file://Fix-typo.patch \
+ file://CVE-2022-0367.patch \
+ "
+
SRC_URI[md5sum] = "15c84c1f7fb49502b3efaaa668cfd25e"
SRC_URI[sha256sum] = "d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16"
diff --git a/meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb b/meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb
index c9d259b1a0..29c35caf54 100644
--- a/meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb
+++ b/meta-oe/recipes-extended/libnss-nisplus/libnss-nisplus.bb
@@ -17,7 +17,7 @@ PV = "1.3+git${SRCPV}"
SRCREV = "116219e215858f4af9370171d3ead63baca8fdb4"
-SRC_URI = "git://github.com/thkukuk/libnss_nisplus \
+SRC_URI = "git://github.com/thkukuk/libnss_nisplus;branch=master;protocol=https \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/libqb/libqb_1.0.5.bb b/meta-oe/recipes-extended/libqb/libqb_1.0.5.bb
index cd4019666d..dbe03fedef 100644
--- a/meta-oe/recipes-extended/libqb/libqb_1.0.5.bb
+++ b/meta-oe/recipes-extended/libqb/libqb_1.0.5.bb
@@ -11,7 +11,7 @@ inherit autotools pkgconfig
# v1.0.5
SRCREV = "d08dbcf08b0da418bce9b5427dfd89522916322a"
-SRC_URI = "git://github.com/ClusterLabs/${BPN}.git;branch=version_1 \
+SRC_URI = "git://github.com/ClusterLabs/${BPN}.git;branch=version_1;protocol=https \
file://0001-build-fix-configure-script-neglecting-re-enable-out-.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/libreport/libreport_2.10.0.bb b/meta-oe/recipes-extended/libreport/libreport_2.10.0.bb
index 4276c49173..24784f77a0 100644
--- a/meta-oe/recipes-extended/libreport/libreport_2.10.0.bb
+++ b/meta-oe/recipes-extended/libreport/libreport_2.10.0.bb
@@ -11,7 +11,7 @@ DEPENDS = "xmlrpc-c xmlrpc-c-native intltool-native \
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SRC_URI = "git://github.com/abrt/libreport.git;protocol=https"
+SRC_URI = "git://github.com/abrt/libreport.git;protocol=https;branch=master"
SRC_URI += "file://0001-Makefile.am-remove-doc-and-apidoc.patch \
file://0002-configure.ac-remove-prog-test-of-xmlto-and-asciidoc.patch \
file://0003-without-build-plugins.patch \
diff --git a/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb b/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb
index a081cb17a8..27fe0e2c40 100644
--- a/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb
+++ b/meta-oe/recipes-extended/libstatgrab/libstatgrab_0.92.bb
@@ -31,4 +31,4 @@ FILES_statgrab-dbg = "${bindir}/.debug/statgrab"
FILES_saidar = "${bindir}/saidar"
FILES_saidar-dbg = "${bindir}/.debug/saidar"
FILES_${PN}-mrtg = "${bindir}/statgrab-make-mrtg-config ${bindir}/statgrab-make-mrtg-index"
-RDEPENDS_${PN}-mrtg_append = "perl statgrab"
+RDEPENDS_${PN}-mrtg_append = " perl statgrab"
diff --git a/meta-oe/recipes-extended/libuio/libuio_0.2.1.bb b/meta-oe/recipes-extended/libuio/libuio_0.2.1.bb
index dd34c180a3..0278e55f3e 100644
--- a/meta-oe/recipes-extended/libuio/libuio_0.2.1.bb
+++ b/meta-oe/recipes-extended/libuio/libuio_0.2.1.bb
@@ -3,7 +3,7 @@ SECTION = "base"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-SRC_URI = "git://git.code.sf.net/p/libuio/code \
+SRC_URI = "git://git.code.sf.net/p/libuio/code;branch=master \
file://replace_inline_with_static-inline.patch \
file://0001-include-fcntl.h-for-O_RDWR-define.patch \
"
diff --git a/meta-oe/recipes-extended/md5deep/md5deep_git.bb b/meta-oe/recipes-extended/md5deep/md5deep_git.bb
index e8c6864c1f..cc31323c3f 100644
--- a/meta-oe/recipes-extended/md5deep/md5deep_git.bb
+++ b/meta-oe/recipes-extended/md5deep/md5deep_git.bb
@@ -9,7 +9,7 @@ PV = "4.4+git${SRCPV}"
SRCREV = "877613493ff44807888ce1928129574be393cbb0"
-SRC_URI = "git://github.com/jessek/hashdeep.git \
+SRC_URI = "git://github.com/jessek/hashdeep.git;branch=master;protocol=https \
file://wrong-variable-expansion.patch \
file://0001-Fix-literal-and-identifier-spacing-as-dictated-by-C-.patch \
"
diff --git a/meta-oe/recipes-extended/mraa/mraa_git.bb b/meta-oe/recipes-extended/mraa/mraa_git.bb
index 0b40dcb71b..540ef6e12a 100644
--- a/meta-oe/recipes-extended/mraa/mraa_git.bb
+++ b/meta-oe/recipes-extended/mraa/mraa_git.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=91e7de50a8d3cf01057f318d72460acd"
SRCREV = "e15ce6fbc76148ba8835adc92196b0d0a3f245e7"
PV = "2.1.0+git${SRCPV}"
-SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \
+SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http;branch=master;protocol=https \
file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \
"
diff --git a/meta-oe/recipes-extended/openwsman/openwsman_2.6.11.bb b/meta-oe/recipes-extended/openwsman/openwsman_2.6.11.bb
index 9d5a2307e7..e96c977453 100644
--- a/meta-oe/recipes-extended/openwsman/openwsman_2.6.11.bb
+++ b/meta-oe/recipes-extended/openwsman/openwsman_2.6.11.bb
@@ -17,7 +17,7 @@ REQUIRED_DISTRO_FEATURES = "pam"
SRCREV = "d8eba6cb6682b59d84ca1da67a523520b879ade6"
-SRC_URI = "git://github.com/Openwsman/openwsman.git \
+SRC_URI = "git://github.com/Openwsman/openwsman.git;branch=main;protocol=https \
file://libssl-is-required-if-eventint-supported.patch \
file://openwsmand.service \
file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \
diff --git a/meta-oe/recipes-extended/ostree/ostree_2020.3.bb b/meta-oe/recipes-extended/ostree/ostree_2020.3.bb
index c1f43feb67..5b0171d8c8 100644
--- a/meta-oe/recipes-extended/ostree/ostree_2020.3.bb
+++ b/meta-oe/recipes-extended/ostree/ostree_2020.3.bb
@@ -22,7 +22,7 @@ DEPENDS = " \
PREMIRRORS = ""
SRC_URI = " \
- gitsm://github.com/ostreedev/ostree;branch=main \
+ gitsm://github.com/ostreedev/ostree;branch=main;protocol=https \
file://run-ptest \
"
SRCREV = "6ed48234ba579ff73eb128af237212b0a00f2057"
@@ -181,7 +181,7 @@ RDEPENDS_${PN}-ptest += " \
"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"
-RRECOMMENDS_${PN} += "kernel-module-overlay"
+RRECOMMENDS_${PN}_append_class-target = " kernel-module-overlay"
SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
diff --git a/meta-oe/recipes-extended/p7zip/files/CVE-2016-9296.patch b/meta-oe/recipes-extended/p7zip/files/CVE-2016-9296.patch
new file mode 100644
index 0000000000..98e186cbf0
--- /dev/null
+++ b/meta-oe/recipes-extended/p7zip/files/CVE-2016-9296.patch
@@ -0,0 +1,27 @@
+p7zip: Update CVE-2016-9296 patch URL.
+From: Robert Luberda <robert@debian.org>
+Date: Sat, 19 Nov 2016 08:48:08 +0100
+Subject: Fix nullptr dereference (CVE-2016-9296)
+
+Patch taken from https://sourceforge.net/p/p7zip/bugs/185/
+This patch file taken from Debian's patch set for p7zip
+
+Upstream-Status: Backport [https://sourceforge.net/p/p7zip/bugs/185/]
+CVE: CVE-2016-9296
+
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+
+Index: p7zip_16.02/CPP/7zip/Archive/7z/7zIn.cpp
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Archive/7z/7zIn.cpp
++++ p7zip_16.02/CPP/7zip/Archive/7z/7zIn.cpp
+@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedS
+ if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])
+ ThrowIncorrect();
+ }
+- HeadersSize += folders.PackPositions[folders.NumPackStreams];
++ if (folders.PackPositions)
++ HeadersSize += folders.PackPositions[folders.NumPackStreams];
+ return S_OK;
+ }
+
diff --git a/meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch b/meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch
new file mode 100644
index 0000000000..b6deb5d3a7
--- /dev/null
+++ b/meta-oe/recipes-extended/p7zip/files/CVE-2018-5996.patch
@@ -0,0 +1,226 @@
+From: Robert Luberda <robert@debian.org>
+Date: Sun, 28 Jan 2018 23:47:40 +0100
+Subject: CVE-2018-5996
+
+Hopefully fix Memory Corruptions via RAR PPMd (CVE-2018-5996) by
+applying a few changes from 7Zip 18.00-beta.
+
+Bug-Debian: https://bugs.debian.org/#888314
+
+Upstream-Status: Backport [https://sources.debian.org/data/non-free/p/p7zip-rar/16.02-3/debian/patches/06-CVE-2018-5996.patch]
+CVE: CVE-2018-5996
+
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ CPP/7zip/Compress/Rar1Decoder.cpp | 13 +++++++++----
+ CPP/7zip/Compress/Rar1Decoder.h | 1 +
+ CPP/7zip/Compress/Rar2Decoder.cpp | 10 +++++++++-
+ CPP/7zip/Compress/Rar2Decoder.h | 1 +
+ CPP/7zip/Compress/Rar3Decoder.cpp | 23 ++++++++++++++++++++---
+ CPP/7zip/Compress/Rar3Decoder.h | 2 ++
+ 6 files changed, 42 insertions(+), 8 deletions(-)
+
+Index: p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.cpp
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Compress/Rar1Decoder.cpp
++++ p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.cpp
+@@ -29,7 +29,7 @@ public:
+ };
+ */
+
+-CDecoder::CDecoder(): m_IsSolid(false) { }
++CDecoder::CDecoder(): m_IsSolid(false), _errorMode(false) { }
+
+ void CDecoder::InitStructures()
+ {
+@@ -406,9 +406,14 @@ HRESULT CDecoder::CodeReal(ISequentialIn
+ InitData();
+ if (!m_IsSolid)
+ {
++ _errorMode = false;
+ InitStructures();
+ InitHuff();
+ }
++
++ if (_errorMode)
++ return S_FALSE;
++
+ if (m_UnpackSize > 0)
+ {
+ GetFlagsBuf();
+@@ -477,9 +482,9 @@ STDMETHODIMP CDecoder::Code(ISequentialI
+ const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress)
+ {
+ try { return CodeReal(inStream, outStream, inSize, outSize, progress); }
+- catch(const CInBufferException &e) { return e.ErrorCode; }
+- catch(const CLzOutWindowException &e) { return e.ErrorCode; }
+- catch(...) { return S_FALSE; }
++ catch(const CInBufferException &e) { _errorMode = true; return e.ErrorCode; }
++ catch(const CLzOutWindowException &e) { _errorMode = true; return e.ErrorCode; }
++ catch(...) { _errorMode = true; return S_FALSE; }
+ }
+
+ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size)
+Index: p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.h
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Compress/Rar1Decoder.h
++++ p7zip_16.02/CPP/7zip/Compress/Rar1Decoder.h
+@@ -39,6 +39,7 @@ public:
+
+ Int64 m_UnpackSize;
+ bool m_IsSolid;
++ bool _errorMode;
+
+ UInt32 ReadBits(int numBits);
+ HRESULT CopyBlock(UInt32 distance, UInt32 len);
+Index: p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.cpp
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Compress/Rar2Decoder.cpp
++++ p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.cpp
+@@ -80,7 +80,8 @@ static const UInt32 kHistorySize = 1 <<
+ static const UInt32 kWindowReservSize = (1 << 22) + 256;
+
+ CDecoder::CDecoder():
+- m_IsSolid(false)
++ m_IsSolid(false),
++ m_TablesOK(false)
+ {
+ }
+
+@@ -100,6 +101,8 @@ UInt32 CDecoder::ReadBits(unsigned numBi
+
+ bool CDecoder::ReadTables(void)
+ {
++ m_TablesOK = false;
++
+ Byte levelLevels[kLevelTableSize];
+ Byte newLevels[kMaxTableSize];
+ m_AudioMode = (ReadBits(1) == 1);
+@@ -170,6 +173,8 @@ bool CDecoder::ReadTables(void)
+ }
+
+ memcpy(m_LastLevels, newLevels, kMaxTableSize);
++ m_TablesOK = true;
++
+ return true;
+ }
+
+@@ -344,6 +349,9 @@ HRESULT CDecoder::CodeReal(ISequentialIn
+ return S_FALSE;
+ }
+
++ if (!m_TablesOK)
++ return S_FALSE;
++
+ UInt64 startPos = m_OutWindowStream.GetProcessedSize();
+ while (pos < unPackSize)
+ {
+Index: p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.h
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Compress/Rar2Decoder.h
++++ p7zip_16.02/CPP/7zip/Compress/Rar2Decoder.h
+@@ -139,6 +139,7 @@ class CDecoder :
+
+ UInt64 m_PackSize;
+ bool m_IsSolid;
++ bool m_TablesOK;
+
+ void InitStructures();
+ UInt32 ReadBits(unsigned numBits);
+Index: p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.cpp
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Compress/Rar3Decoder.cpp
++++ p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.cpp
+@@ -92,7 +92,8 @@ CDecoder::CDecoder():
+ _writtenFileSize(0),
+ _vmData(0),
+ _vmCode(0),
+- m_IsSolid(false)
++ m_IsSolid(false),
++ _errorMode(false)
+ {
+ Ppmd7_Construct(&_ppmd);
+ }
+@@ -545,6 +546,9 @@ HRESULT CDecoder::ReadTables(bool &keepD
+ return InitPPM();
+ }
+
++ TablesRead = false;
++ TablesOK = false;
++
+ _lzMode = true;
+ PrevAlignBits = 0;
+ PrevAlignCount = 0;
+@@ -606,6 +610,9 @@ HRESULT CDecoder::ReadTables(bool &keepD
+ }
+ }
+ }
++ if (InputEofError())
++ return S_FALSE;
++
+ TablesRead = true;
+
+ // original code has check here:
+@@ -623,6 +630,9 @@ HRESULT CDecoder::ReadTables(bool &keepD
+ RIF(m_LenDecoder.Build(&newLevels[kMainTableSize + kDistTableSize + kAlignTableSize]));
+
+ memcpy(m_LastLevels, newLevels, kTablesSizesSum);
++
++ TablesOK = true;
++
+ return S_OK;
+ }
+
+@@ -824,7 +834,12 @@ HRESULT CDecoder::CodeReal(ICompressProg
+ PpmEscChar = 2;
+ PpmError = true;
+ InitFilters();
++ _errorMode = false;
+ }
++
++ if (_errorMode)
++ return S_FALSE;
++
+ if (!m_IsSolid || !TablesRead)
+ {
+ bool keepDecompressing;
+@@ -838,6 +853,8 @@ HRESULT CDecoder::CodeReal(ICompressProg
+ bool keepDecompressing;
+ if (_lzMode)
+ {
++ if (!TablesOK)
++ return S_FALSE;
+ RINOK(DecodeLZ(keepDecompressing))
+ }
+ else
+@@ -901,8 +918,8 @@ STDMETHODIMP CDecoder::Code(ISequentialI
+ _unpackSize = outSize ? *outSize : (UInt64)(Int64)-1;
+ return CodeReal(progress);
+ }
+- catch(const CInBufferException &e) { return e.ErrorCode; }
+- catch(...) { return S_FALSE; }
++ catch(const CInBufferException &e) { _errorMode = true; return e.ErrorCode; }
++ catch(...) { _errorMode = true; return S_FALSE; }
+ // CNewException is possible here. But probably CNewException is caused
+ // by error in data stream.
+ }
+Index: p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.h
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Compress/Rar3Decoder.h
++++ p7zip_16.02/CPP/7zip/Compress/Rar3Decoder.h
+@@ -192,6 +192,7 @@ class CDecoder:
+ UInt32 _lastFilter;
+
+ bool m_IsSolid;
++ bool _errorMode;
+
+ bool _lzMode;
+ bool _unsupportedFilter;
+@@ -200,6 +201,7 @@ class CDecoder:
+ UInt32 PrevAlignCount;
+
+ bool TablesRead;
++ bool TablesOK;
+
+ CPpmd7 _ppmd;
+ int PpmEscChar;
diff --git a/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
new file mode 100644
index 0000000000..dcde83e8a4
--- /dev/null
+++ b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
@@ -0,0 +1,27 @@
+fixes the below error
+
+| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp: In member function 'virtual LONG NArchive::NWim::CHandler::GetArchiveProperty(PROPID, PROPVARIANT*)':
+| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
+| 308 | numMethods++;
+| | ^~~~~~~~~~
+| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:318:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
+| 318 | numMethods++;
+
+
+use unsigned instead of bool
+Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
+
+Upstream-Status: Pending
+Index: p7zip_16.02/CPP/7zip/Archive/Wim/WimHandler.cpp
+===================================================================
+--- p7zip_16.02.orig/CPP/7zip/Archive/Wim/WimHandler.cpp
++++ p7zip_16.02/CPP/7zip/Archive/Wim/WimHandler.cpp
+@@ -298,7 +298,7 @@ STDMETHODIMP CHandler::GetArchivePropert
+
+ AString res;
+
+- bool numMethods = 0;
++ unsigned numMethods = 0;
+ for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++)
+ {
+ if (methodMask & ((UInt32)1 << i))
diff --git a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
index 13479a90fe..79677c6487 100644
--- a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
+++ b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
@@ -9,6 +9,9 @@ SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_al
file://do_not_override_compiler_and_do_not_strip.patch \
file://CVE-2017-17969.patch \
file://0001-Fix-narrowing-errors-Wc-11-narrowing.patch \
+ file://change_numMethods_from_bool_to_unsigned.patch \
+ file://CVE-2018-5996.patch \
+ file://CVE-2016-9296.patch \
"
SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf"
@@ -16,10 +19,26 @@ SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6
S = "${WORKDIR}/${BPN}_${PV}"
+do_compile_append() {
+ oe_runmake 7z
+}
+FILES_${PN} += "${libdir}/* ${bindir}/7z"
+
+FILES_SOLIBSDEV = ""
+INSANE_SKIP_${PN} += "dev-so"
+
do_install() {
install -d ${D}${bindir}
- install -m 0755 ${S}/bin/* ${D}${bindir}
+ install -d ${D}${bindir}/Codecs
+ install -d ${D}${libdir}
+ install -d ${D}${libdir}/Codecs
+ install -m 0755 ${S}/bin/7za ${D}${bindir}
ln -s 7za ${D}${bindir}/7z
+ install -m 0755 ${S}/bin/Codecs/* ${D}${libdir}/Codecs/
+ install -m 0755 ${S}/bin/7z.so ${D}${libdir}/lib7z.so
}
-BBCLASSEXTEND = "native"
+RPROVIDES_${PN} += "lib7z.so()(64bit) 7z lib7z.so"
+RPROVIDES_${PN}-dev += "lib7z.so()(64bit) 7z lib7z.so"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-extended/p8platform/p8platform_git.bb b/meta-oe/recipes-extended/p8platform/p8platform_git.bb
index 0690d4ba3c..2e52caeffa 100644
--- a/meta-oe/recipes-extended/p8platform/p8platform_git.bb
+++ b/meta-oe/recipes-extended/p8platform/p8platform_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://src/os.h;md5=752555fa94e82005d45fd201fee5bd33"
PV = "2.1.0.1"
-SRC_URI = "git://github.com/Pulse-Eight/platform.git \
+SRC_URI = "git://github.com/Pulse-Eight/platform.git;branch=master;protocol=https \
file://0001-Make-resulting-cmake-config-relocatable.patch"
SRCREV = "2d90f98620e25f47702c9e848380c0d93f29462b"
diff --git a/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb b/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb
index 9838e75ef5..5c2af44c73 100644
--- a/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb
+++ b/meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb
@@ -11,7 +11,7 @@ REQUIRED_DISTRO_FEATURES = "pam"
SRCREV = "e2145df09469bf84878e4729b4ecd814efb797d1"
-SRC_URI = "git://github.com/PADL/pam_ccreds"
+SRC_URI = "git://github.com/PADL/pam_ccreds;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
index 626b22fe48..5022300ba3 100644
--- a/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
+++ b/meta-oe/recipes-extended/pam/pam-plugin-ldapdb_1.3.bb
@@ -11,7 +11,7 @@ inherit features_check
REQUIRED_DISTRO_FEATURES = "pam"
SRCREV = "84d7b260f1ae6857ae36e014c9a5968e8aa1cbe8"
-SRC_URI = "git://github.com/rmbreak/pam_ldapdb \
+SRC_URI = "git://github.com/rmbreak/pam_ldapdb;branch=master;protocol=https \
file://0001-include-stdexcept-for-std-invalid_argument.patch \
"
diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb b/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb
index f5066da0d8..5c56a16f41 100644
--- a/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb
+++ b/meta-oe/recipes-extended/pmdk/pmdk_1.7.bb
@@ -11,7 +11,7 @@ DEPENDS_append_libc-musl = " fts"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/pmem/pmdk.git \
+SRC_URI = "git://github.com/pmem/pmdk.git;branch=master;protocol=https \
file://0001-jemalloc-jemalloc.cfg-Specify-the-host-when-building.patch \
file://0002-Makefile-Don-t-install-the-docs.patch \
file://0001-os_posix-Use-__FreeBSD__-to-control-secure_getenv-de.patch \
diff --git a/meta-oe/recipes-extended/polkit/files/CVE-2021-4034.patch b/meta-oe/recipes-extended/polkit/files/CVE-2021-4034.patch
new file mode 100644
index 0000000000..cab1c83c09
--- /dev/null
+++ b/meta-oe/recipes-extended/polkit/files/CVE-2021-4034.patch
@@ -0,0 +1,74 @@
+From ed8b418f1341cf7fc576f6b17de5c6dd4017e034 Mon Sep 17 00:00:00 2001
+From: "Jeremy A. Puhlman" <jpuhlman@mvista.com>
+Date: Thu, 27 Jan 2022 00:01:27 +0000
+Subject: [PATCH] CVE-2021-4034: Local privilege escalation in pkexec due to
+ incorrect handling of argument vector
+
+Upstream-Status: Backport https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683
+CVE: CVE-2021-4034
+
+Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
+---
+ src/programs/pkcheck.c | 6 ++++++
+ src/programs/pkexec.c | 21 ++++++++++++++++++++-
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/src/programs/pkcheck.c b/src/programs/pkcheck.c
+index f1bb4e1..aff4f60 100644
+--- a/src/programs/pkcheck.c
++++ b/src/programs/pkcheck.c
+@@ -363,6 +363,12 @@ main (int argc, char *argv[])
+ local_agent_handle = NULL;
+ ret = 126;
+
++ if (argc < 1)
++ {
++ help();
++ exit(1);
++ }
++
+ /* Disable remote file access from GIO. */
+ setenv ("GIO_USE_VFS", "local", 1);
+
+diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
+index 7698c5c..3ff4c58 100644
+--- a/src/programs/pkexec.c
++++ b/src/programs/pkexec.c
+@@ -488,6 +488,17 @@ main (int argc, char *argv[])
+ pid_t pid_of_caller;
+ gpointer local_agent_handle;
+
++
++ /*
++ * If 'pkexec' is called wrong, just show help and bail out.
++ */
++ if (argc<1)
++ {
++ clearenv();
++ usage(argc, argv);
++ exit(1);
++ }
++
+ ret = 127;
+ authority = NULL;
+ subject = NULL;
+@@ -636,7 +647,15 @@ main (int argc, char *argv[])
+ goto out;
+ }
+ g_free (path);
+- argv[n] = path = s;
++ path = s;
++
++ /* argc<2 and pkexec runs just shell, argv is guaranteed to be null-terminated.
++ * /-less shell shouldn't happen, but let's be defensive and don't write to null-termination
++ */
++ if (argv[n] != NULL)
++ {
++ argv[n] = path;
++ }
+ }
+ if (access (path, F_OK) != 0)
+ {
+--
+2.26.2
+
diff --git a/meta-oe/recipes-extended/polkit/files/CVE-2021-4115.patch b/meta-oe/recipes-extended/polkit/files/CVE-2021-4115.patch
new file mode 100644
index 0000000000..37e0d6063c
--- /dev/null
+++ b/meta-oe/recipes-extended/polkit/files/CVE-2021-4115.patch
@@ -0,0 +1,87 @@
+From 41cb093f554da8772362654a128a84dd8a5542a7 Mon Sep 17 00:00:00 2001
+From: Jan Rybar <jrybar@redhat.com>
+Date: Mon, 21 Feb 2022 08:29:05 +0000
+Subject: [PATCH] CVE-2021-4115 (GHSL-2021-077) fix
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/polkit/polkit/-/commit/41cb093f554da8772362654a128a84dd8a5542a7.patch]
+CVE: CVE-2021-4115
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+---
+ src/polkit/polkitsystembusname.c | 38 ++++++++++++++++++++++++++++----
+ 1 file changed, 34 insertions(+), 4 deletions(-)
+
+diff --git a/src/polkit/polkitsystembusname.c b/src/polkit/polkitsystembusname.c
+index 8ed1363..2fbf5f1 100644
+--- a/src/polkit/polkitsystembusname.c
++++ b/src/polkit/polkitsystembusname.c
+@@ -62,6 +62,10 @@ enum
+ PROP_NAME,
+ };
+
++
++guint8 dbus_call_respond_fails; // has to be global because of callback
++
++
+ static void subject_iface_init (PolkitSubjectIface *subject_iface);
+
+ G_DEFINE_TYPE_WITH_CODE (PolkitSystemBusName, polkit_system_bus_name, G_TYPE_OBJECT,
+@@ -364,6 +368,7 @@ on_retrieved_unix_uid_pid (GObject *src,
+ if (!v)
+ {
+ data->caught_error = TRUE;
++ dbus_call_respond_fails += 1;
+ }
+ else
+ {
+@@ -405,6 +410,8 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus
+ tmp_context = g_main_context_new ();
+ g_main_context_push_thread_default (tmp_context);
+
++ dbus_call_respond_fails = 0;
++
+ /* Do two async calls as it's basically as fast as one sync call.
+ */
+ g_dbus_connection_call (connection,
+@@ -432,11 +439,34 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus
+ on_retrieved_unix_uid_pid,
+ &data);
+
+- while (!((data.retrieved_uid && data.retrieved_pid) || data.caught_error))
+- g_main_context_iteration (tmp_context, TRUE);
++ while (TRUE)
++ {
++ /* If one dbus call returns error, we must wait until the other call
++ * calls _call_finish(), otherwise fd leak is possible.
++ * Resolves: GHSL-2021-077
++ */
+
+- if (data.caught_error)
+- goto out;
++ if ( (dbus_call_respond_fails > 1) )
++ {
++ // we got two faults, we can leave
++ goto out;
++ }
++
++ if ((data.caught_error && (data.retrieved_pid || data.retrieved_uid)))
++ {
++ // we got one fault and the other call finally finished, we can leave
++ goto out;
++ }
++
++ if ( !(data.retrieved_uid && data.retrieved_pid) )
++ {
++ g_main_context_iteration (tmp_context, TRUE);
++ }
++ else
++ {
++ break;
++ }
++ }
+
+ if (out_uid)
+ *out_uid = data.uid;
+--
+GitLab
+
diff --git a/meta-oe/recipes-extended/polkit/polkit/CVE-2021-3560.patch b/meta-oe/recipes-extended/polkit/polkit/CVE-2021-3560.patch
new file mode 100644
index 0000000000..76308ffdb9
--- /dev/null
+++ b/meta-oe/recipes-extended/polkit/polkit/CVE-2021-3560.patch
@@ -0,0 +1,33 @@
+From a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81 Mon Sep 17 00:00:00 2001
+From: Jan Rybar <jrybar@redhat.com>
+Date: Wed, 2 Jun 2021 15:43:38 +0200
+Subject: [PATCH] GHSL-2021-074: authentication bypass vulnerability in polkit
+
+initial values returned if error caught
+
+CVE: CVE-2021-3560
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/polkit/polkit/-/commit/a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/polkit/polkitsystembusname.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/polkit/polkitsystembusname.c b/src/polkit/polkitsystembusname.c
+index 8daa12c..8ed1363 100644
+--- a/src/polkit/polkitsystembusname.c
++++ b/src/polkit/polkitsystembusname.c
+@@ -435,6 +435,9 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus
+ while (!((data.retrieved_uid && data.retrieved_pid) || data.caught_error))
+ g_main_context_iteration (tmp_context, TRUE);
+
++ if (data.caught_error)
++ goto out;
++
+ if (out_uid)
+ *out_uid = data.uid;
+ if (out_pid)
+--
+2.29.2
+
diff --git a/meta-oe/recipes-extended/polkit/polkit_0.116.bb b/meta-oe/recipes-extended/polkit/polkit_0.116.bb
index ad1973b136..dd8e208616 100644
--- a/meta-oe/recipes-extended/polkit/polkit_0.116.bb
+++ b/meta-oe/recipes-extended/polkit/polkit_0.116.bb
@@ -25,6 +25,9 @@ PAM_SRC_URI = "file://polkit-1_pam.patch"
SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
file://0003-make-netgroup-support-optional.patch \
+ file://CVE-2021-3560.patch \
+ file://CVE-2021-4034.patch \
+ file://CVE-2021-4115.patch \
"
SRC_URI[md5sum] = "4b37258583393e83069a0e2e89c0162a"
SRC_URI[sha256sum] = "88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1"
diff --git a/meta-oe/recipes-extended/redis/redis_5.0.9.bb b/meta-oe/recipes-extended/redis/redis_5.0.14.bb
index d04293369a..3d849ec8c3 100644
--- a/meta-oe/recipes-extended/redis/redis_5.0.9.bb
+++ b/meta-oe/recipes-extended/redis/redis_5.0.14.bb
@@ -17,8 +17,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \
file://GNU_SOURCE.patch \
"
-SRC_URI[md5sum] = "c94523c9f4ee662027ddf90575d0e058"
-SRC_URI[sha256sum] = "53d0ae164cd33536c3d4b720ae9a128ea6166ebf04ff1add3b85f1242090cb85"
+SRC_URI[sha256sum] = "3ea5024766d983249e80d4aa9457c897a9f079957d0fb1f35682df233f997f32"
inherit autotools-brokensep update-rc.d systemd useradd
diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb
index 5662e63474..914b12e7ca 100644
--- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb
@@ -10,7 +10,7 @@ SRCREV = "56a83f4f52e6745cd4352f9ee008be3183a6dedf"
PV = "1.7.2"
SRC_URI = "\
- git://github.com/oetiker/rrdtool-1.x.git;branch=master;protocol=http; \
+ git://github.com/oetiker/rrdtool-1.x.git;branch=master;protocol=http;protocol=https \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb b/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
index b84dde3d37..3b63971e5d 100644
--- a/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
+++ b/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a958bb07122368f3e1d9b2efe07d231f"
DEPENDS = ""
-SRC_URI = "git://github.com/rsyslog/libfastjson.git;protocol=https \
+SRC_URI = "git://github.com/rsyslog/libfastjson.git;protocol=https;branch=master \
file://0001-fix-jump-misses-init-gcc-8-warning.patch"
SRCREV = "4758b1caf69ada911ef79e1d80793fe489b98dff"
diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb
index a4663148cd..9da9d7c96c 100644
--- a/meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/librelp_1.5.0.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
DEPENDS = "gmp nettle libidn zlib gnutls openssl"
-SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https \
+SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=master \
"
SRCREV = "0beb2258e12e4131dc31e261078ea53d18f787d7"
diff --git a/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
index ffd46da0af..e720d3e5c8 100644
--- a/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
+++ b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://../README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb2
PV .= "+git${SRCPV}"
-SRC_URI = "git://pagure.io/sanlock.git;protocol=http \
+SRC_URI = "git://pagure.io/sanlock.git;protocol=http;branch=master \
file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch;patchdir=../ \
"
SRCREV = "cff348800722f7dadf030ffe7494c2df714996e3"
diff --git a/meta-oe/recipes-extended/sedutil/sedutil_git.bb b/meta-oe/recipes-extended/sedutil/sedutil_git.bb
index 765618433b..03446c324d 100644
--- a/meta-oe/recipes-extended/sedutil/sedutil_git.bb
+++ b/meta-oe/recipes-extended/sedutil/sedutil_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://Common/LICENSE.txt;md5=d32239bcb673463ab874e80d47fae5
BASEPV = "1.15.1"
PV = "${BASEPV}+git${SRCPV}"
SRCREV = "358cc758948be788284d5faba46ccf4cc1813796"
-SRC_URI = "git://github.com/Drive-Trust-Alliance/sedutil.git \
+SRC_URI = "git://github.com/Drive-Trust-Alliance/sedutil.git;branch=master;protocol=https \
file://0001-Fix-build-on-big-endian-architectures.patch \
"
diff --git a/meta-oe/recipes-extended/socketcan/can-isotp_git.bb b/meta-oe/recipes-extended/socketcan/can-isotp_git.bb
index e40e1cd263..7d016bc963 100644
--- a/meta-oe/recipes-extended/socketcan/can-isotp_git.bb
+++ b/meta-oe/recipes-extended/socketcan/can-isotp_git.bb
@@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=72d977d697c3c05830fdff00a7448931"
SRCREV = "b31bce98d65f894aad6427bcf6f3f7822e261a59"
PV = "1.0+git${SRCPV}"
-SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https"
+SRC_URI = "git://github.com/hartkopp/can-isotp.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/socketcan/can-utils_git.bb b/meta-oe/recipes-extended/socketcan/can-utils_git.bb
index 519368817f..92b38030fe 100644
--- a/meta-oe/recipes-extended/socketcan/can-utils_git.bb
+++ b/meta-oe/recipes-extended/socketcan/can-utils_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=44;md5=a9e1169c6c9a114a61
DEPENDS = "libsocketcan"
-SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git"
+SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=https;branch=master"
SRCREV = "da65fdfe0d1986625ee00af0b56ae17ec132e700"
diff --git a/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb b/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb
index e1508af857..56466a6cd2 100644
--- a/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb
+++ b/meta-oe/recipes-extended/socketcan/canutils_4.0.6.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "libsocketcan"
SRCREV = "299dff7f5322bf0348dcdd60071958ebedf5f09d"
-SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git \
+SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git;branch=master \
file://0001-canutils-candump-Add-error-frame-s-handling.patch \
"
diff --git a/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb b/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb
index 0debe47e03..6a44cff93d 100644
--- a/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb
+++ b/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://src/libsocketcan.c;beginline=3;endline=17;md5=97e38ad
SRCREV = "0ff01ae7e4d271a7b81241e7a7026bfcea0add3f"
-SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git"
+SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/sysdig/sysdig_git.bb b/meta-oe/recipes-extended/sysdig/sysdig_git.bb
index 04a022af4f..b06340f82f 100644
--- a/meta-oe/recipes-extended/sysdig/sysdig_git.bb
+++ b/meta-oe/recipes-extended/sysdig/sysdig_git.bb
@@ -15,10 +15,10 @@ JIT_mipsarchn64 = ""
JIT_riscv64 = ""
JIT_riscv32 = ""
-DEPENDS += "lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp tbb jq openssl elfutils protobuf protobuf-native jq-native"
+DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp tbb jq openssl elfutils protobuf protobuf-native jq-native"
RDEPENDS_${PN} = "bash"
-SRC_URI = "git://github.com/draios/sysdig.git;branch=dev \
+SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https \
file://0001-fix-build-with-LuaJIT-2.1-betas.patch \
file://0001-Fix-build-with-musl-backtrace-APIs-are-glibc-specifi.patch \
file://fix-uint64-const.patch \
@@ -32,7 +32,6 @@ S = "${WORKDIR}/git"
EXTRA_OECMAKE = "\
-DBUILD_DRIVER=OFF \
-DUSE_BUNDLED_DEPS=OFF \
- -DUSE_BUNDLED_B64=ON \
-DCREATE_TEST_TARGETS=OFF \
-DDIR_ETC=${sysconfdir} \
-DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \
diff --git a/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb b/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
index 637770af24..c9d9fb5729 100644
--- a/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
+++ b/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "Transparent Inter-Process Communication protocol"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://tipclog/tipc.h;endline=35;md5=985b6ea8735818511d276c1b466cce98"
-SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils \
+SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils;branch=master \
file://0001-include-sys-select.h-for-FD_-definitions.patch \
file://0002-replace-non-standard-uint-with-unsigned-int.patch \
file://0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch \
diff --git a/meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb b/meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb
index 38ce4f5571..c62cef36d3 100644
--- a/meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb
+++ b/meta-oe/recipes-extended/triggerhappy/triggerhappy_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
# matches debian/0.5.0-1 tag
SRCREV = "44a173195986d0d853316cb02a58785ded66c12b"
PV = "0.5.0+git${SRCPV}"
-SRC_URI = "git://github.com/wertarbyte/${BPN}.git;branch=debian"
+SRC_URI = "git://github.com/wertarbyte/${BPN}.git;branch=debian;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/upm/upm_git.bb b/meta-oe/recipes-extended/upm/upm_git.bb
index 6a7611f382..7643d13e25 100644
--- a/meta-oe/recipes-extended/upm/upm_git.bb
+++ b/meta-oe/recipes-extended/upm/upm_git.bb
@@ -10,7 +10,7 @@ DEPENDS = "libjpeg-turbo mraa"
SRCREV = "5cf20df96c6b35c19d5b871ba4e319e96b4df72d"
PV = "2.0.0+git${SRCPV}"
-SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http \
+SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=http;branch=master;protocol=https \
file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \
file://0001-Use-stdint-types.patch \
file://0001-initialize-local-variables-before-use.patch \
diff --git a/meta-oe/recipes-extended/wipe/wipe_0.24.bb b/meta-oe/recipes-extended/wipe/wipe_0.24.bb
index 831d514a4e..3ccc5afd5c 100644
--- a/meta-oe/recipes-extended/wipe/wipe_0.24.bb
+++ b/meta-oe/recipes-extended/wipe/wipe_0.24.bb
@@ -9,7 +9,7 @@ HOMEPAGE = "http://lambda-diode.com/software/wipe/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
-SRC_URI = "git://github.com/berke/wipe.git;branch=master \
+SRC_URI = "git://github.com/berke/wipe.git;branch=master;protocol=https \
file://support-cross-compile-for-linux.patch \
file://makefile-add-ldflags.patch \
"
diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb
index 06337b79c7..8f766ac877 100644
--- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb
+++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_git.bb
@@ -21,7 +21,7 @@ DEPENDS += " \
tiff \
"
-SRC_URI = "git://github.com/wxWidgets/wxWidgets.git"
+SRC_URI = "git://github.com/wxWidgets/wxWidgets.git;branch=master;protocol=https"
PV = "3.1.3"
SRCREV= "8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/zlog/zlog_1.2.14.bb b/meta-oe/recipes-extended/zlog/zlog_1.2.14.bb
index b94664c33c..eddf1ed960 100644
--- a/meta-oe/recipes-extended/zlog/zlog_1.2.14.bb
+++ b/meta-oe/recipes-extended/zlog/zlog_1.2.14.bb
@@ -4,7 +4,7 @@ LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
SRCREV = "8fc78c3c65cb705953a2f3f9a813c3ef3c8b2270"
-SRC_URI = "git://github.com/HardySimpson/zlog"
+SRC_URI = "git://github.com/HardySimpson/zlog;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-extended/zstd/zstd_1.4.5.bb b/meta-oe/recipes-extended/zstd/zstd_1.4.5.bb
index cd0b471e17..0c564c0d1c 100644
--- a/meta-oe/recipes-extended/zstd/zstd_1.4.5.bb
+++ b/meta-oe/recipes-extended/zstd/zstd_1.4.5.bb
@@ -9,7 +9,7 @@ LICENSE = "BSD-3-Clause & GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c7f0b161edbe52f5f345a3d1311d0b32 \
file://COPYING;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
-SRC_URI = "git://github.com/facebook/zstd.git;nobranch=1 \
+SRC_URI = "git://github.com/facebook/zstd.git;branch=dev;protocol=https \
file://0001-Fix-legacy-build-after-2103.patch \
"
diff --git a/meta-oe/recipes-gnome/pyxdg/pyxdg_0.26.bb b/meta-oe/recipes-gnome/pyxdg/pyxdg_0.26.bb
index a957c1d673..6fa31c58ff 100644
--- a/meta-oe/recipes-gnome/pyxdg/pyxdg_0.26.bb
+++ b/meta-oe/recipes-gnome/pyxdg/pyxdg_0.26.bb
@@ -5,7 +5,7 @@ LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=f30a9716ef3762e3467a2f62bf790f0a"
SRCREV = "7db14dcf4c4305c3859a2d9fcf9f5da2db328330"
-SRC_URI = "git://anongit.freedesktop.org/xdg/pyxdg"
+SRC_URI = "git://anongit.freedesktop.org/xdg/pyxdg;branch=master"
inherit distutils3
diff --git a/meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb b/meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb
index 32f0815921..2d13f26a3d 100644
--- a/meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb
+++ b/meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb
@@ -8,7 +8,7 @@ PV = "0.3"
PR = "r1"
SRCREV = "ef2e1a390e768e21e6a6268977580ee129a96633"
-SRC_URI = "git://github.com/lucasdemarchi/dietsplash.git \
+SRC_URI = "git://github.com/lucasdemarchi/dietsplash.git;branch=master;protocol=https \
file://0001-configure.ac-Do-not-demand-linker-hash-style.patch \
"
diff --git a/meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb b/meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb
index 007385101c..24f8e44d89 100644
--- a/meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb
+++ b/meta-oe/recipes-graphics/dnfdragora/dnfdragora_git.bb
@@ -3,7 +3,7 @@ LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \
"
-SRC_URI = "git://github.com/manatools/dnfdragora.git \
+SRC_URI = "git://github.com/manatools/dnfdragora.git;branch=master;protocol=https \
file://0001-disable-build-manpages.patch \
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
file://0001-To-fix-error-when-do_package.patch \
diff --git a/meta-oe/recipes-graphics/fbgrab/fbgrab_1.3.3.bb b/meta-oe/recipes-graphics/fbgrab/fbgrab_1.3.3.bb
index e3dff91915..8036d5f7a9 100644
--- a/meta-oe/recipes-graphics/fbgrab/fbgrab_1.3.3.bb
+++ b/meta-oe/recipes-graphics/fbgrab/fbgrab_1.3.3.bb
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
SECTION = "console/utils"
DEPENDS = "libpng zlib"
-SRC_URI = "git://github.com/GunnarMonell/fbgrab.git;protocol=https"
+SRC_URI = "git://github.com/GunnarMonell/fbgrab.git;protocol=https;branch=master"
SRCREV = "b179e2a42b8a5d72516b9c8d91713c9025cf6044"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb b/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
index 1863f95f0f..8f65da2c1f 100644
--- a/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
+++ b/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
@@ -15,7 +15,7 @@ REQUIRED_DISTRO_FEATURES_append_class-target = " x11"
# tag 20190801
SRCREV = "ac635b818e38ddb8e7e2e1057330a32b4e25476e"
-SRC_URI = "git://github.com/${BPN}/${BPN}.git \
+SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \
file://0001-include-sys-select-on-non-glibc-platforms.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/fvwm/fvwm_2.6.9.bb b/meta-oe/recipes-graphics/fvwm/fvwm_2.6.9.bb
index 3b01a216bd..d405cb8775 100644
--- a/meta-oe/recipes-graphics/fvwm/fvwm_2.6.9.bb
+++ b/meta-oe/recipes-graphics/fvwm/fvwm_2.6.9.bb
@@ -32,7 +32,7 @@ DEPENDS = " \
"
SRC_URI = " \
- git://github.com/fvwmorg/fvwm.git;protocol=https \
+ git://github.com/fvwmorg/fvwm.git;protocol=https;branch=master \
file://0001-Fix-compilation-for-disabled-gnome.patch \
"
diff --git a/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb b/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
index e2f4dbebc5..b44f06c555 100644
--- a/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
+++ b/meta-oe/recipes-graphics/glm/glm_0.9.9.6.bb
@@ -9,7 +9,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://copying.txt;md5=4a735e33f271f57404fda17e80085411"
SRC_URI = " \
- git://github.com/g-truc/glm;branch=master \
+ git://github.com/g-truc/glm;branch=master;protocol=https \
file://0001-Fix-Wimplicit-int-float-conversion-warnings-with-cla.patch \
file://glmConfig.cmake.in \
file://glmConfigVersion.cmake.in \
diff --git a/meta-oe/recipes-graphics/graphviz/graphviz_2.40.1.bb b/meta-oe/recipes-graphics/graphviz/graphviz_2.40.1.bb
index d393ae2a1c..72e2f5cc7a 100644
--- a/meta-oe/recipes-graphics/graphviz/graphviz_2.40.1.bb
+++ b/meta-oe/recipes-graphics/graphviz/graphviz_2.40.1.bb
@@ -24,7 +24,7 @@ inherit autotools-brokensep pkgconfig gettext
# https://github.com/ellson/MOTHBALLED-graphviz/releases/tag/stable_release_2.40.1
# https://gitlab.com/graphviz/graphviz/-/commit/67cd2e5121379a38e0801cc05cce5033f8a2a609
SRCREV = "67cd2e5121379a38e0801cc05cce5033f8a2a609"
-SRC_URI = "git://gitlab.com/${BPN}/${BPN}.git \
+SRC_URI = "git://gitlab.com/${BPN}/${BPN}.git;branch=master \
file://0001-plugin-pango-Include-freetype-headers-explicitly.patch \
"
# Use native mkdefs
@@ -55,6 +55,17 @@ do_install_append_class-native() {
install -m755 ${B}/lib/gvpr/mkdefs ${D}${bindir}
}
+# create /usr/lib/graphviz/config6
+graphviz_sstate_postinst() {
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}
+ echo '#!/bin/sh' > $dest
+ echo '' >> $dest
+ echo 'dot -c' >> $dest
+ chmod 0755 $dest
+}
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " graphviz_sstate_postinst"
+
PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo"
FILES_${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/"
diff --git a/meta-oe/recipes-graphics/jasper/jasper_2.0.16.bb b/meta-oe/recipes-graphics/jasper/jasper_2.0.16.bb
index 1d5a29438a..977c0961bc 100644
--- a/meta-oe/recipes-graphics/jasper/jasper_2.0.16.bb
+++ b/meta-oe/recipes-graphics/jasper/jasper_2.0.16.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/mdadams/jasper"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a80440d1d8f17d041c71c7271d6e06eb"
-SRC_URI = "git://github.com/mdadams/jasper.git;protocol=https"
+SRC_URI = "git://github.com/mdadams/jasper.git;protocol=https;branch=master"
SRCREV = "9aef6d91a82a8a6aecb575cbee57f74470603cc2"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.12.bb b/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.12.bb
index dfdf82458c..7f622c2793 100644
--- a/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.12.bb
+++ b/meta-oe/recipes-graphics/libvncserver/libvncserver_0.9.12.bb
@@ -44,7 +44,7 @@ FILES_libvncclient = "${libdir}/libvncclient.*"
inherit cmake
-SRC_URI = "git://github.com/LibVNC/libvncserver"
+SRC_URI = "git://github.com/LibVNC/libvncserver;branch=master;protocol=https"
SRCREV = "1354f7f1bb6962dab209eddb9d6aac1f03408110"
PV .= "+git${SRCPV}"
diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses_2.52.0.bb b/meta-oe/recipes-graphics/libyui/libyui-ncurses_2.52.0.bb
index 1a376a4697..8fda4b5fb0 100644
--- a/meta-oe/recipes-graphics/libyui/libyui-ncurses_2.52.0.bb
+++ b/meta-oe/recipes-graphics/libyui/libyui-ncurses_2.52.0.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
file://COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \
"
-SRC_URI = "git://github.com/libyui/libyui-ncurses.git \
+SRC_URI = "git://github.com/libyui/libyui-ncurses.git;branch=master;protocol=https \
file://0003-Simplify-ncurses-finding-module.patch \
"
diff --git a/meta-oe/recipes-graphics/libyui/libyui_3.6.0.bb b/meta-oe/recipes-graphics/libyui/libyui_3.6.0.bb
index f3c112c3b8..72a86955e1 100644
--- a/meta-oe/recipes-graphics/libyui/libyui_3.6.0.bb
+++ b/meta-oe/recipes-graphics/libyui/libyui_3.6.0.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING.gpl-3;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
"
-SRC_URI = "git://github.com/libyui/libyui-old.git \
+SRC_URI = "git://github.com/libyui/libyui-old.git;branch=master;protocol=https \
file://0001-Fix-build-with-clang.patch \
file://0001-Use-relative-install-paths-for-CMake.patch \
"
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-1.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-1.patch
new file mode 100644
index 0000000000..98988e686e
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-1.patch
@@ -0,0 +1,72 @@
+From 21399f6b7d318fcdf4406d5e88723c4922202aa3 Mon Sep 17 00:00:00 2001
+From: Young Xiao <YangX92@hotmail.com>
+Date: Sat, 16 Mar 2019 19:57:27 +0800
+Subject: [PATCH] convertbmp: detect invalid file dimensions early
+
+width/length dimensions read from bmp headers are not necessarily
+valid. For instance they may have been maliciously set to very large
+values with the intention to cause DoS (large memory allocation, stack
+overflow). In these cases we want to detect the invalid size as early
+as possible.
+
+This commit introduces a counter which verifies that the number of
+written bytes corresponds to the advertized width/length.
+
+See commit 8ee335227bbc for details.
+
+Signed-off-by: Young Xiao <YangX92@hotmail.com>
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2019-12973
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/bin/jp2/convertbmp.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/bin/jp2/convertbmp.c b/src/bin/jp2/convertbmp.c
+index 0af52f816..ec34f535b 100644
+--- a/src/bin/jp2/convertbmp.c
++++ b/src/bin/jp2/convertbmp.c
+@@ -622,13 +622,13 @@ static OPJ_BOOL bmp_read_rle8_data(FILE* IN, OPJ_UINT8* pData,
+ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ OPJ_UINT32 stride, OPJ_UINT32 width, OPJ_UINT32 height)
+ {
+- OPJ_UINT32 x, y;
++ OPJ_UINT32 x, y, written;
+ OPJ_UINT8 *pix;
+ const OPJ_UINT8 *beyond;
+
+ beyond = pData + stride * height;
+ pix = pData;
+- x = y = 0U;
++ x = y = written = 0U;
+ while (y < height) {
+ int c = getc(IN);
+ if (c == EOF) {
+@@ -642,6 +642,7 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ for (j = 0; (j < c) && (x < width) &&
+ ((OPJ_SIZE_T)pix < (OPJ_SIZE_T)beyond); j++, x++, pix++) {
+ *pix = (OPJ_UINT8)((j & 1) ? (c1 & 0x0fU) : ((c1 >> 4) & 0x0fU));
++ written++;
+ }
+ } else { /* absolute mode */
+ c = getc(IN);
+@@ -671,6 +672,7 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ c1 = (OPJ_UINT8)getc(IN);
+ }
+ *pix = (OPJ_UINT8)((j & 1) ? (c1 & 0x0fU) : ((c1 >> 4) & 0x0fU));
++ written++;
+ }
+ if (((c & 3) == 1) || ((c & 3) == 2)) { /* skip padding byte */
+ getc(IN);
+@@ -678,6 +680,10 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ }
+ }
+ } /* while(y < height) */
++ if (written != width * height) {
++ fprintf(stderr, "warning, image's actual size does not match advertized one\n");
++ return OPJ_FALSE;
++ }
+ return OPJ_TRUE;
+ }
+
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-2.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-2.patch
new file mode 100644
index 0000000000..2177bfdbdb
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2019-12973-2.patch
@@ -0,0 +1,86 @@
+From 3aef207f90e937d4931daf6d411e092f76d82e66 Mon Sep 17 00:00:00 2001
+From: Young Xiao <YangX92@hotmail.com>
+Date: Sat, 16 Mar 2019 20:09:59 +0800
+Subject: [PATCH] bmp_read_rle4_data(): avoid potential infinite loop
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2019-12973
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/bin/jp2/convertbmp.c | 32 ++++++++++++++++++++++++++------
+ 1 file changed, 26 insertions(+), 6 deletions(-)
+
+diff --git a/src/bin/jp2/convertbmp.c b/src/bin/jp2/convertbmp.c
+index ec34f535b..2fc4e9bc4 100644
+--- a/src/bin/jp2/convertbmp.c
++++ b/src/bin/jp2/convertbmp.c
+@@ -632,12 +632,18 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ while (y < height) {
+ int c = getc(IN);
+ if (c == EOF) {
+- break;
++ return OPJ_FALSE;
+ }
+
+ if (c) { /* encoded mode */
+- int j;
+- OPJ_UINT8 c1 = (OPJ_UINT8)getc(IN);
++ int j, c1_int;
++ OPJ_UINT8 c1;
++
++ c1_int = getc(IN);
++ if (c1_int == EOF) {
++ return OPJ_FALSE;
++ }
++ c1 = (OPJ_UINT8)c1_int;
+
+ for (j = 0; (j < c) && (x < width) &&
+ ((OPJ_SIZE_T)pix < (OPJ_SIZE_T)beyond); j++, x++, pix++) {
+@@ -647,7 +653,7 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ } else { /* absolute mode */
+ c = getc(IN);
+ if (c == EOF) {
+- break;
++ return OPJ_FALSE;
+ }
+
+ if (c == 0x00) { /* EOL */
+@@ -658,8 +664,14 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ break;
+ } else if (c == 0x02) { /* MOVE by dxdy */
+ c = getc(IN);
++ if (c == EOF) {
++ return OPJ_FALSE;
++ }
+ x += (OPJ_UINT32)c;
+ c = getc(IN);
++ if (c == EOF) {
++ return OPJ_FALSE;
++ }
+ y += (OPJ_UINT32)c;
+ pix = pData + y * stride + x;
+ } else { /* 03 .. 255 : absolute mode */
+@@ -669,13 +681,21 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
+ for (j = 0; (j < c) && (x < width) &&
+ ((OPJ_SIZE_T)pix < (OPJ_SIZE_T)beyond); j++, x++, pix++) {
+ if ((j & 1) == 0) {
+- c1 = (OPJ_UINT8)getc(IN);
++ int c1_int;
++ c1_int = getc(IN);
++ if (c1_int == EOF) {
++ return OPJ_FALSE;
++ }
++ c1 = (OPJ_UINT8)c1_int;
+ }
+ *pix = (OPJ_UINT8)((j & 1) ? (c1 & 0x0fU) : ((c1 >> 4) & 0x0fU));
+ written++;
+ }
+ if (((c & 3) == 1) || ((c & 3) == 2)) { /* skip padding byte */
+- getc(IN);
++ c = getc(IN);
++ if (c == EOF) {
++ return OPJ_FALSE;
++ }
+ }
+ }
+ }
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-15389.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-15389.patch
new file mode 100644
index 0000000000..f22e153b52
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-15389.patch
@@ -0,0 +1,43 @@
+From e8e258ab049240c2dd1f1051b4e773b21e2d3dc0 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Sun, 28 Jun 2020 14:19:59 +0200
+Subject: [PATCH] opj_decompress: fix double-free on input directory with mix
+ of valid and invalid images (CVE-2020-15389)
+
+Fixes #1261
+
+Credits to @Ruia-ruia for reporting and analysis.
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-15389
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/bin/jp2/opj_decompress.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c
+index 7eeb0952f..2634907f0 100644
+--- a/src/bin/jp2/opj_decompress.c
++++ b/src/bin/jp2/opj_decompress.c
+@@ -1316,10 +1316,6 @@ static opj_image_t* upsample_image_components(opj_image_t* original)
+ int main(int argc, char **argv)
+ {
+ opj_decompress_parameters parameters; /* decompression parameters */
+- opj_image_t* image = NULL;
+- opj_stream_t *l_stream = NULL; /* Stream */
+- opj_codec_t* l_codec = NULL; /* Handle to a decompressor */
+- opj_codestream_index_t* cstr_index = NULL;
+
+ OPJ_INT32 num_images, imageno;
+ img_fol_t img_fol;
+@@ -1393,6 +1389,10 @@ int main(int argc, char **argv)
+
+ /*Decoding image one by one*/
+ for (imageno = 0; imageno < num_images ; imageno++) {
++ opj_image_t* image = NULL;
++ opj_stream_t *l_stream = NULL; /* Stream */
++ opj_codec_t* l_codec = NULL; /* Handle to a decompressor */
++ opj_codestream_index_t* cstr_index = NULL;
+
+ if (!parameters.quiet) {
+ fprintf(stderr, "\n");
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-1.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-1.patch
new file mode 100644
index 0000000000..da06db6db7
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-1.patch
@@ -0,0 +1,29 @@
+From eaa098b59b346cb88e4d10d505061f669d7134fc Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 23 Nov 2020 13:49:05 +0100
+Subject: [PATCH] Encoder: grow buffer size in
+ opj_tcd_code_block_enc_allocate_data() to avoid write heap buffer overflow in
+ opj_mqc_flush (fixes #1283)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27814
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/tcd.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/src/lib/openjp2/tcd.c
++++ b/src/lib/openjp2/tcd.c
+@@ -1235,9 +1235,11 @@ static OPJ_BOOL opj_tcd_code_block_enc_a
+
+ /* +1 is needed for https://github.com/uclouvain/openjpeg/issues/835 */
+ /* and actually +2 required for https://github.com/uclouvain/openjpeg/issues/982 */
++ /* and +7 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 3) */
++ /* and +26 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 7) */
+ /* TODO: is there a theoretical upper-bound for the compressed code */
+ /* block size ? */
+- l_data_size = 2 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
++ l_data_size = 26 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
+ (p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));
+
+ if (l_data_size > p_code_block->data_size) {
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-2.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-2.patch
new file mode 100644
index 0000000000..9c5894c720
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-2.patch
@@ -0,0 +1,27 @@
+From 15cf3d95814dc931ca0ecb132f81cb152e051bae Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 23 Nov 2020 18:14:02 +0100
+Subject: [PATCH] Encoder: grow again buffer size in
+ opj_tcd_code_block_enc_allocate_data() (fixes #1283)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27814
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/tcd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/lib/openjp2/tcd.c
++++ b/src/lib/openjp2/tcd.c
+@@ -1237,9 +1237,10 @@ static OPJ_BOOL opj_tcd_code_block_enc_a
+ /* and actually +2 required for https://github.com/uclouvain/openjpeg/issues/982 */
+ /* and +7 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 3) */
+ /* and +26 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 7) */
++ /* and +28 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 44) */
+ /* TODO: is there a theoretical upper-bound for the compressed code */
+ /* block size ? */
+- l_data_size = 26 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
++ l_data_size = 28 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
+ (p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));
+
+ if (l_data_size > p_code_block->data_size) {
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-3.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-3.patch
new file mode 100644
index 0000000000..1eb030af46
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-3.patch
@@ -0,0 +1,30 @@
+From 649298dcf84b2f20cfe458d887c1591db47372a6 Mon Sep 17 00:00:00 2001
+From: yuan <zodf0055980@gmail.com>
+Date: Wed, 25 Nov 2020 20:41:39 +0800
+Subject: [PATCH] Encoder: grow again buffer size in
+ opj_tcd_code_block_enc_allocate_data() (fixes #1283)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27814
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/tcd.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/src/lib/openjp2/tcd.c
++++ b/src/lib/openjp2/tcd.c
+@@ -1238,10 +1238,12 @@ static OPJ_BOOL opj_tcd_code_block_enc_a
+ /* and +7 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 3) */
+ /* and +26 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 7) */
+ /* and +28 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 44) */
++ /* and +33 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4) */
++ /* and +63 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4 -IMF 2K) */
+ /* TODO: is there a theoretical upper-bound for the compressed code */
+ /* block size ? */
+- l_data_size = 28 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
+- (p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));
++ l_data_size = 63 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
++ (p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));
+
+ if (l_data_size > p_code_block->data_size) {
+ if (p_code_block->data) {
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-4.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-4.patch
new file mode 100644
index 0000000000..1c267c313b
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27814-4.patch
@@ -0,0 +1,27 @@
+From 4ce7d285a55d29b79880d0566d4b010fe1907aa9 Mon Sep 17 00:00:00 2001
+From: yuan <zodf0055980@gmail.com>
+Date: Fri, 4 Dec 2020 19:00:22 +0800
+Subject: [PATCH] Encoder: grow again buffer size in
+ opj_tcd_code_block_enc_allocate_data() (fixes #1283)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27814
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/tcd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/lib/openjp2/tcd.c
++++ b/src/lib/openjp2/tcd.c
+@@ -1240,9 +1240,10 @@ static OPJ_BOOL opj_tcd_code_block_enc_a
+ /* and +28 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 44) */
+ /* and +33 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4) */
+ /* and +63 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4 -IMF 2K) */
++ /* and +74 for https://github.com/uclouvain/openjpeg/issues/1283 (-M 4 -n 8 -s 7,7 -I) */
+ /* TODO: is there a theoretical upper-bound for the compressed code */
+ /* block size ? */
+- l_data_size = 63 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
++ l_data_size = 74 + (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) *
+ (p_code_block->y1 - p_code_block->y0) * (OPJ_INT32)sizeof(OPJ_UINT32));
+
+ if (l_data_size > p_code_block->data_size) {
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27823.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27823.patch
new file mode 100644
index 0000000000..e4373d0d32
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27823.patch
@@ -0,0 +1,29 @@
+From b2072402b7e14d22bba6fb8cde2a1e9996e9a919 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 30 Nov 2020 22:31:51 +0100
+Subject: [PATCH] pngtoimage(): fix wrong computation of x1,y1 if -d option is
+ used, that would result in a heap buffer overflow (fixes #1284)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27823
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/bin/jp2/convertpng.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/bin/jp2/convertpng.c b/src/bin/jp2/convertpng.c
+index 328c91beb..00f596e27 100644
+--- a/src/bin/jp2/convertpng.c
++++ b/src/bin/jp2/convertpng.c
+@@ -223,9 +223,9 @@ opj_image_t *pngtoimage(const char *read_idf, opj_cparameters_t * params)
+ image->x0 = (OPJ_UINT32)params->image_offset_x0;
+ image->y0 = (OPJ_UINT32)params->image_offset_y0;
+ image->x1 = (OPJ_UINT32)(image->x0 + (width - 1) * (OPJ_UINT32)
+- params->subsampling_dx + 1 + image->x0);
++ params->subsampling_dx + 1);
+ image->y1 = (OPJ_UINT32)(image->y0 + (height - 1) * (OPJ_UINT32)
+- params->subsampling_dy + 1 + image->y0);
++ params->subsampling_dy + 1);
+
+ row32s = (OPJ_INT32 *)malloc((size_t)width * nr_comp * sizeof(OPJ_INT32));
+ if (row32s == NULL) {
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27824.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27824.patch
new file mode 100644
index 0000000000..5f3deb4dda
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27824.patch
@@ -0,0 +1,24 @@
+From 6daf5f3e1ec6eff03b7982889874a3de6617db8d Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 30 Nov 2020 22:37:07 +0100
+Subject: [PATCH] Encoder: avoid global buffer overflow on irreversible
+ conversion when too many decomposition levels are specified (fixes #1286)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27824
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/dwt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/lib/openjp2/dwt.c
++++ b/src/lib/openjp2/dwt.c
+@@ -1293,7 +1293,7 @@ void opj_dwt_calc_explicit_stepsizes(opj
+ if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) {
+ stepsize = 1.0;
+ } else {
+- OPJ_FLOAT64 norm = opj_dwt_norms_real[orient][level];
++ OPJ_FLOAT64 norm = opj_dwt_getnorm_real(level, orient);
+ stepsize = (1 << (gain)) / norm;
+ }
+ opj_dwt_encode_stepsize((OPJ_INT32) floor(stepsize * 8192.0),
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27841.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27841.patch
new file mode 100644
index 0000000000..db6d12dc2c
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27841.patch
@@ -0,0 +1,238 @@
+From 00383e162ae2f8fc951f5745bf1011771acb8dce Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Wed, 2 Dec 2020 14:02:17 +0100
+Subject: [PATCH] pi.c: avoid out of bounds access with POC (refs
+ https://github.com/uclouvain/openjpeg/issues/1293#issuecomment-737122836)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27841
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/pi.c | 49 +++++++++++++++++++++++++++++---------------
+ src/lib/openjp2/pi.h | 10 +++++++--
+ src/lib/openjp2/t2.c | 4 ++--
+ 3 files changed, 42 insertions(+), 21 deletions(-)
+
+--- a/src/lib/openjp2/pi.c
++++ b/src/lib/openjp2/pi.c
+@@ -192,10 +192,12 @@ static void opj_get_all_encoding_paramet
+ * @param p_image the image used to initialize the packet iterator (in fact only the number of components is relevant.
+ * @param p_cp the coding parameters.
+ * @param tileno the index of the tile from which creating the packet iterator.
++ * @param manager Event manager
+ */
+ static opj_pi_iterator_t * opj_pi_create(const opj_image_t *p_image,
+ const opj_cp_t *p_cp,
+- OPJ_UINT32 tileno);
++ OPJ_UINT32 tileno,
++ opj_event_mgr_t* manager);
+ /**
+ * FIXME DOC
+ */
+@@ -230,12 +232,6 @@ static OPJ_BOOL opj_pi_check_next_level(
+ ==========================================================
+ */
+
+-static void opj_pi_emit_error(opj_pi_iterator_t * pi, const char* msg)
+-{
+- (void)pi;
+- (void)msg;
+-}
+-
+ static OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi)
+ {
+ opj_pi_comp_t *comp = NULL;
+@@ -272,7 +268,7 @@ static OPJ_BOOL opj_pi_next_lrcp(opj_pi_
+ /* include should be resized when a POC arises, or */
+ /* the POC should be rejected */
+ if (index >= pi->include_size) {
+- opj_pi_emit_error(pi, "Invalid access to pi->include");
++ opj_event_msg(pi->manager, EVT_ERROR, "Invalid access to pi->include");
+ return OPJ_FALSE;
+ }
+ if (!pi->include[index]) {
+@@ -318,7 +314,7 @@ static OPJ_BOOL opj_pi_next_rlcp(opj_pi_
+ index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno *
+ pi->step_c + pi->precno * pi->step_p;
+ if (index >= pi->include_size) {
+- opj_pi_emit_error(pi, "Invalid access to pi->include");
++ opj_event_msg(pi->manager, EVT_ERROR, "Invalid access to pi->include");
+ return OPJ_FALSE;
+ }
+ if (!pi->include[index]) {
+@@ -449,7 +445,7 @@ static OPJ_BOOL opj_pi_next_rpcl(opj_pi_
+ index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno *
+ pi->step_c + pi->precno * pi->step_p;
+ if (index >= pi->include_size) {
+- opj_pi_emit_error(pi, "Invalid access to pi->include");
++ opj_event_msg(pi->manager, EVT_ERROR, "Invalid access to pi->include");
+ return OPJ_FALSE;
+ }
+ if (!pi->include[index]) {
+@@ -473,6 +469,13 @@ static OPJ_BOOL opj_pi_next_pcrl(opj_pi_
+ opj_pi_resolution_t *res = NULL;
+ OPJ_UINT32 index = 0;
+
++ if (pi->poc.compno0 >= pi->numcomps ||
++ pi->poc.compno1 >= pi->numcomps + 1) {
++ opj_event_msg(pi->manager, EVT_ERROR,
++ "opj_pi_next_pcrl(): invalid compno0/compno1");
++ return OPJ_FALSE;
++ }
++
+ if (!pi->first) {
+ comp = &pi->comps[pi->compno];
+ goto LABEL_SKIP;
+@@ -580,7 +583,7 @@ static OPJ_BOOL opj_pi_next_pcrl(opj_pi_
+ index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno *
+ pi->step_c + pi->precno * pi->step_p;
+ if (index >= pi->include_size) {
+- opj_pi_emit_error(pi, "Invalid access to pi->include");
++ opj_event_msg(pi->manager, EVT_ERROR, "Invalid access to pi->include");
+ return OPJ_FALSE;
+ }
+ if (!pi->include[index]) {
+@@ -604,6 +607,13 @@ static OPJ_BOOL opj_pi_next_cprl(opj_pi_
+ opj_pi_resolution_t *res = NULL;
+ OPJ_UINT32 index = 0;
+
++ if (pi->poc.compno0 >= pi->numcomps ||
++ pi->poc.compno1 >= pi->numcomps + 1) {
++ opj_event_msg(pi->manager, EVT_ERROR,
++ "opj_pi_next_cprl(): invalid compno0/compno1");
++ return OPJ_FALSE;
++ }
++
+ if (!pi->first) {
+ comp = &pi->comps[pi->compno];
+ goto LABEL_SKIP;
+@@ -708,7 +718,7 @@ static OPJ_BOOL opj_pi_next_cprl(opj_pi_
+ index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno *
+ pi->step_c + pi->precno * pi->step_p;
+ if (index >= pi->include_size) {
+- opj_pi_emit_error(pi, "Invalid access to pi->include");
++ opj_event_msg(pi->manager, EVT_ERROR, "Invalid access to pi->include");
+ return OPJ_FALSE;
+ }
+ if (!pi->include[index]) {
+@@ -981,7 +991,8 @@ static void opj_get_all_encoding_paramet
+
+ static opj_pi_iterator_t * opj_pi_create(const opj_image_t *image,
+ const opj_cp_t *cp,
+- OPJ_UINT32 tileno)
++ OPJ_UINT32 tileno,
++ opj_event_mgr_t* manager)
+ {
+ /* loop*/
+ OPJ_UINT32 pino, compno;
+@@ -1015,6 +1026,8 @@ static opj_pi_iterator_t * opj_pi_create
+ l_current_pi = l_pi;
+ for (pino = 0; pino < l_poc_bound ; ++pino) {
+
++ l_current_pi->manager = manager;
++
+ l_current_pi->comps = (opj_pi_comp_t*) opj_calloc(image->numcomps,
+ sizeof(opj_pi_comp_t));
+ if (! l_current_pi->comps) {
+@@ -1352,7 +1365,8 @@ static OPJ_BOOL opj_pi_check_next_level(
+ */
+ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
+ opj_cp_t *p_cp,
+- OPJ_UINT32 p_tile_no)
++ OPJ_UINT32 p_tile_no,
++ opj_event_mgr_t* manager)
+ {
+ OPJ_UINT32 numcomps = p_image->numcomps;
+
+@@ -1407,7 +1421,7 @@ opj_pi_iterator_t *opj_pi_create_decode(
+ }
+
+ /* memory allocation for pi */
+- l_pi = opj_pi_create(p_image, p_cp, p_tile_no);
++ l_pi = opj_pi_create(p_image, p_cp, p_tile_no, manager);
+ if (!l_pi) {
+ opj_free(l_tmp_data);
+ opj_free(l_tmp_ptr);
+@@ -1552,7 +1566,8 @@ opj_pi_iterator_t *opj_pi_create_decode(
+ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
+ opj_cp_t *p_cp,
+ OPJ_UINT32 p_tile_no,
+- J2K_T2_MODE p_t2_mode)
++ J2K_T2_MODE p_t2_mode,
++ opj_event_mgr_t* manager)
+ {
+ OPJ_UINT32 numcomps = p_image->numcomps;
+
+@@ -1606,7 +1621,7 @@ opj_pi_iterator_t *opj_pi_initialise_enc
+ }
+
+ /* memory allocation for pi*/
+- l_pi = opj_pi_create(p_image, p_cp, p_tile_no);
++ l_pi = opj_pi_create(p_image, p_cp, p_tile_no, manager);
+ if (!l_pi) {
+ opj_free(l_tmp_data);
+ opj_free(l_tmp_ptr);
+--- a/src/lib/openjp2/pi.h
++++ b/src/lib/openjp2/pi.h
+@@ -107,6 +107,8 @@ typedef struct opj_pi_iterator {
+ OPJ_INT32 x, y;
+ /** FIXME DOC*/
+ OPJ_UINT32 dx, dy;
++ /** event manager */
++ opj_event_mgr_t* manager;
+ } opj_pi_iterator_t;
+
+ /** @name Exported functions */
+@@ -119,13 +121,15 @@ typedef struct opj_pi_iterator {
+ * @param cp the coding parameters.
+ * @param tileno index of the tile being encoded.
+ * @param t2_mode the type of pass for generating the packet iterator
++ * @param manager Event manager
+ *
+ * @return a list of packet iterator that points to the first packet of the tile (not true).
+ */
+ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *image,
+ opj_cp_t *cp,
+ OPJ_UINT32 tileno,
+- J2K_T2_MODE t2_mode);
++ J2K_T2_MODE t2_mode,
++ opj_event_mgr_t* manager);
+
+ /**
+ * Updates the encoding parameters of the codec.
+@@ -161,12 +165,14 @@ Create a packet iterator for Decoder
+ @param image Raw image for which the packets will be listed
+ @param cp Coding parameters
+ @param tileno Number that identifies the tile for which to list the packets
++@param manager Event manager
+ @return Returns a packet iterator that points to the first packet of the tile
+ @see opj_pi_destroy
+ */
+ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t * image,
+ opj_cp_t * cp,
+- OPJ_UINT32 tileno);
++ OPJ_UINT32 tileno,
++ opj_event_mgr_t* manager);
+ /**
+ * Destroys a packet iterator array.
+ *
+--- a/src/lib/openjp2/t2.c
++++ b/src/lib/openjp2/t2.c
+@@ -244,7 +244,7 @@ OPJ_BOOL opj_t2_encode_packets(opj_t2_t*
+ l_image->numcomps : 1;
+ OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1;
+
+- l_pi = opj_pi_initialise_encode(l_image, l_cp, p_tile_no, p_t2_mode);
++ l_pi = opj_pi_initialise_encode(l_image, l_cp, p_tile_no, p_t2_mode, p_manager);
+ if (!l_pi) {
+ return OPJ_FALSE;
+ }
+@@ -405,7 +405,7 @@ OPJ_BOOL opj_t2_decode_packets(opj_tcd_t
+ #endif
+
+ /* create a packet iterator */
+- l_pi = opj_pi_create_decode(l_image, l_cp, p_tile_no);
++ l_pi = opj_pi_create_decode(l_image, l_cp, p_tile_no, p_manager);
+ if (!l_pi) {
+ return OPJ_FALSE;
+ }
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27842.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27842.patch
new file mode 100644
index 0000000000..6984aa8602
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27842.patch
@@ -0,0 +1,31 @@
+From fbd30b064f8f9607d500437b6fedc41431fd6cdc Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Tue, 1 Dec 2020 19:51:35 +0100
+Subject: [PATCH] opj_t2_encode_packet(): avoid out of bound access of #1294,
+ but likely not the proper fix
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27842
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/t2.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/src/lib/openjp2/t2.c
++++ b/src/lib/openjp2/t2.c
+@@ -711,6 +711,15 @@ static OPJ_BOOL opj_t2_encode_packet(OPJ
+ continue;
+ }
+
++ /* Avoid out of bounds access of https://github.com/uclouvain/openjpeg/issues/1294 */
++ /* but likely not a proper fix. */
++ if (precno >= res->pw * res->ph) {
++ opj_event_msg(p_manager, EVT_ERROR,
++ "opj_t2_encode_packet(): accessing precno=%u >= %u\n",
++ precno, res->pw * res->ph);
++ return OPJ_FALSE;
++ }
++
+ prc = &band->precincts[precno];
+ opj_tgt_reset(prc->incltree);
+ opj_tgt_reset(prc->imsbtree);
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27843.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27843.patch
new file mode 100644
index 0000000000..53c86ea5e4
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27843.patch
@@ -0,0 +1,31 @@
+From 38d661a3897052c7ff0b39b30c29cb067e130121 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Wed, 2 Dec 2020 13:13:26 +0100
+Subject: [PATCH] opj_t2_encode_packet(): avoid out of bound access of #1297,
+ but likely not the proper fix
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27843
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/t2.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/src/lib/openjp2/t2.c
++++ b/src/lib/openjp2/t2.c
+@@ -787,6 +787,15 @@ static OPJ_BOOL opj_t2_encode_packet(OPJ
+ continue;
+ }
+
++ /* Avoid out of bounds access of https://github.com/uclouvain/openjpeg/issues/1297 */
++ /* but likely not a proper fix. */
++ if (precno >= res->pw * res->ph) {
++ opj_event_msg(p_manager, EVT_ERROR,
++ "opj_t2_encode_packet(): accessing precno=%u >= %u\n",
++ precno, res->pw * res->ph);
++ return OPJ_FALSE;
++ }
++
+ prc = &band->precincts[precno];
+ l_nb_blocks = prc->cw * prc->ch;
+ cblk = prc->cblks.enc;
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27845.patch b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27845.patch
new file mode 100644
index 0000000000..a1aa49a217
--- /dev/null
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg/CVE-2020-27845.patch
@@ -0,0 +1,74 @@
+From 8f5aff1dff510a964d3901d0fba281abec98ab63 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Fri, 4 Dec 2020 20:45:25 +0100
+Subject: [PATCH] pi.c: avoid out of bounds access with POC (fixes #1302)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/openjpeg2/2.3.1-1ubuntu4.20.04.1/openjpeg2_2.3.1-1ubuntu4.20.04.1.debian.tar.xz]
+CVE: CVE-2020-27845
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+---
+ src/lib/openjp2/pi.c | 25 +++++++++++++++++++++++--
+ 1 file changed, 23 insertions(+), 2 deletions(-)
+
+--- a/src/lib/openjp2/pi.c
++++ b/src/lib/openjp2/pi.c
+@@ -238,6 +238,13 @@ static OPJ_BOOL opj_pi_next_lrcp(opj_pi_
+ opj_pi_resolution_t *res = NULL;
+ OPJ_UINT32 index = 0;
+
++ if (pi->poc.compno0 >= pi->numcomps ||
++ pi->poc.compno1 >= pi->numcomps + 1) {
++ opj_event_msg(pi->manager, EVT_ERROR,
++ "opj_pi_next_lrcp(): invalid compno0/compno1\n");
++ return OPJ_FALSE;
++ }
++
+ if (!pi->first) {
+ comp = &pi->comps[pi->compno];
+ res = &comp->resolutions[pi->resno];
+@@ -291,6 +298,13 @@ static OPJ_BOOL opj_pi_next_rlcp(opj_pi_
+ opj_pi_resolution_t *res = NULL;
+ OPJ_UINT32 index = 0;
+
++ if (pi->poc.compno0 >= pi->numcomps ||
++ pi->poc.compno1 >= pi->numcomps + 1) {
++ opj_event_msg(pi->manager, EVT_ERROR,
++ "opj_pi_next_rlcp(): invalid compno0/compno1\n");
++ return OPJ_FALSE;
++ }
++
+ if (!pi->first) {
+ comp = &pi->comps[pi->compno];
+ res = &comp->resolutions[pi->resno];
+@@ -337,6 +351,13 @@ static OPJ_BOOL opj_pi_next_rpcl(opj_pi_
+ opj_pi_resolution_t *res = NULL;
+ OPJ_UINT32 index = 0;
+
++ if (pi->poc.compno0 >= pi->numcomps ||
++ pi->poc.compno1 >= pi->numcomps + 1) {
++ opj_event_msg(pi->manager, EVT_ERROR,
++ "opj_pi_next_rpcl(): invalid compno0/compno1\n");
++ return OPJ_FALSE;
++ }
++
+ if (!pi->first) {
+ goto LABEL_SKIP;
+ } else {
+@@ -472,7 +493,7 @@ static OPJ_BOOL opj_pi_next_pcrl(opj_pi_
+ if (pi->poc.compno0 >= pi->numcomps ||
+ pi->poc.compno1 >= pi->numcomps + 1) {
+ opj_event_msg(pi->manager, EVT_ERROR,
+- "opj_pi_next_pcrl(): invalid compno0/compno1");
++ "opj_pi_next_pcrl(): invalid compno0/compno1\n");
+ return OPJ_FALSE;
+ }
+
+@@ -610,7 +631,7 @@ static OPJ_BOOL opj_pi_next_cprl(opj_pi_
+ if (pi->poc.compno0 >= pi->numcomps ||
+ pi->poc.compno1 >= pi->numcomps + 1) {
+ opj_event_msg(pi->manager, EVT_ERROR,
+- "opj_pi_next_cprl(): invalid compno0/compno1");
++ "opj_pi_next_cprl(): invalid compno0/compno1\n");
+ return OPJ_FALSE;
+ }
+
diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg_2.3.1.bb b/meta-oe/recipes-graphics/openjpeg/openjpeg_2.3.1.bb
index 42011efa97..9cf513f3f7 100644
--- a/meta-oe/recipes-graphics/openjpeg/openjpeg_2.3.1.bb
+++ b/meta-oe/recipes-graphics/openjpeg/openjpeg_2.3.1.bb
@@ -6,10 +6,23 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c648878b4840d7babaade1303e7f108c"
DEPENDS = "libpng tiff lcms zlib"
SRC_URI = " \
- git://github.com/uclouvain/openjpeg.git \
+ git://github.com/uclouvain/openjpeg.git;branch=master;protocol=https \
file://0002-Do-not-ask-cmake-to-export-binaries-they-don-t-make-.patch \
+ file://CVE-2019-12973-1.patch \
+ file://CVE-2019-12973-2.patch \
file://CVE-2020-6851.patch \
file://CVE-2020-8112.patch \
+ file://CVE-2020-15389.patch \
+ file://CVE-2020-27814-1.patch \
+ file://CVE-2020-27814-2.patch \
+ file://CVE-2020-27814-3.patch \
+ file://CVE-2020-27814-4.patch \
+ file://CVE-2020-27823.patch \
+ file://CVE-2020-27824.patch \
+ file://CVE-2020-27841.patch \
+ file://CVE-2020-27842.patch \
+ file://CVE-2020-27843.patch \
+ file://CVE-2020-27845.patch \
"
SRCREV = "57096325457f96d8cd07bd3af04fe81d7a2ba788"
S = "${WORKDIR}/git"
@@ -20,3 +33,17 @@ inherit cmake
EXTRA_OECMAKE += "-DOPENJPEG_INSTALL_LIB_DIR=${@d.getVar('baselib').replace('/', '')}"
FILES_${PN} += "${libdir}/openjpeg*"
+
+# This flaw is introduced by
+# https://github.com/uclouvain/openjpeg/commit/4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
+# but the contents of this patch is not present in openjpeg_2.3.1
+# Hence, it can be whitelisted.
+# https://security-tracker.debian.org/tracker/CVE-2020-27844
+
+CVE_CHECK_WHITELIST += "CVE-2020-27844"
+
+# The CVE description clearly states that j2k_read_ppm_v3 function in openjpeg
+# is affected due to CVE-2015-1239 but in openjpeg_2.3.1 this function is not present.
+# Hence, CVE-2015-1239 does not affect openjpeg_2.3.1
+
+CVE_CHECK_WHITELIST += "CVE-2015-1239"
diff --git a/meta-oe/recipes-graphics/qrencode/qrencode_git.bb b/meta-oe/recipes-graphics/qrencode/qrencode_git.bb
index 108c339bf5..3ef4f59597 100644
--- a/meta-oe/recipes-graphics/qrencode/qrencode_git.bb
+++ b/meta-oe/recipes-graphics/qrencode/qrencode_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
PV = "4.0.1+git${SRCPV}"
SRCREV = "7c83deb8f562ae6013fea4c3e65278df93f98fb7"
-SRC_URI = "git://github.com/fukuchi/libqrencode.git"
+SRC_URI = "git://github.com/fukuchi/libqrencode.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb b/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb
index 6ea632d064..b20e06a454 100644
--- a/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb
+++ b/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb
@@ -5,7 +5,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=df7ea9e196efc7014c124747a0ef9772"
SRCREV = "a56af589d94dc851809fd5344d0ae441da70c1f2"
-SRC_URI = "git://github.com/baldurk/${BPN}.git;protocol=http;branch=v1.x \
+SRC_URI = "git://github.com/baldurk/${BPN}.git;protocol=http;branch=v1.x;protocol=https \
file://0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch \
file://0001-Remove-glslang-pool_allocator-setAllocator.patch \
"
diff --git a/meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb b/meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb
index b787972da6..bf0a5947b0 100644
--- a/meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb
+++ b/meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb
@@ -6,7 +6,7 @@ SECTION = "graphics"
S = "${WORKDIR}/git"
SRCREV = "ed16b3e69985feaf565efbecea70a1cc2fca2a58"
-SRC_URI = "git://github.com/KhronosGroup/SPIRV-Cross.git \
+SRC_URI = "git://github.com/KhronosGroup/SPIRV-Cross.git;branch=master;protocol=https \
file://0001-Add-install-PHONY-target-in-Makefile.patch \
"
diff --git a/meta-oe/recipes-graphics/spir/spirv-tools_git.bb b/meta-oe/recipes-graphics/spir/spirv-tools_git.bb
index 8e8388e8d4..362a250725 100644
--- a/meta-oe/recipes-graphics/spir/spirv-tools_git.bb
+++ b/meta-oe/recipes-graphics/spir/spirv-tools_git.bb
@@ -8,11 +8,11 @@ SECTION = "graphics"
S = "${WORKDIR}/git"
DEST_DIR = "${S}/external"
-SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;name=spirv-tools \
- git://github.com/KhronosGroup/SPIRV-Headers.git;name=spirv-headers;destsuffix=${DEST_DIR}/spirv-headers \
- git://github.com/google/effcee.git;name=effcee;destsuffix=${DEST_DIR}/effcee \
- git://github.com/google/re2.git;name=re2;destsuffix=${DEST_DIR}/re2 \
- git://github.com/google/googletest.git;name=googletest;destsuffix=${DEST_DIR}/googletest \
+SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;name=spirv-tools;branch=main;protocol=https \
+ git://github.com/KhronosGroup/SPIRV-Headers.git;name=spirv-headers;destsuffix=${DEST_DIR}/spirv-headers;branch=main;protocol=https \
+ git://github.com/google/effcee.git;name=effcee;destsuffix=${DEST_DIR}/effcee;branch=main;protocol=https \
+ git://github.com/google/re2.git;name=re2;destsuffix=${DEST_DIR}/re2;branch=main;protocol=https \
+ git://github.com/google/googletest.git;name=googletest;destsuffix=${DEST_DIR}/googletest;branch=main;protocol=https \
file://0001-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-file.patch \
file://0001-Avoid-pessimizing-std-move-3124.patch \
"
@@ -21,6 +21,7 @@ SRCREV_spirv-headers = "af64a9e826bf5bb5fcd2434dd71be1e41e922563"
SRCREV_effcee = "cd25ec17e9382f99a895b9ef53ff3c277464d07d"
SRCREV_re2 = "5bd613749fd530b576b890283bfb6bc6ea6246cb"
SRCREV_googletest = "f2fb48c3b3d79a75a88a99fba6576b25d42ec528"
+SRCREV_FORMAT = "spirv-ttols_spirv-headers_effcee_re2_googletest"
inherit cmake python3native
diff --git a/meta-oe/recipes-graphics/tesseract/tesseract-lang_4.0.0.bb b/meta-oe/recipes-graphics/tesseract/tesseract-lang_4.0.0.bb
index 75c2bc00e2..9fe61ae9c1 100644
--- a/meta-oe/recipes-graphics/tesseract/tesseract-lang_4.0.0.bb
+++ b/meta-oe/recipes-graphics/tesseract/tesseract-lang_4.0.0.bb
@@ -4,7 +4,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=9648bd7af63bd3cc4f5ac046d12c49e4"
SRCREV = "590567f20dc044f6948a8e2c61afc714c360ad0e"
-SRC_URI = "git://github.com/tesseract-ocr/tessdata.git"
+SRC_URI = "git://github.com/tesseract-ocr/tessdata.git;branch=main;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/tesseract/tesseract_git.bb b/meta-oe/recipes-graphics/tesseract/tesseract_git.bb
index 89d09a0f55..70c98372b3 100644
--- a/meta-oe/recipes-graphics/tesseract/tesseract_git.bb
+++ b/meta-oe/recipes-graphics/tesseract/tesseract_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7ea4f9a43aba9d3c849fe5c203a0ed40"
BRANCH = "3.05"
PV = "${BRANCH}.01+git${SRCPV}"
SRCREV = "215866151e774972c9502282111b998d7a053562"
-SRC_URI = "git://github.com/${BPN}-ocr/${BPN}.git;branch=${BRANCH}"
+SRC_URI = "git://github.com/${BPN}-ocr/${BPN}.git;branch=${BRANCH};protocol=https"
S = "${WORKDIR}/git"
DEPENDS = "leptonica"
diff --git a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.10.1.bb b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.10.1.bb
index f97c2b2d6c..de2d059061 100644
--- a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.10.1.bb
+++ b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.10.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.tigervnc.com/"
LICENSE = "GPLv2+"
SECTION = "x11/utils"
DEPENDS = "xserver-xorg gnutls jpeg libxtst gettext-native fltk"
-RDEPENDS_${PN} = "coreutils hicolor-icon-theme perl"
+RDEPENDS_${PN} = "coreutils hicolor-icon-theme perl xkbcomp"
LIC_FILES_CHKSUM = "file://LICENCE.TXT;md5=75b02c2872421380bbd47781d2bd75d3"
@@ -17,7 +17,7 @@ B = "${S}"
SRCREV = "4739493b635372bd40a34640a719f79fa90e4dba"
-SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.10-branch \
+SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.10-branch;protocol=https \
file://0002-do-not-build-tests-sub-directory.patch \
file://0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch \
file://0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch \
diff --git a/meta-oe/recipes-graphics/ttf-fonts/ttf-droid_git.bb b/meta-oe/recipes-graphics/ttf-fonts/ttf-droid_git.bb
index 8dba7ee6fa..16ac65b1be 100644
--- a/meta-oe/recipes-graphics/ttf-fonts/ttf-droid_git.bb
+++ b/meta-oe/recipes-graphics/ttf-fonts/ttf-droid_git.bb
@@ -8,7 +8,7 @@ SRCREV = "21e6e2de1f0062f949fcc52d0b4559dfa3246e0e"
PV = "0.1+gitr${SRCPV}"
PR = "r3"
-SRC_URI = "git://github.com/android/platform_frameworks_base.git;branch=master"
+SRC_URI = "git://github.com/android/platform_frameworks_base.git;branch=master;protocol=https"
S = "${WORKDIR}/git/data/fonts"
diff --git a/meta-oe/recipes-graphics/ttf-fonts/ttf-lohit_2.bb b/meta-oe/recipes-graphics/ttf-fonts/ttf-lohit_2.bb
index 0af0e91d68..7dde4cc661 100644
--- a/meta-oe/recipes-graphics/ttf-fonts/ttf-lohit_2.bb
+++ b/meta-oe/recipes-graphics/ttf-fonts/ttf-lohit_2.bb
@@ -8,7 +8,7 @@ LICENSE = "OFL-1.1"
LIC_FILES_CHKSUM = "file://OFL.txt;md5=7dfa0a236dc535ad2d2548e6170c4402"
SRCREV = "d678f1b1807ea5602586279e90b5db6d62ed475e"
-SRC_URI = "git://github.com/pravins/lohit.git;branch=master"
+SRC_URI = "git://github.com/pravins/lohit.git;branch=master;protocol=https"
DEPENDS = "fontforge-native"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/ttf-fonts/ttf-noto-emoji_20190815.bb b/meta-oe/recipes-graphics/ttf-fonts/ttf-noto-emoji_20190815.bb
index e74f7a7f67..1a2f6cb4d2 100644
--- a/meta-oe/recipes-graphics/ttf-fonts/ttf-noto-emoji_20190815.bb
+++ b/meta-oe/recipes-graphics/ttf-fonts/ttf-noto-emoji_20190815.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "https://github.com/googlefonts/noto-emoji"
LICENSE = "OFL-1.1"
LIC_FILES_CHKSUM = "file://fonts/LICENSE;md5=55719faa0112708e946b820b24b14097"
-SRC_URI = "git://github.com/googlefonts/noto-emoji;protocol=https"
+SRC_URI = "git://github.com/googlefonts/noto-emoji;protocol=https;branch=master"
SRCREV = "833a43d03246a9325e748a2d783006454d76ff66"
PACKAGES = "${PN}-color ${PN}-regular"
diff --git a/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb b/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb
index 7e22038f24..427882d32b 100644
--- a/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb
+++ b/meta-oe/recipes-graphics/unclutter-xfixes/unclutter-xfixes_1.5.bb
@@ -5,7 +5,7 @@ AUTHOR = "Ingo Bürk"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b25d2c4cca175f44120d1b8e67cb358d"
-SRC_URI = "git://github.com/Airblader/unclutter-xfixes.git \
+SRC_URI = "git://github.com/Airblader/unclutter-xfixes.git;branch=master;protocol=https \
file://0001-build-use-autotools.patch"
SRCREV = "10fd337bb77e4e93c3380f630a0555372778a948"
diff --git a/meta-oe/recipes-graphics/vdpau/libvdpau_1.3.bb b/meta-oe/recipes-graphics/vdpau/libvdpau_1.3.bb
index 240949f55c..dd8f41aa5d 100644
--- a/meta-oe/recipes-graphics/vdpau/libvdpau_1.3.bb
+++ b/meta-oe/recipes-graphics/vdpau/libvdpau_1.3.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=83af8811a28727a13f04132cc33b7f58"
DEPENDS = "virtual/libx11 libxext xorgproto"
SRCREV = "f57a9904c43ef5d726320c77baa91d0c38361ed4"
-SRC_URI = "git://anongit.freedesktop.org/vdpau/libvdpau"
+SRC_URI = "git://anongit.freedesktop.org/vdpau/libvdpau;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
index e3a1914fef..fe725879d0 100644
--- a/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
+++ b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://src/x11vnc.h;endline=31;md5=e871a2ad004776794b616822dcab6314"
SRCREV = "4ca006fed80410bd9b061a1519bd5d9366bb0bc8"
-SRC_URI = "git://github.com/LibVNC/x11vnc \
+SRC_URI = "git://github.com/LibVNC/x11vnc;branch=master;protocol=https \
file://starting-fix.patch \
file://0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch \
file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
diff --git a/meta-oe/recipes-graphics/xorg-app/xgamma_1.0.6.bb b/meta-oe/recipes-graphics/xorg-app/xgamma_1.0.6.bb
index 4949616ddc..df5979a094 100644
--- a/meta-oe/recipes-graphics/xorg-app/xgamma_1.0.6.bb
+++ b/meta-oe/recipes-graphics/xorg-app/xgamma_1.0.6.bb
@@ -9,7 +9,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ac9801b8423fd7a7699ccbd45cf134d8"
DEPENDS += "libxxf86vm"
-BBCLASSEXTEND = "native"
-
SRC_URI[md5sum] = "90b4305157c2b966d5180e2ee61262be"
SRC_URI[sha256sum] = "0ef1c35b5c18b1b22317f455c8df13c0a471a8efad63c89c98ae3ce8c2b222d3"
diff --git a/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.4.bb b/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.4.bb
index 6a05e98e32..d394b33de2 100644
--- a/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.4.bb
+++ b/meta-oe/recipes-graphics/xorg-app/xkbutils_1.0.4.bb
@@ -13,7 +13,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=64322fab5239f5c8d97cf6e0e14f1c62"
DEPENDS += "libxaw libxkbfile"
-BBCLASSEXTEND = "native"
-
SRC_URI[md5sum] = "502b14843f610af977dffc6cbf2102d5"
SRC_URI[sha256sum] = "d2a18ab90275e8bca028773c44264d2266dab70853db4321bdbc18da75148130"
diff --git a/meta-oe/recipes-graphics/xorg-app/xsetroot_1.1.2.bb b/meta-oe/recipes-graphics/xorg-app/xsetroot_1.1.2.bb
index 30a1e089e3..a9a8acf05c 100644
--- a/meta-oe/recipes-graphics/xorg-app/xsetroot_1.1.2.bb
+++ b/meta-oe/recipes-graphics/xorg-app/xsetroot_1.1.2.bb
@@ -8,7 +8,6 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=6ea29dbee22324787c061f039e0529de"
DEPENDS += "xbitmaps libxcursor"
-BBCLASSEXTEND = "native"
SRC_URI[md5sum] = "5fe769c8777a6e873ed1305e4ce2c353"
SRC_URI[sha256sum] = "10c442ba23591fb5470cea477a0aa5f679371f4f879c8387a1d9d05637ae417c"
diff --git a/meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-24130.patch b/meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-24130.patch
new file mode 100644
index 0000000000..b7a5f297a5
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-24130.patch
@@ -0,0 +1,84 @@
+From 85666286473f2fbb2d4731d4e175f00d7a76e21f Mon Sep 17 00:00:00 2001
+From: Hitendra Prajapati <hprajapati@mvista.com>
+Date: Tue, 21 Jun 2022 10:53:01 +0530
+Subject: [PATCH] CVE-2022-24130
+
+Upstream-Status: Backport [https://github.com/ThomasDickey/xterm-snapshots/commit/1584fc227673264661250d3a8d673c168ac9512d]
+CVE: CVE-2022-24130
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+
+Description: Cherry-pick sixel graphics fixes from xterm 370d and 370f
+ Check for out-of-bounds condition while drawing sixels, and quit that
+ operation (report by Nick Black, CVE-2022-24130).
+Bug-Debian: https://bugs.debian.org/1004689
+
+---
+ graphics_sixel.c | 22 +++++++++++++++++-----
+ 1 file changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/graphics_sixel.c b/graphics_sixel.c
+index 00ba3ef..6a82295 100644
+--- a/graphics_sixel.c
++++ b/graphics_sixel.c
+@@ -141,7 +141,7 @@ init_sixel_background(Graphic *graphic, SixelContext const *context)
+ graphic->color_registers_used[context->background] = 1;
+ }
+
+-static void
++static Boolean
+ set_sixel(Graphic *graphic, SixelContext const *context, int sixel)
+ {
+ const int mh = graphic->max_height;
+@@ -162,7 +162,10 @@ set_sixel(Graphic *graphic, SixelContext const *context, int sixel)
+ ((color != COLOR_HOLE)
+ ? (unsigned) graphic->color_registers[color].b : 0U)));
+ for (pix = 0; pix < 6; pix++) {
+- if (context->col < mw && context->row + pix < mh) {
++ if (context->col >= 0 &&
++ context->col < mw &&
++ context->row + pix >= 0 &&
++ context->row + pix < mh) {
+ if (sixel & (1 << pix)) {
+ if (context->col + 1 > graphic->actual_width) {
+ graphic->actual_width = context->col + 1;
+@@ -175,8 +178,10 @@ set_sixel(Graphic *graphic, SixelContext const *context, int sixel)
+ }
+ } else {
+ TRACE(("sixel pixel %d out of bounds\n", pix));
++ return False;
+ }
+ }
++ return True;
+ }
+
+ static void
+@@ -451,7 +456,10 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
+ init_sixel_background(graphic, &context);
+ graphic->valid = 1;
+ }
+- set_sixel(graphic, &context, sixel);
++ if (!set_sixel(graphic, &context, sixel)) {
++ context.col = 0;
++ break;
++ }
+ context.col++;
+ } else if (ch == '$') { /* DECGCR */
+ /* ignore DECCRNLM in sixel mode */
+@@ -529,8 +537,12 @@ parse_sixel(XtermWidget xw, ANSI *params, char const *string)
+ graphic->valid = 1;
+ }
+ for (i = 0; i < Pcount; i++) {
+- set_sixel(graphic, &context, sixel);
+- context.col++;
++ if (set_sixel(graphic, &context, sixel)) {
++ context.col++;
++ } else {
++ context.col = 0;
++ break;
++ }
+ }
+ } else if (ch == '#') { /* DECGCI */
+ ANSI color_params;
+--
+2.25.1
+
diff --git a/meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-45063.patch b/meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-45063.patch
new file mode 100644
index 0000000000..e63169a209
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-app/xterm/CVE-2022-45063.patch
@@ -0,0 +1,776 @@
+From 787636674918873a091e7a4ef5977263ba982322 Mon Sep 17 00:00:00 2001
+From: "Thomas E. Dickey" <dickey@invisible-island.net>
+Date: Sun, 23 Oct 2022 22:59:52 +0000
+Subject: [PATCH] snapshot of project "xterm", label xterm-374c
+
+Upstream-Status: Backport [https://github.com/ThomasDickey/xterm-snapshots/commit/787636674918873a091e7a4ef5977263ba982322]
+CVE: CVE-2022-45063
+
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ button.c | 16 +--
+ charproc.c | 9 +-
+ doublechr.c | 4 +-
+ fontutils.c | 266 ++++++++++++++++++++++++++-----------------------
+ fontutils.h | 4 +-
+ misc.c | 7 +-
+ screen.c | 2 +-
+ xterm.h | 2 +-
+ xterm.log.html | 6 ++
+ 9 files changed, 164 insertions(+), 152 deletions(-)
+
+diff --git a/button.c b/button.c
+index 66a6181..e05ca50 100644
+--- a/button.c
++++ b/button.c
+@@ -1619,14 +1619,9 @@ static void
+ UnmapSelections(XtermWidget xw)
+ {
+ TScreen *screen = TScreenOf(xw);
+- Cardinal n;
+
+- if (screen->mappedSelect) {
+- for (n = 0; screen->mappedSelect[n] != 0; ++n)
+- free((void *) screen->mappedSelect[n]);
+- free(screen->mappedSelect);
+- screen->mappedSelect = 0;
+- }
++ free(screen->mappedSelect);
++ screen->mappedSelect = 0;
+ }
+
+ /*
+@@ -1662,14 +1657,11 @@ MapSelections(XtermWidget xw, String *params, Cardinal num_params)
+ if ((result = TypeMallocN(String, num_params + 1)) != 0) {
+ result[num_params] = 0;
+ for (j = 0; j < num_params; ++j) {
+- result[j] = x_strdup((isSELECT(params[j])
++ result[j] = (String) (isSELECT(params[j])
+ ? mapTo
+- : params[j]));
++ : params[j]);
+ if (result[j] == 0) {
+ UnmapSelections(xw);
+- while (j != 0) {
+- free((void *) result[--j]);
+- }
+ free(result);
+ result = 0;
+ break;
+diff --git a/charproc.c b/charproc.c
+index 55f0108..b07de4c 100644
+--- a/charproc.c
++++ b/charproc.c
+@@ -12548,7 +12548,6 @@ DoSetSelectedFont(Widget w,
+ Bell(xw, XkbBI_MinorError, 0);
+ } else {
+ Boolean failed = False;
+- int oldFont = TScreenOf(xw)->menu_font_number;
+ char *save = TScreenOf(xw)->SelectFontName();
+ char *val;
+ char *test;
+@@ -12593,10 +12592,6 @@ DoSetSelectedFont(Widget w,
+ failed = True;
+ }
+ if (failed) {
+- (void) xtermLoadFont(xw,
+- xtermFontName(TScreenOf(xw)->MenuFontName(oldFont)),
+- True,
+- oldFont);
+ Bell(xw, XkbBI_MinorError, 0);
+ }
+ free(used);
+@@ -12605,7 +12600,7 @@ DoSetSelectedFont(Widget w,
+ }
+ }
+
+-void
++Bool
+ FindFontSelection(XtermWidget xw, const char *atom_name, Bool justprobe)
+ {
+ TScreen *screen = TScreenOf(xw);
+@@ -12645,7 +12640,7 @@ FindFontSelection(XtermWidget xw, const char *atom_name, Bool justprobe)
+ DoSetSelectedFont, NULL,
+ XtLastTimestampProcessed(XtDisplay(xw)));
+ }
+- return;
++ return (screen->SelectFontName() != NULL) ? True : False;
+ }
+
+ Bool
+diff --git a/doublechr.c b/doublechr.c
+index a60f5bd..f7b6bae 100644
+--- a/doublechr.c
++++ b/doublechr.c
+@@ -294,7 +294,7 @@ xterm_DoubleGC(XTermDraw * params, GC old_gc, int *inxp)
+ temp.flags = (params->attr_flags & BOLD);
+ temp.warn = fwResource;
+
+- if (!xtermOpenFont(params->xw, name, &temp, False)) {
++ if (!xtermOpenFont(params->xw, name, &temp, NULL, False)) {
+ XTermDraw local = *params;
+ char *nname;
+
+@@ -303,7 +303,7 @@ xterm_DoubleGC(XTermDraw * params, GC old_gc, int *inxp)
+ nname = xtermSpecialFont(&local);
+ if (nname != 0) {
+ found = (Boolean) xtermOpenFont(params->xw, nname, &temp,
+- False);
++ NULL, False);
+ free(nname);
+ }
+ } else {
+diff --git a/fontutils.c b/fontutils.c
+index 4b0ef85..d9bfaf8 100644
+--- a/fontutils.c
++++ b/fontutils.c
+@@ -92,9 +92,9 @@
+ }
+
+ #define FREE_FNAME(field) \
+- if (fonts == 0 || myfonts.field != fonts->field) { \
+- FREE_STRING(myfonts.field); \
+- myfonts.field = 0; \
++ if (fonts == 0 || new_fnames.field != fonts->field) { \
++ FREE_STRING(new_fnames.field); \
++ new_fnames.field = 0; \
+ }
+
+ /*
+@@ -573,7 +573,7 @@ open_italic_font(XtermWidget xw, int n, FontNameProperties *fp, XTermFonts * dat
+ if ((name = italic_font_name(fp, slant[pass])) != 0) {
+ TRACE(("open_italic_font %s %s\n",
+ whichFontEnum((VTFontEnum) n), name));
+- if (xtermOpenFont(xw, name, data, False)) {
++ if (xtermOpenFont(xw, name, data, NULL, False)) {
+ result = (data->fs != 0);
+ #if OPT_REPORT_FONTS
+ if (resource.reportFonts) {
+@@ -1006,13 +1006,14 @@ cannotFont(XtermWidget xw, const char *who, const char *tag, const char *name)
+ }
+
+ /*
+- * Open the given font and verify that it is non-empty. Return a null on
++ * Open the given font and verify that it is non-empty. Return false on
+ * failure.
+ */
+ Bool
+ xtermOpenFont(XtermWidget xw,
+ const char *name,
+ XTermFonts * result,
++ XTermFonts * current,
+ Bool force)
+ {
+ Bool code = False;
+@@ -1020,7 +1021,12 @@ xtermOpenFont(XtermWidget xw,
+
+ TRACE(("xtermOpenFont %d:%d '%s'\n",
+ result->warn, xw->misc.fontWarnings, NonNull(name)));
++
+ if (!IsEmpty(name)) {
++ Bool existing = (current != NULL
++ && current->fs != NULL
++ && current->fn != NULL);
++
+ if ((result->fs = XLoadQueryFont(screen->display, name)) != 0) {
+ code = True;
+ if (EmptyFont(result->fs)) {
+@@ -1039,9 +1045,13 @@ xtermOpenFont(XtermWidget xw,
+ } else {
+ TRACE(("xtermOpenFont: cannot load font '%s'\n", name));
+ }
+- if (force) {
++ if (existing) {
++ TRACE(("...continue using font '%s'\n", current->fn));
++ result->fn = x_strdup(current->fn);
++ result->fs = current->fs;
++ } else if (force) {
+ NoFontWarning(result);
+- code = xtermOpenFont(xw, DEFFONT, result, True);
++ code = xtermOpenFont(xw, DEFFONT, result, NULL, True);
+ }
+ }
+ }
+@@ -1289,6 +1299,7 @@ static Bool
+ loadNormFP(XtermWidget xw,
+ char **nameOutP,
+ XTermFonts * infoOut,
++ XTermFonts * current,
+ int fontnum)
+ {
+ Bool status = True;
+@@ -1298,7 +1309,7 @@ loadNormFP(XtermWidget xw,
+ if (!xtermOpenFont(xw,
+ *nameOutP,
+ infoOut,
+- (fontnum == fontMenu_default))) {
++ current, (fontnum == fontMenu_default))) {
+ /*
+ * If we are opening the default font, and it happens to be missing,
+ * force that to the compiled-in default font, e.g., "fixed". If we
+@@ -1333,10 +1344,10 @@ loadBoldFP(XtermWidget xw,
+ if (fp != 0) {
+ NoFontWarning(infoOut);
+ *nameOutP = bold_font_name(fp, fp->average_width);
+- if (!xtermOpenFont(xw, *nameOutP, infoOut, False)) {
++ if (!xtermOpenFont(xw, *nameOutP, infoOut, NULL, False)) {
+ free(*nameOutP);
+ *nameOutP = bold_font_name(fp, -1);
+- xtermOpenFont(xw, *nameOutP, infoOut, False);
++ xtermOpenFont(xw, *nameOutP, infoOut, NULL, False);
+ }
+ TRACE(("...derived bold '%s'\n", NonNull(*nameOutP)));
+ }
+@@ -1354,7 +1365,7 @@ loadBoldFP(XtermWidget xw,
+ TRACE(("...did not get a matching bold font\n"));
+ }
+ free(normal);
+- } else if (!xtermOpenFont(xw, *nameOutP, infoOut, False)) {
++ } else if (!xtermOpenFont(xw, *nameOutP, infoOut, NULL, False)) {
+ xtermCopyFontInfo(infoOut, infoRef);
+ TRACE(("...cannot load bold font '%s'\n", NonNull(*nameOutP)));
+ } else {
+@@ -1408,7 +1419,7 @@ loadWideFP(XtermWidget xw,
+ }
+
+ if (check_fontname(*nameOutP)) {
+- if (xtermOpenFont(xw, *nameOutP, infoOut, False)
++ if (xtermOpenFont(xw, *nameOutP, infoOut, NULL, False)
+ && is_derived_font_name(*nameOutP)
+ && EmptyFont(infoOut->fs)) {
+ xtermCloseFont2(xw, infoOut - fWide, fWide);
+@@ -1452,7 +1463,7 @@ loadWBoldFP(XtermWidget xw,
+
+ if (check_fontname(*nameOutP)) {
+
+- if (xtermOpenFont(xw, *nameOutP, infoOut, False)
++ if (xtermOpenFont(xw, *nameOutP, infoOut, NULL, False)
+ && is_derived_font_name(*nameOutP)
+ && !compatibleWideCounts(wideInfoRef->fs, infoOut->fs)) {
+ xtermCloseFont2(xw, infoOut - fWBold, fWBold);
+@@ -1505,6 +1516,10 @@ loadWBoldFP(XtermWidget xw,
+ }
+ #endif
+
++/*
++ * Load a given bitmap font, along with the bold/wide variants.
++ * Returns nonzero on success.
++ */
+ int
+ xtermLoadFont(XtermWidget xw,
+ const VTFontNames * fonts,
+@@ -1514,33 +1529,37 @@ xtermLoadFont(XtermWidget xw,
+ TScreen *screen = TScreenOf(xw);
+ VTwin *win = WhichVWin(screen);
+
+- VTFontNames myfonts;
+- XTermFonts fnts[fMAX];
++ VTFontNames new_fnames;
++ XTermFonts new_fonts[fMAX];
++ XTermFonts old_fonts[fMAX];
+ char *tmpname = NULL;
+ Boolean proportional = False;
++ Boolean recovered;
++ int code = 0;
+
+- memset(&myfonts, 0, sizeof(myfonts));
+- memset(fnts, 0, sizeof(fnts));
++ memset(&new_fnames, 0, sizeof(new_fnames));
++ memset(new_fonts, 0, sizeof(new_fonts));
++ memcpy(&old_fonts, screen->fnts, sizeof(old_fonts));
+
+ if (fonts != 0)
+- myfonts = *fonts;
+- if (!check_fontname(myfonts.f_n))
+- return 0;
++ new_fnames = *fonts;
++ if (!check_fontname(new_fnames.f_n))
++ return code;
+
+ if (fontnum == fontMenu_fontescape
+- && myfonts.f_n != screen->MenuFontName(fontnum)) {
+- if ((tmpname = x_strdup(myfonts.f_n)) == 0)
+- return 0;
++ && new_fnames.f_n != screen->MenuFontName(fontnum)) {
++ if ((tmpname = x_strdup(new_fnames.f_n)) == 0)
++ return code;
+ }
+
+- TRACE(("Begin Cgs - xtermLoadFont(%s)\n", myfonts.f_n));
++ TRACE(("Begin Cgs - xtermLoadFont(%s)\n", new_fnames.f_n));
+ releaseWindowGCs(xw, win);
+
+ #define DbgResource(name, field, index) \
+ TRACE(("xtermLoadFont #%d "name" %s%s\n", \
+ fontnum, \
+- (fnts[index].warn == fwResource) ? "*" : " ", \
+- NonNull(myfonts.field)))
++ (new_fonts[index].warn == fwResource) ? "*" : " ", \
++ NonNull(new_fnames.field)))
+ DbgResource("normal", f_n, fNorm);
+ DbgResource("bold ", f_b, fBold);
+ #if OPT_WIDE_CHARS
+@@ -1549,16 +1568,17 @@ xtermLoadFont(XtermWidget xw,
+ #endif
+
+ if (!loadNormFP(xw,
+- &myfonts.f_n,
+- &fnts[fNorm],
++ &new_fnames.f_n,
++ &new_fonts[fNorm],
++ &old_fonts[fNorm],
+ fontnum))
+ goto bad;
+
+ if (!loadBoldFP(xw,
+- &myfonts.f_b,
+- &fnts[fBold],
+- myfonts.f_n,
+- &fnts[fNorm],
++ &new_fnames.f_b,
++ &new_fonts[fBold],
++ new_fnames.f_n,
++ &new_fonts[fNorm],
+ fontnum))
+ goto bad;
+
+@@ -1570,20 +1590,20 @@ xtermLoadFont(XtermWidget xw,
+ if_OPT_WIDE_CHARS(screen, {
+
+ if (!loadWideFP(xw,
+- &myfonts.f_w,
+- &fnts[fWide],
+- myfonts.f_n,
+- &fnts[fNorm],
++ &new_fnames.f_w,
++ &new_fonts[fWide],
++ new_fnames.f_n,
++ &new_fonts[fNorm],
+ fontnum))
+ goto bad;
+
+ if (!loadWBoldFP(xw,
+- &myfonts.f_wb,
+- &fnts[fWBold],
+- myfonts.f_w,
+- &fnts[fWide],
+- myfonts.f_b,
+- &fnts[fBold],
++ &new_fnames.f_wb,
++ &new_fonts[fWBold],
++ new_fnames.f_w,
++ &new_fonts[fWide],
++ new_fnames.f_b,
++ &new_fonts[fBold],
+ fontnum))
+ goto bad;
+
+@@ -1593,30 +1613,30 @@ xtermLoadFont(XtermWidget xw,
+ * Normal/bold fonts should be the same width. Also, the min/max
+ * values should be the same.
+ */
+- if (fnts[fNorm].fs != 0
+- && fnts[fBold].fs != 0
+- && (!is_fixed_font(fnts[fNorm].fs)
+- || !is_fixed_font(fnts[fBold].fs)
+- || differing_widths(fnts[fNorm].fs, fnts[fBold].fs))) {
++ if (new_fonts[fNorm].fs != 0
++ && new_fonts[fBold].fs != 0
++ && (!is_fixed_font(new_fonts[fNorm].fs)
++ || !is_fixed_font(new_fonts[fBold].fs)
++ || differing_widths(new_fonts[fNorm].fs, new_fonts[fBold].fs))) {
+ TRACE(("Proportional font! normal %d/%d, bold %d/%d\n",
+- fnts[fNorm].fs->min_bounds.width,
+- fnts[fNorm].fs->max_bounds.width,
+- fnts[fBold].fs->min_bounds.width,
+- fnts[fBold].fs->max_bounds.width));
++ new_fonts[fNorm].fs->min_bounds.width,
++ new_fonts[fNorm].fs->max_bounds.width,
++ new_fonts[fBold].fs->min_bounds.width,
++ new_fonts[fBold].fs->max_bounds.width));
+ proportional = True;
+ }
+
+ if_OPT_WIDE_CHARS(screen, {
+- if (fnts[fWide].fs != 0
+- && fnts[fWBold].fs != 0
+- && (!is_fixed_font(fnts[fWide].fs)
+- || !is_fixed_font(fnts[fWBold].fs)
+- || differing_widths(fnts[fWide].fs, fnts[fWBold].fs))) {
++ if (new_fonts[fWide].fs != 0
++ && new_fonts[fWBold].fs != 0
++ && (!is_fixed_font(new_fonts[fWide].fs)
++ || !is_fixed_font(new_fonts[fWBold].fs)
++ || differing_widths(new_fonts[fWide].fs, new_fonts[fWBold].fs))) {
+ TRACE(("Proportional font! wide %d/%d, wide bold %d/%d\n",
+- fnts[fWide].fs->min_bounds.width,
+- fnts[fWide].fs->max_bounds.width,
+- fnts[fWBold].fs->min_bounds.width,
+- fnts[fWBold].fs->max_bounds.width));
++ new_fonts[fWide].fs->min_bounds.width,
++ new_fonts[fWide].fs->max_bounds.width,
++ new_fonts[fWBold].fs->min_bounds.width,
++ new_fonts[fWBold].fs->max_bounds.width));
+ proportional = True;
+ }
+ });
+@@ -1635,13 +1655,13 @@ xtermLoadFont(XtermWidget xw,
+ screen->ifnts_ok = False;
+ #endif
+
+- xtermCopyFontInfo(GetNormalFont(screen, fNorm), &fnts[fNorm]);
+- xtermCopyFontInfo(GetNormalFont(screen, fBold), &fnts[fBold]);
++ xtermCopyFontInfo(GetNormalFont(screen, fNorm), &new_fonts[fNorm]);
++ xtermCopyFontInfo(GetNormalFont(screen, fBold), &new_fonts[fBold]);
+ #if OPT_WIDE_CHARS
+- xtermCopyFontInfo(GetNormalFont(screen, fWide), &fnts[fWide]);
+- if (fnts[fWBold].fs == NULL)
+- xtermCopyFontInfo(GetNormalFont(screen, fWide), &fnts[fWide]);
+- xtermCopyFontInfo(GetNormalFont(screen, fWBold), &fnts[fWBold]);
++ xtermCopyFontInfo(GetNormalFont(screen, fWide), &new_fonts[fWide]);
++ if (new_fonts[fWBold].fs == NULL)
++ xtermCopyFontInfo(GetNormalFont(screen, fWide), &new_fonts[fWide]);
++ xtermCopyFontInfo(GetNormalFont(screen, fWBold), &new_fonts[fWBold]);
+ #endif
+
+ xtermUpdateFontGCs(xw, getNormalFont);
+@@ -1672,7 +1692,7 @@ xtermLoadFont(XtermWidget xw,
+ unsigned ch;
+
+ #if OPT_TRACE
+-#define TRACE_MISS(index) show_font_misses(#index, &fnts[index])
++#define TRACE_MISS(index) show_font_misses(#index, &new_fonts[index])
+ TRACE_MISS(fNorm);
+ TRACE_MISS(fBold);
+ #if OPT_WIDE_CHARS
+@@ -1689,8 +1709,8 @@ xtermLoadFont(XtermWidget xw,
+ if ((n != UCS_REPL)
+ && (n != ch)
+ && (screen->fnt_boxes & 2)) {
+- if (xtermMissingChar(n, &fnts[fNorm]) ||
+- xtermMissingChar(n, &fnts[fBold])) {
++ if (xtermMissingChar(n, &new_fonts[fNorm]) ||
++ xtermMissingChar(n, &new_fonts[fBold])) {
+ UIntClr(screen->fnt_boxes, 2);
+ TRACE(("missing graphics character #%d, U+%04X\n",
+ ch, n));
+@@ -1702,12 +1722,12 @@ xtermLoadFont(XtermWidget xw,
+ #endif
+
+ for (ch = 1; ch < 32; ch++) {
+- if (xtermMissingChar(ch, &fnts[fNorm])) {
++ if (xtermMissingChar(ch, &new_fonts[fNorm])) {
+ TRACE(("missing normal char #%d\n", ch));
+ UIntClr(screen->fnt_boxes, 1);
+ break;
+ }
+- if (xtermMissingChar(ch, &fnts[fBold])) {
++ if (xtermMissingChar(ch, &new_fonts[fBold])) {
+ TRACE(("missing bold char #%d\n", ch));
+ UIntClr(screen->fnt_boxes, 1);
+ break;
+@@ -1724,8 +1744,8 @@ xtermLoadFont(XtermWidget xw,
+ screen->enbolden = screen->bold_mode;
+ } else {
+ screen->enbolden = screen->bold_mode
+- && ((fnts[fNorm].fs == fnts[fBold].fs)
+- || same_font_name(myfonts.f_n, myfonts.f_b));
++ && ((new_fonts[fNorm].fs == new_fonts[fBold].fs)
++ || same_font_name(new_fnames.f_n, new_fnames.f_b));
+ }
+ TRACE(("Will %suse 1-pixel offset/overstrike to simulate bold\n",
+ screen->enbolden ? "" : "not "));
+@@ -1741,7 +1761,7 @@ xtermLoadFont(XtermWidget xw,
+ update_font_escape();
+ }
+ #if OPT_SHIFT_FONTS
+- screen->menu_font_sizes[fontnum] = FontSize(fnts[fNorm].fs);
++ screen->menu_font_sizes[fontnum] = FontSize(new_fonts[fNorm].fs);
+ #endif
+ }
+ set_cursor_gcs(xw);
+@@ -1756,20 +1776,21 @@ xtermLoadFont(XtermWidget xw,
+ FREE_FNAME(f_w);
+ FREE_FNAME(f_wb);
+ #endif
+- if (fnts[fNorm].fn == fnts[fBold].fn) {
+- free(fnts[fNorm].fn);
++ if (new_fonts[fNorm].fn == new_fonts[fBold].fn) {
++ free(new_fonts[fNorm].fn);
+ } else {
+- free(fnts[fNorm].fn);
+- free(fnts[fBold].fn);
++ free(new_fonts[fNorm].fn);
++ free(new_fonts[fBold].fn);
+ }
+ #if OPT_WIDE_CHARS
+- free(fnts[fWide].fn);
+- free(fnts[fWBold].fn);
++ free(new_fonts[fWide].fn);
++ free(new_fonts[fWBold].fn);
+ #endif
+ xtermSetWinSize(xw);
+ return 1;
+
+ bad:
++ recovered = False;
+ if (tmpname)
+ free(tmpname);
+
+@@ -1780,15 +1801,15 @@ xtermLoadFont(XtermWidget xw,
+ SetItemSensitivity(fontMenuEntries[fontnum].widget, True);
+ #endif
+ Bell(xw, XkbBI_MinorError, 0);
+- myfonts.f_n = screen->MenuFontName(old_fontnum);
+- return xtermLoadFont(xw, &myfonts, doresize, old_fontnum);
+- } else if (x_strcasecmp(myfonts.f_n, DEFFONT)) {
+- int code;
+-
+- myfonts.f_n = x_strdup(DEFFONT);
+- TRACE(("...recovering for TrueType fonts\n"));
+- code = xtermLoadFont(xw, &myfonts, doresize, fontnum);
+- if (code) {
++ new_fnames.f_n = screen->MenuFontName(old_fontnum);
++ if (xtermLoadFont(xw, &new_fnames, doresize, old_fontnum))
++ recovered = True;
++ } else if (x_strcasecmp(new_fnames.f_n, DEFFONT)
++ && x_strcasecmp(new_fnames.f_n, old_fonts[fNorm].fn)) {
++ new_fnames.f_n = x_strdup(old_fonts[fNorm].fn);
++ TRACE(("...recovering from failed font-load\n"));
++ if (xtermLoadFont(xw, &new_fnames, doresize, fontnum)) {
++ recovered = True;
+ if (fontnum != fontMenu_fontsel) {
+ SetItemSensitivity(fontMenuEntries[fontnum].widget,
+ UsingRenderFont(xw));
+@@ -1797,15 +1818,15 @@ xtermLoadFont(XtermWidget xw,
+ FontHeight(screen),
+ FontWidth(screen)));
+ }
+- return code;
+ }
+ #endif
+-
+- releaseWindowGCs(xw, win);
+-
+- xtermCloseFonts(xw, fnts);
+- TRACE(("Fail Cgs - xtermLoadFont\n"));
+- return 0;
++ if (!recovered) {
++ releaseWindowGCs(xw, win);
++ xtermCloseFonts(xw, new_fonts);
++ TRACE(("Fail Cgs - xtermLoadFont\n"));
++ code = 0;
++ }
++ return code;
+ }
+
+ #if OPT_WIDE_ATTRS
+@@ -1853,7 +1874,7 @@ xtermLoadItalics(XtermWidget xw)
+ } else {
+ xtermOpenFont(xw,
+ getNormalFont(screen, n)->fn,
+- data, False);
++ data, NULL, False);
+ }
+ }
+ }
+@@ -4317,7 +4338,7 @@ lookupOneFontSize(XtermWidget xw, int fontnum)
+
+ memset(&fnt, 0, sizeof(fnt));
+ screen->menu_font_sizes[fontnum] = -1;
+- if (xtermOpenFont(xw, screen->MenuFontName(fontnum), &fnt, True)) {
++ if (xtermOpenFont(xw, screen->MenuFontName(fontnum), &fnt, NULL, True)) {
+ if (fontnum <= fontMenu_lastBuiltin
+ || strcmp(fnt.fn, DEFFONT)) {
+ screen->menu_font_sizes[fontnum] = FontSize(fnt.fs);
+@@ -4722,13 +4743,14 @@ HandleSetFont(Widget w GCC_UNUSED,
+ }
+ }
+
+-void
++Bool
+ SetVTFont(XtermWidget xw,
+ int which,
+ Bool doresize,
+ const VTFontNames * fonts)
+ {
+ TScreen *screen = TScreenOf(xw);
++ Bool result = False;
+
+ TRACE(("SetVTFont(which=%d, f_n=%s, f_b=%s)\n", which,
+ (fonts && fonts->f_n) ? fonts->f_n : "<null>",
+@@ -4737,34 +4759,31 @@ SetVTFont(XtermWidget xw,
+ if (IsIcon(screen)) {
+ Bell(xw, XkbBI_MinorError, 0);
+ } else if (which >= 0 && which < NMENUFONTS) {
+- VTFontNames myfonts;
++ VTFontNames new_fnames;
+
+- memset(&myfonts, 0, sizeof(myfonts));
++ memset(&new_fnames, 0, sizeof(new_fnames));
+ if (fonts != 0)
+- myfonts = *fonts;
++ new_fnames = *fonts;
+
+ if (which == fontMenu_fontsel) { /* go get the selection */
+- FindFontSelection(xw, myfonts.f_n, False);
++ result = FindFontSelection(xw, new_fnames.f_n, False);
+ } else {
+- int oldFont = screen->menu_font_number;
+-
+ #define USE_CACHED(field, name) \
+- if (myfonts.field == 0) { \
+- myfonts.field = x_strdup(screen->menu_font_names[which][name]); \
+- TRACE(("set myfonts." #field " from menu_font_names[%d][" #name "] %s\n", \
+- which, NonNull(myfonts.field))); \
++ if (new_fnames.field == NULL) { \
++ new_fnames.field = x_strdup(screen->menu_font_names[which][name]); \
++ TRACE(("set new_fnames." #field " from menu_font_names[%d][" #name "] %s\n", \
++ which, NonNull(new_fnames.field))); \
+ } else { \
+- TRACE(("set myfonts." #field " reused\n")); \
++ TRACE(("set new_fnames." #field " reused\n")); \
+ }
+ #define SAVE_FNAME(field, name) \
+- if (myfonts.field != 0) { \
+- if (screen->menu_font_names[which][name] == 0 \
+- || strcmp(screen->menu_font_names[which][name], myfonts.field)) { \
+- TRACE(("updating menu_font_names[%d][" #name "] to %s\n", \
+- which, myfonts.field)); \
+- FREE_STRING(screen->menu_font_names[which][name]); \
+- screen->menu_font_names[which][name] = x_strdup(myfonts.field); \
+- } \
++ if (new_fnames.field != NULL \
++ && (screen->menu_font_names[which][name] == NULL \
++ || strcmp(screen->menu_font_names[which][name], new_fnames.field))) { \
++ TRACE(("updating menu_font_names[%d][" #name "] to \"%s\"\n", \
++ which, new_fnames.field)); \
++ FREE_STRING(screen->menu_font_names[which][name]); \
++ screen->menu_font_names[which][name] = x_strdup(new_fnames.field); \
+ }
+
+ USE_CACHED(f_n, fNorm);
+@@ -4774,7 +4793,7 @@ SetVTFont(XtermWidget xw,
+ USE_CACHED(f_wb, fWBold);
+ #endif
+ if (xtermLoadFont(xw,
+- &myfonts,
++ &new_fnames,
+ doresize, which)) {
+ /*
+ * If successful, save the data so that a subsequent query via
+@@ -4786,10 +4805,8 @@ SetVTFont(XtermWidget xw,
+ SAVE_FNAME(f_w, fWide);
+ SAVE_FNAME(f_wb, fWBold);
+ #endif
++ result = True;
+ } else {
+- (void) xtermLoadFont(xw,
+- xtermFontName(screen->MenuFontName(oldFont)),
+- doresize, oldFont);
+ Bell(xw, XkbBI_MinorError, 0);
+ }
+ FREE_FNAME(f_n);
+@@ -4802,7 +4819,8 @@ SetVTFont(XtermWidget xw,
+ } else {
+ Bell(xw, XkbBI_MinorError, 0);
+ }
+- return;
++ TRACE(("...SetVTFont: %d\n", result));
++ return result;
+ }
+
+ #if OPT_RENDERFONT
+diff --git a/fontutils.h b/fontutils.h
+index 9d530c5..ceaf44a 100644
+--- a/fontutils.h
++++ b/fontutils.h
+@@ -37,7 +37,7 @@
+ /* *INDENT-OFF* */
+
+ extern Bool xtermLoadDefaultFonts (XtermWidget /* xw */);
+-extern Bool xtermOpenFont (XtermWidget /* xw */, const char */* name */, XTermFonts * /* result */, Bool /* force */);
++extern Bool xtermOpenFont (XtermWidget /* xw */, const char */* name */, XTermFonts * /* result */, XTermFonts * /* current */, Bool /* force */);
+ extern XTermFonts * getDoubleFont (TScreen * /* screen */, int /* which */);
+ extern XTermFonts * getItalicFont (TScreen * /* screen */, int /* which */);
+ extern XTermFonts * getNormalFont (TScreen * /* screen */, int /* which */);
+@@ -50,7 +50,7 @@ extern int lookupRelativeFontSize (XtermWidget /* xw */, int /* old */, int /* r
+ extern int xtermGetFont (const char * /* param */);
+ extern int xtermLoadFont (XtermWidget /* xw */, const VTFontNames */* fonts */, Bool /* doresize */, int /* fontnum */);
+ extern void HandleSetFont PROTO_XT_ACTIONS_ARGS;
+-extern void SetVTFont (XtermWidget /* xw */, int /* i */, Bool /* doresize */, const VTFontNames */* fonts */);
++extern Bool SetVTFont (XtermWidget /* xw */, int /* i */, Bool /* doresize */, const VTFontNames */* fonts */);
+ extern void allocFontList (XtermWidget /* xw */, const char * /* name */, XtermFontNames * /* target */, VTFontEnum /* which */, const char * /* source */, Bool /* ttf */);
+ extern void copyFontList (char *** /* targetp */, char ** /* source */);
+ extern void initFontLists (XtermWidget /* xw */);
+diff --git a/misc.c b/misc.c
+index cc323f8..6c5e938 100644
+--- a/misc.c
++++ b/misc.c
+@@ -3787,9 +3787,9 @@ ChangeFontRequest(XtermWidget xw, String buf)
+ {
+ memset(&fonts, 0, sizeof(fonts));
+ fonts.f_n = name;
+- SetVTFont(xw, num, True, &fonts);
+- if (num == screen->menu_font_number &&
+- num != fontMenu_fontescape) {
++ if (SetVTFont(xw, num, True, &fonts)
++ && num == screen->menu_font_number
++ && num != fontMenu_fontescape) {
+ screen->EscapeFontName() = x_strdup(name);
+ }
+ }
+@@ -6237,7 +6237,6 @@ xtermSetenv(const char *var, const char *value)
+
+ found = envindex;
+ environ[found + 1] = NULL;
+- environ = environ;
+ }
+
+ environ[found] = TextAlloc(1 + len + strlen(value));
+diff --git a/screen.c b/screen.c
+index 690e3e2..f84254f 100644
+--- a/screen.c
++++ b/screen.c
+@@ -1497,7 +1497,7 @@ ScrnRefresh(XtermWidget xw,
+ screen->topline, toprow, leftcol,
+ nrows, ncols,
+ force ? " force" : ""));
+-
++ (void) recurse;
+ ++recurse;
+
+ if (screen->cursorp.col >= leftcol
+diff --git a/xterm.h b/xterm.h
+index ec70e43..aa71f96 100644
+--- a/xterm.h
++++ b/xterm.h
+@@ -967,7 +967,7 @@ extern Bool CheckBufPtrs (TScreen * /* screen */);
+ extern Bool set_cursor_gcs (XtermWidget /* xw */);
+ extern char * vt100ResourceToString (XtermWidget /* xw */, const char * /* name */);
+ extern int VTInit (XtermWidget /* xw */);
+-extern void FindFontSelection (XtermWidget /* xw */, const char * /* atom_name */, Bool /* justprobe */);
++extern Bool FindFontSelection (XtermWidget /* xw */, const char * /* atom_name */, Bool /* justprobe */);
+ extern void HideCursor (void);
+ extern void RestartBlinking(XtermWidget /* xw */);
+ extern void ShowCursor (void);
+diff --git a/xterm.log.html b/xterm.log.html
+index 47d590b..e27dc31 100644
+--- a/xterm.log.html
++++ b/xterm.log.html
+@@ -991,6 +991,12 @@
+ 2020/02/01</a></h1>
+
+ <ul>
++ <li>improve error-recovery when setting a bitmap font for the
++ VT100 window, e.g., in case <em>OSC&nbsp;50</em> failed,
++ restoring the most recent valid font so that a subsequent
++ <em>OSC&nbsp;50</em> reports this correctly (report by David
++ Leadbeater).</li>
++
+ <li>amend change in <a href="#xterm_352">patch #352</a> for
+ button-events to fix a case where some followup events were not
+ processed soon enough (report/patch by Jimmy Aguilar
+--
+2.24.4
+
diff --git a/meta-oe/recipes-graphics/xorg-app/xterm_353.bb b/meta-oe/recipes-graphics/xorg-app/xterm_353.bb
index 264320212c..4e2b0c9d53 100644
--- a/meta-oe/recipes-graphics/xorg-app/xterm_353.bb
+++ b/meta-oe/recipes-graphics/xorg-app/xterm_353.bb
@@ -7,8 +7,9 @@ LIC_FILES_CHKSUM = "file://xterm.h;beginline=3;endline=31;md5=996b1ce0584c0747b1
SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \
file://0001-Add-configure-time-check-for-setsid.patch \
file://CVE-2021-27135.patch \
+ file://CVE-2022-24130.patch \
+ file://CVE-2022-45063.patch \
"
-
SRC_URI[md5sum] = "247c30ebfa44623f3a2d100e0cae5c7f"
SRC_URI[sha256sum] = "e521d3ee9def61f5d5c911afc74dd5c3a56ce147c7071c74023ea24cac9bb768"
PACKAGECONFIG ?= ""
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-armsoc_1.4.1.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-armsoc_1.4.1.bb
index b436ef1e4a..3d60ed1310 100644
--- a/meta-oe/recipes-graphics/xorg-driver/xf86-video-armsoc_1.4.1.bb
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-armsoc_1.4.1.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
DEPENDS += "virtual/libx11 libdrm xorgproto"
SRCREV = "8bbdb2ae3bb8ef649999a8da33ddbe11a04763b8"
-SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc"
+SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-graphics/yad/yad_6.0.bb b/meta-oe/recipes-graphics/yad/yad_6.0.bb
index 3760a37d31..92a5c284b3 100644
--- a/meta-oe/recipes-graphics/yad/yad_6.0.bb
+++ b/meta-oe/recipes-graphics/yad/yad_6.0.bb
@@ -5,7 +5,7 @@ AUTHOR = "Victor Ananjevsky"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-SRC_URI = "git://github.com/v1cont/yad.git"
+SRC_URI = "git://github.com/v1cont/yad.git;branch=master;protocol=https"
SRCREV = "a5b1a7a3867bc7dffbbc539f586f301687b6ec02"
inherit autotools gsettings features_check
diff --git a/meta-oe/recipes-kernel/agent-proxy/agent-proxy_1.97.bb b/meta-oe/recipes-kernel/agent-proxy/agent-proxy_1.97.bb
index 2eb19206d3..57232f8d5f 100644
--- a/meta-oe/recipes-kernel/agent-proxy/agent-proxy_1.97.bb
+++ b/meta-oe/recipes-kernel/agent-proxy/agent-proxy_1.97.bb
@@ -10,7 +10,7 @@ EXTRA_OEMAKE = "'CC=${CC}'"
SRCREV = "468fe4c31e6c62c9bbb328b06ba71eaf7be0b76a"
-SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git;protocol=git \
+SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git;protocol=git;branch=master \
file://0001-Makefile-Add-LDFLAGS-variable.patch \
"
diff --git a/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_git.bb b/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_git.bb
index 8c474ecdc4..b6fbccfbf5 100644
--- a/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_git.bb
+++ b/meta-oe/recipes-kernel/broadcom-bt-firmware/broadcom-bt-firmware_git.bb
@@ -9,7 +9,7 @@ LICENSE = "Firmware-Broadcom-WIDCOMM"
NO_GENERIC_LICENSE[Firmware-Broadcom-WIDCOMM] = "LICENSE.broadcom_bcm20702"
LIC_FILES_CHKSUM = "file://LICENSE.broadcom_bcm20702;md5=c0d5ea0502b00df74173d0f8a48b619d"
-SRC_URI = "git://github.com/winterheart/broadcom-bt-firmware.git"
+SRC_URI = "git://github.com/winterheart/broadcom-bt-firmware.git;branch=master;protocol=https"
SRCREV = "c0bd928b8ae5754b6077c99afe6ef5c949a58f32"
PE = "1"
PV = "0.0+git${SRCPV}"
diff --git a/meta-oe/recipes-kernel/crash/crash_7.2.8.bb b/meta-oe/recipes-kernel/crash/crash_7.2.8.bb
index 834c92cc46..5dd2c0aa0d 100644
--- a/meta-oe/recipes-kernel/crash/crash_7.2.8.bb
+++ b/meta-oe/recipes-kernel/crash/crash_7.2.8.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING3;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "zlib readline coreutils-native ncurses-native"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/crash-utility/${BPN}.git \
+SRC_URI = "git://github.com/crash-utility/${BPN}.git;branch=master;protocol=https \
${GNU_MIRROR}/gdb/gdb-7.6.tar.gz;name=gdb;subdir=git \
file://7001force_define_architecture.patch \
file://7003cross_ranlib.patch \
diff --git a/meta-oe/recipes-kernel/kpatch/kpatch.inc b/meta-oe/recipes-kernel/kpatch/kpatch.inc
index 1f70f72054..685be7d40c 100644
--- a/meta-oe/recipes-kernel/kpatch/kpatch.inc
+++ b/meta-oe/recipes-kernel/kpatch/kpatch.inc
@@ -3,7 +3,7 @@ DESCRIPTION = "kpatch is a Linux dynamic kernel patching infrastructure which al
LICENSE = "GPLv2 & LGPLv2"
DEPENDS = "elfutils bash"
-SRC_URI = "git://github.com/dynup/kpatch.git;protocol=https \
+SRC_URI = "git://github.com/dynup/kpatch.git;protocol=https;branch=master \
file://0001-kpatch-build-add-cross-compilation-support.patch \
file://0002-kpatch-build-allow-overriding-of-distro-name.patch \
"
diff --git a/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.1.bb b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.1.bb
index d381c83ae8..8188ae599d 100644
--- a/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.1.bb
+++ b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.1.bb
@@ -13,7 +13,7 @@ SRCREV = "16a0d44f1725eaa93096eaa0e086f42ef4c2712c"
PR .= "+git${SRCPV}"
-SRC_URI = "git://github.com/diamon/minicoredumper;protocol=https \
+SRC_URI = "git://github.com/diamon/minicoredumper;protocol=https;branch=master \
file://minicoredumper.service \
file://minicoredumper.init \
"
diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb
index a1378866ad..78d9c36c92 100644
--- a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb
+++ b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.5.bb
@@ -6,7 +6,7 @@ LICENSE = "GPL-2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
SRCREV = "cf59527dc24fdd2f314ae4dcaeb3d68a117988f6"
-SRC_URI = "git://github.com/intel/pm-graph.git \
+SRC_URI = "git://github.com/intel/pm-graph.git;branch=master;protocol=https \
file://0001-Makefile-fix-multilib-build-failure.patch \
file://0001-sleepgraph.py-use-python3.patch \
"
diff --git a/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb b/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb
index 5fffe77c2d..e33a3f2574 100644
--- a/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb
+++ b/meta-oe/recipes-multimedia/jack/a2jmidid_9.bb
@@ -11,7 +11,7 @@ DEPENDS_append_libc-musl = " libexecinfo"
SRCREV = "de37569c926c5886768f892c019e3f0468615038"
SRC_URI = " \
- git://github.com/linuxaudio/a2jmidid;protocol=https \
+ git://github.com/linuxaudio/a2jmidid;protocol=https;branch=master \
file://riscv_ucontext.patch \
"
diff --git a/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb b/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb
index e954341ffe..dbf4c1ae74 100644
--- a/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb
+++ b/meta-oe/recipes-multimedia/jack/jack_1.19.14.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
DEPENDS = "libsamplerate0 libsndfile1 readline"
-SRC_URI = "git://github.com/jackaudio/jack2.git \
+SRC_URI = "git://github.com/jackaudio/jack2.git;branch=master;protocol=https \
file://0001-example-clients-Use-c-compiler-for-jack_simdtests.patch \
"
SRCREV = "b54a09bf7ef760d81fdb8544ad10e45575394624"
diff --git a/meta-oe/recipes-multimedia/libass/libass_0.14.0.bb b/meta-oe/recipes-multimedia/libass/libass_0.14.0.bb
index 3454a5c270..f6c64212fe 100644
--- a/meta-oe/recipes-multimedia/libass/libass_0.14.0.bb
+++ b/meta-oe/recipes-multimedia/libass/libass_0.14.0.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a42532a0684420bdb15556c3cdd49a75"
DEPENDS = "enca fontconfig freetype libpng fribidi"
-SRC_URI = "git://github.com/libass/libass.git"
+SRC_URI = "git://github.com/libass/libass.git;branch=master;protocol=https"
SRCREV = "73284b676b12b47e17af2ef1b430527299e10c17"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-multimedia/mplayer/mpv_0.32.0.bb b/meta-oe/recipes-multimedia/mplayer/mpv_0.32.0.bb
index 70a39c7b60..13979ae9b9 100644
--- a/meta-oe/recipes-multimedia/mplayer/mpv_0.32.0.bb
+++ b/meta-oe/recipes-multimedia/mplayer/mpv_0.32.0.bb
@@ -17,7 +17,7 @@ LICENSE_FLAGS = "commercial"
SRCREV_mpv = "70b991749df389bcc0a4e145b5687233a03b4ed7"
SRC_URI = " \
- git://github.com/mpv-player/mpv;name=mpv \
+ git://github.com/mpv-player/mpv;name=mpv;branch=master;protocol=https \
https://waf.io/waf-2.0.20;name=waf;subdir=git \
"
SRC_URI[waf.sha256sum] = "bf971e98edc2414968a262c6aa6b88541a26c3cd248689c89f4c57370955ee7f"
diff --git a/meta-oe/recipes-multimedia/pipewire/pipewire-0.2_git.bb b/meta-oe/recipes-multimedia/pipewire/pipewire-0.2_git.bb
index bcb3015f8b..f6cefd8107 100644
--- a/meta-oe/recipes-multimedia/pipewire/pipewire-0.2_git.bb
+++ b/meta-oe/recipes-multimedia/pipewire/pipewire-0.2_git.bb
@@ -11,7 +11,7 @@ DEPENDS = "alsa-lib dbus udev"
SRCREV = "14c11c0fe4d366bad4cfecdee97b6652ff9ed63d"
PV = "0.2.7"
-SRC_URI = "git://github.com/PipeWire/pipewire"
+SRC_URI = "git://github.com/PipeWire/pipewire;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-multimedia/pipewire/pipewire_git.bb b/meta-oe/recipes-multimedia/pipewire/pipewire_git.bb
index 1a415c13c3..c55432d3bd 100644
--- a/meta-oe/recipes-multimedia/pipewire/pipewire_git.bb
+++ b/meta-oe/recipes-multimedia/pipewire/pipewire_git.bb
@@ -11,7 +11,7 @@ DEPENDS = "alsa-lib dbus udev"
SRCREV = "74a1632f0720886d5b3b6c23ee8fcd6c03ca7aac"
PV = "0.3.1"
-SRC_URI = "git://github.com/PipeWire/pipewire"
+SRC_URI = "git://github.com/PipeWire/pipewire;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb b/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb
index a192d1a3bb..98542ffe61 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb
+++ b/meta-oe/recipes-multimedia/v4l2apps/yavta_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "Yet Another V4L2 Test Application"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
-SRC_URI = "git://git.ideasonboard.org/yavta.git \
+SRC_URI = "git://git.ideasonboard.org/yavta.git;branch=master \
file://0001-Add-stdout-mode-to-allow-streaming-over-the-network-.patch"
SRCREV = "7e9f28bedc1ed3205fb5164f686aea96f27a0de2"
diff --git a/meta-oe/recipes-multimedia/webm/libvpx_1.8.2.bb b/meta-oe/recipes-multimedia/webm/libvpx_1.8.2.bb
index 4a98ec17dd..d607bbebe8 100644
--- a/meta-oe/recipes-multimedia/webm/libvpx_1.8.2.bb
+++ b/meta-oe/recipes-multimedia/webm/libvpx_1.8.2.bb
@@ -8,7 +8,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d5b04755015be901744a78cc30d390d4"
SRCREV = "7ec7a33a081aeeb53fed1a8d87e4cbd189152527"
-SRC_URI += "git://chromium.googlesource.com/webm/libvpx;protocol=https \
+SRC_URI += "git://chromium.googlesource.com/webm/libvpx;protocol=https;branch=master \
file://libvpx-configure-support-blank-prefix.patch \
"
diff --git a/meta-oe/recipes-printing/cups/cups-filters.inc b/meta-oe/recipes-printing/cups/cups-filters.inc
index 589bb90e6e..ff1b9ec875 100644
--- a/meta-oe/recipes-printing/cups/cups-filters.inc
+++ b/meta-oe/recipes-printing/cups/cups-filters.inc
@@ -7,7 +7,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=516215fd57564996d70327db19b368ff"
SECTION = "console/utils"
DEPENDS = "cups glib-2.0 glib-2.0-native dbus dbus-glib lcms ghostscript poppler qpdf libpng"
-DEPENDS_class-native = "poppler-native glib-2.0-native dbus-native pkgconfig-native gettext-native libpng-native"
SRC_URI = "http://openprinting.org/download/cups-filters/cups-filters-${PV}.tar.gz"
@@ -23,13 +22,6 @@ EXTRA_OECONF += " --enable-ghostscript --disable-ldap \
--with-rcdir=no \
--without-php"
-EXTRA_OECONF_class-native += " --with-pdftops=pdftops \
- --disable-avahi --disable-ghostscript \
- --disable-ldap \
- --with-png --without-jpeg --without-tiff"
-
-BBCLASSEXTEND = "native"
-
PACKAGECONFIG[jpeg] = "--with-jpeg,--without-jpeg,jpeg"
PACKAGECONFIG[png] = "--with-png,--without-png,libpng"
PACKAGECONFIG[tiff] = "--with-tiff,--without-tiff,tiff"
diff --git a/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb b/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb
index 0a8c2e4834..879dbe5cae 100644
--- a/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb
+++ b/meta-oe/recipes-security/keyutils/keyutils_1.6.1.bb
@@ -31,6 +31,9 @@ EXTRA_OEMAKE = "'CFLAGS=${CFLAGS} -Wall' \
LIBDIR=${libdir} \
USRLIBDIR=${libdir} \
INCLUDEDIR=${includedir} \
+ ETCDIR=${sysconfdir} \
+ SHAREDIR=${datadir}/keyutils \
+ MANDIR=${datadir}/man \
BUILDFOR=${SITEINFO_BITS}-bit \
NO_GLIBC_KEYERR=1 \
"
@@ -40,18 +43,6 @@ do_install () {
oe_runmake DESTDIR=${D} install
}
-do_install_append_class-nativesdk() {
- install -d ${D}${datadir}
- src_dir="${D}${target_datadir}"
- mv $src_dir/* ${D}${datadir}
- par_dir=`dirname $src_dir`
- rmdir $src_dir $par_dir
-
- install -d ${D}${sysconfdir}
- mv ${D}/etc/* ${D}${sysconfdir}/
- rmdir ${D}/etc
-}
-
do_install_ptest () {
cp -r ${S}/tests ${D}${PTEST_PATH}/
sed -i -e 's/OSDIST=Unknown/OSDIST=${DISTRO}/' ${D}${PTEST_PATH}/tests/prepare.inc.sh
diff --git a/meta-oe/recipes-security/softhsm/softhsm_git.bb b/meta-oe/recipes-security/softhsm/softhsm_git.bb
index 3236cb9a60..4ceda3d4b8 100644
--- a/meta-oe/recipes-security/softhsm/softhsm_git.bb
+++ b/meta-oe/recipes-security/softhsm/softhsm_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ef3f77a3507c3d91e75b9f2bdaee4210"
DEPENDS = "openssl"
PV = "2.5.0"
-SRC_URI = "git://github.com/opendnssec/SoftHSMv2.git;branch=master"
+SRC_URI = "git://github.com/opendnssec/SoftHSMv2.git;branch=master;protocol=https"
SRCREV = "369df0383d101bc8952692c2a368ac8bc887d1b4"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/ace-cloud-editor/ace-cloud-editor_git.bb b/meta-oe/recipes-support/ace-cloud-editor/ace-cloud-editor_git.bb
index 4ea6c8a295..8df94d91e2 100644
--- a/meta-oe/recipes-support/ace-cloud-editor/ace-cloud-editor_git.bb
+++ b/meta-oe/recipes-support/ace-cloud-editor/ace-cloud-editor_git.bb
@@ -4,7 +4,7 @@ SUMMARY = "Ace is a code editor written in JavaScript. This repository has only
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=794d11c5219c59c9efa2487c2b4066b2"
-SRC_URI = "git://github.com/ajaxorg/ace-builds.git;protocol=https"
+SRC_URI = "git://github.com/ajaxorg/ace-builds.git;protocol=https;branch=master"
PV = "02.07.17+git${SRCPV}"
SRCREV = "812e2c56aed246931a667f16c28b096e34597016"
diff --git a/meta-oe/recipes-support/anthy/anthy_9100h.bb b/meta-oe/recipes-support/anthy/anthy_9100h.bb
index a65d324eae..b464c00003 100644
--- a/meta-oe/recipes-support/anthy/anthy_9100h.bb
+++ b/meta-oe/recipes-support/anthy/anthy_9100h.bb
@@ -10,8 +10,8 @@ SRC_URI = "http://osdn.dl.sourceforge.jp/anthy/37536/anthy-9100h.tar.gz \
file://2ch_t.patch \
"
-SRC_URI_append_class-target = "file://target-helpers.patch"
-SRC_URI_append_class-native = "file://native-helpers.patch"
+SRC_URI_append_class-target = " file://target-helpers.patch"
+SRC_URI_append_class-native = " file://native-helpers.patch"
SRC_URI[md5sum] = "1f558ff7ed296787b55bb1c6cf131108"
SRC_URI[sha256sum] = "d256f075f018b4a3cb0d165ed6151fda4ba7db1621727e0eb54569b6e2275547"
diff --git a/meta-oe/recipes-support/avro/avro-c_1.9.2.bb b/meta-oe/recipes-support/avro/avro-c_1.9.2.bb
index 0642179fb3..e85f341f1f 100644
--- a/meta-oe/recipes-support/avro/avro-c_1.9.2.bb
+++ b/meta-oe/recipes-support/avro/avro-c_1.9.2.bb
@@ -9,7 +9,7 @@ DEPENDS = "jansson zlib xz"
BRANCH = "branch-1.9"
SRCREV = "bf20128ca6138a830b2ea13e0490f3df6b035639"
-SRC_URI = "git://github.com/apache/avro;branch=${BRANCH} \
+SRC_URI = "git://github.com/apache/avro;branch=${BRANCH};protocol=https \
file://0001-cmake-Use-GNUInstallDirs-instead-of-hard-coded-paths.patch;patchdir=../../ \
"
diff --git a/meta-oe/recipes-support/bdwgc/bdwgc_8.0.4.bb b/meta-oe/recipes-support/bdwgc/bdwgc_8.0.4.bb
index 407de21385..d7d0b9c154 100644
--- a/meta-oe/recipes-support/bdwgc/bdwgc_8.0.4.bb
+++ b/meta-oe/recipes-support/bdwgc/bdwgc_8.0.4.bb
@@ -24,7 +24,7 @@ LIC_FILES_CHKSUM = "file://README.QUICK;md5=81b447d779e278628c843aef92f088fa"
DEPENDS = "libatomic-ops"
SRCREV = "d3dede3ce4462cd82a15f161af797ca51654546a"
-SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-8_0"
+SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-8_0;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/c-ares/c-ares/0001-fix-configure-error-mv-libcares.pc.cmakein-to-libcar.patch b/meta-oe/recipes-support/c-ares/c-ares/0001-fix-configure-error-mv-libcares.pc.cmakein-to-libcar.patch
deleted file mode 100644
index 8f15f8424c..0000000000
--- a/meta-oe/recipes-support/c-ares/c-ares/0001-fix-configure-error-mv-libcares.pc.cmakein-to-libcar.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f2f1e134bf5d9d0789942848e03006af8d926cf8 Mon Sep 17 00:00:00 2001
-From: Wang Mingyu <wangmy@cn.fujitsu.com>
-Date: Tue, 17 Mar 2020 12:53:35 +0800
-Subject: [PATCH] fix configure error : mv libcares.pc.cmakein to
- libcares.pc.cmake
-
-Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3a5878d..c2e5740 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -563,7 +563,7 @@ IF (CARES_STATIC)
- ENDIF()
-
- # Write ares_config.h configuration file. This is used only for the build.
--CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY)
-+CONFIGURE_FILE (libcares.pc.cmake ${PROJECT_BINARY_DIR}/libcares.pc @ONLY)
-
-
-
---
-2.17.1
-
diff --git a/meta-oe/recipes-support/c-ares/c-ares/CVE-2022-4904.patch b/meta-oe/recipes-support/c-ares/c-ares/CVE-2022-4904.patch
new file mode 100644
index 0000000000..fb0aee372f
--- /dev/null
+++ b/meta-oe/recipes-support/c-ares/c-ares/CVE-2022-4904.patch
@@ -0,0 +1,67 @@
+From 9903253c347f9e0bffd285ae3829aef251cc852d Mon Sep 17 00:00:00 2001
+From: hopper-vul <118949689+hopper-vul@users.noreply.github.com>
+Date: Wed, 18 Jan 2023 22:14:26 +0800
+Subject: [PATCH] Add str len check in config_sortlist to avoid stack overflow
+ (#497)
+
+In ares_set_sortlist, it calls config_sortlist(..., sortstr) to parse
+the input str and initialize a sortlist configuration.
+
+However, ares_set_sortlist has not any checks about the validity of the input str.
+It is very easy to create an arbitrary length stack overflow with the unchecked
+`memcpy(ipbuf, str, q-str);` and `memcpy(ipbufpfx, str, q-str);`
+statements in the config_sortlist call, which could potentially cause severe
+security impact in practical programs.
+
+This commit add necessary check for `ipbuf` and `ipbufpfx` which avoid the
+potential stack overflows.
+
+fixes #496
+
+Fix By: @hopper-vul
+
+CVE: CVE-2022-4904
+Upstream-Status: Backport [https://github.com/c-ares/c-ares/commit/9903253c347f9e0bffd285ae3829aef251cc852d]
+
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/lib/ares_init.c | 4 ++++
+ test/ares-test-init.cc | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/lib/ares_init.c b/src/lib/ares_init.c
+index 51668a5c..3f9cec65 100644
+--- a/src/lib/ares_init.c
++++ b/src/lib/ares_init.c
+@@ -1913,6 +1913,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
+ q = str;
+ while (*q && *q != '/' && *q != ';' && !ISSPACE(*q))
+ q++;
++ if (q-str >= 16)
++ return ARES_EBADSTR;
+ memcpy(ipbuf, str, q-str);
+ ipbuf[q-str] = '\0';
+ /* Find the prefix */
+@@ -1921,6 +1923,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
+ const char *str2 = q+1;
+ while (*q && *q != ';' && !ISSPACE(*q))
+ q++;
++ if (q-str >= 32)
++ return ARES_EBADSTR;
+ memcpy(ipbufpfx, str, q-str);
+ ipbufpfx[q-str] = '\0';
+ str = str2;
+diff --git a/test/ares-test-init.cc b/test/ares-test-init.cc
+index 63c6a228..ee845181 100644
+--- a/test/ares-test-init.cc
++++ b/test/ares-test-init.cc
+@@ -275,6 +275,8 @@ TEST_F(DefaultChannelTest, SetAddresses) {
+
+ TEST_F(DefaultChannelTest, SetSortlistFailures) {
+ EXPECT_EQ(ARES_ENODATA, ares_set_sortlist(nullptr, "1.2.3.4"));
++ EXPECT_EQ(ARES_EBADSTR, ares_set_sortlist(channel_, "111.111.111.111*/16"));
++ EXPECT_EQ(ARES_EBADSTR, ares_set_sortlist(channel_, "111.111.111.111/255.255.255.240*"));
+ EXPECT_EQ(ARES_SUCCESS, ares_set_sortlist(channel_, "xyzzy ; lwk"));
+ EXPECT_EQ(ARES_SUCCESS, ares_set_sortlist(channel_, "xyzzy ; 0x123"));
+ }
diff --git a/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31130.patch b/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31130.patch
new file mode 100644
index 0000000000..603d2687d5
--- /dev/null
+++ b/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31130.patch
@@ -0,0 +1,329 @@
+From f22cc01039b6473b736d3bf438f56a2654cdf2b2 Mon Sep 17 00:00:00 2001
+From: Brad House <brad@brad-house.com>
+Date: Mon, 22 May 2023 06:51:34 -0400
+Subject: [PATCH] Merge pull request from GHSA-x6mf-cxr9-8q6v
+
+* Merged latest OpenBSD changes for inet_net_pton_ipv6() into c-ares.
+* Always use our own IP conversion functions now, do not delegate to OS
+ so we can have consistency in testing and fuzzing.
+* Removed bogus test cases that never should have passed.
+* Add new test case for crash bug found.
+
+Fix By: Brad House (@bradh352)
+
+Upstream-Status: Backport [https://github.com/c-ares/c-ares/commit/f22cc01039b6473b736d3bf438f56a2654cdf2b2]
+CVE: CVE-2023-31130
+
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ src/lib/inet_net_pton.c | 155 ++++++++++++++++++++-----------------
+ test/ares-test-internal.cc | 7 +-
+ 2 files changed, 86 insertions(+), 76 deletions(-)
+
+diff --git a/src/lib/inet_net_pton.c b/src/lib/inet_net_pton.c
+index 840de506..fc50425b 100644
+--- a/src/lib/inet_net_pton.c
++++ b/src/lib/inet_net_pton.c
+@@ -1,19 +1,20 @@
+
+ /*
+- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
++ * Copyright (c) 2012 by Gilles Chehade <gilles@openbsd.org>
+ * Copyright (c) 1996,1999 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
+ */
+
+ #include "ares_setup.h"
+@@ -35,9 +36,6 @@
+
+ const struct ares_in6_addr ares_in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
+
+-
+-#ifndef HAVE_INET_NET_PTON
+-
+ /*
+ * static int
+ * inet_net_pton_ipv4(src, dst, size)
+@@ -60,7 +58,7 @@ const struct ares_in6_addr ares_in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ * Paul Vixie (ISC), June 1996
+ */
+ static int
+-inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size)
++ares_inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size)
+ {
+ static const char xdigits[] = "0123456789abcdef";
+ static const char digits[] = "0123456789";
+@@ -261,19 +259,14 @@ getv4(const char *src, unsigned char *dst, int *bitsp)
+ }
+
+ static int
+-inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size)
++ares_inet_pton6(const char *src, unsigned char *dst)
+ {
+ static const char xdigits_l[] = "0123456789abcdef",
+- xdigits_u[] = "0123456789ABCDEF";
++ xdigits_u[] = "0123456789ABCDEF";
+ unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
+ const char *xdigits, *curtok;
+- int ch, saw_xdigit;
++ int ch, saw_xdigit, count_xdigit;
+ unsigned int val;
+- int digits;
+- int bits;
+- size_t bytes;
+- int words;
+- int ipv4;
+
+ memset((tp = tmp), '\0', NS_IN6ADDRSZ);
+ endp = tp + NS_IN6ADDRSZ;
+@@ -283,22 +276,22 @@ inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size)
+ if (*++src != ':')
+ goto enoent;
+ curtok = src;
+- saw_xdigit = 0;
++ saw_xdigit = count_xdigit = 0;
+ val = 0;
+- digits = 0;
+- bits = -1;
+- ipv4 = 0;
+ while ((ch = *src++) != '\0') {
+ const char *pch;
+
+ if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
+ pch = strchr((xdigits = xdigits_u), ch);
+ if (pch != NULL) {
++ if (count_xdigit >= 4)
++ goto enoent;
+ val <<= 4;
+- val |= aresx_sztoui(pch - xdigits);
+- if (++digits > 4)
++ val |= (pch - xdigits);
++ if (val > 0xffff)
+ goto enoent;
+ saw_xdigit = 1;
++ count_xdigit++;
+ continue;
+ }
+ if (ch == ':') {
+@@ -308,78 +301,107 @@ inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size)
+ goto enoent;
+ colonp = tp;
+ continue;
+- } else if (*src == '\0')
++ } else if (*src == '\0') {
+ goto enoent;
++ }
+ if (tp + NS_INT16SZ > endp)
+- return (0);
+- *tp++ = (unsigned char)((val >> 8) & 0xff);
+- *tp++ = (unsigned char)(val & 0xff);
++ goto enoent;
++ *tp++ = (unsigned char) (val >> 8) & 0xff;
++ *tp++ = (unsigned char) val & 0xff;
+ saw_xdigit = 0;
+- digits = 0;
++ count_xdigit = 0;
+ val = 0;
+ continue;
+ }
+ if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
+- getv4(curtok, tp, &bits) > 0) {
+- tp += NS_INADDRSZ;
++ ares_inet_net_pton_ipv4(curtok, tp, INADDRSZ) > 0) {
++ tp += INADDRSZ;
+ saw_xdigit = 0;
+- ipv4 = 1;
++ count_xdigit = 0;
+ break; /* '\0' was seen by inet_pton4(). */
+ }
+- if (ch == '/' && getbits(src, &bits) > 0)
+- break;
+ goto enoent;
+ }
+ if (saw_xdigit) {
+ if (tp + NS_INT16SZ > endp)
+ goto enoent;
+- *tp++ = (unsigned char)((val >> 8) & 0xff);
+- *tp++ = (unsigned char)(val & 0xff);
++ *tp++ = (unsigned char) (val >> 8) & 0xff;
++ *tp++ = (unsigned char) val & 0xff;
+ }
+- if (bits == -1)
+- bits = 128;
+-
+- words = (bits + 15) / 16;
+- if (words < 2)
+- words = 2;
+- if (ipv4)
+- words = 8;
+- endp = tmp + 2 * words;
+-
+ if (colonp != NULL) {
+ /*
+ * Since some memmove()'s erroneously fail to handle
+ * overlapping regions, we'll do the shift by hand.
+ */
+- const ares_ssize_t n = tp - colonp;
+- ares_ssize_t i;
++ const int n = tp - colonp;
++ int i;
+
+ if (tp == endp)
+ goto enoent;
+ for (i = 1; i <= n; i++) {
+- *(endp - i) = *(colonp + n - i);
+- *(colonp + n - i) = 0;
++ endp[- i] = colonp[n - i];
++ colonp[n - i] = 0;
+ }
+ tp = endp;
+ }
+ if (tp != endp)
+ goto enoent;
+
+- bytes = (bits + 7) / 8;
+- if (bytes > size)
+- goto emsgsize;
+- memcpy(dst, tmp, bytes);
+- return (bits);
++ memcpy(dst, tmp, NS_IN6ADDRSZ);
++ return (1);
+
+- enoent:
++enoent:
+ SET_ERRNO(ENOENT);
+ return (-1);
+
+- emsgsize:
++emsgsize:
+ SET_ERRNO(EMSGSIZE);
+ return (-1);
+ }
+
++static int
++ares_inet_net_pton_ipv6(const char *src, unsigned char *dst, size_t size)
++{
++ struct ares_in6_addr in6;
++ int ret;
++ int bits;
++ size_t bytes;
++ char buf[INET6_ADDRSTRLEN + sizeof("/128")];
++ char *sep;
++ const char *errstr;
++
++ if (strlen(src) >= sizeof buf) {
++ SET_ERRNO(EMSGSIZE);
++ return (-1);
++ }
++ strncpy(buf, src, sizeof buf);
++
++ sep = strchr(buf, '/');
++ if (sep != NULL)
++ *sep++ = '\0';
++
++ ret = ares_inet_pton6(buf, (unsigned char *)&in6);
++ if (ret != 1)
++ return (-1);
++
++ if (sep == NULL)
++ bits = 128;
++ else {
++ if (!getbits(sep, &bits)) {
++ SET_ERRNO(ENOENT);
++ return (-1);
++ }
++ }
++
++ bytes = (bits + 7) / 8;
++ if (bytes > size) {
++ SET_ERRNO(EMSGSIZE);
++ return (-1);
++ }
++ memcpy(dst, &in6, bytes);
++ return (bits);
++}
++
+ /*
+ * int
+ * inet_net_pton(af, src, dst, size)
+@@ -403,18 +425,15 @@ ares_inet_net_pton(int af, const char *src, void *dst, size_t size)
+ {
+ switch (af) {
+ case AF_INET:
+- return (inet_net_pton_ipv4(src, dst, size));
++ return (ares_inet_net_pton_ipv4(src, dst, size));
+ case AF_INET6:
+- return (inet_net_pton_ipv6(src, dst, size));
++ return (ares_inet_net_pton_ipv6(src, dst, size));
+ default:
+ SET_ERRNO(EAFNOSUPPORT);
+ return (-1);
+ }
+ }
+
+-#endif /* HAVE_INET_NET_PTON */
+-
+-#ifndef HAVE_INET_PTON
+ int ares_inet_pton(int af, const char *src, void *dst)
+ {
+ int result;
+@@ -434,11 +453,3 @@ int ares_inet_pton(int af, const char *src, void *dst)
+ return 0;
+ return (result > -1 ? 1 : -1);
+ }
+-#else /* HAVE_INET_PTON */
+-int ares_inet_pton(int af, const char *src, void *dst)
+-{
+- /* just relay this to the underlying function */
+- return inet_pton(af, src, dst);
+-}
+-
+-#endif
+diff --git a/test/ares-test-internal.cc b/test/ares-test-internal.cc
+index 96d4edec..161f0a5c 100644
+--- a/test/ares-test-internal.cc
++++ b/test/ares-test-internal.cc
+@@ -81,6 +81,7 @@ TEST_F(LibraryTest, InetPtoN) {
+ EXPECT_EQ(0, ares_inet_net_pton(AF_INET6, "12:34::ff/0", &a6, sizeof(a6)));
+ EXPECT_EQ(16 * 8, ares_inet_net_pton(AF_INET6, "12:34::ffff:0.2", &a6, sizeof(a6)));
+ EXPECT_EQ(16 * 8, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234", &a6, sizeof(a6)));
++ EXPECT_EQ(2, ares_inet_net_pton(AF_INET6, "0::00:00:00/2", &a6, sizeof(a6)));
+
+ // Various malformed versions
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET, "", &a4, sizeof(a4)));
+@@ -118,11 +119,9 @@ TEST_F(LibraryTest, InetPtoN) {
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, ":1234:1234:1234:1234:1234:1234:1234:1234", &a6, sizeof(a6)));
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, ":1234:1234:1234:1234:1234:1234:1234:1234:", &a6, sizeof(a6)));
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678", &a6, sizeof(a6)));
+- // TODO(drysdale): check whether the next two tests should give -1.
+- EXPECT_EQ(0, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678", &a6, sizeof(a6)));
+- EXPECT_EQ(0, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678:5678", &a6, sizeof(a6)));
++ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678", &a6, sizeof(a6)));
++ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "1234:1234:1234:1234:1234:1234:1234:1234:5678:5678:5678", &a6, sizeof(a6)));
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:257.2.3.4", &a6, sizeof(a6)));
+- EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:002.2.3.4", &a6, sizeof(a6)));
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:1.2.3.4.5.6", &a6, sizeof(a6)));
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:1.2.3.4.5", &a6, sizeof(a6)));
+ EXPECT_EQ(-1, ares_inet_net_pton(AF_INET6, "12:34::ffff:1.2.3.z", &a6, sizeof(a6)));
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31147.patch b/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31147.patch
new file mode 100644
index 0000000000..ba17721a58
--- /dev/null
+++ b/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-31147.patch
@@ -0,0 +1,717 @@
+From 823df3b989e59465d17b0a2eb1239a5fc048b4e5 Mon Sep 17 00:00:00 2001
+From: Brad House <brad@brad-house.com>
+Date: Mon, 22 May 2023 06:51:06 -0400
+Subject: [PATCH] Merge pull request from GHSA-8r8p-23f3-64c2
+
+* segment random number generation into own file
+
+* abstract random code to make it more modular so we can have multiple backends
+
+* rand: add support for arc4random_buf() and also direct CARES_RANDOM_FILE reading
+
+* autotools: fix detection of arc4random_buf
+
+* rework initial rc4 seed for PRNG as last fallback
+
+* rc4: more proper implementation, simplified for clarity
+
+* clarifications
+
+Upstream-Status: Backport [https://github.com/c-ares/c-ares/commit/823df3b989e59465d17b0a2eb1239a5fc048b4e5]
+CVE: CVE-2023-31147
+
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ CMakeLists.txt | 2 +
+ configure.ac | 1 +
+ m4/cares-functions.m4 | 85 +++++++++++
+ src/lib/Makefile.inc | 1 +
+ src/lib/ares_config.h.cmake | 3 +
+ src/lib/ares_destroy.c | 3 +
+ src/lib/ares_init.c | 82 ++---------
+ src/lib/ares_private.h | 19 ++-
+ src/lib/ares_query.c | 36 +----
+ src/lib/ares_rand.c | 274 ++++++++++++++++++++++++++++++++++++
+ 10 files changed, 387 insertions(+), 119 deletions(-)
+ create mode 100644 src/lib/ares_rand.c
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 194485a3..1fb9af55 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -386,6 +386,8 @@ CHECK_SYMBOL_EXISTS (strncasecmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNCAS
+ CHECK_SYMBOL_EXISTS (strncmpi "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNCMPI)
+ CHECK_SYMBOL_EXISTS (strnicmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNICMP)
+ CHECK_SYMBOL_EXISTS (writev "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_WRITEV)
++CHECK_SYMBOL_EXISTS (arc4random_buf "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_ARC4RANDOM_BUF)
++
+
+ # On Android, the system headers may define __system_property_get(), but excluded
+ # from libc. We need to perform a link test instead of a header/symbol test.
+diff --git a/configure.ac b/configure.ac
+index 1d0fb5ce..9a763696 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -683,6 +683,7 @@ CARES_CHECK_FUNC_STRNCASECMP
+ CARES_CHECK_FUNC_STRNCMPI
+ CARES_CHECK_FUNC_STRNICMP
+ CARES_CHECK_FUNC_WRITEV
++CARES_CHECK_FUNC_ARC4RANDOM_BUF
+
+
+ dnl check for AF_INET6
+diff --git a/m4/cares-functions.m4 b/m4/cares-functions.m4
+index 0f3992c7..d4f4f994 100644
+--- a/m4/cares-functions.m4
++++ b/m4/cares-functions.m4
+@@ -3753,3 +3753,88 @@ AC_DEFUN([CARES_CHECK_FUNC_WRITEV], [
+ ac_cv_func_writev="no"
+ fi
+ ])
++
++dnl CARES_CHECK_FUNC_ARC4RANDOM_BUF
++dnl -------------------------------------------------
++dnl Verify if arc4random_buf is available, prototyped, and
++dnl can be compiled. If all of these are true, and
++dnl usage has not been previously disallowed with
++dnl shell variable cares_disallow_arc4random_buf, then
++dnl HAVE_ARC4RANDOM_BUF will be defined.
++
++AC_DEFUN([CARES_CHECK_FUNC_ARC4RANDOM_BUF], [
++ AC_REQUIRE([CARES_INCLUDES_STDLIB])dnl
++ #
++ tst_links_arc4random_buf="unknown"
++ tst_proto_arc4random_buf="unknown"
++ tst_compi_arc4random_buf="unknown"
++ tst_allow_arc4random_buf="unknown"
++ #
++ AC_MSG_CHECKING([if arc4random_buf can be linked])
++ AC_LINK_IFELSE([
++ AC_LANG_FUNC_LINK_TRY([arc4random_buf])
++ ],[
++ AC_MSG_RESULT([yes])
++ tst_links_arc4random_buf="yes"
++ ],[
++ AC_MSG_RESULT([no])
++ tst_links_arc4random_buf="no"
++ ])
++ #
++ if test "$tst_links_arc4random_buf" = "yes"; then
++ AC_MSG_CHECKING([if arc4random_buf is prototyped])
++ AC_EGREP_CPP([arc4random_buf],[
++ $cares_includes_stdlib
++ ],[
++ AC_MSG_RESULT([yes])
++ tst_proto_arc4random_buf="yes"
++ ],[
++ AC_MSG_RESULT([no])
++ tst_proto_arc4random_buf="no"
++ ])
++ fi
++ #
++ if test "$tst_proto_arc4random_buf" = "yes"; then
++ AC_MSG_CHECKING([if arc4random_buf is compilable])
++ AC_COMPILE_IFELSE([
++ AC_LANG_PROGRAM([[
++ $cares_includes_stdlib
++ ]],[[
++ arc4random_buf(NULL, 0);
++ return 1;
++ ]])
++ ],[
++ AC_MSG_RESULT([yes])
++ tst_compi_arc4random_buf="yes"
++ ],[
++ AC_MSG_RESULT([no])
++ tst_compi_arc4random_buf="no"
++ ])
++ fi
++ #
++ if test "$tst_compi_arc4random_buf" = "yes"; then
++ AC_MSG_CHECKING([if arc4random_buf usage allowed])
++ if test "x$cares_disallow_arc4random_buf" != "xyes"; then
++ AC_MSG_RESULT([yes])
++ tst_allow_arc4random_buf="yes"
++ else
++ AC_MSG_RESULT([no])
++ tst_allow_arc4random_buf="no"
++ fi
++ fi
++ #
++ AC_MSG_CHECKING([if arc4random_buf might be used])
++ if test "$tst_links_arc4random_buf" = "yes" &&
++ test "$tst_proto_arc4random_buf" = "yes" &&
++ test "$tst_compi_arc4random_buf" = "yes" &&
++ test "$tst_allow_arc4random_buf" = "yes"; then
++ AC_MSG_RESULT([yes])
++ AC_DEFINE_UNQUOTED(HAVE_ARC4RANDOM_BUF, 1,
++ [Define to 1 if you have the arc4random_buf function.])
++ ac_cv_func_arc4random_buf="yes"
++ else
++ AC_MSG_RESULT([no])
++ ac_cv_func_arc4random_buf="no"
++ fi
++])
++
+diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
+index a3b060c2..72a7673c 100644
+--- a/src/lib/Makefile.inc
++++ b/src/lib/Makefile.inc
+@@ -45,6 +45,7 @@ CSOURCES = ares__addrinfo2hostent.c \
+ ares_platform.c \
+ ares_process.c \
+ ares_query.c \
++ ares_rand.c \
+ ares_search.c \
+ ares_send.c \
+ ares_strcasecmp.c \
+diff --git a/src/lib/ares_config.h.cmake b/src/lib/ares_config.h.cmake
+index fddb7853..798820a3 100644
+--- a/src/lib/ares_config.h.cmake
++++ b/src/lib/ares_config.h.cmake
+@@ -346,6 +346,9 @@
+ /* Define to 1 if you need the memory.h header file even with stdlib.h */
+ #cmakedefine NEED_MEMORY_H
+
++/* Define if have arc4random_buf() */
++#cmakedefine HAVE_ARC4RANDOM_BUF
++
+ /* a suitable file/device to read random data from */
+ #cmakedefine CARES_RANDOM_FILE "@CARES_RANDOM_FILE@"
+
+diff --git a/src/lib/ares_destroy.c b/src/lib/ares_destroy.c
+index fed2009a..0447af4c 100644
+--- a/src/lib/ares_destroy.c
++++ b/src/lib/ares_destroy.c
+@@ -90,6 +90,9 @@ void ares_destroy(ares_channel channel)
+ if (channel->resolvconf_path)
+ ares_free(channel->resolvconf_path);
+
++ if (channel->rand_state)
++ ares__destroy_rand_state(channel->rand_state);
++
+ ares_free(channel);
+ }
+
+diff --git a/src/lib/ares_init.c b/src/lib/ares_init.c
+index de5d86c9..2607ed6f 100644
+--- a/src/lib/ares_init.c
++++ b/src/lib/ares_init.c
+@@ -72,7 +72,6 @@ static int config_nameserver(struct server_state **servers, int *nservers,
+ static int set_search(ares_channel channel, const char *str);
+ static int set_options(ares_channel channel, const char *str);
+ static const char *try_option(const char *p, const char *q, const char *opt);
+-static int init_id_key(rc4_key* key,int key_data_len);
+
+ static int config_sortlist(struct apattern **sortlist, int *nsort,
+ const char *str);
+@@ -149,6 +148,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
+ channel->sock_funcs = NULL;
+ channel->sock_func_cb_data = NULL;
+ channel->resolvconf_path = NULL;
++ channel->rand_state = NULL;
+
+ channel->last_server = 0;
+ channel->last_timeout_processed = (time_t)now.tv_sec;
+@@ -202,9 +202,13 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
+ /* Generate random key */
+
+ if (status == ARES_SUCCESS) {
+- status = init_id_key(&channel->id_key, ARES_ID_KEY_LEN);
++ channel->rand_state = ares__init_rand_state();
++ if (channel->rand_state == NULL) {
++ status = ARES_ENOMEM;
++ }
++
+ if (status == ARES_SUCCESS)
+- channel->next_id = ares__generate_new_id(&channel->id_key);
++ channel->next_id = ares__generate_new_id(channel->rand_state);
+ else
+ DEBUGF(fprintf(stderr, "Error: init_id_key failed: %s\n",
+ ares_strerror(status)));
+@@ -224,6 +228,8 @@ done:
+ ares_free(channel->lookups);
+ if(channel->resolvconf_path)
+ ares_free(channel->resolvconf_path);
++ if (channel->rand_state)
++ ares__destroy_rand_state(channel->rand_state);
+ ares_free(channel);
+ return status;
+ }
+@@ -2495,76 +2501,6 @@ static int sortlist_alloc(struct apattern **sortlist, int *nsort,
+ return 1;
+ }
+
+-/* initialize an rc4 key. If possible a cryptographically secure random key
+- is generated using a suitable function (for example win32's RtlGenRandom as
+- described in
+- http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx
+- otherwise the code defaults to cross-platform albeit less secure mechanism
+- using rand
+-*/
+-static void randomize_key(unsigned char* key,int key_data_len)
+-{
+- int randomized = 0;
+- int counter=0;
+-#ifdef WIN32
+- BOOLEAN res;
+- if (ares_fpSystemFunction036)
+- {
+- res = (*ares_fpSystemFunction036) (key, key_data_len);
+- if (res)
+- randomized = 1;
+- }
+-#else /* !WIN32 */
+-#ifdef CARES_RANDOM_FILE
+- FILE *f = fopen(CARES_RANDOM_FILE, "rb");
+- if(f) {
+- setvbuf(f, NULL, _IONBF, 0);
+- counter = aresx_uztosi(fread(key, 1, key_data_len, f));
+- fclose(f);
+- }
+-#endif
+-#endif /* WIN32 */
+-
+- if (!randomized) {
+- for (;counter<key_data_len;counter++)
+- key[counter]=(unsigned char)(rand() % 256); /* LCOV_EXCL_LINE */
+- }
+-}
+-
+-static int init_id_key(rc4_key* key,int key_data_len)
+-{
+- unsigned char index1;
+- unsigned char index2;
+- unsigned char* state;
+- short counter;
+- unsigned char *key_data_ptr = 0;
+-
+- key_data_ptr = ares_malloc(key_data_len);
+- if (!key_data_ptr)
+- return ARES_ENOMEM;
+- memset(key_data_ptr, 0, key_data_len);
+-
+- state = &key->state[0];
+- for(counter = 0; counter < 256; counter++)
+- /* unnecessary AND but it keeps some compilers happier */
+- state[counter] = (unsigned char)(counter & 0xff);
+- randomize_key(key->state,key_data_len);
+- key->x = 0;
+- key->y = 0;
+- index1 = 0;
+- index2 = 0;
+- for(counter = 0; counter < 256; counter++)
+- {
+- index2 = (unsigned char)((key_data_ptr[index1] + state[counter] +
+- index2) % 256);
+- ARES_SWAP_BYTE(&state[counter], &state[index2]);
+-
+- index1 = (unsigned char)((index1 + 1) % key_data_len);
+- }
+- ares_free(key_data_ptr);
+- return ARES_SUCCESS;
+-}
+-
+ void ares_set_local_ip4(ares_channel channel, unsigned int local_ip)
+ {
+ channel->local_ip4 = local_ip;
+diff --git a/src/lib/ares_private.h b/src/lib/ares_private.h
+index 60d69e08..518b5c33 100644
+--- a/src/lib/ares_private.h
++++ b/src/lib/ares_private.h
+@@ -101,8 +101,6 @@ W32_FUNC const char *_w32_GetHostsFile (void);
+
+ #endif
+
+-#define ARES_ID_KEY_LEN 31
+-
+ #include "ares_ipv6.h"
+ #include "ares_llist.h"
+
+@@ -262,12 +260,8 @@ struct apattern {
+ unsigned short type;
+ };
+
+-typedef struct rc4_key
+-{
+- unsigned char state[256];
+- unsigned char x;
+- unsigned char y;
+-} rc4_key;
++struct ares_rand_state;
++typedef struct ares_rand_state ares_rand_state;
+
+ struct ares_channeldata {
+ /* Configuration data */
+@@ -302,8 +296,8 @@ struct ares_channeldata {
+
+ /* ID to use for next query */
+ unsigned short next_id;
+- /* key to use when generating new ids */
+- rc4_key id_key;
++ /* random state to use when generating new ids */
++ ares_rand_state *rand_state;
+
+ /* Generation number to use for the next TCP socket open/close */
+ int tcp_connection_generation;
+@@ -359,7 +353,10 @@ void ares__close_sockets(ares_channel channel, struct server_state *server);
+ int ares__get_hostent(FILE *fp, int family, struct hostent **host);
+ int ares__read_line(FILE *fp, char **buf, size_t *bufsize);
+ void ares__free_query(struct query *query);
+-unsigned short ares__generate_new_id(rc4_key* key);
++
++ares_rand_state *ares__init_rand_state(void);
++void ares__destroy_rand_state(ares_rand_state *state);
++unsigned short ares__generate_new_id(ares_rand_state *state);
+ struct timeval ares__tvnow(void);
+ int ares__expand_name_validated(const unsigned char *encoded,
+ const unsigned char *abuf,
+diff --git a/src/lib/ares_query.c b/src/lib/ares_query.c
+index 508274db..42323bec 100644
+--- a/src/lib/ares_query.c
++++ b/src/lib/ares_query.c
+@@ -33,32 +33,6 @@ struct qquery {
+
+ static void qcallback(void *arg, int status, int timeouts, unsigned char *abuf, int alen);
+
+-static void rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len)
+-{
+- unsigned char x;
+- unsigned char y;
+- unsigned char* state;
+- unsigned char xorIndex;
+- int counter;
+-
+- x = key->x;
+- y = key->y;
+-
+- state = &key->state[0];
+- for(counter = 0; counter < buffer_len; counter ++)
+- {
+- x = (unsigned char)((x + 1) % 256);
+- y = (unsigned char)((state[x] + y) % 256);
+- ARES_SWAP_BYTE(&state[x], &state[y]);
+-
+- xorIndex = (unsigned char)((state[x] + state[y]) % 256);
+-
+- buffer_ptr[counter] = (unsigned char)(buffer_ptr[counter]^state[xorIndex]);
+- }
+- key->x = x;
+- key->y = y;
+-}
+-
+ static struct query* find_query_by_id(ares_channel channel, unsigned short id)
+ {
+ unsigned short qid;
+@@ -78,7 +52,6 @@ static struct query* find_query_by_id(ares_channel channel, unsigned short id)
+ return NULL;
+ }
+
+-
+ /* a unique query id is generated using an rc4 key. Since the id may already
+ be used by a running query (as infrequent as it may be), a lookup is
+ performed per id generation. In practice this search should happen only
+@@ -89,19 +62,12 @@ static unsigned short generate_unique_id(ares_channel channel)
+ unsigned short id;
+
+ do {
+- id = ares__generate_new_id(&channel->id_key);
++ id = ares__generate_new_id(channel->rand_state);
+ } while (find_query_by_id(channel, id));
+
+ return (unsigned short)id;
+ }
+
+-unsigned short ares__generate_new_id(rc4_key* key)
+-{
+- unsigned short r=0;
+- rc4(key, (unsigned char *)&r, sizeof(r));
+- return r;
+-}
+-
+ void ares_query(ares_channel channel, const char *name, int dnsclass,
+ int type, ares_callback callback, void *arg)
+ {
+diff --git a/src/lib/ares_rand.c b/src/lib/ares_rand.c
+new file mode 100644
+index 00000000..a564bc23
+--- /dev/null
++++ b/src/lib/ares_rand.c
+@@ -0,0 +1,274 @@
++/* Copyright 1998 by the Massachusetts Institute of Technology.
++ * Copyright (C) 2007-2013 by Daniel Stenberg
++ *
++ * Permission to use, copy, modify, and distribute this
++ * software and its documentation for any purpose and without
++ * fee is hereby granted, provided that the above copyright
++ * notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting
++ * documentation, and that the name of M.I.T. not be used in
++ * advertising or publicity pertaining to distribution of the
++ * software without specific, written prior permission.
++ * M.I.T. makes no representations about the suitability of
++ * this software for any purpose. It is provided "as is"
++ * without express or implied warranty.
++ */
++
++#include "ares_setup.h"
++#include "ares.h"
++#include "ares_private.h"
++#include "ares_nowarn.h"
++#include <stdlib.h>
++
++typedef enum {
++ ARES_RAND_OS = 1, /* OS-provided such as RtlGenRandom or arc4random */
++ ARES_RAND_FILE = 2, /* OS file-backed random number generator */
++ ARES_RAND_RC4 = 3 /* Internal RC4 based PRNG */
++} ares_rand_backend;
++
++typedef struct ares_rand_rc4
++{
++ unsigned char S[256];
++ size_t i;
++ size_t j;
++} ares_rand_rc4;
++
++struct ares_rand_state
++{
++ ares_rand_backend type;
++ union {
++ FILE *rand_file;
++ ares_rand_rc4 rc4;
++ } state;
++};
++
++
++/* Define RtlGenRandom = SystemFunction036. This is in advapi32.dll. There is
++ * no need to dynamically load this, other software used widely does not.
++ * http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx
++ * https://docs.microsoft.com/en-us/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom
++ */
++#ifdef _WIN32
++BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG RandomBufferLength);
++# ifndef RtlGenRandom
++# define RtlGenRandom(a,b) SystemFunction036(a,b)
++# endif
++#endif
++
++
++#define ARES_RC4_KEY_LEN 32 /* 256 bits */
++
++static unsigned int ares_u32_from_ptr(void *addr)
++{
++ if (sizeof(void *) == 8) {
++ return (unsigned int)((((size_t)addr >> 32) & 0xFFFFFFFF) | ((size_t)addr & 0xFFFFFFFF));
++ }
++ return (unsigned int)((size_t)addr & 0xFFFFFFFF);
++}
++
++
++/* initialize an rc4 key as the last possible fallback. */
++static void ares_rc4_generate_key(ares_rand_rc4 *rc4_state, unsigned char *key, size_t key_len)
++{
++ size_t i;
++ size_t len = 0;
++ unsigned int data;
++ struct timeval tv;
++
++ if (key_len != ARES_RC4_KEY_LEN)
++ return;
++
++ /* Randomness is hard to come by. Maybe the system randomizes heap and stack addresses.
++ * Maybe the current timestamp give us some randomness.
++ * Use rc4_state (heap), &i (stack), and ares__tvnow()
++ */
++ data = ares_u32_from_ptr(rc4_state);
++ memcpy(key + len, &data, sizeof(data));
++ len += sizeof(data);
++
++ data = ares_u32_from_ptr(&i);
++ memcpy(key + len, &data, sizeof(data));
++ len += sizeof(data);
++
++ tv = ares__tvnow();
++ data = (unsigned int)((tv.tv_sec | tv.tv_usec) & 0xFFFFFFFF);
++ memcpy(key + len, &data, sizeof(data));
++ len += sizeof(data);
++
++ srand(ares_u32_from_ptr(rc4_state) | ares_u32_from_ptr(&i) | (unsigned int)((tv.tv_sec | tv.tv_usec) & 0xFFFFFFFF));
++
++ for (i=len; i<key_len; i++) {
++ key[i]=(unsigned char)(rand() % 256); /* LCOV_EXCL_LINE */
++ }
++}
++
++
++static void ares_rc4_init(ares_rand_rc4 *rc4_state)
++{
++ unsigned char key[ARES_RC4_KEY_LEN];
++ size_t i;
++ size_t j;
++
++ ares_rc4_generate_key(rc4_state, key, sizeof(key));
++
++ for (i = 0; i < sizeof(rc4_state->S); i++) {
++ rc4_state->S[i] = i & 0xFF;
++ }
++
++ for(i = 0, j = 0; i < 256; i++) {
++ j = (j + rc4_state->S[i] + key[i % sizeof(key)]) % 256;
++ ARES_SWAP_BYTE(&rc4_state->S[i], &rc4_state->S[j]);
++ }
++
++ rc4_state->i = 0;
++ rc4_state->j = 0;
++}
++
++/* Just outputs the key schedule, no need to XOR with any data since we have none */
++static void ares_rc4_prng(ares_rand_rc4 *rc4_state, unsigned char *buf, int len)
++{
++ unsigned char *S = rc4_state->S;
++ size_t i = rc4_state->i;
++ size_t j = rc4_state->j;
++ size_t cnt;
++
++ for (cnt=0; cnt<len; cnt++) {
++ i = (i + 1) % 256;
++ j = (j + S[i]) % 256;
++
++ ARES_SWAP_BYTE(&S[i], &S[j]);
++ buf[cnt] = S[(S[i] + S[j]) % 256];
++ }
++
++ rc4_state->i = i;
++ rc4_state->j = j;
++}
++
++
++static int ares__init_rand_engine(ares_rand_state *state)
++{
++ memset(state, 0, sizeof(*state));
++
++#if defined(HAVE_ARC4RANDOM_BUF) || defined(_WIN32)
++ state->type = ARES_RAND_OS;
++ return 1;
++#elif defined(CARES_RANDOM_FILE)
++ state->type = ARES_RAND_FILE;
++ state->state.rand_file = fopen(CARES_RANDOM_FILE, "rb");
++ if (state->state.rand_file) {
++ setvbuf(state->state.rand_file, NULL, _IONBF, 0);
++ return 1;
++ }
++ /* Fall-Thru on failure to RC4 */
++#endif
++
++ state->type = ARES_RAND_RC4;
++ ares_rc4_init(&state->state.rc4);
++
++ /* Currently cannot fail */
++ return 1;
++}
++
++
++ares_rand_state *ares__init_rand_state()
++{
++ ares_rand_state *state = NULL;
++
++ state = ares_malloc(sizeof(*state));
++ if (!state)
++ return NULL;
++
++ if (!ares__init_rand_engine(state)) {
++ ares_free(state);
++ return NULL;
++ }
++
++ return state;
++}
++
++
++static void ares__clear_rand_state(ares_rand_state *state)
++{
++ if (!state)
++ return;
++
++ switch (state->type) {
++ case ARES_RAND_OS:
++ break;
++ case ARES_RAND_FILE:
++ fclose(state->state.rand_file);
++ break;
++ case ARES_RAND_RC4:
++ break;
++ }
++}
++
++
++static void ares__reinit_rand(ares_rand_state *state)
++{
++ ares__clear_rand_state(state);
++ ares__init_rand_engine(state);
++}
++
++
++void ares__destroy_rand_state(ares_rand_state *state)
++{
++ if (!state)
++ return;
++
++ ares__clear_rand_state(state);
++ ares_free(state);
++}
++
++
++static void ares__rand_bytes(ares_rand_state *state, unsigned char *buf, size_t len)
++{
++
++ while (1) {
++ size_t rv;
++ size_t bytes_read = 0;
++
++ switch (state->type) {
++ case ARES_RAND_OS:
++#ifdef _WIN32
++ RtlGenRandom(buf, len);
++ return;
++#elif defined(HAVE_ARC4RANDOM_BUF)
++ arc4random_buf(buf, len);
++ return;
++#else
++ /* Shouldn't be possible to be here */
++ break;
++#endif
++
++ case ARES_RAND_FILE:
++ while (1) {
++ size_t rv = fread(buf + bytes_read, 1, len - bytes_read, state->state.rand_file);
++ if (rv == 0)
++ break; /* critical error, will reinit rand state */
++
++ bytes_read += rv;
++ if (bytes_read == len)
++ return;
++ }
++ break;
++
++ case ARES_RAND_RC4:
++ ares_rc4_prng(&state->state.rc4, buf, len);
++ return;
++ }
++
++ /* If we didn't return before we got here, that means we had a critical rand
++ * failure and need to reinitialized */
++ ares__reinit_rand(state);
++ }
++}
++
++unsigned short ares__generate_new_id(ares_rand_state *state)
++{
++ unsigned short r=0;
++
++ ares__rand_bytes(state, (unsigned char *)&r, sizeof(r));
++ return r;
++}
++
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-32067.patch b/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-32067.patch
new file mode 100644
index 0000000000..63192d3c81
--- /dev/null
+++ b/meta-oe/recipes-support/c-ares/c-ares/CVE-2023-32067.patch
@@ -0,0 +1,84 @@
+From b9b8413cfdb70a3f99e1573333b23052d57ec1ae Mon Sep 17 00:00:00 2001
+From: Brad House <brad@brad-house.com>
+Date: Mon, 22 May 2023 06:51:49 -0400
+Subject: [PATCH] Merge pull request from GHSA-9g78-jv2r-p7vc
+
+Link: https://github.com/c-ares/c-ares/releases/tag/cares-1_19_1
+
+Upstream-Status: Backport [https://github.com/c-ares/c-ares/commit/b9b8413cfdb70a3f99e1573333b23052d57ec1ae]
+CVE: CVE-2023-32067
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/lib/ares_process.c | 41 +++++++++++++++++++++++++----------------
+ 1 file changed, 25 insertions(+), 16 deletions(-)
+
+diff --git a/src/lib/ares_process.c b/src/lib/ares_process.c
+index bf0cde464..6cac0a99f 100644
+--- a/src/lib/ares_process.c
++++ b/src/lib/ares_process.c
+@@ -470,7 +470,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
+ {
+ struct server_state *server;
+ int i;
+- ares_ssize_t count;
++ ares_ssize_t read_len;
+ unsigned char buf[MAXENDSSZ + 1];
+ #ifdef HAVE_RECVFROM
+ ares_socklen_t fromlen;
+@@ -513,32 +513,41 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
+ /* To reduce event loop overhead, read and process as many
+ * packets as we can. */
+ do {
+- if (server->udp_socket == ARES_SOCKET_BAD)
+- count = 0;
+-
+- else {
+- if (server->addr.family == AF_INET)
++ if (server->udp_socket == ARES_SOCKET_BAD) {
++ read_len = -1;
++ } else {
++ if (server->addr.family == AF_INET) {
+ fromlen = sizeof(from.sa4);
+- else
++ } else {
+ fromlen = sizeof(from.sa6);
+- count = socket_recvfrom(channel, server->udp_socket, (void *)buf,
+- sizeof(buf), 0, &from.sa, &fromlen);
++ }
++ read_len = socket_recvfrom(channel, server->udp_socket, (void *)buf,
++ sizeof(buf), 0, &from.sa, &fromlen);
+ }
+
+- if (count == -1 && try_again(SOCKERRNO))
++ if (read_len == 0) {
++ /* UDP is connectionless, so result code of 0 is a 0-length UDP
++ * packet, and not an indication the connection is closed like on
++ * tcp */
+ continue;
+- else if (count <= 0)
++ } else if (read_len < 0) {
++ if (try_again(SOCKERRNO))
++ continue;
++
+ handle_error(channel, i, now);
++
+ #ifdef HAVE_RECVFROM
+- else if (!same_address(&from.sa, &server->addr))
++ } else if (!same_address(&from.sa, &server->addr)) {
+ /* The address the response comes from does not match the address we
+ * sent the request to. Someone may be attempting to perform a cache
+ * poisoning attack. */
+- break;
++ continue;
+ #endif
+- else
+- process_answer(channel, buf, (int)count, i, 0, now);
+- } while (count > 0);
++
++ } else {
++ process_answer(channel, buf, (int)read_len, i, 0, now);
++ }
++ } while (read_len >= 0);
+ }
+ }
+
diff --git a/meta-oe/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch b/meta-oe/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
deleted file mode 100644
index 0eb7e4bbb3..0000000000
--- a/meta-oe/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 12414304245cce6ef0e8b9547949be5109845353 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Tue, 24 Jul 2018 13:33:33 +0800
-Subject: [PATCH] cmake: Install libcares.pc
-
-Prepare and install libcares.pc file during cmake build, so libraries
-using pkg-config to find libcares will not fail.
-
-Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
-
-update to 1.14.0, fix patch warning
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- CMakeLists.txt | 28 +++++++++++++++++++++++-----
- 1 file changed, 23 insertions(+), 5 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index fd123e1..3a5878d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -214,22 +214,25 @@ ADD_DEFINITIONS(${SYSFLAGS})
-
-
- # Tell C-Ares about libraries to depend on
-+# Also pass these libraries to pkg-config file
-+SET(CARES_PRIVATE_LIBS_LIST)
- IF (HAVE_LIBRESOLV)
-- LIST (APPEND CARES_DEPENDENT_LIBS resolv)
-+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lresolv")
- ENDIF ()
- IF (HAVE_LIBNSL)
-- LIST (APPEND CARES_DEPENDENT_LIBS nsl)
-+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lnsl")
- ENDIF ()
- IF (HAVE_LIBSOCKET)
-- LIST (APPEND CARES_DEPENDENT_LIBS socket)
-+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lsocket")
- ENDIF ()
- IF (HAVE_LIBRT)
-- LIST (APPEND CARES_DEPENDENT_LIBS rt)
-+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lrt")
- ENDIF ()
- IF (WIN32)
-- LIST (APPEND CARES_DEPENDENT_LIBS ws2_32 Advapi32)
-+ LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lws2_32")
- ENDIF ()
-
-+string (REPLACE ";" " " CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS_LIST}")
-
- # When checking for symbols, we need to make sure we set the proper
- # headers, libraries, and definitions for the detection to work properly
-@@ -554,6 +557,15 @@ CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h)
- # Write ares_config.h configuration file. This is used only for the build.
- CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h)
-
-+# Pass required CFLAGS to pkg-config in case of static library
-+IF (CARES_STATIC)
-+ SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB")
-+ENDIF()
-+
-+# Write ares_config.h configuration file. This is used only for the build.
-+CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY)
-+
-+
-
- # TRANSFORM_MAKEFILE_INC
- #
-@@ -728,6 +740,12 @@ IF (CARES_INSTALL)
- INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" COMPONENT Devel DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
- ENDIF ()
-
-+# pkg-config file
-+IF (CARES_INSTALL)
-+ SET (PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
-+ INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR})
-+ENDIF ()
-+
- # Legacy chain-building variables (provided for compatibility with old code).
- # Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares).
- SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND")
---
-2.17.1
-
diff --git a/meta-oe/recipes-support/c-ares/c-ares_1.16.1.bb b/meta-oe/recipes-support/c-ares/c-ares_1.16.1.bb
deleted file mode 100644
index 67dd701807..0000000000
--- a/meta-oe/recipes-support/c-ares/c-ares_1.16.1.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (c) 2012-2014 LG Electronics, Inc.
-SUMMARY = "c-ares is a C library that resolves names asynchronously."
-HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=fb997454c8d62aa6a47f07a8cd48b006"
-
-PV = "1.16.0+gitr${SRCPV}"
-
-SRC_URI = "\
- git://github.com/c-ares/c-ares.git \
- file://cmake-install-libcares.pc.patch \
- file://0001-fix-configure-error-mv-libcares.pc.cmakein-to-libcar.patch \
-"
-SRCREV = "74a1426ba60e2cd7977e53a22ef839c87415066e"
-
-UPSTREAM_CHECK_GITTAGREGEX = "cares-(?P<pver>\d+_(\d_?)+)"
-
-S = "${WORKDIR}/git"
-
-inherit cmake pkgconfig
-
-PACKAGES =+ "${PN}-utils"
-
-FILES_${PN}-utils = "${bindir}"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-support/c-ares/c-ares_1.18.1.bb b/meta-oe/recipes-support/c-ares/c-ares_1.18.1.bb
new file mode 100644
index 0000000000..2aa7897608
--- /dev/null
+++ b/meta-oe/recipes-support/c-ares/c-ares_1.18.1.bb
@@ -0,0 +1,30 @@
+# Copyright (c) 2012-2014 LG Electronics, Inc.
+SUMMARY = "c-ares is a C library that resolves names asynchronously."
+HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=fb997454c8d62aa6a47f07a8cd48b006"
+
+SRC_URI = "git://github.com/c-ares/c-ares.git;branch=main;protocol=https \
+ file://CVE-2022-4904.patch \
+ file://CVE-2023-31130.patch \
+ file://CVE-2023-31147.patch \
+ file://CVE-2023-32067.patch \
+ "
+SRCREV = "2aa086f822aad5017a6f2061ef656f237a62d0ed"
+
+UPSTREAM_CHECK_GITTAGREGEX = "cares-(?P<pver>\d+_(\d_?)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+PACKAGES =+ "${PN}-utils"
+
+FILES_${PN}-utils = "${bindir}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# this vulneribility applies only when cross-compiling using autotools
+# yocto cross-compiles via cmake which is also listed as official workaround
+CVE_CHECK_WHITELIST += "CVE-2023-31124"
diff --git a/meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.0.bb b/meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.0.bb
index 105610be5a..e0e50366d4 100644
--- a/meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.0.bb
+++ b/meta-oe/recipes-support/ceres-solver/ceres-solver_1.14.0.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=35e00f0c4c96a0820a03e0b31e6416be"
DEPENDS = "libeigen glog"
-SRC_URI = "git://github.com/ceres-solver/ceres-solver.git"
+SRC_URI = "git://github.com/ceres-solver/ceres-solver.git;branch=master;protocol=https"
SRCREV = "facb199f3eda902360f9e1d5271372b7e54febe1"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/cli11/cli11_1.8.0.bb b/meta-oe/recipes-support/cli11/cli11_1.8.0.bb
index dd129cbec9..a49eab72fd 100644
--- a/meta-oe/recipes-support/cli11/cli11_1.8.0.bb
+++ b/meta-oe/recipes-support/cli11/cli11_1.8.0.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b73927b18d5c6cd8d2ed28a6ad539733"
SRCREV = "13becaddb657eacd090537719a669d66d393b8b2"
PV .= "+git${SRCPV}"
-SRC_URI += "gitsm://github.com/CLIUtils/CLI11 \
+SRC_URI += "gitsm://github.com/CLIUtils/CLI11;branch=main;protocol=https \
file://0001-Add-CLANG_TIDY-check.patch \
file://0001-Use-GNUInstallDirs-instead-of-hard-coded-path.patch \
"
diff --git a/meta-oe/recipes-support/cmark/cmark_git.bb b/meta-oe/recipes-support/cmark/cmark_git.bb
index f74a39b500..4f07beb317 100644
--- a/meta-oe/recipes-support/cmark/cmark_git.bb
+++ b/meta-oe/recipes-support/cmark/cmark_git.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/commonmark/cmark"
LICENSE = "BSD-2-Clause & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=81f9cae6293cc0345a9144b78152ab62"
-SRC_URI = "git://github.com/commonmark/cmark.git"
+SRC_URI = "git://github.com/commonmark/cmark.git;branch=master;protocol=https"
SRCREV = "8daa6b1495124f0b67e6034130e12d7be83e38bd"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/daemonize/daemonize_git.bb b/meta-oe/recipes-support/daemonize/daemonize_git.bb
index c76632781a..f46dec59fc 100644
--- a/meta-oe/recipes-support/daemonize/daemonize_git.bb
+++ b/meta-oe/recipes-support/daemonize/daemonize_git.bb
@@ -7,7 +7,7 @@ PV = "1.7.8"
inherit autotools
SRCREV = "18869a797dab12bf1c917ba3b4782fef484c407c"
-SRC_URI = "git://github.com/bmc/daemonize.git \
+SRC_URI = "git://github.com/bmc/daemonize.git;branch=master;protocol=https \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/digitemp/digitemp_3.7.2.bb b/meta-oe/recipes-support/digitemp/digitemp_3.7.2.bb
index 9fcc278d35..cac2b4fd61 100644
--- a/meta-oe/recipes-support/digitemp/digitemp_3.7.2.bb
+++ b/meta-oe/recipes-support/digitemp/digitemp_3.7.2.bb
@@ -4,7 +4,7 @@ DEPENDS = "libusb1"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
-SRC_URI = "git://github.com/bcl/digitemp"
+SRC_URI = "git://github.com/bcl/digitemp;branch=master;protocol=https"
SRCREV = "a162e63aad35358aab325388f3d5e88121606419"
diff --git a/meta-oe/recipes-support/dstat/dstat_0.7.4.bb b/meta-oe/recipes-support/dstat/dstat_0.7.4.bb
index 74af54ca53..18c3cdf82c 100644
--- a/meta-oe/recipes-support/dstat/dstat_0.7.4.bb
+++ b/meta-oe/recipes-support/dstat/dstat_0.7.4.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS += "asciidoc-native xmlto-native"
-SRC_URI = "git://github.com/dagwieers/dstat.git \
+SRC_URI = "git://github.com/dagwieers/dstat.git;branch=master;protocol=https \
file://0001-change-dstat-to-python3.patch \
"
@@ -21,4 +21,4 @@ do_install() {
oe_runmake 'DESTDIR=${D}' install
}
-RDEPENDS_${PN} += "python3-core python3-misc python3-resource python3-shell python3-unixadmin"
+RDEPENDS_${PN} += "python3-core python3-misc python3-resource python3-shell python3-six python3-unixadmin"
diff --git a/meta-oe/recipes-support/epeg/epeg_git.bb b/meta-oe/recipes-support/epeg/epeg_git.bb
index 8ca574014b..bdffe4ba78 100644
--- a/meta-oe/recipes-support/epeg/epeg_git.bb
+++ b/meta-oe/recipes-support/epeg/epeg_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e7732a9290ea1e4b034fdc15cf49968d \
file://COPYING-PLAIN;md5=f59cacc08235a546b0c34a5422133035"
DEPENDS = "jpeg libexif"
-SRC_URI = "git://github.com/mattes/epeg.git"
+SRC_URI = "git://github.com/mattes/epeg.git;branch=master;protocol=https"
SRCREV = "9a175cd67eaa61fe45413d8da82da72936567047"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/fmt/fmt_6.2.0.bb b/meta-oe/recipes-support/fmt/fmt_6.2.0.bb
index 05dc94a990..1a05f0d547 100644
--- a/meta-oe/recipes-support/fmt/fmt_6.2.0.bb
+++ b/meta-oe/recipes-support/fmt/fmt_6.2.0.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://fmt.dev"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=af88d758f75f3c5c48a967501f24384b"
-SRC_URI += "git://github.com/fmtlib/fmt"
+SRC_URI += "git://github.com/fmtlib/fmt;branch=master;protocol=https"
SRCREV = "9bdd1596cef1b57b9556f8bef32dc4a32322ef3e"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/freerdp/freerdp_git.bb b/meta-oe/recipes-support/freerdp/freerdp_git.bb
index 82ef561fbe..309acfbffc 100644
--- a/meta-oe/recipes-support/freerdp/freerdp_git.bb
+++ b/meta-oe/recipes-support/freerdp/freerdp_git.bb
@@ -16,7 +16,7 @@ PKGV = "${GITPKGVTAG}"
# 2.0.0 release
SRCREV = "5ab2bed8749747b8e4b2ed431fd102bc726be684"
-SRC_URI = "git://github.com/FreeRDP/FreeRDP.git \
+SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=master;protocol=https \
file://winpr-makecert-Build-with-install-RPATH.patch \
"
diff --git a/meta-oe/recipes-support/function2/function2_4.0.0.bb b/meta-oe/recipes-support/function2/function2_4.0.0.bb
index 556a25aa14..07aa669375 100644
--- a/meta-oe/recipes-support/function2/function2_4.0.0.bb
+++ b/meta-oe/recipes-support/function2/function2_4.0.0.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
SRCREV = "d2acdb6c3c7612a6133cd03464ef941161258f4e"
PV .= "+git${SRCPV}"
-SRC_URI += "gitsm://github.com/Naios/function2"
+SRC_URI += "gitsm://github.com/Naios/function2;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/gd/gd_2.3.0.bb b/meta-oe/recipes-support/gd/gd_2.3.0.bb
index eec8a05ae8..8adb7db4d1 100644
--- a/meta-oe/recipes-support/gd/gd_2.3.0.bb
+++ b/meta-oe/recipes-support/gd/gd_2.3.0.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8e5bc8627b9494741c905d65238c66b7"
DEPENDS = "freetype libpng jpeg zlib tiff"
-SRC_URI = "git://github.com/libgd/libgd.git;branch=master \
+SRC_URI = "git://github.com/libgd/libgd.git;branch=master;protocol=https \
"
SRCREV = "b079fa06223c3ab862c8f0eea58a968727971988"
diff --git a/meta-oe/recipes-support/gflags/gflags_2.2.2.bb b/meta-oe/recipes-support/gflags/gflags_2.2.2.bb
index 6eea0c00ec..4379c2d9e1 100644
--- a/meta-oe/recipes-support/gflags/gflags_2.2.2.bb
+++ b/meta-oe/recipes-support/gflags/gflags_2.2.2.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/gflags/gflags"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING.txt;md5=c80d1a3b623f72bb85a4c75b556551df"
-SRC_URI = "git://github.com/gflags/gflags.git"
+SRC_URI = "git://github.com/gflags/gflags.git;branch=master;protocol=https"
SRCREV = "e171aa2d15ed9eb17054558e0b3a6a413bb01067"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/glog/glog_0.3.5.bb b/meta-oe/recipes-support/glog/glog_0.3.5.bb
index 56bf515544..55ca838cd7 100644
--- a/meta-oe/recipes-support/glog/glog_0.3.5.bb
+++ b/meta-oe/recipes-support/glog/glog_0.3.5.bb
@@ -7,7 +7,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=dc9db360e0bbd4e46672f3fd91dd6c4b"
SRC_URI = " \
- git://github.com/google/glog.git;nobranch=1 \
+ git://github.com/google/glog.git;nobranch=1;protocol=https \
file://0001-Rework-CMake-glog-VERSION-management.patch \
file://0002-Find-Libunwind-during-configure.patch \
file://0003-installation-path-fix.patch \
diff --git a/meta-oe/recipes-support/gnulib/gnulib_2018-03-07.03.bb b/meta-oe/recipes-support/gnulib/gnulib_2018-12-18.bb
index 146747eee1..ac46b5676c 100644
--- a/meta-oe/recipes-support/gnulib/gnulib_2018-03-07.03.bb
+++ b/meta-oe/recipes-support/gnulib/gnulib_2018-12-18.bb
@@ -13,7 +13,7 @@ LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=56a22a6e5bcce45e2c8ac184f81412b5"
SRCREV = "0d6e3307bbdb8df4d56043d5f373eeeffe4cbef3"
-SRC_URI = "git://git.sv.gnu.org/gnulib.git \
+SRC_URI = "git://git.sv.gnu.org/gnulib.git;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb b/meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb
index b7b7839313..1a1f7db5cf 100644
--- a/meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb
+++ b/meta-oe/recipes-support/gperftools/gperftools_2.7.90.bb
@@ -4,7 +4,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a"
SRCREV = "db7aa547abb5abdd558587a15502584cbc825438"
-SRC_URI = "git://github.com/gperftools/gperftools \
+SRC_URI = "git://github.com/gperftools/gperftools;branch=master;protocol=https \
file://0001-Support-Atomic-ops-on-clang.patch \
file://0001-fix-build-with-musl-libc.patch \
file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
diff --git a/meta-oe/recipes-support/gpm/gpm_git.bb b/meta-oe/recipes-support/gpm/gpm_git.bb
index 3800d147f9..6bf071d89e 100644
--- a/meta-oe/recipes-support/gpm/gpm_git.bb
+++ b/meta-oe/recipes-support/gpm/gpm_git.bb
@@ -13,7 +13,7 @@ SRCREV = "1fd19417b8a4dd9945347e98dfa97e4cfd798d77"
DEPENDS = "ncurses bison-native"
-SRC_URI = "git://github.com/telmich/gpm;protocol=git \
+SRC_URI = "git://github.com/telmich/gpm;protocol=https;branch=master \
file://init \
file://gpm.service.in \
file://0001-Use-sigemptyset-API-instead-of-__sigemptyset.patch \
diff --git a/meta-oe/recipes-support/hidapi/hidapi_git.bb b/meta-oe/recipes-support/hidapi/hidapi_git.bb
index a34797ff51..1cc3acac2c 100644
--- a/meta-oe/recipes-support/hidapi/hidapi_git.bb
+++ b/meta-oe/recipes-support/hidapi/hidapi_git.bb
@@ -8,7 +8,7 @@ DEPENDS = "libusb udev"
PV = "0.7.99+0.8.0-rc1+git${SRCPV}"
SRCREV = "d17db57b9d4354752e0af42f5f33007a42ef2906"
-SRC_URI = "git://github.com/signal11/hidapi.git"
+SRC_URI = "git://github.com/signal11/hidapi.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb b/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb
index 3da67d1e3a..2e902ca4cb 100644
--- a/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb
+++ b/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb
@@ -135,7 +135,7 @@ RDEPENDS_${PN} = "hunspell"
PV = "0.0.0+git${SRCPV}"
SRCREV = "820a65e539e34a3a8c2a855d2450b84745c624ee"
-SRC_URI = "git://github.com/wooorm/dictionaries.git"
+SRC_URI = "git://github.com/wooorm/dictionaries.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/hunspell/hunspell_1.7.0.bb b/meta-oe/recipes-support/hunspell/hunspell_1.7.0.bb
index c2fb4fa05b..63d68ea06b 100644
--- a/meta-oe/recipes-support/hunspell/hunspell_1.7.0.bb
+++ b/meta-oe/recipes-support/hunspell/hunspell_1.7.0.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = " \
"
SRCREV = "4ddd8ed5ca6484b930b111aec50c2750a6119a0f"
-SRC_URI = "git://github.com/${BPN}/${BPN}.git"
+SRC_URI = "git://github.com/${BPN}/${BPN}.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/hwdata/hwdata_git.bb b/meta-oe/recipes-support/hwdata/hwdata_git.bb
index 5f3e3f686a..1d0c640003 100644
--- a/meta-oe/recipes-support/hwdata/hwdata_git.bb
+++ b/meta-oe/recipes-support/hwdata/hwdata_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1556547711e8246992b999edd9445a57"
PV = "0.333"
SRCREV = "2de52be0d00015fa6cde70bb845fa9b86cf6f420"
-SRC_URI = "git://github.com/vcrhonek/${BPN}.git"
+SRC_URI = "git://github.com/vcrhonek/${BPN}.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/iksemel/iksemel_1.5.bb b/meta-oe/recipes-support/iksemel/iksemel_1.5.bb
index 986984d1ff..ac23630d01 100644
--- a/meta-oe/recipes-support/iksemel/iksemel_1.5.bb
+++ b/meta-oe/recipes-support/iksemel/iksemel_1.5.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
SRCREV = "978b733462e41efd5db72bc9974cb3b0d1d5f6fa"
PV = "1.5+git${SRCPV}"
-SRC_URI = "git://github.com/meduketto/iksemel.git;protocol=https \
+SRC_URI = "git://github.com/meduketto/iksemel.git;protocol=https;branch=master \
file://fix-configure-option-parsing.patch \
file://avoid-obsolete-gnutls-apis.patch"
diff --git a/meta-oe/recipes-support/imagemagick/imagemagick_7.0.9.bb b/meta-oe/recipes-support/imagemagick/imagemagick_7.0.9.bb
index 3f7d06e261..21f51ff155 100644
--- a/meta-oe/recipes-support/imagemagick/imagemagick_7.0.9.bb
+++ b/meta-oe/recipes-support/imagemagick/imagemagick_7.0.9.bb
@@ -10,7 +10,7 @@ DEPENDS = "lcms bzip2 jpeg libpng tiff zlib fftw freetype libtool"
BASE_PV := "${PV}"
PV .= "_13"
-SRC_URI = "git://github.com/ImageMagick/ImageMagick.git "
+SRC_URI = "git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=https"
SRCREV = "15b935d64f613b5a0fc9d3fead5c6ec1b0e3908f"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/inih/libinih_git.bb b/meta-oe/recipes-support/inih/libinih_git.bb
index 227e2a7b7c..4c3c8f0fa7 100644
--- a/meta-oe/recipes-support/inih/libinih_git.bb
+++ b/meta-oe/recipes-support/inih/libinih_git.bb
@@ -9,7 +9,7 @@ PR = "r3"
# The github repository provides a cmake and pkg-config integration
SRCREV = "c858aff8c31fa63ef4d1e0176c10e5928cde9a23"
-SRC_URI = "git://github.com/OSSystems/inih.git \
+SRC_URI = "git://github.com/OSSystems/inih.git;branch=master;protocol=https \
"
UPSTREAM_CHECK_COMMITS = "1"
diff --git a/meta-oe/recipes-support/iniparser/iniparser_4.1.bb b/meta-oe/recipes-support/iniparser/iniparser_4.1.bb
index f4b553a578..f3593fb5ff 100644
--- a/meta-oe/recipes-support/iniparser/iniparser_4.1.bb
+++ b/meta-oe/recipes-support/iniparser/iniparser_4.1.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e02baf71c76e0650e667d7da133379ac"
DEPENDS = "doxygen-native"
-SRC_URI = "git://github.com/ndevilla/iniparser.git;protocol=https \
+SRC_URI = "git://github.com/ndevilla/iniparser.git;protocol=https;branch=master \
file://Add-CMake-support.patch"
# tag 4.1
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools_git.bb b/meta-oe/recipes-support/inotify-tools/inotify-tools_git.bb
index f42abeb2ba..1d84bfd498 100644
--- a/meta-oe/recipes-support/inotify-tools/inotify-tools_git.bb
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools_git.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ac6c26e52aea428ee7f56dc2c56424c6"
SRCREV = "cfa93aa19f81d85b63cd64da30c7499890d4c07d"
PV = "3.20.2.2"
-SRC_URI = "git://github.com/rvoicilas/${BPN} \
+SRC_URI = "git://github.com/rvoicilas/${BPN};branch=master;protocol=https \
file://0001-Makefile.am-add-build-rule-for-README.patch \
"
diff --git a/meta-oe/recipes-support/lcov/lcov_1.14.bb b/meta-oe/recipes-support/lcov/lcov_1.14.bb
index 0cc8b31b3f..5e8fb938cf 100755
--- a/meta-oe/recipes-support/lcov/lcov_1.14.bb
+++ b/meta-oe/recipes-support/lcov/lcov_1.14.bb
@@ -59,7 +59,7 @@ SRC_URI[md5sum] = "0220d01753469f83921f8f41ae5054c1"
SRC_URI[sha256sum] = "14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a"
do_install() {
- oe_runmake install PREFIX=${D}${prefix} CFG_DIR=${D}${sysconfdir}
+ oe_runmake install PREFIX=${D}${prefix} CFG_DIR=${D}${sysconfdir} LCOV_PERL_PATH="/usr/bin/env perl"
}
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb b/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb
index 4cfb732932..d084a3b9b1 100644
--- a/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb
+++ b/meta-oe/recipes-support/libatasmart/libatasmart_0.19.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "udev"
SRCREV = "de6258940960443038b4c1651dfda3620075e870"
-SRC_URI = "git://git.0pointer.de/libatasmart.git \
+SRC_URI = "git://git.0pointer.de/libatasmart.git;branch=master \
file://0001-Makefile.am-add-CFLAGS-and-LDFLAGS-definiton.patch \
"
diff --git a/meta-oe/recipes-support/libb64/libb64/0001-example-Do-not-run-the-tests.patch b/meta-oe/recipes-support/libb64/libb64/0001-example-Do-not-run-the-tests.patch
new file mode 100644
index 0000000000..ea3ddfb64b
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0001-example-Do-not-run-the-tests.patch
@@ -0,0 +1,27 @@
+From 68f66d1583be670eb8d5f3f38dbd5dd1d63b733c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Mar 2021 21:41:04 -0700
+Subject: [PATCH] example: Do not run the tests
+
+Upstream-Status: Inappropritate [Cross-compile specific]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ examples/Makefile | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/examples/Makefile b/examples/Makefile
+index d9667a5..554b346 100644
+--- a/examples/Makefile
++++ b/examples/Makefile
+@@ -33,11 +33,8 @@ depend: $(SOURCES)
+ makedepend -f- $(CFLAGS) $(SOURCES) 2> /dev/null 1> depend
+
+ test-c-example1: c-example1
+- ./c-example1
+
+ test-c-example2: c-example2
+- ./c-example2 loremgibson.txt encoded.txt decoded.txt
+- diff -q loremgibson.txt decoded.txt
+
+ test: test-c-example1 test-c-example2
+
diff --git a/meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch b/meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch
new file mode 100644
index 0000000000..10ec8e14a8
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0002-use-BUFSIZ-as-buffer-size.patch
@@ -0,0 +1,57 @@
+From ee03e265804a07a0da5028b86960031bd7ab86b2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Mar 2021 22:01:13 -0700
+Subject: [PATCH] use BUFSIZ as buffer size
+
+Author: Jakub Wilk <jwilk@debian.org>
+Bug: http://sourceforge.net/tracker/?func=detail&atid=785907&aid=3591336&group_id=152942
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/b64/decode.h | 3 ++-
+ include/b64/encode.h | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/include/b64/decode.h b/include/b64/decode.h
+index 12b16ea..e9019f3 100644
+--- a/include/b64/decode.h
++++ b/include/b64/decode.h
+@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64
+ #ifndef BASE64_DECODE_H
+ #define BASE64_DECODE_H
+
++#include <cstdio>
+ #include <iostream>
+
+ namespace base64
+@@ -22,7 +23,7 @@ namespace base64
+ base64_decodestate _state;
+ int _buffersize;
+
+- decoder(int buffersize_in = BUFFERSIZE)
++ decoder(int buffersize_in = BUFSIZ)
+ : _buffersize(buffersize_in)
+ {}
+
+diff --git a/include/b64/encode.h b/include/b64/encode.h
+index 5d807d9..e7a7035 100644
+--- a/include/b64/encode.h
++++ b/include/b64/encode.h
+@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64
+ #ifndef BASE64_ENCODE_H
+ #define BASE64_ENCODE_H
+
++#include <cstdio>
+ #include <iostream>
+
+ namespace base64
+@@ -22,7 +23,7 @@ namespace base64
+ base64_encodestate _state;
+ int _buffersize;
+
+- encoder(int buffersize_in = BUFFERSIZE)
++ encoder(int buffersize_in = BUFSIZ)
+ : _buffersize(buffersize_in)
+ {}
+
diff --git a/meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch b/meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch
new file mode 100644
index 0000000000..8854bb6af4
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0003-fix-integer-overflows.patch
@@ -0,0 +1,77 @@
+From 7b30fbc3d47dfaf38d8ce8b8949a69d2984dac76 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Mar 2021 22:06:03 -0700
+Subject: [PATCH] fix integer overflows
+
+Author: Jakub Wilk <jwilk@debian.org>
+Bug: http://sourceforge.net/tracker/?func=detail&aid=3591129&group_id=152942&atid=785907
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/cdecode.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/src/cdecode.c b/src/cdecode.c
+index a6c0a42..4e47e9f 100644
+--- a/src/cdecode.c
++++ b/src/cdecode.c
+@@ -9,10 +9,11 @@ For details, see http://sourceforge.net/projects/libb64
+
+ int base64_decode_value(char value_in)
+ {
+- static const char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
++ static const signed char decoding[] = {62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-2,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51};
+ static const char decoding_size = sizeof(decoding);
++ if (value_in < 43) return -1;
+ value_in -= 43;
+- if (value_in < 0 || value_in >= decoding_size) return -1;
++ if (value_in > decoding_size) return -1;
+ return decoding[(int)value_in];
+ }
+
+@@ -26,7 +27,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
+ {
+ const char* codechar = code_in;
+ char* plainchar = plaintext_out;
+- char fragment;
++ int fragment;
+
+ *plainchar = state_in->plainchar;
+
+@@ -42,7 +43,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
+ state_in->plainchar = *plainchar;
+ return plainchar - plaintext_out;
+ }
+- fragment = (char)base64_decode_value(*codechar++);
++ fragment = base64_decode_value(*codechar++);
+ } while (fragment < 0);
+ *plainchar = (fragment & 0x03f) << 2;
+ case step_b:
+@@ -53,7 +54,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
+ state_in->plainchar = *plainchar;
+ return plainchar - plaintext_out;
+ }
+- fragment = (char)base64_decode_value(*codechar++);
++ fragment = base64_decode_value(*codechar++);
+ } while (fragment < 0);
+ *plainchar++ |= (fragment & 0x030) >> 4;
+ *plainchar = (fragment & 0x00f) << 4;
+@@ -65,7 +66,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
+ state_in->plainchar = *plainchar;
+ return plainchar - plaintext_out;
+ }
+- fragment = (char)base64_decode_value(*codechar++);
++ fragment = base64_decode_value(*codechar++);
+ } while (fragment < 0);
+ *plainchar++ |= (fragment & 0x03c) >> 2;
+ *plainchar = (fragment & 0x003) << 6;
+@@ -77,7 +78,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
+ state_in->plainchar = *plainchar;
+ return plainchar - plaintext_out;
+ }
+- fragment = (char)base64_decode_value(*codechar++);
++ fragment = base64_decode_value(*codechar++);
+ } while (fragment < 0);
+ *plainchar++ |= (fragment & 0x03f);
+ }
diff --git a/meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch b/meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch
new file mode 100644
index 0000000000..e19dbad08d
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0004-Fix-off-by-one-error.patch
@@ -0,0 +1,26 @@
+From 8144fd9e02bd5ccd1e080297b19a1e9eb4d3ff96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Mar 2021 22:07:15 -0700
+Subject: [PATCH] Fix off by one error
+
+Launchpad bug #1501176 reported by William McCall on 2015-09-30
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/cdecode.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cdecode.c b/src/cdecode.c
+index 4e47e9f..45da4e1 100644
+--- a/src/cdecode.c
++++ b/src/cdecode.c
+@@ -13,7 +13,7 @@ int base64_decode_value(char value_in)
+ static const char decoding_size = sizeof(decoding);
+ if (value_in < 43) return -1;
+ value_in -= 43;
+- if (value_in > decoding_size) return -1;
++ if (value_in >= decoding_size) return -1;
+ return decoding[(int)value_in];
+ }
+
diff --git a/meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch b/meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch
new file mode 100644
index 0000000000..e93015ee48
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0005-make-overriding-CFLAGS-possible.patch
@@ -0,0 +1,40 @@
+From a7914d5ffee6ffdfb3f2b8ebcc22c8367d078301 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Mar 2021 22:08:43 -0700
+Subject: [PATCH] make overriding CFLAGS possible
+
+Author: Jakub Wilk <jwilk@debian.org>
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ base64/Makefile | 2 +-
+ src/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/base64/Makefile b/base64/Makefile
+index 30a2c5c..783a248 100644
+--- a/base64/Makefile
++++ b/base64/Makefile
+@@ -3,7 +3,7 @@ BINARIES = base64
+ # Build flags (uncomment one)
+ #############################
+ # Release build flags
+-CFLAGS += -O3
++CFLAGS ?= -O3
+ #############################
+ # Debug build flags
+ #CFLAGS += -g
+diff --git a/src/Makefile b/src/Makefile
+index 28b2382..48801fc 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -3,7 +3,7 @@ LIBRARIES = libb64.a
+ # Build flags (uncomment one)
+ #############################
+ # Release build flags
+-CFLAGS += -O3
++CFLAGS ?= -O3
+ #############################
+ # Debug build flags
+ #CFLAGS += -g
diff --git a/meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch b/meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch
new file mode 100644
index 0000000000..9ba08c87ee
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0006-do-not-export-the-CHARS_PER_LINE-variable.patch
@@ -0,0 +1,27 @@
+From a1b9bb4af819ed389675f16e4a521efeda4cc3f3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Mar 2021 22:10:48 -0700
+Subject: [PATCH] do not export the CHARS_PER_LINE variable
+
+The library exports a variable named "CHARS_PER_LINE". This is a generic name that could conflict with a name in user's code.
+Please either rename the variable or make it static.
+
+Upstream-Status: Submitted [http://sourceforge.net/tracker/?func=detail&aid=3591420&group_id=152942&atid=785907]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/cencode.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cencode.c b/src/cencode.c
+index 03ba5b6..3df62a8 100644
+--- a/src/cencode.c
++++ b/src/cencode.c
+@@ -7,7 +7,7 @@ For details, see http://sourceforge.net/projects/libb64
+
+ #include <b64/cencode.h>
+
+-const int CHARS_PER_LINE = 72;
++static const int CHARS_PER_LINE = 72;
+
+ void base64_init_encodestate(base64_encodestate* state_in)
+ {
diff --git a/meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch b/meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch
new file mode 100644
index 0000000000..fdf8339bed
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64/0007-initialize-encoder-decoder-state-in-the-constructors.patch
@@ -0,0 +1,44 @@
+From c1ba44d83cc7d9d756cfb063717852eae9d03328 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 27 Mar 2021 22:12:41 -0700
+Subject: [PATCH] initialize encoder/decoder state in the constructors
+
+Author: Jakub Wilk <jwilk@debian.org>
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/b64/decode.h | 4 +++-
+ include/b64/encode.h | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/include/b64/decode.h b/include/b64/decode.h
+index e9019f3..aefb7bc 100644
+--- a/include/b64/decode.h
++++ b/include/b64/decode.h
+@@ -25,7 +25,9 @@ namespace base64
+
+ decoder(int buffersize_in = BUFSIZ)
+ : _buffersize(buffersize_in)
+- {}
++ {
++ base64_init_decodestate(&_state);
++ }
+
+ int decode(char value_in)
+ {
+diff --git a/include/b64/encode.h b/include/b64/encode.h
+index e7a7035..33848b3 100644
+--- a/include/b64/encode.h
++++ b/include/b64/encode.h
+@@ -25,7 +25,9 @@ namespace base64
+
+ encoder(int buffersize_in = BUFSIZ)
+ : _buffersize(buffersize_in)
+- {}
++ {
++ base64_init_encodestate(&_state);
++ }
+
+ int encode(char value_in)
+ {
diff --git a/meta-oe/recipes-support/libb64/libb64_1.2.1.bb b/meta-oe/recipes-support/libb64/libb64_1.2.1.bb
new file mode 100644
index 0000000000..64a34fece7
--- /dev/null
+++ b/meta-oe/recipes-support/libb64/libb64_1.2.1.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Base64 Encoding/Decoding Routines"
+DESCRIPTION = "base64 encoding/decoding library - runtime library \
+libb64 is a library of ANSI C routines for fast encoding/decoding data into \
+and from a base64-encoded format"
+HOMEPAGE = "http://libb64.sourceforge.net/"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ce551aad762074c7ab618a0e07a8dca3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}/${BP}.zip \
+ file://0001-example-Do-not-run-the-tests.patch \
+ file://0002-use-BUFSIZ-as-buffer-size.patch \
+ file://0003-fix-integer-overflows.patch \
+ file://0004-Fix-off-by-one-error.patch \
+ file://0005-make-overriding-CFLAGS-possible.patch \
+ file://0006-do-not-export-the-CHARS_PER_LINE-variable.patch \
+ file://0007-initialize-encoder-decoder-state-in-the-constructors.patch \
+ "
+SRC_URI[sha256sum] = "20106f0ba95cfd9c35a13c71206643e3fb3e46512df3e2efb2fdbf87116314b2"
+
+PARALLEL_MAKE = ""
+
+CFLAGS += "-fPIC"
+
+do_configure () {
+ :
+}
+
+do_compile () {
+ oe_runmake
+ ${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,${BPN}.so.0 src/*.o -o src/${BPN}.so.0
+}
+
+do_install () {
+ install -d ${D}${includedir}/b64
+ install -Dm 0644 ${B}/src/libb64.a ${D}${libdir}/libb64.a
+ install -Dm 0644 ${B}/src/libb64.so.0 ${D}${libdir}/libb64.so.0
+ ln -s libb64.so.0 ${D}${libdir}/libb64.so
+ install -Dm 0644 ${S}/include/b64/*.h ${D}${includedir}/b64/
+}
diff --git a/meta-oe/recipes-support/libbytesize/libbytesize_2.2.bb b/meta-oe/recipes-support/libbytesize/libbytesize_2.2.bb
index a954499c69..527de93e40 100644
--- a/meta-oe/recipes-support/libbytesize/libbytesize_2.2.bb
+++ b/meta-oe/recipes-support/libbytesize/libbytesize_2.2.bb
@@ -10,7 +10,7 @@ S = "${WORKDIR}/git"
B = "${S}"
SRCREV = "e64e752a28a4a41b0a43cba3bedf9571c22af807"
-SRC_URI = "git://github.com/rhinstaller/libbytesize;branch=master"
+SRC_URI = "git://github.com/rhinstaller/libbytesize;branch=master;protocol=https"
inherit gettext autotools python3native
diff --git a/meta-oe/recipes-support/libcereal/libcereal_1.3.0.bb b/meta-oe/recipes-support/libcereal/libcereal_1.3.0.bb
index 6fc5881c59..ac6aedfd50 100644
--- a/meta-oe/recipes-support/libcereal/libcereal_1.3.0.bb
+++ b/meta-oe/recipes-support/libcereal/libcereal_1.3.0.bb
@@ -7,7 +7,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e612690af2f575dfd02e2e91443cea23"
SRCREV = "02eace19a99ce3cd564ca4e379753d69af08c2c8"
-SRC_URI = "git://github.com/USCiLab/cereal.git"
+SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libcyusbserial/libcyusbserial_git.bb b/meta-oe/recipes-support/libcyusbserial/libcyusbserial_git.bb
index 74b5e21e23..c6878577ef 100644
--- a/meta-oe/recipes-support/libcyusbserial/libcyusbserial_git.bb
+++ b/meta-oe/recipes-support/libcyusbserial/libcyusbserial_git.bb
@@ -8,7 +8,7 @@ DEPENDS = "libusb udev"
PV = "1.0.0+git${SRCPV}"
SRCREV = "655e2d544183d094f0e2d119c7e0c6206a0ddb3f"
-SRC_URI = "git://github.com/cyrozap/${BPN}.git"
+SRC_URI = "git://github.com/cyrozap/${BPN}.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libfann/libfann_git.bb b/meta-oe/recipes-support/libfann/libfann_git.bb
index eae24461dc..5ab484d8a5 100644
--- a/meta-oe/recipes-support/libfann/libfann_git.bb
+++ b/meta-oe/recipes-support/libfann/libfann_git.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f14599a2f089f6ff8c97e2baa4e3d575"
inherit cmake
SRCREV ?= "7ec1fc7e5bd734f1d3c89b095e630e83c86b9be1"
-SRC_URI = "git://github.com/libfann/fann.git;branch=master \
+SRC_URI = "git://github.com/libfann/fann.git;branch=master;protocol=https \
"
PV = "2.2.0+git${SRCPV}"
diff --git a/meta-oe/recipes-support/libgit2/libgit2_0.28.4.bb b/meta-oe/recipes-support/libgit2/libgit2_0.28.4.bb
index 9b9c191049..c971491b1c 100644
--- a/meta-oe/recipes-support/libgit2/libgit2_0.28.4.bb
+++ b/meta-oe/recipes-support/libgit2/libgit2_0.28.4.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3f2cd5d3cccd71d62066ba619614592b"
DEPENDS = "curl openssl zlib libssh2 libgcrypt"
-SRC_URI = "git://github.com/libgit2/libgit2.git;branch=maint/v0.28"
+SRC_URI = "git://github.com/libgit2/libgit2.git;branch=maint/v0.28;protocol=https"
SRCREV = "106a5f27586504ea371528191f0ea3aac2ad432b"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libgusb/libgusb_git.bb b/meta-oe/recipes-support/libgusb/libgusb_git.bb
index e3c0bdd15e..a26c234652 100644
--- a/meta-oe/recipes-support/libgusb/libgusb_git.bb
+++ b/meta-oe/recipes-support/libgusb/libgusb_git.bb
@@ -6,7 +6,7 @@ DEPENDS = "glib-2.0 libusb"
inherit meson gobject-introspection gtk-doc gettext vala
-SRC_URI = "git://github.com/hughsie/libgusb.git"
+SRC_URI = "git://github.com/hughsie/libgusb.git;branch=master;protocol=https"
SRCREV = "636efc0624aa2a88174220fcabc9764c13d7febf"
PV = "0.3.0+git${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libharu/libharu_2.3.0.bb b/meta-oe/recipes-support/libharu/libharu_2.3.0.bb
index 2d1a37c421..86b5ba540f 100644
--- a/meta-oe/recipes-support/libharu/libharu_2.3.0.bb
+++ b/meta-oe/recipes-support/libharu/libharu_2.3.0.bb
@@ -6,7 +6,7 @@ DESCRIPTION = "libHaru is a library for generating PDF files. \
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://README;md5=3ee6bc1f64d9cc7907f44840c8e50cb1"
-SRC_URI = "git://github.com/libharu/libharu.git;branch=2_3 \
+SRC_URI = "git://github.com/libharu/libharu.git;branch=2_3;protocol=https \
file://libharu-RELEASE_2_3_0_cmake.patch \
"
diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
index f83d9c9225..8fbe474485 100644
--- a/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
SRCREV = "5f5af2e417129ad8f4e05fc5c1b730f0694dca12"
PV = "0.19+git${SRCPV}"
-SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
+SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https;branch=main"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd/CVE-2021-3466.patch b/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd/CVE-2021-3466.patch
new file mode 100644
index 0000000000..ff792d4daa
--- /dev/null
+++ b/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd/CVE-2021-3466.patch
@@ -0,0 +1,158 @@
+From 86d9a61be6395220714b1a50d5144e65668961f6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ernst=20Sj=C3=B6strand?= <ernst.sjostrand@verisure.com>
+Date: Tue, 21 Dec 2021 11:05:22 +0000
+Subject: [PATCH] Fix buffer overflow in url parser and add test
+
+Reference:
+https://git.gnunet.org/libmicrohttpd.git/commit/?id=a110ae6276660bee3caab30e9ff3f12f85cf3241
+
+Upstream-Status: Backport
+CVE: CVE-2021-3466
+
+Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
+---
+ src/microhttpd/postprocessor.c | 18 ++++++--
+ src/microhttpd/test_postprocessor.c | 66 +++++++++++++++++++++++++++++
+ 2 files changed, 80 insertions(+), 4 deletions(-)
+
+diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
+index b7f6b10..ebd1686 100644
+--- a/src/microhttpd/postprocessor.c
++++ b/src/microhttpd/postprocessor.c
+@@ -137,8 +137,7 @@ struct MHD_PostProcessor
+ void *cls;
+
+ /**
+- * Encoding as given by the headers of the
+- * connection.
++ * Encoding as given by the headers of the connection.
+ */
+ const char *encoding;
+
+@@ -586,7 +585,7 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
+ pp->state = PP_Error;
+ break;
+ case PP_Callback:
+- if ( (pp->buffer_pos + (end_key - start_key) >
++ if ( (pp->buffer_pos + (end_key - start_key) >=
+ pp->buffer_size) ||
+ (pp->buffer_pos + (end_key - start_key) <
+ pp->buffer_pos) )
+@@ -636,6 +635,11 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
+ {
+ if (NULL == end_key)
+ end_key = &post_data[poff];
++ if (pp->buffer_pos + (end_key - start_key) >= pp->buffer_size)
++ {
++ pp->state = PP_Error;
++ return MHD_NO;
++ }
+ memcpy (&kbuf[pp->buffer_pos],
+ start_key,
+ end_key - start_key);
+@@ -663,6 +667,11 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
+ last_escape);
+ pp->must_ikvi = false;
+ }
++ if (PP_Error == pp->state)
++ {
++ /* State in error, returning failure */
++ return MHD_NO;
++ }
+ return MHD_YES;
+ }
+
+@@ -1424,7 +1433,8 @@ MHD_destroy_post_processor (struct MHD_PostProcessor *pp)
+ the post-processing may have been interrupted
+ at any stage */
+ if ( (pp->xbuf_pos > 0) ||
+- (pp->state != PP_Done) )
++ ( (pp->state != PP_Done) &&
++ (pp->state != PP_Init) ) )
+ ret = MHD_NO;
+ else
+ ret = MHD_YES;
+diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c
+index 2c37565..cba486d 100644
+--- a/src/microhttpd/test_postprocessor.c
++++ b/src/microhttpd/test_postprocessor.c
+@@ -451,6 +451,71 @@ test_empty_value (void)
+ }
+
+
++static enum MHD_Result
++value_checker2 (void *cls,
++ enum MHD_ValueKind kind,
++ const char *key,
++ const char *filename,
++ const char *content_type,
++ const char *transfer_encoding,
++ const char *data,
++ uint64_t off,
++ size_t size)
++{
++ return MHD_YES;
++}
++
++
++static int
++test_overflow ()
++{
++ struct MHD_Connection connection;
++ struct MHD_HTTP_Header header;
++ struct MHD_PostProcessor *pp;
++ size_t i;
++ size_t j;
++ size_t delta;
++ char *buf;
++
++ memset (&connection, 0, sizeof (struct MHD_Connection));
++ memset (&header, 0, sizeof (struct MHD_HTTP_Header));
++ connection.headers_received = &header;
++ header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
++ header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
++ header.header_size = strlen (header.header);
++ header.value_size = strlen (header.value);
++ header.kind = MHD_HEADER_KIND;
++ for (i = 128; i < 1024 * 1024; i += 1024)
++ {
++ pp = MHD_create_post_processor (&connection,
++ 1024,
++ &value_checker2,
++ NULL);
++ buf = malloc (i);
++ if (NULL == buf)
++ return 1;
++ memset (buf, 'A', i);
++ buf[i / 2] = '=';
++ delta = 1 + (MHD_random_ () % (i - 1));
++ j = 0;
++ while (j < i)
++ {
++ if (j + delta > i)
++ delta = i - j;
++ if (MHD_NO ==
++ MHD_post_process (pp,
++ &buf[j],
++ delta))
++ break;
++ j += delta;
++ }
++ free (buf);
++ MHD_destroy_post_processor (pp);
++ }
++ return 0;
++}
++
++
+ int
+ main (int argc, char *const *argv)
+ {
+@@ -463,6 +528,7 @@ main (int argc, char *const *argv)
+ errorCount += test_multipart ();
+ errorCount += test_nested_multipart ();
+ errorCount += test_empty_value ();
++ errorCount += test_overflow ();
+ if (errorCount != 0)
+ fprintf (stderr, "Error (code: %u)\n", errorCount);
+ return errorCount != 0; /* 0 == pass */
diff --git a/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.70.bb b/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.70.bb
index 94976d2e98..9d5e85e1ad 100644
--- a/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.70.bb
+++ b/meta-oe/recipes-support/libmicrohttpd/libmicrohttpd_0.9.70.bb
@@ -7,7 +7,8 @@ SECTION = "net"
DEPENDS = "file"
SRC_URI = "${GNU_MIRROR}/libmicrohttpd/${BPN}-${PV}.tar.gz \
-"
+ file://CVE-2021-3466.patch \
+ "
SRC_URI[md5sum] = "dcd6045ecb4ea18c120afedccbd1da74"
SRC_URI[sha256sum] = "90d0a3d396f96f9bc41eb0f7e8187796049285fabef82604acd4879590977307"
diff --git a/meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb b/meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb
index 590c4ebc28..fc0b1ee495 100644
--- a/meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb
+++ b/meta-oe/recipes-support/libmimetic/libmimetic_0.9.8.bb
@@ -10,7 +10,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b49da7df0ca479ef01ff7f2d799eabee"
SRCREV = "50486af99b4f9b35522d7b3de40b6ce107505279"
-SRC_URI += "git://github.com/LadislavSopko/mimetic/ \
+SRC_URI += "git://github.com/LadislavSopko/mimetic/;branch=master;protocol=https \
file://0001-libmimetic-Removing-test-directory-from-the-Makefile.patch \
file://0001-mimetic-Check-for-MMAP_FAILED-return-from-mmap.patch \
"
diff --git a/meta-oe/recipes-support/libmxml/libmxml_3.1.bb b/meta-oe/recipes-support/libmxml/libmxml_3.1.bb
index 4e77d6cc02..fd3369d8df 100644
--- a/meta-oe/recipes-support/libmxml/libmxml_3.1.bb
+++ b/meta-oe/recipes-support/libmxml/libmxml_3.1.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
HOMEPAGE = "https://www.msweet.org/mxml/"
BUGTRACKER = "https://github.com/michaelrsweet/mxml/issues"
-SRC_URI = "git://github.com/michaelrsweet/mxml.git"
+SRC_URI = "git://github.com/michaelrsweet/mxml.git;branch=master;protocol=https"
SRCREV = "e483e5fd8a33386fd46967681521bdd2da2b548f"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libp11/libp11_0.4.10.bb b/meta-oe/recipes-support/libp11/libp11_0.4.10.bb
index 7fe0640d94..142002a262 100644
--- a/meta-oe/recipes-support/libp11/libp11_0.4.10.bb
+++ b/meta-oe/recipes-support/libp11/libp11_0.4.10.bb
@@ -9,7 +9,7 @@ LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29"
DEPENDS = "libtool openssl"
-SRC_URI = "git://github.com/OpenSC/libp11.git"
+SRC_URI = "git://github.com/OpenSC/libp11.git;branch=master;protocol=https"
SRCREV = "973d31f3f58d5549ddd8b1f822ce8f72186f9d68"
UPSTREAM_CHECK_GITTAGREGEX = "libp11-(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-oe/recipes-support/librsync/librsync_2.3.1.bb b/meta-oe/recipes-support/librsync/librsync_2.3.1.bb
index 004c93d0f9..fddece8d1f 100644
--- a/meta-oe/recipes-support/librsync/librsync_2.3.1.bb
+++ b/meta-oe/recipes-support/librsync/librsync_2.3.1.bb
@@ -4,7 +4,7 @@ AUTHOR = "Martin Pool, Andrew Tridgell, Donovan Baarda, Adam Schubert"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
-SRC_URI = "git://github.com/librsync/librsync.git"
+SRC_URI = "git://github.com/librsync/librsync.git;branch=master;protocol=https"
SRCREV = "27f738650c20fef1285f11d85a34e5094a71c06f"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libsoc/libsoc_0.8.2.bb b/meta-oe/recipes-support/libsoc/libsoc_0.8.2.bb
index 8b773aefa5..f6fc0e36b6 100644
--- a/meta-oe/recipes-support/libsoc/libsoc_0.8.2.bb
+++ b/meta-oe/recipes-support/libsoc/libsoc_0.8.2.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=e0bfebea12a718922225ba987b2126a5"
inherit autotools pkgconfig python3-dir
SRCREV = "fd1ad6e7823fa76d8db0d3c5884faffa8ffddafb"
-SRC_URI = "git://github.com/jackmitch/libsoc.git"
+SRC_URI = "git://github.com/jackmitch/libsoc.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libssh/files/CVE-2020-16135-1.patch b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-1.patch
new file mode 100644
index 0000000000..2944a44622
--- /dev/null
+++ b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-1.patch
@@ -0,0 +1,40 @@
+From 533d881b0f4b24c72b35ecc97fa35d295d063e53 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 3 Jun 2020 10:04:09 +0200
+Subject: [PATCH] sftpserver: Add missing NULL check for ssh_buffer_new()
+
+Thanks to Ramin Farajpour Cami for spotting this.
+
+Fixes T232
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
+Reviewed-by: Jakub Jelen <jjelen@redhat.com>
+
+Upstream-Status: Backport [https://gitlab.com/libssh/libssh-mirror/-/commit/533d881b0f4b24c72b35ecc97fa35d295d063e53]
+CVE: CVE-2020-16135
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/sftpserver.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/sftpserver.c b/src/sftpserver.c
+index 5a2110e58..b639a2ce3 100644
+--- a/src/sftpserver.c
++++ b/src/sftpserver.c
+@@ -67,6 +67,12 @@ sftp_client_message sftp_get_client_message(sftp_session sftp) {
+
+ /* take a copy of the whole packet */
+ msg->complete_message = ssh_buffer_new();
++ if (msg->complete_message == NULL) {
++ ssh_set_error_oom(session);
++ sftp_client_message_free(msg);
++ return NULL;
++ }
++
+ ssh_buffer_add_data(msg->complete_message,
+ ssh_buffer_get(payload),
+ ssh_buffer_get_len(payload));
+--
+GitLab
+
diff --git a/meta-oe/recipes-support/libssh/files/CVE-2020-16135-2.patch b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-2.patch
new file mode 100644
index 0000000000..3c4ff0c614
--- /dev/null
+++ b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-2.patch
@@ -0,0 +1,42 @@
+From 2782cb0495b7450bd8fe43ce4af886b66fea6c40 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 3 Jun 2020 10:05:51 +0200
+Subject: [PATCH] sftpserver: Add missing return check for
+ ssh_buffer_add_data()
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
+Reviewed-by: Jakub Jelen <jjelen@redhat.com>
+
+Upstream-Status: Backport [https://gitlab.com/libssh/libssh-mirror/-/commit/2782cb0495b7450bd8fe43ce4af886b66fea6c40]
+CVE: CVE-2020-16135
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/sftpserver.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/sftpserver.c b/src/sftpserver.c
+index b639a2ce3..9117f155f 100644
+--- a/src/sftpserver.c
++++ b/src/sftpserver.c
+@@ -73,9 +73,14 @@ sftp_client_message sftp_get_client_message(sftp_session sftp) {
+ return NULL;
+ }
+
+- ssh_buffer_add_data(msg->complete_message,
+- ssh_buffer_get(payload),
+- ssh_buffer_get_len(payload));
++ rc = ssh_buffer_add_data(msg->complete_message,
++ ssh_buffer_get(payload),
++ ssh_buffer_get_len(payload));
++ if (rc < 0) {
++ ssh_set_error_oom(session);
++ sftp_client_message_free(msg);
++ return NULL;
++ }
+
+ ssh_buffer_get_u32(payload, &msg->id);
+
+--
+GitLab
+
diff --git a/meta-oe/recipes-support/libssh/files/CVE-2020-16135-3.patch b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-3.patch
new file mode 100644
index 0000000000..03a8ac156a
--- /dev/null
+++ b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-3.patch
@@ -0,0 +1,70 @@
+From 10b3ebbe61a7031a3dae97f05834442220447181 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 3 Jun 2020 10:10:11 +0200
+Subject: [PATCH] buffer: Reformat ssh_buffer_add_data()
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
+Reviewed-by: Jakub Jelen <jjelen@redhat.com>
+
+Upstream-Status: Backport [https://gitlab.com/libssh/libssh-mirror/-/commit/10b3ebbe61a7031a3dae97f05834442220447181]
+CVE: CVE-2020-16135
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/buffer.c | 35 ++++++++++++++++++-----------------
+ 1 file changed, 18 insertions(+), 17 deletions(-)
+
+diff --git a/src/buffer.c b/src/buffer.c
+index a2e6246af..476bc1358 100644
+--- a/src/buffer.c
++++ b/src/buffer.c
+@@ -299,28 +299,29 @@ int ssh_buffer_reinit(struct ssh_buffer_struct *buffer)
+ */
+ int ssh_buffer_add_data(struct ssh_buffer_struct *buffer, const void *data, uint32_t len)
+ {
+- buffer_verify(buffer);
++ buffer_verify(buffer);
+
+- if (data == NULL) {
+- return -1;
+- }
++ if (data == NULL) {
++ return -1;
++ }
+
+- if (buffer->used + len < len) {
+- return -1;
+- }
++ if (buffer->used + len < len) {
++ return -1;
++ }
+
+- if (buffer->allocated < (buffer->used + len)) {
+- if(buffer->pos > 0)
+- buffer_shift(buffer);
+- if (realloc_buffer(buffer, buffer->used + len) < 0) {
+- return -1;
++ if (buffer->allocated < (buffer->used + len)) {
++ if (buffer->pos > 0) {
++ buffer_shift(buffer);
++ }
++ if (realloc_buffer(buffer, buffer->used + len) < 0) {
++ return -1;
++ }
+ }
+- }
+
+- memcpy(buffer->data+buffer->used, data, len);
+- buffer->used+=len;
+- buffer_verify(buffer);
+- return 0;
++ memcpy(buffer->data + buffer->used, data, len);
++ buffer->used += len;
++ buffer_verify(buffer);
++ return 0;
+ }
+
+ /**
+--
+GitLab
+
diff --git a/meta-oe/recipes-support/libssh/files/CVE-2020-16135-4.patch b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-4.patch
new file mode 100644
index 0000000000..8e9a4c3f5c
--- /dev/null
+++ b/meta-oe/recipes-support/libssh/files/CVE-2020-16135-4.patch
@@ -0,0 +1,34 @@
+From 245ad744b5ab0582fef7cf3905a717b791d7e08b Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Wed, 3 Jun 2020 10:11:21 +0200
+Subject: [PATCH] buffer: Add NULL check for 'buffer' argument
+
+Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
+Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
+Reviewed-by: Jakub Jelen <jjelen@redhat.com>
+
+Upstream-Status: Backport [https://gitlab.com/libssh/libssh-mirror/-/commit/245ad744b5ab0582fef7cf3905a717b791d7e08b]
+CVE: CVE-2020-16135
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/buffer.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/buffer.c b/src/buffer.c
+index 476bc1358..ce12f491a 100644
+--- a/src/buffer.c
++++ b/src/buffer.c
+@@ -299,6 +299,10 @@ int ssh_buffer_reinit(struct ssh_buffer_struct *buffer)
+ */
+ int ssh_buffer_add_data(struct ssh_buffer_struct *buffer, const void *data, uint32_t len)
+ {
++ if (buffer == NULL) {
++ return -1;
++ }
++
+ buffer_verify(buffer);
+
+ if (data == NULL) {
+--
+GitLab
+
diff --git a/meta-oe/recipes-support/libssh/libssh_0.8.9.bb b/meta-oe/recipes-support/libssh/libssh_0.8.9.bb
index 39ed8a8fbb..0fb07a0eb7 100644
--- a/meta-oe/recipes-support/libssh/libssh_0.8.9.bb
+++ b/meta-oe/recipes-support/libssh/libssh_0.8.9.bb
@@ -6,7 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0"
DEPENDS = "zlib openssl libgcrypt"
-SRC_URI = "git://git.libssh.org/projects/libssh.git;branch=stable-0.8"
+SRC_URI = "git://git.libssh.org/projects/libssh.git;branch=stable-0.8 \
+ file://CVE-2020-16135-1.patch \
+ file://CVE-2020-16135-2.patch \
+ file://CVE-2020-16135-3.patch \
+ file://CVE-2020-16135-4.patch \
+ "
+
SRCREV = "04685a74df9ce1db1bc116a83a0da78b4f4fa1f8"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch b/meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch
new file mode 100644
index 0000000000..49dbde737f
--- /dev/null
+++ b/meta-oe/recipes-support/libssh2/files/CVE-2020-22218.patch
@@ -0,0 +1,39 @@
+From 642eec48ff3adfdb7a9e562b6d7fc865d1733f45 Mon Sep 17 00:00:00 2001
+From: lutianxiong <lutianxiong@huawei.com>
+Date: Fri, 29 May 2020 01:25:40 +0800
+Subject: [PATCH] transport.c: fix use-of-uninitialized-value (#476)
+
+file:transport.c
+
+notes:
+return error if malloc(0)
+
+credit:
+lutianxiong
+
+Bug: https://github.com/libssh2/libssh2/pull/476
+Upstream-Status: Backport [https://github.com/libssh2/libssh2/commit/642eec48ff3adfdb7a9e562b6d7fc865d1733f45
+&
+https://github.com/libssh2/libssh2/commit/0b44e558f311671f6e6d14c559bc1c9bda59b8df]
+CVE: CVE-2020-22218
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/transport.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/transport.c b/src/transport.c
+index 45e445c..35e7df3 100644
+--- a/src/transport.c
++++ b/src/transport.c
+@@ -465,7 +465,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session)
+ * or less (including length, padding length, payload,
+ * padding, and MAC.)."
+ */
+- if(total_num > LIBSSH2_PACKET_MAXPAYLOAD) {
++ if(total_num > LIBSSH2_PACKET_MAXPAYLOAD || total_num == 0) {
+ return LIBSSH2_ERROR_OUT_OF_BOUNDARY;
+ }
+
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb b/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb
index c1f337a440..e11e663769 100644
--- a/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb
+++ b/meta-oe/recipes-support/libssh2/libssh2_1.9.0.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c5cf34fc0acb44b082ef50ef5e4354ca"
SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
file://CVE-2019-17498.patch \
+ file://CVE-2020-22218.patch \
"
SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927"
SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd"
diff --git a/meta-oe/recipes-support/libteam/libteam_1.30.bb b/meta-oe/recipes-support/libteam/libteam_1.30.bb
index 9cd02b0c09..d04660ca10 100644
--- a/meta-oe/recipes-support/libteam/libteam_1.30.bb
+++ b/meta-oe/recipes-support/libteam/libteam_1.30.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
DEPENDS = "libnl libdaemon jansson"
-SRC_URI = "git://github.com/jpirko/libteam \
+SRC_URI = "git://github.com/jpirko/libteam;branch=master;protocol=https \
file://0001-include-sys-select.h-for-fd_set-definition.patch \
file://0002-teamd-Re-adjust-include-header-order.patch \
file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \
diff --git a/meta-oe/recipes-support/libtinyxml2/libtinyxml2_8.0.0.bb b/meta-oe/recipes-support/libtinyxml2/libtinyxml2_8.0.0.bb
index a2491cf9e6..2a33284b8a 100644
--- a/meta-oe/recipes-support/libtinyxml2/libtinyxml2_8.0.0.bb
+++ b/meta-oe/recipes-support/libtinyxml2/libtinyxml2_8.0.0.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=135624eef03e1f1101b9ba9ac9b5fffd"
-SRC_URI = "git://github.com/leethomason/tinyxml2.git"
+SRC_URI = "git://github.com/leethomason/tinyxml2.git;branch=master;protocol=https"
SRCREV = "bf15233ad88390461f6ab0dbcf046cce643c5fcb"
diff --git a/meta-oe/recipes-support/libusbg/libusbg_git.bb b/meta-oe/recipes-support/libusbg/libusbg_git.bb
index 97d60a6a8a..6edac56fef 100644
--- a/meta-oe/recipes-support/libusbg/libusbg_git.bb
+++ b/meta-oe/recipes-support/libusbg/libusbg_git.bb
@@ -8,7 +8,7 @@ inherit autotools
PV = "0.1.0"
SRCREV = "a826d136e0e8fa53815f1ba05893e6dd74208c15"
-SRC_URI = "git://github.com/libusbg/libusbg.git \
+SRC_URI = "git://github.com/libusbg/libusbg.git;branch=master;protocol=https \
file://0001-Fix-out-of-tree-builds.patch \
"
diff --git a/meta-oe/recipes-support/libusbgx/libusbgx_git.bb b/meta-oe/recipes-support/libusbgx/libusbgx_git.bb
index d73ca61060..b88941d6e3 100644
--- a/meta-oe/recipes-support/libusbgx/libusbgx_git.bb
+++ b/meta-oe/recipes-support/libusbgx/libusbgx_git.bb
@@ -11,7 +11,7 @@ PV = "0.2.0+git${SRCPV}"
SRCREV = "45c14ef4d5d7ced0fbf984208de44ced6d5ed898"
SRCBRANCH = "master"
SRC_URI = " \
- git://github.com/libusbgx/libusbgx.git;branch=${SRCBRANCH} \
+ git://github.com/libusbgx/libusbgx.git;branch=${SRCBRANCH};protocol=https \
file://gadget-start \
file://usbgx.initd \
file://usbgx.service \
diff --git a/meta-oe/recipes-support/libutempter/libutempter.bb b/meta-oe/recipes-support/libutempter/libutempter.bb
index b8a700b7b7..d259f166d1 100644
--- a/meta-oe/recipes-support/libutempter/libutempter.bb
+++ b/meta-oe/recipes-support/libutempter/libutempter.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
SRCREV = "3ef74fff310f09e2601e241b9f042cd39d591018"
PV = "1.1.6-alt2+git${SRCPV}"
-SRC_URI = "git://git.altlinux.org/people/ldv/packages/libutempter.git \
+SRC_URI = "git://git.altlinux.org/people/ldv/packages/libutempter.git;branch=master \
file://0001-Fix-macro-error.patch \
file://0002-Proper-macro-path-generation.patch \
file://libutempter-remove-glibc-assumption.patch \
diff --git a/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb b/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb
index 0fb4a6e516..aab81461a4 100644
--- a/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb
+++ b/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=c3ea231a32635cbb5debedf3e88aa3df
PV = "4.1+git${SRCPV}"
-SRC_URI = "git://github.com/Datera/lio-utils.git \
+SRC_URI = "git://github.com/Datera/lio-utils.git;branch=master;protocol=https \
file://0001-Makefiles-Respect-environment-variables-and-add-LDFL.patch \
"
SRCREV = "0ac9091c1ff7a52d5435a4f4449e82637142e06e"
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 2fe97d5713..d0fb33d118 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12713b4d9386533feeb07d6e4831765a \
DEPENDS += "libaio"
-SRC_URI = "git://sourceware.org/git/lvm2.git \
+SRC_URI = "git://sourceware.org/git/lvm2.git;branch=master \
file://lvm.conf \
file://0001-implement-libc-specific-reopen_stream.patch \
file://0002-Guard-use-of-mallinfo-with-__GLIBC__.patch \
diff --git a/meta-oe/recipes-support/mcelog/mce-inject_git.bb b/meta-oe/recipes-support/mcelog/mce-inject_git.bb
index cc33cbaf28..8241bd2342 100644
--- a/meta-oe/recipes-support/mcelog/mce-inject_git.bb
+++ b/meta-oe/recipes-support/mcelog/mce-inject_git.bb
@@ -4,7 +4,7 @@ software level into a running Linux kernel. This is intended for \
validation of the kernel machine check handler."
SECTION = "System Environment/Base"
-SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git"
+SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git;branch=master"
SRCREV = "4cbe46321b4a81365ff3aafafe63967264dbfec5"
diff --git a/meta-oe/recipes-support/mcelog/mce-test_git.bb b/meta-oe/recipes-support/mcelog/mce-test_git.bb
index 35fb944702..f245515216 100644
--- a/meta-oe/recipes-support/mcelog/mce-test_git.bb
+++ b/meta-oe/recipes-support/mcelog/mce-test_git.bb
@@ -10,7 +10,7 @@ containment and recovery, ACPI/APEI support etc."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git \
+SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git;branch=master \
file://makefile-remove-ldflags.patch \
file://0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch \
"
diff --git a/meta-oe/recipes-support/mcelog/mcelog_168.bb b/meta-oe/recipes-support/mcelog/mcelog_168.bb
index e2ef6ea589..c464132176 100644
--- a/meta-oe/recipes-support/mcelog/mcelog_168.bb
+++ b/meta-oe/recipes-support/mcelog/mcelog_168.bb
@@ -5,7 +5,7 @@ and should run on all Linux systems that need error handling."
HOMEPAGE = "http://mcelog.org/"
SECTION = "System Environment/Base"
-SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http; \
+SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;branch=master \
file://run-ptest \
"
diff --git a/meta-oe/recipes-support/multipath-tools/files/CVE-2022-41973.patch b/meta-oe/recipes-support/multipath-tools/files/CVE-2022-41973.patch
new file mode 100644
index 0000000000..d06ef44f68
--- /dev/null
+++ b/meta-oe/recipes-support/multipath-tools/files/CVE-2022-41973.patch
@@ -0,0 +1,154 @@
+From cb57b930fa690ab79b3904846634681685e3470f Mon Sep 17 00:00:00 2001
+From: Martin Wilck <mwilck@suse.com>
+Date: Thu, 1 Sep 2022 19:21:30 +0200
+Subject: [PATCH] multipath-tools: use /run instead of /dev/shm
+
+/dev/shm may have unsafe permissions. Use /run instead.
+Use systemd's tmpfiles.d mechanism to create /run/multipath
+early during boot.
+
+For backward compatibilty, make the runtime directory configurable
+via the "runtimedir" make variable.
+
+Signed-off-by: Martin Wilck <mwilck@suse.com>
+Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
+
+CVE: CVE-2022-41973
+Upstream-Status: Backport [https://github.com/opensvc/multipath-tools/commit/cb57b930fa690ab79b3904846634681685e3470f]
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ .gitignore | 2 ++
+ Makefile.inc | 7 ++++++-
+ libmultipath/defaults.h | 3 +--
+ multipath/Makefile | 11 ++++++++---
+ multipath/{multipath.rules => multipath.rules.in} | 4 ++--
+ multipath/tmpfiles.conf.in | 1 +
+ 6 files changed, 20 insertions(+), 8 deletions(-)
+ rename multipath/{multipath.rules => multipath.rules.in} (95%)
+ create mode 100644 multipath/tmpfiles.conf.in
+
+diff --git a/.gitignore b/.gitignore
+index 9926756b..f90b0350 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -8,6 +8,8 @@
+ *.d
+ kpartx/kpartx
+ multipath/multipath
++multipath/multipath.rules
++multipath/tmpfiles.conf
+ multipathd/multipathd
+ mpathpersist/mpathpersist
+ .nfs*
+diff --git a/Makefile.inc b/Makefile.inc
+index 4eb08eed..648f91b4 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -44,6 +44,7 @@ exec_prefix = $(prefix)
+ usr_prefix = $(prefix)
+ bindir = $(exec_prefix)/usr/sbin
+ libudevdir = $(prefix)/$(SYSTEMDPATH)/udev
++tmpfilesdir = $(prefix)/$(SYSTEMDPATH)/tmpfiles.d
+ udevrulesdir = $(libudevdir)/rules.d
+ multipathdir = $(TOPDIR)/libmultipath
+ man8dir = $(prefix)/usr/share/man/man8
+@@ -60,6 +61,7 @@ libdmmpdir = $(TOPDIR)/libdmmp
+ nvmedir = $(TOPDIR)/libmultipath/nvme
+ includedir = $(prefix)/usr/include
+ pkgconfdir = $(usrlibdir)/pkgconfig
++runtimedir := /$(RUN)
+
+ GZIP = gzip -9 -c
+ RM = rm -f
+@@ -95,7 +97,10 @@ OPTFLAGS += -Wextra -Wstrict-prototypes -Wformat=2 -Werror=implicit-int \
+ -Wno-unused-parameter -Werror=cast-qual \
+ -Werror=discarded-qualifiers
+
+-CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
++CPPFLAGS := $(FORTIFY_OPT) \
++ -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \
++ -DRUNTIME_DIR=\"$(runtimedir)\" \
++ -DCONFIG_DIR=\"$(configdir)\" -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP
+ CFLAGS := $(OPTFLAGS) -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
+ -MMD -MP $(CFLAGS)
+ BIN_CFLAGS = -fPIE -DPIE
+diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
+index c2164c16..908e0ca3 100644
+--- a/libmultipath/defaults.h
++++ b/libmultipath/defaults.h
+@@ -64,8 +64,7 @@
+ #define DEFAULT_WWIDS_FILE "/etc/multipath/wwids"
+ #define DEFAULT_PRKEYS_FILE "/etc/multipath/prkeys"
+ #define DEFAULT_CONFIG_DIR "/etc/multipath/conf.d"
+-#define MULTIPATH_SHM_BASE "/dev/shm/multipath/"
+-
++#define MULTIPATH_SHM_BASE RUNTIME_DIR "/multipath/"
+
+ static inline char *set_default(char *str)
+ {
+diff --git a/multipath/Makefile b/multipath/Makefile
+index e720c7f6..28976546 100644
+--- a/multipath/Makefile
++++ b/multipath/Makefile
+@@ -12,7 +12,7 @@ EXEC = multipath
+
+ OBJS = main.o
+
+-all: $(EXEC)
++all: $(EXEC) multipath.rules tmpfiles.conf
+
+ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so
+ $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
+@@ -26,7 +26,9 @@ install:
+ $(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
+ $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
+- $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
++ $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules
++ $(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir)
++ $(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
+ $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir)
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
+@@ -43,9 +45,12 @@ uninstall:
+ $(RM) $(DESTDIR)$(man8dir)/mpathconf.8.gz
+
+ clean: dep_clean
+- $(RM) core *.o $(EXEC) *.gz
++ $(RM) core *.o $(EXEC) multipath.rules tmpfiles.conf
+
+ include $(wildcard $(OBJS:.o=.d))
+
+ dep_clean:
+ $(RM) $(OBJS:.o=.d)
++
++%: %.in
++ sed 's,@RUNTIME_DIR@,$(runtimedir),' $< >$@
+diff --git a/multipath/multipath.rules b/multipath/multipath.rules.in
+similarity index 95%
+rename from multipath/multipath.rules
+rename to multipath/multipath.rules.in
+index 0486bf70..5fb499e6 100644
+--- a/multipath/multipath.rules
++++ b/multipath/multipath.rules.in
+@@ -1,8 +1,8 @@
+ # Set DM_MULTIPATH_DEVICE_PATH if the device should be handled by multipath
+ SUBSYSTEM!="block", GOTO="end_mpath"
+ KERNEL!="sd*|dasd*|nvme*", GOTO="end_mpath"
+-ACTION=="remove", TEST=="/dev/shm/multipath/find_multipaths/$major:$minor", \
+- RUN+="/usr/bin/rm -f /dev/shm/multipath/find_multipaths/$major:$minor"
++ACTION=="remove", TEST=="@RUNTIME_DIR@/multipath/find_multipaths/$major:$minor", \
++ RUN+="/usr/bin/rm -f @RUNTIME_DIR@/multipath/find_multipaths/$major:$minor"
+ ACTION!="add|change", GOTO="end_mpath"
+
+ IMPORT{cmdline}="nompath"
+diff --git a/multipath/tmpfiles.conf.in b/multipath/tmpfiles.conf.in
+new file mode 100644
+index 00000000..21be438a
+--- /dev/null
++++ b/multipath/tmpfiles.conf.in
+@@ -0,0 +1 @@
++d @RUNTIME_DIR@/multipath 0700 root root -
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/multipath-tools/files/CVE-2022-41974.patch b/meta-oe/recipes-support/multipath-tools/files/CVE-2022-41974.patch
new file mode 100644
index 0000000000..dcc2cd49ef
--- /dev/null
+++ b/meta-oe/recipes-support/multipath-tools/files/CVE-2022-41974.patch
@@ -0,0 +1,162 @@
+From 0168696f95b5c610c3861ced8ef98accd1a83b91 Mon Sep 17 00:00:00 2001
+From: Benjamin Marzinski <bmarzins@redhat.com>
+Date: Tue, 27 Sep 2022 12:36:37 +0200
+Subject: [PATCH] multipathd: ignore duplicated multipathd command keys
+
+multipath adds rather than or-s the values of command keys. Fix this.
+Also, return an invalid fingerprint if a key is used more than once.
+
+References:
+https://nvd.nist.gov/vuln/detail/CVE-2022-41974
+https://github.com/opensvc/multipath-tools/issues/59
+
+Upstream-Status: Backport [https://github.com/openSUSE/multipath-tools/commit/fbbf280a0e26026c19879d938ebb2a8200b6357c]
+CVE: CVE-2022-41974
+
+Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ multipathd/cli.c | 8 ++--
+ multipathd/main.c | 104 +++++++++++++++++++++++-----------------------
+ 2 files changed, 57 insertions(+), 55 deletions(-)
+
+diff --git a/multipathd/cli.c b/multipathd/cli.c
+index 800c0fbe..0a266761 100644
+--- a/multipathd/cli.c
++++ b/multipathd/cli.c
+@@ -336,9 +336,11 @@ fingerprint(vector vec)
+ if (!vec)
+ return 0;
+
+- vector_foreach_slot(vec, kw, i)
+- fp += kw->code;
+-
++ vector_foreach_slot(vec, kw, i) {
++ if (fp & kw->code)
++ return (uint64_t)-1;
++ fp |= kw->code;
++ }
+ return fp;
+ }
+
+diff --git a/multipathd/main.c b/multipathd/main.c
+index 8baf9abe..975287d2 100644
+--- a/multipathd/main.c
++++ b/multipathd/main.c
+@@ -1522,61 +1522,61 @@ uxlsnrloop (void * ap)
+ /* Tell main thread that thread has started */
+ post_config_state(DAEMON_CONFIGURE);
+
+- set_handler_callback(LIST+PATHS, cli_list_paths);
+- set_handler_callback(LIST+PATHS+FMT, cli_list_paths_fmt);
+- set_handler_callback(LIST+PATHS+RAW+FMT, cli_list_paths_raw);
+- set_handler_callback(LIST+PATH, cli_list_path);
+- set_handler_callback(LIST+MAPS, cli_list_maps);
+- set_handler_callback(LIST+STATUS, cli_list_status);
+- set_unlocked_handler_callback(LIST+DAEMON, cli_list_daemon);
+- set_handler_callback(LIST+MAPS+STATUS, cli_list_maps_status);
+- set_handler_callback(LIST+MAPS+STATS, cli_list_maps_stats);
+- set_handler_callback(LIST+MAPS+FMT, cli_list_maps_fmt);
+- set_handler_callback(LIST+MAPS+RAW+FMT, cli_list_maps_raw);
+- set_handler_callback(LIST+MAPS+TOPOLOGY, cli_list_maps_topology);
+- set_handler_callback(LIST+TOPOLOGY, cli_list_maps_topology);
+- set_handler_callback(LIST+MAPS+JSON, cli_list_maps_json);
+- set_handler_callback(LIST+MAP+TOPOLOGY, cli_list_map_topology);
+- set_handler_callback(LIST+MAP+FMT, cli_list_map_fmt);
+- set_handler_callback(LIST+MAP+RAW+FMT, cli_list_map_fmt);
+- set_handler_callback(LIST+MAP+JSON, cli_list_map_json);
+- set_handler_callback(LIST+CONFIG+LOCAL, cli_list_config_local);
+- set_handler_callback(LIST+CONFIG, cli_list_config);
+- set_handler_callback(LIST+BLACKLIST, cli_list_blacklist);
+- set_handler_callback(LIST+DEVICES, cli_list_devices);
+- set_handler_callback(LIST+WILDCARDS, cli_list_wildcards);
+- set_handler_callback(RESET+MAPS+STATS, cli_reset_maps_stats);
+- set_handler_callback(RESET+MAP+STATS, cli_reset_map_stats);
+- set_handler_callback(ADD+PATH, cli_add_path);
+- set_handler_callback(DEL+PATH, cli_del_path);
+- set_handler_callback(ADD+MAP, cli_add_map);
+- set_handler_callback(DEL+MAP, cli_del_map);
+- set_handler_callback(SWITCH+MAP+GROUP, cli_switch_group);
++ set_handler_callback(LIST|PATHS, cli_list_paths);
++ set_handler_callback(LIST|PATHS|FMT, cli_list_paths_fmt);
++ set_handler_callback(LIST|PATHS|RAW|FMT, cli_list_paths_raw);
++ set_handler_callback(LIST|PATH, cli_list_path);
++ set_handler_callback(LIST|MAPS, cli_list_maps);
++ set_handler_callback(LIST|STATUS, cli_list_status);
++ set_unlocked_handler_callback(LIST|DAEMON, cli_list_daemon);
++ set_handler_callback(LIST|MAPS|STATUS, cli_list_maps_status);
++ set_handler_callback(LIST|MAPS|STATS, cli_list_maps_stats);
++ set_handler_callback(LIST|MAPS|FMT, cli_list_maps_fmt);
++ set_handler_callback(LIST|MAPS|RAW|FMT, cli_list_maps_raw);
++ set_handler_callback(LIST|MAPS|TOPOLOGY, cli_list_maps_topology);
++ set_handler_callback(LIST|TOPOLOGY, cli_list_maps_topology);
++ set_handler_callback(LIST|MAPS|JSON, cli_list_maps_json);
++ set_handler_callback(LIST|MAP|TOPOLOGY, cli_list_map_topology);
++ set_handler_callback(LIST|MAP|FMT, cli_list_map_fmt);
++ set_handler_callback(LIST|MAP|RAW|FMT, cli_list_map_fmt);
++ set_handler_callback(LIST|MAP|JSON, cli_list_map_json);
++ set_handler_callback(LIST|CONFIG|LOCAL, cli_list_config_local);
++ set_handler_callback(LIST|CONFIG, cli_list_config);
++ set_handler_callback(LIST|BLACKLIST, cli_list_blacklist);
++ set_handler_callback(LIST|DEVICES, cli_list_devices);
++ set_handler_callback(LIST|WILDCARDS, cli_list_wildcards);
++ set_handler_callback(RESET|MAPS|STATS, cli_reset_maps_stats);
++ set_handler_callback(RESET|MAP|STATS, cli_reset_map_stats);
++ set_handler_callback(ADD|PATH, cli_add_path);
++ set_handler_callback(DEL|PATH, cli_del_path);
++ set_handler_callback(ADD|MAP, cli_add_map);
++ set_handler_callback(DEL|MAP, cli_del_map);
++ set_handler_callback(SWITCH|MAP|GROUP, cli_switch_group);
+ set_unlocked_handler_callback(RECONFIGURE, cli_reconfigure);
+- set_handler_callback(SUSPEND+MAP, cli_suspend);
+- set_handler_callback(RESUME+MAP, cli_resume);
+- set_handler_callback(RESIZE+MAP, cli_resize);
+- set_handler_callback(RELOAD+MAP, cli_reload);
+- set_handler_callback(RESET+MAP, cli_reassign);
+- set_handler_callback(REINSTATE+PATH, cli_reinstate);
+- set_handler_callback(FAIL+PATH, cli_fail);
+- set_handler_callback(DISABLEQ+MAP, cli_disable_queueing);
+- set_handler_callback(RESTOREQ+MAP, cli_restore_queueing);
+- set_handler_callback(DISABLEQ+MAPS, cli_disable_all_queueing);
+- set_handler_callback(RESTOREQ+MAPS, cli_restore_all_queueing);
++ set_handler_callback(SUSPEND|MAP, cli_suspend);
++ set_handler_callback(RESUME|MAP, cli_resume);
++ set_handler_callback(RESIZE|MAP, cli_resize);
++ set_handler_callback(RELOAD|MAP, cli_reload);
++ set_handler_callback(RESET|MAP, cli_reassign);
++ set_handler_callback(REINSTATE|PATH, cli_reinstate);
++ set_handler_callback(FAIL|PATH, cli_fail);
++ set_handler_callback(DISABLEQ|MAP, cli_disable_queueing);
++ set_handler_callback(RESTOREQ|MAP, cli_restore_queueing);
++ set_handler_callback(DISABLEQ|MAPS, cli_disable_all_queueing);
++ set_handler_callback(RESTOREQ|MAPS, cli_restore_all_queueing);
+ set_unlocked_handler_callback(QUIT, cli_quit);
+ set_unlocked_handler_callback(SHUTDOWN, cli_shutdown);
+- set_handler_callback(GETPRSTATUS+MAP, cli_getprstatus);
+- set_handler_callback(SETPRSTATUS+MAP, cli_setprstatus);
+- set_handler_callback(UNSETPRSTATUS+MAP, cli_unsetprstatus);
+- set_handler_callback(FORCEQ+DAEMON, cli_force_no_daemon_q);
+- set_handler_callback(RESTOREQ+DAEMON, cli_restore_no_daemon_q);
+- set_handler_callback(GETPRKEY+MAP, cli_getprkey);
+- set_handler_callback(SETPRKEY+MAP+KEY, cli_setprkey);
+- set_handler_callback(UNSETPRKEY+MAP, cli_unsetprkey);
+- set_handler_callback(SETMARGINAL+PATH, cli_set_marginal);
+- set_handler_callback(UNSETMARGINAL+PATH, cli_unset_marginal);
+- set_handler_callback(UNSETMARGINAL+MAP, cli_unset_all_marginal);
++ set_handler_callback(GETPRSTATUS|MAP, cli_getprstatus);
++ set_handler_callback(SETPRSTATUS|MAP, cli_setprstatus);
++ set_handler_callback(UNSETPRSTATUS|MAP, cli_unsetprstatus);
++ set_handler_callback(FORCEQ|DAEMON, cli_force_no_daemon_q);
++ set_handler_callback(RESTOREQ|DAEMON, cli_restore_no_daemon_q);
++ set_handler_callback(GETPRKEY|MAP, cli_getprkey);
++ set_handler_callback(SETPRKEY|MAP|KEY, cli_setprkey);
++ set_handler_callback(UNSETPRKEY|MAP, cli_unsetprkey);
++ set_handler_callback(SETMARGINAL|PATH, cli_set_marginal);
++ set_handler_callback(UNSETMARGINAL|PATH, cli_unset_marginal);
++ set_handler_callback(UNSETMARGINAL|MAP, cli_unset_all_marginal);
+
+ umask(077);
+ uxsock_listen(&uxsock_trigger, ux_sock, ap);
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
index 8b0c89338f..e14e494366 100644
--- a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
+++ b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.8.4.bb
@@ -29,7 +29,7 @@ DEPENDS = "libdevmapper \
LICENSE = "GPLv2"
-SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
+SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=http;branch=master \
file://multipathd.oe \
file://multipath.conf.example \
file://0021-RH-fixup-udev-rules-for-redhat.patch \
@@ -45,6 +45,8 @@ SRC_URI = "git://git.opensvc.com/multipath-tools/.git;protocol=http \
file://0031-Always-use-devmapper-for-kpartx.patch \
file://0001-fix-bug-of-do_compile-and-do_install.patch \
file://0001-add-explicit-dependency-on-libraries.patch \
+ file://CVE-2022-41973.patch \
+ file://CVE-2022-41974.patch \
"
LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
@@ -117,3 +119,6 @@ FILES_kpartx = "${base_sbindir}/kpartx \
RDEPENDS_${PN} += "kpartx"
PARALLEL_MAKE = ""
+
+FILES:${PN}-libs += "usr/lib/*.so.*"
+FILES:${PN}-libs += "usr/lib/tmpfiles.d/*"
diff --git a/meta-oe/recipes-support/ne10/ne10_1.2.1.bb b/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
index f37ccde1cb..6cb53212a4 100644
--- a/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
+++ b/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
@@ -4,7 +4,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7fe20c9be97be5579e3ab5d92d3a218"
SECTION = "libs"
-SRC_URI = "git://github.com/projectNe10/Ne10.git \
+SRC_URI = "git://github.com/projectNe10/Ne10.git;branch=master;protocol=https \
file://0001-CMakeLists.txt-Remove-mthumb-interwork.patch \
file://0001-Dont-specify-march-explicitly.patch \
"
diff --git a/meta-oe/recipes-support/nss/nss/0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch b/meta-oe/recipes-support/nss/nss/0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch
new file mode 100644
index 0000000000..b935d9eec5
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch
@@ -0,0 +1,46 @@
+From 4e7e332b25a2794f381323518e52d8d95273b69e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Franti=C5=A1ek=20Kren=C5=BEelok?= <fkrenzel@redhat.com>
+Date: Mon, 30 Jan 2023 12:59:20 +0000
+Subject: [PATCH] Bug 1812671 - build failure while implicitly casting
+ SECStatus to PRUInt32. r=nss-reviewers,mt
+
+Author of the patch: Bob Relyea <rrelyea@redhat.com>
+
+Differential Revision: https://phabricator.services.mozilla.com/D167983
+
+--HG--
+extra : moz-landing-system : lando
+---
+ lib/ssl/ssl3exthandle.c | 2 +-
+ lib/ssl/sslsnce.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/ssl/ssl3exthandle.c b/lib/ssl/ssl3exthandle.c
+index b5ae62f39..7134447bf 100644
+--- a/lib/ssl/ssl3exthandle.c
++++ b/lib/ssl/ssl3exthandle.c
+@@ -201,7 +201,7 @@ ssl3_FreeSniNameArray(TLSExtensionData *xtnData)
+ * Clients sends a filled in session ticket if one is available, and otherwise
+ * sends an empty ticket. Servers always send empty tickets.
+ */
+-PRInt32
++SECStatus
+ ssl3_ClientSendSessionTicketXtn(const sslSocket *ss, TLSExtensionData *xtnData,
+ sslBuffer *buf, PRBool *added)
+ {
+diff --git a/lib/ssl/sslsnce.c b/lib/ssl/sslsnce.c
+index 56edafa1f..49f041c97 100644
+--- a/lib/ssl/sslsnce.c
++++ b/lib/ssl/sslsnce.c
+@@ -1820,7 +1820,7 @@ ssl_GetSelfEncryptKeyPair(SECKEYPublicKey **pubKey,
+ return SECSuccess;
+ }
+
+-static PRBool
++static SECStatus
+ ssl_GenerateSelfEncryptKeys(void *pwArg, PRUint8 *keyName,
+ PK11SymKey **aesKey, PK11SymKey **macKey);
+
+--
+2.40.1
+
diff --git a/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch b/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch
new file mode 100644
index 0000000000..dc7e172aae
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch
@@ -0,0 +1,75 @@
+From cbf5a2bce75ca2c2fd3e247796b9892f5298584e Mon Sep 17 00:00:00 2001
+From: "John M. Schanck" <jschanck@mozilla.com>
+Date: Thu, 13 Apr 2023 17:43:46 +0000
+Subject: [PATCH] Bug 1826650 - cmd/ecperf: fix dangling pointer warning on gcc
+ 13. r=djackson
+
+Differential Revision: https://phabricator.services.mozilla.com/D174822
+
+--HG--
+extra : moz-landing-system : lando
+---
+ cmd/ecperf/ecperf.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/cmd/ecperf/ecperf.c b/cmd/ecperf/ecperf.c
+index 705d68f35..a07004d8e 100644
+--- a/cmd/ecperf/ecperf.c
++++ b/cmd/ecperf/ecperf.c
+@@ -53,6 +53,7 @@ PKCS11Thread(void *data)
+ SECItem sig;
+ CK_SESSION_HANDLE session;
+ CK_RV crv;
++ void *tmp = NULL;
+
+ threadData->status = SECSuccess;
+ threadData->count = 0;
+@@ -68,6 +69,7 @@ PKCS11Thread(void *data)
+ if (threadData->isSign) {
+ sig.data = sigData;
+ sig.len = sizeof(sigData);
++ tmp = threadData->p2;
+ threadData->p2 = (void *)&sig;
+ }
+
+@@ -79,6 +81,10 @@ PKCS11Thread(void *data)
+ }
+ threadData->count++;
+ }
++
++ if (threadData->isSign) {
++ threadData->p2 = tmp;
++ }
+ return;
+ }
+
+@@ -89,6 +95,7 @@ genericThread(void *data)
+ int iters = threadData->iters;
+ unsigned char sigData[256];
+ SECItem sig;
++ void *tmp = NULL;
+
+ threadData->status = SECSuccess;
+ threadData->count = 0;
+@@ -96,6 +103,7 @@ genericThread(void *data)
+ if (threadData->isSign) {
+ sig.data = sigData;
+ sig.len = sizeof(sigData);
++ tmp = threadData->p2;
+ threadData->p2 = (void *)&sig;
+ }
+
+@@ -107,6 +115,10 @@ genericThread(void *data)
+ }
+ threadData->count++;
+ }
++
++ if (threadData->isSign) {
++ threadData->p2 = tmp;
++ }
+ return;
+ }
+
+--
+2.40.1
+
diff --git a/meta-oe/recipes-support/nss/nss/CVE-2020-12403_1.patch b/meta-oe/recipes-support/nss/nss/CVE-2020-12403_1.patch
new file mode 100644
index 0000000000..a229a2d20f
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/CVE-2020-12403_1.patch
@@ -0,0 +1,65 @@
+From 9ff9d3925d31ab265a965ab1d16d76c496ddb5c8 Mon Sep 17 00:00:00 2001
+From: Benjamin Beurdouche <bbeurdouche@mozilla.com>
+Date: Sat, 18 Jul 2020 00:13:38 +0000
+Subject: [PATCH] Bug 1636771 - Fix incorrect call to Chacha20Poly1305 by
+ PKCS11. r=jcj,kjacobs,rrelyea
+
+Differential Revision: https://phabricator.services.mozilla.com/D74801
+
+--HG--
+extra : moz-landing-system : lando
+---
+ nss/gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc | 11 +++++++++--
+ nss/lib/freebl/chacha20poly1305.c | 2 +-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+CVE: CVE-2020-12403
+Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/9ff9d3925d31ab265a965ab1d16d76c496ddb5c8]
+Comment: Refreshed path for whole patchset
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+diff --git a/nss/gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc b/nss/gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc
+index 41f9da71d6..3ea17678d9 100644
+--- a/nss/gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc
++++ b/nss/gtests/pk11_gtest/pk11_chacha20poly1305_unittest.cc
+@@ -45,7 +45,7 @@ class Pkcs11ChaCha20Poly1305Test
+ SECItem params = {siBuffer, reinterpret_cast<unsigned char*>(&aead_params),
+ sizeof(aead_params)};
+
+- // Encrypt with bad parameters.
++ // Encrypt with bad parameters (TagLen is too long).
+ unsigned int encrypted_len = 0;
+ std::vector<uint8_t> encrypted(data_len + aead_params.ulTagLen);
+ aead_params.ulTagLen = 158072;
+@@ -54,9 +54,16 @@ class Pkcs11ChaCha20Poly1305Test
+ &encrypted_len, encrypted.size(), data, data_len);
+ EXPECT_EQ(SECFailure, rv);
+ EXPECT_EQ(0U, encrypted_len);
+- aead_params.ulTagLen = 16;
++
++ // Encrypt with bad parameters (TagLen is too short).
++ aead_params.ulTagLen = 2;
++ rv = PK11_Encrypt(key.get(), kMech, &params, encrypted.data(),
++ &encrypted_len, encrypted.size(), data, data_len);
++ EXPECT_EQ(SECFailure, rv);
++ EXPECT_EQ(0U, encrypted_len);
+
+ // Encrypt.
++ aead_params.ulTagLen = 16;
+ rv = PK11_Encrypt(key.get(), kMech, &params, encrypted.data(),
+ &encrypted_len, encrypted.size(), data, data_len);
+
+diff --git a/nss/lib/freebl/chacha20poly1305.c b/nss/lib/freebl/chacha20poly1305.c
+index 970c6436da..5c294a9eaf 100644
+--- a/nss/lib/freebl/chacha20poly1305.c
++++ b/nss/lib/freebl/chacha20poly1305.c
+@@ -81,7 +81,7 @@ ChaCha20Poly1305_InitContext(ChaCha20Poly1305Context *ctx,
+ PORT_SetError(SEC_ERROR_BAD_KEY);
+ return SECFailure;
+ }
+- if (tagLen == 0 || tagLen > 16) {
++ if (tagLen != 16) {
+ PORT_SetError(SEC_ERROR_INPUT_LEN);
+ return SECFailure;
+ }
+
diff --git a/meta-oe/recipes-support/nss/nss/CVE-2020-12403_2.patch b/meta-oe/recipes-support/nss/nss/CVE-2020-12403_2.patch
new file mode 100644
index 0000000000..7b093d0cda
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/CVE-2020-12403_2.patch
@@ -0,0 +1,80 @@
+From 06b2b1c50bd4eaa7f65d858e5e3f44f678cb3c45 Mon Sep 17 00:00:00 2001
+From: Benjamin Beurdouche <bbeurdouche@mozilla.com>
+Date: Sat, 18 Jul 2020 00:13:14 +0000
+Subject: [PATCH] Bug 1636771 - Disable PKCS11 incremental mode for ChaCha20.
+ r=kjacobs,rrelyea
+
+Depends on D74801
+
+Differential Revision: https://phabricator.services.mozilla.com/D83994
+
+--HG--
+extra : moz-landing-system : lando
+---
+ nss/gtests/pk11_gtest/pk11_cipherop_unittest.cc | 49 +++++++++++++++++++++
+ nss/lib/softoken/pkcs11c.c | 1 +
+ 2 files changed, 50 insertions(+)
+
+CVE: CVE-2020-12403
+Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/06b2b1c50bd4eaa7f65d858e5e3f44f678cb3c45]
+Comment: Refreshed path for whole patchset and removed change for pkcs11c.c
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+diff --git a/nss/gtests/pk11_gtest/pk11_cipherop_unittest.cc b/nss/gtests/pk11_gtest/pk11_cipherop_unittest.cc
+index 38982fd885..700750cc90 100644
+--- a/nss/gtests/pk11_gtest/pk11_cipherop_unittest.cc
++++ b/nss/gtests/pk11_gtest/pk11_cipherop_unittest.cc
+@@ -77,4 +77,53 @@ TEST(Pkcs11CipherOp, SingleCtxMultipleUnalignedCipherOps) {
+ NSS_ShutdownContext(globalctx);
+ }
+
++TEST(Pkcs11CipherOp, SingleCtxMultipleUnalignedCipherOpsChaCha20) {
++ PK11SlotInfo* slot;
++ PK11SymKey* key;
++ PK11Context* ctx;
++
++ NSSInitContext* globalctx =
++ NSS_InitContext("", "", "", "", NULL,
++ NSS_INIT_READONLY | NSS_INIT_NOCERTDB | NSS_INIT_NOMODDB |
++ NSS_INIT_FORCEOPEN | NSS_INIT_NOROOTINIT);
++
++ const CK_MECHANISM_TYPE cipher = CKM_NSS_CHACHA20_CTR;
++
++ slot = PK11_GetInternalSlot();
++ ASSERT_TRUE(slot);
++
++ // Use arbitrary bytes for the ChaCha20 key and IV
++ uint8_t key_bytes[32];
++ for (size_t i = 0; i < 32; i++) {
++ key_bytes[i] = i;
++ }
++ SECItem keyItem = {siBuffer, key_bytes, 32};
++
++ uint8_t iv_bytes[16];
++ for (size_t i = 0; i < 16; i++) {
++ key_bytes[i] = i;
++ }
++ SECItem ivItem = {siBuffer, iv_bytes, 16};
++
++ SECItem* param = PK11_ParamFromIV(cipher, &ivItem);
++
++ key = PK11_ImportSymKey(slot, cipher, PK11_OriginUnwrap, CKA_ENCRYPT,
++ &keyItem, NULL);
++ ctx = PK11_CreateContextBySymKey(cipher, CKA_ENCRYPT, key, param);
++ ASSERT_TRUE(key);
++ ASSERT_TRUE(ctx);
++
++ uint8_t outbuf[128];
++ // This is supposed to fail for Chacha20. This is because the underlying
++ // PK11_CipherOp operation is calling the C_EncryptUpdate function for
++ // which multi-part is disabled for ChaCha20 in counter mode.
++ ASSERT_EQ(GetBytes(ctx, outbuf, 7), SECFailure);
++
++ PK11_FreeSymKey(key);
++ PK11_FreeSlot(slot);
++ SECITEM_FreeItem(param, PR_TRUE);
++ PK11_DestroyContext(ctx, PR_TRUE);
++ NSS_ShutdownContext(globalctx);
++}
++
+ } // namespace nss_test
diff --git a/meta-oe/recipes-support/nss/nss/CVE-2020-25648.patch b/meta-oe/recipes-support/nss/nss/CVE-2020-25648.patch
new file mode 100644
index 0000000000..f30d4d32cd
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/CVE-2020-25648.patch
@@ -0,0 +1,163 @@
+# HG changeset patch
+# User Daiki Ueno <dueno@redhat.com>
+# Date 1602524521 0
+# Node ID 57bbefa793232586d27cee83e74411171e128361
+# Parent 6e3bc17f05086854ffd2b06f7fae9371f7a0c174
+Bug 1641480, TLS 1.3: tighten CCS handling in compatibility mode, r=mt
+
+This makes the server reject CCS when the client doesn't indicate the
+use of the middlebox compatibility mode with a non-empty
+ClientHello.legacy_session_id, or it sends multiple CCS in a row.
+
+Differential Revision: https://phabricator.services.mozilla.com/D79994
+
+Upstream-Status: Backport
+CVE: CVE-2020-25648
+Reference to upstream patch: https://hg.mozilla.org/projects/nss/rev/57bbefa793232586d27cee83e74411171e128361
+Signed-off-by: Mathieu Dubois-Briand <mbriand@witekio.com>
+
+diff --color -Naur nss-3.51.1_old/nss/gtests/ssl_gtest/ssl_tls13compat_unittest.cc nss-3.51.1/nss/gtests/ssl_gtest/ssl_tls13compat_unittest.cc
+--- nss-3.51.1_old/nss/gtests/ssl_gtest/ssl_tls13compat_unittest.cc 2022-12-08 16:05:47.447142660 +0100
++++ nss-3.51.1/nss/gtests/ssl_gtest/ssl_tls13compat_unittest.cc 2022-12-08 16:12:32.645932052 +0100
+@@ -348,6 +348,85 @@
+ client_->CheckErrorCode(SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT);
+ }
+
++// The server rejects a ChangeCipherSpec if the client advertises an
++// empty session ID.
++TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterClientHelloEmptySid) {
++ EnsureTlsSetup();
++ ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3);
++
++ StartConnect();
++ client_->Handshake(); // Send ClientHello
++ client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs))); // Send CCS
++
++ server_->ExpectSendAlert(kTlsAlertUnexpectedMessage);
++ server_->Handshake(); // Consume ClientHello and CCS
++ server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
++}
++
++// The server rejects multiple ChangeCipherSpec even if the client
++// indicates compatibility mode with non-empty session ID.
++TEST_F(Tls13CompatTest, ChangeCipherSpecAfterClientHelloTwice) {
++ EnsureTlsSetup();
++ ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3);
++ EnableCompatMode();
++
++ StartConnect();
++ client_->Handshake(); // Send ClientHello
++ // Send CCS twice in a row
++ client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs)));
++ client_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs)));
++
++ server_->ExpectSendAlert(kTlsAlertUnexpectedMessage);
++ server_->Handshake(); // Consume ClientHello and CCS.
++ server_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
++}
++
++// The client rejects a ChangeCipherSpec if it advertises an empty
++// session ID.
++TEST_F(TlsConnectStreamTls13, ChangeCipherSpecAfterServerHelloEmptySid) {
++ EnsureTlsSetup();
++ ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3);
++
++ // To replace Finished with a CCS below
++ auto filter = MakeTlsFilter<TlsHandshakeDropper>(server_);
++ filter->SetHandshakeTypes({kTlsHandshakeFinished});
++ filter->EnableDecryption();
++
++ StartConnect();
++ client_->Handshake(); // Send ClientHello
++ server_->Handshake(); // Consume ClientHello, and
++ // send ServerHello..CertificateVerify
++ // Send CCS
++ server_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs)));
++ client_->ExpectSendAlert(kTlsAlertUnexpectedMessage);
++ client_->Handshake(); // Consume ClientHello and CCS
++ client_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
++}
++
++// The client rejects multiple ChangeCipherSpec in a row even if the
++// client indicates compatibility mode with non-empty session ID.
++TEST_F(Tls13CompatTest, ChangeCipherSpecAfterServerHelloTwice) {
++ EnsureTlsSetup();
++ ConfigureVersion(SSL_LIBRARY_VERSION_TLS_1_3);
++ EnableCompatMode();
++
++ // To replace Finished with a CCS below
++ auto filter = MakeTlsFilter<TlsHandshakeDropper>(server_);
++ filter->SetHandshakeTypes({kTlsHandshakeFinished});
++ filter->EnableDecryption();
++
++ StartConnect();
++ client_->Handshake(); // Send ClientHello
++ server_->Handshake(); // Consume ClientHello, and
++ // send ServerHello..CertificateVerify
++ // the ServerHello is followed by CCS
++ // Send another CCS
++ server_->SendDirect(DataBuffer(kCannedCcs, sizeof(kCannedCcs)));
++ client_->ExpectSendAlert(kTlsAlertUnexpectedMessage);
++ client_->Handshake(); // Consume ClientHello and CCS
++ client_->CheckErrorCode(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
++}
++
+ // If we negotiate 1.2, we abort.
+ TEST_F(TlsConnectStreamTls13, ChangeCipherSpecBeforeClientHello12) {
+ EnsureTlsSetup();
+diff --color -Naur nss-3.51.1_old/nss/lib/ssl/ssl3con.c nss-3.51.1/nss/lib/ssl/ssl3con.c
+--- nss-3.51.1_old/nss/lib/ssl/ssl3con.c 2022-12-08 16:05:47.471142833 +0100
++++ nss-3.51.1/nss/lib/ssl/ssl3con.c 2022-12-08 16:12:42.037994262 +0100
+@@ -6711,7 +6711,11 @@
+
+ /* TLS 1.3: We sent a session ID. The server's should match. */
+ if (!IS_DTLS(ss) && (sentRealSid || sentFakeSid)) {
+- return sidMatch;
++ if (sidMatch) {
++ ss->ssl3.hs.allowCcs = PR_TRUE;
++ return PR_TRUE;
++ }
++ return PR_FALSE;
+ }
+
+ /* TLS 1.3 (no SID)/DTLS 1.3: The server shouldn't send a session ID. */
+@@ -8730,6 +8734,7 @@
+ errCode = PORT_GetError();
+ goto alert_loser;
+ }
++ ss->ssl3.hs.allowCcs = PR_TRUE;
+ }
+
+ /* TLS 1.3 requires that compression include only null. */
+@@ -13058,8 +13063,15 @@
+ ss->ssl3.hs.ws != idle_handshake &&
+ cText->buf->len == 1 &&
+ cText->buf->buf[0] == change_cipher_spec_choice) {
+- /* Ignore the CCS. */
+- return SECSuccess;
++ if (ss->ssl3.hs.allowCcs) {
++ /* Ignore the first CCS. */
++ ss->ssl3.hs.allowCcs = PR_FALSE;
++ return SECSuccess;
++ }
++
++ /* Compatibility mode is not negotiated. */
++ alert = unexpected_message;
++ PORT_SetError(SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER);
+ }
+
+ if (IS_DTLS(ss) ||
+diff --color -Naur nss-3.51.1_old/nss/lib/ssl/sslimpl.h nss-3.51.1/nss/lib/ssl/sslimpl.h
+--- nss-3.51.1_old/nss/lib/ssl/sslimpl.h 2022-12-08 16:05:47.471142833 +0100
++++ nss-3.51.1/nss/lib/ssl/sslimpl.h 2022-12-08 16:12:45.106014567 +0100
+@@ -711,6 +711,10 @@
+ * or received. */
+ PRBool receivedCcs; /* A server received ChangeCipherSpec
+ * before the handshake started. */
++ PRBool allowCcs; /* A server allows ChangeCipherSpec
++ * as the middlebox compatibility mode
++ * is explicitly indicarted by
++ * legacy_session_id in TLS 1.3 ClientHello. */
+ PRBool clientCertRequested; /* True if CertificateRequest received. */
+ ssl3KEADef kea_def_mutable; /* Used to hold the writable kea_def
+ * we use for TLS 1.3 */
diff --git a/meta-oe/recipes-support/nss/nss/CVE-2021-43527.patch b/meta-oe/recipes-support/nss/nss/CVE-2021-43527.patch
new file mode 100644
index 0000000000..cf3ea63cac
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/CVE-2021-43527.patch
@@ -0,0 +1,283 @@
+Description: fix heap overflow when verifying DSA/RSA-PSS DER-encoded signatures
+Origin: Provided by Mozilla
+
+CVE: CVE-2021-43527
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/n/nss/nss_3.35-2ubuntu2.13.debian.tar.xz]
+Comment: Refreshed hunk 1 and 6 due to fuzz
+Signed-off-by: Sana Kazi <Sana.Kazi@kpit.com>
+
+--- a/nss/lib/cryptohi/secvfy.c
++++ b/nss/lib/cryptohi/secvfy.c
+@@ -164,6 +164,37 @@
+ PR_FALSE /*XXX: unsafeAllowMissingParameters*/);
+ }
+
++static unsigned int
++checkedSignatureLen(const SECKEYPublicKey *pubk)
++{
++ unsigned int sigLen = SECKEY_SignatureLen(pubk);
++ if (sigLen == 0) {
++ /* Error set by SECKEY_SignatureLen */
++ return sigLen;
++ }
++ unsigned int maxSigLen;
++ switch (pubk->keyType) {
++ case rsaKey:
++ case rsaPssKey:
++ maxSigLen = (RSA_MAX_MODULUS_BITS + 7) / 8;
++ break;
++ case dsaKey:
++ maxSigLen = DSA_MAX_SIGNATURE_LEN;
++ break;
++ case ecKey:
++ maxSigLen = 2 * MAX_ECKEY_LEN;
++ break;
++ default:
++ PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
++ return 0;
++ }
++ if (sigLen > maxSigLen) {
++ PORT_SetError(SEC_ERROR_INVALID_KEY);
++ return 0;
++ }
++ return sigLen;
++}
++
+ /*
+ * decode the ECDSA or DSA signature from it's DER wrapping.
+ * The unwrapped/raw signature is placed in the buffer pointed
+@@ -174,38 +205,38 @@ decodeECorDSASignature(SECOidTag algid,
+ unsigned int len)
+ {
+ SECItem *dsasig = NULL; /* also used for ECDSA */
+- SECStatus rv = SECSuccess;
+
+- if ((algid != SEC_OID_ANSIX9_DSA_SIGNATURE) &&
+- (algid != SEC_OID_ANSIX962_EC_PUBLIC_KEY)) {
+- if (sig->len != len) {
+- PORT_SetError(SEC_ERROR_BAD_DER);
+- return SECFailure;
++ /* Safety: Ensure algId is as expected and that signature size is within maxmimums */
++ if (algid == SEC_OID_ANSIX9_DSA_SIGNATURE) {
++ if (len > DSA_MAX_SIGNATURE_LEN) {
++ goto loser;
+ }
+-
+- PORT_Memcpy(dsig, sig->data, sig->len);
+- return SECSuccess;
+- }
+-
+- if (algid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
++ } else if (algid == SEC_OID_ANSIX962_EC_PUBLIC_KEY) {
+ if (len > MAX_ECKEY_LEN * 2) {
+- PORT_SetError(SEC_ERROR_BAD_DER);
+- return SECFailure;
++ goto loser;
+ }
+- }
+- dsasig = DSAU_DecodeDerSigToLen((SECItem *)sig, len);
+-
+- if ((dsasig == NULL) || (dsasig->len != len)) {
+- rv = SECFailure;
+ } else {
+- PORT_Memcpy(dsig, dsasig->data, dsasig->len);
++ goto loser;
+ }
+
+- if (dsasig != NULL)
++ /* Decode and pad to length */
++ dsasig = DSAU_DecodeDerSigToLen((SECItem *)sig, len);
++ if (dsasig == NULL) {
++ goto loser;
++ }
++ if (dsasig->len != len) {
+ SECITEM_FreeItem(dsasig, PR_TRUE);
+- if (rv == SECFailure)
+- PORT_SetError(SEC_ERROR_BAD_DER);
+- return rv;
++ goto loser;
++ }
++
++ PORT_Memcpy(dsig, dsasig->data, len);
++ SECITEM_FreeItem(dsasig, PR_TRUE);
++
++ return SECSuccess;
++
++loser:
++ PORT_SetError(SEC_ERROR_BAD_DER);
++ return SECFailure;
+ }
+
+ const SEC_ASN1Template hashParameterTemplate[] =
+@@ -231,7 +262,7 @@ SECStatus
+ sec_DecodeSigAlg(const SECKEYPublicKey *key, SECOidTag sigAlg,
+ const SECItem *param, SECOidTag *encalg, SECOidTag *hashalg)
+ {
+- int len;
++ unsigned int len;
+ PLArenaPool *arena;
+ SECStatus rv;
+ SECItem oid;
+@@ -458,48 +489,52 @@ vfy_CreateContext(const SECKEYPublicKey
+ cx->pkcs1RSADigestInfo = NULL;
+ rv = SECSuccess;
+ if (sig) {
+- switch (type) {
+- case rsaKey:
+- rv = recoverPKCS1DigestInfo(hashAlg, &cx->hashAlg,
+- &cx->pkcs1RSADigestInfo,
+- &cx->pkcs1RSADigestInfoLen,
+- cx->key,
+- sig, wincx);
+- break;
+- case rsaPssKey:
+- sigLen = SECKEY_SignatureLen(key);
+- if (sigLen == 0) {
+- /* error set by SECKEY_SignatureLen */
+- rv = SECFailure;
++ rv = SECFailure;
++ if (type == rsaKey) {
++ rv = recoverPKCS1DigestInfo(hashAlg, &cx->hashAlg,
++ &cx->pkcs1RSADigestInfo,
++ &cx->pkcs1RSADigestInfoLen,
++ cx->key,
++ sig, wincx);
++ } else {
++ sigLen = checkedSignatureLen(key);
++ /* Check signature length is within limits */
++ if (sigLen == 0) {
++ /* error set by checkedSignatureLen */
++ rv = SECFailure;
++ goto loser;
++ }
++ if (sigLen > sizeof(cx->u)) {
++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
++ rv = SECFailure;
++ goto loser;
++ }
++ switch (type) {
++ case rsaPssKey:
++ if (sig->len != sigLen) {
++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
++ rv = SECFailure;
++ goto loser;
++ }
++ PORT_Memcpy(cx->u.buffer, sig->data, sigLen);
++ rv = SECSuccess;
+ break;
+- }
+- if (sig->len != sigLen) {
+- PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
+- rv = SECFailure;
++ case ecKey:
++ case dsaKey:
++ /* decodeECorDSASignature will check sigLen == sig->len after padding */
++ rv = decodeECorDSASignature(encAlg, sig, cx->u.buffer, sigLen);
+ break;
+- }
+- PORT_Memcpy(cx->u.buffer, sig->data, sigLen);
+- break;
+- case dsaKey:
+- case ecKey:
+- sigLen = SECKEY_SignatureLen(key);
+- if (sigLen == 0) {
+- /* error set by SECKEY_SignatureLen */
++ default:
++ /* Unreachable */
+ rv = SECFailure;
+- break;
+- }
+- rv = decodeECorDSASignature(encAlg, sig, cx->u.buffer, sigLen);
+- break;
+- default:
+- rv = SECFailure;
+- PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
+- break;
++ goto loser;
++ }
++ }
++ if (rv != SECSuccess) {
++ goto loser;
+ }
+ }
+
+- if (rv)
+- goto loser;
+-
+ /* check hash alg again, RSA may have changed it.*/
+ if (HASH_GetHashTypeByOidTag(cx->hashAlg) == HASH_AlgNULL) {
+ /* error set by HASH_GetHashTypeByOidTag */
+@@ -634,11 +669,16 @@ VFY_EndWithSignature(VFYContext *cx, SEC
+ switch (cx->key->keyType) {
+ case ecKey:
+ case dsaKey:
+- dsasig.data = cx->u.buffer;
+- dsasig.len = SECKEY_SignatureLen(cx->key);
++ dsasig.len = checkedSignatureLen(cx->key);
+ if (dsasig.len == 0) {
+ return SECFailure;
+ }
++ if (dsasig.len > sizeof(cx->u)) {
++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
++ return SECFailure;
++ }
++ dsasig.data = cx->u.buffer;
++
+ if (sig) {
+ rv = decodeECorDSASignature(cx->encAlg, sig, dsasig.data,
+ dsasig.len);
+@@ -667,8 +698,13 @@
+ }
+
+ rsasig.data = cx->u.buffer;
+- rsasig.len = SECKEY_SignatureLen(cx->key);
++ rsasig.len = checkedSignatureLen(cx->key);
+ if (rsasig.len == 0) {
++ /* Error set by checkedSignatureLen */
++ return SECFailure;
++ }
++ if (rsasig.len > sizeof(cx->u)) {
++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
+ return SECFailure;
+ }
+ if (sig) {
+@@ -743,7 +788,6 @@ vfy_VerifyDigest(const SECItem *digest,
+ SECStatus rv;
+ VFYContext *cx;
+ SECItem dsasig; /* also used for ECDSA */
+-
+ rv = SECFailure;
+
+ cx = vfy_CreateContext(key, sig, encAlg, hashAlg, NULL, wincx);
+@@ -751,19 +795,25 @@ vfy_VerifyDigest(const SECItem *digest,
+ switch (key->keyType) {
+ case rsaKey:
+ rv = verifyPKCS1DigestInfo(cx, digest);
++ /* Error (if any) set by verifyPKCS1DigestInfo */
+ break;
+- case dsaKey:
+ case ecKey:
++ case dsaKey:
+ dsasig.data = cx->u.buffer;
+- dsasig.len = SECKEY_SignatureLen(cx->key);
++ dsasig.len = checkedSignatureLen(cx->key);
+ if (dsasig.len == 0) {
++ /* Error set by checkedSignatureLen */
++ rv = SECFailure;
+ break;
+ }
+- if (PK11_Verify(cx->key, &dsasig, (SECItem *)digest, cx->wincx) !=
+- SECSuccess) {
++ if (dsasig.len > sizeof(cx->u)) {
++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
++ rv = SECFailure;
++ break;
++ }
++ rv = PK11_Verify(cx->key, &dsasig, (SECItem *)digest, cx->wincx);
++ if (rv != SECSuccess) {
+ PORT_SetError(SEC_ERROR_BAD_SIGNATURE);
+- } else {
+- rv = SECSuccess;
+ }
+ break;
+ default:
diff --git a/meta-oe/recipes-support/nss/nss/CVE-2022-22747.patch b/meta-oe/recipes-support/nss/nss/CVE-2022-22747.patch
new file mode 100644
index 0000000000..cccb73187d
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/CVE-2022-22747.patch
@@ -0,0 +1,63 @@
+# HG changeset patch
+# User John M. Schanck <jschanck@mozilla.com>
+# Date 1633990165 0
+# Node ID 7ff99e71f3e37faed12bc3cc90a3eed27e3418d0
+# Parent f80fafd04cf82b4d315c8fe42bb4639703f6ee4f
+Bug 1735028 - check for missing signedData field r=keeler
+
+Differential Revision: https://phabricator.services.mozilla.com/D128112
+
+Upstream-Status: Backport [https://hg.mozilla.org/projects/nss/raw-rev/7ff99e71f3e37faed12bc3cc90a3eed27e3418d0]
+CVE: CVE-2022-22747
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+
+diff --git a/nss/gtests/certdb_gtest/decode_certs_unittest.cc b/nss/gtests/certdb_gtest/decode_certs_unittest.cc
+--- a/nss/gtests/certdb_gtest/decode_certs_unittest.cc
++++ b/nss/gtests/certdb_gtest/decode_certs_unittest.cc
+@@ -21,8 +21,21 @@ TEST_F(DecodeCertsTest, EmptyCertPackage
+ unsigned char emptyCertPackage[] = {0x30, 0x0f, 0x06, 0x09, 0x60, 0x86,
+ 0x48, 0x01, 0x86, 0xf8, 0x42, 0x02,
+ 0x05, 0xa0, 0x02, 0x30, 0x00};
+ EXPECT_EQ(nullptr, CERT_DecodeCertFromPackage(
+ reinterpret_cast<char*>(emptyCertPackage),
+ sizeof(emptyCertPackage)));
+ EXPECT_EQ(SEC_ERROR_BAD_DER, PR_GetError());
+ }
++
++TEST_F(DecodeCertsTest, EmptySignedData) {
++ // This represents a PKCS#7 ContentInfo of contentType
++ // 1.2.840.113549.1.7.2 (signedData) with missing content.
++ unsigned char emptySignedData[] = {0x30, 0x80, 0x06, 0x09, 0x2a, 0x86,
++ 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07,
++ 0x02, 0x00, 0x00, 0x05, 0x00};
++
++ EXPECT_EQ(nullptr,
++ CERT_DecodeCertFromPackage(reinterpret_cast<char*>(emptySignedData),
++ sizeof(emptySignedData)));
++ EXPECT_EQ(SEC_ERROR_BAD_DER, PR_GetError());
++}
+diff --git a/nss/lib/pkcs7/certread.c b/nss/lib/pkcs7/certread.c
+--- a/nss/lib/pkcs7/certread.c
++++ b/nss/lib/pkcs7/certread.c
+@@ -134,16 +134,21 @@ SEC_ReadPKCS7Certs(SECItem *pkcs7Item, C
+ pkcs7Item) != SECSuccess) {
+ goto done;
+ }
+
+ if (GetContentTypeTag(&contentInfo) != SEC_OID_PKCS7_SIGNED_DATA) {
+ goto done;
+ }
+
++ if (contentInfo.content.signedData == NULL) {
++ PORT_SetError(SEC_ERROR_BAD_DER);
++ goto done;
++ }
++
+ rv = SECSuccess;
+
+ certs = contentInfo.content.signedData->certificates;
+ if (certs) {
+ count = 0;
+
+ while (*certs) {
+ count++;
diff --git a/meta-oe/recipes-support/nss/nss/CVE-2023-0767.patch b/meta-oe/recipes-support/nss/nss/CVE-2023-0767.patch
new file mode 100644
index 0000000000..ec3b4a092a
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/CVE-2023-0767.patch
@@ -0,0 +1,124 @@
+
+# HG changeset patch
+# User John M. Schanck <jschanck@mozilla.com>
+# Date 1675974326 0
+# Node ID 62f6b3e9024dd72ba3af9ce23848d7573b934f18
+# Parent 52b4b7d3d3ebdb25fbf2cf1c101bfad3721680f4
+Bug 1804640 - improve handling of unknown PKCS#12 safe bag types. r=rrelyea
+
+Differential Revision: https://phabricator.services.mozilla.com/D167443
+
+CVE: CVE-2023-0767
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/nss/2:3.35-2ubuntu2.16/nss_3.35-2ubuntu2.16.debian.tar.xz]
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+
+diff --git a/nss/lib/pkcs12/p12d.c b/nss/lib/pkcs12/p12d.c
+--- a/nss/lib/pkcs12/p12d.c
++++ b/nss/lib/pkcs12/p12d.c
+@@ -332,41 +332,48 @@ sec_pkcs12_decoder_safe_bag_update(void
+ unsigned long len, int depth,
+ SEC_ASN1EncodingPart data_kind)
+ {
+ sec_PKCS12SafeContentsContext *safeContentsCtx =
+ (sec_PKCS12SafeContentsContext *)arg;
+ SEC_PKCS12DecoderContext *p12dcx;
+ SECStatus rv;
+
+- /* make sure that we are not skipping the current safeBag,
+- * and that there are no errors. If so, just return rather
+- * than continuing to process.
+- */
+- if (!safeContentsCtx || !safeContentsCtx->p12dcx ||
+- safeContentsCtx->p12dcx->error || safeContentsCtx->skipCurrentSafeBag) {
++ if (!safeContentsCtx || !safeContentsCtx->p12dcx || !safeContentsCtx->currentSafeBagA1Dcx) {
+ return;
+ }
+ p12dcx = safeContentsCtx->p12dcx;
+
++ /* make sure that there are no errors and we are not skipping the current safeBag */
++ if (p12dcx->error || safeContentsCtx->skipCurrentSafeBag) {
++ goto loser;
++ }
++
+ rv = SEC_ASN1DecoderUpdate(safeContentsCtx->currentSafeBagA1Dcx, data, len);
+ if (rv != SECSuccess) {
+ p12dcx->errorValue = PORT_GetError();
++ p12dcx->error = PR_TRUE;
++ goto loser;
++ }
++
++ /* The update may have set safeContentsCtx->skipCurrentSafeBag, and we
++ * may not get another opportunity to clean up the decoder context.
++ */
++ if (safeContentsCtx->skipCurrentSafeBag) {
+ goto loser;
+ }
+
+ return;
+
+ loser:
+- /* set the error, and finish the decoder context. because there
++ /* Finish the decoder context. Because there
+ * is not a way of returning an error message, it may be worth
+ * while to do a check higher up and finish any decoding contexts
+ * that are still open.
+ */
+- p12dcx->error = PR_TRUE;
+ SEC_ASN1DecoderFinish(safeContentsCtx->currentSafeBagA1Dcx);
+ safeContentsCtx->currentSafeBagA1Dcx = NULL;
+ return;
+ }
+
+ /* notify function for decoding safeBags. This function is
+ * used to filter safeBag types which are not supported,
+ * initiate the decoding of nested safe contents, and decode
+diff --git a/nss/lib/pkcs12/p12t.h b/nss/lib/pkcs12/p12t.h
+--- a/nss/lib/pkcs12/p12t.h
++++ b/nss/lib/pkcs12/p12t.h
+@@ -68,16 +68,17 @@ struct sec_PKCS12SafeBagStr {
+ /* Dependent upon the type of bag being used. */
+ union {
+ SECKEYPrivateKeyInfo *pkcs8KeyBag;
+ SECKEYEncryptedPrivateKeyInfo *pkcs8ShroudedKeyBag;
+ sec_PKCS12CertBag *certBag;
+ sec_PKCS12CRLBag *crlBag;
+ sec_PKCS12SecretBag *secretBag;
+ sec_PKCS12SafeContents *safeContents;
++ SECItem *unknownBag;
+ } safeBagContent;
+
+ sec_PKCS12Attribute **attribs;
+
+ /* used locally */
+ SECOidData *bagTypeTag;
+ PLArenaPool *arena;
+ unsigned int nAttribs;
+diff --git a/nss/lib/pkcs12/p12tmpl.c b/nss/lib/pkcs12/p12tmpl.c
+--- a/nss/lib/pkcs12/p12tmpl.c
++++ b/nss/lib/pkcs12/p12tmpl.c
+@@ -25,22 +25,22 @@ sec_pkcs12_choose_safe_bag_type(void *sr
+ if (src_or_dest == NULL) {
+ return NULL;
+ }
+
+ safeBag = (sec_PKCS12SafeBag *)src_or_dest;
+
+ oiddata = SECOID_FindOID(&safeBag->safeBagType);
+ if (oiddata == NULL) {
+- return SEC_ASN1_GET(SEC_AnyTemplate);
++ return SEC_ASN1_GET(SEC_PointerToAnyTemplate);
+ }
+
+ switch (oiddata->offset) {
+ default:
+- theTemplate = SEC_ASN1_GET(SEC_AnyTemplate);
++ theTemplate = SEC_ASN1_GET(SEC_PointerToAnyTemplate);
+ break;
+ case SEC_OID_PKCS12_V1_KEY_BAG_ID:
+ theTemplate = SEC_ASN1_GET(SECKEY_PointerToPrivateKeyInfoTemplate);
+ break;
+ case SEC_OID_PKCS12_V1_CERT_BAG_ID:
+ theTemplate = sec_PKCS12PointerToCertBagTemplate;
+ break;
+ case SEC_OID_PKCS12_V1_CRL_BAG_ID:
+
diff --git a/meta-oe/recipes-support/nss/nss_3.51.1.bb b/meta-oe/recipes-support/nss/nss_3.51.1.bb
index ac046ed0fe..af842ee67c 100644
--- a/meta-oe/recipes-support/nss/nss_3.51.1.bb
+++ b/meta-oe/recipes-support/nss/nss_3.51.1.bb
@@ -37,6 +37,14 @@ SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO
file://0001-Bug-1631576-Force-a-fixed-length-for-DSA-exponentiat.patch \
file://CVE-2020-12401.patch \
file://CVE-2020-6829_12400.patch \
+ file://CVE-2020-12403_1.patch \
+ file://CVE-2020-12403_2.patch \
+ file://CVE-2020-25648.patch \
+ file://CVE-2021-43527.patch \
+ file://CVE-2022-22747.patch \
+ file://CVE-2023-0767.patch \
+ file://0001-Bug-1812671-build-failure-while-implicitly-casting-S.patch;patchdir=nss \
+ file://0001-Bug-1826650-cmd-ecperf-fix-dangling-pointer-warning-.patch;patchdir=nss \
"
SRC_URI[md5sum] = "6acaf1ddff69306ae30a908881c6f233"
@@ -287,5 +295,11 @@ RDEPENDS_${PN}-smime = "perl"
BBCLASSEXTEND = "native nativesdk"
+CVE_PRODUCT += "network_security_services"
+
# CVE-2006-5201 affects only Sun Solaris
CVE_CHECK_WHITELIST += "CVE-2006-5201"
+
+# CVES CVE-2017-11695 CVE-2017-11696 CVE-2017-11697 CVE-2017-11698 only affect
+# the legacy db (libnssdbm), only compiled with --enable-legacy-db.
+CVE_CHECK_WHITELIST += "CVE-2017-11695 CVE-2017-11696 CVE-2017-11697 CVE-2017-11698"
diff --git a/meta-oe/recipes-support/numactl/numactl_git.bb b/meta-oe/recipes-support/numactl/numactl_git.bb
index 20b7fed862..af082237c3 100644
--- a/meta-oe/recipes-support/numactl/numactl_git.bb
+++ b/meta-oe/recipes-support/numactl/numactl_git.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://README.md;beginline=19;endline=32;md5=f8ff2391624f28e
SRCREV = "5d9f16722e3df49dc618a9f361bd482559695db7"
PV = "2.0.13+git${SRCPV}"
-SRC_URI = "git://github.com/numactl/numactl \
+SRC_URI = "git://github.com/numactl/numactl;branch=master;protocol=https \
file://Fix-the-test-output-format.patch \
file://Makefile \
file://run-ptest \
diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Allow-only-X509-certs-to-verify-the-SAML-token-signa.patch b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Allow-only-X509-certs-to-verify-the-SAML-token-signa.patch
new file mode 100644
index 0000000000..38daa05817
--- /dev/null
+++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Allow-only-X509-certs-to-verify-the-SAML-token-signa.patch
@@ -0,0 +1,35 @@
+From 7f3cced1e140ed36c6f8f66d7f4098323b0463b2 Mon Sep 17 00:00:00 2001
+From: Katy Feng <fkaty@vmware.com>
+Date: Fri, 25 Aug 2023 11:58:48 -0700
+Subject: [PATCH] Allow only X509 certs to verify the SAML token signature.
+
+Upstream-Status: Backport from https://github.com/vmware/open-vm-tools/commit/74b6d0d9000eda1a2c8f31c40c725fb0b8520b16
+CVE: CVE-2023-20900
+Signed-off-by: Priyal Doshi <pdoshi@mvista.com>
+---
+ open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c b/open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c
+index 2906d29..57db3b8 100644
+--- a/open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c
++++ b/open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c
+@@ -1275,7 +1275,14 @@ VerifySignature(xmlDocPtr doc,
+ */
+ bRet = RegisterID(xmlDocGetRootElement(doc), "ID");
+ if (bRet == FALSE) {
+- g_warning("failed to register ID\n");
++ g_warning("Failed to register ID\n");
++ goto done;
++ }
++
++ /* Use only X509 certs to validate the signature */
++ if (xmlSecPtrListAdd(&(dsigCtx->keyInfoReadCtx.enabledKeyData),
++ BAD_CAST xmlSecKeyDataX509Id) < 0) {
++ g_warning("Failed to limit allowed key data\n");
+ goto done;
+ }
+
+--
+2.7.4
+
diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Properly-check-authorization-on-incoming-guestOps-re.patch b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Properly-check-authorization-on-incoming-guestOps-re.patch
new file mode 100644
index 0000000000..1c6657ae9f
--- /dev/null
+++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Properly-check-authorization-on-incoming-guestOps-re.patch
@@ -0,0 +1,39 @@
+From d16eda269413bdb04e85c242fa28db264697c45f Mon Sep 17 00:00:00 2001
+From: John Wolfe <jwolfe@vmware.com>
+Date: Sun, 21 Aug 2022 07:56:49 -0700
+Subject: [PATCH] Properly check authorization on incoming guestOps requests.
+
+Fix public pipe request checks. Only a SessionRequest type should
+be accepted on the public pipe.
+
+Upstream-Status: Backport from https://github.com/vmware/open-vm-tools/commit/70a74758bfe0042c27f15ce590fb21a2bc54d745
+CVE: CVE-2022-31676
+Signed-off-by: Priyal Doshi <pdoshi@mvista.com>
+---
+ open-vm-tools/vgauth/serviceImpl/proto.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/open-vm-tools/vgauth/serviceImpl/proto.c b/open-vm-tools/vgauth/serviceImpl/proto.c
+index f097fb6..0ebaa7b 100644
+--- a/open-vm-tools/vgauth/serviceImpl/proto.c
++++ b/open-vm-tools/vgauth/serviceImpl/proto.c
+@@ -1,5 +1,5 @@
+ /*********************************************************
+- * Copyright (C) 2011-2016,2019 VMware, Inc. All rights reserved.
++ * Copyright (C) 2011-2016,2019-2022 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+@@ -1202,6 +1202,10 @@ Proto_SecurityCheckRequest(ServiceConnection *conn,
+ VGAuthError err;
+ gboolean isSecure = ServiceNetworkIsConnectionPrivateSuperUser(conn);
+
++ if (conn->isPublic && req->reqType != PROTO_REQUEST_SESSION_REQ) {
++ return VGAUTH_E_PERMISSION_DENIED;
++ }
++
+ switch (req->reqType) {
+ /*
+ * This comes over the public connection; alwsys let it through.
+--
+2.7.4
diff --git a/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb b/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb
index 34a81d21f0..e3b15e35b6 100644
--- a/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb
+++ b/meta-oe/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb
@@ -21,7 +21,7 @@ LICENSE_modules/freebsd/vmxnet = "GPL-2.0"
LICENSE_modules/linux = "GPL-2.0"
LICENSE_modules/solaris = "CDDL-1.0"
-SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \
+SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https;branch=master \
file://tools.conf \
file://vmtoolsd.service \
file://vmtoolsd.init \
@@ -43,6 +43,8 @@ SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \
file://0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \
file://0001-utilBacktrace-Ignore-Warray-bounds.patch;patchdir=.. \
file://0001-hgfsmounter-Makefile.am-support-usrmerge.patch;patchdir=.. \
+ file://0001-Properly-check-authorization-on-incoming-guestOps-re.patch;patchdir=.. \
+ file://0001-Allow-only-X509-certs-to-verify-the-SAML-token-signa.patch;patchdir=.. \
"
SRCREV = "d3edfd142a81096f9f58aff17d84219b457f4987"
diff --git a/meta-oe/recipes-support/opencl/clinfo_2.2.18.04.06.bb b/meta-oe/recipes-support/opencl/clinfo_2.2.18.04.06.bb
index 9fd88ced95..831b15a455 100644
--- a/meta-oe/recipes-support/opencl/clinfo_2.2.18.04.06.bb
+++ b/meta-oe/recipes-support/opencl/clinfo_2.2.18.04.06.bb
@@ -7,7 +7,7 @@ HOMEPAGE = "https://github.com/Oblomov/clinfo"
LICENSE = "CC0-1.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fd8857f774dfb0eefe1e80c8f9240a7e"
-SRC_URI = "git://github.com/Oblomov/clinfo.git;protocol=https"
+SRC_URI = "git://github.com/Oblomov/clinfo.git;protocol=https;branch=master"
SRCREV = "59d0daf898e48d76ccbb788acbba258fa0a8ba7c"
diff --git a/meta-oe/recipes-support/opencv/ade_0.1.1f.bb b/meta-oe/recipes-support/opencv/ade_0.1.1f.bb
index 3861802158..7e9bbc31c9 100644
--- a/meta-oe/recipes-support/opencv/ade_0.1.1f.bb
+++ b/meta-oe/recipes-support/opencv/ade_0.1.1f.bb
@@ -4,7 +4,7 @@ and processing framework. ADE Framework is suitable for \
organizing data flow processing and execution."
HOMEPAGE = "https://github.com/opencv/ade"
-SRC_URI = "git://github.com/opencv/ade.git \
+SRC_URI = "git://github.com/opencv/ade.git;branch=master;protocol=https \
file://0001-use-GNUInstallDirs-for-detecting-install-paths.patch \
"
diff --git a/meta-oe/recipes-support/opencv/opencv_4.1.0.bb b/meta-oe/recipes-support/opencv/opencv_4.1.0.bb
index 19d5d0c891..d7a0158749 100644
--- a/meta-oe/recipes-support/opencv/opencv_4.1.0.bb
+++ b/meta-oe/recipes-support/opencv/opencv_4.1.0.bb
@@ -37,12 +37,12 @@ IPP_FILENAME = "${@ipp_filename(d)}"
IPP_MD5 = "${@ipp_md5sum(d)}"
SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
-SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
- git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
- git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20180723;destsuffix=ipp;name=ipp \
- git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
- git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
- git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face \
+SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \
+ git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib;branch=master;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20180723;destsuffix=ipp;name=ipp;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face;protocol=https \
file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \
file://0003-To-fix-errors-as-following.patch \
diff --git a/meta-oe/recipes-support/openldap/openldap/CVE-2021-27212.patch b/meta-oe/recipes-support/openldap/openldap/CVE-2021-27212.patch
new file mode 100644
index 0000000000..c6bac80061
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap/CVE-2021-27212.patch
@@ -0,0 +1,31 @@
+From 9badb73425a67768c09bcaed1a9c26c684af6c30 Mon Sep 17 00:00:00 2001
+From: Howard Chu <hyc@openldap.org>
+Date: Sat, 6 Feb 2021 20:52:06 +0000
+Subject: [PATCH] ITS#9454 fix issuerAndThisUpdateCheck
+
+
+Signed-off-by: Howard Chu <hyc@openldap.org>
+
+Upstream-Status: Backport [https://git.openldap.org/openldap/openldap/-/commit/9badb73425a67768c09bcaed1a9c26c684af6c30]
+CVE: CVE-2021-27212
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ servers/slapd/schema_init.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c
+index 31be115..8b1e255 100644
+--- a/servers/slapd/schema_init.c
++++ b/servers/slapd/schema_init.c
+@@ -3900,6 +3900,8 @@ issuerAndThisUpdateCheck(
+ break;
+ }
+ }
++ if ( tu->bv_len < STRLENOF("YYYYmmddHHmmssZ") ) return LDAP_INVALID_SYNTAX;
++
+ x.bv_val += tu->bv_len + 1;
+ x.bv_len -= tu->bv_len + 1;
+
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/openldap/openldap/CVE-2022-29155.patch b/meta-oe/recipes-support/openldap/openldap/CVE-2022-29155.patch
new file mode 100644
index 0000000000..2860b95220
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap/CVE-2022-29155.patch
@@ -0,0 +1,277 @@
+From 11e136f15085a4bda5701e910988966bed699977 Mon Sep 17 00:00:00 2001
+From: Hitendra Prajapati <hprajapati@mvista.com>
+Date: Wed, 18 May 2022 13:57:59 +0530
+Subject: [PATCH] CVE-2022-29155
+
+Upstream-Status: Backport [https://git.openldap.org/openldap/openldap/-/commit/87df6c19915042430540931d199a39105544a134]
+CVE: CVE-2022-29155
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+
+---
+ servers/slapd/back-sql/search.c | 123 +++++++++++++++++++++++++++-----
+ 1 file changed, 105 insertions(+), 18 deletions(-)
+
+diff --git a/servers/slapd/back-sql/search.c b/servers/slapd/back-sql/search.c
+index bb0f1e2..1770bde 100644
+--- a/servers/slapd/back-sql/search.c
++++ b/servers/slapd/back-sql/search.c
+@@ -63,6 +63,38 @@ static void send_paged_response(
+ ID *lastid );
+ #endif /* ! BACKSQL_ARBITRARY_KEY */
+
++/* Look for chars that need to be escaped, return count of them.
++ * If out is non-NULL, copy escape'd val to it.
++ */
++static int
++backsql_val_escape( Operation *op, struct berval *in, struct berval *out )
++{
++ char *ptr, *end;
++ int q = 0;
++
++ ptr = in->bv_val;
++ end = ptr + in->bv_len;
++ while (ptr < end) {
++ if ( *ptr == '\'' )
++ q++;
++ ptr++;
++ }
++ if ( q && out ) {
++ char *dst;
++ out->bv_len = in->bv_len + q;
++ out->bv_val = op->o_tmpalloc( out->bv_len + 1, op->o_tmpmemctx );
++ ptr = in->bv_val;
++ dst = out->bv_val;
++ while (ptr < end ) {
++ if ( *ptr == '\'' )
++ *dst++ = '\'';
++ *dst++ = *ptr++;
++ }
++ *dst = '\0';
++ }
++ return q;
++}
++
+ static int
+ backsql_attrlist_add( backsql_srch_info *bsi, AttributeDescription *ad )
+ {
+@@ -429,6 +461,8 @@ backsql_process_sub_filter( backsql_srch_info *bsi, Filter *f,
+ backsql_info *bi = (backsql_info *)bsi->bsi_op->o_bd->be_private;
+ int i;
+ int casefold = 0;
++ int escaped = 0;
++ struct berval escval, *fvalue;
+
+ if ( !f ) {
+ return 0;
+@@ -462,50 +496,68 @@ backsql_process_sub_filter( backsql_srch_info *bsi, Filter *f,
+
+ BER_BVZERO( &bv );
+ if ( f->f_sub_initial.bv_val ) {
+- bv.bv_len += f->f_sub_initial.bv_len;
++ bv.bv_len += f->f_sub_initial.bv_len + backsql_val_escape( NULL, &f->f_sub_initial, NULL );
+ }
+ if ( f->f_sub_any != NULL ) {
+ for ( a = 0; f->f_sub_any[ a ].bv_val != NULL; a++ ) {
+- bv.bv_len += f->f_sub_any[ a ].bv_len;
++ bv.bv_len += f->f_sub_any[ a ].bv_len + backsql_val_escape( NULL, &f->f_sub_any[ a ], NULL );
+ }
+ }
+ if ( f->f_sub_final.bv_val ) {
+- bv.bv_len += f->f_sub_final.bv_len;
++ bv.bv_len += f->f_sub_final.bv_len + backsql_val_escape( NULL, &f->f_sub_final, NULL );
+ }
+ bv.bv_len = 2 * bv.bv_len - 1;
+ bv.bv_val = ch_malloc( bv.bv_len + 1 );
+
+ s = 0;
+ if ( !BER_BVISNULL( &f->f_sub_initial ) ) {
+- bv.bv_val[ s ] = f->f_sub_initial.bv_val[ 0 ];
+- for ( i = 1; i < f->f_sub_initial.bv_len; i++ ) {
++ fvalue = &f->f_sub_initial;
++ escaped = backsql_val_escape( bsi->bsi_op, fvalue, &escval );
++ if ( escaped )
++ fvalue = &escval;
++ bv.bv_val[ s ] = fvalue->bv_val[ 0 ];
++ for ( i = 1; i < fvalue->bv_len; i++ ) {
+ bv.bv_val[ s + 2 * i - 1 ] = '%';
+- bv.bv_val[ s + 2 * i ] = f->f_sub_initial.bv_val[ i ];
++ bv.bv_val[ s + 2 * i ] = fvalue->bv_val[ i ];
+ }
+ bv.bv_val[ s + 2 * i - 1 ] = '%';
+ s += 2 * i;
++ if ( escaped )
++ bsi->bsi_op->o_tmpfree( escval.bv_val, bsi->bsi_op->o_tmpmemctx );
+ }
+
+ if ( f->f_sub_any != NULL ) {
+ for ( a = 0; !BER_BVISNULL( &f->f_sub_any[ a ] ); a++ ) {
+- bv.bv_val[ s ] = f->f_sub_any[ a ].bv_val[ 0 ];
+- for ( i = 1; i < f->f_sub_any[ a ].bv_len; i++ ) {
++ fvalue = &f->f_sub_any[ a ];
++ escaped = backsql_val_escape( bsi->bsi_op, fvalue, &escval );
++ if ( escaped )
++ fvalue = &escval;
++ bv.bv_val[ s ] = fvalue->bv_val[ 0 ];
++ for ( i = 1; i < fvalue->bv_len; i++ ) {
+ bv.bv_val[ s + 2 * i - 1 ] = '%';
+- bv.bv_val[ s + 2 * i ] = f->f_sub_any[ a ].bv_val[ i ];
++ bv.bv_val[ s + 2 * i ] = fvalue->bv_val[ i ];
+ }
+ bv.bv_val[ s + 2 * i - 1 ] = '%';
+ s += 2 * i;
++ if ( escaped )
++ bsi->bsi_op->o_tmpfree( escval.bv_val, bsi->bsi_op->o_tmpmemctx );
+ }
+ }
+
+ if ( !BER_BVISNULL( &f->f_sub_final ) ) {
+- bv.bv_val[ s ] = f->f_sub_final.bv_val[ 0 ];
+- for ( i = 1; i < f->f_sub_final.bv_len; i++ ) {
++ fvalue = &f->f_sub_final;
++ escaped = backsql_val_escape( bsi->bsi_op, fvalue, &escval );
++ if ( escaped )
++ fvalue = &escval;
++ bv.bv_val[ s ] = fvalue->bv_val[ 0 ];
++ for ( i = 1; i < fvalue->bv_len; i++ ) {
+ bv.bv_val[ s + 2 * i - 1 ] = '%';
+- bv.bv_val[ s + 2 * i ] = f->f_sub_final.bv_val[ i ];
++ bv.bv_val[ s + 2 * i ] = fvalue->bv_val[ i ];
+ }
+- bv.bv_val[ s + 2 * i - 1 ] = '%';
++ bv.bv_val[ s + 2 * i - 1 ] = '%';
+ s += 2 * i;
++ if ( escaped )
++ bsi->bsi_op->o_tmpfree( escval.bv_val, bsi->bsi_op->o_tmpmemctx );
+ }
+
+ bv.bv_val[ s - 1 ] = '\0';
+@@ -561,11 +613,17 @@ backsql_process_sub_filter( backsql_srch_info *bsi, Filter *f,
+ f->f_sub_initial.bv_val, 0 );
+ #endif /* BACKSQL_TRACE */
+
++ fvalue = &f->f_sub_initial;
++ escaped = backsql_val_escape( bsi->bsi_op, fvalue, &escval );
++ if ( escaped )
++ fvalue = &escval;
+ start = bsi->bsi_flt_where.bb_val.bv_len;
+ backsql_strfcat_x( &bsi->bsi_flt_where,
+ bsi->bsi_op->o_tmpmemctx,
+ "b",
+- &f->f_sub_initial );
++ fvalue );
++ if ( escaped )
++ bsi->bsi_op->o_tmpfree( escval.bv_val, bsi->bsi_op->o_tmpmemctx );
+ if ( casefold && BACKSQL_AT_CANUPPERCASE( at ) ) {
+ ldap_pvt_str2upper( &bsi->bsi_flt_where.bb_val.bv_val[ start ] );
+ }
+@@ -586,12 +644,18 @@ backsql_process_sub_filter( backsql_srch_info *bsi, Filter *f,
+ i, f->f_sub_any[ i ].bv_val );
+ #endif /* BACKSQL_TRACE */
+
++ fvalue = &f->f_sub_any[ i ];
++ escaped = backsql_val_escape( bsi->bsi_op, fvalue, &escval );
++ if ( escaped )
++ fvalue = &escval;
+ start = bsi->bsi_flt_where.bb_val.bv_len;
+ backsql_strfcat_x( &bsi->bsi_flt_where,
+ bsi->bsi_op->o_tmpmemctx,
+ "bc",
+- &f->f_sub_any[ i ],
++ fvalue,
+ '%' );
++ if ( escaped )
++ bsi->bsi_op->o_tmpfree( escval.bv_val, bsi->bsi_op->o_tmpmemctx );
+ if ( casefold && BACKSQL_AT_CANUPPERCASE( at ) ) {
+ /*
+ * Note: toupper('%') = '%'
+@@ -611,11 +675,17 @@ backsql_process_sub_filter( backsql_srch_info *bsi, Filter *f,
+ f->f_sub_final.bv_val, 0 );
+ #endif /* BACKSQL_TRACE */
+
++ fvalue = &f->f_sub_final;
++ escaped = backsql_val_escape( bsi->bsi_op, fvalue, &escval );
++ if ( escaped )
++ fvalue = &escval;
+ start = bsi->bsi_flt_where.bb_val.bv_len;
+ backsql_strfcat_x( &bsi->bsi_flt_where,
+ bsi->bsi_op->o_tmpmemctx,
+ "b",
+- &f->f_sub_final );
++ fvalue );
++ if ( escaped )
++ bsi->bsi_op->o_tmpfree( escval.bv_val, bsi->bsi_op->o_tmpmemctx );
+ if ( casefold && BACKSQL_AT_CANUPPERCASE( at ) ) {
+ ldap_pvt_str2upper( &bsi->bsi_flt_where.bb_val.bv_val[ start ] );
+ }
+@@ -1183,6 +1253,8 @@ backsql_process_filter_attr( backsql_srch_info *bsi, Filter *f, backsql_at_map_r
+ struct berval *filter_value = NULL;
+ MatchingRule *matching_rule = NULL;
+ struct berval ordering = BER_BVC("<=");
++ struct berval escval;
++ int escaped = 0;
+
+ Debug( LDAP_DEBUG_TRACE, "==>backsql_process_filter_attr(%s)\n",
+ at->bam_ad->ad_cname.bv_val, 0, 0 );
+@@ -1237,6 +1309,10 @@ equality_match:;
+ casefold = 1;
+ }
+
++ escaped = backsql_val_escape( bsi->bsi_op, filter_value, &escval );
++ if ( escaped )
++ filter_value = &escval;
++
+ /* FIXME: directoryString filtering should use a similar
+ * approach to deal with non-prettified values like
+ * " A non prettified value ", by using a LIKE
+@@ -1317,6 +1393,10 @@ equality_match:;
+ casefold = 1;
+ }
+
++ escaped = backsql_val_escape( bsi->bsi_op, filter_value, &escval );
++ if ( escaped )
++ filter_value = &escval;
++
+ /*
+ * FIXME: should we uppercase the operands?
+ */
+@@ -1350,7 +1430,7 @@ equality_match:;
+ &at->bam_sel_expr,
+ &ordering,
+ '\'',
+- &f->f_av_value,
++ filter_value,
+ (ber_len_t)STRLENOF( /* (' */ "')" ),
+ /* ( */ "')" );
+ }
+@@ -1374,13 +1454,17 @@ equality_match:;
+ case LDAP_FILTER_APPROX:
+ /* we do our best */
+
++ filter_value = &f->f_av_value;
++ escaped = backsql_val_escape( bsi->bsi_op, filter_value, &escval );
++ if ( escaped )
++ filter_value = &escval;
+ /*
+ * maybe we should check type of at->sel_expr here somehow,
+ * to know whether upper_func is applicable, but for now
+ * upper_func stuff is made for Oracle, where UPPER is
+ * safely applicable to NUMBER etc.
+ */
+- (void)backsql_process_filter_like( bsi, at, 1, &f->f_av_value );
++ (void)backsql_process_filter_like( bsi, at, 1, filter_value );
+ break;
+
+ default:
+@@ -1394,6 +1478,9 @@ equality_match:;
+
+ }
+
++ if ( escaped )
++ bsi->bsi_op->o_tmpfree( escval.bv_val, bsi->bsi_op->o_tmpmemctx );
++
+ Debug( LDAP_DEBUG_TRACE, "<==backsql_process_filter_attr(%s)\n",
+ at->bam_ad->ad_cname.bv_val, 0, 0 );
+
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-1.patch b/meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-1.patch
new file mode 100644
index 0000000000..f4b4eb95d5
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-1.patch
@@ -0,0 +1,30 @@
+From 752d320cf96e46f24c0900f1a8f6af0a3fc3c4ce Mon Sep 17 00:00:00 2001
+From: Howard Chu <hyc@openldap.org>
+Date: Wed, 24 Aug 2022 14:40:51 +0100
+Subject: [PATCH] ITS#9904 ldif_open_url: check for ber_strdup failure
+
+Code present since 1999, df8f7cbb9b79be3be9205d116d1dd0b263d6861a
+
+Upstream-Status: Backport [https://git.openldap.org/openldap/openldap/-/commit/752d320cf96e46f24c0900f1a8f6af0a3fc3c4ce]
+CVE: CVE-2023-2953
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ libraries/libldap/fetch.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libraries/libldap/fetch.c b/libraries/libldap/fetch.c
+index 9e426dc647..536871bcfe 100644
+--- a/libraries/libldap/fetch.c
++++ b/libraries/libldap/fetch.c
+@@ -69,6 +69,8 @@ ldif_open_url(
+ }
+
+ p = ber_strdup( urlstr );
++ if ( p == NULL )
++ return NULL;
+
+ /* But we should convert to LDAP_DIRSEP before use */
+ if ( LDAP_DIRSEP[0] != '/' ) {
+--
+GitLab
+
diff --git a/meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-2.patch b/meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-2.patch
new file mode 100644
index 0000000000..02c43bc445
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap/CVE-2023-2953-2.patch
@@ -0,0 +1,76 @@
+From 6563fab9e2feccb0a684d0398e78571d09fb808b Mon Sep 17 00:00:00 2001
+From: Howard Chu <hyc@openldap.org>
+Date: Thu, 25 Aug 2022 16:13:21 +0100
+Subject: [PATCH] ITS#9904 ldap_url_parsehosts: check for strdup failure
+
+Avoid unnecessary strdup in IPv6 addr parsing, check for strdup
+failure when dup'ing scheme.
+
+Code present since 2000, 8da110a9e726dbc612b302feafe0109271e6bc59
+
+Upstream-Status: Backport [https://git.openldap.org/openldap/openldap/-/commit/6563fab9e2feccb0a684d0398e78571d09fb808b]
+CVE: CVE-2023-2953
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ libraries/libldap/url.c | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c
+index dcf2aac9e8..493fd7ce47 100644
+--- a/libraries/libldap/url.c
++++ b/libraries/libldap/url.c
+@@ -1385,24 +1385,22 @@ ldap_url_parsehosts(
+ }
+ ludp->lud_port = port;
+ ludp->lud_host = specs[i];
+- specs[i] = NULL;
+ p = strchr(ludp->lud_host, ':');
+ if (p != NULL) {
+ /* more than one :, IPv6 address */
+ if ( strchr(p+1, ':') != NULL ) {
+ /* allow [address] and [address]:port */
+ if ( *ludp->lud_host == '[' ) {
+- p = LDAP_STRDUP(ludp->lud_host+1);
+- /* copied, make sure we free source later */
+- specs[i] = ludp->lud_host;
+- ludp->lud_host = p;
+- p = strchr( ludp->lud_host, ']' );
++ p = strchr( ludp->lud_host+1, ']' );
+ if ( p == NULL ) {
+ LDAP_FREE(ludp);
+ ldap_charray_free(specs);
+ return LDAP_PARAM_ERROR;
+ }
+- *p++ = '\0';
++ /* Truncate trailing ']' and shift hostname down 1 char */
++ *p = '\0';
++ AC_MEMCPY( ludp->lud_host, ludp->lud_host+1, p - ludp->lud_host );
++ p++;
+ if ( *p != ':' ) {
+ if ( *p != '\0' ) {
+ LDAP_FREE(ludp);
+@@ -1428,14 +1426,19 @@ ldap_url_parsehosts(
+ }
+ }
+ }
+- ldap_pvt_hex_unescape(ludp->lud_host);
+ ludp->lud_scheme = LDAP_STRDUP("ldap");
++ if ( ludp->lud_scheme == NULL ) {
++ LDAP_FREE(ludp);
++ ldap_charray_free(specs);
++ return LDAP_NO_MEMORY;
++ }
++ specs[i] = NULL;
++ ldap_pvt_hex_unescape(ludp->lud_host);
+ ludp->lud_next = *ludlist;
+ *ludlist = ludp;
+ }
+
+ /* this should be an array of NULLs now */
+- /* except entries starting with [ */
+ ldap_charray_free(specs);
+ return LDAP_SUCCESS;
+ }
+--
+GitLab
+
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.57.bb b/meta-oe/recipes-support/openldap/openldap_2.4.57.bb
index a282523a3c..7c2ea7c452 100644
--- a/meta-oe/recipes-support/openldap/openldap_2.4.57.bb
+++ b/meta-oe/recipes-support/openldap/openldap_2.4.57.bb
@@ -23,8 +23,11 @@ SRC_URI = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/$
file://thread_stub.patch \
file://openldap-CVE-2015-3276.patch \
file://remove-user-host-pwd-from-version.patch \
+ file://CVE-2022-29155.patch \
+ file://CVE-2023-2953-1.patch \
+ file://CVE-2023-2953-2.patch \
+ file://CVE-2021-27212.patch \
"
-
SRC_URI[md5sum] = "e3349456c3a66e5e6155be7ddc3f042c"
SRC_URI[sha256sum] = "c7ba47e1e6ecb5b436f3d43281df57abeffa99262141aec822628bc220f6b45a"
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40660.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40660.patch
new file mode 100644
index 0000000000..74e547298f
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40660.patch
@@ -0,0 +1,55 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/868f76fb31255fd3fdacfc3e476452efeb61c3e7
+From: Frank Morgner <frankmorgner@gmail.com>
+Date: Wed, 21 Jun 2023 12:27:23 +0200
+Subject: Fixed PIN authentication bypass
+
+If two processes are accessing a token, then one process may leave the
+card usable with an authenticated PIN so that a key may sign/decrypt any
+data. This is especially the case if the token does not support a way of
+resetting the authentication status (logout).
+
+We have some tracking of the authentication status in software via
+PKCS#11, Minidriver (os-wise) and CryptoTokenKit, which is why a
+PIN-prompt will appear even though the card may technically be unlocked
+as described in the above example. However, before this change, an empty
+PIN was not verified (likely yielding an error during PIN-verification),
+but it was just checked whether the PIN is authenticated. This defeats
+the purpose of the PIN verification, because an empty PIN is not the
+correct one. Especially during OS Logon, we don't want that kind of
+shortcut, but we want the user to verify the correct PIN (even though
+the token was left unattended and authentication at the computer).
+
+This essentially reverts commit e6f7373ef066cfab6e3162e8b5f692683db23864.
+
+CVE: CVE-2023-40660
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/940e8bc764047c873f88bb1396933a5368d03533]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+---
+ src/libopensc/pkcs15-pin.c | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/src/libopensc/pkcs15-pin.c b/src/libopensc/pkcs15-pin.c
+index 80a185fecd..393234efe4 100644
+--- a/src/libopensc/pkcs15-pin.c
++++ b/src/libopensc/pkcs15-pin.c
+@@ -307,19 +307,6 @@
+ LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_PIN_REFERENCE);
+ auth_info = (struct sc_pkcs15_auth_info *)pin_obj->data;
+
+- /*
+- * if pin cache is disabled, we can get here with no PIN data.
+- * in this case, to avoid error or unnecessary pin prompting on pinpad,
+- * check if the PIN has been already verified and the access condition
+- * is still open on card.
+- */
+- if (pinlen == 0) {
+- r = sc_pkcs15_get_pin_info(p15card, pin_obj);
+-
+- if (r == SC_SUCCESS && auth_info->logged_in == SC_PIN_STATE_LOGGED_IN)
+- LOG_FUNC_RETURN(ctx, r);
+- }
+-
+ r = _validate_pin(p15card, auth_info, pinlen);
+
+ if (r)
+
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-1.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-1.patch
new file mode 100644
index 0000000000..3ecff558cf
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-1.patch
@@ -0,0 +1,47 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/245efe608d083fd4e4ec96793fdefd218e26fde7
+From: Jakub Jelen <jjelen@redhat.com>
+Date: Thu, 17 Aug 2023 13:54:42 +0200
+Subject: pkcs15: Avoid buffer overflow when getting last update
+
+Thanks oss-fuzz
+
+https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60769
+
+CVE: CVE-2023-40661
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/8026fb4ca0ed53d970c6c497252eb264d4192d50]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+Comment: Hunk refreshed based on codebase.
+
+---
+ src/libopensc/pkcs15.c | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/src/libopensc/pkcs15.c b/src/libopensc/pkcs15.c
+index eb7fc6afcd..4215b733a8 100644
+--- a/src/libopensc/pkcs15.c
++++ b/src/libopensc/pkcs15.c
+@@ -528,7 +528,7 @@
+ struct sc_context *ctx = p15card->card->ctx;
+ struct sc_file *file = NULL;
+ struct sc_asn1_entry asn1_last_update[C_ASN1_LAST_UPDATE_SIZE];
+- unsigned char *content, last_update[32];
++ unsigned char *content, last_update[32] = {0};
+ size_t lupdate_len = sizeof(last_update) - 1;
+ int r, content_len;
+ size_t size;
+@@ -564,9 +564,11 @@
+ if (r < 0)
+ return NULL;
+
+- p15card->tokeninfo->last_update.gtime = strdup((char *)last_update);
+- if (!p15card->tokeninfo->last_update.gtime)
+- return NULL;
++ if (asn1_last_update[0].flags & SC_ASN1_PRESENT) {
++ p15card->tokeninfo->last_update.gtime = strdup((char *)last_update);
++ if (!p15card->tokeninfo->last_update.gtime)
++ return NULL;
++ }
+ done:
+ sc_log(ctx, "lastUpdate.gtime '%s'", p15card->tokeninfo->last_update.gtime);
+ return p15card->tokeninfo->last_update.gtime;
+
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-2.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-2.patch
new file mode 100644
index 0000000000..39e729c5a9
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-2.patch
@@ -0,0 +1,32 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/440ca666eff10cc7011901252d20f3fc4ea23651
+From: Jakub Jelen <jjelen@redhat.com>
+Date: Thu, 17 Aug 2023 13:41:36 +0200
+Subject: setcos: Avoid buffer underflow
+
+Thanks oss-fuzz
+
+https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60672
+CVE: CVE-2023-40661
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/8026fb4ca0ed53d970c6c497252eb264d4192d50]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+Comment: Hunk refreshed based on codebase.
+---
+ src/pkcs15init/pkcs15-setcos.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/pkcs15init/pkcs15-setcos.c b/src/pkcs15init/pkcs15-setcos.c
+index 1b56afe6d9..1907b47f9d 100644
+--- a/src/pkcs15init/pkcs15-setcos.c
++++ b/src/pkcs15init/pkcs15-setcos.c
+@@ -346,6 +346,10 @@
+
+ /* Replace the path of instantiated key template by the path from the object data. */
+ memcpy(&file->path, &key_info->path, sizeof(file->path));
++ if (file->path.len < 2) {
++ sc_file_free(file);
++ LOG_TEST_RET(ctx, SC_ERROR_INVALID_DATA, "Invalid path");
++ }
+ file->id = file->path.value[file->path.len - 2] * 0x100
+ + file->path.value[file->path.len - 1];
+
+
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-3.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-3.patch
new file mode 100644
index 0000000000..7950cf91df
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-3.patch
@@ -0,0 +1,31 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/41d61da8481582e12710b5858f8b635e0a71ab5e
+From: Jakub Jelen <jjelen@redhat.com>
+Date: Wed, 20 Sep 2023 10:13:57 +0200
+Subject: oberthur: Avoid buffer overflow
+
+Thanks oss-fuzz
+
+https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60650
+CVE: CVE-2023-40661
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/8026fb4ca0ed53d970c6c497252eb264d4192d50]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+Comment: Hunk refreshed based on codebase.
+---
+ src/pkcs15init/pkcs15-oberthur.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/pkcs15init/pkcs15-oberthur.c b/src/pkcs15init/pkcs15-oberthur.c
+index ad2cabd530..c441ab1e76 100644
+--- a/src/pkcs15init/pkcs15-oberthur.c
++++ b/src/pkcs15init/pkcs15-oberthur.c
+@@ -688,6 +688,9 @@
+ if (object->type != SC_PKCS15_TYPE_PRKEY_RSA)
+ LOG_TEST_RET(ctx, SC_ERROR_NOT_SUPPORTED, "Create key failed: RSA only supported");
+
++ if (key_info->path.len < 2)
++ LOG_TEST_RET(ctx, SC_ERROR_OBJECT_NOT_VALID, "The path needs to be at least to bytes long");
++
+ sc_log(ctx, "create private key ID:%s", sc_pkcs15_print_id(&key_info->id));
+ /* Here, the path of private key file should be defined.
+ * Nevertheless, we need to instantiate private key to get the ACLs. */
+
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-4.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-4.patch
new file mode 100644
index 0000000000..797f8ad3b1
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-4.patch
@@ -0,0 +1,28 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/578aed8391ef117ca64a9e0cba8e5c264368a0ec
+From: Frank Morgner <frankmorgner@gmail.com>
+Date: Thu, 8 Dec 2022 00:27:18 +0100
+Subject: sc_pkcs15init_rmdir: prevent out of bounds write
+
+fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53927
+CVE: CVE-2023-40661
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/8026fb4ca0ed53d970c6c497252eb264d4192d50]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+Comment: Hunk refreshed based on codebase.
+---
+ src/pkcs15init/pkcs15-lib.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/pkcs15init/pkcs15-lib.c b/src/pkcs15init/pkcs15-lib.c
+index 91cee37310..3df03c6e1f 100644
+--- a/src/pkcs15init/pkcs15-lib.c
++++ b/src/pkcs15init/pkcs15-lib.c
+@@ -666,6 +666,8 @@
+
+ path = df->path;
+ path.len += 2;
++ if (path.len > SC_MAX_PATH_SIZE)
++ return SC_ERROR_INTERNAL;
+
+ nfids = r / 2;
+ while (r >= 0 && nfids--) {
+
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-5.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-5.patch
new file mode 100644
index 0000000000..e173e65575
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-5.patch
@@ -0,0 +1,30 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/c449a181a6988cc1e8dc8764d23574e48cdc3fa6
+From: =?UTF-8?q?Veronika=20Hanul=C3=ADkov=C3=A1?= <vhanulik@redhat.com>
+Date: Mon, 19 Jun 2023 16:14:51 +0200
+Subject: pkcs15-cflex: check path length to prevent underflow
+
+Thanks OSS-Fuzz
+https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58932
+CVE: CVE-2023-40661
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/8026fb4ca0ed53d970c6c497252eb264d4192d50]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+Comment: Hunk refreshed based on codebase.
+---
+ src/pkcs15init/pkcs15-cflex.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/pkcs15init/pkcs15-cflex.c b/src/pkcs15init/pkcs15-cflex.c
+index d06568073d..ce1d48e62c 100644
+--- a/src/pkcs15init/pkcs15-cflex.c
++++ b/src/pkcs15init/pkcs15-cflex.c
+@@ -56,6 +56,9 @@
+ int r = 0;
+ /* Select the parent DF */
+ path = df->path;
++ if (path.len < 2) {
++ return SC_ERROR_INVALID_ARGUMENTS;
++ }
+ path.len -= 2;
+ r = sc_select_file(p15card->card, &path, &parent);
+ if (r < 0)
+
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-6.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-6.patch
new file mode 100644
index 0000000000..abb524de29
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-6.patch
@@ -0,0 +1,30 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/df5a176bfdf8c52ba89c7fef1f82f6f3b9312bc1
+From: Veronika Hanulikova <xhanulik@fi.muni.cz>
+Date: Fri, 10 Feb 2023 11:47:34 +0100
+Subject: Check array bounds
+
+Thanks OSS-Fuzz
+https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54312
+CVE: CVE-2023-40661
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/8026fb4ca0ed53d970c6c497252eb264d4192d50]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+Comment: Hunk refreshed based on codebase.
+---
+ src/libopensc/muscle.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/libopensc/muscle.c b/src/libopensc/muscle.c
+index 61a4ec24d8..9d01e0c113 100644
+--- a/src/libopensc/muscle.c
++++ b/src/libopensc/muscle.c
+@@ -183,6 +183,9 @@
+ sc_apdu_t apdu;
+ int r;
+
++ if (dataLength + 9 > MSC_MAX_APDU)
++ return SC_ERROR_INVALID_ARGUMENTS;
++
+ sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x54, 0x00, 0x00);
+ apdu.lc = dataLength + 9;
+ if (card->ctx->debug >= 2)
+
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-7.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-7.patch
new file mode 100644
index 0000000000..858a996ed7
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2023-40661-7.patch
@@ -0,0 +1,40 @@
+Origin: https://github.com/OpenSC/OpenSC/commit/5631e9843c832a99769def85b7b9b68b4e3e3959
+From: Veronika Hanulikova <xhanulik@fi.muni.cz>
+Date: Fri, 3 Mar 2023 16:07:38 +0100
+Subject: Check length of string before making copy
+
+Thanks OSS-Fuzz
+https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55851
+https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55998
+CVE: CVE-2023-40661
+Upstream-Status: Backport [https://salsa.debian.org/opensc-team/opensc/-/commit/8026fb4ca0ed53d970c6c497252eb264d4192d50]
+Signed-off-by: Virendra Thakur <virendrak@kpit.com>
+Comment: Hunk refreshed based on codebase.
+---
+ src/pkcs15init/profile.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/pkcs15init/profile.c b/src/pkcs15init/profile.c
+index 2b793b0282..3bad1e8536 100644
+--- a/src/pkcs15init/profile.c
++++ b/src/pkcs15init/profile.c
+@@ -1465,6 +1465,8 @@
+ while (argc--) {
+ unsigned int op, method, id;
+
++ if (strlen(*argv) >= sizeof(oper))
++ goto bad;
+ strlcpy(oper, *argv++, sizeof(oper));
+ if ((what = strchr(oper, '=')) == NULL)
+ goto bad;
+@@ -2128,6 +2130,9 @@
+ return get_uint(cur, value, type);
+ }
+
++ if (strlen(value) >= sizeof(temp))
++ return 1;
++
+ n = strcspn(value, "0123456789x");
+ strlcpy(temp, value, (sizeof(temp) > n) ? n + 1 : sizeof(temp));
+
+
diff --git a/meta-oe/recipes-support/opensc/opensc_0.20.0.bb b/meta-oe/recipes-support/opensc/opensc_0.20.0.bb
index a815980c4f..3eb0c1e558 100644
--- a/meta-oe/recipes-support/opensc/opensc_0.20.0.bb
+++ b/meta-oe/recipes-support/opensc/opensc_0.20.0.bb
@@ -13,7 +13,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
#v0.19.0
SRCREV = "45e29056ccde422e70ed3585084a7f150c632515"
-SRC_URI = "git://github.com/OpenSC/OpenSC \
+SRC_URI = "git://github.com/OpenSC/OpenSC;branch=master;protocol=https \
+ file://CVE-2023-40660.patch \
+ file://CVE-2023-40661-1.patch \
+ file://CVE-2023-40661-2.patch \
+ file://CVE-2023-40661-3.patch \
+ file://CVE-2023-40661-4.patch \
+ file://CVE-2023-40661-5.patch \
+ file://CVE-2023-40661-6.patch \
+ file://CVE-2023-40661-7.patch \
"
DEPENDS = "virtual/libiconv openssl"
diff --git a/meta-oe/recipes-support/picocom/picocom_git.bb b/meta-oe/recipes-support/picocom/picocom_git.bb
index 3d26b9364b..801300e707 100644
--- a/meta-oe/recipes-support/picocom/picocom_git.bb
+++ b/meta-oe/recipes-support/picocom/picocom_git.bb
@@ -9,7 +9,7 @@ PV = "${BASEPV}+git${SRCPV}"
SRCREV = "90385aabe2b51f39fa130627d46b377569f82d4a"
-SRC_URI = "git://github.com/npat-efault/picocom \
+SRC_URI = "git://github.com/npat-efault/picocom;branch=master;protocol=https \
file://0001-Fix-building-with-musl.patch \
"
diff --git a/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb b/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb
index 3a437659e7..0e3e5ff733 100644
--- a/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb
+++ b/meta-oe/recipes-support/pidgin/funyahoo-plusplus_git.bb
@@ -7,7 +7,7 @@ DEPENDS = "pidgin json-glib glib-2.0"
inherit pkgconfig
-SRC_URI = "git://github.com/EionRobb/funyahoo-plusplus;branch=master;protocol=git"
+SRC_URI = "git://github.com/EionRobb/funyahoo-plusplus;branch=master;protocol=https"
SRCREV = "fbbd9c591100aa00a0487738ec7b6acd3d924b3f"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/pidgin/icyque_git.bb b/meta-oe/recipes-support/pidgin/icyque_git.bb
index 0f32dc3a39..2905e16fcc 100644
--- a/meta-oe/recipes-support/pidgin/icyque_git.bb
+++ b/meta-oe/recipes-support/pidgin/icyque_git.bb
@@ -9,7 +9,7 @@ PV = "0.1+gitr${SRCPV}"
inherit pkgconfig
-SRC_URI = "git://github.com/EionRobb/icyque"
+SRC_URI = "git://github.com/EionRobb/icyque;branch=master;protocol=https"
SRCREV = "513fc162d5d1a201c2b044e2b42941436d1069d5"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/pidgin/purple-skypeweb_git.bb b/meta-oe/recipes-support/pidgin/purple-skypeweb_git.bb
index 092e6059b8..854920d2ee 100644
--- a/meta-oe/recipes-support/pidgin/purple-skypeweb_git.bb
+++ b/meta-oe/recipes-support/pidgin/purple-skypeweb_git.bb
@@ -7,7 +7,7 @@ DEPENDS = "pidgin json-glib glib-2.0 zlib"
inherit pkgconfig
-SRC_URI = "git://github.com/EionRobb/skype4pidgin;branch=master;protocol=git"
+SRC_URI = "git://github.com/EionRobb/skype4pidgin;branch=master;protocol=https"
SRCREV = "14f1b69b6292bbdc98cca484b050ec8359394c4e"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/poco/poco_1.9.4.bb b/meta-oe/recipes-support/poco/poco_1.9.4.bb
index fcd5219759..1c3a4ebb03 100644
--- a/meta-oe/recipes-support/poco/poco_1.9.4.bb
+++ b/meta-oe/recipes-support/poco/poco_1.9.4.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc"
DEPENDS = "libpcre zlib"
SRC_URI = " \
- git://github.com/pocoproject/poco.git;branch=poco-${PV} \
+ git://github.com/pocoproject/poco.git;branch=poco-${PV};protocol=https \
file://0001-Don-t-try-to-install-non-existing-Encodings-testsuit.patch \
file://0001-riscv-Enable-double-operations-when-using-double-flo.patch \
file://run-ptest \
diff --git a/meta-oe/recipes-support/pps-tools/pps-tools_1.0.2.bb b/meta-oe/recipes-support/pps-tools/pps-tools_1.0.2.bb
index c8baa5d9ca..5b53587745 100644
--- a/meta-oe/recipes-support/pps-tools/pps-tools_1.0.2.bb
+++ b/meta-oe/recipes-support/pps-tools/pps-tools_1.0.2.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SRCREV = "cb48b7ecf7079ceba7081c78d4e61e507b0e8d2d"
-SRC_URI = "git://github.com/ago/pps-tools.git"
+SRC_URI = "git://github.com/ago/pps-tools.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/remmina/remmina_1.3.6.bb b/meta-oe/recipes-support/remmina/remmina_1.3.6.bb
index 1c2f270e32..3b1e8706ce 100644
--- a/meta-oe/recipes-support/remmina/remmina_1.3.6.bb
+++ b/meta-oe/recipes-support/remmina/remmina_1.3.6.bb
@@ -10,7 +10,7 @@ DEPENDS_append_libc-musl = " libexecinfo"
LDFLAGS_append_libc-musl = " -lexecinfo"
SRCREV = "cc391370d8b4c07597617e0a771a9732f0802411"
-SRC_URI = "git://gitlab.com/Remmina/Remmina;protocol=https \
+SRC_URI = "git://gitlab.com/Remmina/Remmina;protocol=https;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb b/meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb
index 33f5dccca2..6fe8aa76f2 100644
--- a/meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb
+++ b/meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb
@@ -25,7 +25,7 @@ RDEPENDS_${PN} = "rsync \
SRCREV = "a9e29850fc33c503c289e245c7bad350eed746d9"
PV = "1.4.3+git${SRCPV}"
-SRC_URI = "git://github.com/DrHyde/${BPN};branch=master;protocol=git \
+SRC_URI = "git://github.com/DrHyde/${BPN};branch=master;protocol=https \
file://configure-fix-cmd_rsync.patch \
"
diff --git a/meta-oe/recipes-support/sass/libsass_3.6.3.bb b/meta-oe/recipes-support/sass/libsass_3.6.3.bb
index d893be2231..4b4fe55669 100644
--- a/meta-oe/recipes-support/sass/libsass_3.6.3.bb
+++ b/meta-oe/recipes-support/sass/libsass_3.6.3.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8f34396ca205f5e119ee77aae91fa27d"
inherit autotools
-SRC_URI = "git://github.com/sass/libsass.git;branch=master"
+SRC_URI = "git://github.com/sass/libsass.git;branch=master;protocol=https"
SRCREV = "e1c16e09b4a953757a15149deaaf28a3fd81dc97"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/sass/sassc_git.bb b/meta-oe/recipes-support/sass/sassc_git.bb
index 3c7a55cc3d..985d519f93 100644
--- a/meta-oe/recipes-support/sass/sassc_git.bb
+++ b/meta-oe/recipes-support/sass/sassc_git.bb
@@ -6,7 +6,7 @@ DEPENDS = "libsass"
inherit autotools pkgconfig
-SRC_URI = "git://github.com/sass/sassc.git"
+SRC_URI = "git://github.com/sass/sassc.git;branch=master;protocol=https"
SRCREV = "46748216ba0b60545e814c07846ca10c9fefc5b6"
S = "${WORKDIR}/git"
PV = "3.6.1"
diff --git a/meta-oe/recipes-support/satyr/satyr_0.28.bb b/meta-oe/recipes-support/satyr/satyr_0.28.bb
index fbf018d7f5..a928681ae8 100644
--- a/meta-oe/recipes-support/satyr/satyr_0.28.bb
+++ b/meta-oe/recipes-support/satyr/satyr_0.28.bb
@@ -7,7 +7,7 @@ LICENSE = "GPLv2"
inherit autotools-brokensep python3native pkgconfig
-SRC_URI = "git://github.com/abrt/satyr.git \
+SRC_URI = "git://github.com/abrt/satyr.git;branch=master;protocol=https \
file://0002-fix-compile-failure-against-musl-C-library.patch \
"
SRCREV = "8b5547b89b712b39a59f1d8b366e7de0f5f46108"
diff --git a/meta-oe/recipes-support/serial-utils/pty-forward-native.bb b/meta-oe/recipes-support/serial-utils/pty-forward-native.bb
index 7f59b3ecad..87d9c52903 100644
--- a/meta-oe/recipes-support/serial-utils/pty-forward-native.bb
+++ b/meta-oe/recipes-support/serial-utils/pty-forward-native.bb
@@ -6,7 +6,7 @@ SECTION = "console/network"
SRCREV = "00dbec2636ae0385ad028587e20e446272ff97ec"
PV = "1.1+gitr${SRCPV}"
-SRC_URI = "git://github.com/freesmartphone/cornucopia.git;protocol=https"
+SRC_URI = "git://github.com/freesmartphone/cornucopia.git;protocol=https;branch=master"
S = "${WORKDIR}/git/tools/serial_forward"
inherit autotools native
diff --git a/meta-oe/recipes-support/serial-utils/serial-forward_git.bb b/meta-oe/recipes-support/serial-utils/serial-forward_git.bb
index 0ef829856c..dcad8f7104 100644
--- a/meta-oe/recipes-support/serial-utils/serial-forward_git.bb
+++ b/meta-oe/recipes-support/serial-utils/serial-forward_git.bb
@@ -6,7 +6,7 @@ SECTION = "console/devel"
SRCREV = "07c6fdede0870edc37a8d51d033b6e7e29aa7c91"
PV = "1.1+gitr${SRCPV}"
-SRC_URI = "git://github.com/freesmartphone/cornucopia.git \
+SRC_URI = "git://github.com/freesmartphone/cornucopia.git;branch=master;protocol=https \
file://0001-serial_forward-Disable-default-static-linking.patch;striplevel=3 \
"
S = "${WORKDIR}/git/tools/serial_forward"
diff --git a/meta-oe/recipes-support/span-lite/span-lite_git.bb b/meta-oe/recipes-support/span-lite/span-lite_git.bb
index 96ec829b74..abb3ec2f36 100644
--- a/meta-oe/recipes-support/span-lite/span-lite_git.bb
+++ b/meta-oe/recipes-support/span-lite/span-lite_git.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/martinmoene/span-lite"
LICENSE = "BSL-1.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-SRC_URI += "git://github.com/martinmoene/span-lite"
+SRC_URI += "git://github.com/martinmoene/span-lite;branch=master;protocol=https"
SRCREV = "e03d1166ccc8481d993dc02aae703966301a5e6e"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/spdlog/spdlog_1.5.0.bb b/meta-oe/recipes-support/spdlog/spdlog_1.5.0.bb
index 39629cce0d..9294d1a70e 100644
--- a/meta-oe/recipes-support/spdlog/spdlog_1.5.0.bb
+++ b/meta-oe/recipes-support/spdlog/spdlog_1.5.0.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRCREV = "cf6f1dd01e660d5865d68bf5fa78f6376b89470a"
-SRC_URI = "git://github.com/gabime/spdlog.git;protocol=git;branch=v1.x;"
+SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x;"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/spitools/spitools_git.bb b/meta-oe/recipes-support/spitools/spitools_git.bb
index 625756873b..b9ed1bcd7b 100644
--- a/meta-oe/recipes-support/spitools/spitools_git.bb
+++ b/meta-oe/recipes-support/spitools/spitools_git.bb
@@ -10,7 +10,7 @@ SRCREV = "4a36a84f7df291ddaebd397aecf0c8515256a8e0"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/cpb-/spi-tools.git;protocol=git"
+SRC_URI = "git://github.com/cpb-/spi-tools.git;protocol=https;branch=master"
inherit autotools
diff --git a/meta-oe/recipes-support/syslog-ng/files/CVE-2022-38725.patch b/meta-oe/recipes-support/syslog-ng/files/CVE-2022-38725.patch
new file mode 100644
index 0000000000..4a09c8c7fa
--- /dev/null
+++ b/meta-oe/recipes-support/syslog-ng/files/CVE-2022-38725.patch
@@ -0,0 +1,629 @@
+From 73b5c300b8fde5e7a4824baa83a04931279abb37 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?L=C3=A1szl=C3=B3=20V=C3=A1rady?=
+ <laszlo.varady@protonmail.com>
+Date: Sat, 20 Aug 2022 12:42:38 +0200
+Subject: [PATCH] CVE-2022-38725
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: László Várady <laszlo.varady@protonmail.com>
+Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
+
+Upstream-Status: Backport from [https://github.com/syslog-ng/syslog-ng/commit/b5a060f2ebb8d794f508436a12e4d4163f94b1b8 && https://github.com/syslog-ng/syslog-ng/commit/81a07263f1e522a376d3a30f96f51df3f2879f8a && https://github.com/syslog-ng/syslog-ng/commit/4b8dc56ca8eaeac4c8751a305eb7eeefab8dc89d && https://github.com/syslog-ng/syslog-ng/commit/73b5c300b8fde5e7a4824baa83a04931279abb37 && https://github.com/syslog-ng/syslog-ng/commit/45f051239312e43bd4f92b9339fe67c6798a0321 && https://github.com/syslog-ng/syslog-ng/commit/09f489c89c826293ff8cbd282cfc866ab56054c4 && https://github.com/syslog-ng/syslog-ng/commit/8c6e2c1c41b0fcc5fbd464c35f4dac7102235396 && https://github.com/syslog-ng/syslog-ng/commit/56f881c5eaa3d8c02c96607c4b9e4eaf959a044d]
+CVE: CVE-2022-38725
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ lib/timeutils/scan-timestamp.c | 68 +++++----
+ lib/timeutils/tests/test_scan-timestamp.c | 133 ++++++++++++++++--
+ modules/syslogformat/CMakeLists.txt | 2 +
+ modules/syslogformat/Makefile.am | 2 +
+ modules/syslogformat/syslog-format.c | 12 +-
+ modules/syslogformat/tests/CMakeLists.txt | 1 +
+ modules/syslogformat/tests/Makefile.am | 9 ++
+ .../syslogformat/tests/test_syslog_format.c | 104 ++++++++++++++
+ 8 files changed, 284 insertions(+), 47 deletions(-)
+ create mode 100644 modules/syslogformat/tests/CMakeLists.txt
+ create mode 100644 modules/syslogformat/tests/Makefile.am
+ create mode 100644 modules/syslogformat/tests/test_syslog_format.c
+
+diff --git a/lib/timeutils/scan-timestamp.c b/lib/timeutils/scan-timestamp.c
+index 41ead1a..ec9746b 100644
+--- a/lib/timeutils/scan-timestamp.c
++++ b/lib/timeutils/scan-timestamp.c
+@@ -34,41 +34,43 @@ scan_day_abbrev(const gchar **buf, gint *left, gint *wday)
+ {
+ *wday = -1;
+
+- if (*left < 3)
++ const gsize abbrev_length = 3;
++
++ if (*left < abbrev_length)
+ return FALSE;
+
+ switch (**buf)
+ {
+ case 'S':
+- if (strncasecmp(*buf, "Sun", 3) == 0)
++ if (strncasecmp(*buf, "Sun", abbrev_length) == 0)
+ *wday = 0;
+- else if (strncasecmp(*buf, "Sat", 3) == 0)
++ else if (strncasecmp(*buf, "Sat", abbrev_length) == 0)
+ *wday = 6;
+ break;
+ case 'M':
+- if (strncasecmp(*buf, "Mon", 3) == 0)
++ if (strncasecmp(*buf, "Mon", abbrev_length) == 0)
+ *wday = 1;
+ break;
+ case 'T':
+- if (strncasecmp(*buf, "Tue", 3) == 0)
++ if (strncasecmp(*buf, "Tue", abbrev_length) == 0)
+ *wday = 2;
+- else if (strncasecmp(*buf, "Thu", 3) == 0)
++ else if (strncasecmp(*buf, "Thu", abbrev_length) == 0)
+ *wday = 4;
+ break;
+ case 'W':
+- if (strncasecmp(*buf, "Wed", 3) == 0)
++ if (strncasecmp(*buf, "Wed", abbrev_length) == 0)
+ *wday = 3;
+ break;
+ case 'F':
+- if (strncasecmp(*buf, "Fri", 3) == 0)
++ if (strncasecmp(*buf, "Fri", abbrev_length) == 0)
+ *wday = 5;
+ break;
+ default:
+ return FALSE;
+ }
+
+- (*buf) += 3;
+- (*left) -= 3;
++ (*buf) += abbrev_length;
++ (*left) -= abbrev_length;
+ return TRUE;
+ }
+
+@@ -77,57 +79,59 @@ scan_month_abbrev(const gchar **buf, gint *left, gint *mon)
+ {
+ *mon = -1;
+
+- if (*left < 3)
++ const gsize abbrev_length = 3;
++
++ if (*left < abbrev_length)
+ return FALSE;
+
+ switch (**buf)
+ {
+ case 'J':
+- if (strncasecmp(*buf, "Jan", 3) == 0)
++ if (strncasecmp(*buf, "Jan", abbrev_length) == 0)
+ *mon = 0;
+- else if (strncasecmp(*buf, "Jun", 3) == 0)
++ else if (strncasecmp(*buf, "Jun", abbrev_length) == 0)
+ *mon = 5;
+- else if (strncasecmp(*buf, "Jul", 3) == 0)
++ else if (strncasecmp(*buf, "Jul", abbrev_length) == 0)
+ *mon = 6;
+ break;
+ case 'F':
+- if (strncasecmp(*buf, "Feb", 3) == 0)
++ if (strncasecmp(*buf, "Feb", abbrev_length) == 0)
+ *mon = 1;
+ break;
+ case 'M':
+- if (strncasecmp(*buf, "Mar", 3) == 0)
++ if (strncasecmp(*buf, "Mar", abbrev_length) == 0)
+ *mon = 2;
+- else if (strncasecmp(*buf, "May", 3) == 0)
++ else if (strncasecmp(*buf, "May", abbrev_length) == 0)
+ *mon = 4;
+ break;
+ case 'A':
+- if (strncasecmp(*buf, "Apr", 3) == 0)
++ if (strncasecmp(*buf, "Apr", abbrev_length) == 0)
+ *mon = 3;
+- else if (strncasecmp(*buf, "Aug", 3) == 0)
++ else if (strncasecmp(*buf, "Aug", abbrev_length) == 0)
+ *mon = 7;
+ break;
+ case 'S':
+- if (strncasecmp(*buf, "Sep", 3) == 0)
++ if (strncasecmp(*buf, "Sep", abbrev_length) == 0)
+ *mon = 8;
+ break;
+ case 'O':
+- if (strncasecmp(*buf, "Oct", 3) == 0)
++ if (strncasecmp(*buf, "Oct", abbrev_length) == 0)
+ *mon = 9;
+ break;
+ case 'N':
+- if (strncasecmp(*buf, "Nov", 3) == 0)
++ if (strncasecmp(*buf, "Nov", abbrev_length) == 0)
+ *mon = 10;
+ break;
+ case 'D':
+- if (strncasecmp(*buf, "Dec", 3) == 0)
++ if (strncasecmp(*buf, "Dec", abbrev_length) == 0)
+ *mon = 11;
+ break;
+ default:
+ return FALSE;
+ }
+
+- (*buf) += 3;
+- (*left) -= 3;
++ (*buf) += abbrev_length;
++ (*left) -= abbrev_length;
+ return TRUE;
+ }
+
+@@ -302,7 +306,7 @@ __parse_usec(const guchar **data, gint *length)
+ src++;
+ (*length)--;
+ }
+- while (isdigit(*src))
++ while (*length > 0 && isdigit(*src))
+ {
+ src++;
+ (*length)--;
+@@ -316,19 +320,21 @@ __parse_usec(const guchar **data, gint *length)
+ static gboolean
+ __has_iso_timezone(const guchar *src, gint length)
+ {
+- return (length >= 5) &&
++ return (length >= 6) &&
+ (*src == '+' || *src == '-') &&
+ isdigit(*(src+1)) &&
+ isdigit(*(src+2)) &&
+ *(src+3) == ':' &&
+ isdigit(*(src+4)) &&
+ isdigit(*(src+5)) &&
+- !isdigit(*(src+6));
++ (length < 7 || !isdigit(*(src+6)));
+ }
+
+ static guint32
+ __parse_iso_timezone(const guchar **data, gint *length)
+ {
++ g_assert(*length >= 6);
++
+ gint hours, mins;
+ const guchar *src = *data;
+ guint32 tz = 0;
+@@ -338,8 +344,10 @@ __parse_iso_timezone(const guchar **data, gint *length)
+ hours = (*(src + 1) - '0') * 10 + *(src + 2) - '0';
+ mins = (*(src + 4) - '0') * 10 + *(src + 5) - '0';
+ tz = sign * (hours * 3600 + mins * 60);
++
+ src += 6;
+ (*length) -= 6;
++
+ *data = src;
+ return tz;
+ }
+@@ -393,7 +401,7 @@ __parse_bsd_timestamp(const guchar **data, gint *length, WallClockTime *wct)
+ if (!scan_pix_timestamp((const gchar **) &src, &left, wct))
+ return FALSE;
+
+- if (*src == ':')
++ if (left && *src == ':')
+ {
+ src++;
+ left--;
+@@ -444,7 +452,7 @@ scan_rfc3164_timestamp(const guchar **data, gint *length, WallClockTime *wct)
+ * looking at you, skip that as well, so we can reliably detect IPv6
+ * addresses as hostnames, which would be using ":" as well. */
+
+- if (*src == ':')
++ if (left && *src == ':')
+ {
+ ++src;
+ --left;
+diff --git a/lib/timeutils/tests/test_scan-timestamp.c b/lib/timeutils/tests/test_scan-timestamp.c
+index 4508139..ad657c6 100644
+--- a/lib/timeutils/tests/test_scan-timestamp.c
++++ b/lib/timeutils/tests/test_scan-timestamp.c
+@@ -49,17 +49,21 @@ fake_time_add(time_t diff)
+ }
+
+ static gboolean
+-_parse_rfc3164(const gchar *ts, gchar isotimestamp[32])
++_parse_rfc3164(const gchar *ts, gint len, gchar isotimestamp[32])
+ {
+ UnixTime stamp;
+- const guchar *data = (const guchar *) ts;
+- gint length = strlen(ts);
++ const guchar *tsu = (const guchar *) ts;
++ gint tsu_len = len < 0 ? strlen(ts) : len;
+ GString *result = g_string_new("");
+ WallClockTime wct = WALL_CLOCK_TIME_INIT;
+
+-
++ const guchar *data = tsu;
++ gint length = tsu_len;
+ gboolean success = scan_rfc3164_timestamp(&data, &length, &wct);
+
++ cr_assert(length >= 0);
++ cr_assert(data == &tsu[tsu_len - length]);
++
+ unix_time_unset(&stamp);
+ convert_wall_clock_time_to_unix_time(&wct, &stamp);
+
+@@ -70,16 +74,21 @@ _parse_rfc3164(const gchar *ts, gchar isotimestamp[32])
+ }
+
+ static gboolean
+-_parse_rfc5424(const gchar *ts, gchar isotimestamp[32])
++_parse_rfc5424(const gchar *ts, gint len, gchar isotimestamp[32])
+ {
+ UnixTime stamp;
+- const guchar *data = (const guchar *) ts;
+- gint length = strlen(ts);
++ const guchar *tsu = (const guchar *) ts;
++ gint tsu_len = len < 0 ? strlen(ts) : len;
+ GString *result = g_string_new("");
+ WallClockTime wct = WALL_CLOCK_TIME_INIT;
+
++ const guchar *data = tsu;
++ gint length = tsu_len;
+ gboolean success = scan_rfc5424_timestamp(&data, &length, &wct);
+
++ cr_assert(length >= 0);
++ cr_assert(data == &tsu[tsu_len - length]);
++
+ unix_time_unset(&stamp);
+ convert_wall_clock_time_to_unix_time(&wct, &stamp);
+
+@@ -90,31 +99,60 @@ _parse_rfc5424(const gchar *ts, gchar isotimestamp[32])
+ }
+
+ static gboolean
+-_rfc3164_timestamp_eq(const gchar *ts, const gchar *expected, gchar converted[32])
++_rfc3164_timestamp_eq(const gchar *ts, gint len, const gchar *expected, gchar converted[32])
+ {
+- cr_assert(_parse_rfc3164(ts, converted));
++ cr_assert(_parse_rfc3164(ts, len, converted));
+ return strcmp(converted, expected) == 0;
+ }
+
+ static gboolean
+-_rfc5424_timestamp_eq(const gchar *ts, const gchar *expected, gchar converted[32])
++_rfc5424_timestamp_eq(const gchar *ts, gint len, const gchar *expected, gchar converted[32])
+ {
+- cr_assert(_parse_rfc5424(ts, converted));
++ cr_assert(_parse_rfc5424(ts, len, converted));
+ return strcmp(converted, expected) == 0;
+ }
+
+ #define _expect_rfc3164_timestamp_eq(ts, expected) \
+ ({ \
+ gchar converted[32]; \
+- cr_expect(_rfc3164_timestamp_eq(ts, expected, converted), "Parsed RFC3164 timestamp does not equal expected, ts=%s, converted=%s, expected=%s", ts, converted, expected); \
++ cr_expect(_rfc3164_timestamp_eq(ts, -1, expected, converted), "Parsed RFC3164 timestamp does not equal expected, ts=%s, converted=%s, expected=%s", ts, converted, expected); \
++ })
++
++#define _expect_rfc3164_timestamp_len_eq(ts, len, expected) \
++ ({ \
++ gchar converted[32]; \
++ cr_expect(_rfc3164_timestamp_eq(ts, len, expected, converted), "Parsed RFC3164 timestamp does not equal expected, ts=%s, converted=%s, expected=%s", ts, converted, expected); \
++ })
++
++#define _expect_rfc3164_fails(ts, len) \
++ ({ \
++ WallClockTime wct = WALL_CLOCK_TIME_INIT; \
++ const guchar *data = (guchar *) ts; \
++ gint length = len < 0 ? strlen(ts) : len; \
++ cr_assert_not(scan_rfc3164_timestamp(&data, &length, &wct)); \
+ })
+
+ #define _expect_rfc5424_timestamp_eq(ts, expected) \
+ ({ \
+ gchar converted[32]; \
+- cr_expect(_rfc5424_timestamp_eq(ts, expected, converted), "Parsed RFC5424 timestamp does not equal expected, ts=%s, converted=%s, expected=%s", ts, converted, expected); \
++ cr_expect(_rfc5424_timestamp_eq(ts, -1, expected, converted), "Parsed RFC5424 timestamp does not equal expected, ts=%s, converted=%s, expected=%s", ts, converted, expected); \
++ })
++
++#define _expect_rfc5424_timestamp_len_eq(ts, len, expected) \
++ ({ \
++ gchar converted[32]; \
++ cr_expect(_rfc5424_timestamp_eq(ts, len, expected, converted), "Parsed RFC5424 timestamp does not equal expected, ts=%s, converted=%s, expected=%s", ts, converted, expected); \
+ })
+
++#define _expect_rfc5424_fails(ts, len) \
++ ({ \
++ WallClockTime wct = WALL_CLOCK_TIME_INIT; \
++ const guchar *data = (guchar *) ts; \
++ gint length = len < 0 ? strlen(ts) : len; \
++ cr_assert_not(scan_rfc5424_timestamp(&data, &length, &wct)); \
++ })
++
++
+ Test(parse_timestamp, standard_bsd_format)
+ {
+ _expect_rfc3164_timestamp_eq("Oct 1 17:46:12", "2017-10-01T17:46:12.000+02:00");
+@@ -148,6 +186,75 @@ Test(parse_timestamp, standard_bsd_format_year_in_the_past)
+ _expect_rfc3164_timestamp_eq("Dec 31 17:46:12", "2017-12-31T17:46:12.000+01:00");
+ }
+
++Test(parse_timestamp, non_zero_terminated_rfc3164_iso_input_is_handled_properly)
++{
++ gchar *ts = "2022-08-17T05:02:28.417Z whatever";
++ gint ts_len = 24;
++
++ _expect_rfc3164_timestamp_len_eq(ts, strlen(ts), "2022-08-17T05:02:28.417+00:00");
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len + 5, "2022-08-17T05:02:28.417+00:00");
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len, "2022-08-17T05:02:28.417+00:00");
++
++ /* no "Z" parsed, timezone defaults to local, forced CET */
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len - 1, "2022-08-17T05:02:28.417+02:00");
++
++ /* msec is partially parsed as we trim the string from the right */
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len - 2, "2022-08-17T05:02:28.410+02:00");
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len - 3, "2022-08-17T05:02:28.400+02:00");
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len - 4, "2022-08-17T05:02:28.000+02:00");
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len - 5, "2022-08-17T05:02:28.000+02:00");
++
++ for (gint i = 6; i < ts_len; i++)
++ _expect_rfc3164_fails(ts, ts_len - i);
++
++}
++
++Test(parse_timestamp, non_zero_terminated_rfc3164_bsd_pix_or_asa_input_is_handled_properly)
++{
++ gchar *ts = "Aug 17 2022 05:02:28: whatever";
++ gint ts_len = 21;
++
++ _expect_rfc3164_timestamp_len_eq(ts, strlen(ts), "2022-08-17T05:02:28.000+02:00");
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len + 5, "2022-08-17T05:02:28.000+02:00");
++ _expect_rfc3164_timestamp_len_eq(ts, ts_len, "2022-08-17T05:02:28.000+02:00");
++
++ /* no ":" at the end, that's a problem, unrecognized */
++ _expect_rfc3164_fails(ts, ts_len - 1);
++
++ for (gint i = 1; i < ts_len; i++)
++ _expect_rfc3164_fails(ts, ts_len - i);
++}
++
++Test(parse_timestamp, non_zero_terminated_rfc5424_input_is_handled_properly)
++{
++ gchar *ts = "2022-08-17T05:02:28.417Z whatever";
++ gint ts_len = 24;
++
++ _expect_rfc5424_timestamp_len_eq(ts, strlen(ts), "2022-08-17T05:02:28.417+00:00");
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len + 5, "2022-08-17T05:02:28.417+00:00");
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len, "2022-08-17T05:02:28.417+00:00");
++
++ /* no "Z" parsed, timezone defaults to local, forced CET */
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len - 1, "2022-08-17T05:02:28.417+02:00");
++
++ /* msec is partially parsed as we trim the string from the right */
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len - 2, "2022-08-17T05:02:28.410+02:00");
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len - 3, "2022-08-17T05:02:28.400+02:00");
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len - 4, "2022-08-17T05:02:28.000+02:00");
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len - 5, "2022-08-17T05:02:28.000+02:00");
++
++ for (gint i = 6; i < ts_len; i++)
++ _expect_rfc5424_fails(ts, ts_len - i);
++
++}
++
++Test(parse_timestamp, non_zero_terminated_rfc5424_timestamp_only)
++{
++ const gchar *ts = "2022-08-17T05:02:28.417+03:00";
++ gint ts_len = strlen(ts);
++ _expect_rfc5424_timestamp_len_eq(ts, ts_len, ts);
++}
++
+
+ Test(parse_timestamp, daylight_saving_behavior_at_spring_with_explicit_timezones)
+ {
+diff --git a/modules/syslogformat/CMakeLists.txt b/modules/syslogformat/CMakeLists.txt
+index fb55ea4..a2a92bb 100644
+--- a/modules/syslogformat/CMakeLists.txt
++++ b/modules/syslogformat/CMakeLists.txt
+@@ -24,4 +24,6 @@ target_include_directories(syslogformat
+ )
+ target_link_libraries(syslogformat PRIVATE syslog-ng)
+
++add_test_subdirectory(tests)
++
+ install(TARGETS syslogformat LIBRARY DESTINATION lib/syslog-ng/)
+diff --git a/modules/syslogformat/Makefile.am b/modules/syslogformat/Makefile.am
+index f13f88c..14cdf58 100644
+--- a/modules/syslogformat/Makefile.am
++++ b/modules/syslogformat/Makefile.am
+@@ -31,3 +31,5 @@ modules_syslogformat_libsyslogformat_la_DEPENDENCIES = \
+ modules/syslogformat modules/syslogformat/ mod-syslogformat: \
+ modules/syslogformat/libsyslogformat.la
+ .PHONY: modules/syslogformat/ mod-syslogformat
++
++include modules/syslogformat/tests/Makefile.am
+diff --git a/modules/syslogformat/syslog-format.c b/modules/syslogformat/syslog-format.c
+index 6d53a32..a69f39f 100644
+--- a/modules/syslogformat/syslog-format.c
++++ b/modules/syslogformat/syslog-format.c
+@@ -200,7 +200,7 @@ log_msg_parse_cisco_sequence_id(LogMessage *self, const guchar **data, gint *len
+
+ /* if the next char is not space, then we may try to read a date */
+
+- if (*src != ' ')
++ if (!left || *src != ' ')
+ return;
+
+ log_msg_set_value(self, handles.cisco_seqid, (gchar *) *data, *length - left - 1);
+@@ -216,6 +216,9 @@ log_msg_parse_cisco_timestamp_attributes(LogMessage *self, const guchar **data,
+ const guchar *src = *data;
+ gint left = *length;
+
++ if (!left)
++ return;
++
+ /* Cisco timestamp extensions, the first '*' indicates that the clock is
+ * unsynced, '.' if it is known to be synced */
+ if (G_UNLIKELY(src[0] == '*'))
+@@ -564,7 +567,7 @@ log_msg_parse_sd(LogMessage *self, const guchar **data, gint *length, const MsgF
+ open_sd++;
+ do
+ {
+- if (!isascii(*src) || *src == '=' || *src == ' ' || *src == ']' || *src == '"')
++ if (!left || !isascii(*src) || *src == '=' || *src == ' ' || *src == ']' || *src == '"')
+ goto error;
+ /* read sd_id */
+ pos = 0;
+@@ -598,7 +601,8 @@ log_msg_parse_sd(LogMessage *self, const guchar **data, gint *length, const MsgF
+ strcpy(sd_value_name, logmsg_sd_prefix);
+ /* this strcat is safe, as sd_id_name is at most 32 chars */
+ strncpy(sd_value_name + logmsg_sd_prefix_len, sd_id_name, sizeof(sd_value_name) - logmsg_sd_prefix_len);
+- if (*src == ']')
++
++ if (left && *src == ']')
+ {
+ log_msg_set_value_by_name(self, sd_value_name, "", 0);
+ }
+@@ -615,7 +619,7 @@ log_msg_parse_sd(LogMessage *self, const guchar **data, gint *length, const MsgF
+ else
+ goto error;
+
+- if (!isascii(*src) || *src == '=' || *src == ' ' || *src == ']' || *src == '"')
++ if (!left || !isascii(*src) || *src == '=' || *src == ' ' || *src == ']' || *src == '"')
+ goto error;
+
+ /* read sd-param */
+diff --git a/modules/syslogformat/tests/CMakeLists.txt b/modules/syslogformat/tests/CMakeLists.txt
+new file mode 100644
+index 0000000..2e45b71
+--- /dev/null
++++ b/modules/syslogformat/tests/CMakeLists.txt
+@@ -0,0 +1 @@
++add_unit_test(CRITERION TARGET test_syslog_format DEPENDS syslogformat)
+diff --git a/modules/syslogformat/tests/Makefile.am b/modules/syslogformat/tests/Makefile.am
+new file mode 100644
+index 0000000..7ee66a5
+--- /dev/null
++++ b/modules/syslogformat/tests/Makefile.am
+@@ -0,0 +1,9 @@
++modules_syslogformat_tests_TESTS = \
++ modules/syslogformat/tests/test_syslog_format
++
++check_PROGRAMS += ${modules_syslogformat_tests_TESTS}
++
++EXTRA_DIST += modules/syslogformat/tests/CMakeLists.txt
++
++modules_syslogformat_tests_test_syslog_format_CFLAGS = $(TEST_CFLAGS) -I$(top_srcdir)/modules/syslogformat
++modules_syslogformat_tests_test_syslog_format_LDADD = $(TEST_LDADD) $(PREOPEN_SYSLOGFORMAT)
+diff --git a/modules/syslogformat/tests/test_syslog_format.c b/modules/syslogformat/tests/test_syslog_format.c
+new file mode 100644
+index 0000000..d0f5b40
+--- /dev/null
++++ b/modules/syslogformat/tests/test_syslog_format.c
+@@ -0,0 +1,104 @@
++/*
++ * Copyright (c) 2022 One Identity
++ * Copyright (c) 2022 László Várady
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published
++ * by the Free Software Foundation, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * As an additional exemption you are allowed to compile & link against the
++ * OpenSSL libraries as published by the OpenSSL project. See the file
++ * COPYING for details.
++ *
++ */
++
++#include <criterion/criterion.h>
++
++#include "apphook.h"
++#include "cfg.h"
++#include "syslog-format.h"
++#include "logmsg/logmsg.h"
++#include "msg-format.h"
++#include "scratch-buffers.h"
++
++#include <string.h>
++
++GlobalConfig *cfg;
++MsgFormatOptions parse_options;
++
++static void
++setup(void)
++{
++ app_startup();
++ syslog_format_init();
++
++ cfg = cfg_new_snippet();
++ msg_format_options_defaults(&parse_options);
++}
++
++static void
++teardown(void)
++{
++ scratch_buffers_explicit_gc();
++ app_shutdown();
++ cfg_free(cfg);
++}
++
++TestSuite(syslog_format, .init = setup, .fini = teardown);
++
++Test(syslog_format, parser_should_not_spin_on_non_zero_terminated_input, .timeout = 10)
++{
++ const gchar *data = "<182>2022-08-17T05:02:28.217 mymachine su: 'su root' failed for lonvick on /dev/pts/8";
++ /* chosen carefully to reproduce a bug */
++ gsize data_length = 27;
++
++ msg_format_options_init(&parse_options, cfg);
++ LogMessage *msg = msg_format_construct_message(&parse_options, (const guchar *) data, data_length);
++
++ gsize problem_position;
++ cr_assert(syslog_format_handler(&parse_options, msg, (const guchar *) data, data_length, &problem_position));
++
++ msg_format_options_destroy(&parse_options);
++ log_msg_unref(msg);
++}
++
++Test(syslog_format, cisco_sequence_id_non_zero_termination)
++{
++ const gchar *data = "<189>65536: ";
++ gsize data_length = strlen(data);
++
++ msg_format_options_init(&parse_options, cfg);
++ LogMessage *msg = msg_format_construct_message(&parse_options, (const guchar *) data, data_length);
++
++ gsize problem_position;
++ cr_assert(syslog_format_handler(&parse_options, msg, (const guchar *) data, data_length, &problem_position));
++ cr_assert_str_eq(log_msg_get_value_by_name(msg, ".SDATA.meta.sequenceId", NULL), "65536");
++
++ msg_format_options_destroy(&parse_options);
++ log_msg_unref(msg);
++}
++
++Test(syslog_format, minimal_non_zero_terminated_numeric_message_is_parsed_as_program_name)
++{
++ const gchar *data = "<189>65536";
++ gsize data_length = strlen(data);
++
++ msg_format_options_init(&parse_options, cfg);
++ LogMessage *msg = msg_format_construct_message(&parse_options, (const guchar *) data, data_length);
++
++ gsize problem_position;
++ cr_assert(syslog_format_handler(&parse_options, msg, (const guchar *) data, data_length, &problem_position));
++ cr_assert_str_eq(log_msg_get_value_by_name(msg, "PROGRAM", NULL), "65536");
++
++ msg_format_options_destroy(&parse_options);
++ log_msg_unref(msg);
++}
+--
+2.25.1
+
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng_3.24.1.bb b/meta-oe/recipes-support/syslog-ng/syslog-ng_3.24.1.bb
index 10bf00fdce..6e90dabd14 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng_3.24.1.bb
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng_3.24.1.bb
@@ -9,6 +9,7 @@ SRC_URI += " \
file://0001-syslog-ng-fix-segment-fault-during-service-start.patch \
file://shebang.patch \
file://syslog-ng-tmp.conf \
+ file://CVE-2022-38725.patch \
"
SRC_URI[md5sum] = "ef9de066793f7358af7312b964ac0450"
diff --git a/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_0.8.5.bb b/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_0.8.5.bb
index 3f82734acd..5bcbea4600 100644
--- a/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_0.8.5.bb
+++ b/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_0.8.5.bb
@@ -7,7 +7,7 @@ SECTION = "devel"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
S = "${WORKDIR}/git"
-SRC_URI = "git://github.com/jthornber/thin-provisioning-tools;branch=main \
+SRC_URI = "git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \
file://0001-do-not-strip-pdata_tools-at-do_install.patch \
file://use-sh-on-path.patch \
"
diff --git a/meta-oe/recipes-support/toscoterm/toscoterm_git.bb b/meta-oe/recipes-support/toscoterm/toscoterm_git.bb
index aba485e1a4..4dddd54c5f 100644
--- a/meta-oe/recipes-support/toscoterm/toscoterm_git.bb
+++ b/meta-oe/recipes-support/toscoterm/toscoterm_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://main.c;start_line=5;end_line=16;md5=9ae4bf20caf291afa
# 0.2 version
SRCREV = "8586d617aed19fc75f5ae1e07270752c1b2f9a30"
-SRC_URI = "git://github.com/OSSystems/toscoterm.git"
+SRC_URI = "git://github.com/OSSystems/toscoterm.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch b/meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch
new file mode 100644
index 0000000000..0189833b49
--- /dev/null
+++ b/meta-oe/recipes-support/udisks/udisks2/CVE-2021-3802.patch
@@ -0,0 +1,63 @@
+From 2517b8feb13919c382e53ab5f9b63c5b5ee5b063 Mon Sep 17 00:00:00 2001
+From: Emilio Pozuelo Monfort <pochu@debian.org>
+Date: Fri, 5 Nov 2021 09:29:13 +0100
+Subject: [PATCH] udisks2 security update
+
+mount options: Always use errors=remount-ro for ext filesystems
+
+Stefan Walter found that udisks2, a service to access and manipulate
+storage devices, could cause denial of service via system crash if a
+corrupted or specially crafted ext2/3/4 device or image was mounted,
+which could happen automatically on certain environments.
+
+For Debian 9 stretch, this problem has been fixed in version
+2.1.8-1+deb9u1.
+
+Default mount options are focused primarily on data safety, mounting
+damaged ext2/3/4 filesystem as readonly would indicate something's wrong.
+
+Upstream-Status: Backport [http://security.debian.org/debian-security/pool/updates/main/u/udisks2/udisks2_2.1.8-1+deb9u1.debian.tar.xz]
+CVE: CVE-2021-3802
+
+Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
+
+---
+ src/udiskslinuxfilesystem.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
+index a5a3898c..eac8cab3 100644
+--- a/src/udiskslinuxfilesystem.c
++++ b/src/udiskslinuxfilesystem.c
+@@ -421,6 +421,21 @@ static const gchar *hfsplus_allow[] = { "creator", "type", "umask", "session", "
+ static const gchar *hfsplus_allow_uid_self[] = { "uid", NULL };
+ static const gchar *hfsplus_allow_gid_self[] = { "gid", NULL };
+
++/* ---------------------- ext2 -------------------- */
++
++static const gchar *ext2_defaults[] = { "errors=remount-ro", NULL };
++static const gchar *ext2_allow[] = { "errors=remount-ro", NULL };
++
++/* ---------------------- ext3 -------------------- */
++
++static const gchar *ext3_defaults[] = { "errors=remount-ro", NULL };
++static const gchar *ext3_allow[] = { "errors=remount-ro", NULL };
++
++/* ---------------------- ext4 -------------------- */
++
++static const gchar *ext4_defaults[] = { "errors=remount-ro", NULL };
++static const gchar *ext4_allow[] = { "errors=remount-ro", NULL };
++
+ /* ------------------------------------------------ */
+ /* TODO: support context= */
+
+@@ -434,6 +449,9 @@ static const FSMountOptions fs_mount_options[] =
+ { "udf", udf_defaults, udf_allow, udf_allow_uid_self, udf_allow_gid_self },
+ { "exfat", exfat_defaults, exfat_allow, exfat_allow_uid_self, exfat_allow_gid_self },
+ { "hfsplus", hfsplus_defaults, hfsplus_allow, hfsplus_allow_uid_self, hfsplus_allow_gid_self },
++ { "ext2", ext2_defaults, ext2_allow, NULL, NULL },
++ { "ext3", ext3_defaults, ext3_allow, NULL, NULL },
++ { "ext4", ext4_defaults, ext4_allow, NULL, NULL },
+ };
+
+ /* ------------------------------------------------ */
diff --git a/meta-oe/recipes-support/udisks/udisks2_git.bb b/meta-oe/recipes-support/udisks/udisks2_git.bb
index ecaf01e71d..58c8a9899a 100644
--- a/meta-oe/recipes-support/udisks/udisks2_git.bb
+++ b/meta-oe/recipes-support/udisks/udisks2_git.bb
@@ -17,7 +17,8 @@ DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
RDEPENDS_${PN} = "acl"
SRC_URI = " \
- git://github.com/storaged-project/udisks.git;branch=master \
+ git://github.com/storaged-project/udisks.git;branch=master;protocol=https \
+ file://CVE-2021-3802.patch \
"
PV = "2.8.4+git${SRCREV}"
SRCREV = "db5f487345da2eaa87976450ea51c2c465d9b82e"
diff --git a/meta-oe/recipes-support/uhubctl/uhubctl_2.1.0.bb b/meta-oe/recipes-support/uhubctl/uhubctl_2.1.0.bb
index b294d77bad..0bb48412a9 100644
--- a/meta-oe/recipes-support/uhubctl/uhubctl_2.1.0.bb
+++ b/meta-oe/recipes-support/uhubctl/uhubctl_2.1.0.bb
@@ -7,7 +7,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRCREV = "c9fa3c68a1b2c9790c731602b8bae2b513e80605"
-SRC_URI = "git://github.com/mvp/${BPN}"
+SRC_URI = "git://github.com/mvp/${BPN};branch=master;protocol=https"
S = "${WORKDIR}/git"
# uhubctl gets its program version from "git describe". As we use the source
diff --git a/meta-oe/recipes-support/uthash/uthash_2.1.0.bb b/meta-oe/recipes-support/uthash/uthash_2.1.0.bb
index 09cef44a85..3f4529e1a0 100644
--- a/meta-oe/recipes-support/uthash/uthash_2.1.0.bb
+++ b/meta-oe/recipes-support/uthash/uthash_2.1.0.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a2513f7d2291df840527b76b2a8f9718"
SRCREV = "8b214aefcb81df86a7e5e0d4fa20e59a6c18bc02"
SRC_URI = "\
- git://github.com/troydhanson/${BPN}.git \
+ git://github.com/troydhanson/${BPN}.git;branch=master;protocol=https \
file://run-ptest \
"
diff --git a/meta-oe/recipes-support/utouch/utouch-evemu_git.bb b/meta-oe/recipes-support/utouch/utouch-evemu_git.bb
index 7c5a734394..e1ec1fda8b 100644
--- a/meta-oe/recipes-support/utouch/utouch-evemu_git.bb
+++ b/meta-oe/recipes-support/utouch/utouch-evemu_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
inherit autotools
-SRC_URI = "git://bitmath.org/git/evemu.git;protocol=http \
+SRC_URI = "git://bitmath.org/git/evemu.git;protocol=http;branch=master \
file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
"
SRCREV = "9752b50e922572e4cd214ac45ed95e4ee410fe24"
diff --git a/meta-oe/recipes-support/utouch/utouch-frame_git.bb b/meta-oe/recipes-support/utouch/utouch-frame_git.bb
index 1ebebfa9f5..5993956353 100644
--- a/meta-oe/recipes-support/utouch/utouch-frame_git.bb
+++ b/meta-oe/recipes-support/utouch/utouch-frame_git.bb
@@ -9,7 +9,7 @@ DEPENDS += "mtdev utouch-evemu"
inherit autotools pkgconfig
-SRC_URI = "git://bitmath.org/git/frame.git;protocol=http \
+SRC_URI = "git://bitmath.org/git/frame.git;protocol=http;branch=master \
file://remove-man-page-creation.patch \
file://0001-include-sys-stat.h-for-fixing-build-issue-on-musl.patch \
file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
diff --git a/meta-oe/recipes-support/utouch/utouch-mtview_git.bb b/meta-oe/recipes-support/utouch/utouch-mtview_git.bb
index 5f07bf28ee..65edaf1e5b 100644
--- a/meta-oe/recipes-support/utouch/utouch-mtview_git.bb
+++ b/meta-oe/recipes-support/utouch/utouch-mtview_git.bb
@@ -9,7 +9,7 @@ inherit autotools pkgconfig features_check
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
-SRC_URI = "git://bitmath.org/git/mtview.git;protocol=http"
+SRC_URI = "git://bitmath.org/git/mtview.git;protocol=http;branch=master"
SRCREV = "ad437c38dc111cf3990a03abf14efe1b5d89604b"
DEPENDS += "mtdev utouch-frame utouch-evemu libx11"
diff --git a/meta-oe/recipes-support/websocketpp/websocketpp_0.8.2.bb b/meta-oe/recipes-support/websocketpp/websocketpp_0.8.2.bb
index 79a5ac5c4e..673fc5899b 100644
--- a/meta-oe/recipes-support/websocketpp/websocketpp_0.8.2.bb
+++ b/meta-oe/recipes-support/websocketpp/websocketpp_0.8.2.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=4d168d763c111f4ffc62249870e4e0ea"
DEPENDS = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'openssl boost zlib', '', d)} "
-SRC_URI = "git://github.com/zaphoyd/websocketpp.git;protocol=https \
+SRC_URI = "git://github.com/zaphoyd/websocketpp.git;protocol=https;branch=master \
file://0001-cmake-Use-GNUInstallDirs.patch \
file://855.patch \
file://857.patch \
diff --git a/meta-oe/recipes-support/xdelta/xdelta3_3.1.0.bb b/meta-oe/recipes-support/xdelta/xdelta3_3.1.0.bb
index d100030f9b..c161781989 100644
--- a/meta-oe/recipes-support/xdelta/xdelta3_3.1.0.bb
+++ b/meta-oe/recipes-support/xdelta/xdelta3_3.1.0.bb
@@ -7,7 +7,7 @@ SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-SRC_URI = "git://github.com/jmacd/xdelta.git;branch=release3_1_apl"
+SRC_URI = "git://github.com/jmacd/xdelta.git;branch=release3_1_apl;protocol=https"
SRCREV = "4b4aed71a959fe11852e45242bb6524be85d3709"
S = "${WORKDIR}/git/xdelta3"
diff --git a/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb b/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb
index 481e7303b3..1ba4a32ba6 100644
--- a/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb
+++ b/meta-oe/recipes-support/xorg-xrdp/xorgxrdp_0.2.5.bb
@@ -10,7 +10,7 @@ DEPENDS = "virtual/libx11 xserver-xorg xrdp nasm-native"
inherit features_check
REQUIRED_DISTRO_FEATURES = "x11 pam"
-SRC_URI = "git://github.com/neutrinolabs/xorgxrdp.git"
+SRC_URI = "git://github.com/neutrinolabs/xorgxrdp.git;branch=master;protocol=https"
SRCREV = "c122544f184d4031bbae1ad80fbab554c34a9427"
diff --git a/meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb b/meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb
index deda0fd1b5..36184705bc 100644
--- a/meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb
+++ b/meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb
@@ -10,7 +10,7 @@ DEPENDS = "openssl virtual/libx11 libxfixes libxrandr libpam nasm-native"
REQUIRED_DISTRO_FEATURES = "x11 pam"
-SRC_URI = "git://github.com/neutrinolabs/xrdp.git \
+SRC_URI = "git://github.com/neutrinolabs/xrdp.git;branch=master;protocol=https \
file://xrdp.sysconfig \
file://0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch \
file://0001-Fix-the-compile-error.patch \
diff --git a/meta-oe/recipes-support/xxhash/xxhash_0.7.3.bb b/meta-oe/recipes-support/xxhash/xxhash_0.7.3.bb
index 865adc5a1b..783af89bed 100644
--- a/meta-oe/recipes-support/xxhash/xxhash_0.7.3.bb
+++ b/meta-oe/recipes-support/xxhash/xxhash_0.7.3.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.xxhash.com/"
LICENSE = "BSD-2-Clause & GPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=01a7eba4212ef1e882777a38585e7a9b"
-SRC_URI = "git://github.com/Cyan4973/xxHash.git"
+SRC_URI = "git://github.com/Cyan4973/xxHash.git;branch=master;protocol=https"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
SRCREV = "d408e9b0606d07b1ddc5452ffc0ec8512211b174"
diff --git a/meta-oe/recipes-support/zbar/zbar_git.bb b/meta-oe/recipes-support/zbar/zbar_git.bb
index 935e09cd53..46ca549c5c 100644
--- a/meta-oe/recipes-support/zbar/zbar_git.bb
+++ b/meta-oe/recipes-support/zbar/zbar_git.bb
@@ -10,7 +10,7 @@ PV = "0.10+git${SRCPV}"
# iPhoneSDK-1.3.1 tag
SRCREV = "67003d2a985b5f9627bee2d8e3e0b26d0c474b57"
-SRC_URI = "git://github.com/ZBar/Zbar \
+SRC_URI = "git://github.com/ZBar/Zbar;branch=master;protocol=https \
file://0001-make-relies-GNU-extentions.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-support/zchunk/zchunk_1.1.6.bb b/meta-oe/recipes-support/zchunk/zchunk_1.1.6.bb
index e041132b1c..e4c0232bd9 100644
--- a/meta-oe/recipes-support/zchunk/zchunk_1.1.6.bb
+++ b/meta-oe/recipes-support/zchunk/zchunk_1.1.6.bb
@@ -4,7 +4,7 @@ AUTHOR = "Jonathan Dieter"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cd6e590282010ce90a94ef25dd31410f"
-SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https"
+SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=master"
SRCREV = "f5593aa11584faa691c81b4898f0aaded47f8bf7"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-test/bats/bats_1.1.0.bb b/meta-oe/recipes-test/bats/bats_1.1.0.bb
index a8179744ae..7ee0205766 100644
--- a/meta-oe/recipes-test/bats/bats_1.1.0.bb
+++ b/meta-oe/recipes-test/bats/bats_1.1.0.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "https://github.com/bats-core/bats-core"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2970203aedf9e829edb96a137a4fe81b"
-SRC_URI = "git://github.com/bats-core/bats-core.git \
+SRC_URI = "git://github.com/bats-core/bats-core.git;branch=master;protocol=https \
"
# v1.1.0
SRCREV = "c706d1470dd1376687776bbe985ac22d09780327"
diff --git a/meta-oe/recipes-test/catch2/catch2_2.9.2.bb b/meta-oe/recipes-test/catch2/catch2_2.9.2.bb
index 57fc935f77..50188937d5 100644
--- a/meta-oe/recipes-test/catch2/catch2_2.9.2.bb
+++ b/meta-oe/recipes-test/catch2/catch2_2.9.2.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "https://github.com/catchorg/Catch2"
LICENSE = "BSL-1.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-SRC_URI = "git://github.com/catchorg/Catch2.git"
+SRC_URI = "git://github.com/catchorg/Catch2.git;branch=v2.x;protocol=https"
SRCREV = "2c869e17e4803d30b3d5ca5b0d76387b9db97fa5"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-test/evtest/evtest_1.34.bb b/meta-oe/recipes-test/evtest/evtest_1.34.bb
index a3a23c8951..eb6a34f301 100644
--- a/meta-oe/recipes-test/evtest/evtest_1.34.bb
+++ b/meta-oe/recipes-test/evtest/evtest_1.34.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS = "libxml2"
SRCREV = "16e5104127a620686bdddc4a9ad62881134d6c69"
-SRC_URI = "git://gitlab.freedesktop.org/libevdev/evtest.git;protocol=https \
+SRC_URI = "git://gitlab.freedesktop.org/libevdev/evtest.git;protocol=https;branch=master \
file://add_missing_limits_h_include.patch \
file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
"
diff --git a/meta-oe/recipes-test/fbtest/fb-test_git.bb b/meta-oe/recipes-test/fbtest/fb-test_git.bb
index 6a9d4b2787..2992135726 100644
--- a/meta-oe/recipes-test/fbtest/fb-test_git.bb
+++ b/meta-oe/recipes-test/fbtest/fb-test_git.bb
@@ -6,7 +6,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
SRCREV = "063ec650960c2d79ac51f5c5f026cb05343a33e2"
-SRC_URI = "git://github.com/prpplague/fb-test-app.git"
+SRC_URI = "git://github.com/prpplague/fb-test-app.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-oe/recipes-test/googletest/googletest_git.bb b/meta-oe/recipes-test/googletest/googletest_git.bb
index 354e7de337..35fe1bed00 100644
--- a/meta-oe/recipes-test/googletest/googletest_git.bb
+++ b/meta-oe/recipes-test/googletest/googletest_git.bb
@@ -11,7 +11,7 @@ PROVIDES += "gmock gtest"
S = "${WORKDIR}/git"
SRCREV = "703bd9caab50b139428cea1aaff9974ebee5742e"
-SRC_URI = "git://github.com/google/googletest.git"
+SRC_URI = "git://github.com/google/googletest.git;branch=main;protocol=https"
inherit cmake
diff --git a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb
index 7e9971ea4c..bb641437c9 100644
--- a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb
+++ b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb
@@ -42,6 +42,7 @@ do_install () {
do
# Remove hardcoded relative paths
sed -i -e 's#..\/utils\/##' ${script}
+ sed -i -e 's#. ..\/Switches#${bindir}#g' ${script}
script_basename=`basename ${script}`
install -m 0755 $script ${D}${libdir}/${BPN}/${script_basename}
@@ -54,7 +55,7 @@ do_install () {
# if the script includes any helper scripts from the $libdir
# directory then change the source path to the absolute path
# to reflect the install location of the helper scripts.
- sed -i -e "s#source ../include#source ${libdir}/${BPN}#g" ${script}
+ sed -i -e "s#. ../include#. ${libdir}/${BPN}#g" ${script}
# Remove hardcoded relative paths
sed -i -e 's#..\/utils\/##' ${script}
diff --git a/meta-perl/recipes-perl/libconfig/libconfig-autoconf-perl_0.318.bb b/meta-perl/recipes-perl/libconfig/libconfig-autoconf-perl_0.318.bb
index afd26fa1c4..40bb586449 100644
--- a/meta-perl/recipes-perl/libconfig/libconfig-autoconf-perl_0.318.bb
+++ b/meta-perl/recipes-perl/libconfig/libconfig-autoconf-perl_0.318.bb
@@ -38,4 +38,4 @@ S = "${WORKDIR}/Config-AutoConf-${PV}"
inherit cpan ptest-perl
-BBCLASSEXTEND = "native nativesdk"
+BBCLASSEXTEND = "native"
diff --git a/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.068.bb b/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.068.bb
index fc9786beca..9322db4085 100644
--- a/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.068.bb
+++ b/meta-perl/recipes-perl/libio/libio-socket-ssl-perl_2.068.bb
@@ -43,5 +43,3 @@ do_install_ptest () {
cp -r ${B}/t ${D}${PTEST_PATH}
cp -r ${B}/certs ${D}${PTEST_PATH}
}
-
-BBCLASSEXTEND = "native"
diff --git a/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.24.bb b/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.24.bb
index 8994f692b4..6d300ea9f5 100644
--- a/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.24.bb
+++ b/meta-perl/recipes-perl/libnet/libnet-dns-perl_1.24.bb
@@ -62,5 +62,3 @@ python __anonymous () {
raise bb.parse.SkipRecipe("incompatible with %s C library" %
d.getVar('TCLIBC'))
}
-
-BBCLASSEXTEND = "native"
diff --git a/meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.66.bb b/meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.66.bb
index 26c7c389d8..77c91c86cc 100644
--- a/meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.66.bb
+++ b/meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.66.bb
@@ -41,5 +41,3 @@ RDEPENDS_${PN}-ptest += " \
perl-module-perlio \
perl-module-test-more \
"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb b/meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb
index a1bb4a399e..c281dfa5fe 100644
--- a/meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb
+++ b/meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb
@@ -34,5 +34,3 @@ SRC_URI[sha256sum] = "16a29f7acaeec081bf0e7303ba5ee24fda1d21a1104669b837745f3ea6
S = "${WORKDIR}/Unix-Statgrab-${PV}"
inherit cpan pkgconfig ptest-perl
-
-BBCLASSEXTEND = "native"
diff --git a/meta-perl/recipes-perl/po4a/po4a_0.49.bb b/meta-perl/recipes-perl/po4a/po4a_0.49.bb
index 5db5b8f8bc..d6c1d14f21 100644
--- a/meta-perl/recipes-perl/po4a/po4a_0.49.bb
+++ b/meta-perl/recipes-perl/po4a/po4a_0.49.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "https://po4a.alioth.debian.org"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=a96fc9b4cc36d80659e694ea109f0325"
-SRC_URI = "git://alioth.debian.org/anonscm/git/po4a/po4a.git;protocol=https"
+SRC_URI = "git://alioth.debian.org/anonscm/git/po4a/po4a.git;protocol=https;branch=master"
# v0.49
SRCREV = "79ed87a577a543538fe39c7b60079981f5997072"
diff --git a/meta-python/recipes-connectivity/python-txws/python3-txws_0.9.1.bb b/meta-python/recipes-connectivity/python-txws/python3-txws_0.9.1.bb
index e235682cf4..7910fcd18a 100644
--- a/meta-python/recipes-connectivity/python-txws/python3-txws_0.9.1.bb
+++ b/meta-python/recipes-connectivity/python-txws/python3-txws_0.9.1.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=76699830db7fa9e897f6a1ad05f98ec8"
DEPENDS = "python3-twisted python3-six python3-vcversioner python3-six-native python3-vcversioner-native"
-SRC_URI = "git://github.com/MostAwesomeDude/txWS.git"
+SRC_URI = "git://github.com/MostAwesomeDude/txWS.git;branch=master;protocol=https"
SRCREV= "88cf6d9b9b685ffa1720644bd53c742afb10a414"
S = "${WORKDIR}/git"
diff --git a/meta-python/recipes-core/images/meta-python-image.bb b/meta-python/recipes-core/images/meta-python-image.bb
index cc75fe6e4b..6353d389b5 100644
--- a/meta-python/recipes-core/images/meta-python-image.bb
+++ b/meta-python/recipes-core/images/meta-python-image.bb
@@ -2,5 +2,4 @@ require meta-python-image-base.bb
SUMMARY = "meta-python build test image"
-IMAGE_INSTALL += "packagegroup-meta-python \
- packagegroup-meta-python3"
+IMAGE_INSTALL += "packagegroup-meta-python3"
diff --git a/meta-python/recipes-core/images/meta-python-ptest-image.bb b/meta-python/recipes-core/images/meta-python-ptest-image.bb
index 7ee15354a2..d497016d41 100644
--- a/meta-python/recipes-core/images/meta-python-ptest-image.bb
+++ b/meta-python/recipes-core/images/meta-python-ptest-image.bb
@@ -2,4 +2,4 @@ require meta-python-image-base.bb
SUMMARY = "meta-python ptest test image"
-IMAGE_INSTALL += "packagegroup-meta-python-ptest"
+IMAGE_INSTALL += "packagegroup-meta-python3-ptest"
diff --git a/meta-python/recipes-devtools/gyp/gyp.inc b/meta-python/recipes-devtools/gyp/gyp.inc
index 98ed42cc90..1415b41623 100644
--- a/meta-python/recipes-devtools/gyp/gyp.inc
+++ b/meta-python/recipes-devtools/gyp/gyp.inc
@@ -4,7 +4,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ab828cb8ce4c62ee82945a11247b6bbd"
SECTION = "devel"
-SRC_URI = "git://chromium.googlesource.com/external/gyp;protocol=https"
+SRC_URI = "git://chromium.googlesource.com/external/gyp;protocol=https;branch=master"
SRCREV = "fcd686f1880fa52a1ee78d3e98af1b88cb334528"
S = "${WORKDIR}/git"
diff --git a/meta-python/recipes-devtools/python/python-feedformatter.inc b/meta-python/recipes-devtools/python/python-feedformatter.inc
index 6ddcaa98ec..d1669977a9 100644
--- a/meta-python/recipes-devtools/python/python-feedformatter.inc
+++ b/meta-python/recipes-devtools/python/python-feedformatter.inc
@@ -5,7 +5,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=258e3f39e2383fbd011035d04311008d"
SRCREV = "7391193c83e10420b5a2d8ef846d23fc368c6d85"
-SRC_URI = "git://github.com/marianoguerra/feedformatter.git"
+SRC_URI = "git://github.com/marianoguerra/feedformatter.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
diff --git a/meta-python/recipes-devtools/python/python-lxml.inc b/meta-python/recipes-devtools/python/python-lxml.inc
index 05b5eae462..0276a3e81a 100644
--- a/meta-python/recipes-devtools/python/python-lxml.inc
+++ b/meta-python/recipes-devtools/python/python-lxml.inc
@@ -18,6 +18,8 @@ LIC_FILES_CHKSUM = "file://LICENSES.txt;md5=e4c045ebad958ead4b48008f70838403 \
DEPENDS += "libxml2 libxslt"
+SRC_URI += "file://CVE-2022-2309.patch"
+
SRC_URI[md5sum] = "f088e452ed45b030b6f84269f1e84d11"
SRC_URI[sha256sum] = "8620ce80f50d023d414183bf90cc2576c2837b88e00bea3f33ad2630133bbb60"
diff --git a/meta-python/recipes-devtools/python/python-pint.inc b/meta-python/recipes-devtools/python/python-pint.inc
index d022c41a57..5d880a0397 100644
--- a/meta-python/recipes-devtools/python/python-pint.inc
+++ b/meta-python/recipes-devtools/python/python-pint.inc
@@ -14,8 +14,6 @@ SRC_URI[sha256sum] = "308f1070500e102f83b6adfca6db53debfce2ffc5d3cbe3f6c367da359
DEPENDS += "python3-setuptools-scm-native"
-BBCLASSEXTEND = "native nativesdk"
-
SRC_URI += " \
file://run-ptest \
"
diff --git a/meta-python/recipes-devtools/python/python3-absl_0.7.0.bb b/meta-python/recipes-devtools/python/python3-absl_0.7.0.bb
index c65a6d7da4..9811c3b9c9 100644
--- a/meta-python/recipes-devtools/python/python3-absl_0.7.0.bb
+++ b/meta-python/recipes-devtools/python/python3-absl_0.7.0.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
-SRC_URI = "git://github.com/abseil/abseil-py.git"
+SRC_URI = "git://github.com/abseil/abseil-py.git;branch=master;protocol=https"
SRCREV ?= "e3ce504183c57fc4eca52fe84732c11cda99d131"
inherit setuptools3
diff --git a/meta-python/recipes-devtools/python/python3-astor_0.8.1.bb b/meta-python/recipes-devtools/python/python3-astor_0.8.1.bb
index 125a0236ec..5b3c73c923 100644
--- a/meta-python/recipes-devtools/python/python3-astor_0.8.1.bb
+++ b/meta-python/recipes-devtools/python/python3-astor_0.8.1.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=561205fdabc3ec52cae2d30815b8ade7"
-SRC_URI = "git://github.com/berkerpeksag/astor.git "
+SRC_URI = "git://github.com/berkerpeksag/astor.git;branch=master;protocol=https"
SRCREV ?= "c7553c79f9222e20783fe9bd8a553f932e918072"
inherit setuptools3
diff --git a/meta-python/recipes-devtools/python/python3-cmd2_0.9.23.bb b/meta-python/recipes-devtools/python/python3-cmd2_0.9.23.bb
index 803ca4a404..24e38cfb4e 100644
--- a/meta-python/recipes-devtools/python/python3-cmd2_0.9.23.bb
+++ b/meta-python/recipes-devtools/python/python3-cmd2_0.9.23.bb
@@ -16,5 +16,3 @@ RDEPENDS_${PN} += "\
${PYTHON_PN}-pyperclip \
${PYTHON_PN}-wcwidth \
"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-python/recipes-devtools/python/python3-cryptography/0001-chunked-update_into-5419.patch b/meta-python/recipes-devtools/python/python3-cryptography/0001-chunked-update_into-5419.patch
new file mode 100644
index 0000000000..c5d7ca3860
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-cryptography/0001-chunked-update_into-5419.patch
@@ -0,0 +1,99 @@
+From 7dee5927eb528f7ddebd62fbab31232d505acc22 Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Sun, 23 Aug 2020 23:41:33 -0500
+Subject: [PATCH] chunked update_into (#5419)
+
+* chunked update_into
+
+* all pointer arithmetic all the time
+
+* review feedback
+
+Upstream-Status: Backport [https://github.com/pyca/cryptography/commit/f90ba1808ee9bd9a13c5673b776484644f29d7ba]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ .../hazmat/backends/openssl/ciphers.py | 31 +++++++++++++------
+ tests/hazmat/primitives/test_ciphers.py | 17 ++++++++++
+ 2 files changed, 38 insertions(+), 10 deletions(-)
+
+diff --git a/src/cryptography/hazmat/backends/openssl/ciphers.py b/src/cryptography/hazmat/backends/openssl/ciphers.py
+index 94b48f52..86bc94b3 100644
+--- a/src/cryptography/hazmat/backends/openssl/ciphers.py
++++ b/src/cryptography/hazmat/backends/openssl/ciphers.py
+@@ -17,6 +17,7 @@ from cryptography.hazmat.primitives.ciphers import modes
+ class _CipherContext(object):
+ _ENCRYPT = 1
+ _DECRYPT = 0
++ _MAX_CHUNK_SIZE = 2 ** 31
+
+ def __init__(self, backend, cipher, mode, operation):
+ self._backend = backend
+@@ -125,22 +126,32 @@ class _CipherContext(object):
+ return bytes(buf[:n])
+
+ def update_into(self, data, buf):
+- if len(buf) < (len(data) + self._block_size_bytes - 1):
++ total_data_len = len(data)
++ if len(buf) < (total_data_len + self._block_size_bytes - 1):
+ raise ValueError(
+ "buffer must be at least {} bytes for this "
+ "payload".format(len(data) + self._block_size_bytes - 1)
+ )
+
+- buf = self._backend._ffi.cast(
+- "unsigned char *", self._backend._ffi.from_buffer(buf)
+- )
++ data_processed = 0
++ total_out = 0
+ outlen = self._backend._ffi.new("int *")
+- res = self._backend._lib.EVP_CipherUpdate(
+- self._ctx, buf, outlen,
+- self._backend._ffi.from_buffer(data), len(data)
+- )
+- self._backend.openssl_assert(res != 0)
+- return outlen[0]
++ baseoutbuf = self._backend._ffi.from_buffer(buf)
++ baseinbuf = self._backend._ffi.from_buffer(data)
++
++ while data_processed != total_data_len:
++ outbuf = baseoutbuf + total_out
++ inbuf = baseinbuf + data_processed
++ inlen = min(self._MAX_CHUNK_SIZE, total_data_len - data_processed)
++
++ res = self._backend._lib.EVP_CipherUpdate(
++ self._ctx, outbuf, outlen, inbuf, inlen
++ )
++ self._backend.openssl_assert(res != 0)
++ data_processed += inlen
++ total_out += outlen[0]
++
++ return total_out
+
+ def finalize(self):
+ # OpenSSL 1.0.1 on Ubuntu 12.04 (and possibly other distributions)
+diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py
+index f29ba9a9..b88610e7 100644
+--- a/tests/hazmat/primitives/test_ciphers.py
++++ b/tests/hazmat/primitives/test_ciphers.py
+@@ -309,3 +309,20 @@ class TestCipherUpdateInto(object):
+ buf = bytearray(5)
+ with pytest.raises(ValueError):
+ encryptor.update_into(b"testing", buf)
++
++ def test_update_into_auto_chunking(self, backend, monkeypatch):
++ key = b"\x00" * 16
++ c = ciphers.Cipher(AES(key), modes.ECB(), backend)
++ encryptor = c.encryptor()
++ # Lower max chunk size so we can test chunking
++ monkeypatch.setattr(encryptor._ctx, "_MAX_CHUNK_SIZE", 40)
++ buf = bytearray(527)
++ pt = b"abcdefghijklmnopqrstuvwxyz012345" * 16 # 512 bytes
++ processed = encryptor.update_into(pt, buf)
++ assert processed == 512
++ decryptor = c.decryptor()
++ # Change max chunk size to verify alternate boundaries don't matter
++ monkeypatch.setattr(decryptor._ctx, "_MAX_CHUNK_SIZE", 73)
++ decbuf = bytearray(527)
++ decprocessed = decryptor.update_into(buf[:processed], decbuf)
++ assert decbuf[:decprocessed] == pt
diff --git a/meta-python/recipes-devtools/python/python3-cryptography/0002-chunking-didn-t-actually-work-5499.patch b/meta-python/recipes-devtools/python/python3-cryptography/0002-chunking-didn-t-actually-work-5499.patch
new file mode 100644
index 0000000000..f28f414197
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-cryptography/0002-chunking-didn-t-actually-work-5499.patch
@@ -0,0 +1,43 @@
+From 7c72190620c3ccaeeab53fdd93547ca4d37b2f6b Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Sun, 25 Oct 2020 06:15:18 -0700
+Subject: [PATCH] chunking didn't actually work (#5499)
+
+Upstream-Status: Backport [https://github.com/pyca/cryptography/commit/836a92a28fbe9df8c37121e340b91ed9cd519ddd]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/cryptography/hazmat/backends/openssl/ciphers.py | 2 +-
+ tests/hazmat/primitives/test_ciphers.py | 9 +++++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/cryptography/hazmat/backends/openssl/ciphers.py b/src/cryptography/hazmat/backends/openssl/ciphers.py
+index 86bc94b3..2b7da80c 100644
+--- a/src/cryptography/hazmat/backends/openssl/ciphers.py
++++ b/src/cryptography/hazmat/backends/openssl/ciphers.py
+@@ -17,7 +17,7 @@ from cryptography.hazmat.primitives.ciphers import modes
+ class _CipherContext(object):
+ _ENCRYPT = 1
+ _DECRYPT = 0
+- _MAX_CHUNK_SIZE = 2 ** 31
++ _MAX_CHUNK_SIZE = 2 ** 31 - 1
+
+ def __init__(self, backend, cipher, mode, operation):
+ self._backend = backend
+diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py
+index b88610e7..fd9048b7 100644
+--- a/tests/hazmat/primitives/test_ciphers.py
++++ b/tests/hazmat/primitives/test_ciphers.py
+@@ -326,3 +326,12 @@ class TestCipherUpdateInto(object):
+ decbuf = bytearray(527)
+ decprocessed = decryptor.update_into(buf[:processed], decbuf)
+ assert decbuf[:decprocessed] == pt
++
++ def test_max_chunk_size_fits_in_int32(self, backend):
++ # max chunk must fit in signed int32 or else a call large enough to
++ # cause chunking will result in the very OverflowError we want to
++ # avoid with chunking.
++ key = b"\x00" * 16
++ c = ciphers.Cipher(AES(key), modes.ECB(), backend)
++ encryptor = c.encryptor()
++ backend._ffi.new("int *", encryptor._ctx._MAX_CHUNK_SIZE)
diff --git a/meta-python/recipes-devtools/python/python3-cryptography/0003-correct-buffer-overflows-cause-by-integer-overflow-i.patch b/meta-python/recipes-devtools/python/python3-cryptography/0003-correct-buffer-overflows-cause-by-integer-overflow-i.patch
new file mode 100644
index 0000000000..449dd692e6
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-cryptography/0003-correct-buffer-overflows-cause-by-integer-overflow-i.patch
@@ -0,0 +1,37 @@
+From 6d0a76521abe287f5ddb5cd1cfbc799d35f08cf9 Mon Sep 17 00:00:00 2001
+From: Alex Gaynor <alex.gaynor@gmail.com>
+Date: Sun, 7 Feb 2021 11:36:56 -0500
+Subject: [PATCH] correct buffer overflows cause by integer overflow in openssl
+ (#5747)
+
+* correct buffer overflows cause by integer overflow in openssl
+
+frustratingly, there is no test for this -- that's because testing this
+requires allocating more memory than is available in CI.
+
+fixes #5615.
+
+* backport CI fixes
+
+* another CI backport
+
+Upstream-Status: Backport [https://github.com/pyca/cryptography/commit/82b6ce28389f0a317bc55ba2091a74b346db7cae]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ src/cryptography/hazmat/backends/openssl/ciphers.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cryptography/hazmat/backends/openssl/ciphers.py b/src/cryptography/hazmat/backends/openssl/ciphers.py
+index 2b7da80c..7ef5f1ea 100644
+--- a/src/cryptography/hazmat/backends/openssl/ciphers.py
++++ b/src/cryptography/hazmat/backends/openssl/ciphers.py
+@@ -17,7 +17,7 @@ from cryptography.hazmat.primitives.ciphers import modes
+ class _CipherContext(object):
+ _ENCRYPT = 1
+ _DECRYPT = 0
+- _MAX_CHUNK_SIZE = 2 ** 31 - 1
++ _MAX_CHUNK_SIZE = 2 ** 30 - 1
+
+ def __init__(self, backend, cipher, mode, operation):
+ self._backend = backend
diff --git a/meta-python/recipes-devtools/python/python3-cryptography/CVE-2023-23931.patch b/meta-python/recipes-devtools/python/python3-cryptography/CVE-2023-23931.patch
new file mode 100644
index 0000000000..6ef50a0084
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-cryptography/CVE-2023-23931.patch
@@ -0,0 +1,45 @@
+From 9fbf84efc861668755ab645530ec7be9cf3c6696 Mon Sep 17 00:00:00 2001
+From: Alex Gaynor <alex.gaynor@gmail.com>
+Date: Tue, 7 Feb 2023 11:34:18 -0500
+Subject: [PATCH] Don't allow update_into to mutate immutable objects (#8230)
+
+Upstream-Status: Backport [https://github.com/pyca/cryptography/commit/9fbf84efc861668755ab645530ec7be9cf3c6696]
+CVE: CVE-2023-23931
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/cryptography/hazmat/backends/openssl/ciphers.py | 2 +-
+ tests/hazmat/primitives/test_ciphers.py | 8 ++++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/cryptography/hazmat/backends/openssl/ciphers.py b/src/cryptography/hazmat/backends/openssl/ciphers.py
+index 286583f9325..075d68fb905 100644
+--- a/src/cryptography/hazmat/backends/openssl/ciphers.py
++++ b/src/cryptography/hazmat/backends/openssl/ciphers.py
+@@ -156,7 +156,7 @@ def update_into(self, data: bytes, buf: bytes) -> int:
+ data_processed = 0
+ total_out = 0
+ outlen = self._backend._ffi.new("int *")
+- baseoutbuf = self._backend._ffi.from_buffer(buf)
++ baseoutbuf = self._backend._ffi.from_buffer(buf, require_writable=True)
+ baseinbuf = self._backend._ffi.from_buffer(data)
+
+ while data_processed != total_data_len:
+diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py
+index 02127dd9cab..bf3b047dec2 100644
+--- a/tests/hazmat/primitives/test_ciphers.py
++++ b/tests/hazmat/primitives/test_ciphers.py
+@@ -318,6 +318,14 @@ def test_update_into_buffer_too_small(self, backend):
+ with pytest.raises(ValueError):
+ encryptor.update_into(b"testing", buf)
+
++ def test_update_into_immutable(self, backend):
++ key = b"\x00" * 16
++ c = ciphers.Cipher(AES(key), modes.ECB(), backend)
++ encryptor = c.encryptor()
++ buf = b"\x00" * 32
++ with pytest.raises((TypeError, BufferError)):
++ encryptor.update_into(b"testing", buf)
++
+ @pytest.mark.supported(
+ only_if=lambda backend: backend.cipher_supported(
+ AES(b"\x00" * 16), modes.GCM(b"\x00" * 12)
diff --git a/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb b/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb
index c75dabb974..e4d69fa5aa 100644
--- a/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb
+++ b/meta-python/recipes-devtools/python/python3-cryptography_2.8.bb
@@ -11,6 +11,10 @@ SRC_URI[sha256sum] = "3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02
SRC_URI += " \
file://run-ptest \
+ file://0001-chunked-update_into-5419.patch \
+ file://0002-chunking-didn-t-actually-work-5499.patch \
+ file://0003-correct-buffer-overflows-cause-by-integer-overflow-i.patch \
+ file://CVE-2023-23931.patch \
"
inherit pypi setuptools3
diff --git a/meta-python/recipes-devtools/python/python3-dbussy_1.2.1.bb b/meta-python/recipes-devtools/python/python3-dbussy_1.2.1.bb
index ac4b8c2aa6..c33c0f110f 100644
--- a/meta-python/recipes-devtools/python/python3-dbussy_1.2.1.bb
+++ b/meta-python/recipes-devtools/python/python3-dbussy_1.2.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/ldo/dbussy"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-SRC_URI = "git://github.com/ldo/dbussy.git"
+SRC_URI = "git://github.com/ldo/dbussy.git;branch=master;protocol=https"
SRCREV = "d0ec0223f3797e1612d835e71694a1083881149f"
diff --git a/meta-python/recipes-devtools/python/python3-dt-schema_git.bb b/meta-python/recipes-devtools/python/python3-dt-schema_git.bb
index 06a9012ca4..d14b7de62a 100644
--- a/meta-python/recipes-devtools/python/python3-dt-schema_git.bb
+++ b/meta-python/recipes-devtools/python/python3-dt-schema_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://setup.py;beginline=2;endline=3;md5=c795d4924c5f739424
inherit setuptools3
-SRC_URI = "git://github.com/robherring/dt-schema.git"
+SRC_URI = "git://github.com/robherring/dt-schema.git;branch=master;protocol=https"
SRCREV = "5009e47c1c76e48871f5988e08dad61f3c91196b"
PV = "0.1+git${SRCPV}"
diff --git a/meta-python/recipes-devtools/python/python3-fasteners_0.15.bb b/meta-python/recipes-devtools/python/python3-fasteners_0.16.3.bb
index 8786a14842..1ba2c6f200 100644
--- a/meta-python/recipes-devtools/python/python3-fasteners_0.15.bb
+++ b/meta-python/recipes-devtools/python/python3-fasteners_0.16.3.bb
@@ -3,7 +3,12 @@ HOMEPAGE = "https://github.com/harlowja/fasteners"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4476c4be31402271e101d9a4a3430d52"
-SRC_URI[md5sum] = "440f8ab461c8fed941355860d8669556"
-SRC_URI[sha256sum] = "3a176da6b70df9bb88498e1a18a9e4a8579ed5b9141207762368a1017bf8f5ef"
+SRC_URI[md5sum] = "243188fe770ad60e9da722bef9dc7a78"
+SRC_URI[sha256sum] = "b1ab4e5adfbc28681ce44b3024421c4f567e705cc3963c732bf1cba3348307de"
inherit pypi setuptools3
+
+RDEPENDS:${PN} += "\
+ ${PYTHON_PN}-logging \
+ ${PYTHON_PN}-fcntl \
+"
diff --git a/meta-python/recipes-devtools/python/python3-gast_0.2.2.bb b/meta-python/recipes-devtools/python/python3-gast_0.2.2.bb
index 6e08a19949..caf80c7621 100644
--- a/meta-python/recipes-devtools/python/python3-gast_0.2.2.bb
+++ b/meta-python/recipes-devtools/python/python3-gast_0.2.2.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a3ad9b6802e713fc5e307e1230f1ea90"
-SRC_URI = "git://github.com/serge-sans-paille/gast.git"
+SRC_URI = "git://github.com/serge-sans-paille/gast.git;branch=master;protocol=https"
SRCREV ?= "ed82e2a507505c6b18eb665d3738b6c0602da5e7"
inherit setuptools3
diff --git a/meta-python/recipes-devtools/python/python3-h5py_2.9.0.bb b/meta-python/recipes-devtools/python/python3-h5py_2.9.0.bb
index 7822e463ee..711ced022e 100644
--- a/meta-python/recipes-devtools/python/python3-h5py_2.9.0.bb
+++ b/meta-python/recipes-devtools/python/python3-h5py_2.9.0.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://setup.py;beginline=107;endline=107;md5=795ecad0d261c998cc526c84a822dff6"
-SRC_URI = "git://github.com/h5py/h5py.git \
+SRC_URI = "git://github.com/h5py/h5py.git;branch=master;protocol=https \
file://0001-cross-compiling-support.patch \
"
SRCREV ?= "8d96a14c3508de1bde77aec5db302e478dc5dbc4"
diff --git a/meta-python/recipes-devtools/python/python3-imageio_2.6.0.bb b/meta-python/recipes-devtools/python/python3-imageio_2.6.0.bb
index 8fe4b988db..4d8af17209 100644
--- a/meta-python/recipes-devtools/python/python3-imageio_2.6.0.bb
+++ b/meta-python/recipes-devtools/python/python3-imageio_2.6.0.bb
@@ -5,7 +5,7 @@ SECTION = "devel/python"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d8b7fdd0dff0fd18f35c05365d3d7bf7"
-SRC_URI = "git://github.com/imageio/imageio.git;protocol=https"
+SRC_URI = "git://github.com/imageio/imageio.git;protocol=https;branch=master"
SRCREV = "0b161649b3ee108f80bd99466aeab2e65cf82cd8"
S = "${WORKDIR}/git"
diff --git a/meta-python/recipes-devtools/python/python3-keras-applications_1.0.8.bb b/meta-python/recipes-devtools/python/python3-keras-applications_1.0.8.bb
index 4293a63c1e..a124dd9f5b 100644
--- a/meta-python/recipes-devtools/python/python3-keras-applications_1.0.8.bb
+++ b/meta-python/recipes-devtools/python/python3-keras-applications_1.0.8.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=366e2fd3c9714f162d3663b6f97cfe41"
-SRC_URI = "git://github.com/keras-team/keras-applications.git"
+SRC_URI = "git://github.com/keras-team/keras-applications.git;branch=master;protocol=https"
SRCREV ?= "3b180cb10eda683dda7913ecee2e6487288d292d"
diff --git a/meta-python/recipes-devtools/python/python3-keras-preprocessing_1.1.0.bb b/meta-python/recipes-devtools/python/python3-keras-preprocessing_1.1.0.bb
index eacb3402d6..feb872e0a7 100644
--- a/meta-python/recipes-devtools/python/python3-keras-preprocessing_1.1.0.bb
+++ b/meta-python/recipes-devtools/python/python3-keras-preprocessing_1.1.0.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1744b320500cc2e3112964d00cce7aa4"
-SRC_URI = "git://github.com/keras-team/keras-preprocessing.git"
+SRC_URI = "git://github.com/keras-team/keras-preprocessing.git;branch=master;protocol=https"
SRCREV ?= "ff90696c0416b74344b91df097b228e694339b88"
inherit setuptools3
diff --git a/meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb b/meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb
index eb42fe978c..fd39e0fdb7 100644
--- a/meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb
+++ b/meta-python/recipes-devtools/python/python3-langtable_0.0.38.bb
@@ -11,7 +11,7 @@ B = "${S}"
SRCREV = "35687ca957b746f153a6872139462b1443f8cad1"
PV = "0.0.38+git${SRCPV}"
-SRC_URI = "git://github.com/mike-fabian/langtable.git;branch=master \
+SRC_URI = "git://github.com/mike-fabian/langtable.git;branch=master;protocol=https \
"
inherit setuptools3 python3native
diff --git a/meta-python/recipes-devtools/python/python3-lxml/CVE-2022-2309.patch b/meta-python/recipes-devtools/python/python3-lxml/CVE-2022-2309.patch
new file mode 100644
index 0000000000..ff3fcee6e2
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-lxml/CVE-2022-2309.patch
@@ -0,0 +1,94 @@
+From ccbda4b0669f418b2f00c4f099733cebe633eb47 Mon Sep 17 00:00:00 2001
+From: Hitendra Prajapati <hprajapati@mvista.com>
+Date: Fri, 29 Jul 2022 10:16:59 +0530
+Subject: [PATCH] CVE-2022-2309
+
+Upstream-Status: Backport [https://github.com/lxml/lxml/commit/86368e9cf70a0ad23cccd5ee32de847149af0c6f]
+CVE: CVE-2022-2309
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+---
+ src/lxml/apihelpers.pxi | 7 ++++---
+ src/lxml/iterparse.pxi | 11 ++++++-----
+ src/lxml/tests/test_etree.py | 20 ++++++++++++++++++++
+ 3 files changed, 30 insertions(+), 8 deletions(-)
+
+diff --git a/src/lxml/apihelpers.pxi b/src/lxml/apihelpers.pxi
+index 5eb3416..88a031d 100644
+--- a/src/lxml/apihelpers.pxi
++++ b/src/lxml/apihelpers.pxi
+@@ -246,9 +246,10 @@ cdef dict _build_nsmap(xmlNode* c_node):
+ while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE:
+ c_ns = c_node.nsDef
+ while c_ns is not NULL:
+- prefix = funicodeOrNone(c_ns.prefix)
+- if prefix not in nsmap:
+- nsmap[prefix] = funicodeOrNone(c_ns.href)
++ if c_ns.prefix or c_ns.href:
++ prefix = funicodeOrNone(c_ns.prefix)
++ if prefix not in nsmap:
++ nsmap[prefix] = funicodeOrNone(c_ns.href)
+ c_ns = c_ns.next
+ c_node = c_node.parent
+ return nsmap
+diff --git a/src/lxml/iterparse.pxi b/src/lxml/iterparse.pxi
+index 4c20506..3da7485 100644
+--- a/src/lxml/iterparse.pxi
++++ b/src/lxml/iterparse.pxi
+@@ -419,7 +419,7 @@ cdef int _countNsDefs(xmlNode* c_node):
+ count = 0
+ c_ns = c_node.nsDef
+ while c_ns is not NULL:
+- count += 1
++ count += (c_ns.href is not NULL)
+ c_ns = c_ns.next
+ return count
+
+@@ -430,9 +430,10 @@ cdef int _appendStartNsEvents(xmlNode* c_node, list event_list) except -1:
+ count = 0
+ c_ns = c_node.nsDef
+ while c_ns is not NULL:
+- ns_tuple = (funicode(c_ns.prefix) if c_ns.prefix is not NULL else '',
+- funicode(c_ns.href))
+- event_list.append( (u"start-ns", ns_tuple) )
+- count += 1
++ if c_ns.href:
++ ns_tuple = (funicodeOrEmpty(c_ns.prefix),
++ funicode(c_ns.href))
++ event_list.append( (u"start-ns", ns_tuple) )
++ count += 1
+ c_ns = c_ns.next
+ return count
+diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
+index b997e4d..69e1bf1 100644
+--- a/src/lxml/tests/test_etree.py
++++ b/src/lxml/tests/test_etree.py
+@@ -1448,6 +1448,26 @@ class ETreeOnlyTestCase(HelperTestCase):
+ [1,2,1,4],
+ counts)
+
++ def test_walk_after_parse_failure(self):
++ # This used to be an issue because libxml2 can leak empty namespaces
++ # between failed parser runs. iterwalk() failed to handle such a tree.
++ try:
++ etree.XML('''<anot xmlns="1">''')
++ except etree.XMLSyntaxError:
++ pass
++ else:
++ assert False, "invalid input did not fail to parse"
++
++ et = etree.XML('''<root> </root>''')
++ try:
++ ns = next(etree.iterwalk(et, events=('start-ns',)))
++ except StopIteration:
++ # This would be the expected result, because there was no namespace
++ pass
++ else:
++ # This is a bug in libxml2
++ assert not ns, repr(ns)
++
+ def test_itertext_comment_pi(self):
+ # https://bugs.launchpad.net/lxml/+bug/1844674
+ XML = self.etree.XML
+--
+2.25.1
+
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib_3.2.1.bb b/meta-python/recipes-devtools/python/python3-matplotlib_3.2.1.bb
index f6d8c53d05..57d38e60ba 100644
--- a/meta-python/recipes-devtools/python/python3-matplotlib_3.2.1.bb
+++ b/meta-python/recipes-devtools/python/python3-matplotlib_3.2.1.bb
@@ -32,6 +32,5 @@ RDEPENDS_${PN} = "\
python3-dateutil \
python3-kiwisolver \
python3-pytz \
+ python3-pillow \
"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch b/meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch
new file mode 100644
index 0000000000..0f0cfa7804
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch
@@ -0,0 +1,26 @@
+From 7df88fc2319852ace202a650703d631200080e3b Mon Sep 17 00:00:00 2001
+From: Andrew Murray <radarhere@users.noreply.github.com>
+Date: Thu, 30 Jun 2022 12:47:35 +1000
+Subject: [PATCH] Added GIF decompression bomb check
+
+Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/884437f8a2b953a0abd2a3b130a87fcfb438092e]
+CVE: CVE-2022-45198
+Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
+---
+ src/PIL/GifImagePlugin.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
+index 9d8e96f..c477fdd 100644
+--- a/src/PIL/GifImagePlugin.py
++++ b/src/PIL/GifImagePlugin.py
+@@ -238,6 +238,7 @@ class GifImageFile(ImageFile.ImageFile):
+ x1, y1 = x0 + i16(s[4:]), y0 + i16(s[6:])
+ if x1 > self.size[0] or y1 > self.size[1]:
+ self._size = max(x1, self.size[0]), max(y1, self.size[1])
++ Image._decompression_bomb_check(self._size)
+ self.dispose_extent = x0, y0, x1, y1
+ flags = i8(s[8])
+
+--
+2.7.4
diff --git a/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-1.patch b/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-1.patch
new file mode 100644
index 0000000000..f9e3c49505
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-1.patch
@@ -0,0 +1,31 @@
+From 45c726fd4daa63236a8f3653530f297dc87b160a Mon Sep 17 00:00:00 2001
+From: Eric Soroos <eric-github@soroos.net>
+Date: Fri, 27 Oct 2023 11:21:18 +0200
+Subject: [PATCH] Don't allow __ or builtins in env dictionarys for
+ ImageMath.eval
+
+Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/45c726fd4daa63236a8f3653530f297dc87b160a]
+CVE: CVE-2023-50447
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ src/PIL/ImageMath.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/PIL/ImageMath.py b/src/PIL/ImageMath.py
+index 392151c10..4cea3855e 100644
+--- a/src/PIL/ImageMath.py
++++ b/src/PIL/ImageMath.py
+@@ -261,6 +261,10 @@ def eval(expression, _dict={}, **kw):
+ args.update(_dict)
+ args.update(kw)
+ for k, v in list(args.items()):
++ if '__' in k or hasattr(__builtins__, k):
++ msg = f"'{k}' not allowed"
++ raise ValueError(msg)
++
+ if hasattr(v, "im"):
+ args[k] = _Operand(v)
+
+--
+2.25.1
+
diff --git a/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-2.patch b/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-2.patch
new file mode 100644
index 0000000000..9c5d3fbcdc
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-2.patch
@@ -0,0 +1,54 @@
+From 0ca3c33c59927e1c7e0c14dbc1eea1dfb2431a80 Mon Sep 17 00:00:00 2001
+From: Andrew Murray <radarhere@users.noreply.github.com>
+Date: Sat, 28 Oct 2023 15:58:52 +1100
+Subject: [PATCH] Allow ops
+
+Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/0ca3c33c59927e1c7e0c14dbc1eea1dfb2431a80]
+CVE: CVE-2023-50447
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ Tests/test_imagemath.py | 4 ++++
+ src/PIL/ImageMath.py | 9 +++++----
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/Tests/test_imagemath.py b/Tests/test_imagemath.py
+index da41b3a12..14a58a532 100644
+--- a/Tests/test_imagemath.py
++++ b/Tests/test_imagemath.py
+@@ -56,6 +56,10 @@ class TestImageMath(PillowTestCase):
+ pixel(ImageMath.eval("float(B)**33", images)), "F 8589934592.0"
+ )
+
++ def test_prevent_double_underscores():
++ with pytest.raises(ValueError):
++ ImageMath.eval("1", {"__": None})
++
+ def test_logical(self):
+ self.assertEqual(pixel(ImageMath.eval("not A", images)), 0)
+ self.assertEqual(pixel(ImageMath.eval("A and B", images)), "L 2")
+diff --git a/src/PIL/ImageMath.py b/src/PIL/ImageMath.py
+index 4cea3855e..776604e3f 100644
+--- a/src/PIL/ImageMath.py
++++ b/src/PIL/ImageMath.py
+@@ -258,13 +258,14 @@ def eval(expression, _dict={}, **kw):
+
+ # build execution namespace
+ args = ops.copy()
+- args.update(_dict)
+- args.update(kw)
+- for k, v in list(args.items()):
+- if '__' in k or hasattr(__builtins__, k):
++ for k in list(_dict.keys()) + list(kw.keys()):
++ if "__" in k or hasattr(__builtins__, k):
+ msg = f"'{k}' not allowed"
+ raise ValueError(msg)
+
++ args.update(_dict)
++ args.update(kw)
++ for k, v in list(args.items()):
+ if hasattr(v, "im"):
+ args[k] = _Operand(v)
+
+--
+2.25.1
+
diff --git a/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-3.patch b/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-3.patch
new file mode 100644
index 0000000000..b93425ee58
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/CVE-2023-50447-3.patch
@@ -0,0 +1,44 @@
+From 557ba59d13de919d04b3fd4cdef8634f7d4b3348 Mon Sep 17 00:00:00 2001
+From: Andrew Murray <radarhere@users.noreply.github.com>
+Date: Sat, 30 Dec 2023 09:30:12 +1100
+Subject: [PATCH] Include further builtins
+
+Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/557ba59d13de919d04b3fd4cdef8634f7d4b3348]
+CVE: CVE-2023-50447
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ Tests/test_imagemath.py | 4 ++++
+ src/PIL/ImageMath.py | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/Tests/test_imagemath.py b/Tests/test_imagemath.py
+index 14a58a532..5bba832e2 100644
+--- a/Tests/test_imagemath.py
++++ b/Tests/test_imagemath.py
+@@ -60,6 +60,10 @@ class TestImageMath(PillowTestCase):
+ with pytest.raises(ValueError):
+ ImageMath.eval("1", {"__": None})
+
++ def test_prevent_builtins():
++ with pytest.raises(ValueError):
++ ImageMath.eval("(lambda: exec('exit()'))()", {"exec": None})
++
+ def test_logical(self):
+ self.assertEqual(pixel(ImageMath.eval("not A", images)), 0)
+ self.assertEqual(pixel(ImageMath.eval("A and B", images)), "L 2")
+diff --git a/src/PIL/ImageMath.py b/src/PIL/ImageMath.py
+index 776604e3f..c6bc22180 100644
+--- a/src/PIL/ImageMath.py
++++ b/src/PIL/ImageMath.py
+@@ -259,7 +259,7 @@ def eval(expression, _dict={}, **kw):
+ # build execution namespace
+ args = ops.copy()
+ for k in list(_dict.keys()) + list(kw.keys()):
+- if "__" in k or hasattr(__builtins__, k):
++ if "__" in k or hasattr(builtins, k):
+ msg = f"'{k}' not allowed"
+ raise ValueError(msg)
+
+--
+2.25.1
+
diff --git a/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb b/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb
index a383a3ff91..6567b32d0d 100644
--- a/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb
+++ b/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb
@@ -5,9 +5,13 @@ HOMEPAGE = "https://pillow.readthedocs.io"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=55c0f320370091249c1755c0d2b48e89"
-SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=6.2.x \
+SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=6.2.x;protocol=https \
file://0001-support-cross-compiling.patch \
file://0001-explicitly-set-compile-options.patch \
+ file://0001-CVE-2022-45198.patch \
+ file://CVE-2023-50447-1.patch \
+ file://CVE-2023-50447-2.patch \
+ file://CVE-2023-50447-3.patch \
"
SRCREV ?= "6e0f07bbe38def22d36ee176b2efd9ea74b453a6"
@@ -34,5 +38,3 @@ CVE_PRODUCT = "pillow"
S = "${WORKDIR}/git"
RPROVIDES_${PN} += "python3-imaging"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-python/recipes-devtools/python/python3-pkgconfig_1.4.0.bb b/meta-python/recipes-devtools/python/python3-pkgconfig_1.4.0.bb
index fc7a47a43d..53f4db14ae 100644
--- a/meta-python/recipes-devtools/python/python3-pkgconfig_1.4.0.bb
+++ b/meta-python/recipes-devtools/python/python3-pkgconfig_1.4.0.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=faa7f82be8f220bff6156be4790344fc"
-SRC_URI = "git://github.com/matze/pkgconfig.git"
+SRC_URI = "git://github.com/matze/pkgconfig.git;branch=master;protocol=https"
SRCREV ?= "8af0102346847e8873af8e76ab3f34ba9da806e2"
RDEPENDS_${PN} = "pkgconfig \
diff --git a/meta-python/recipes-devtools/python/python3-prctl_1.7.bb b/meta-python/recipes-devtools/python/python3-prctl_1.7.bb
index 54620a0661..1f179852ca 100644
--- a/meta-python/recipes-devtools/python/python3-prctl_1.7.bb
+++ b/meta-python/recipes-devtools/python/python3-prctl_1.7.bb
@@ -13,7 +13,7 @@ B = "${S}"
SRCREV = "57cd0a7cad76e8f8792eea22ee5b5d17bae0a90f"
PV = "1.7+git${SRCPV}"
-SRC_URI = "git://github.com/seveas/python-prctl;branch=master \
+SRC_URI = "git://github.com/seveas/python-prctl;branch=master;protocol=https \
file://0001-support-cross-complication.patch \
"
inherit setuptools3 python3native
diff --git a/meta-python/recipes-devtools/python/python3-pyflakes_2.1.1.bb b/meta-python/recipes-devtools/python/python3-pyflakes_2.1.1.bb
index c138822400..6636fda839 100644
--- a/meta-python/recipes-devtools/python/python3-pyflakes_2.1.1.bb
+++ b/meta-python/recipes-devtools/python/python3-pyflakes_2.1.1.bb
@@ -12,5 +12,3 @@ RDEPENDS_${PN} += " \
${PYTHON_PN}-prettytable \
${PYTHON_PN}-cmd2 \
${PYTHON_PN}-pyparsing"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-python/recipes-devtools/python/python3-robotframework-seriallibrary_0.3.1.bb b/meta-python/recipes-devtools/python/python3-robotframework-seriallibrary_0.3.1.bb
index b6de42f7c1..60a26f58bc 100644
--- a/meta-python/recipes-devtools/python/python3-robotframework-seriallibrary_0.3.1.bb
+++ b/meta-python/recipes-devtools/python/python3-robotframework-seriallibrary_0.3.1.bb
@@ -16,5 +16,3 @@ RDEPENDS_${PN} += " \
${PYTHON_PN}-pyserial \
${PYTHON_PN}-robotframework \
"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-26137.patch b/meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-26137.patch
new file mode 100644
index 0000000000..3cc8bcd02a
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-urllib3/CVE-2020-26137.patch
@@ -0,0 +1,72 @@
+From 1dd69c5c5982fae7c87a620d487c2ebf7a6b436b Mon Sep 17 00:00:00 2001
+From: Seth Michael Larson <sethmichaellarson@gmail.com>
+Date: Mon, 17 Feb 2020 15:34:48 -0600
+Subject: [PATCH] Raise ValueError if method contains control characters
+ (#1800)
+
+CVE: CVE-2020-26137
+Upstream-Status: Backport [https://github.com/urllib3/urllib3/commit/1dd69c5c5982fae7c87a620d487c2ebf7a6b436b.patch]
+Signed-off-by: Nikhil R <nikhil.r@kpit.com>
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+Comment: Removed one hunk in CHANGES.rst and refresh other to remove
+patch fuzz warnings
+
+---
+ src/urllib3/connection.py | 14 ++++++++++++++
+ test/with_dummyserver/test_connectionpool.py | 6 ++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py
+index 71e6790b1b..f7b1760938 100644
+--- a/src/urllib3/connection.py
++++ b/src/urllib3/connection.py
+@@ -1,4 +1,5 @@
+ from __future__ import absolute_import
++import re
+ import datetime
+ import logging
+ import os
+@@ -58,6 +59,8 @@ port_by_scheme = {"http": 80, "https": 443}
+ # (ie test_recent_date is failing) update it to ~6 months before the current date.
+ RECENT_DATE = datetime.date(2019, 1, 1)
+
++_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
++
+
+ class DummyConnection(object):
+ """Used to detect a failed ConnectionCls import."""
+@@ -184,6 +187,17 @@ class HTTPConnection(_HTTPConnection, object):
+ conn = self._new_conn()
+ self._prepare_conn(conn)
+
++ def putrequest(self, method, url, *args, **kwargs):
++ """Send a request to the server"""
++ match = _CONTAINS_CONTROL_CHAR_RE.search(method)
++ if match:
++ raise ValueError(
++ "Method cannot contain non-token characters %r (found at least %r)"
++ % (method, match.group())
++ )
++
++ return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
++
+ def request_chunked(self, method, url, body=None, headers=None):
+ """
+ Alternative to the common request method, which sends the
+diff --git a/test/with_dummyserver/test_connectionpool.py b/test/with_dummyserver/test_connectionpool.py
+index 57f0dbd2f4..79cbd27185 100644
+--- a/test/with_dummyserver/test_connectionpool.py
++++ b/test/with_dummyserver/test_connectionpool.py
+@@ -677,6 +677,12 @@ class TestConnectionPool(HTTPDummyServerTestCase):
+ with pytest.raises(MaxRetryError):
+ pool.request("GET", "/test", retries=2)
+
++ @pytest.mark.parametrize("char", [" ", "\r", "\n", "\x00"])
++ def test_invalid_method_not_allowed(self, char):
++ with pytest.raises(ValueError):
++ with HTTPConnectionPool(self.host, self.port) as pool:
++ pool.request("GET" + char, "/")
++
+ def test_percent_encode_invalid_target_chars(self):
+ with HTTPConnectionPool(self.host, self.port) as pool:
+ r = pool.request("GET", "/echo_params?q=\r&k=\n \n")
diff --git a/meta-python/recipes-devtools/python/python3-urllib3/CVE-2021-33503.patch b/meta-python/recipes-devtools/python/python3-urllib3/CVE-2021-33503.patch
new file mode 100644
index 0000000000..838add9555
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-urllib3/CVE-2021-33503.patch
@@ -0,0 +1,67 @@
+From 2d4a3fee6de2fa45eb82169361918f759269b4ec Mon Sep 17 00:00:00 2001
+From: Seth Michael Larson <sethmichaellarson@gmail.com>
+Date: Wed, 26 May 2021 10:43:12 -0500
+Subject: [PATCH] Improve performance of sub-authority splitting in URL
+
+CVE: CVE-2021-33503
+Upstream-Status: Backport [https://github.com/urllib3/urllib3/commit/2d4a3fee6de2fa45eb82169361918f759269b4ec.patch]
+Signed-off-by: Nikhil R <nikhil.r@kpit.com>
+Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
+Comment: Refresh hunks to remove patch fuzz warnings
+
+---
+ src/urllib3/util/url.py | 8 +++++---
+ test/test_util.py | 10 ++++++++++
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py
+index 6ff238fe3c..81a03da9e3 100644
+--- a/src/urllib3/util/url.py
++++ b/src/urllib3/util/url.py
+@@ -63,12 +63,12 @@ IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$")
+ BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$")
+ ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$")
+
+-SUBAUTHORITY_PAT = (u"^(?:(.*)@)?(%s|%s|%s)(?::([0-9]{0,5}))?$") % (
++_HOST_PORT_PAT = ("^(%s|%s|%s)(?::([0-9]{0,5}))?$") % (
+ REG_NAME_PAT,
+ IPV4_PAT,
+ IPV6_ADDRZ_PAT,
+ )
+-SUBAUTHORITY_RE = re.compile(SUBAUTHORITY_PAT, re.UNICODE | re.DOTALL)
++_HOST_PORT_RE = re.compile(_HOST_PORT_PAT, re.UNICODE | re.DOTALL)
+
+ UNRESERVED_CHARS = set(
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~"
+@@ -368,7 +368,9 @@ def parse_url(url):
+ scheme = scheme.lower()
+
+ if authority:
+- auth, host, port = SUBAUTHORITY_RE.match(authority).groups()
++ auth, _, host_port = authority.rpartition("@")
++ auth = auth or None
++ host, port = _HOST_PORT_RE.match(host_port).groups()
+ if auth and normalize_uri:
+ auth = _encode_invalid_chars(auth, USERINFO_CHARS)
+ if port == "":
+diff --git a/test/test_util.py b/test/test_util.py
+index a5b68a084b..88409e2d6c 100644
+--- a/test/test_util.py
++++ b/test/test_util.py
+@@ -425,6 +425,16 @@ class TestUtil(object):
+ query="%0D%0ASET%20test%20failure12%0D%0A:8080/test/?test=a",
+ ),
+ ),
++ # Tons of '@' causing backtracking
++ ("https://" + ("@" * 10000) + "[", False),
++ (
++ "https://user:" + ("@" * 10000) + "example.com",
++ Url(
++ scheme="https",
++ auth="user:" + ("%40" * 9999),
++ host="example.com",
++ ),
++ ),
+ ]
+
+ @pytest.mark.parametrize("url, expected_url", url_vulnerabilities)
diff --git a/meta-python/recipes-devtools/python/python3-urllib3_1.25.7.bb b/meta-python/recipes-devtools/python/python3-urllib3_1.25.7.bb
index 8d987a1f30..73399d9439 100644
--- a/meta-python/recipes-devtools/python/python3-urllib3_1.25.7.bb
+++ b/meta-python/recipes-devtools/python/python3-urllib3_1.25.7.bb
@@ -8,8 +8,10 @@ SRC_URI[sha256sum] = "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e4
inherit pypi setuptools3
-SRC_URI += "file://CVE-2020-7212.patch"
-
+SRC_URI += "file://CVE-2020-7212.patch \
+ file://CVE-2020-26137.patch \
+ file://CVE-2021-33503.patch \
+ "
RDEPENDS_${PN} += "\
${PYTHON_PN}-certifi \
${PYTHON_PN}-cryptography \
diff --git a/meta-python/recipes-devtools/python/python3-wheel_0.33.6.bb b/meta-python/recipes-devtools/python/python3-wheel_0.33.6.bb
index 025b2eea9d..af7f49fdcb 100644
--- a/meta-python/recipes-devtools/python/python3-wheel_0.33.6.bb
+++ b/meta-python/recipes-devtools/python/python3-wheel_0.33.6.bb
@@ -4,7 +4,7 @@ SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9d66b41bc2a080e7174acc5dffecd752"
-SRC_URI = "git://github.com/pypa/wheel.git"
+SRC_URI = "git://github.com/pypa/wheel.git;branch=master;protocol=https"
SRCREV ?= "b227ddd5beaba49294017d061d501f6d433393b0"
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet_3.1.4.bb b/meta-python/recipes-extended/python-blivet/python3-blivet_3.1.4.bb
index 2b5b253b5d..52ae91484a 100644
--- a/meta-python/recipes-extended/python-blivet/python3-blivet_3.1.4.bb
+++ b/meta-python/recipes-extended/python-blivet/python3-blivet_3.1.4.bb
@@ -9,7 +9,7 @@ S = "${WORKDIR}/git"
B = "${S}"
SRCREV = "9b5ad2d5b5df159963e1c6c24523e1dfe1f71435"
-SRC_URI = "git://github.com/rhinstaller/blivet;branch=3.1-release \
+SRC_URI = "git://github.com/rhinstaller/blivet;branch=3.1-release;protocol=https \
file://0001-comment-out-selinux.patch \
file://0002-run_program-support-timeout.patch \
file://0003-support-infinit-timeout.patch \
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.10.bb b/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.10.bb
index 92402bee56..809d09e3ad 100644
--- a/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.10.bb
+++ b/meta-python/recipes-extended/python-blivet/python3-blivetgui_2.1.10.bb
@@ -9,7 +9,7 @@ S = "${WORKDIR}/git"
B = "${S}"
SRCREV = "67ec0b7a0e065ba24ab87963409bfb21b2aac6dd"
-SRC_URI = "git://github.com/rhinstaller/blivet-gui;branch=master \
+SRC_URI = "git://github.com/rhinstaller/blivet-gui;branch=master;protocol=https \
file://0001-Fix-return-type-of-BlivetUtils.get_disks-1658893.patch \
"
diff --git a/meta-python/recipes-extended/python-cson/python3-cson_git.bb b/meta-python/recipes-extended/python-cson/python3-cson_git.bb
index 5c74c7a307..8e8f3fb2a6 100644
--- a/meta-python/recipes-extended/python-cson/python3-cson_git.bb
+++ b/meta-python/recipes-extended/python-cson/python3-cson_git.bb
@@ -8,12 +8,11 @@ SECTION = "devel/python"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7709d2635e63ab96973055a23c2a4cac"
SRCREV = "f3f2898c44bb16b951d3e9f2fbf6d1c4158edda2"
-SRC_URI = "git://github.com/gt3389b/python-cson.git"
+SRC_URI = "git://github.com/gt3389b/python-cson.git;branch=master;protocol=https"
S = "${WORKDIR}/git"
-RDEPENDS_${PN}_class-native = ""
-DEPENDS_append_class-native = " python-native "
+RDEPENDS_${PN} = "python3-json"
inherit setuptools3
diff --git a/meta-python/recipes-extended/python-pyparted/python-pyparted.inc b/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
index 97054487f9..2322cf1092 100644
--- a/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
+++ b/meta-python/recipes-extended/python-pyparted/python-pyparted.inc
@@ -12,7 +12,7 @@ DEPENDS += "parted"
# upstream only publishes releases in github archives which are discouraged
SRCREV = "481510c10866851844b19f3d2ffcdaa37efc0cf8"
-SRC_URI = "git://github.com/rhinstaller/pyparted.git;protocol=https"
+SRC_URI = "git://github.com/rhinstaller/pyparted.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb b/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb
index 3cbab22c3d..0b4bab5753 100644
--- a/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb
+++ b/meta-webserver/recipes-httpd/apache-mod/apache-websocket_git.bb
@@ -11,7 +11,7 @@ RDEPENDS_${PN} += "apache2"
# Original (github.com/disconnect/apache-websocket) is dead since 2012, the
# fork contains patches from the modules ML and fixes CVE compliance issues
-SRC_URI = "git://github.com/jchampio/apache-websocket.git"
+SRC_URI = "git://github.com/jchampio/apache-websocket.git;branch=master;protocol=https"
SRCREV = "6968083264b90b89b1b9597a4ca03ba29e7ea2e1"
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0001-configure-use-pkg-config-for-PCRE-detection.patch b/meta-webserver/recipes-httpd/apache2/apache2/0001-configure-use-pkg-config-for-PCRE-detection.patch
index 6c0286457c..50775be533 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0001-configure-use-pkg-config-for-PCRE-detection.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0001-configure-use-pkg-config-for-PCRE-detection.patch
@@ -1,44 +1,43 @@
-From d2cedfa3394365689a3f7c8cfe8e0dd56b29bed9 Mon Sep 17 00:00:00 2001
+From ba9015386cbc044e111d7c266f13e2be045e4bf1 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Tue, 17 Jun 2014 09:10:57 +0200
Subject: [PATCH] configure: use pkg-config for PCRE detection
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
- configure.in | 27 +++++----------------------
- 1 file changed, 5 insertions(+), 22 deletions(-)
+ configure.in | 26 +++++---------------------
+ 1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a/configure.in b/configure.in
-index 9feaceb..dc6ea15 100644
+index 38c1d0a..c799aec 100644
--- a/configure.in
+++ b/configure.in
-@@ -215,28 +215,11 @@ fi
- AC_ARG_WITH(pcre,
- APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
+@@ -221,27 +221,11 @@ else if which $with_pcre 2>/dev/null; then :; else
+ fi
+ fi
--AC_PATH_PROG(PCRE_CONFIG, pcre-config, false)
--if test -d "$with_pcre" && test -x "$with_pcre/bin/pcre-config"; then
-- PCRE_CONFIG=$with_pcre/bin/pcre-config
--elif test -x "$with_pcre"; then
-- PCRE_CONFIG=$with_pcre
--fi
+-AC_CHECK_TARGET_TOOLS(PCRE_CONFIG, [pcre2-config pcre-config],
+- [`which $with_pcre 2>/dev/null`], $with_pcre)
-
--if test "$PCRE_CONFIG" != "false"; then
+-if test "x$PCRE_CONFIG" != "x"; then
- if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else
-- AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG])
+- AC_MSG_ERROR([Did not find working script at $PCRE_CONFIG])
- fi
- case `$PCRE_CONFIG --version` in
+- [1[0-9].*])
+- AC_DEFINE(HAVE_PCRE2, 1, [Detected PCRE2])
+- ;;
- [[1-5].*])
- AC_MSG_ERROR([Need at least pcre version 6.0])
- ;;
- esac
- AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
- APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
-- APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`])
+- APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs8 2>/dev/null || $PCRE_CONFIG --libs`])
-else
-- AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/])
+- AC_MSG_ERROR([pcre(2)-config for libpcre not found. PCRE is required and available from http://pcre.org/])
-fi
+PKG_CHECK_MODULES([PCRE], [libpcre], [
+ AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
@@ -49,5 +48,5 @@ index 9feaceb..dc6ea15 100644
AC_MSG_NOTICE([])
--
-2.7.4
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch b/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch
index 85fe6ae4bd..bbe8b325b5 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch
@@ -1,8 +1,8 @@
-From 7df207ad4d0dcda2ad36e5642296e0dec7e13647 Mon Sep 17 00:00:00 2001
+From 5074ab3425e5f1e01fd9cfa2d9b7300ea1b3f38f Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Tue, 17 Jul 2012 11:27:39 +0100
-Subject: [PATCH] apache2: bump up the core size limit if CoreDumpDirectory
- is configured
+Subject: [PATCH] apache2: bump up the core size limit if CoreDumpDirectory is
+ configured
Bump up the core size limit if CoreDumpDirectory is
configured.
@@ -11,16 +11,15 @@ Upstream-Status: Pending
Note: upstreaming was discussed but there are competing desires;
there are portability oddities here too.
-
---
server/core.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/server/core.c b/server/core.c
-index eacb54f..7aa841f 100644
+index 090e397..3020090 100644
--- a/server/core.c
+++ b/server/core.c
-@@ -4965,6 +4965,25 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
+@@ -5107,6 +5107,25 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
}
apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
apr_pool_cleanup_null);
@@ -47,5 +46,5 @@ index eacb54f..7aa841f 100644
}
--
-2.7.4
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch b/meta-webserver/recipes-httpd/apache2/apache2/0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch
index 081a02baa3..adb728ba31 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch
@@ -1,8 +1,8 @@
-From ddd560024a6d526187fd126f306b59533ca3f7e2 Mon Sep 17 00:00:00 2001
+From 9c03ed909b8da0e1a288f53fda535a3f15bcf791 Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Tue, 17 Jul 2012 11:27:39 +0100
-Subject: [PATCH] apache2: do not export apr/apr-util symbols when using
- shared libapr
+Subject: [PATCH] apache2: do not export apr/apr-util symbols when using shared
+ libapr
There is no need to "suck in" the apr/apr-util symbols when using
a shared libapr{,util}, it just bloats the symbol table; so don't.
@@ -10,13 +10,12 @@ a shared libapr{,util}, it just bloats the symbol table; so don't.
Upstream-Status: Pending
Note: EXPORT_DIRS change is conditional on using shared apr
-
---
server/Makefile.in | 3 ---
1 file changed, 3 deletions(-)
diff --git a/server/Makefile.in b/server/Makefile.in
-index 1fa3344..f635d76 100644
+index 8111877..8c0c396 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -60,9 +60,6 @@ export_files:
@@ -30,5 +29,5 @@ index 1fa3344..f635d76 100644
exports.c: export_files
--
-2.7.4
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch b/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch
index 78a04d9af4..3b080f54f6 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0004-apache2-log-the-SELinux-context-at-startup.patch
@@ -1,4 +1,4 @@
-From dfa834ebd449df299f54e98f0fb3a7bb4008fb03 Mon Sep 17 00:00:00 2001
+From e47cc405eadcbe37a579c375e824e20a5c53bfad Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Tue, 17 Jul 2012 11:27:39 +0100
Subject: [PATCH] Log the SELinux context at startup.
@@ -15,10 +15,10 @@ Note: unlikely to be any interest in this upstream
2 files changed, 31 insertions(+)
diff --git a/configure.in b/configure.in
-index dc6ea15..caa6f54 100644
+index ea6cec3..92b74b7 100644
--- a/configure.in
+++ b/configure.in
-@@ -466,6 +466,11 @@ getloadavg
+@@ -491,6 +491,11 @@ getloadavg
dnl confirm that a void pointer is large enough to store a long integer
APACHE_CHECK_VOID_PTR_LEN
@@ -31,10 +31,10 @@ index dc6ea15..caa6f54 100644
[AC_TRY_RUN(#define _GNU_SOURCE
#include <unistd.h>
diff --git a/server/core.c b/server/core.c
-index 7aa841f..79f34db 100644
+index 4da7209..d3ca25b 100644
--- a/server/core.c
+++ b/server/core.c
-@@ -59,6 +59,10 @@
+@@ -65,6 +65,10 @@
#include <unistd.h>
#endif
@@ -44,8 +44,8 @@ index 7aa841f..79f34db 100644
+
/* LimitRequestBody handling */
#define AP_LIMIT_REQ_BODY_UNSET ((apr_off_t) -1)
- #define AP_DEFAULT_LIMIT_REQ_BODY ((apr_off_t) 0)
-@@ -4984,6 +4988,28 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
+ #define AP_DEFAULT_LIMIT_REQ_BODY ((apr_off_t) 1<<30) /* 1GB */
+@@ -5126,6 +5130,28 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
}
#endif
@@ -74,6 +74,3 @@ index 7aa841f..79f34db 100644
return OK;
}
---
-2.7.4
-
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0005-replace-lynx-to-curl-in-apachectl-script.patch b/meta-webserver/recipes-httpd/apache2/apache2/0005-replace-lynx-to-curl-in-apachectl-script.patch
index 47320a9ee5..7b4a1b932b 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0005-replace-lynx-to-curl-in-apachectl-script.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0005-replace-lynx-to-curl-in-apachectl-script.patch
@@ -1,4 +1,4 @@
-From 7db1b650bb4b01a5194a34cd7573f915656a595b Mon Sep 17 00:00:00 2001
+From e59aab44a28c654e518080693d573ca472ca5a08 Mon Sep 17 00:00:00 2001
From: Yulong Pei <Yulong.pei@windriver.com>
Date: Thu, 1 Sep 2011 01:03:14 +0800
Subject: [PATCH] replace lynx to curl in apachectl script
@@ -48,5 +48,5 @@ index 3281c2e..6ab4ba5 100644
*)
$HTTPD "$@"
--
-2.7.4
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0006-apache2-fix-the-race-issue-of-parallel-installation.patch b/meta-webserver/recipes-httpd/apache2/apache2/0006-apache2-fix-the-race-issue-of-parallel-installation.patch
index 227d04064b..dbaf01d2c5 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0006-apache2-fix-the-race-issue-of-parallel-installation.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0006-apache2-fix-the-race-issue-of-parallel-installation.patch
@@ -1,4 +1,4 @@
-From 4f4d7d6b88b6e440263ebeb22dfb40c52bb30fd8 Mon Sep 17 00:00:00 2001
+From fb09f1fe4525058b16b3d4edb2e3ae693154026e Mon Sep 17 00:00:00 2001
From: Zhenhua Luo <zhenhua.luo@freescale.com>
Date: Fri, 25 Jan 2013 18:10:50 +0800
Subject: [PATCH] apache2: fix the race issue of parallel installation
@@ -31,5 +31,5 @@ index e2d5bb6..dde5ae0 100755
pathcomp="$pathcomp/"
done
--
-2.7.4
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0007-apache2-allow-to-disable-selinux-support.patch b/meta-webserver/recipes-httpd/apache2/apache2/0007-apache2-allow-to-disable-selinux-support.patch
index fed6b5010b..3ff6894409 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0007-apache2-allow-to-disable-selinux-support.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0007-apache2-allow-to-disable-selinux-support.patch
@@ -1,4 +1,4 @@
-From 964ef2c1af74984602f46e7db938d3b95b148385 Mon Sep 17 00:00:00 2001
+From 0686564f64130f230870db8b4846973e3edbd646 Mon Sep 17 00:00:00 2001
From: Wenzong Fan <wenzong.fan@windriver.com>
Date: Mon, 1 Dec 2014 02:08:27 -0500
Subject: [PATCH] apache2: allow to disable selinux support
@@ -11,10 +11,10 @@ Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/configure.in b/configure.in
-index caa6f54..eab2090 100644
+index 76811e7..4df3ff3 100644
--- a/configure.in
+++ b/configure.in
-@@ -466,10 +466,16 @@ getloadavg
+@@ -491,10 +491,16 @@ getloadavg
dnl confirm that a void pointer is large enough to store a long integer
APACHE_CHECK_VOID_PTR_LEN
@@ -36,5 +36,5 @@ index caa6f54..eab2090 100644
AC_CACHE_CHECK([for gettid()], ac_cv_gettid,
[AC_TRY_RUN(#define _GNU_SOURCE
--
-2.7.4
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch b/meta-webserver/recipes-httpd/apache2/apache2/0008-Fix-perl-install-directory-to-usr-bin.patch
index 61669e3641..dc5b5c88f2 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0008-Fix-perl-install-directory-to-usr-bin.patch
@@ -1,4 +1,4 @@
-From 5412077c398dec74321388fe6e593a44c4c80de6 Mon Sep 17 00:00:00 2001
+From 443d15b91d4e4979d92405610303797663f31102 Mon Sep 17 00:00:00 2001
From: echo <fei.geng@windriver.com>
Date: Tue, 28 Apr 2009 03:11:06 +0000
Subject: [PATCH] Fix perl install directory to /usr/bin
@@ -11,16 +11,15 @@ error:
bad interpreter: No such file or directory
Signed-off-by: Changqing Li <changqing.li@windriver.com>
-
---
configure.in | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/configure.in b/configure.in
-index d828512..be7bd25 100644
+index 4df3ff3..4eeb609 100644
--- a/configure.in
+++ b/configure.in
-@@ -855,10 +855,7 @@ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf",
+@@ -903,10 +903,7 @@ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf",
AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types",
[Location of the MIME types config file, relative to the Apache root directory])
@@ -32,3 +31,6 @@ index d828512..be7bd25 100644
AC_SUBST(perlbin)
dnl If we are running on BSD/OS, we need to use the BSD .include syntax.
+--
+2.25.1
+
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch b/meta-webserver/recipes-httpd/apache2/apache2/0009-support-apxs.in-force-destdir-to-be-empty-string.patch
index bdedd146c2..d1f9bb0f43 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0001-support-apxs.in-force-destdir-to-be-empty-string.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0009-support-apxs.in-force-destdir-to-be-empty-string.patch
@@ -1,10 +1,10 @@
-From 705c0a7e9d9c1e64ee09fc0b54f6b5a4e27de1ca Mon Sep 17 00:00:00 2001
+From 43a4ad04e0d8771267a73f98b5918bcd10b167ec Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <trevor.gamblin@windriver.com>
Date: Fri, 17 Apr 2020 06:31:35 -0700
Subject: [PATCH] support/apxs.in: force destdir to be empty string
-If destdir is assigned to anything other than the empty string, the
-search path for apache2 config files is appended to itself, and
+If destdir is assigned to anything other than the empty string, the
+search path for apache2 config files is appended to itself, and
related packages like apache-websocket will be unable to locate them:
| cannot open
@@ -24,7 +24,7 @@ Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/support/apxs.in b/support/apxs.in
-index 65e1288527..9d96e33728 100644
+index b2705fa..781f2ab 100644
--- a/support/apxs.in
+++ b/support/apxs.in
@@ -28,10 +28,12 @@ package apxs;
@@ -45,5 +45,5 @@ index 65e1288527..9d96e33728 100644
my %config_vars = ();
--
-2.17.1
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/0008-apache2-do-not-use-relative-path-for-gen_test_char.patch b/meta-webserver/recipes-httpd/apache2/apache2/0010-apache2-do-not-use-relative-path-for-gen_test_char.patch
index 82e9e8c35f..ced8469f3a 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2/0008-apache2-do-not-use-relative-path-for-gen_test_char.patch
+++ b/meta-webserver/recipes-httpd/apache2/apache2/0010-apache2-do-not-use-relative-path-for-gen_test_char.patch
@@ -1,16 +1,15 @@
-From b62c4cd2295c98b2ebe12641e5f01590bd96ae94 Mon Sep 17 00:00:00 2001
+From d9993cbc33565c0acd29b0127d651dafa2a16975 Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Tue, 17 Jul 2012 11:27:39 +0100
Subject: [PATCH] apache2: do not use relative path for gen_test_char
Upstream-Status: Inappropriate [embedded specific]
-
---
server/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/Makefile.in b/server/Makefile.in
-index f635d76..0d48924 100644
+index 8c0c396..3544f55 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -29,7 +29,7 @@ gen_test_char: $(gen_test_char_OBJECTS)
@@ -23,5 +22,5 @@ index f635d76..0d48924 100644
util.lo: test_char.h
--
-2.7.4
+2.25.1
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.48.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.58.bb
index 7af824dd16..746db4ac0a 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.48.bb
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.58.bb
@@ -13,12 +13,12 @@ SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
file://0005-replace-lynx-to-curl-in-apachectl-script.patch \
file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \
file://0007-apache2-allow-to-disable-selinux-support.patch \
- file://apache-configure_perlbin.patch \
- file://0001-support-apxs.in-force-destdir-to-be-empty-string.patch \
+ file://0008-Fix-perl-install-directory-to-usr-bin.patch \
+ file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
"
-SRC_URI_append_class-target = " \
- file://0008-apache2-do-not-use-relative-path-for-gen_test_char.patch \
+SRC_URI:append:class-target = " \
+ file://0010-apache2-do-not-use-relative-path-for-gen_test_char.patch \
file://init \
file://apache2-volatile.conf \
file://apache2.service \
@@ -26,8 +26,7 @@ SRC_URI_append_class-target = " \
"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
-SRC_URI[md5sum] = "a7088cec171b0d00bf43394ce64d3909"
-SRC_URI[sha256sum] = "1bc826e7b2e88108c7e4bf43c026636f77a41d849cfb667aa7b5c0b86dbf966c"
+SRC_URI[sha256sum] = "fa16d72a078210a54c47dd5bef2f8b9b8a01d94909a51453956b3ec6442ea4c5"
S = "${WORKDIR}/httpd-${PV}"
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb b/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
index 7424467946..864e3ac7b1 100644
--- a/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
@@ -9,7 +9,7 @@ DEPENDS = "unzip-native libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEAT
SRCREV = "9a75e65b876bcc376cb6b379dca1f7ce4a055c59"
PV = "1.2.104+git${SRCPV}"
-SRC_URI = "git://github.com/cherokee/webserver \
+SRC_URI = "git://github.com/cherokee/webserver;branch=master;protocol=https \
file://cherokee.init \
file://cherokee.service \
file://cherokee-install-configured.py-once.patch \
diff --git a/meta-webserver/recipes-httpd/nginx/files/0001-HTTP-2-per-iteration-stream-handling-limit.patch b/meta-webserver/recipes-httpd/nginx/files/0001-HTTP-2-per-iteration-stream-handling-limit.patch
new file mode 100644
index 0000000000..7dd1e721c0
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/0001-HTTP-2-per-iteration-stream-handling-limit.patch
@@ -0,0 +1,92 @@
+From 2b9667f36551406169e3e2a6a774466ac70a83c0 Mon Sep 17 00:00:00 2001
+From: Maxim Dounin <mdounin@mdounin.ru>
+Date: Tue, 10 Oct 2023 15:13:39 +0300
+Subject: [PATCH] HTTP/2: per-iteration stream handling limit.
+
+To ensure that attempts to flood servers with many streams are detected
+early, a limit of no more than 2 * max_concurrent_streams new streams per one
+event loop iteration was introduced. This limit is applied even if
+max_concurrent_streams is not yet reached - for example, if corresponding
+streams are handled synchronously or reset.
+
+Further, refused streams are now limited to maximum of max_concurrent_streams
+and 100, similarly to priority_limit initial value, providing some tolerance
+to clients trying to open several streams at the connection start, yet
+low tolerance to flooding attempts.
+
+Upstream-Status: Backport
+[https://github.com/nginx/nginx/commit/6ceef192e7af1c507826ac38a2d43f08bf265fb9]
+
+Reduces the impact of HTTP/2 Stream Reset flooding in the nginx product
+(CVE-2023-44487).
+
+See: https://www.nginx.com/blog/http-2-rapid-reset-attack-impacting-f5-nginx-products/
+
+This patch only reduces the impact and does not completely mitigate the CVE
+in question, the latter being due to a design flaw in the HTTP/2 protocol
+itself. For transparancy reasons I therefore opted to not mark the
+CVE as resolved, so that integrators can decide for themselves, wheither to
+enable HTTP/2 support or allow HTTP/1.1 connections only.
+
+Signed-off-by: Jasper Orschulko <jasper@fancydomain.eu>
+---
+ src/http/v2/ngx_http_v2.c | 15 +++++++++++++++
+ src/http/v2/ngx_http_v2.h | 2 ++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
+index 3611a2e50..291677aca 100644
+--- a/src/http/v2/ngx_http_v2.c
++++ b/src/http/v2/ngx_http_v2.c
+@@ -361,6 +361,7 @@ ngx_http_v2_read_handler(ngx_event_t *rev)
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http2 read handler");
+
+ h2c->blocked = 1;
++ h2c->new_streams = 0;
+
+ if (c->close) {
+ c->close = 0;
+@@ -1320,6 +1321,14 @@ ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos,
+ goto rst_stream;
+ }
+
++ if (h2c->new_streams++ >= 2 * h2scf->concurrent_streams) {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "client sent too many streams at once");
++
++ status = NGX_HTTP_V2_REFUSED_STREAM;
++ goto rst_stream;
++ }
++
+ if (!h2c->settings_ack
+ && !(h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG)
+ && h2scf->preread_size < NGX_HTTP_V2_DEFAULT_WINDOW)
+@@ -1385,6 +1394,12 @@ ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos,
+
+ rst_stream:
+
++ if (h2c->refused_streams++ > ngx_max(h2scf->concurrent_streams, 100)) {
++ ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,
++ "client sent too many refused streams");
++ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_NO_ERROR);
++ }
++
+ if (ngx_http_v2_send_rst_stream(h2c, h2c->state.sid, status) != NGX_OK) {
+ return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
+ }
+diff --git a/src/http/v2/ngx_http_v2.h b/src/http/v2/ngx_http_v2.h
+index 349229711..6a7aaa62c 100644
+--- a/src/http/v2/ngx_http_v2.h
++++ b/src/http/v2/ngx_http_v2.h
+@@ -125,6 +125,8 @@ struct ngx_http_v2_connection_s {
+ ngx_uint_t processing;
+ ngx_uint_t frames;
+ ngx_uint_t idle;
++ ngx_uint_t new_streams;
++ ngx_uint_t refused_streams;
+ ngx_uint_t priority_limit;
+
+ ngx_uint_t pushing;
+--
+2.42.1
+
diff --git a/meta-webserver/recipes-httpd/nginx/files/CVE-2019-20372.patch b/meta-webserver/recipes-httpd/nginx/files/CVE-2019-20372.patch
new file mode 100644
index 0000000000..45653e422e
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/CVE-2019-20372.patch
@@ -0,0 +1,39 @@
+From 6511195c023bf03e0fb19a36f41f42f4edde6e88 Mon Sep 17 00:00:00 2001
+From: Ruslan Ermilov <ru@nginx.com>
+Date: Mon, 23 Dec 2019 15:45:46 +0300
+Subject: [PATCH] Discard request body when redirecting to a URL via
+ error_page.
+
+Reported by Bert JW Regeer and Francisco Oca Gonzalez.
+
+Upstream-Status: Backport
+CVE: CVE-2019-20372
+
+Reference to upstream patch:
+https://github.com/nginx/nginx/commit/c1be55f97211d38b69ac0c2027e6812ab8b1b94e
+
+Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
+---
+ src/http/ngx_http_special_response.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
+index 4ffb2cc8..76e67058 100644
+--- a/src/http/ngx_http_special_response.c
++++ b/src/http/ngx_http_special_response.c
+@@ -623,6 +623,12 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
+ return ngx_http_named_location(r, &uri);
+ }
+
++ r->expect_tested = 1;
++
++ if (ngx_http_discard_request_body(r) != NGX_OK) {
++ r->keepalive = 0;
++ }
++
+ location = ngx_list_push(&r->headers_out.headers);
+
+ if (location == NULL) {
+--
+2.17.1
+
diff --git a/meta-webserver/recipes-httpd/nginx/files/CVE-2022-41741-CVE-2022-41742.patch b/meta-webserver/recipes-httpd/nginx/files/CVE-2022-41741-CVE-2022-41742.patch
new file mode 100644
index 0000000000..8a8a35b2dd
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/CVE-2022-41741-CVE-2022-41742.patch
@@ -0,0 +1,319 @@
+From 9563a2a08c007d78a6796b0232201bf7dc4a8103 Mon Sep 17 00:00:00 2001
+From: Hitendra Prajapati <hprajapati@mvista.com>
+Date: Wed, 16 Nov 2022 10:28:24 +0530
+Subject: [PATCH] CVE-2022-41741, CVE-2022-41742
+
+Upstream-Status: Backport [https://github.com/nginx/nginx/commit/6b022a5556af22b6e18532e547a6ae46b0d8c6ea]
+CVE: CVE-2022-41741, CVE-2022-41742
+Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
+
+Mp4: disabled duplicate atoms.
+
+Most atoms should not appear more than once in a container. Previously,
+this was not enforced by the module, which could result in worker process
+crash, memory corruption and disclosure.
+---
+ src/http/modules/ngx_http_mp4_module.c | 147 +++++++++++++++++++++++++
+ 1 file changed, 147 insertions(+)
+
+diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c
+index 618bf78..7b7184d 100644
+--- a/src/http/modules/ngx_http_mp4_module.c
++++ b/src/http/modules/ngx_http_mp4_module.c
+@@ -1076,6 +1076,12 @@ ngx_http_mp4_read_ftyp_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ return NGX_ERROR;
+ }
+
++ if (mp4->ftyp_atom.buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 ftyp atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom_size = sizeof(ngx_mp4_atom_header_t) + (size_t) atom_data_size;
+
+ ftyp_atom = ngx_palloc(mp4->request->pool, atom_size);
+@@ -1134,6 +1140,12 @@ ngx_http_mp4_read_moov_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ return NGX_DECLINED;
+ }
+
++ if (mp4->moov_atom.buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 moov atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ conf = ngx_http_get_module_loc_conf(mp4->request, ngx_http_mp4_module);
+
+ if (atom_data_size > mp4->buffer_size) {
+@@ -1201,6 +1213,12 @@ ngx_http_mp4_read_mdat_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "mp4 mdat atom");
+
++ if (mp4->mdat_atom.buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 mdat atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ data = &mp4->mdat_data_buf;
+ data->file = &mp4->file;
+ data->in_file = 1;
+@@ -1327,6 +1345,12 @@ ngx_http_mp4_read_mvhd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "mp4 mvhd atom");
+
++ if (mp4->mvhd_atom.buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 mvhd atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom_header = ngx_mp4_atom_header(mp4);
+ mvhd_atom = (ngx_mp4_mvhd_atom_t *) atom_header;
+ mvhd64_atom = (ngx_mp4_mvhd64_atom_t *) atom_header;
+@@ -1592,6 +1616,13 @@ ngx_http_mp4_read_tkhd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ atom_size = sizeof(ngx_mp4_atom_header_t) + (size_t) atom_data_size;
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_TKHD_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 tkhd atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->tkhd_size = atom_size;
+
+ ngx_mp4_set_32value(tkhd_atom->size, atom_size);
+@@ -1630,6 +1661,12 @@ ngx_http_mp4_read_mdia_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_MDIA_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 mdia atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->mdia_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -1753,6 +1790,13 @@ ngx_http_mp4_read_mdhd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ atom_size = sizeof(ngx_mp4_atom_header_t) + (size_t) atom_data_size;
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_MDHD_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 mdhd atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->mdhd_size = atom_size;
+ trak->timescale = timescale;
+
+@@ -1795,6 +1839,12 @@ ngx_http_mp4_read_hdlr_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_HDLR_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 hdlr atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->hdlr_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -1823,6 +1873,12 @@ ngx_http_mp4_read_minf_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_MINF_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 minf atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->minf_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -1866,6 +1922,15 @@ ngx_http_mp4_read_vmhd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_VMHD_ATOM].buf
++ || trak->out[NGX_HTTP_MP4_SMHD_ATOM].buf)
++ {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 vmhd/smhd atom in \"%s\"",
++ mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->vmhd_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -1897,6 +1962,15 @@ ngx_http_mp4_read_smhd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_VMHD_ATOM].buf
++ || trak->out[NGX_HTTP_MP4_SMHD_ATOM].buf)
++ {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 vmhd/smhd atom in \"%s\"",
++ mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->smhd_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -1928,6 +2002,12 @@ ngx_http_mp4_read_dinf_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_DINF_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 dinf atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->dinf_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -1956,6 +2036,12 @@ ngx_http_mp4_read_stbl_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_STBL_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stbl atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->stbl_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -2024,6 +2110,12 @@ ngx_http_mp4_read_stsd_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+
+ trak = ngx_mp4_last_trak(mp4);
+
++ if (trak->out[NGX_HTTP_MP4_STSD_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stsd atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ atom = &trak->stsd_atom_buf;
+ atom->temporary = 1;
+ atom->pos = atom_header;
+@@ -2092,6 +2184,13 @@ ngx_http_mp4_read_stts_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ atom_end = atom_table + entries * sizeof(ngx_mp4_stts_entry_t);
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_STTS_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stts atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->time_to_sample_entries = entries;
+
+ atom = &trak->stts_atom_buf;
+@@ -2297,6 +2396,13 @@ ngx_http_mp4_read_stss_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ "sync sample entries:%uD", entries);
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_STSS_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stss atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->sync_samples_entries = entries;
+
+ atom_table = atom_header + sizeof(ngx_http_mp4_stss_atom_t);
+@@ -2495,6 +2601,13 @@ ngx_http_mp4_read_ctts_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ "composition offset entries:%uD", entries);
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_CTTS_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 ctts atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->composition_offset_entries = entries;
+
+ atom_table = atom_header + sizeof(ngx_mp4_ctts_atom_t);
+@@ -2698,6 +2811,13 @@ ngx_http_mp4_read_stsc_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ atom_end = atom_table + entries * sizeof(ngx_mp4_stsc_entry_t);
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_STSC_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stsc atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->sample_to_chunk_entries = entries;
+
+ atom = &trak->stsc_atom_buf;
+@@ -3030,6 +3150,13 @@ ngx_http_mp4_read_stsz_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ "sample uniform size:%uD, entries:%uD", size, entries);
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_STSZ_ATOM].buf) {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stsz atom in \"%s\"", mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->sample_sizes_entries = entries;
+
+ atom_table = atom_header + sizeof(ngx_mp4_stsz_atom_t);
+@@ -3199,6 +3326,16 @@ ngx_http_mp4_read_stco_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ atom_end = atom_table + entries * sizeof(uint32_t);
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_STCO_ATOM].buf
++ || trak->out[NGX_HTTP_MP4_CO64_ATOM].buf)
++ {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stco/co64 atom in \"%s\"",
++ mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->chunks = entries;
+
+ atom = &trak->stco_atom_buf;
+@@ -3383,6 +3520,16 @@ ngx_http_mp4_read_co64_atom(ngx_http_mp4_file_t *mp4, uint64_t atom_data_size)
+ atom_end = atom_table + entries * sizeof(uint64_t);
+
+ trak = ngx_mp4_last_trak(mp4);
++
++ if (trak->out[NGX_HTTP_MP4_STCO_ATOM].buf
++ || trak->out[NGX_HTTP_MP4_CO64_ATOM].buf)
++ {
++ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
++ "duplicate mp4 stco/co64 atom in \"%s\"",
++ mp4->file.name.data);
++ return NGX_ERROR;
++ }
++
+ trak->chunks = entries;
+
+ atom = &trak->co64_atom_buf;
+--
+2.25.1
+
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb
index 207642575b..39cfd3a67b 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.16.1.bb
@@ -4,3 +4,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=52e384aaac868b755b93ad5535e2d075"
SRC_URI[md5sum] = "45a80f75336c980d240987badc3dcf60"
SRC_URI[sha256sum] = "f11c2a6dd1d3515736f0324857957db2de98be862461b5a542a3ac6188dbe32b"
+
+SRC_URI += "file://CVE-2019-20372.patch \
+ file://CVE-2022-41741-CVE-2022-41742.patch \
+ file://0001-HTTP-2-per-iteration-stream-handling-limit.patch \
+ "
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb
index 3d2a5edd26..9fd6d73428 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.17.8.bb
@@ -8,3 +8,5 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=52e384aaac868b755b93ad5535e2d075"
SRC_URI[md5sum] = "29cd861a13aae69a058cbabaae86177b"
SRC_URI[sha256sum] = "97d23ecf6d5150b30e284b40e8a6f7e3bb5be6b601e373a4d013768d5a25965b"
+
+SRC_URI += "file://0001-HTTP-2-per-iteration-stream-handling-limit.patch"
diff --git a/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb b/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb
index 560dd9b6e4..ab479d9ce5 100644
--- a/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb
+++ b/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.27.1.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://src/thttpd.c;beginline=1;endline=26;md5=0c5762c2c34dc
DEPENDS += "base-passwd virtual/crypt"
SRCREV = "2845bf5bff2b820d2336c8c8061cbfc5f271e720"
-SRC_URI = "git://github.com/blueness/${BPN} \
+SRC_URI = "git://github.com/blueness/${BPN};branch=master;protocol=https \
file://thttpd.service \
file://thttpd.conf \
file://init"
diff --git a/meta-webserver/recipes-support/fcgi/fcgi_git.bb b/meta-webserver/recipes-support/fcgi/fcgi_git.bb
index 6df58ad3c4..61ef6073e0 100644
--- a/meta-webserver/recipes-support/fcgi/fcgi_git.bb
+++ b/meta-webserver/recipes-support/fcgi/fcgi_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TERMS;md5=e3aacac3a647af6e7e31f181cda0a06a"
SRCREV = "382aa2b0d53a87c27f2f647dfaf670375ba0b85f"
PV = "2.4.2"
-SRC_URI = "git://github.com/FastCGI-Archives/fcgi2.git;protocol=https \
+SRC_URI = "git://github.com/FastCGI-Archives/fcgi2.git;protocol=https;branch=master \
"
S = "${WORKDIR}/git"
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_git.bb b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
index d6a5ce0662..ab9de70b3b 100644
--- a/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
+++ b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
@@ -3,7 +3,7 @@ SUMMARY = "Real-time performance monitoring"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24"
-SRC_URI = "git://github.com/firehol/netdata.git;protocol=https \
+SRC_URI = "git://github.com/firehol/netdata.git;protocol=https;branch=master \
file://0002-Makefiles-does-not-build-contrib-dir.patch \
"
SRCREV = "588ce5a7b18999dfa66698cd3a2f005f7a3c31cf"
diff --git a/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb b/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb
index 64582f28f2..d76b0835fb 100644
--- a/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb
+++ b/meta-xfce/recipes-apps/xarchiver/xarchiver_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "gtk+3 glib-2.0 xfce4-dev-tools-native intltool-native"
-SRC_URI = "git://github.com/ib/xarchiver.git"
+SRC_URI = "git://github.com/ib/xarchiver.git;branch=master;protocol=https"
SRCREV = "9ab958a4023b62b43972c55a3143ff0722bd88a6"
PV = "0.5.4.14"
S = "${WORKDIR}/git"
diff --git a/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.3.bb b/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.3.bb
index 2ef81f286d..58e628deca 100644
--- a/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.3.bb
+++ b/meta-xfce/recipes-apps/xfce-polkit/xfce-polkit_0.3.bb
@@ -8,7 +8,7 @@ inherit xfce-app features_check
REQUIRED_DISTRO_FEATURES = "polkit"
SRC_URI = " \
- git://github.com/ncopa/${BPN}.git \
+ git://github.com/ncopa/${BPN}.git;branch=master;protocol=https \
"
SRCREV = "6d3282cc1734c305850d48f5bf4b4d94e88885e9"
S = "${WORKDIR}/git"
diff --git a/meta-xfce/recipes-apps/xfce4-datetime-setter/xfce4-datetime-setter_3.32.2.bb b/meta-xfce/recipes-apps/xfce4-datetime-setter/xfce4-datetime-setter_3.32.2.bb
index 2dd3f01d8c..145a9cc400 100644
--- a/meta-xfce/recipes-apps/xfce4-datetime-setter/xfce4-datetime-setter_3.32.2.bb
+++ b/meta-xfce/recipes-apps/xfce4-datetime-setter/xfce4-datetime-setter_3.32.2.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e"
DEPENDS = "glib-2.0-native libxfce4ui"
-SRC_URI = "git://github.com/schnitzeltony/xfce4-datetime-setter.git;protocol=https \
+SRC_URI = "git://github.com/schnitzeltony/xfce4-datetime-setter.git;protocol=https;branch=master \
file://fix-inner-dependency.patch \
"
SRCREV = "5c7a73a3824b03b91719e05e2604b97c7a72d50f"
diff --git a/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb b/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb
index 8dfb2e626d..531f3d5cd0 100644
--- a/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb
+++ b/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb
@@ -9,7 +9,7 @@ DEPENDS += "exo-native libwnck3 xfconf"
PV = "0.1.0+gitr${SRCPV}"
-SRC_URI = "git://github.com/schnitzeltony/xfce4-closebutton-plugin.git;branch=master"
+SRC_URI = "git://github.com/schnitzeltony/xfce4-closebutton-plugin.git;branch=master;protocol=https"
SRCREV = "6ed5c3ee1ba7103ca854c5e81fb2c1220b913a40"
S = "${WORKDIR}/git"