mirror of
https://git.yoctoproject.org/poky
synced 2026-03-27 16:02:21 +01:00
Compare commits
49 Commits
yocto-4.0.
...
yocto-4.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8334e82e1d | ||
|
|
3f5e203cbf | ||
|
|
974e67818b | ||
|
|
79851c1eb5 | ||
|
|
5479a272a7 | ||
|
|
3588c550b1 | ||
|
|
3255405278 | ||
|
|
fd88d8cc35 | ||
|
|
caac6c06bb | ||
|
|
822c6db93e | ||
|
|
b5f43fb19e | ||
|
|
56e5f34c39 | ||
|
|
c129bb9b7e | ||
|
|
b600216fd2 | ||
|
|
e7763a1e0a | ||
|
|
8b83d6e2f9 | ||
|
|
c63dd35b57 | ||
|
|
e19fc15027 | ||
|
|
f61eb0f68d | ||
|
|
2c14074be7 | ||
|
|
ad4c2759f0 | ||
|
|
69d100e7f0 | ||
|
|
3825d4306a | ||
|
|
b249264a0c | ||
|
|
f210d0fc05 | ||
|
|
67e8e2cc2f | ||
|
|
4597dd50ee | ||
|
|
a3d6476e85 | ||
|
|
82329c1ced | ||
|
|
b232dd23d6 | ||
|
|
bcf7200a12 | ||
|
|
ff90622dfc | ||
|
|
f1a1393dd0 | ||
|
|
1d5c8af9c4 | ||
|
|
9a24d18f40 | ||
|
|
7cdc92f5cb | ||
|
|
99c192aae2 | ||
|
|
3a7aa79ca2 | ||
|
|
a8c5e5e573 | ||
|
|
9998d74d24 | ||
|
|
bd6c85cfa6 | ||
|
|
e7b549ecaa | ||
|
|
4ad238e9c1 | ||
|
|
ad756dec39 | ||
|
|
58f9b898da | ||
|
|
e60019c6eb | ||
|
|
7794952de8 | ||
|
|
7bb35f44d9 | ||
|
|
c3b734f0a7 |
@@ -279,8 +279,23 @@ with a number. The number used depends on the state of the PR Service:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
hello-world-git_0.0+git0+b6558dd387-r0.0_armv7a-neon.ipk
|
||||
hello-world-git_0.0+git1+dd2f5c3565-r0.0_armv7a-neon.ipk
|
||||
hello-world-git_1.0+git0+b6558dd387-r0.0_armv7a-neon.ipk
|
||||
hello-world-git_1.0+git1+dd2f5c3565-r0.1_armv7a-neon.ipk
|
||||
|
||||
Two numbers got incremented here:
|
||||
|
||||
- ``gitX`` changed from ``git0`` to ``git1``. This is because there was a
|
||||
change in the source code (``SRCREV``).
|
||||
|
||||
- ``r0.X`` changed from ``r0.0`` to ``r0.1``. This is because the hash of
|
||||
the :ref:`ref-tasks-package` task changed.
|
||||
|
||||
The reason for this change can be many. To understand why the hash of the
|
||||
:ref:`ref-tasks-package` task changed, you can run the following command:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ bitbake-diffsigs -t hello-world package
|
||||
|
||||
- If PR Service is not enabled, the build system replaces the
|
||||
``AUTOINC`` placeholder with zero (i.e. "0"). This results in
|
||||
@@ -290,8 +305,8 @@ with a number. The number used depends on the state of the PR Service:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
hello-world-git_0.0+git0+b6558dd387-r0.0_armv7a-neon.ipk
|
||||
hello-world-git_0.0+git0+dd2f5c3565-r0.0_armv7a-neon.ipk
|
||||
hello-world-git_1.0+git0+b6558dd387-r0_armv7a-neon.ipk
|
||||
hello-world-git_1.0+git0+dd2f5c3565-r0_armv7a-neon.ipk
|
||||
|
||||
In summary, the OpenEmbedded build system does not track the history of
|
||||
binary package versions for this purpose. ``AUTOINC``, in this case, is
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 214 KiB |
@@ -38,3 +38,4 @@ Release 4.0 (kirkstone)
|
||||
release-notes-4.0.29
|
||||
release-notes-4.0.30
|
||||
release-notes-4.0.31
|
||||
release-notes-4.0.32
|
||||
|
||||
194
documentation/migration-guides/release-notes-4.0.32.rst
Normal file
194
documentation/migration-guides/release-notes-4.0.32.rst
Normal file
@@ -0,0 +1,194 @@
|
||||
Release notes for Yocto-4.0.32 (Kirkstone)
|
||||
------------------------------------------
|
||||
|
||||
Security Fixes in Yocto-4.0.32
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- bind: Fix :cve_nist:`2025-8677`, :cve_nist:`2025-40778` and :cve_nist:`2025-40780`
|
||||
- binutils: Fix :cve_nist:`2025-11412` and :cve_nist:`2025-11413`
|
||||
- curl: Ignore :cve_nist:`2025-10966`
|
||||
- elfutils: Fix :cve_nist:`2025-1376` and :cve_nist:`2025-1377`
|
||||
- gnutls: Fix :cve_nist:`2025-9820`
|
||||
- go: Fix :cve_nist:`2024-24783`, :cve_nist:`2025-58187`, :cve_nist:`2025-58189`,
|
||||
:cve_nist:`2025-61723` and :cve_nist:`2025-61724`
|
||||
- libarchive: Fix :cve_nist:`2025-60753`
|
||||
- libarchive: Fix 2 security issue (https://github.com/libarchive/libarchive/pull/2753 and
|
||||
https://github.com/libarchive/libarchive/pull/2768)
|
||||
- libpng: Fix :cve_nist:`2025-64505`, :cve_nist:`2025-64506`, :cve_nist:`2025-64720`,
|
||||
:cve_nist:`2025-65018` and :cve_nist:`2025-66293`
|
||||
- libxml2: Fix :cve_nist:`2025-7425`
|
||||
- musl: Fix :cve_nist:`2025-26519`
|
||||
- openssh: Fix :cve_nist:`2025-61984` and :cve_nist:`2025-61985`
|
||||
- python3-idna: Fix :cve_nist:`2024-3651`
|
||||
- python3-urllib3: Fix :cve_nist:`2024-37891`
|
||||
- python3: fix :cve_nist:`2025-6075`
|
||||
- ruby: Fix :cve_nist:`2024-35176`, :cve_nist:`2024-39908` and :cve_nist:`2024-41123`
|
||||
- rust-cross-canadian: Ignore :cve_nist:`2024-43402`
|
||||
- u-boot: Fix :cve_nist:`2024-42040`
|
||||
- wpa-supplicant: Fix :cve_nist:`2025-24912`
|
||||
- xserver-xorg: Fix :cve_nist:`2025-62229`, :cve_nist:`2025-62230` and :cve_nist:`2025-62231`
|
||||
- xwayland: Fix :cve_nist:`2025-62229`, :cve_nist:`2025-62230` and :cve_nist:`2025-62231`
|
||||
|
||||
|
||||
Fixes in Yocto-4.0.32
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- babeltrace2: fetch with https protocol
|
||||
- bind: upgrade to 9.18.41
|
||||
- build-appliance-image: Update to kirkstone head revision
|
||||
- dev-manual/layers.rst: document "bitbake-layers show-machines"
|
||||
- dev-manual/new-recipe.rst: replace 'bitbake -e' with 'bitbake-getvar'
|
||||
- dev-manual/new-recipe.rst: typo, "whith" -> "which"
|
||||
- dev-manual/new-recipe.rst: update "recipetool -h" output
|
||||
- dev-manual: debugging: use bitbake-getvar in Viewing Variable Values section
|
||||
- documentation: link to the Releases page on yoctoproject.org instead of wiki
|
||||
- efibootmgr: update :term:`SRC_URI` branch
|
||||
- flac: patch seeking bug
|
||||
- goarch.bbclass: do not leak :term:`TUNE_FEATURES` into crosssdk task signatures
|
||||
- kernel-dev: add disable config example
|
||||
- kernel-dev: common: migrate bitbake -e to bitbake-getvar
|
||||
- libmicrohttpd: disable experimental code by default
|
||||
- migration-guides: add release notes for 4.0.31
|
||||
- oe-build-perf-report: relax metadata matching rules
|
||||
- overview-manual: migrate to SVG + fix typo
|
||||
- poky.conf: bump version for 4.0.32
|
||||
- python3-urllib3: upgrade to 1.26.20
|
||||
- recipes: Don't use ftp.gnome.org
|
||||
- ref-manual: variables: migrate the :term:`OVERRIDES` note to bitbake-getvar
|
||||
- systemd-bootchart: update :term:`SRC_URI` branch
|
||||
- xf86-video-intel: correct :term:`SRC_URI` as freedesktop anongit is down
|
||||
|
||||
|
||||
Known Issues in Yocto-4.0.32
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- N/A
|
||||
|
||||
|
||||
Contributors to Yocto-4.0.32
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Thanks to the following people who contributed to this release:
|
||||
|
||||
- Alexander Kanavin
|
||||
- Archana Polampalli
|
||||
- Divya Chellam
|
||||
- Gyorgy Sarvari
|
||||
- Hitendra Prajapati
|
||||
- Hongxu Jia
|
||||
- Jason Schonberg
|
||||
- Lee Chee Yang
|
||||
- Peter Marko
|
||||
- Praveen Kumar
|
||||
- Quentin Schulz
|
||||
- Richard Purdie
|
||||
- Robert P. J. Day
|
||||
- Ross Burton
|
||||
- Saquib Iltaf
|
||||
- Soumya Sambu
|
||||
- Steve Sakoman
|
||||
- Vijay Anusuri
|
||||
- Walter Werner SCHNEIDER
|
||||
|
||||
|
||||
Repositories / Downloads for Yocto-4.0.32
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
yocto-docs
|
||||
|
||||
- Repository Location: :yocto_git:`/yocto-docs`
|
||||
- Branch: :yocto_git:`kirkstone </yocto-docs/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.32 </yocto-docs/log/?h=yocto-4.0.32>`
|
||||
- Git Revision: :yocto_git:`4b9df539fa06fb19ed8b51ef2d46e5c56779de81 </yocto-docs/commit/?id=4b9df539fa06fb19ed8b51ef2d46e5c56779de81>`
|
||||
- Release Artefact: yocto-docs-4b9df539fa06fb19ed8b51ef2d46e5c56779de81
|
||||
- sha: 70ee2caf576683c5f31ac5a592cde1c0650ece25cfcd5ff3cc7eedf531575611
|
||||
- Download Locations:
|
||||
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.32/yocto-docs-4b9df539fa06fb19ed8b51ef2d46e5c56779de81.tar.bz2
|
||||
|
||||
https://mirrors.edge.kernel.org/yocto/yocto/yocto-4.0.32/yocto-docs-4b9df539fa06fb19ed8b51ef2d46e5c56779de81.tar.bz2
|
||||
|
||||
poky
|
||||
|
||||
- Repository Location: :yocto_git:`/poky`
|
||||
- Branch: :yocto_git:`kirkstone </poky/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.32 </poky/log/?h=yocto-4.0.32>`
|
||||
- Git Revision: :yocto_git:`2c05660b21c7cc1082aeac8b75d8a2d82e249f63 </poky/commit/?id=2c05660b21c7cc1082aeac8b75d8a2d82e249f63>`
|
||||
- Release Artefact: poky-2c05660b21c7cc1082aeac8b75d8a2d82e249f63
|
||||
- sha: d7a55a18a597a7b140a81586b7ca6379c208ebbb3285de36c48fde10882947d8
|
||||
- Download Locations:
|
||||
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.32/poky-2c05660b21c7cc1082aeac8b75d8a2d82e249f63.tar.bz2
|
||||
|
||||
https://mirrors.edge.kernel.org/yocto/yocto/yocto-4.0.32/poky-2c05660b21c7cc1082aeac8b75d8a2d82e249f63.tar.bz2
|
||||
|
||||
openembedded-core
|
||||
|
||||
- Repository Location: :oe_git:`/openembedded-core`
|
||||
- Branch: :oe_git:`kirkstone </openembedded-core/log/?h=kirkstone>`
|
||||
- Tag: :oe_git:`yocto-4.0.32 </openembedded-core/log/?h=yocto-4.0.32>`
|
||||
- Git Revision: :oe_git:`2ed3f8b938579dbbb804e04c45a968cc57761db7 </openembedded-core/commit/?id=2ed3f8b938579dbbb804e04c45a968cc57761db7>`
|
||||
- Release Artefact: oecore-2ed3f8b938579dbbb804e04c45a968cc57761db7
|
||||
- sha: 11b9632586dfbf3f0ef69eca2014a8002f25ca8d53cfe9424e27361ba3a20831
|
||||
- Download Locations:
|
||||
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.32/oecore-2ed3f8b938579dbbb804e04c45a968cc57761db7.tar.bz2
|
||||
|
||||
https://mirrors.edge.kernel.org/yocto/yocto/yocto-4.0.32/oecore-2ed3f8b938579dbbb804e04c45a968cc57761db7.tar.bz2
|
||||
|
||||
meta-yocto
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-yocto`
|
||||
- Branch: :yocto_git:`kirkstone </meta-yocto/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.32 </meta-yocto/log/?h=yocto-4.0.32>`
|
||||
- Git Revision: :yocto_git:`77b40877c179ea3ce5c37c7ba1831e9c0e289266 </meta-yocto/commit/?id=77b40877c179ea3ce5c37c7ba1831e9c0e289266>`
|
||||
- Release Artefact: meta-yocto-77b40877c179ea3ce5c37c7ba1831e9c0e289266
|
||||
- sha: e908d42690881cd6e07b9ca18a21eb8761a0ec72d940b12905622e75ba913974
|
||||
- Download Locations:
|
||||
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.32/meta-yocto-77b40877c179ea3ce5c37c7ba1831e9c0e289266.tar.bz2
|
||||
|
||||
https://mirrors.edge.kernel.org/yocto/yocto/yocto-4.0.32/meta-yocto-77b40877c179ea3ce5c37c7ba1831e9c0e289266.tar.bz2
|
||||
|
||||
meta-mingw
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-mingw`
|
||||
- Branch: :yocto_git:`kirkstone </meta-mingw/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.32 </meta-mingw/log/?h=yocto-4.0.32>`
|
||||
- Git Revision: :yocto_git:`87c22abb1f11be430caf4372e6b833dc7d77564e </meta-mingw/commit/?id=87c22abb1f11be430caf4372e6b833dc7d77564e>`
|
||||
- Release Artefact: meta-mingw-87c22abb1f11be430caf4372e6b833dc7d77564e
|
||||
- sha: f0bc4873e2e0319fb9d6d6ab9b98eb3f89664d4339a167d2db6a787dd12bc1a8
|
||||
- Download Locations:
|
||||
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.32/meta-mingw-87c22abb1f11be430caf4372e6b833dc7d77564e.tar.bz2
|
||||
|
||||
https://mirrors.edge.kernel.org/yocto/yocto/yocto-4.0.32/meta-mingw-87c22abb1f11be430caf4372e6b833dc7d77564e.tar.bz2
|
||||
|
||||
meta-gplv2
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-gplv2`
|
||||
- Branch: :yocto_git:`kirkstone </meta-gplv2/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.32 </meta-gplv2/log/?h=yocto-4.0.32>`
|
||||
- Git Revision: :yocto_git:`d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a </meta-gplv2/commit/?id=d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a>`
|
||||
- Release Artefact: meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a
|
||||
- sha: c386f59f8a672747dc3d0be1d4234b6039273d0e57933eb87caa20f56b9cca6d
|
||||
- Download Locations:
|
||||
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.32/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||
|
||||
https://mirrors.edge.kernel.org/yocto/yocto/yocto-4.0.32/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||
|
||||
bitbake
|
||||
|
||||
- Repository Location: :oe_git:`/bitbake`
|
||||
- Branch: :oe_git:`2.0 </bitbake/log/?h=2.0>`
|
||||
- Tag: :oe_git:`yocto-4.0.32 </bitbake/log/?h=yocto-4.0.32>`
|
||||
- Git Revision: :oe_git:`8e2d1f8de055549b2101614d85454fcd1d0f94b2 </bitbake/commit/?id=8e2d1f8de055549b2101614d85454fcd1d0f94b2>`
|
||||
- Release Artefact: bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2
|
||||
- sha: fad4e7699bae62082118e89785324b031b0af0743064caee87c91ba28549afb0
|
||||
- Download Locations:
|
||||
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.32/bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2.tar.bz2
|
||||
|
||||
https://mirrors.edge.kernel.org/yocto/yocto/yocto-4.0.32/bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2.tar.bz2
|
||||
|
||||
@@ -3280,9 +3280,9 @@ The variables used by this class are:
|
||||
rebuilding the FIT image containing the kernel.
|
||||
|
||||
See U-Boot's documentation for details about `verified boot
|
||||
<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/verified-boot.txt>`__
|
||||
<https://docs.u-boot.org/en/latest/usage/fit/verified-boot.html>`__
|
||||
and the `signature process
|
||||
<https://source.denx.de/u-boot/u-boot/-/blob/master/doc/uImage.FIT/signature.txt>`__.
|
||||
<https://docs.u-boot.org/en/latest/usage/fit/signature.html>`__.
|
||||
|
||||
See also the description of :ref:`ref-classes-kernel-fitimage` class, which this class
|
||||
imitates.
|
||||
|
||||
@@ -71,10 +71,8 @@ supported on the following distributions:
|
||||
- Fedora 41
|
||||
- Rocky Linux 8
|
||||
- Rocky Linux 9
|
||||
- Ubuntu 20.04 (LTS)
|
||||
- Ubuntu 22.04 (LTS)
|
||||
- Ubuntu 24.04 (LTS)
|
||||
- Ubuntu 24.10
|
||||
|
||||
The following distribution versions are still tested, even though the
|
||||
organizations publishing them no longer make updates publicly available:
|
||||
@@ -86,7 +84,6 @@ organizations publishing them no longer make updates publicly available:
|
||||
|
||||
- Fedora 39
|
||||
- Fedora 40
|
||||
- Ubuntu 20.04 (LTS)
|
||||
|
||||
Note that the Yocto Project doesn't have access to private updates
|
||||
that some of these versions may have. Therefore, our testing has
|
||||
@@ -121,7 +118,9 @@ tested on former revisions of "&DISTRO_NAME;", but no longer are:
|
||||
- Ubuntu 16.04
|
||||
- Ubuntu 18.04
|
||||
- Ubuntu 19.04
|
||||
- Ubuntu 20.04
|
||||
- Ubuntu 21.10
|
||||
- Ubuntu 24.10
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ contact us with other suggestions.
|
||||
function of a particular part of the workflow gives you an idea of what might
|
||||
be going wrong.
|
||||
|
||||
.. image:: figures/yp-how-it-works-new-diagram.png
|
||||
.. image:: overview-manual/svg/yp-flow-diagram.*
|
||||
|
||||
#. **Know that you can generate a dependency graph and learn how to do it:**
|
||||
A dependency graph shows dependencies between recipes, tasks, and targets.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
||||
DISTRO_VERSION = "4.0.33"
|
||||
DISTRO_VERSION = "4.0.34"
|
||||
DISTRO_CODENAME = "kirkstone"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
@@ -41,12 +41,16 @@ SANITY_TESTED_DISTROS ?= " \
|
||||
fedora-37 \n \
|
||||
fedora-39 \n \
|
||||
fedora-40 \n \
|
||||
fedora-41 \n \
|
||||
debian-11 \n \
|
||||
debian-12 \n \
|
||||
opensuseleap-15.3 \n \
|
||||
almalinux-8.8 \n \
|
||||
almalinux-8.9 \n \
|
||||
almalinux-8.10 \n \
|
||||
almalinux-9.4 \n \
|
||||
rocky-8 \n \
|
||||
rocky-9 \n \
|
||||
"
|
||||
# add poky sanity bbclass
|
||||
INHERIT += "poky-sanity"
|
||||
|
||||
@@ -859,7 +859,7 @@ result: $result
|
||||
metadata revisions:
|
||||
END
|
||||
cat ${BUILDHISTORY_DIR}/metadata-revs >> $commitmsgfile
|
||||
git commit $commitopts -F $commitmsgfile --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
|
||||
git commit --no-gpg-sign $commitopts -F $commitmsgfile --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
|
||||
rm $commitmsgfile
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,7 @@ PE = "1"
|
||||
# repo during parse
|
||||
SRCREV = "d637294e264adfeb29f390dfc393106fd4d41b17"
|
||||
|
||||
SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master \
|
||||
file://CVE-2024-42040.patch \
|
||||
"
|
||||
SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
@@ -11,6 +11,7 @@ SRC_URI += " file://0001-riscv32-Use-double-float-ABI-for-rv32.patch \
|
||||
file://CVE-2022-30790.patch \
|
||||
file://CVE-2022-2347_1.patch \
|
||||
file://CVE-2022-2347_2.patch \
|
||||
file://CVE-2024-42040.patch \
|
||||
file://CVE-2024-57254.patch \
|
||||
file://CVE-2024-57255.patch \
|
||||
file://CVE-2024-57256.patch \
|
||||
|
||||
@@ -37,6 +37,10 @@ SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}
|
||||
file://CVE-2023-38473.patch \
|
||||
file://CVE-2024-52616.patch \
|
||||
file://CVE-2024-52615.patch \
|
||||
file://CVE-2025-68276.patch \
|
||||
file://CVE-2025-68468.patch \
|
||||
file://CVE-2025-68471.patch \
|
||||
file://CVE-2026-24401.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
|
||||
|
||||
65
meta/recipes-connectivity/avahi/files/CVE-2025-68276.patch
Normal file
65
meta/recipes-connectivity/avahi/files/CVE-2025-68276.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
From 8ec85459d8e6e59cc14457e16fb7ba171901f90e Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Wed, 17 Dec 2025 08:11:23 +0000
|
||||
Subject: [PATCH] core: refuse to create wide-area record browsers when
|
||||
wide-area is off
|
||||
|
||||
It fixes a bug where it was possible for unprivileged local users to
|
||||
crash avahi-daemon (with wide-area disabled) by creating record browsers
|
||||
with the AVAHI_LOOKUP_USE_WIDE_AREA flag set via D-Bus (either by calling
|
||||
the RecordBrowserNew method directly or by creating hostname/address/service
|
||||
resolvers/browsers that create those browsers internally themselves).
|
||||
|
||||
```
|
||||
$ gdbus call --system --dest org.freedesktop.Avahi --object-path / --method org.freedesktop.Avahi.Server.ResolveHostName -- -1 -1 yo.local -1 1
|
||||
Error: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
|
||||
```
|
||||
```
|
||||
dbus-protocol.c: interface=org.freedesktop.Avahi.Server, path=/, member=ResolveHostName
|
||||
avahi-daemon: wide-area.c:725: avahi_wide_area_scan_cache: Assertion `e' failed.
|
||||
==307948==
|
||||
==307948== Process terminating with default action of signal 6 (SIGABRT)
|
||||
==307948== at 0x4B3630C: __pthread_kill_implementation (pthread_kill.c:44)
|
||||
==307948== by 0x4ADF921: raise (raise.c:26)
|
||||
==307948== by 0x4AC74AB: abort (abort.c:77)
|
||||
==307948== by 0x4AC741F: __assert_fail_base.cold (assert.c:118)
|
||||
==307948== by 0x48D8B85: avahi_wide_area_scan_cache (wide-area.c:725)
|
||||
==307948== by 0x48C8953: lookup_scan_cache (browse.c:351)
|
||||
==307948== by 0x48C8B1B: lookup_go (browse.c:386)
|
||||
==307948== by 0x48C9148: defer_callback (browse.c:516)
|
||||
==307948== by 0x48AEA0E: expiration_event (timeeventq.c:94)
|
||||
==307948== by 0x489D3AE: timeout_callback (simple-watch.c:447)
|
||||
==307948== by 0x489D787: avahi_simple_poll_dispatch (simple-watch.c:563)
|
||||
==307948== by 0x489D91E: avahi_simple_poll_iterate (simple-watch.c:605)
|
||||
==307948==
|
||||
```
|
||||
|
||||
wide-area has been disabled by default since
|
||||
9c4214146738146e454f098264690e8e884c39bd (v0.9-rc2).
|
||||
|
||||
https://github.com/avahi/avahi/security/advisories/GHSA-mhf3-865v-g5rc
|
||||
|
||||
CVE: CVE-2025-68276
|
||||
Upstream-Status: Backport [https://github.com/avahi/avahi/commit/2d48e42d44a183f26a4d12d1f5d41abb9b7c6355]
|
||||
(cherry picked from commit 2d48e42d44a183f26a4d12d1f5d41abb9b7c6355)
|
||||
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
|
||||
---
|
||||
avahi-core/browse.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/avahi-core/browse.c b/avahi-core/browse.c
|
||||
index e8a915e..59d53cb 100644
|
||||
--- a/avahi-core/browse.c
|
||||
+++ b/avahi-core/browse.c
|
||||
@@ -541,6 +541,11 @@ AvahiSRecordBrowser *avahi_s_record_browser_prepare(
|
||||
AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
|
||||
AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !(flags & AVAHI_LOOKUP_USE_WIDE_AREA) || !(flags & AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
|
||||
|
||||
+ if ((flags & AVAHI_LOOKUP_USE_WIDE_AREA) && !server->wide_area_lookup_engine) {
|
||||
+ avahi_server_set_errno(server, AVAHI_ERR_NOT_SUPPORTED);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
if (!(b = avahi_new(AvahiSRecordBrowser, 1))) {
|
||||
avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
|
||||
return NULL;
|
||||
32
meta/recipes-connectivity/avahi/files/CVE-2025-68468.patch
Normal file
32
meta/recipes-connectivity/avahi/files/CVE-2025-68468.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 483f83828cfda965fac914ff1b39c63c256372b2 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo Muis <198191869+friendlyhugo@users.noreply.github.com>
|
||||
Date: Sun, 2 Mar 2025 18:06:24 +0100
|
||||
Subject: [PATCH] core: fix DoS bug by removing incorrect assertion
|
||||
|
||||
Closes https://github.com/avahi/avahi/issues/683
|
||||
|
||||
CVE: CVE-2025-68468
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/avahi/avahi/commit/f66be13d7f31a3ef806d226bf8b67240179d309a]
|
||||
|
||||
Signed-off-by: Amaury Couderc <amaury.couderc@est.tech>
|
||||
---
|
||||
avahi-core/browse.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-core/browse.c b/avahi-core/browse.c
|
||||
index 86e4432..79595fe 100644
|
||||
--- a/avahi-core/browse.c
|
||||
+++ b/avahi-core/browse.c
|
||||
@@ -295,7 +295,6 @@ static void lookup_multicast_callback(
|
||||
lookup_drop_cname(l, interface, protocol, 0, r);
|
||||
else {
|
||||
/* It's a normal record, so let's call the user callback */
|
||||
- assert(avahi_key_equal(b->key, l->key));
|
||||
|
||||
b->callback(b, interface, protocol, event, r, flags, b->userdata);
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
|
||||
36
meta/recipes-connectivity/avahi/files/CVE-2025-68471.patch
Normal file
36
meta/recipes-connectivity/avahi/files/CVE-2025-68471.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 4e84c1d6eb2f54d1643bd7ce62817c722ca36d25 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo Muis <198191869+friendlyhugo@users.noreply.github.com>
|
||||
Date: Sun, 2 Mar 2025 18:06:24 +0100
|
||||
Subject: [PATCH] core: fix DoS bug by changing assert to return
|
||||
|
||||
Closes https://github.com/avahi/avahi/issues/678
|
||||
|
||||
CVE: CVE-2025-68471
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/avahi/avahi/commit/9c6eb53bf2e290aed84b1f207e3ce35c54cc0aa1]
|
||||
|
||||
Signed-off-by: Amaury Couderc <amaury.couderc@est.tech>
|
||||
---
|
||||
avahi-core/browse.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-core/browse.c b/avahi-core/browse.c
|
||||
index 2941e57..86e4432 100644
|
||||
--- a/avahi-core/browse.c
|
||||
+++ b/avahi-core/browse.c
|
||||
@@ -320,7 +320,10 @@ static int lookup_start(AvahiSRBLookup *l) {
|
||||
assert(l);
|
||||
|
||||
assert(!(l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) != !(l->flags & AVAHI_LOOKUP_USE_MULTICAST));
|
||||
- assert(!l->wide_area && !l->multicast);
|
||||
+ if (l->wide_area || l->multicast) {
|
||||
+ /* Avoid starting a duplicate lookup */
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
if (l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) {
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
74
meta/recipes-connectivity/avahi/files/CVE-2026-24401.patch
Normal file
74
meta/recipes-connectivity/avahi/files/CVE-2026-24401.patch
Normal file
@@ -0,0 +1,74 @@
|
||||
From 5eea2640324928c15936b7a2bcbf8ea0de7b08f7 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo Muis <198191869+friendlyhugo@users.noreply.github.com>
|
||||
Date: Sun, 2 Mar 2025 18:06:24 +0100
|
||||
Subject: [PATCH] core: fix uncontrolled recursion bug using a simple loop
|
||||
detection algorithm
|
||||
|
||||
Closes https://github.com/avahi/avahi/issues/501
|
||||
|
||||
CVE: CVE-2026-24401
|
||||
Upstream-Status: Backport [https://github.com/avahi/avahi/commit/78eab31128479f06e30beb8c1cbf99dd921e2524]
|
||||
(cherry picked from commit 78eab31128479f06e30beb8c1cbf99dd921e2524)
|
||||
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
|
||||
---
|
||||
avahi-core/browse.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
|
||||
diff --git a/avahi-core/browse.c b/avahi-core/browse.c
|
||||
index f461083..975b3e9 100644
|
||||
--- a/avahi-core/browse.c
|
||||
+++ b/avahi-core/browse.c
|
||||
@@ -401,6 +401,40 @@ static int lookup_go(AvahiSRBLookup *l) {
|
||||
return n;
|
||||
}
|
||||
|
||||
+static int lookup_exists_in_path(AvahiSRBLookup* lookup, AvahiSRBLookup* from, AvahiSRBLookup* to) {
|
||||
+ AvahiRList* rl;
|
||||
+ if (from == to)
|
||||
+ return 0;
|
||||
+ for (rl = from->cname_lookups; rl; rl = rl->rlist_next) {
|
||||
+ int r = lookup_exists_in_path(lookup, rl->data, to);
|
||||
+ if (r == 1) {
|
||||
+ /* loop detected, propagate result */
|
||||
+ return r;
|
||||
+ } else if (r == 0) {
|
||||
+ /* is loop detected? */
|
||||
+ return lookup == from;
|
||||
+ } else {
|
||||
+ /* `to` not found, continue */
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+ /* no path found */
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static int cname_would_create_loop(AvahiSRBLookup* l, AvahiSRBLookup* n) {
|
||||
+ int ret;
|
||||
+ if (l == n)
|
||||
+ /* Loop to self */
|
||||
+ return 1;
|
||||
+
|
||||
+ ret = lookup_exists_in_path(n, l->record_browser->root_lookup, l);
|
||||
+
|
||||
+ /* Path to n always exists */
|
||||
+ assert(ret != -1);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static void lookup_handle_cname(AvahiSRBLookup *l, AvahiIfIndex interface, AvahiProtocol protocol, AvahiLookupFlags flags, AvahiRecord *r) {
|
||||
AvahiKey *k;
|
||||
AvahiSRBLookup *n;
|
||||
@@ -420,6 +454,12 @@ static void lookup_handle_cname(AvahiSRBLookup *l, AvahiIfIndex interface, Avahi
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (cname_would_create_loop(l, n)) {
|
||||
+ /* CNAME loops are not allowed */
|
||||
+ lookup_unref(n);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
l->cname_lookups = avahi_rlist_prepend(l->cname_lookups, lookup_ref(n));
|
||||
|
||||
lookup_go(n);
|
||||
@@ -20,7 +20,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
|
||||
file://0001-avoid-start-failure-with-bind-user.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "6ddc1d981511c4da0b203b0513af131e5d15e5f1c261145736fe1f35dd1fe79d"
|
||||
SRC_URI[sha256sum] = "81f5035a25c576af1a93f0061cf70bde6d00a0c7bd1274abf73f5b5389a6f82d"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
|
||||
# follow the ESV versions divisible by 2
|
||||
@@ -0,0 +1,38 @@
|
||||
From fd702c02497b2f398e739e3119bed0b23dd7aa7b Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Tue, 20 Jan 2026 01:10:36 -0800
|
||||
Subject: [PATCH] Fix injection bug with bogus user names
|
||||
|
||||
Problem reported by Kyu Neushwaistein.
|
||||
* telnetd/utility.c (_var_short_name):
|
||||
Ignore user names that start with '-' or contain shell metacharacters.
|
||||
|
||||
Signed-off-by: Simon Josefsson <simon@josefsson.org>
|
||||
|
||||
CVE: CVE-2026-24061
|
||||
Upstream-Status: Backport [https://codeberg.org/inetutils/inetutils/commit/fd702c02497b2f398e739e3119bed0b23dd7aa7b]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
telnetd/utility.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/telnetd/utility.c b/telnetd/utility.c
|
||||
index b486226e..c02cd0e6 100644
|
||||
--- a/telnetd/utility.c
|
||||
+++ b/telnetd/utility.c
|
||||
@@ -1737,7 +1737,14 @@ _var_short_name (struct line_expander *exp)
|
||||
return user_name ? xstrdup (user_name) : NULL;
|
||||
|
||||
case 'U':
|
||||
- return getenv ("USER") ? xstrdup (getenv ("USER")) : xstrdup ("");
|
||||
+ {
|
||||
+ /* Ignore user names starting with '-' or containing shell
|
||||
+ metachars, as they can cause trouble. */
|
||||
+ char const *u = getenv ("USER");
|
||||
+ return xstrdup ((u && *u != '-'
|
||||
+ && !u[strcspn (u, "\t\n !\"#$&'()*;<=>?[\\^`{|}~")])
|
||||
+ ? u : "");
|
||||
+ }
|
||||
|
||||
default:
|
||||
exp->state = EXP_STATE_ERROR;
|
||||
@@ -0,0 +1,82 @@
|
||||
From ccba9f748aa8d50a38d7748e2e60362edd6a32cc Mon Sep 17 00:00:00 2001
|
||||
From: Simon Josefsson <simon@josefsson.org>
|
||||
Date: Tue, 20 Jan 2026 14:02:39 +0100
|
||||
Subject: [PATCH] telnetd: Sanitize all variable expansions
|
||||
|
||||
* telnetd/utility.c (sanitize): New function.
|
||||
(_var_short_name): Use it for all variables.
|
||||
|
||||
CVE: CVE-2026-24061
|
||||
Upstream-Status: Backport [https://codeberg.org/inetutils/inetutils/commit/ccba9f748aa8d50a38d7748e2e60362edd6a32cc]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
telnetd/utility.c | 32 ++++++++++++++++++--------------
|
||||
1 file changed, 18 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/telnetd/utility.c b/telnetd/utility.c
|
||||
index c02cd0e6..b21ad961 100644
|
||||
--- a/telnetd/utility.c
|
||||
+++ b/telnetd/utility.c
|
||||
@@ -1688,6 +1688,17 @@ static void _expand_cond (struct line_expander *exp);
|
||||
static void _skip_block (struct line_expander *exp);
|
||||
static void _expand_block (struct line_expander *exp);
|
||||
|
||||
+static char *
|
||||
+sanitize (const char *u)
|
||||
+{
|
||||
+ /* Ignore values starting with '-' or containing shell metachars, as
|
||||
+ they can cause trouble. */
|
||||
+ if (u && *u != '-' && !u[strcspn (u, "\t\n !\"#$&'()*;<=>?[\\^`{|}~")])
|
||||
+ return u;
|
||||
+ else
|
||||
+ return "";
|
||||
+}
|
||||
+
|
||||
/* Expand a variable referenced by its short one-symbol name.
|
||||
Input: exp->cp points to the variable name.
|
||||
FIXME: not implemented */
|
||||
@@ -1714,13 +1725,13 @@ _var_short_name (struct line_expander *exp)
|
||||
return xstrdup (timebuf);
|
||||
|
||||
case 'h':
|
||||
- return xstrdup (remote_hostname);
|
||||
+ return xstrdup (sanitize (remote_hostname));
|
||||
|
||||
case 'l':
|
||||
- return xstrdup (local_hostname);
|
||||
+ return xstrdup (sanitize (local_hostname));
|
||||
|
||||
case 'L':
|
||||
- return xstrdup (line);
|
||||
+ return xstrdup (sanitize (line));
|
||||
|
||||
case 't':
|
||||
q = strchr (line + 1, '/');
|
||||
@@ -1728,23 +1739,16 @@ _var_short_name (struct line_expander *exp)
|
||||
q++;
|
||||
else
|
||||
q = line;
|
||||
- return xstrdup (q);
|
||||
+ return xstrdup (sanitize (q));
|
||||
|
||||
case 'T':
|
||||
- return terminaltype ? xstrdup (terminaltype) : NULL;
|
||||
+ return terminaltype ? xstrdup (sanitize (terminaltype)) : NULL;
|
||||
|
||||
case 'u':
|
||||
- return user_name ? xstrdup (user_name) : NULL;
|
||||
+ return user_name ? xstrdup (sanitize (user_name)) : NULL;
|
||||
|
||||
case 'U':
|
||||
- {
|
||||
- /* Ignore user names starting with '-' or containing shell
|
||||
- metachars, as they can cause trouble. */
|
||||
- char const *u = getenv ("USER");
|
||||
- return xstrdup ((u && *u != '-'
|
||||
- && !u[strcspn (u, "\t\n !\"#$&'()*;<=>?[\\^`{|}~")])
|
||||
- ? u : "");
|
||||
- }
|
||||
+ return xstrdup (sanitize (getenv ("USER")));
|
||||
|
||||
default:
|
||||
exp->state = EXP_STATE_ERROR;
|
||||
@@ -24,6 +24,8 @@ SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \
|
||||
file://CVE-2022-39028.patch \
|
||||
file://0001-CVE-2023-40303-ftpd-rcp-rlogin-rsh-rshd-uucpd-fix-ch.patch \
|
||||
file://0002-CVE-2023-40303-Indent-changes-in-previous-commit.patch \
|
||||
file://CVE-2026-24061-01.patch \
|
||||
file://CVE-2026-24061-02.patch \
|
||||
"
|
||||
|
||||
inherit autotools gettext update-alternatives texinfo
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 24734088e1034392de981151dfe57e3a379ada18 Mon Sep 17 00:00:00 2001
|
||||
From 295485f5c4b3120b272b81f92356f6d24871c02e Mon Sep 17 00:00:00 2001
|
||||
From: Hubert Kario <hkario@redhat.com>
|
||||
Date: Tue, 15 Mar 2022 13:58:08 +0100
|
||||
Subject: [PATCH 1/3] rsa: add implicit rejection in PKCS#1 v1.5
|
||||
Subject: [PATCH] rsa: add implicit rejection in PKCS#1 v1.5
|
||||
|
||||
The RSA decryption as implemented before required very careful handling
|
||||
of both the exit code returned by OpenSSL and the potentially returned
|
||||
@@ -43,6 +43,7 @@ Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/13817)
|
||||
|
||||
Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
|
||||
---
|
||||
crypto/rsa/rsa_ossl.c | 95 +++++++-
|
||||
crypto/rsa/rsa_pk1.c | 252 ++++++++++++++++++++++
|
||||
@@ -56,7 +57,7 @@ Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
9 files changed, 393 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c
|
||||
index 0fc642e777..330302ae55 100644
|
||||
index 6c32764..d658a3c 100644
|
||||
--- a/crypto/rsa/rsa_ossl.c
|
||||
+++ b/crypto/rsa/rsa_ossl.c
|
||||
@@ -17,6 +17,9 @@
|
||||
@@ -68,8 +69,8 @@ index 0fc642e777..330302ae55 100644
|
||||
+#include <openssl/hmac.h>
|
||||
|
||||
static int rsa_ossl_public_encrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
@@ -377,8 +380,13 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
unsigned char *to, RSA *rsa, int padding);
|
||||
@@ -373,8 +376,13 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
BIGNUM *f, *ret;
|
||||
int j, num = 0, r = -1;
|
||||
unsigned char *buf = NULL;
|
||||
@@ -83,7 +84,7 @@ index 0fc642e777..330302ae55 100644
|
||||
/*
|
||||
* Used only if the blinding structure is shared. A non-NULL unblind
|
||||
* instructs rsa_blinding_convert() and rsa_blinding_invert() to store
|
||||
@@ -408,6 +416,11 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
@@ -404,6 +412,11 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -95,7 +96,7 @@ index 0fc642e777..330302ae55 100644
|
||||
/* make data into a big number */
|
||||
if (BN_bin2bn(from, (int)flen, f) == NULL)
|
||||
goto err;
|
||||
@@ -472,13 +485,91 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
@@ -464,13 +477,91 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
if (!rsa_blinding_invert(blinding, ret, unblind, ctx))
|
||||
goto err;
|
||||
|
||||
@@ -188,17 +189,17 @@ index 0fc642e777..330302ae55 100644
|
||||
break;
|
||||
case RSA_PKCS1_OAEP_PADDING:
|
||||
r = RSA_padding_check_PKCS1_OAEP(to, num, buf, j, num, NULL, 0);
|
||||
@@ -501,6 +592,8 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
@@ -493,6 +584,8 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
#endif
|
||||
|
||||
err:
|
||||
err:
|
||||
+ HMAC_CTX_free(hmac);
|
||||
+ EVP_MD_free(md);
|
||||
BN_CTX_end(ctx);
|
||||
BN_CTX_free(ctx);
|
||||
OPENSSL_clear_free(buf, num);
|
||||
diff --git a/crypto/rsa/rsa_pk1.c b/crypto/rsa/rsa_pk1.c
|
||||
index 51507fc030..5cd2b26879 100644
|
||||
index bebb43a..3fe12b2 100644
|
||||
--- a/crypto/rsa/rsa_pk1.c
|
||||
+++ b/crypto/rsa/rsa_pk1.c
|
||||
@@ -21,10 +21,14 @@
|
||||
@@ -214,7 +215,7 @@ index 51507fc030..5cd2b26879 100644
|
||||
|
||||
+
|
||||
int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
|
||||
const unsigned char *from, int flen)
|
||||
const unsigned char *from, int flen)
|
||||
{
|
||||
@@ -273,6 +277,254 @@ int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
|
||||
return constant_time_select_int(good, mlen, -1);
|
||||
@@ -472,7 +473,7 @@ index 51507fc030..5cd2b26879 100644
|
||||
* ossl_rsa_padding_check_PKCS1_type_2_TLS() checks and removes the PKCS1 type 2
|
||||
* padding from a decrypted RSA message in a TLS signature. The result is stored
|
||||
diff --git a/doc/man1/openssl-pkeyutl.pod.in b/doc/man1/openssl-pkeyutl.pod.in
|
||||
index 2f6ef0021d..015265a74d 100644
|
||||
index 2f6ef00..015265a 100644
|
||||
--- a/doc/man1/openssl-pkeyutl.pod.in
|
||||
+++ b/doc/man1/openssl-pkeyutl.pod.in
|
||||
@@ -273,6 +273,11 @@ signed or verified directly instead of using a B<DigestInfo> structure. If a
|
||||
@@ -488,7 +489,7 @@ index 2f6ef0021d..015265a74d 100644
|
||||
|
||||
For B<x931> if the digest type is set it is used to format the block data
|
||||
diff --git a/doc/man1/openssl-rsautl.pod.in b/doc/man1/openssl-rsautl.pod.in
|
||||
index 0a32fd965b..4c462abc8c 100644
|
||||
index 0a32fd9..4c462ab 100644
|
||||
--- a/doc/man1/openssl-rsautl.pod.in
|
||||
+++ b/doc/man1/openssl-rsautl.pod.in
|
||||
@@ -105,6 +105,11 @@ The padding to use: PKCS#1 v1.5 (the default), PKCS#1 OAEP,
|
||||
@@ -504,7 +505,7 @@ index 0a32fd965b..4c462abc8c 100644
|
||||
|
||||
Hex dump the output data.
|
||||
diff --git a/doc/man3/EVP_PKEY_CTX_ctrl.pod b/doc/man3/EVP_PKEY_CTX_ctrl.pod
|
||||
index 3075eaafd6..e788f38809 100644
|
||||
index 3075eaa..e788f38 100644
|
||||
--- a/doc/man3/EVP_PKEY_CTX_ctrl.pod
|
||||
+++ b/doc/man3/EVP_PKEY_CTX_ctrl.pod
|
||||
@@ -386,6 +386,13 @@ this behaviour should be tolerated then
|
||||
@@ -522,7 +523,7 @@ index 3075eaafd6..e788f38809 100644
|
||||
|
||||
EVP_PKEY_CTX_set_dsa_paramgen_bits() sets the number of bits used for DSA
|
||||
diff --git a/doc/man3/EVP_PKEY_decrypt.pod b/doc/man3/EVP_PKEY_decrypt.pod
|
||||
index b6f9bad5f1..898535a7a2 100644
|
||||
index b6f9bad..898535a 100644
|
||||
--- a/doc/man3/EVP_PKEY_decrypt.pod
|
||||
+++ b/doc/man3/EVP_PKEY_decrypt.pod
|
||||
@@ -51,6 +51,18 @@ return 1 for success and 0 or a negative value for failure. In particular a
|
||||
@@ -545,7 +546,7 @@ index b6f9bad5f1..898535a7a2 100644
|
||||
|
||||
Decrypt data using OAEP (for RSA keys):
|
||||
diff --git a/doc/man3/RSA_padding_add_PKCS1_type_1.pod b/doc/man3/RSA_padding_add_PKCS1_type_1.pod
|
||||
index 9f7025c497..36ae18563f 100644
|
||||
index 9f7025c..36ae185 100644
|
||||
--- a/doc/man3/RSA_padding_add_PKCS1_type_1.pod
|
||||
+++ b/doc/man3/RSA_padding_add_PKCS1_type_1.pod
|
||||
@@ -121,8 +121,8 @@ L<ERR_get_error(3)>.
|
||||
@@ -570,7 +571,7 @@ index 9f7025c497..36ae18563f 100644
|
||||
|
||||
L<RSA_public_encrypt(3)>,
|
||||
diff --git a/doc/man3/RSA_public_encrypt.pod b/doc/man3/RSA_public_encrypt.pod
|
||||
index 1d38073aea..bd3f835ac6 100644
|
||||
index 1d38073..bd3f835 100644
|
||||
--- a/doc/man3/RSA_public_encrypt.pod
|
||||
+++ b/doc/man3/RSA_public_encrypt.pod
|
||||
@@ -52,8 +52,8 @@ Encrypting user data directly with RSA is insecure.
|
||||
@@ -599,20 +600,17 @@ index 1d38073aea..bd3f835ac6 100644
|
||||
|
||||
SSL, PKCS #1 v2.0
|
||||
diff --git a/include/crypto/rsa.h b/include/crypto/rsa.h
|
||||
index 949873d0ee..f267e5d9d1 100644
|
||||
index 797dc1f..2f86e4c 100644
|
||||
--- a/include/crypto/rsa.h
|
||||
+++ b/include/crypto/rsa.h
|
||||
@@ -83,6 +83,10 @@ int ossl_rsa_param_decode(RSA *rsa, const X509_ALGOR *alg);
|
||||
RSA *ossl_rsa_key_from_pkcs8(const PKCS8_PRIV_KEY_INFO *p8inf,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
+int ossl_rsa_padding_check_PKCS1_type_2(OSSL_LIB_CTX *ctx,
|
||||
+ unsigned char *to, int tlen,
|
||||
+ const unsigned char *from, int flen,
|
||||
+ int num, unsigned char *kdk);
|
||||
int ossl_rsa_padding_check_PKCS1_type_2_TLS(OSSL_LIB_CTX *ctx, unsigned char *to,
|
||||
size_t tlen,
|
||||
const unsigned char *from,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
size_t tlen,
|
||||
const unsigned char *from,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From e92f0cd3b03e5aca948b03df7e3d02e536700f68 Mon Sep 17 00:00:00 2001
|
||||
From 584936eb09cef64eb0755c0ccb2661e7ba1aea58 Mon Sep 17 00:00:00 2001
|
||||
From: Hubert Kario <hkario@redhat.com>
|
||||
Date: Thu, 27 Oct 2022 19:16:58 +0200
|
||||
Subject: [PATCH 2/3] rsa: Add option to disable implicit rejection
|
||||
Subject: [PATCH] rsa: Add option to disable implicit rejection
|
||||
|
||||
CVE: CVE-2023-50781
|
||||
|
||||
@@ -14,6 +14,7 @@ Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/13817)
|
||||
|
||||
Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
|
||||
---
|
||||
crypto/cms/cms_env.c | 7 +++++
|
||||
crypto/evp/ctrl_params_translate.c | 6 +++++
|
||||
@@ -28,10 +29,10 @@ Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
10 files changed, 95 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c
|
||||
index 445a16fb77..49b0289114 100644
|
||||
index 2326253..96e3315 100644
|
||||
--- a/crypto/cms/cms_env.c
|
||||
+++ b/crypto/cms/cms_env.c
|
||||
@@ -581,6 +581,13 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms,
|
||||
@@ -576,6 +576,13 @@ static int cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms,
|
||||
if (!ossl_cms_env_asn1_ctrl(ri, 1))
|
||||
goto err;
|
||||
|
||||
@@ -43,15 +44,15 @@ index 445a16fb77..49b0289114 100644
|
||||
+ EVP_PKEY_CTX_ctrl_str(ktri->pctx, "rsa_pkcs1_implicit_rejection", "0");
|
||||
+
|
||||
if (EVP_PKEY_decrypt(ktri->pctx, NULL, &eklen,
|
||||
ktri->encryptedKey->data,
|
||||
ktri->encryptedKey->length) <= 0)
|
||||
ktri->encryptedKey->data,
|
||||
ktri->encryptedKey->length)
|
||||
diff --git a/crypto/evp/ctrl_params_translate.c b/crypto/evp/ctrl_params_translate.c
|
||||
index 44d0895bcf..db7325439a 100644
|
||||
index 14306a0..b481776 100644
|
||||
--- a/crypto/evp/ctrl_params_translate.c
|
||||
+++ b/crypto/evp/ctrl_params_translate.c
|
||||
@@ -2269,6 +2269,12 @@ static const struct translation_st evp_pkey_ctx_translations[] = {
|
||||
EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, NULL, NULL,
|
||||
OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL, OSSL_PARAM_OCTET_PTR, NULL },
|
||||
@@ -2249,6 +2249,12 @@ static const struct translation_st evp_pkey_ctx_translations[] = {
|
||||
EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, NULL, NULL,
|
||||
OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL, OSSL_PARAM_OCTET_PTR, NULL },
|
||||
|
||||
+ { SET, EVP_PKEY_RSA, 0, EVP_PKEY_OP_TYPE_CRYPT,
|
||||
+ EVP_PKEY_CTRL_RSA_IMPLICIT_REJECTION, NULL,
|
||||
@@ -60,13 +61,13 @@ index 44d0895bcf..db7325439a 100644
|
||||
+ NULL },
|
||||
+
|
||||
{ SET, EVP_PKEY_RSA_PSS, 0, EVP_PKEY_OP_TYPE_GEN,
|
||||
EVP_PKEY_CTRL_MD, "rsa_pss_keygen_md", NULL,
|
||||
OSSL_ALG_PARAM_DIGEST, OSSL_PARAM_UTF8_STRING, fix_md },
|
||||
EVP_PKEY_CTRL_MD, "rsa_pss_keygen_md", NULL,
|
||||
OSSL_ALG_PARAM_DIGEST, OSSL_PARAM_UTF8_STRING, fix_md },
|
||||
diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c
|
||||
index 330302ae55..4bdacd5ed9 100644
|
||||
index d658a3c..5a0b160 100644
|
||||
--- a/crypto/rsa/rsa_ossl.c
|
||||
+++ b/crypto/rsa/rsa_ossl.c
|
||||
@@ -395,6 +395,12 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
@@ -391,6 +391,12 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
BIGNUM *unblind = NULL;
|
||||
BN_BLINDING *blinding = NULL;
|
||||
|
||||
@@ -79,7 +80,7 @@ index 330302ae55..4bdacd5ed9 100644
|
||||
if ((ctx = BN_CTX_new_ex(rsa->libctx)) == NULL)
|
||||
goto err;
|
||||
BN_CTX_start(ctx);
|
||||
@@ -489,7 +495,7 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
@@ -481,7 +487,7 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
* derive the Key Derivation Key from private exponent and public
|
||||
* ciphertext
|
||||
*/
|
||||
@@ -88,7 +89,7 @@ index 330302ae55..4bdacd5ed9 100644
|
||||
/*
|
||||
* because we use d as a handle to rsa->d we need to keep it local and
|
||||
* free before any further use of rsa->d
|
||||
@@ -565,11 +571,11 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
@@ -557,11 +563,11 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
goto err;
|
||||
|
||||
switch (padding) {
|
||||
@@ -105,7 +106,7 @@ index 330302ae55..4bdacd5ed9 100644
|
||||
case RSA_PKCS1_OAEP_PADDING:
|
||||
r = RSA_padding_check_PKCS1_OAEP(to, num, buf, j, num, NULL, 0);
|
||||
diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c
|
||||
index 0bf5ac098a..81b031f81b 100644
|
||||
index 85cdfb4..7f3d810 100644
|
||||
--- a/crypto/rsa/rsa_pmeth.c
|
||||
+++ b/crypto/rsa/rsa_pmeth.c
|
||||
@@ -52,6 +52,8 @@ typedef struct {
|
||||
@@ -133,17 +134,17 @@ index 0bf5ac098a..81b031f81b 100644
|
||||
if (sctx->oaep_label) {
|
||||
OPENSSL_free(dctx->oaep_label);
|
||||
dctx->oaep_label = OPENSSL_memdup(sctx->oaep_label, sctx->oaep_labellen);
|
||||
@@ -347,6 +351,7 @@ static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *in, size_t inlen)
|
||||
@@ -345,6 +349,7 @@ static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *in, size_t inlen)
|
||||
{
|
||||
int ret;
|
||||
+ int pad_mode;
|
||||
RSA_PKEY_CTX *rctx = ctx->data;
|
||||
/*
|
||||
* Discard const. Its marked as const because this may be a cached copy of
|
||||
@@ -367,7 +372,12 @@ static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx,
|
||||
rctx->oaep_labellen,
|
||||
rctx->md, rctx->mgf1md);
|
||||
@@ -365,7 +370,12 @@ static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx,
|
||||
rctx->oaep_labellen,
|
||||
rctx->md, rctx->mgf1md);
|
||||
} else {
|
||||
- ret = RSA_private_decrypt(inlen, in, out, rsa, rctx->pad_mode);
|
||||
+ if (rctx->pad_mode == RSA_PKCS1_PADDING &&
|
||||
@@ -155,7 +156,7 @@ index 0bf5ac098a..81b031f81b 100644
|
||||
}
|
||||
*outlen = constant_time_select_s(constant_time_msb_s(ret), *outlen, ret);
|
||||
ret = constant_time_select_int(constant_time_msb(ret), ret, 1);
|
||||
@@ -591,6 +601,14 @@ static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
|
||||
@@ -587,6 +597,14 @@ static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
|
||||
*(unsigned char **)p2 = rctx->oaep_label;
|
||||
return rctx->oaep_labellen;
|
||||
|
||||
@@ -171,7 +172,7 @@ index 0bf5ac098a..81b031f81b 100644
|
||||
case EVP_PKEY_CTRL_PKCS7_SIGN:
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
diff --git a/doc/man1/openssl-pkeyutl.pod.in b/doc/man1/openssl-pkeyutl.pod.in
|
||||
index 015265a74d..5e62551d34 100644
|
||||
index 015265a..5e62551 100644
|
||||
--- a/doc/man1/openssl-pkeyutl.pod.in
|
||||
+++ b/doc/man1/openssl-pkeyutl.pod.in
|
||||
@@ -305,6 +305,16 @@ explicitly set in PSS mode then the signing digest is used.
|
||||
@@ -192,7 +193,7 @@ index 015265a74d..5e62551d34 100644
|
||||
|
||||
=head1 RSA-PSS ALGORITHM
|
||||
diff --git a/doc/man3/EVP_PKEY_CTX_ctrl.pod b/doc/man3/EVP_PKEY_CTX_ctrl.pod
|
||||
index e788f38809..3844aa2199 100644
|
||||
index e788f38..3844aa2 100644
|
||||
--- a/doc/man3/EVP_PKEY_CTX_ctrl.pod
|
||||
+++ b/doc/man3/EVP_PKEY_CTX_ctrl.pod
|
||||
@@ -392,6 +392,8 @@ instead of padding errors in case padding checks fail. Applications that
|
||||
@@ -205,7 +206,7 @@ index e788f38809..3844aa2199 100644
|
||||
=head2 DSA parameters
|
||||
|
||||
diff --git a/doc/man7/provider-asym_cipher.pod b/doc/man7/provider-asym_cipher.pod
|
||||
index 0976a263a8..2a8426a6ed 100644
|
||||
index 0976a26..2a8426a 100644
|
||||
--- a/doc/man7/provider-asym_cipher.pod
|
||||
+++ b/doc/man7/provider-asym_cipher.pod
|
||||
@@ -234,6 +234,15 @@ The TLS protocol version first requested by the client.
|
||||
@@ -225,50 +226,50 @@ index 0976a263a8..2a8426a6ed 100644
|
||||
|
||||
OSSL_FUNC_asym_cipher_gettable_ctx_params() and OSSL_FUNC_asym_cipher_settable_ctx_params()
|
||||
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
|
||||
index 6bed5a8a67..5a350b537f 100644
|
||||
index 02bebc6..9586a6d 100644
|
||||
--- a/include/openssl/core_names.h
|
||||
+++ b/include/openssl/core_names.h
|
||||
@@ -292,6 +292,7 @@ extern "C" {
|
||||
#define OSSL_PKEY_PARAM_DIST_ID "distid"
|
||||
#define OSSL_PKEY_PARAM_PUB_KEY "pub"
|
||||
#define OSSL_PKEY_PARAM_PRIV_KEY "priv"
|
||||
+#define OSSL_PKEY_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
||||
#define OSSL_PKEY_PARAM_DIST_ID "distid"
|
||||
#define OSSL_PKEY_PARAM_PUB_KEY "pub"
|
||||
#define OSSL_PKEY_PARAM_PRIV_KEY "priv"
|
||||
+#define OSSL_PKEY_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
||||
|
||||
/* Diffie-Hellman/DSA Parameters */
|
||||
#define OSSL_PKEY_PARAM_FFC_P "p"
|
||||
#define OSSL_PKEY_PARAM_FFC_P "p"
|
||||
@@ -467,6 +468,7 @@ extern "C" {
|
||||
#define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL "oaep-label"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION "tls-client-version"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION "tls-negotiated-version"
|
||||
+#define OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL "oaep-label"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION "tls-client-version"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION "tls-negotiated-version"
|
||||
+#define OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
||||
|
||||
/*
|
||||
* Encoder / decoder parameters
|
||||
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h
|
||||
index a55c9727c6..247f9014e3 100644
|
||||
index 36a780d..ceb05b2 100644
|
||||
--- a/include/openssl/rsa.h
|
||||
+++ b/include/openssl/rsa.h
|
||||
@@ -183,6 +183,8 @@ int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx, unsigned char **label);
|
||||
|
||||
# define EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES (EVP_PKEY_ALG_CTRL + 13)
|
||||
#define EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES (EVP_PKEY_ALG_CTRL + 13)
|
||||
|
||||
+# define EVP_PKEY_CTRL_RSA_IMPLICIT_REJECTION (EVP_PKEY_ALG_CTRL + 14)
|
||||
+#define EVP_PKEY_CTRL_RSA_IMPLICIT_REJECTION (EVP_PKEY_ALG_CTRL + 14)
|
||||
+
|
||||
# define RSA_PKCS1_PADDING 1
|
||||
# define RSA_NO_PADDING 3
|
||||
# define RSA_PKCS1_OAEP_PADDING 4
|
||||
#define RSA_PKCS1_PADDING 1
|
||||
#define RSA_NO_PADDING 3
|
||||
#define RSA_PKCS1_OAEP_PADDING 4
|
||||
@@ -192,6 +194,9 @@ int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx, unsigned char **label);
|
||||
# define RSA_PKCS1_PSS_PADDING 6
|
||||
# define RSA_PKCS1_WITH_TLS_PADDING 7
|
||||
#define RSA_PKCS1_PSS_PADDING 6
|
||||
#define RSA_PKCS1_WITH_TLS_PADDING 7
|
||||
|
||||
+/* internal RSA_ only */
|
||||
+# define RSA_PKCS1_NO_IMPLICIT_REJECT_PADDING 8
|
||||
+#define RSA_PKCS1_NO_IMPLICIT_REJECT_PADDING 8
|
||||
+
|
||||
# define RSA_PKCS1_PADDING_SIZE 11
|
||||
#define RSA_PKCS1_PADDING_SIZE 11
|
||||
|
||||
# define RSA_set_app_data(s,arg) RSA_set_ex_data(s,0,arg)
|
||||
#define RSA_set_app_data(s, arg) RSA_set_ex_data(s, 0, arg)
|
||||
diff --git a/providers/implementations/asymciphers/rsa_enc.c b/providers/implementations/asymciphers/rsa_enc.c
|
||||
index c8921acd6e..11a91e62b1 100644
|
||||
index 799357f3..1e74150 100644
|
||||
--- a/providers/implementations/asymciphers/rsa_enc.c
|
||||
+++ b/providers/implementations/asymciphers/rsa_enc.c
|
||||
@@ -75,6 +75,8 @@ typedef struct {
|
||||
@@ -288,7 +289,7 @@ index c8921acd6e..11a91e62b1 100644
|
||||
|
||||
switch (RSA_test_flags(prsactx->rsa, RSA_FLAG_TYPE_MASK)) {
|
||||
case RSA_FLAG_TYPE_RSA:
|
||||
@@ -199,6 +202,7 @@ static int rsa_decrypt(void *vprsactx, unsigned char *out, size_t *outlen,
|
||||
@@ -203,6 +206,7 @@ static int rsa_decrypt(void *vprsactx, unsigned char *out, size_t *outlen,
|
||||
{
|
||||
PROV_RSA_CTX *prsactx = (PROV_RSA_CTX *)vprsactx;
|
||||
int ret;
|
||||
@@ -296,12 +297,12 @@ index c8921acd6e..11a91e62b1 100644
|
||||
size_t len = RSA_size(prsactx->rsa);
|
||||
|
||||
if (!ossl_prov_is_running())
|
||||
@@ -276,8 +280,12 @@ static int rsa_decrypt(void *vprsactx, unsigned char *out, size_t *outlen,
|
||||
@@ -280,8 +284,12 @@ static int rsa_decrypt(void *vprsactx, unsigned char *out, size_t *outlen,
|
||||
}
|
||||
OPENSSL_free(tbuf);
|
||||
} else {
|
||||
- ret = RSA_private_decrypt(inlen, in, out, prsactx->rsa,
|
||||
- prsactx->pad_mode);
|
||||
- prsactx->pad_mode);
|
||||
+ if ((prsactx->implicit_rejection == 0) &&
|
||||
+ (prsactx->pad_mode == RSA_PKCS1_PADDING))
|
||||
+ pad_mode = RSA_PKCS1_NO_IMPLICIT_REJECT_PADDING;
|
||||
@@ -311,7 +312,7 @@ index c8921acd6e..11a91e62b1 100644
|
||||
}
|
||||
*outlen = constant_time_select_s(constant_time_msb_s(ret), *outlen, ret);
|
||||
ret = constant_time_select_int(constant_time_msb(ret), 0, 1);
|
||||
@@ -401,6 +409,10 @@ static int rsa_get_ctx_params(void *vprsactx, OSSL_PARAM *params)
|
||||
@@ -403,6 +411,10 @@ static int rsa_get_ctx_params(void *vprsactx, OSSL_PARAM *params)
|
||||
if (p != NULL && !OSSL_PARAM_set_uint(p, prsactx->alt_version))
|
||||
return 0;
|
||||
|
||||
@@ -322,8 +323,8 @@ index c8921acd6e..11a91e62b1 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -412,6 +424,7 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
|
||||
NULL, 0),
|
||||
@@ -414,6 +426,7 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
|
||||
NULL, 0),
|
||||
OSSL_PARAM_uint(OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION, NULL),
|
||||
OSSL_PARAM_uint(OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION, NULL),
|
||||
+ OSSL_PARAM_uint(OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION, NULL),
|
||||
@@ -353,6 +354,3 @@ index c8921acd6e..11a91e62b1 100644
|
||||
OSSL_PARAM_END
|
||||
};
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ba78f7b0599ba5bfb5032dd2664465c5b13388e3 Mon Sep 17 00:00:00 2001
|
||||
From 156a6ca5791f9c642a77270a90d5dbd0a3a7a33d Mon Sep 17 00:00:00 2001
|
||||
From: Hubert Kario <hkario@redhat.com>
|
||||
Date: Tue, 22 Nov 2022 18:25:49 +0100
|
||||
Subject: [PATCH 3/3] smime/pkcs7: disable the Bleichenbacher workaround
|
||||
Subject: [PATCH] smime/pkcs7: disable the Bleichenbacher workaround
|
||||
|
||||
CVE: CVE-2023-50781
|
||||
|
||||
@@ -14,15 +14,16 @@ Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/13817)
|
||||
|
||||
Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
|
||||
---
|
||||
crypto/pkcs7/pk7_doit.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c
|
||||
index e9de097da1..6d3124da87 100644
|
||||
index a38e8a3..d751f5e 100644
|
||||
--- a/crypto/pkcs7/pk7_doit.c
|
||||
+++ b/crypto/pkcs7/pk7_doit.c
|
||||
@@ -170,6 +170,13 @@ static int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen,
|
||||
@@ -168,6 +168,13 @@ static int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen,
|
||||
if (EVP_PKEY_decrypt_init(pctx) <= 0)
|
||||
goto err;
|
||||
|
||||
@@ -34,8 +35,5 @@ index e9de097da1..6d3124da87 100644
|
||||
+ EVP_PKEY_CTX_ctrl_str(pctx, "rsa_pkcs1_implicit_rejection", "0");
|
||||
+
|
||||
if (EVP_PKEY_decrypt(pctx, NULL, &eklen,
|
||||
ri->enc_key->data, ri->enc_key->length) <= 0)
|
||||
goto err;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
ri->enc_key->data, ri->enc_key->length)
|
||||
<= 0)
|
||||
|
||||
@@ -25,7 +25,7 @@ SRC_URI:append:class-nativesdk = " \
|
||||
file://environment.d-openssl.sh \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b"
|
||||
SRC_URI[sha256sum] = "fa5a4143b8aae18be53ef2f3caf29a2e0747430b8bc74d32d88335b94ab63072"
|
||||
|
||||
inherit lib_package multilib_header multilib_script ptest perlnative
|
||||
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
|
||||
43
meta/recipes-core/expat/expat/CVE-2026-24515.patch
Normal file
43
meta/recipes-core/expat/expat/CVE-2026-24515.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 86fc914a7acc49246d5fde0ab6ed97eb8a0f15f9 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Sun, 18 Jan 2026 17:53:37 +0100
|
||||
Subject: [PATCH] lib: Make XML_ExternalEntityParserCreate copy unknown
|
||||
encoding handler user data
|
||||
|
||||
Patch suggested by Artiphishell Inc.
|
||||
|
||||
CVE: CVE-2026-24515
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/86fc914a7acc49246d5fde0ab6ed97eb8a0f15f9]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
lib/xmlparse.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index 593cd90d..18577ee3 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -1289,6 +1289,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context,
|
||||
XML_ExternalEntityRefHandler oldExternalEntityRefHandler;
|
||||
XML_SkippedEntityHandler oldSkippedEntityHandler;
|
||||
XML_UnknownEncodingHandler oldUnknownEncodingHandler;
|
||||
+ void *oldUnknownEncodingHandlerData;
|
||||
XML_ElementDeclHandler oldElementDeclHandler;
|
||||
XML_AttlistDeclHandler oldAttlistDeclHandler;
|
||||
XML_EntityDeclHandler oldEntityDeclHandler;
|
||||
@@ -1333,6 +1334,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context,
|
||||
oldExternalEntityRefHandler = parser->m_externalEntityRefHandler;
|
||||
oldSkippedEntityHandler = parser->m_skippedEntityHandler;
|
||||
oldUnknownEncodingHandler = parser->m_unknownEncodingHandler;
|
||||
+ oldUnknownEncodingHandlerData = parser->m_unknownEncodingHandlerData;
|
||||
oldElementDeclHandler = parser->m_elementDeclHandler;
|
||||
oldAttlistDeclHandler = parser->m_attlistDeclHandler;
|
||||
oldEntityDeclHandler = parser->m_entityDeclHandler;
|
||||
@@ -1391,6 +1393,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context,
|
||||
parser->m_externalEntityRefHandler = oldExternalEntityRefHandler;
|
||||
parser->m_skippedEntityHandler = oldSkippedEntityHandler;
|
||||
parser->m_unknownEncodingHandler = oldUnknownEncodingHandler;
|
||||
+ parser->m_unknownEncodingHandlerData = oldUnknownEncodingHandlerData;
|
||||
parser->m_elementDeclHandler = oldElementDeclHandler;
|
||||
parser->m_attlistDeclHandler = oldAttlistDeclHandler;
|
||||
parser->m_entityDeclHandler = oldEntityDeclHandler;
|
||||
27
meta/recipes-core/expat/expat/CVE-2026-25210-01.patch
Normal file
27
meta/recipes-core/expat/expat/CVE-2026-25210-01.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From 7ddea353ad3795f7222441274d4d9a155b523cba Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Fernandez <matthew.fernandez@gmail.com>
|
||||
Date: Thu, 2 Oct 2025 17:15:15 -0700
|
||||
Subject: [PATCH] lib: Make a doubling more readable
|
||||
|
||||
Suggested-by: Sebastian Pipping <sebastian@pipping.org>
|
||||
|
||||
CVE: CVE-2026-25210
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/7ddea353ad3795f7222441274d4d9a155b523cba]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
lib/xmlparse.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index 8cf29257..2f9adffc 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -2977,7 +2977,7 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
|
||||
tag->name.strLen = convLen;
|
||||
break;
|
||||
}
|
||||
- bufSize = (int)(tag->bufEnd - tag->buf) << 1;
|
||||
+ bufSize = (int)(tag->bufEnd - tag->buf) * 2;
|
||||
{
|
||||
char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
|
||||
if (temp == NULL)
|
||||
37
meta/recipes-core/expat/expat/CVE-2026-25210-02.patch
Normal file
37
meta/recipes-core/expat/expat/CVE-2026-25210-02.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From 8855346359a475c022ec8c28484a76c852f144d9 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Fernandez <matthew.fernandez@gmail.com>
|
||||
Date: Thu, 2 Oct 2025 17:15:15 -0700
|
||||
Subject: [PATCH] lib: Realign a size with the `REALLOC` type signature it is
|
||||
passed into
|
||||
|
||||
Note that this implicitly assumes `tag->bufEnd >= tag->buf`, which should
|
||||
already be guaranteed true.
|
||||
|
||||
CVE: CVE-2026-25210
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/8855346359a475c022ec8c28484a76c852f144d9]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
lib/xmlparse.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index 2f9adffc..ee18a87f 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -2966,7 +2966,6 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
|
||||
const char *fromPtr = tag->rawName;
|
||||
toPtr = (XML_Char *)tag->buf;
|
||||
for (;;) {
|
||||
- int bufSize;
|
||||
int convLen;
|
||||
const enum XML_Convert_Result convert_res
|
||||
= XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
|
||||
@@ -2977,7 +2976,7 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
|
||||
tag->name.strLen = convLen;
|
||||
break;
|
||||
}
|
||||
- bufSize = (int)(tag->bufEnd - tag->buf) * 2;
|
||||
+ const size_t bufSize = (size_t)(tag->bufEnd - tag->buf) * 2;
|
||||
{
|
||||
char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
|
||||
if (temp == NULL)
|
||||
28
meta/recipes-core/expat/expat/CVE-2026-25210-03.patch
Normal file
28
meta/recipes-core/expat/expat/CVE-2026-25210-03.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 9c2d990389e6abe2e44527eeaa8b39f16fe859c7 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Fernandez <matthew.fernandez@gmail.com>
|
||||
Date: Thu, 2 Oct 2025 17:15:15 -0700
|
||||
Subject: [PATCH] lib: Introduce an integer overflow check for tag buffer
|
||||
reallocation
|
||||
|
||||
Suggested-by: Sebastian Pipping <sebastian@pipping.org>
|
||||
|
||||
CVE: CVE-2026-25210
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/commit/9c2d990389e6abe2e44527eeaa8b39f16fe859c7]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
lib/xmlparse.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index ee18a87f..d8c54c38 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -2976,6 +2976,8 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
|
||||
tag->name.strLen = convLen;
|
||||
break;
|
||||
}
|
||||
+ if (SIZE_MAX / 2 < (size_t)(tag->bufEnd - tag->buf))
|
||||
+ return XML_ERROR_NO_MEMORY;
|
||||
const size_t bufSize = (size_t)(tag->bufEnd - tag->buf) * 2;
|
||||
{
|
||||
char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
|
||||
@@ -30,6 +30,10 @@ SRC_URI = "https://github.com/libexpat/libexpat/releases/download/R_${VERSION_TA
|
||||
file://CVE-2024-45492.patch \
|
||||
file://CVE-2024-50602-01.patch \
|
||||
file://CVE-2024-50602-02.patch \
|
||||
file://CVE-2026-24515.patch \
|
||||
file://CVE-2026-25210-01.patch \
|
||||
file://CVE-2026-25210-02.patch \
|
||||
file://CVE-2026-25210-03.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/libexpat/libexpat/releases/"
|
||||
|
||||
58
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch
Normal file
58
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
From c5766cff61ffce0b8e787eae09908ac348338e5f Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Thu, 18 Dec 2025 23:12:18 +0000
|
||||
Subject: [PATCH] gbufferedinputstream: Fix a potential integer overflow in
|
||||
peek()
|
||||
|
||||
If the caller provides `offset` and `count` arguments which overflow,
|
||||
their sum will overflow and could lead to `memcpy()` reading out more
|
||||
memory than expected.
|
||||
|
||||
Spotted by Codean Labs.
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
|
||||
Fixes: #3851
|
||||
|
||||
CVE: CVE-2026-0988
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/c5766cff61ffce0b8e787eae09908ac348338e5f]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
gio/gbufferedinputstream.c | 2 +-
|
||||
gio/tests/buffered-input-stream.c | 10 ++++++++++
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c
|
||||
index 9e6bacc62..56d656be0 100644
|
||||
--- a/gio/gbufferedinputstream.c
|
||||
+++ b/gio/gbufferedinputstream.c
|
||||
@@ -588,7 +588,7 @@ g_buffered_input_stream_peek (GBufferedInputStream *stream,
|
||||
|
||||
available = g_buffered_input_stream_get_available (stream);
|
||||
|
||||
- if (offset > available)
|
||||
+ if (offset > available || offset > G_MAXSIZE - count)
|
||||
return 0;
|
||||
|
||||
end = MIN (offset + count, available);
|
||||
diff --git a/gio/tests/buffered-input-stream.c b/gio/tests/buffered-input-stream.c
|
||||
index a1af4eeff..2b2a0d9aa 100644
|
||||
--- a/gio/tests/buffered-input-stream.c
|
||||
+++ b/gio/tests/buffered-input-stream.c
|
||||
@@ -58,6 +58,16 @@ test_peek (void)
|
||||
g_assert_cmpint (npeek, ==, 0);
|
||||
g_free (buffer);
|
||||
|
||||
+ buffer = g_new0 (char, 64);
|
||||
+ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in), buffer, 8, 0);
|
||||
+ g_assert_cmpint (npeek, ==, 0);
|
||||
+ g_free (buffer);
|
||||
+
|
||||
+ buffer = g_new0 (char, 64);
|
||||
+ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in), buffer, 5, G_MAXSIZE);
|
||||
+ g_assert_cmpint (npeek, ==, 0);
|
||||
+ g_free (buffer);
|
||||
+
|
||||
g_object_unref (in);
|
||||
g_object_unref (base);
|
||||
}
|
||||
48
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1484-01.patch
Normal file
48
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1484-01.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From 5ba0ed9ab2c28294713bdc56a8744ff0a446b59c Mon Sep 17 00:00:00 2001
|
||||
From: Marco Trevisan <mail@3v1n0.net>
|
||||
Date: Fri, 23 Jan 2026 18:48:30 +0100
|
||||
Subject: [PATCH] gbase64: Use gsize to prevent potential overflow
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Both g_base64_encode_step() and g_base64_encode_close() return gsize
|
||||
values, but these are summed to an int value.
|
||||
|
||||
If the sum of these returned values is bigger than MAXINT, we overflow
|
||||
while doing the null byte write.
|
||||
|
||||
Spotted by treeplus.
|
||||
Thanks to the Sovereign Tech Resilience programme from the Sovereign
|
||||
Tech Agency.
|
||||
|
||||
ID: #YWH-PGM9867-168
|
||||
Closes: #3870
|
||||
|
||||
|
||||
(cherry picked from commit 6845f7776982849a2be1d8c9b0495e389092bff2)
|
||||
|
||||
Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
|
||||
|
||||
CVE: CVE-2026-1484
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/5ba0ed9ab2c28294713bdc56a8744ff0a446b59c]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gbase64.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/glib/gbase64.c b/glib/gbase64.c
|
||||
index 2ea4a4ef4..214b48911 100644
|
||||
--- a/glib/gbase64.c
|
||||
+++ b/glib/gbase64.c
|
||||
@@ -262,8 +262,9 @@ g_base64_encode (const guchar *data,
|
||||
gsize len)
|
||||
{
|
||||
gchar *out;
|
||||
- gint state = 0, outlen;
|
||||
+ gint state = 0;
|
||||
gint save = 0;
|
||||
+ gsize outlen;
|
||||
|
||||
g_return_val_if_fail (data != NULL || len == 0, NULL);
|
||||
|
||||
45
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1484-02.patch
Normal file
45
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1484-02.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From 25429bd0b22222d6986d000d62b44eebf490837d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
Date: Wed, 21 Jan 2026 20:09:44 +0100
|
||||
Subject: [PATCH] gbase64: Ensure that the out value is within allocated size
|
||||
|
||||
We do not want to deference or write to it
|
||||
|
||||
Related to: #3870
|
||||
|
||||
CVE: CVE-2026-1484
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/25429bd0b22222d6986d000d62b44eebf490837d]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gbase64.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/glib/gbase64.c b/glib/gbase64.c
|
||||
index 214b48911..0141b3b07 100644
|
||||
--- a/glib/gbase64.c
|
||||
+++ b/glib/gbase64.c
|
||||
@@ -265,6 +265,7 @@ g_base64_encode (const guchar *data,
|
||||
gint state = 0;
|
||||
gint save = 0;
|
||||
gsize outlen;
|
||||
+ gsize allocsize;
|
||||
|
||||
g_return_val_if_fail (data != NULL || len == 0, NULL);
|
||||
|
||||
@@ -272,10 +273,15 @@ g_base64_encode (const guchar *data,
|
||||
+1 is needed for trailing \0, also check for unlikely integer overflow */
|
||||
g_return_val_if_fail (len < ((G_MAXSIZE - 1) / 4 - 1) * 3, NULL);
|
||||
|
||||
- out = g_malloc ((len / 3 + 1) * 4 + 1);
|
||||
+ allocsize = (len / 3 + 1) * 4 + 1;
|
||||
+ out = g_malloc (allocsize);
|
||||
|
||||
outlen = g_base64_encode_step (data, len, FALSE, out, &state, &save);
|
||||
+ g_assert (outlen <= allocsize);
|
||||
+
|
||||
outlen += g_base64_encode_close (FALSE, out + outlen, &state, &save);
|
||||
+ g_assert (outlen <= allocsize);
|
||||
+
|
||||
out[outlen] = '\0';
|
||||
|
||||
return (gchar *) out;
|
||||
44
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1485.patch
Normal file
44
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1485.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
From ee5acb2cefc643450509374da2600cd3bf49a109 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Trevisan <mail@3v1n0.net>
|
||||
Date: Fri, 23 Jan 2026 19:05:44 +0100
|
||||
Subject: [PATCH] gio/gcontenttype-fdo: Do not overflow if header is longer
|
||||
than MAXINT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In case the header size is longer than MAXINT we may read and write to
|
||||
invalid locations
|
||||
|
||||
Spotted by treeplus.
|
||||
Thanks to the Sovereign Tech Resilience programme from the Sovereign
|
||||
Tech Agency.
|
||||
|
||||
ID: #YWH-PGM9867-169
|
||||
Closes: #3871
|
||||
|
||||
|
||||
(cherry picked from commit aacda5b07141b944408c79e83bcbed3b2e1e6e45)
|
||||
|
||||
Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
|
||||
|
||||
CVE: CVE-2026-1485
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/ee5acb2cefc643450509374da2600cd3bf49a109]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
gio/gcontenttype.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gio/gcontenttype.c b/gio/gcontenttype.c
|
||||
index 230cea182..11323973a 100644
|
||||
--- a/gio/gcontenttype.c
|
||||
+++ b/gio/gcontenttype.c
|
||||
@@ -1013,7 +1013,7 @@ tree_match_free (TreeMatch *match)
|
||||
static TreeMatch *
|
||||
parse_header (gchar *line)
|
||||
{
|
||||
- gint len;
|
||||
+ size_t len;
|
||||
gchar *s;
|
||||
TreeMatch *match;
|
||||
|
||||
42
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-01.patch
Normal file
42
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-01.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 662aa569efa65eaa4672ab0671eb8533a354cd89 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
Date: Wed, 21 Jan 2026 22:00:17 +0100
|
||||
Subject: [PATCH] guniprop: Use size_t for output_marks length
|
||||
|
||||
The input string length may overflow, and this would lead to wrong
|
||||
behavior and invalid writes.
|
||||
|
||||
Spotted by treeplus.
|
||||
Thanks to the Sovereign Tech Resilience programme from the Sovereign
|
||||
Tech Agency.
|
||||
|
||||
ID: #YWH-PGM9867-171
|
||||
Closes: #3872
|
||||
|
||||
CVE: CVE-2026-1489
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/662aa569efa65eaa4672ab0671eb8533a354cd89]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/guniprop.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/glib/guniprop.c b/glib/guniprop.c
|
||||
index fe0033fd6..1a0cc6408 100644
|
||||
--- a/glib/guniprop.c
|
||||
+++ b/glib/guniprop.c
|
||||
@@ -753,13 +753,13 @@ get_locale_type (void)
|
||||
return LOCALE_NORMAL;
|
||||
}
|
||||
|
||||
-static gint
|
||||
+static size_t
|
||||
output_marks (const char **p_inout,
|
||||
char *out_buffer,
|
||||
gboolean remove_dot)
|
||||
{
|
||||
const char *p = *p_inout;
|
||||
- gint len = 0;
|
||||
+ size_t len = 0;
|
||||
|
||||
while (*p)
|
||||
{
|
||||
30
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-02.patch
Normal file
30
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-02.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From 58356619525a1d565df8cc348e9784716f020f2f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
Date: Wed, 21 Jan 2026 22:01:49 +0100
|
||||
Subject: [PATCH] guniprop: Do not convert size_t to gint
|
||||
|
||||
We were correctly using size_t in output_special_case() since commit
|
||||
362f92b69, but then we converted the value back to int
|
||||
|
||||
Related to: #3872
|
||||
|
||||
CVE: CVE-2026-1489
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/58356619525a1d565df8cc348e9784716f020f2f]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/guniprop.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/glib/guniprop.c b/glib/guniprop.c
|
||||
index 1a0cc6408..fe50a287c 100644
|
||||
--- a/glib/guniprop.c
|
||||
+++ b/glib/guniprop.c
|
||||
@@ -779,7 +779,7 @@ output_marks (const char **p_inout,
|
||||
return len;
|
||||
}
|
||||
|
||||
-static gint
|
||||
+static size_t
|
||||
output_special_case (gchar *out_buffer,
|
||||
int offset,
|
||||
int type,
|
||||
290
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-03.patch
Normal file
290
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-03.patch
Normal file
@@ -0,0 +1,290 @@
|
||||
From 170dc8c4068db4c4cbf63c7d27192e230436da21 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
Date: Wed, 21 Jan 2026 22:04:22 +0100
|
||||
Subject: [PATCH] guniprop: Ensure we do not overflow size in
|
||||
g_utf8_{strdown,gstrup}()
|
||||
|
||||
While this is technically not a security issue, when repeatedly adding
|
||||
to a size_t value, we can overflow and start from 0.
|
||||
|
||||
Now, while being unlikely, technically an utf8 lower or upper string can
|
||||
have a longer size than the input value, and if the output string is
|
||||
bigger than G_MAXSIZE we'd end up cutting it silently.
|
||||
|
||||
Let's instead assert each time we increase the output length
|
||||
|
||||
CVE: CVE-2026-1489
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/170dc8c4068db4c4cbf63c7d27192e230436da21]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/guniprop.c | 109 +++++++++++++++++++++++++++++++-----------------
|
||||
1 file changed, 70 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/glib/guniprop.c b/glib/guniprop.c
|
||||
index fe50a287c..86020b6e0 100644
|
||||
--- a/glib/guniprop.c
|
||||
+++ b/glib/guniprop.c
|
||||
@@ -753,14 +753,36 @@ get_locale_type (void)
|
||||
return LOCALE_NORMAL;
|
||||
}
|
||||
|
||||
-static size_t
|
||||
-output_marks (const char **p_inout,
|
||||
- char *out_buffer,
|
||||
- gboolean remove_dot)
|
||||
+static inline void
|
||||
+increase_size (size_t *sizeptr, size_t add)
|
||||
+{
|
||||
+ g_assert (G_MAXSIZE - *(sizeptr) >= add);
|
||||
+ *(sizeptr) += add;
|
||||
+}
|
||||
+
|
||||
+static inline void
|
||||
+append_utf8_char_to_buffer (gunichar c,
|
||||
+ char *out_buffer,
|
||||
+ size_t *in_out_len)
|
||||
+{
|
||||
+ gint utf8_len;
|
||||
+ char *buffer;
|
||||
+
|
||||
+ buffer = out_buffer ? out_buffer + *(in_out_len) : NULL;
|
||||
+ utf8_len = g_unichar_to_utf8 (c, buffer);
|
||||
+
|
||||
+ g_assert (utf8_len >= 0);
|
||||
+ increase_size (in_out_len, utf8_len);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+append_mark (const char **p_inout,
|
||||
+ char *out_buffer,
|
||||
+ size_t *in_out_len,
|
||||
+ gboolean remove_dot)
|
||||
{
|
||||
const char *p = *p_inout;
|
||||
- size_t len = 0;
|
||||
-
|
||||
+
|
||||
while (*p)
|
||||
{
|
||||
gunichar c = g_utf8_get_char (p);
|
||||
@@ -768,7 +790,7 @@ output_marks (const char **p_inout,
|
||||
if (ISMARK (TYPE (c)))
|
||||
{
|
||||
if (!remove_dot || c != 0x307 /* COMBINING DOT ABOVE */)
|
||||
- len += g_unichar_to_utf8 (c, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (c, out_buffer, in_out_len);
|
||||
p = g_utf8_next_char (p);
|
||||
}
|
||||
else
|
||||
@@ -776,14 +798,14 @@ output_marks (const char **p_inout,
|
||||
}
|
||||
|
||||
*p_inout = p;
|
||||
- return len;
|
||||
}
|
||||
|
||||
-static size_t
|
||||
-output_special_case (gchar *out_buffer,
|
||||
- int offset,
|
||||
- int type,
|
||||
- int which)
|
||||
+static void
|
||||
+append_special_case (char *out_buffer,
|
||||
+ size_t *in_out_len,
|
||||
+ int offset,
|
||||
+ int type,
|
||||
+ int which)
|
||||
{
|
||||
const gchar *p = special_case_table + offset;
|
||||
gint len;
|
||||
@@ -795,10 +817,12 @@ output_special_case (gchar *out_buffer,
|
||||
p += strlen (p) + 1;
|
||||
|
||||
len = strlen (p);
|
||||
- if (out_buffer)
|
||||
- memcpy (out_buffer, p, len);
|
||||
+ g_assert (len < G_MAXSIZE - *in_out_len);
|
||||
|
||||
- return len;
|
||||
+ if (out_buffer)
|
||||
+ memcpy (out_buffer + *in_out_len, p, len);
|
||||
+
|
||||
+ increase_size (in_out_len, len);
|
||||
}
|
||||
|
||||
static gsize
|
||||
@@ -839,11 +863,13 @@ real_toupper (const gchar *str,
|
||||
decomp_len = g_unichar_fully_decompose (c, FALSE, decomp, G_N_ELEMENTS (decomp));
|
||||
for (i=0; i < decomp_len; i++)
|
||||
{
|
||||
+
|
||||
if (decomp[i] != 0x307 /* COMBINING DOT ABOVE */)
|
||||
- len += g_unichar_to_utf8 (g_unichar_toupper (decomp[i]), out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (g_unichar_toupper (decomp[i]),
|
||||
+ out_buffer, &len);
|
||||
}
|
||||
-
|
||||
- len += output_marks (&p, out_buffer ? out_buffer + len : NULL, TRUE);
|
||||
+
|
||||
+ append_mark (&p, out_buffer, &len, TRUE);
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -856,17 +882,17 @@ real_toupper (const gchar *str,
|
||||
if (locale_type == LOCALE_TURKIC && c == 'i')
|
||||
{
|
||||
/* i => LATIN CAPITAL LETTER I WITH DOT ABOVE */
|
||||
- len += g_unichar_to_utf8 (0x130, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x130, out_buffer, &len);
|
||||
}
|
||||
else if (c == 0x0345) /* COMBINING GREEK YPOGEGRAMMENI */
|
||||
{
|
||||
/* Nasty, need to move it after other combining marks .. this would go away if
|
||||
* we normalized first.
|
||||
*/
|
||||
- len += output_marks (&p, out_buffer ? out_buffer + len : NULL, FALSE);
|
||||
+ append_mark (&p, out_buffer, &len, TRUE);
|
||||
|
||||
/* And output as GREEK CAPITAL LETTER IOTA */
|
||||
- len += g_unichar_to_utf8 (0x399, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x399, out_buffer, &len);
|
||||
}
|
||||
else if (IS (t,
|
||||
OR (G_UNICODE_LOWERCASE_LETTER,
|
||||
@@ -877,8 +903,8 @@ real_toupper (const gchar *str,
|
||||
|
||||
if (val >= 0x1000000)
|
||||
{
|
||||
- len += output_special_case (out_buffer ? out_buffer + len : NULL, val - 0x1000000, t,
|
||||
- t == G_UNICODE_LOWERCASE_LETTER ? 0 : 1);
|
||||
+ append_special_case (out_buffer, &len, val - 0x1000000, t,
|
||||
+ t == G_UNICODE_LOWERCASE_LETTER ? 0 : 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -898,7 +924,7 @@ real_toupper (const gchar *str,
|
||||
/* Some lowercase letters, e.g., U+000AA, FEMININE ORDINAL INDICATOR,
|
||||
* do not have an uppercase equivalent, in which case val will be
|
||||
* zero. */
|
||||
- len += g_unichar_to_utf8 (val ? val : c, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (val ? val : c, out_buffer, &len);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -908,7 +934,7 @@ real_toupper (const gchar *str,
|
||||
if (out_buffer)
|
||||
memcpy (out_buffer + len, last, char_len);
|
||||
|
||||
- len += char_len;
|
||||
+ increase_size (&len, char_len);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -946,6 +972,8 @@ g_utf8_strup (const gchar *str,
|
||||
* We use a two pass approach to keep memory management simple
|
||||
*/
|
||||
result_len = real_toupper (str, len, NULL, locale_type);
|
||||
+ g_assert (result_len < G_MAXSIZE);
|
||||
+
|
||||
result = g_malloc (result_len + 1);
|
||||
real_toupper (str, len, result, locale_type);
|
||||
result[result_len] = '\0';
|
||||
@@ -1003,14 +1031,15 @@ real_tolower (const gchar *str,
|
||||
{
|
||||
/* I + COMBINING DOT ABOVE => i (U+0069)
|
||||
* LATIN CAPITAL LETTER I WITH DOT ABOVE => i (U+0069) */
|
||||
- len += g_unichar_to_utf8 (0x0069, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x0069, out_buffer, &len);
|
||||
+
|
||||
if (combining_dot)
|
||||
p = g_utf8_next_char (p);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* I => LATIN SMALL LETTER DOTLESS I */
|
||||
- len += g_unichar_to_utf8 (0x131, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x131, out_buffer, &len);
|
||||
}
|
||||
}
|
||||
/* Introduce an explicit dot above when lowercasing capital I's and J's
|
||||
@@ -1018,19 +1047,19 @@ real_tolower (const gchar *str,
|
||||
else if (locale_type == LOCALE_LITHUANIAN &&
|
||||
(c == 0x00cc || c == 0x00cd || c == 0x0128))
|
||||
{
|
||||
- len += g_unichar_to_utf8 (0x0069, out_buffer ? out_buffer + len : NULL);
|
||||
- len += g_unichar_to_utf8 (0x0307, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x0069, out_buffer, &len);
|
||||
+ append_utf8_char_to_buffer (0x0307, out_buffer, &len);
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 0x00cc:
|
||||
- len += g_unichar_to_utf8 (0x0300, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x0300, out_buffer, &len);
|
||||
break;
|
||||
case 0x00cd:
|
||||
- len += g_unichar_to_utf8 (0x0301, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x0301, out_buffer, &len);
|
||||
break;
|
||||
case 0x0128:
|
||||
- len += g_unichar_to_utf8 (0x0303, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (0x0303, out_buffer, &len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1039,8 +1068,8 @@ real_tolower (const gchar *str,
|
||||
c == 'J' || c == G_UNICHAR_FULLWIDTH_J || c == 0x012e) &&
|
||||
has_more_above (p))
|
||||
{
|
||||
- len += g_unichar_to_utf8 (g_unichar_tolower (c), out_buffer ? out_buffer + len : NULL);
|
||||
- len += g_unichar_to_utf8 (0x0307, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (g_unichar_tolower (c), out_buffer, &len);
|
||||
+ append_utf8_char_to_buffer (0x0307, out_buffer, &len);
|
||||
}
|
||||
else if (c == 0x03A3) /* GREEK CAPITAL LETTER SIGMA */
|
||||
{
|
||||
@@ -1063,7 +1092,7 @@ real_tolower (const gchar *str,
|
||||
else
|
||||
val = 0x3c2; /* GREEK SMALL FINAL SIGMA */
|
||||
|
||||
- len += g_unichar_to_utf8 (val, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (val, out_buffer, &len);
|
||||
}
|
||||
else if (IS (t,
|
||||
OR (G_UNICODE_UPPERCASE_LETTER,
|
||||
@@ -1074,7 +1103,7 @@ real_tolower (const gchar *str,
|
||||
|
||||
if (val >= 0x1000000)
|
||||
{
|
||||
- len += output_special_case (out_buffer ? out_buffer + len : NULL, val - 0x1000000, t, 0);
|
||||
+ append_special_case (out_buffer, &len, val - 0x1000000, t, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1093,7 +1122,7 @@ real_tolower (const gchar *str,
|
||||
|
||||
/* Not all uppercase letters are guaranteed to have a lowercase
|
||||
* equivalent. If this is the case, val will be zero. */
|
||||
- len += g_unichar_to_utf8 (val ? val : c, out_buffer ? out_buffer + len : NULL);
|
||||
+ append_utf8_char_to_buffer (val ? val : c, out_buffer, &len);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1103,7 +1132,7 @@ real_tolower (const gchar *str,
|
||||
if (out_buffer)
|
||||
memcpy (out_buffer + len, last, char_len);
|
||||
|
||||
- len += char_len;
|
||||
+ increase_size (&len, char_len);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1140,6 +1169,8 @@ g_utf8_strdown (const gchar *str,
|
||||
* We use a two pass approach to keep memory management simple
|
||||
*/
|
||||
result_len = real_tolower (str, len, NULL, locale_type);
|
||||
+ g_assert (result_len < G_MAXSIZE);
|
||||
+
|
||||
result = g_malloc (result_len + 1);
|
||||
real_tolower (str, len, result, locale_type);
|
||||
result[result_len] = '\0';
|
||||
68
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-04.patch
Normal file
68
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-1489-04.patch
Normal file
@@ -0,0 +1,68 @@
|
||||
From b96966058f4291db8970ced70ee22103e63679e5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
Date: Fri, 23 Jan 2026 17:39:34 +0100
|
||||
Subject: [PATCH] glib/tests/unicode: Add test debug information when parsing
|
||||
input files
|
||||
|
||||
On case of failures makes it easier to understand on what line of the
|
||||
source file we're at, as it might not be clear for non-ascii chars
|
||||
|
||||
CVE: CVE-2026-1489
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/b96966058f4291db8970ced70ee22103e63679e5]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/tests/unicode.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/glib/tests/unicode.c b/glib/tests/unicode.c
|
||||
index 90b5a98b8..44d1083dd 100644
|
||||
--- a/glib/tests/unicode.c
|
||||
+++ b/glib/tests/unicode.c
|
||||
@@ -546,6 +546,7 @@ test_casemap_and_casefold (void)
|
||||
const char *locale;
|
||||
const char *test;
|
||||
const char *expected;
|
||||
+ size_t line = 0;
|
||||
char *convert;
|
||||
char *current_locale = setlocale (LC_CTYPE, NULL);
|
||||
|
||||
@@ -555,6 +556,7 @@ test_casemap_and_casefold (void)
|
||||
|
||||
while (fgets (buffer, sizeof (buffer), infile))
|
||||
{
|
||||
+ line++;
|
||||
if (buffer[0] == '#')
|
||||
continue;
|
||||
|
||||
@@ -588,6 +590,9 @@ test_casemap_and_casefold (void)
|
||||
|
||||
convert = g_utf8_strup (test, -1);
|
||||
expected = strings[4][0] ? strings[4] : test;
|
||||
+ g_test_message ("Converting '%s' => '%s' (line %" G_GSIZE_FORMAT ")",
|
||||
+ test, expected, line);
|
||||
+
|
||||
g_assert_cmpstr (convert, ==, expected);
|
||||
g_free (convert);
|
||||
|
||||
@@ -607,9 +612,11 @@ test_casemap_and_casefold (void)
|
||||
|
||||
infile = fopen (filename, "r");
|
||||
g_assert (infile != NULL);
|
||||
+ line = 0;
|
||||
|
||||
while (fgets (buffer, sizeof (buffer), infile))
|
||||
{
|
||||
+ line++;
|
||||
if (buffer[0] == '#')
|
||||
continue;
|
||||
|
||||
@@ -619,6 +626,9 @@ test_casemap_and_casefold (void)
|
||||
test = strings[0];
|
||||
|
||||
convert = g_utf8_casefold (test, -1);
|
||||
+ g_test_message ("Converting '%s' => '%s' (line %" G_GSIZE_FORMAT ")",
|
||||
+ test, strings[1], line);
|
||||
+
|
||||
g_assert_cmpstr (convert, ==, strings[1]);
|
||||
g_free (convert);
|
||||
|
||||
@@ -70,6 +70,14 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
|
||||
file://CVE-2025-14087-02.patch \
|
||||
file://CVE-2025-14087-03.patch \
|
||||
file://CVE-2025-14512.patch \
|
||||
file://CVE-2026-0988.patch \
|
||||
file://CVE-2026-1484-01.patch \
|
||||
file://CVE-2026-1484-02.patch \
|
||||
file://CVE-2026-1485.patch \
|
||||
file://CVE-2026-1489-01.patch \
|
||||
file://CVE-2026-1489-02.patch \
|
||||
file://CVE-2026-1489-03.patch \
|
||||
file://CVE-2026-1489-04.patch \
|
||||
"
|
||||
SRC_URI:append:class-native = " file://relocate-modules.patch"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SRCBRANCH ?= "release/2.35/master"
|
||||
PV = "2.35"
|
||||
SRCREV_glibc ?= "4e50046821f05ada5f14c76803845125ddb3ed7d"
|
||||
SRCREV_glibc ?= "bb59339d02faebac534a87eea50c83c948f35b77"
|
||||
SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87"
|
||||
|
||||
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
|
||||
|
||||
@@ -27,7 +27,8 @@ CVE_CHECK_IGNORE += "CVE-2023-4527"
|
||||
CVE_CHECK_IGNORE += " \
|
||||
CVE-2023-0687 CVE-2023-4813 CVE-2023-4806 CVE-2023-4911 CVE-2023-5156 \
|
||||
CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602 \
|
||||
CVE-2025-0395 CVE-2025-4802 CVE-2025-8058 \
|
||||
CVE-2025-0395 CVE-2025-4802 CVE-2025-8058 CVE-2025-15281 \
|
||||
CVE-2026-0861 CVE-2026-0915 \
|
||||
"
|
||||
|
||||
DEPENDS += "gperf-native bison-native"
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "71ae82a596d3abee349327f46260920bc1a4aca9"
|
||||
SRCREV ?= "974e67818b583f5638c389e7bce662633e09a1bf"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=kirkstone \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
76
meta/recipes-core/libxml/libxml2/CVE-2026-0990.patch
Normal file
76
meta/recipes-core/libxml/libxml2/CVE-2026-0990.patch
Normal file
@@ -0,0 +1,76 @@
|
||||
From 1961208e958ca22f80a0b4e4c9d71cfa050aa982 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Wed, 17 Dec 2025 15:24:08 +0100
|
||||
Subject: [PATCH] catalog: prevent inf recursion in xmlCatalogXMLResolveURI
|
||||
|
||||
Fix https://gitlab.gnome.org/GNOME/libxml2/-/issues/1018
|
||||
|
||||
CVE: CVE-2026-0989
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/1961208e958ca22f80a0b4e4c9d71cfa050aa982]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
catalog.c | 31 +++++++++++++++++++++++--------
|
||||
1 file changed, 23 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/catalog.c b/catalog.c
|
||||
index 76c063a8..46b877e6 100644
|
||||
--- a/catalog.c
|
||||
+++ b/catalog.c
|
||||
@@ -2099,12 +2099,21 @@ static xmlChar *
|
||||
xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
|
||||
xmlChar *ret = NULL;
|
||||
xmlChar *urnID = NULL;
|
||||
+ xmlCatalogEntryPtr cur = NULL;
|
||||
|
||||
if (catal == NULL)
|
||||
return(NULL);
|
||||
if (URI == NULL)
|
||||
return(NULL);
|
||||
|
||||
+ if (catal->depth > MAX_CATAL_DEPTH) {
|
||||
+ xmlCatalogErr(catal, NULL, XML_CATALOG_RECURSION,
|
||||
+ "Detected recursion in catalog %s\n",
|
||||
+ catal->name, NULL, NULL);
|
||||
+ return(NULL);
|
||||
+ }
|
||||
+ catal->depth++;
|
||||
+
|
||||
if (!xmlStrncmp(URI, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) {
|
||||
urnID = xmlCatalogUnWrapURN(URI);
|
||||
if (xmlDebugCatalogs) {
|
||||
@@ -2118,21 +2127,27 @@ xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
|
||||
ret = xmlCatalogListXMLResolve(catal, urnID, NULL);
|
||||
if (urnID != NULL)
|
||||
xmlFree(urnID);
|
||||
+ catal->depth--;
|
||||
return(ret);
|
||||
}
|
||||
- while (catal != NULL) {
|
||||
- if (catal->type == XML_CATA_CATALOG) {
|
||||
- if (catal->children == NULL) {
|
||||
- xmlFetchXMLCatalogFile(catal);
|
||||
+ cur = catal;
|
||||
+ while (cur != NULL) {
|
||||
+ if (cur->type == XML_CATA_CATALOG) {
|
||||
+ if (cur->children == NULL) {
|
||||
+ xmlFetchXMLCatalogFile(cur);
|
||||
}
|
||||
- if (catal->children != NULL) {
|
||||
- ret = xmlCatalogXMLResolveURI(catal->children, URI);
|
||||
- if (ret != NULL)
|
||||
+ if (cur->children != NULL) {
|
||||
+ ret = xmlCatalogXMLResolveURI(cur->children, URI);
|
||||
+ if (ret != NULL) {
|
||||
+ catal->depth--;
|
||||
return(ret);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
- catal = catal->next;
|
||||
+ cur = cur->next;
|
||||
}
|
||||
+
|
||||
+ catal->depth--;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
49
meta/recipes-core/libxml/libxml2/CVE-2026-0992-01.patch
Normal file
49
meta/recipes-core/libxml/libxml2/CVE-2026-0992-01.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From f75abfcaa419a740a3191e56c60400f3ff18988d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Fri, 19 Dec 2025 11:02:18 +0100
|
||||
Subject: [PATCH] catalog: Ignore repeated nextCatalog entries
|
||||
|
||||
This patch makes the catalog parsing to ignore repeated entries of
|
||||
nextCatalog with the same value.
|
||||
|
||||
Fix https://gitlab.gnome.org/GNOME/libxml2/-/issues/1019
|
||||
|
||||
CVE: CVE-2026-0989
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/f75abfcaa419a740a3191e56c60400f3ff18988d]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
catalog.c | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/catalog.c b/catalog.c
|
||||
index 46b877e6..fa6d77ca 100644
|
||||
--- a/catalog.c
|
||||
+++ b/catalog.c
|
||||
@@ -1279,9 +1279,27 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
|
||||
BAD_CAST "delegateURI", BAD_CAST "uriStartString",
|
||||
BAD_CAST "catalog", prefer, cgroup);
|
||||
} else if (xmlStrEqual(cur->name, BAD_CAST "nextCatalog")) {
|
||||
+ xmlCatalogEntryPtr prev = parent->children;
|
||||
+
|
||||
entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_NEXT_CATALOG,
|
||||
BAD_CAST "nextCatalog", NULL,
|
||||
BAD_CAST "catalog", prefer, cgroup);
|
||||
+ /* Avoid duplication of nextCatalog */
|
||||
+ while (prev != NULL) {
|
||||
+ if ((prev->type == XML_CATA_NEXT_CATALOG) &&
|
||||
+ (xmlStrEqual (prev->URL, entry->URL)) &&
|
||||
+ (xmlStrEqual (prev->value, entry->value)) &&
|
||||
+ (prev->prefer == entry->prefer) &&
|
||||
+ (prev->group == entry->group)) {
|
||||
+ if (xmlDebugCatalogs)
|
||||
+ fprintf(stderr,
|
||||
+ "Ignoring repeated nextCatalog %s\n", entry->URL);
|
||||
+ xmlFreeCatalogEntry(entry, NULL);
|
||||
+ entry = NULL;
|
||||
+ break;
|
||||
+ }
|
||||
+ prev = prev->next;
|
||||
+ }
|
||||
}
|
||||
if (entry != NULL) {
|
||||
if (parent != NULL) {
|
||||
325
meta/recipes-core/libxml/libxml2/CVE-2026-0992-02.patch
Normal file
325
meta/recipes-core/libxml/libxml2/CVE-2026-0992-02.patch
Normal file
@@ -0,0 +1,325 @@
|
||||
From f8399e62a31095bf1ced01827c33f9b29494046f Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
|
||||
Date: Fri, 19 Dec 2025 12:27:54 +0100
|
||||
Subject: [PATCH] testcatalog: Add new tests for catalog.c
|
||||
|
||||
Adds a new test program to run specific tests related to catalog
|
||||
parsing.
|
||||
|
||||
This initial version includes a couple of tests, the first one to check
|
||||
the infinite recursion detection related to:
|
||||
https://gitlab.gnome.org/GNOME/libxml2/-/issues/1018.
|
||||
|
||||
The second one tests the nextCatalog element repeated parsing, related
|
||||
to:
|
||||
https://gitlab.gnome.org/GNOME/libxml2/-/issues/1019
|
||||
https://gitlab.gnome.org/GNOME/libxml2/-/issues/1040
|
||||
|
||||
CVE: CVE-2026-0992
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/f8399e62a31095bf1ced01827c33f9b29494046f]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
CMakeLists.txt | 2 +
|
||||
Makefile.am | 8 ++-
|
||||
catalog.c | 63 +++++++++++-----
|
||||
include/libxml/catalog.h | 2 +
|
||||
test/catalogs/catalog-recursive.xml | 3 +
|
||||
test/catalogs/repeated-next-catalog.xml | 10 +++
|
||||
testcatalog.c | 96 +++++++++++++++++++++++++
|
||||
7 files changed, 164 insertions(+), 20 deletions(-)
|
||||
create mode 100644 test/catalogs/catalog-recursive.xml
|
||||
create mode 100644 test/catalogs/repeated-next-catalog.xml
|
||||
create mode 100644 testcatalog.c
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 163661f8..7d5702df 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -555,6 +555,7 @@ if(LIBXML2_WITH_TESTS)
|
||||
testapi
|
||||
testAutomata
|
||||
testC14N
|
||||
+ testcatalog
|
||||
testchar
|
||||
testdict
|
||||
testHTML
|
||||
@@ -579,6 +580,7 @@ if(LIBXML2_WITH_TESTS)
|
||||
if(NOT WIN32)
|
||||
add_test(NAME testapi COMMAND testapi)
|
||||
endif()
|
||||
+ add_test(NAME testcatalog COMMAND testcatalog)
|
||||
add_test(NAME testchar COMMAND testchar)
|
||||
add_test(NAME testdict COMMAND testdict)
|
||||
add_test(NAME testrecurse COMMAND testrecurse WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index c51dfd8e..c794eac8 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -12,7 +12,7 @@ AM_CFLAGS = $(EXTRA_CFLAGS) $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS)
|
||||
|
||||
check_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
|
||||
testThreads testC14N testAutomata testRegexp \
|
||||
- testReader testapi testModule runtest runsuite testchar \
|
||||
+ testReader testapi testModule runtest runsuite testcatalog testchar \
|
||||
testdict runxmlconf testrecurse testlimits
|
||||
|
||||
bin_PROGRAMS = xmllint xmlcatalog
|
||||
@@ -81,6 +81,11 @@ testlimits_LDFLAGS =
|
||||
testlimits_DEPENDENCIES = $(DEPS)
|
||||
testlimits_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
|
||||
|
||||
+testcatalog_SOURCES=testcatalog.c
|
||||
+testcatalog_LDFLAGS =
|
||||
+testcatalog_DEPENDENCIES = $(DEPS)
|
||||
+testcatalog_LDADD= $(LDADDS)
|
||||
+
|
||||
testchar_SOURCES=testchar.c
|
||||
testchar_LDFLAGS =
|
||||
testchar_DEPENDENCIES = $(DEPS)
|
||||
@@ -213,6 +218,7 @@ runtests:
|
||||
$(CHECKER) ./runtest$(EXEEXT) && \
|
||||
$(CHECKER) ./testrecurse$(EXEEXT) && \
|
||||
ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT) && \
|
||||
+ $(CHECKER) ./testcatalog$(EXEEXT) \
|
||||
$(CHECKER) ./testchar$(EXEEXT) && \
|
||||
$(CHECKER) ./testdict$(EXEEXT) && \
|
||||
$(CHECKER) ./runxmlconf$(EXEEXT)
|
||||
diff --git a/catalog.c b/catalog.c
|
||||
index 401dbc14..eb889162 100644
|
||||
--- a/catalog.c
|
||||
+++ b/catalog.c
|
||||
@@ -658,43 +658,54 @@ static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog,
|
||||
}
|
||||
}
|
||||
|
||||
-static int
|
||||
-xmlDumpXMLCatalog(FILE *out, xmlCatalogEntryPtr catal) {
|
||||
- int ret;
|
||||
- xmlDocPtr doc;
|
||||
+static xmlDocPtr
|
||||
+xmlDumpXMLCatalogToDoc(xmlCatalogEntryPtr catal) {
|
||||
xmlNsPtr ns;
|
||||
xmlDtdPtr dtd;
|
||||
xmlNodePtr catalog;
|
||||
- xmlOutputBufferPtr buf;
|
||||
+ xmlDocPtr doc = xmlNewDoc(NULL);
|
||||
+ if (doc == NULL) {
|
||||
+ return(NULL);
|
||||
+ }
|
||||
|
||||
- /*
|
||||
- * Rebuild a catalog
|
||||
- */
|
||||
- doc = xmlNewDoc(NULL);
|
||||
- if (doc == NULL)
|
||||
- return(-1);
|
||||
dtd = xmlNewDtd(doc, BAD_CAST "catalog",
|
||||
- BAD_CAST "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN",
|
||||
-BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
|
||||
+ BAD_CAST "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN",
|
||||
+ BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
|
||||
|
||||
xmlAddChild((xmlNodePtr) doc, (xmlNodePtr) dtd);
|
||||
|
||||
ns = xmlNewNs(NULL, XML_CATALOGS_NAMESPACE, NULL);
|
||||
if (ns == NULL) {
|
||||
- xmlFreeDoc(doc);
|
||||
- return(-1);
|
||||
+ xmlFreeDoc(doc);
|
||||
+ return(NULL);
|
||||
}
|
||||
catalog = xmlNewDocNode(doc, ns, BAD_CAST "catalog", NULL);
|
||||
if (catalog == NULL) {
|
||||
- xmlFreeNs(ns);
|
||||
- xmlFreeDoc(doc);
|
||||
- return(-1);
|
||||
+ xmlFreeDoc(doc);
|
||||
+ xmlFreeNs(ns);
|
||||
+ return(NULL);
|
||||
}
|
||||
catalog->nsDef = ns;
|
||||
xmlAddChild((xmlNodePtr) doc, catalog);
|
||||
-
|
||||
xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL);
|
||||
|
||||
+ return(doc);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+xmlDumpXMLCatalog(FILE *out, xmlCatalogEntryPtr catal) {
|
||||
+ int ret;
|
||||
+ xmlDocPtr doc;
|
||||
+ xmlOutputBufferPtr buf;
|
||||
+
|
||||
+ /*
|
||||
+ * Rebuild a catalog
|
||||
+ */
|
||||
+ doc = xmlDumpXMLCatalogToDoc(catal);
|
||||
+ if (doc == NULL) {
|
||||
+ return(-1);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* reserialize it
|
||||
*/
|
||||
@@ -3430,6 +3441,20 @@ xmlCatalogDump(FILE *out) {
|
||||
|
||||
xmlACatalogDump(xmlDefaultCatalog, out);
|
||||
}
|
||||
+
|
||||
+/**
|
||||
+ * Dump all the global catalog content as a xmlDoc
|
||||
+ * This function is just for testing/debugging purposes
|
||||
+ *
|
||||
+ * @returns The catalog as xmlDoc or NULL if failed, it must be freed by the caller.
|
||||
+ */
|
||||
+xmlDocPtr
|
||||
+xmlCatalogDumpDoc(void) {
|
||||
+ if (!xmlCatalogInitialized)
|
||||
+ xmlInitializeCatalog();
|
||||
+
|
||||
+ return xmlDumpXMLCatalogToDoc(xmlDefaultCatalog->xml);
|
||||
+}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/**
|
||||
diff --git a/include/libxml/catalog.h b/include/libxml/catalog.h
|
||||
index 88a7483c..e1bc5feb 100644
|
||||
--- a/include/libxml/catalog.h
|
||||
+++ b/include/libxml/catalog.h
|
||||
@@ -119,6 +119,8 @@ XMLPUBFUN void XMLCALL
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogDump (FILE *out);
|
||||
+XMLPUBFUN xmlDocPtr
|
||||
+ xmlCatalogDumpDoc (void);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolve (const xmlChar *pubID,
|
||||
diff --git a/test/catalogs/catalog-recursive.xml b/test/catalogs/catalog-recursive.xml
|
||||
new file mode 100644
|
||||
index 00000000..3b3d03f9
|
||||
--- /dev/null
|
||||
+++ b/test/catalogs/catalog-recursive.xml
|
||||
@@ -0,0 +1,3 @@
|
||||
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||
+ <delegateURI uriStartString="/foo" catalog="catalog-recursive.xml"/>
|
||||
+</catalog>
|
||||
diff --git a/test/catalogs/repeated-next-catalog.xml b/test/catalogs/repeated-next-catalog.xml
|
||||
new file mode 100644
|
||||
index 00000000..76d34c3c
|
||||
--- /dev/null
|
||||
+++ b/test/catalogs/repeated-next-catalog.xml
|
||||
@@ -0,0 +1,10 @@
|
||||
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||
+ <nextCatalog catalog="registry.xml"/>
|
||||
+ <nextCatalog catalog="registry.xml"/>
|
||||
+ <nextCatalog catalog="./registry.xml"/>
|
||||
+ <nextCatalog catalog="././registry.xml"/>
|
||||
+ <nextCatalog catalog="./././registry.xml"/>
|
||||
+ <nextCatalog catalog="./../catalogs/registry.xml"/>
|
||||
+ <nextCatalog catalog="./../catalogs/./registry.xml"/>
|
||||
+</catalog>
|
||||
+
|
||||
diff --git a/testcatalog.c b/testcatalog.c
|
||||
new file mode 100644
|
||||
index 00000000..86d33bd0
|
||||
--- /dev/null
|
||||
+++ b/testcatalog.c
|
||||
@@ -0,0 +1,96 @@
|
||||
+/*
|
||||
+ * testcatalog.c: C program to run libxml2 catalog.c unit tests
|
||||
+ *
|
||||
+ * To compile on Unixes:
|
||||
+ * cc -o testcatalog `xml2-config --cflags` testcatalog.c `xml2-config --libs` -lpthread
|
||||
+ *
|
||||
+ * See Copyright for the status of this software.
|
||||
+ *
|
||||
+ * Author: Daniel Garcia <dani@danigm.net>
|
||||
+ */
|
||||
+
|
||||
+
|
||||
+#include "libxml.h"
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#ifdef LIBXML_CATALOG_ENABLED
|
||||
+#include <libxml/catalog.h>
|
||||
+
|
||||
+/* Test catalog resolve uri with recursive catalog */
|
||||
+static int
|
||||
+testRecursiveDelegateUri(void) {
|
||||
+ int ret = 0;
|
||||
+ const char *cat = "test/catalogs/catalog-recursive.xml";
|
||||
+ const char *entity = "/foo.ent";
|
||||
+ xmlChar *resolved = NULL;
|
||||
+
|
||||
+ xmlInitParser();
|
||||
+ xmlLoadCatalog(cat);
|
||||
+
|
||||
+ /* This should trigger recursive error */
|
||||
+ resolved = xmlCatalogResolveURI(BAD_CAST entity);
|
||||
+ if (resolved != NULL) {
|
||||
+ fprintf(stderr, "CATALOG-FAILURE: Catalog %s entity should fail to resolve\n", entity);
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+ xmlCatalogCleanup();
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/* Test parsing repeated NextCatalog */
|
||||
+static int
|
||||
+testRepeatedNextCatalog(void) {
|
||||
+ int ret = 0;
|
||||
+ int i = 0;
|
||||
+ const char *cat = "test/catalogs/repeated-next-catalog.xml";
|
||||
+ const char *entity = "/foo.ent";
|
||||
+ xmlDocPtr doc = NULL;
|
||||
+ xmlNodePtr node = NULL;
|
||||
+
|
||||
+ xmlInitParser();
|
||||
+
|
||||
+ xmlLoadCatalog(cat);
|
||||
+ /* To force the complete recursive load */
|
||||
+ xmlCatalogResolveURI(BAD_CAST entity);
|
||||
+ /**
|
||||
+ * Ensure that the doc doesn't contain the same nextCatalog
|
||||
+ */
|
||||
+ doc = xmlCatalogDumpDoc();
|
||||
+ xmlCatalogCleanup();
|
||||
+
|
||||
+ if (doc == NULL) {
|
||||
+ fprintf(stderr, "CATALOG-FAILURE: Failed to dump the catalog\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ /* Just the root "catalog" node with a series of nextCatalog */
|
||||
+ node = xmlDocGetRootElement(doc);
|
||||
+ node = node->children;
|
||||
+ for (i=0; node != NULL; node=node->next, i++) {}
|
||||
+ if (i > 1) {
|
||||
+ fprintf(stderr, "CATALOG-FAILURE: Found %d nextCatalog entries and should be 1\n", i);
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+
|
||||
+ xmlFreeDoc(doc);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main(void) {
|
||||
+ int err = 0;
|
||||
+
|
||||
+ err |= testRecursiveDelegateUri();
|
||||
+ err |= testRepeatedNextCatalog();
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+#else
|
||||
+/* No catalog, so everything okay */
|
||||
+int
|
||||
+main(void) {
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
33
meta/recipes-core/libxml/libxml2/CVE-2026-0992-03.patch
Normal file
33
meta/recipes-core/libxml/libxml2/CVE-2026-0992-03.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From deed3b7873dff30b7f87f7f33154c9932a772522 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Garcia Moreno <dani@danigm.net>
|
||||
Date: Sun, 18 Jan 2026 19:47:11 +0100
|
||||
Subject: [PATCH] catalog: Do not check value for duplication nextCatalog
|
||||
|
||||
The value field stores the path as it appears in the catalog definition,
|
||||
the URL is built using xmlBuildURI that changes the relative paths to
|
||||
absolute.
|
||||
|
||||
This change fixes the issue of using relative path to the same catalog
|
||||
in the same file.
|
||||
|
||||
Fix https://gitlab.gnome.org/GNOME/libxml2/-/issues/1040
|
||||
|
||||
CVE: CVE-2026-0992
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/deed3b7873dff30b7f87f7f33154c9932a772522]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
catalog.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/catalog.c b/catalog.c
|
||||
index eb889162..ba9ee7ae 100644
|
||||
--- a/catalog.c
|
||||
+++ b/catalog.c
|
||||
@@ -1299,7 +1299,6 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
|
||||
while (prev != NULL) {
|
||||
if ((prev->type == XML_CATA_NEXT_CATALOG) &&
|
||||
(xmlStrEqual (prev->URL, entry->URL)) &&
|
||||
- (xmlStrEqual (prev->value, entry->value)) &&
|
||||
(prev->prefer == entry->prefer) &&
|
||||
(prev->group == entry->group)) {
|
||||
if (xmlDebugCatalogs)
|
||||
@@ -44,6 +44,10 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar;subdir=${BP};name=testt
|
||||
file://CVE-2025-6170.patch \
|
||||
file://CVE-2025-9714.patch \
|
||||
file://CVE-2025-7425.patch \
|
||||
file://CVE-2026-0990.patch \
|
||||
file://CVE-2026-0992-01.patch \
|
||||
file://CVE-2026-0992-02.patch \
|
||||
file://CVE-2026-0992-03.patch \
|
||||
"
|
||||
|
||||
SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee"
|
||||
|
||||
@@ -58,3 +58,5 @@ BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
# this CVE is for cloudflare zlib
|
||||
CVE_CHECK_IGNORE += "CVE-2023-6992"
|
||||
# vulnerable file is not compiled
|
||||
CVE_CHECK_IGNORE += "CVE-2026-22184"
|
||||
|
||||
@@ -12,9 +12,9 @@ SRC_URI:append:class-nativesdk = " \
|
||||
file://older-glibc-symbols.patch"
|
||||
SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa"
|
||||
|
||||
SRCREV = "125b020dd2bc46baa37a80784704e382732357b4"
|
||||
SRCREV = "43cbd8fb4914328094ccdb4bb827d74b1bac2046"
|
||||
S = "${WORKDIR}/git"
|
||||
PV = "1.9.2+git"
|
||||
PV = "1.9.3+git"
|
||||
|
||||
# largefile and 64bit time_t support adds these macros via compiler flags globally
|
||||
# remove them for pseudo since pseudo intercepts some of the functions which will be
|
||||
|
||||
171
meta/recipes-devtools/python/python3/CVE-2025-12084.patch
Normal file
171
meta/recipes-devtools/python/python3/CVE-2025-12084.patch
Normal file
@@ -0,0 +1,171 @@
|
||||
From c97e87593063d84a2bd9fe7068b30eb44de23dc0 Mon Sep 17 00:00:00 2001
|
||||
From: "Miss Islington (bot)"
|
||||
<31488909+miss-islington@users.noreply.github.com>
|
||||
Date: Sun, 25 Jan 2026 18:10:49 +0100
|
||||
Subject: [PATCH] [3.10] gh-142145: Remove quadratic behavior in node ID cache
|
||||
clearing (GH-142146) (#142213)
|
||||
|
||||
* gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146)
|
||||
|
||||
* Remove quadratic behavior in node ID cache clearing
|
||||
|
||||
Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>
|
||||
|
||||
* Add news fragment
|
||||
|
||||
CVE: CVE-2025-12084
|
||||
Upstream-Status: Backport [https://github.com/python/cpython/commit/c97e87593063d84a2bd9fe7068b30eb44de23dc0]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---------
|
||||
(cherry picked from commit 08d8e18ad81cd45bc4a27d6da478b51ea49486e4)
|
||||
|
||||
Co-authored-by: Seth Michael Larson <seth@python.org>
|
||||
Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>
|
||||
|
||||
* [3.14] gh-142754: Ensure that Element & Attr instances have the ownerDocument attribute (GH-142794) (#142818)
|
||||
|
||||
gh-142754: Ensure that Element & Attr instances have the ownerDocument attribute (GH-142794)
|
||||
(cherry picked from commit 1cc7551b3f9f71efbc88d96dce90f82de98b2454)
|
||||
|
||||
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
||||
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
||||
|
||||
* gh-142145: relax the no-longer-quadratic test timing (GH-143030)
|
||||
|
||||
* gh-142145: relax the no-longer-quadratic test timing
|
||||
|
||||
* require cpu resource
|
||||
(cherry picked from commit 8d2d7bb2e754f8649a68ce4116271a4932f76907)
|
||||
|
||||
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
|
||||
|
||||
* merge NEWS entries into one
|
||||
|
||||
---------
|
||||
|
||||
Co-authored-by: Seth Michael Larson <seth@python.org>
|
||||
Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>
|
||||
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
||||
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
||||
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
|
||||
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
||||
---
|
||||
Lib/test/test_minidom.py | 33 ++++++++++++++++++-
|
||||
Lib/xml/dom/minidom.py | 11 ++-----
|
||||
...-12-01-09-36-45.gh-issue-142145.tcAUhg.rst | 6 ++++
|
||||
3 files changed, 41 insertions(+), 9 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2025-12-01-09-36-45.gh-issue-142145.tcAUhg.rst
|
||||
|
||||
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
|
||||
index ef38c36210..c68bd990f7 100644
|
||||
--- a/Lib/test/test_minidom.py
|
||||
+++ b/Lib/test/test_minidom.py
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import copy
|
||||
import pickle
|
||||
+import time
|
||||
import io
|
||||
from test import support
|
||||
import unittest
|
||||
@@ -9,7 +10,7 @@ import unittest
|
||||
import pyexpat
|
||||
import xml.dom.minidom
|
||||
|
||||
-from xml.dom.minidom import parse, Attr, Node, Document, parseString
|
||||
+from xml.dom.minidom import parse, Attr, Node, Document, Element, parseString
|
||||
from xml.dom.minidom import getDOMImplementation
|
||||
from xml.parsers.expat import ExpatError
|
||||
|
||||
@@ -177,6 +178,36 @@ class MinidomTest(unittest.TestCase):
|
||||
self.confirm(dom.documentElement.childNodes[-1].data == "Hello")
|
||||
dom.unlink()
|
||||
|
||||
+ @support.requires_resource('cpu')
|
||||
+ def testAppendChildNoQuadraticComplexity(self):
|
||||
+ impl = getDOMImplementation()
|
||||
+
|
||||
+ newdoc = impl.createDocument(None, "some_tag", None)
|
||||
+ top_element = newdoc.documentElement
|
||||
+ children = [newdoc.createElement(f"child-{i}") for i in range(1, 2 ** 15 + 1)]
|
||||
+ element = top_element
|
||||
+
|
||||
+ start = time.monotonic()
|
||||
+ for child in children:
|
||||
+ element.appendChild(child)
|
||||
+ element = child
|
||||
+ end = time.monotonic()
|
||||
+
|
||||
+ # This example used to take at least 30 seconds.
|
||||
+ # Conservative assertion due to the wide variety of systems and
|
||||
+ # build configs timing based tests wind up run under.
|
||||
+ # A --with-address-sanitizer --with-pydebug build on a rpi5 still
|
||||
+ # completes this loop in <0.5 seconds.
|
||||
+ self.assertLess(end - start, 4)
|
||||
+
|
||||
+ def testSetAttributeNodeWithoutOwnerDocument(self):
|
||||
+ # regression test for gh-142754
|
||||
+ elem = Element("test")
|
||||
+ attr = Attr("id")
|
||||
+ attr.value = "test-id"
|
||||
+ elem.setAttributeNode(attr)
|
||||
+ self.assertEqual(elem.getAttribute("id"), "test-id")
|
||||
+
|
||||
def testAppendChildFragment(self):
|
||||
dom, orig, c1, c2, c3, frag = self._create_fragment_test_nodes()
|
||||
dom.documentElement.appendChild(frag)
|
||||
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
|
||||
index ef8a159833..cada981f39 100644
|
||||
--- a/Lib/xml/dom/minidom.py
|
||||
+++ b/Lib/xml/dom/minidom.py
|
||||
@@ -292,13 +292,6 @@ def _append_child(self, node):
|
||||
childNodes.append(node)
|
||||
node.parentNode = self
|
||||
|
||||
-def _in_document(node):
|
||||
- # return True iff node is part of a document tree
|
||||
- while node is not None:
|
||||
- if node.nodeType == Node.DOCUMENT_NODE:
|
||||
- return True
|
||||
- node = node.parentNode
|
||||
- return False
|
||||
|
||||
def _write_data(writer, data):
|
||||
"Writes datachars to writer."
|
||||
@@ -355,6 +348,7 @@ class Attr(Node):
|
||||
def __init__(self, qName, namespaceURI=EMPTY_NAMESPACE, localName=None,
|
||||
prefix=None):
|
||||
self.ownerElement = None
|
||||
+ self.ownerDocument = None
|
||||
self._name = qName
|
||||
self.namespaceURI = namespaceURI
|
||||
self._prefix = prefix
|
||||
@@ -680,6 +674,7 @@ class Element(Node):
|
||||
|
||||
def __init__(self, tagName, namespaceURI=EMPTY_NAMESPACE, prefix=None,
|
||||
localName=None):
|
||||
+ self.ownerDocument = None
|
||||
self.parentNode = None
|
||||
self.tagName = self.nodeName = tagName
|
||||
self.prefix = prefix
|
||||
@@ -1539,7 +1534,7 @@ def _clear_id_cache(node):
|
||||
if node.nodeType == Node.DOCUMENT_NODE:
|
||||
node._id_cache.clear()
|
||||
node._id_search_stack = None
|
||||
- elif _in_document(node):
|
||||
+ elif node.ownerDocument:
|
||||
node.ownerDocument._id_cache.clear()
|
||||
node.ownerDocument._id_search_stack= None
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Security/2025-12-01-09-36-45.gh-issue-142145.tcAUhg.rst b/Misc/NEWS.d/next/Security/2025-12-01-09-36-45.gh-issue-142145.tcAUhg.rst
|
||||
new file mode 100644
|
||||
index 0000000000..05c7df35d1
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2025-12-01-09-36-45.gh-issue-142145.tcAUhg.rst
|
||||
@@ -0,0 +1,6 @@
|
||||
+Remove quadratic behavior in ``xml.minidom`` node ID cache clearing. In order
|
||||
+to do this without breaking existing users, we also add the *ownerDocument*
|
||||
+attribute to :mod:`xml.dom.minidom` elements and attributes created by directly
|
||||
+instantiating the ``Element`` or ``Attr`` class. Note that this way of creating
|
||||
+nodes is not supported; creator functions like
|
||||
+:py:meth:`xml.dom.Document.documentElement` should be used instead.
|
||||
162
meta/recipes-devtools/python/python3/CVE-2025-13837.patch
Normal file
162
meta/recipes-devtools/python/python3/CVE-2025-13837.patch
Normal file
@@ -0,0 +1,162 @@
|
||||
From 5a8b19677d818fb41ee55f310233772e15aa1a2b Mon Sep 17 00:00:00 2001
|
||||
From: Serhiy Storchaka <storchaka@gmail.com>
|
||||
Date: Mon, 22 Dec 2025 15:49:44 +0200
|
||||
Subject: [PATCH] [3.12] gh-119342: Fix a potential denial of service in
|
||||
plistlib (GH-119343) (#142149)
|
||||
|
||||
Reading a specially prepared small Plist file could cause OOM because file's
|
||||
read(n) preallocates a bytes object for reading the specified amount of
|
||||
data. Now plistlib reads large data by chunks, therefore the upper limit of
|
||||
consumed memory is proportional to the size of the input file.
|
||||
(cherry picked from commit 694922cf40aa3a28f898b5f5ee08b71b4922df70)
|
||||
|
||||
CVE: CVE-2025-13837
|
||||
Upstream-Status: Backport [https://github.com/python/cpython/commit/5a8b19677d818fb41ee55f310233772e15aa1a2b]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
Lib/plistlib.py | 31 ++++++++++------
|
||||
Lib/test/test_plistlib.py | 37 +++++++++++++++++--
|
||||
...-05-21-22-11-31.gh-issue-119342.BTFj4Z.rst | 5 +++
|
||||
3 files changed, 59 insertions(+), 14 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2024-05-21-22-11-31.gh-issue-119342.BTFj4Z.rst
|
||||
|
||||
diff --git a/Lib/plistlib.py b/Lib/plistlib.py
|
||||
index 3292c30d5f..c5554ea1f7 100644
|
||||
--- a/Lib/plistlib.py
|
||||
+++ b/Lib/plistlib.py
|
||||
@@ -73,6 +73,9 @@ from xml.parsers.expat import ParserCreate
|
||||
PlistFormat = enum.Enum('PlistFormat', 'FMT_XML FMT_BINARY', module=__name__)
|
||||
globals().update(PlistFormat.__members__)
|
||||
|
||||
+# Data larger than this will be read in chunks, to prevent extreme
|
||||
+# overallocation.
|
||||
+_MIN_READ_BUF_SIZE = 1 << 20
|
||||
|
||||
class UID:
|
||||
def __init__(self, data):
|
||||
@@ -499,12 +502,24 @@ class _BinaryPlistParser:
|
||||
|
||||
return tokenL
|
||||
|
||||
+ def _read(self, size):
|
||||
+ cursize = min(size, _MIN_READ_BUF_SIZE)
|
||||
+ data = self._fp.read(cursize)
|
||||
+ while True:
|
||||
+ if len(data) != cursize:
|
||||
+ raise InvalidFileException
|
||||
+ if cursize == size:
|
||||
+ return data
|
||||
+ delta = min(cursize, size - cursize)
|
||||
+ data += self._fp.read(delta)
|
||||
+ cursize += delta
|
||||
+
|
||||
def _read_ints(self, n, size):
|
||||
- data = self._fp.read(size * n)
|
||||
+ data = self._read(size * n)
|
||||
if size in _BINARY_FORMAT:
|
||||
return struct.unpack(f'>{n}{_BINARY_FORMAT[size]}', data)
|
||||
else:
|
||||
- if not size or len(data) != size * n:
|
||||
+ if not size:
|
||||
raise InvalidFileException()
|
||||
return tuple(int.from_bytes(data[i: i + size], 'big')
|
||||
for i in range(0, size * n, size))
|
||||
@@ -561,22 +576,16 @@ class _BinaryPlistParser:
|
||||
|
||||
elif tokenH == 0x40: # data
|
||||
s = self._get_size(tokenL)
|
||||
- result = self._fp.read(s)
|
||||
- if len(result) != s:
|
||||
- raise InvalidFileException()
|
||||
+ result = self._read(s)
|
||||
|
||||
elif tokenH == 0x50: # ascii string
|
||||
s = self._get_size(tokenL)
|
||||
- data = self._fp.read(s)
|
||||
- if len(data) != s:
|
||||
- raise InvalidFileException()
|
||||
+ data = self._read(s)
|
||||
result = data.decode('ascii')
|
||||
|
||||
elif tokenH == 0x60: # unicode string
|
||||
s = self._get_size(tokenL) * 2
|
||||
- data = self._fp.read(s)
|
||||
- if len(data) != s:
|
||||
- raise InvalidFileException()
|
||||
+ data = self._read(s)
|
||||
result = data.decode('utf-16be')
|
||||
|
||||
elif tokenH == 0x80: # UID
|
||||
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py
|
||||
index fa46050658..229a5a242e 100644
|
||||
--- a/Lib/test/test_plistlib.py
|
||||
+++ b/Lib/test/test_plistlib.py
|
||||
@@ -838,8 +838,7 @@ class TestPlistlib(unittest.TestCase):
|
||||
|
||||
class TestBinaryPlistlib(unittest.TestCase):
|
||||
|
||||
- @staticmethod
|
||||
- def decode(*objects, offset_size=1, ref_size=1):
|
||||
+ def build(self, *objects, offset_size=1, ref_size=1):
|
||||
data = [b'bplist00']
|
||||
offset = 8
|
||||
offsets = []
|
||||
@@ -851,7 +850,11 @@ class TestBinaryPlistlib(unittest.TestCase):
|
||||
len(objects), 0, offset)
|
||||
data.extend(offsets)
|
||||
data.append(tail)
|
||||
- return plistlib.loads(b''.join(data), fmt=plistlib.FMT_BINARY)
|
||||
+ return b''.join(data)
|
||||
+
|
||||
+ def decode(self, *objects, offset_size=1, ref_size=1):
|
||||
+ data = self.build(*objects, offset_size=offset_size, ref_size=ref_size)
|
||||
+ return plistlib.loads(data, fmt=plistlib.FMT_BINARY)
|
||||
|
||||
def test_nonstandard_refs_size(self):
|
||||
# Issue #21538: Refs and offsets are 24-bit integers
|
||||
@@ -959,6 +962,34 @@ class TestBinaryPlistlib(unittest.TestCase):
|
||||
with self.assertRaises(plistlib.InvalidFileException):
|
||||
plistlib.loads(b'bplist00' + data, fmt=plistlib.FMT_BINARY)
|
||||
|
||||
+ def test_truncated_large_data(self):
|
||||
+ self.addCleanup(os_helper.unlink, os_helper.TESTFN)
|
||||
+ def check(data):
|
||||
+ with open(os_helper.TESTFN, 'wb') as f:
|
||||
+ f.write(data)
|
||||
+ # buffered file
|
||||
+ with open(os_helper.TESTFN, 'rb') as f:
|
||||
+ with self.assertRaises(plistlib.InvalidFileException):
|
||||
+ plistlib.load(f, fmt=plistlib.FMT_BINARY)
|
||||
+ # unbuffered file
|
||||
+ with open(os_helper.TESTFN, 'rb', buffering=0) as f:
|
||||
+ with self.assertRaises(plistlib.InvalidFileException):
|
||||
+ plistlib.load(f, fmt=plistlib.FMT_BINARY)
|
||||
+ for w in range(20, 64):
|
||||
+ s = 1 << w
|
||||
+ # data
|
||||
+ check(self.build(b'\x4f\x13' + s.to_bytes(8, 'big')))
|
||||
+ # ascii string
|
||||
+ check(self.build(b'\x5f\x13' + s.to_bytes(8, 'big')))
|
||||
+ # unicode string
|
||||
+ check(self.build(b'\x6f\x13' + s.to_bytes(8, 'big')))
|
||||
+ # array
|
||||
+ check(self.build(b'\xaf\x13' + s.to_bytes(8, 'big')))
|
||||
+ # dict
|
||||
+ check(self.build(b'\xdf\x13' + s.to_bytes(8, 'big')))
|
||||
+ # number of objects
|
||||
+ check(b'bplist00' + struct.pack('>6xBBQQQ', 1, 1, s, 0, 8))
|
||||
+
|
||||
|
||||
class TestKeyedArchive(unittest.TestCase):
|
||||
def test_keyed_archive_data(self):
|
||||
diff --git a/Misc/NEWS.d/next/Security/2024-05-21-22-11-31.gh-issue-119342.BTFj4Z.rst b/Misc/NEWS.d/next/Security/2024-05-21-22-11-31.gh-issue-119342.BTFj4Z.rst
|
||||
new file mode 100644
|
||||
index 0000000000..04fd8faca4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Security/2024-05-21-22-11-31.gh-issue-119342.BTFj4Z.rst
|
||||
@@ -0,0 +1,5 @@
|
||||
+Fix a potential memory denial of service in the :mod:`plistlib` module.
|
||||
+When reading a Plist file received from untrusted source, it could cause
|
||||
+an arbitrary amount of memory to be allocated.
|
||||
+This could have led to symptoms including a :exc:`MemoryError`, swapping, out
|
||||
+of memory (OOM) killed processes or containers, or even system crashes.
|
||||
@@ -39,6 +39,8 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||
file://0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch \
|
||||
file://CVE-2025-6075.patch \
|
||||
file://CVE-2025-13836.patch \
|
||||
file://CVE-2025-13837.patch \
|
||||
file://CVE-2025-12084.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-native = " \
|
||||
|
||||
@@ -50,3 +50,6 @@ FILES:${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
|
||||
FILES:${PN}-subset = "${libdir}/libharfbuzz-subset.so.*"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
# fixed-version: vulnerability was introduced in v6.0.0
|
||||
CVE_CHECK_IGNORE += "CVE-2026-22693"
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "259f7f9d0bd0df2c3e497395568a655c5745b5ac"
|
||||
SRCREV_meta ?= "578937826ffad97749eba3a5d1b21b37b5cd7bdc"
|
||||
SRCREV_machine ?= "27c8048897d9d7ff1ed6d2643cbc024eb13ae342"
|
||||
SRCREV_meta ?= "78eca082b68ad521c3bb9a1f9f0325e044045f18"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.15.194"
|
||||
LINUX_VERSION ?= "5.15.199"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.15.194"
|
||||
LINUX_VERSION ?= "5.15.199"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
@@ -14,8 +14,8 @@ DEPENDS += "openssl-native util-linux-native"
|
||||
KMETA = "kernel-meta"
|
||||
KCONF_BSP_AUDIT_LEVEL = "2"
|
||||
|
||||
SRCREV_machine ?= "57960f78280a75ea48270a3984ac01bd06078b88"
|
||||
SRCREV_meta ?= "578937826ffad97749eba3a5d1b21b37b5cd7bdc"
|
||||
SRCREV_machine ?= "7b20eb2129d25bb2a1cb963d30c2f3adb1e144b3"
|
||||
SRCREV_meta ?= "78eca082b68ad521c3bb9a1f9f0325e044045f18"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -14,24 +14,24 @@ KBRANCH:qemux86 ?= "v5.15/standard/base"
|
||||
KBRANCH:qemux86-64 ?= "v5.15/standard/base"
|
||||
KBRANCH:qemumips64 ?= "v5.15/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine:qemuarm ?= "7b19f872b07703f73c494baa81cd7e984db01336"
|
||||
SRCREV_machine:qemuarm64 ?= "431a37a229ce5be7b6ba116dc7bd282be4a745fa"
|
||||
SRCREV_machine:qemumips ?= "9404d4015b457e7324d5675d3e14f46d84cd8c40"
|
||||
SRCREV_machine:qemuppc ?= "bfd132d4b358cdb5260fccc71eb1e5a09daae033"
|
||||
SRCREV_machine:qemuriscv64 ?= "5df8e23ccadd62ab9945320b6b4327b082870c61"
|
||||
SRCREV_machine:qemuriscv32 ?= "5df8e23ccadd62ab9945320b6b4327b082870c61"
|
||||
SRCREV_machine:qemux86 ?= "5df8e23ccadd62ab9945320b6b4327b082870c61"
|
||||
SRCREV_machine:qemux86-64 ?= "5df8e23ccadd62ab9945320b6b4327b082870c61"
|
||||
SRCREV_machine:qemumips64 ?= "ed52c5eccf0cc2b0da2dd7d13d012c50db78a62a"
|
||||
SRCREV_machine ?= "5df8e23ccadd62ab9945320b6b4327b082870c61"
|
||||
SRCREV_meta ?= "578937826ffad97749eba3a5d1b21b37b5cd7bdc"
|
||||
SRCREV_machine:qemuarm ?= "0ea8d4a7d24642475c1d1e0d8be44976600eb630"
|
||||
SRCREV_machine:qemuarm64 ?= "33aae9ebda82736fc0246e4d2bd7967bb7ef492a"
|
||||
SRCREV_machine:qemumips ?= "0d159686c17443503bc7b59f25b5129c8543193d"
|
||||
SRCREV_machine:qemuppc ?= "c8e213f83bae4792c1042bdcedd46fa60963c69b"
|
||||
SRCREV_machine:qemuriscv64 ?= "e7bbf58a0f6828ffb92109eb423eb3d1327f091a"
|
||||
SRCREV_machine:qemuriscv32 ?= "e7bbf58a0f6828ffb92109eb423eb3d1327f091a"
|
||||
SRCREV_machine:qemux86 ?= "e7bbf58a0f6828ffb92109eb423eb3d1327f091a"
|
||||
SRCREV_machine:qemux86-64 ?= "e7bbf58a0f6828ffb92109eb423eb3d1327f091a"
|
||||
SRCREV_machine:qemumips64 ?= "58c96e47bbd784e078e265426b9276bad2bb7e22"
|
||||
SRCREV_machine ?= "e7bbf58a0f6828ffb92109eb423eb3d1327f091a"
|
||||
SRCREV_meta ?= "78eca082b68ad521c3bb9a1f9f0325e044045f18"
|
||||
|
||||
# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll
|
||||
# get the <version>/base branch, which is pure upstream -stable, and the same
|
||||
# meta SRCREV as the linux-yocto-standard builds. Select your version using the
|
||||
# normal PREFERRED_VERSION settings.
|
||||
BBCLASSEXTEND = "devupstream:target"
|
||||
SRCREV_machine:class-devupstream ?= "29e53a5b1c4f144301ee36a907e8b03d7733f0b0"
|
||||
SRCREV_machine:class-devupstream ?= "7b232985052fcf6a78bf0f965aa4241c0678c2ba"
|
||||
PN:class-devupstream = "linux-yocto-upstream"
|
||||
KBRANCH:class-devupstream = "v5.15/base"
|
||||
|
||||
@@ -39,7 +39,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
LINUX_VERSION ?= "5.15.194"
|
||||
LINUX_VERSION ?= "5.15.199"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -105,6 +105,11 @@ CVE_CHECK_IGNORE += "CVE-2022-3341"
|
||||
# bugfix: https://github.com/FFmpeg/FFmpeg/commit/28c83584e8f3cd747c1476a74cc2841d3d1fa7f3
|
||||
CVE_CHECK_IGNORE += "CVE-2023-6603"
|
||||
|
||||
# These vulnerabilities were introduced in v8.0
|
||||
# introduced: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d38fc25519cf12a9212dadcba1258fc176ffbade
|
||||
# bugfix: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d5873be583ada9e1fb887e2fe8dcfd4b12e0efcd
|
||||
CVE_CHECK_IGNORE += "CVE-2025-25468 CVE-2025-25469"
|
||||
|
||||
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
|
||||
ARM_INSTRUCTION_SET:armv4 = "arm"
|
||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||
|
||||
77
meta/recipes-multimedia/libpng/files/CVE-2026-22695.patch
Normal file
77
meta/recipes-multimedia/libpng/files/CVE-2026-22695.patch
Normal file
@@ -0,0 +1,77 @@
|
||||
From e4f7ad4ea2a471776c81dda4846b7691925d9786 Mon Sep 17 00:00:00 2001
|
||||
From: Cosmin Truta <ctruta@gmail.com>
|
||||
Date: Fri, 9 Jan 2026 20:51:53 +0200
|
||||
Subject: [PATCH] Fix a heap buffer over-read in `png_image_read_direct_scaled`
|
||||
|
||||
Fix a regression from commit 218612ddd6b17944e21eda56caf8b4bf7779d1ea.
|
||||
|
||||
The function `png_image_read_direct_scaled`, introduced by the fix for
|
||||
CVE-2025-65018, copies transformed row data from an intermediate buffer
|
||||
(`local_row`) to the user's output buffer. The copy incorrectly used
|
||||
`row_bytes` (the caller's stride) as the size parameter to memcpy, even
|
||||
though `local_row` is only `png_get_rowbytes()` bytes long.
|
||||
|
||||
This causes a heap buffer over-read when:
|
||||
|
||||
1. The caller provides a padded stride (e.g., for memory alignment):
|
||||
memcpy reads past the end of `local_row` by `stride - row_width`
|
||||
bytes.
|
||||
|
||||
2. The caller provides a negative stride (for bottom-up layouts):
|
||||
casting ptrdiff_t to size_t produces ~2^64, causing memcpy to
|
||||
attempt reading exabytes, resulting in an immediate crash.
|
||||
|
||||
The fix consists in using the size of the row buffer for the copy and
|
||||
using the stride for pointer advancement only.
|
||||
|
||||
Reported-by: Petr Simecek <simecek@users.noreply.github.com>
|
||||
Analyzed-by: Stanislav Fort
|
||||
Analyzed-by: Pavel Kohout
|
||||
Co-authored-by: Petr Simecek <simecek@users.noreply.github.com>
|
||||
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
|
||||
|
||||
CVE: CVE-2026-22695
|
||||
Upstream-Status: Backport [https://github.com/pnggroup/libpng/commit/e4f7ad4ea2a471776c81dda4846b7691925d9786]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
AUTHORS | 1 +
|
||||
pngread.c | 4 +++-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index 26b7bb50f..b9c0fffcf 100644
|
||||
--- a/AUTHORS
|
||||
+++ b/AUTHORS
|
||||
@@ -22,6 +22,7 @@ Authors, for copyright and licensing purposes.
|
||||
* Mike Klein
|
||||
* Pascal Massimino
|
||||
* Paul Schmidt
|
||||
+ * Petr Simecek
|
||||
* Qiang Zhou
|
||||
* Sam Bushell
|
||||
* Samuel Williams
|
||||
diff --git a/pngread.c b/pngread.c
|
||||
index e3426292b..9d86b01dc 100644
|
||||
--- a/pngread.c
|
||||
+++ b/pngread.c
|
||||
@@ -3268,9 +3268,11 @@ png_image_read_direct_scaled(png_voidp argument)
|
||||
argument);
|
||||
png_imagep image = display->image;
|
||||
png_structrp png_ptr = image->opaque->png_ptr;
|
||||
+ png_inforp info_ptr = image->opaque->info_ptr;
|
||||
png_bytep local_row = png_voidcast(png_bytep, display->local_row);
|
||||
png_bytep first_row = png_voidcast(png_bytep, display->first_row);
|
||||
ptrdiff_t row_bytes = display->row_bytes;
|
||||
+ size_t copy_bytes = png_get_rowbytes(png_ptr, info_ptr);
|
||||
int passes;
|
||||
|
||||
/* Handle interlacing. */
|
||||
@@ -3300,7 +3302,7 @@ png_image_read_direct_scaled(png_voidp argument)
|
||||
png_read_row(png_ptr, local_row, NULL);
|
||||
|
||||
/* Copy from local_row to user buffer. */
|
||||
- memcpy(output_row, local_row, (size_t)row_bytes);
|
||||
+ memcpy(output_row, local_row, copy_bytes);
|
||||
output_row += row_bytes;
|
||||
}
|
||||
}
|
||||
164
meta/recipes-multimedia/libpng/files/CVE-2026-22801.patch
Normal file
164
meta/recipes-multimedia/libpng/files/CVE-2026-22801.patch
Normal file
@@ -0,0 +1,164 @@
|
||||
From cf155de014fc6c5cb199dd681dd5c8fb70429072 Mon Sep 17 00:00:00 2001
|
||||
From: Cosmin Truta <ctruta@gmail.com>
|
||||
Date: Sat, 10 Jan 2026 15:20:18 +0200
|
||||
Subject: [PATCH] fix: Remove incorrect truncation casts from
|
||||
`png_write_image_*`
|
||||
|
||||
The type of the row stride (`display->row_bytes`) is ptrdiff_t. Casting
|
||||
to png_uint_16 before division will truncate large strides, causing
|
||||
incorrect pointer arithmetic for images exceeding 65535 bytes per row.
|
||||
For bottom-up images (negative stride), the truncation also corrupts
|
||||
the sign, advancing the row pointer forward instead of backward.
|
||||
|
||||
Remove the erroneous casts and let the compiler handle the pointer
|
||||
arithmetic correctly. Also replace `sizeof (png_uint_16)` with 2.
|
||||
|
||||
Add regression test via `pngstest --stride-extra N` where N > 32767
|
||||
triggers the affected code paths.
|
||||
|
||||
A NOTE ABOUT HISTORY:
|
||||
The original code in libpng 1.5.6 (2011) had no such casts. They were
|
||||
introduced in libpng 1.6.26 (2016), likely to silence compiler warnings
|
||||
on 16-bit systems where the cast would be a no-op. On 32/64-bit systems
|
||||
the cast truncates the strides above 65535 and corrupts the negative
|
||||
strides.
|
||||
|
||||
CVE: CVE-2026-22801
|
||||
Upstream-Status: Backport [https://github.com/pnggroup/libpng/commit/cf155de014fc6c5cb199dd681dd5c8fb70429072]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
CMakeLists.txt | 7 +++++++
|
||||
contrib/libtests/pngstest.c | 29 ++++++++++++++++++++++++++++-
|
||||
pngwrite.c | 10 +++++-----
|
||||
tests/pngstest-large-stride | 8 ++++++++
|
||||
4 files changed, 48 insertions(+), 6 deletions(-)
|
||||
create mode 100755 tests/pngstest-large-stride
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a8cd82402..a595ed91d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -804,6 +804,13 @@ if(PNG_TESTS AND PNG_SHARED)
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
+ # Regression test:
|
||||
+ # Use stride_extra > 32767 to trigger row_bytes > 65535 for linear images.
|
||||
+ png_add_test(NAME pngstest-large-stride
|
||||
+ COMMAND pngstest
|
||||
+ OPTIONS --stride-extra 33000 --tmpfile "large-stride-" --log
|
||||
+ FILES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/testpngs/rgb-alpha-16-linear.png")
|
||||
+
|
||||
add_executable(pngunknown ${pngunknown_sources})
|
||||
target_link_libraries(pngunknown png)
|
||||
|
||||
diff --git a/contrib/libtests/pngstest.c b/contrib/libtests/pngstest.c
|
||||
index ff4c2b24a..2f29afee2 100644
|
||||
--- a/contrib/libtests/pngstest.c
|
||||
+++ b/contrib/libtests/pngstest.c
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngstest.c
|
||||
*
|
||||
- * Copyright (c) 2021 Cosmin Truta
|
||||
+ * Copyright (c) 2021-2026 Cosmin Truta
|
||||
* Copyright (c) 2013-2017 John Cunningham Bowler
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
@@ -3571,6 +3571,33 @@ main(int argc, char **argv)
|
||||
opts |= NO_RESEED;
|
||||
else if (strcmp(arg, "--fault-gbg-warning") == 0)
|
||||
opts |= GBG_ERROR;
|
||||
+ else if (strcmp(arg, "--stride-extra") == 0)
|
||||
+ {
|
||||
+ if (c+1 < argc)
|
||||
+ {
|
||||
+ char *ep;
|
||||
+ unsigned long val = strtoul(argv[++c], &ep, 0);
|
||||
+
|
||||
+ if (ep > argv[c] && *ep == 0 && val <= 65535)
|
||||
+ stride_extra = (int)val;
|
||||
+
|
||||
+ else
|
||||
+ {
|
||||
+ fflush(stdout);
|
||||
+ fprintf(stderr, "%s: bad argument for --stride-extra: %s\n",
|
||||
+ argv[0], argv[c]);
|
||||
+ exit(99);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ else
|
||||
+ {
|
||||
+ fflush(stdout);
|
||||
+ fprintf(stderr, "%s: missing argument for --stride-extra\n",
|
||||
+ argv[0]);
|
||||
+ exit(99);
|
||||
+ }
|
||||
+ }
|
||||
else if (strcmp(arg, "--tmpfile") == 0)
|
||||
{
|
||||
if (c+1 < argc)
|
||||
diff --git a/pngwrite.c b/pngwrite.c
|
||||
index 08066bcc4..a95b846c8 100644
|
||||
--- a/pngwrite.c
|
||||
+++ b/pngwrite.c
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
- * Copyright (c) 2018-2022 Cosmin Truta
|
||||
+ * Copyright (c) 2018-2026 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
@@ -1632,7 +1632,7 @@ png_write_image_16bit(png_voidp argument)
|
||||
}
|
||||
|
||||
png_write_row(png_ptr, png_voidcast(png_const_bytep, display->local_row));
|
||||
- input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16));
|
||||
+ input_row += display->row_bytes / 2;
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -1758,7 +1758,7 @@ png_write_image_8bit(png_voidp argument)
|
||||
|
||||
png_write_row(png_ptr, png_voidcast(png_const_bytep,
|
||||
display->local_row));
|
||||
- input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16));
|
||||
+ input_row += display->row_bytes / 2;
|
||||
} /* while y */
|
||||
}
|
||||
|
||||
@@ -1783,7 +1783,7 @@ png_write_image_8bit(png_voidp argument)
|
||||
}
|
||||
|
||||
png_write_row(png_ptr, output_row);
|
||||
- input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16));
|
||||
+ input_row += display->row_bytes / 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2102,7 +2102,7 @@ png_image_write_main(png_voidp argument)
|
||||
ptrdiff_t row_bytes = display->row_stride;
|
||||
|
||||
if (linear != 0)
|
||||
- row_bytes *= (sizeof (png_uint_16));
|
||||
+ row_bytes *= 2;
|
||||
|
||||
if (row_bytes < 0)
|
||||
row += (image->height-1) * (-row_bytes);
|
||||
diff --git a/tests/pngstest-large-stride b/tests/pngstest-large-stride
|
||||
new file mode 100755
|
||||
index 000000000..7958c5b42
|
||||
--- /dev/null
|
||||
+++ b/tests/pngstest-large-stride
|
||||
@@ -0,0 +1,8 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+# Regression test:
|
||||
+# Use stride_extra > 32767 to trigger row_bytes > 65535 for linear images.
|
||||
+exec ./pngstest \
|
||||
+ --stride-extra 33000 \
|
||||
+ --tmpfile "large-stride-" \
|
||||
+ --log "${srcdir}/contrib/testpngs/rgb-alpha-16-linear.png"
|
||||
61
meta/recipes-multimedia/libpng/files/CVE-2026-25646.patch
Normal file
61
meta/recipes-multimedia/libpng/files/CVE-2026-25646.patch
Normal file
@@ -0,0 +1,61 @@
|
||||
From 01d03b8453eb30ade759cd45c707e5a1c7277d88 Mon Sep 17 00:00:00 2001
|
||||
From: Cosmin Truta <ctruta@gmail.com>
|
||||
Date: Fri, 6 Feb 2026 19:11:54 +0200
|
||||
Subject: [PATCH] Fix a heap buffer overflow in `png_set_quantize`
|
||||
|
||||
The color distance hash table stored the current palette indices, but
|
||||
the color-pruning loop assumed the original indices. When colors were
|
||||
eliminated and indices changed, the stored indices became stale. This
|
||||
caused the loop bound `max_d` to grow past the 769-element hash array.
|
||||
|
||||
The fix consists in storing the original indices via `palette_to_index`
|
||||
to match the pruning loop's expectations.
|
||||
|
||||
Reported-by: Joshua Inscoe <pwnalone@users.noreply.github.com>
|
||||
Co-authored-by: Joshua Inscoe <pwnalone@users.noreply.github.com>
|
||||
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
|
||||
|
||||
CVE: CVE-2026-25646
|
||||
Upstream-Status: Backport [https://github.com/pnggroup/libpng/commit/01d03b8453eb30ade759cd45c707e5a1c7277d88]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
AUTHORS | 1 +
|
||||
pngrtran.c | 6 +++---
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index b9c0fffcf..4094f4a57 100644
|
||||
--- a/AUTHORS
|
||||
+++ b/AUTHORS
|
||||
@@ -14,6 +14,7 @@ Authors, for copyright and licensing purposes.
|
||||
* Guy Eric Schalnat
|
||||
* James Yu
|
||||
* John Bowler
|
||||
+ * Joshua Inscoe
|
||||
* Kevin Bracey
|
||||
* Magnus Holmgren
|
||||
* Mandar Sahastrabuddhe
|
||||
diff --git a/pngrtran.c b/pngrtran.c
|
||||
index fe8f9d32c..1fce9af12 100644
|
||||
--- a/pngrtran.c
|
||||
+++ b/pngrtran.c
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
- * Copyright (c) 2018-2019 Cosmin Truta
|
||||
+ * Copyright (c) 2018-2026 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1996-1997 Andreas Dilger
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
@@ -647,8 +647,8 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
|
||||
break;
|
||||
|
||||
t->next = hash[d];
|
||||
- t->left = (png_byte)i;
|
||||
- t->right = (png_byte)j;
|
||||
+ t->left = png_ptr->palette_to_index[i];
|
||||
+ t->right = png_ptr->palette_to_index[j];
|
||||
hash[d] = t;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,9 @@ SRC_URI = "\
|
||||
file://CVE-2025-65018-02.patch \
|
||||
file://CVE-2025-66293-01.patch \
|
||||
file://CVE-2025-66293-02.patch \
|
||||
file://CVE-2026-22695.patch \
|
||||
file://CVE-2026-22801.patch \
|
||||
file://CVE-2026-25646.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937"
|
||||
|
||||
30
meta/recipes-support/gnutls/libtasn1/CVE-2025-13151.patch
Normal file
30
meta/recipes-support/gnutls/libtasn1/CVE-2025-13151.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From ff7aa7ef2b9ba41df8f2d1e71b05bf2c2ad868dd Mon Sep 17 00:00:00 2001
|
||||
From: Vijay Sarvepalli <vssarvepalli@cert.org>
|
||||
Date: Mon, 22 Dec 2025 12:24:27 -0500
|
||||
Subject: [PATCH] Fix for CVE-2025-13151 Buffer overflow
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.com/gnutls/libtasn1/-/commit/d276cc495a2a32b182c3c39851f1ba58f2d9f9b8]
|
||||
CVE: CVE-2025-13151
|
||||
|
||||
Signed-off-by: Simon Josefsson <simon@josefsson.org>
|
||||
Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
|
||||
---
|
||||
lib/decoding.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/decoding.c b/lib/decoding.c
|
||||
index 1e0fcb3..abcb49f 100644
|
||||
--- a/lib/decoding.c
|
||||
+++ b/lib/decoding.c
|
||||
@@ -1983,7 +1983,7 @@ int
|
||||
asn1_expand_octet_string (asn1_node_const definitions, asn1_node *element,
|
||||
const char *octetName, const char *objectName)
|
||||
{
|
||||
- char name[2 * ASN1_MAX_NAME_SIZE + 1], value[ASN1_MAX_NAME_SIZE];
|
||||
+ char name[2 * ASN1_MAX_NAME_SIZE + 2], value[ASN1_MAX_NAME_SIZE];
|
||||
int retCode = ASN1_SUCCESS, result;
|
||||
int len, len2, len3;
|
||||
asn1_node_const p2;
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
|
||||
|
||||
SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
|
||||
file://dont-depend-on-help2man.patch \
|
||||
file://CVE-2025-13151.patch \
|
||||
"
|
||||
|
||||
DEPENDS = "bison-native"
|
||||
|
||||
@@ -17,3 +17,6 @@ ALTERNATIVE_LINK_NAME[xxd] = "${bindir}/xxd"
|
||||
# in many places for _FORTIFY_SOURCE=2. Security flags become part of CC.
|
||||
#
|
||||
lcl_maybe_fortify = "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=1',d)}"
|
||||
|
||||
# not-applicable-platform: Issue only applies on Windows
|
||||
CVE_CHECK_IGNORE += "CVE-2025-66476"
|
||||
|
||||
@@ -57,8 +57,8 @@ logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)
|
||||
|
||||
DEFAULT_INSTALL_DIR = os.path.join(os.path.split(scripts_path)[0],'buildtools')
|
||||
DEFAULT_BASE_URL = 'https://downloads.yoctoproject.org/releases/yocto'
|
||||
DEFAULT_RELEASE = 'yocto-4.0.31'
|
||||
DEFAULT_INSTALLER_VERSION = '4.0.31'
|
||||
DEFAULT_RELEASE = 'yocto-4.0.32'
|
||||
DEFAULT_INSTALLER_VERSION = '4.0.32'
|
||||
DEFAULT_BUILDDATE = '202110XX'
|
||||
|
||||
# Python version sanity check
|
||||
|
||||
Reference in New Issue
Block a user