mirror of
https://git.yoctoproject.org/poky
synced 2026-03-18 21:32:22 +01:00
Compare commits
105 Commits
yocto-4.0.
...
kirkstone
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02c15addea | ||
|
|
ed80e89d57 | ||
|
|
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 | ||
|
|
ff118ede82 | ||
|
|
d5bcc413d0 | ||
|
|
72eb266009 | ||
|
|
d66f9ee0ef | ||
|
|
5489d2b5b6 | ||
|
|
e3fdce60c0 | ||
|
|
a4aa1bc237 | ||
|
|
cb99d0b1c5 | ||
|
|
e1c9a5d58f | ||
|
|
0071164ce8 | ||
|
|
10233e97f7 | ||
|
|
941d1d47c1 | ||
|
|
5abd143cb5 | ||
|
|
71ae82a596 | ||
|
|
6f2c1098a6 | ||
|
|
74924f0891 | ||
|
|
d087748248 | ||
|
|
401a9cdd7d | ||
|
|
42eb45b3a0 | ||
|
|
3a3b526edb | ||
|
|
8a6b3d82f6 | ||
|
|
2c23fc4f0e | ||
|
|
71966f1bad | ||
|
|
cd8f4444b2 | ||
|
|
2bf97e4e41 | ||
|
|
fd21399bac | ||
|
|
2654f4f66c | ||
|
|
cfb6825c35 | ||
|
|
51201f6c54 | ||
|
|
a12f120831 | ||
|
|
4c8419bebe | ||
|
|
842275784a | ||
|
|
46bfac5bd7 | ||
|
|
17f7dd686d | ||
|
|
3f703ca1c4 | ||
|
|
15ea9a3dcb | ||
|
|
b06df1f496 | ||
|
|
32417b8ef7 | ||
|
|
0092f97678 | ||
|
|
0736fb2025 | ||
|
|
c942cdb057 | ||
|
|
690dcd2621 | ||
|
|
084488d13f | ||
|
|
5e7ac0aa43 | ||
|
|
37dc9a476a | ||
|
|
1e47a3035c | ||
|
|
d35837e3cd | ||
|
|
33cffc4716 | ||
|
|
df858d86ed | ||
|
|
c1f7fcc84f | ||
|
|
9af12b047e | ||
|
|
652e8fc3b9 | ||
|
|
cde4ddcfd1 | ||
|
|
0183740845 |
@@ -221,6 +221,20 @@ Recipes need to define both the :term:`LICENSE` and
|
||||
``meta/files/common-licenses/`` or the :term:`SPDXLICENSEMAP` flag names
|
||||
defined in ``meta/conf/licenses.conf``.
|
||||
|
||||
.. note::
|
||||
|
||||
Setting a :term:`LICENSE` in a recipe applies to the software to be built
|
||||
by this recipe, not to the recipe file itself. The license of recipes,
|
||||
configuration files and scripts should also be clearly specified, for
|
||||
example via comments or via a license found in the :term:`layer` that
|
||||
holds these files. These license files are usually found at the root of
|
||||
the layer. Exceptions should be clearly stated in the layer README or
|
||||
LICENSE file.
|
||||
|
||||
For example, the :term:`OpenEmbedded-Core (OE-Core)` layer provides both
|
||||
the GPL-2.0-only and MIT license files, and a "LICENSE" file to explain
|
||||
how these two licenses are attributed to files found in the layer.
|
||||
|
||||
- :term:`LIC_FILES_CHKSUM`: The OpenEmbedded build system uses this
|
||||
variable to make sure the license text has not changed. If it has,
|
||||
the build produces an error and it affords you the chance to figure
|
||||
|
||||
@@ -41,7 +41,6 @@ Yocto Project Development Tasks Manual
|
||||
build-quality
|
||||
debugging
|
||||
licenses
|
||||
security-subjects
|
||||
vulnerabilities
|
||||
sbom
|
||||
error-reporting-tool
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,194 +0,0 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Dealing with Vulnerability Reports
|
||||
**********************************
|
||||
|
||||
The Yocto Project and OpenEmbedded are open-source, community-based projects
|
||||
used in numerous products. They assemble multiple other open-source projects,
|
||||
and need to handle security issues and practices both internal (in the code
|
||||
maintained by both projects), and external (maintained by other projects and
|
||||
organizations).
|
||||
|
||||
This manual assembles security-related information concerning the whole
|
||||
ecosystem. It includes information on reporting a potential security issue,
|
||||
the operation of the YP Security team and how to contribute in the
|
||||
related code. It is written to be useful for both security researchers and
|
||||
YP developers.
|
||||
|
||||
How to report a potential security vulnerability?
|
||||
=================================================
|
||||
|
||||
If you would like to report a public issue (for example, one with a released
|
||||
CVE number), please report it using the
|
||||
:yocto_bugs:`Security Bugzilla </enter_bug.cgi?product=Security>`.
|
||||
|
||||
If you are dealing with a not-yet-released issue, or an urgent one, please send
|
||||
a message to security AT yoctoproject DOT org, including as many details as
|
||||
possible: the layer or software module affected, the recipe and its version,
|
||||
and any example code, if available. This mailing list is monitored by the
|
||||
Yocto Project Security team.
|
||||
|
||||
For each layer, you might also look for specific instructions (if any) for
|
||||
reporting potential security issues in the specific ``SECURITY.md`` file at the
|
||||
root of the repository. Instructions on how and where submit a patch are
|
||||
usually available in ``README.md``. If this is your first patch to the
|
||||
Yocto Project/OpenEmbedded, you might want to have a look into the
|
||||
Contributor's Manual section
|
||||
":ref:`contributor-guide/submit-changes:preparing changes for submission`".
|
||||
|
||||
Branches maintained with security fixes
|
||||
---------------------------------------
|
||||
|
||||
See the
|
||||
:ref:`Release process <ref-manual/release-process:Stable Release Process>`
|
||||
documentation for details regarding the policies and maintenance of stable
|
||||
branches.
|
||||
|
||||
The :yocto_home:`Releases </development/releases/>` page contains a list of all
|
||||
releases of the Yocto Project, grouped into current and previous releases.
|
||||
Previous releases are no longer actively maintained with security patches, but
|
||||
well-tested patches may still be accepted for them for significant issues.
|
||||
|
||||
Security-related discussions at the Yocto Project
|
||||
-------------------------------------------------
|
||||
|
||||
We have set up two security-related emails/mailing lists:
|
||||
|
||||
- Public Mailing List: yocto [dash] security [at] yoctoproject[dot] org
|
||||
|
||||
This is a public mailing list for anyone to subscribe to. This list is an
|
||||
open list to discuss public security issues/patches and security-related
|
||||
initiatives. For more information, including subscription information,
|
||||
please see the :yocto_lists:`yocto-security mailing list info page
|
||||
</g/yocto-security>`.
|
||||
|
||||
This list requires moderator approval for new topics to be posted, to avoid
|
||||
private security reports to be posted by mistake.
|
||||
|
||||
- Yocto Project Security Team: security [at] yoctoproject [dot] org
|
||||
|
||||
This is an email for reporting non-published potential vulnerabilities.
|
||||
Emails sent to this address are forwarded to the Yocto Project Security
|
||||
Team members.
|
||||
|
||||
|
||||
What you should do if you find a security vulnerability
|
||||
-------------------------------------------------------
|
||||
|
||||
If you find a security flaw: a crash, an information leakage, or anything that
|
||||
can have a security impact if exploited in any Open Source software built or
|
||||
used by the Yocto Project, please report this to the Yocto Project Security
|
||||
Team. If you prefer to contact the upstream project directly, please send a
|
||||
copy to the security team at the Yocto Project as well. If you believe this is
|
||||
highly sensitive information, please report the vulnerability in a secure way,
|
||||
i.e. encrypt the email and send it to the private list. This ensures that
|
||||
the exploit is not leaked and exploited before a response/fix has been generated.
|
||||
|
||||
Security team
|
||||
=============
|
||||
|
||||
The Yocto Project/OpenEmbedded security team coordinates the work on security
|
||||
subjects in the project. All general discussion takes place publicly. The
|
||||
Security Team only uses confidential communication tools to deal with private
|
||||
vulnerability reports before they are released.
|
||||
|
||||
Security team appointment
|
||||
-------------------------
|
||||
|
||||
The Yocto Project Security Team consists of at least three members. When new
|
||||
members are needed, the Yocto Project Technical Steering Committee (YP TSC)
|
||||
asks for nominations by public channels including a nomination deadline.
|
||||
Self-nominations are possible. When the limit time is
|
||||
reached, the YP TSC posts the list of candidates for the comments of project
|
||||
participants and developers. Comments may be sent publicly or privately to the
|
||||
YP and OE TSCs. The candidates are approved by both YP TSC and OpenEmbedded
|
||||
Technical Steering Committee (OE TSC) and the final list of the team members
|
||||
is announced publicly. The aim is to have people representing technical
|
||||
leadership, security knowledge and infrastructure present with enough people
|
||||
to provide backup/coverage but keep the notification list small enough to
|
||||
minimize information risk and maintain trust.
|
||||
|
||||
YP Security Team members may resign at any time.
|
||||
|
||||
Security Team Operations
|
||||
------------------------
|
||||
|
||||
The work of the Security Team might require high confidentiality. Team members
|
||||
are individuals selected by merit and do not represent the companies they work
|
||||
for. They do not share information about confidential issues outside of the team
|
||||
and do not hint about ongoing embargoes.
|
||||
|
||||
Team members can bring in domain experts as needed. Those people should be
|
||||
added to individual issues only and adhere to the same standards as the YP
|
||||
Security Team.
|
||||
|
||||
The YP security team organizes its meetings and communication as needed.
|
||||
|
||||
When the YP Security team receives a report about a potential security
|
||||
vulnerability, they quickly analyze and notify the reporter of the result.
|
||||
They might also request more information.
|
||||
|
||||
If the issue is confirmed and affects the code maintained by the YP, they
|
||||
confidentially notify maintainers of that code and work with them to prepare
|
||||
a fix.
|
||||
|
||||
If the issue is confirmed and affects an upstream project, the YP security team
|
||||
notifies the project. Usually, the upstream project analyzes the problem again.
|
||||
If they deem it a real security problem in their software, they develop and
|
||||
release a fix following their security policy. They may want to include the
|
||||
original reporter in the loop. There is also sometimes some coordination for
|
||||
handling patches, backporting patches etc, or just understanding the problem
|
||||
or what caused it.
|
||||
|
||||
When the fix is publicly available, the YP security team member or the
|
||||
package maintainer sends patches against the YP code base, following usual
|
||||
procedures, including public code review.
|
||||
|
||||
What Yocto Security Team does when it receives a security vulnerability
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
The YP Security Team team performs a quick analysis and would usually report
|
||||
the flaw to the upstream project. Normally the upstream project analyzes the
|
||||
problem. If they deem it a real security problem in their software, they
|
||||
develop and release a fix following their own security policy. They may want
|
||||
to include the original reporter in the loop. There is also sometimes some
|
||||
coordination for handling patches, backporting patches etc, or just
|
||||
understanding the problem or what caused it.
|
||||
|
||||
The security policy of the upstream project might include a notification to
|
||||
Linux distributions or other important downstream projects in advance to
|
||||
discuss coordinated disclosure. These mailing lists are normally non-public.
|
||||
|
||||
When the upstream project releases a version with the fix, they are responsible
|
||||
for contacting `Mitre <https://www.cve.org/>`__ to get a CVE number assigned and
|
||||
the CVE record published.
|
||||
|
||||
If an upstream project does not respond quickly
|
||||
-----------------------------------------------
|
||||
|
||||
If an upstream project does not fix the problem in a reasonable time,
|
||||
the Yocto's Security Team will contact other interested parties (usually
|
||||
other distributions) in the community and together try to solve the
|
||||
vulnerability as quickly as possible.
|
||||
|
||||
The Yocto Project Security team adheres to the 90 days disclosure policy
|
||||
by default. An increase of the embargo time is possible when necessary.
|
||||
|
||||
Current Security Team members
|
||||
-----------------------------
|
||||
|
||||
For secure communications, please send your messages encrypted using the GPG
|
||||
keys. Remember, message headers are not encrypted so do not include sensitive
|
||||
information in the subject line.
|
||||
|
||||
- Ross Burton: <ross@burtonini.com> `Public key <https://keys.openpgp.org/search?q=ross%40burtonini.com>`__
|
||||
|
||||
- Michael Halstead: <mhalstead [at] linuxfoundation [dot] org>
|
||||
`Public key <https://pgp.mit.edu/pks/lookup?op=vindex&search=0x3373170601861969>`__
|
||||
or `Public key <https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xd1f2407285e571ed12a407a73373170601861969>`__
|
||||
|
||||
- Richard Purdie: <richard.purdie@linuxfoundation.org> `Public key <https://keys.openpgp.org/search?q=richard.purdie%40linuxfoundation.org>`__
|
||||
|
||||
- Marta Rybczynska: <marta DOT rybczynska [at] syslinbit [dot] com> `Public key <https://keys.openpgp.org/search?q=marta.rybczynska@syslinbit.com>`__
|
||||
|
||||
- Steve Sakoman: <steve [at] sakoman [dot] com> `Public key <https://keys.openpgp.org/search?q=steve%40sakoman.com>`__
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 214 KiB |
@@ -20,7 +20,6 @@ Welcome to the Yocto Project Documentation
|
||||
Yocto Project Software Overview <https://www.yoctoproject.org/software-overview/>
|
||||
Tips and Tricks Wiki <https://wiki.yoctoproject.org/wiki/TipsAndTricks>
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Manuals
|
||||
@@ -37,6 +36,12 @@ Welcome to the Yocto Project Documentation
|
||||
Test Environment Manual <test-manual/index>
|
||||
bitbake
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Security
|
||||
|
||||
Yocto Project Security Reference <security-reference/index>
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Release Manuals
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -165,7 +165,7 @@ The following diagram represents the high-level workflow of a build. The
|
||||
remainder of this section expands on the fundamental input, output,
|
||||
process, and metadata logical blocks that make up the workflow.
|
||||
|
||||
.. image:: figures/YP-flow-diagram.png
|
||||
.. image:: svg/yp-flow-diagram.*
|
||||
:align: center
|
||||
|
||||
In general, the build's workflow consists of several functional areas:
|
||||
@@ -454,7 +454,7 @@ typically find in the distribution layer:
|
||||
(``conf/distro/distro.conf``), and any distribution-wide include
|
||||
files.
|
||||
|
||||
- *recipes-*:* Recipes and append files that affect common
|
||||
- *recipes-\*:* Recipes and append files that affect common
|
||||
functionality across the distribution. This area could include
|
||||
recipes and append files to add distribution-specific configuration,
|
||||
initialization scripts, custom image recipes, and so forth. Examples
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 186 KiB |
950
documentation/overview-manual/svg/yp-flow-diagram.svg
Normal file
950
documentation/overview-manual/svg/yp-flow-diagram.svg
Normal file
@@ -0,0 +1,950 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="760.50098"
|
||||
height="352.582"
|
||||
viewBox="0 0 760.50095 352.582"
|
||||
enable-background="new 0 0 758.189 424.276"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="yp-flow-diagram.svg"
|
||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs86">
|
||||
|
||||
</defs><sodipodi:namedview
|
||||
id="namedview86"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="2.8284271"
|
||||
inkscape:cx="296.80807"
|
||||
inkscape:cy="212.83914"
|
||||
inkscape:window-width="1906"
|
||||
inkscape:window-height="934"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1" />
|
||||
<g
|
||||
id="g17"
|
||||
transform="matrix(1,0,0,1.0035497,-2.0824824,-11.037238)"><rect
|
||||
style="opacity:1;fill:#00b6de;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11"
|
||||
width="484.25"
|
||||
height="249"
|
||||
x="90"
|
||||
y="112.5" /><rect
|
||||
style="fill:#00b6de;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-8"
|
||||
width="12"
|
||||
height="12"
|
||||
x="507.56818"
|
||||
y="-301.10004"
|
||||
ry="0"
|
||||
transform="rotate(44.313856)" /><rect
|
||||
style="fill:#e6e6e6;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-8-1"
|
||||
width="12"
|
||||
height="12"
|
||||
x="361.46231"
|
||||
y="-89.463524"
|
||||
ry="0"
|
||||
transform="rotate(44.313856)" /><rect
|
||||
style="fill:#e6e6e6;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-8-1-1"
|
||||
width="12"
|
||||
height="12"
|
||||
x="389.40585"
|
||||
y="-60.842598"
|
||||
ry="0"
|
||||
transform="rotate(44.313856)" /><rect
|
||||
style="fill:#e6e6e6;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-8-1-1-0"
|
||||
width="12"
|
||||
height="12"
|
||||
x="416.47607"
|
||||
y="-33.116081"
|
||||
ry="0"
|
||||
transform="rotate(44.313856)" /></g><rect
|
||||
style="fill:#e6e6e6;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-9"
|
||||
width="87"
|
||||
height="216"
|
||||
x="193.91776"
|
||||
y="119.24599" /><rect
|
||||
style="fill:#e6e6e6;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-8-1-4"
|
||||
width="12"
|
||||
height="12"
|
||||
x="487.27533"
|
||||
y="-296.15897"
|
||||
ry="0"
|
||||
transform="rotate(44.313856)" /><rect
|
||||
style="fill:#e6e6e6;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-9-3"
|
||||
width="85.75"
|
||||
height="219.75"
|
||||
x="470.16751"
|
||||
y="119.49599" /><g
|
||||
id="g2"
|
||||
transform="translate(2.3119996,-71.694)">
|
||||
<g
|
||||
id="g1">
|
||||
<polygon
|
||||
fill="#00b6de"
|
||||
points="703.77,340.194 712.852,349.277 721.934,340.194 758.189,340.194 758.189,256.861 723.582,256.861 713.171,267.274 702.758,256.861 628.582,256.861 618.171,267.274 607.758,256.861 561.523,256.861 561.523,340.194 609.104,340.194 618.186,349.277 627.268,340.194 "
|
||||
id="polygon1" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g4"
|
||||
transform="translate(2.3119996,-71.694)">
|
||||
<g
|
||||
id="g3">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="712.837,278.274 707.221,272.658 676.557,272.658 676.557,333.657 706.983,333.657 713.055,339.729 719.128,333.657 751.557,333.657 751.557,272.658 718.452,272.658 "
|
||||
id="polygon2" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g6"
|
||||
transform="translate(2.3119996,-71.694)">
|
||||
<g
|
||||
id="g5">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="618.171,278.274 611.555,271.658 581.558,271.658 581.558,332.657 611.983,332.657 618.056,338.729 624.128,332.657 656.558,332.657 656.558,271.658 624.786,271.658 "
|
||||
id="polygon4" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g8"
|
||||
transform="translate(2.3119996,-71.694)"
|
||||
style="fill:#000080">
|
||||
<g
|
||||
id="g7"
|
||||
style="fill:#000080">
|
||||
<polygon
|
||||
fill="#ed1849"
|
||||
points="722.166,349.277 712.504,358.941 702.84,349.277 670.523,349.277 670.523,424.276 757.523,424.276 757.523,349.277 "
|
||||
id="polygon6"
|
||||
style="fill:#000080" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g10"
|
||||
transform="translate(2.3119996,-71.694)"
|
||||
style="fill:#000080">
|
||||
<g
|
||||
id="g9"
|
||||
style="fill:#000080">
|
||||
<polygon
|
||||
fill="#ed1849"
|
||||
points="628.371,348.611 618.043,358.941 607.713,348.611 575.523,348.611 575.523,423.61 662.523,423.61 662.523,348.611 "
|
||||
id="polygon8"
|
||||
style="fill:#000080" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
<g
|
||||
id="g14"
|
||||
transform="translate(2.3119996,-71.694)">
|
||||
<g
|
||||
id="g13">
|
||||
<polygon
|
||||
fill="#c1d82f"
|
||||
points="575.428,217.35 575.428,250.526 610.09,250.526 618.171,258.607 626.251,250.526 705.09,250.526 713.171,258.607 721.251,250.526 757.427,250.526 757.427,173.527 575.428,173.527 575.428,199.703 584.252,208.525 "
|
||||
id="polygon12" />
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<g
|
||||
id="g26"
|
||||
transform="translate(0.4155534,-73.944)">
|
||||
<g
|
||||
id="g25">
|
||||
<polygon
|
||||
fill="#4a4a30"
|
||||
points="177.974,133.944 125.111,133.944 118.043,141.013 110.974,133.944 86.834,133.944 86.834,166.944 178.263,166.944 184.834,173.514 191.403,166.944 281.833,166.944 281.833,133.944 258.611,133.944 251.543,141.013 244.474,133.944 192.111,133.944 185.043,141.013 "
|
||||
id="polygon24" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g28"
|
||||
transform="matrix(0.93986241,0,0,1,-22.331287,-17.694)">
|
||||
<g
|
||||
id="g27">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="330.188,290.202 330.188,296.444 511.188,296.444 511.188,289.015 517.259,282.942 511.188,276.87 511.188,268.444 330.188,268.444 330.188,277.683 336.447,283.942 "
|
||||
id="polygon26" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g30"
|
||||
transform="matrix(0.93986241,0,0,1,-22.331287,-17.694)">
|
||||
<g
|
||||
id="g29">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="330.188,251.536 330.188,257.944 511.188,257.944 511.188,250.515 517.259,244.442 511.188,238.37 511.188,229.944 330.188,229.944 330.188,239.016 336.447,245.276 "
|
||||
id="polygon28" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g32"
|
||||
transform="matrix(0.93986241,0,0,1,-22.331287,-17.694)">
|
||||
<g
|
||||
id="g31">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="330.188,211.18 330.188,218.444 511.188,218.444 511.188,211.015 517.259,204.942 511.188,198.87 511.188,190.444 330.188,190.444 330.188,199.372 336.092,205.276 "
|
||||
id="polygon30" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g34"
|
||||
transform="translate(-40.188,-71.694)">
|
||||
<g
|
||||
id="g33">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="144.188,342.944 144.188,406.944 225.188,406.944 225.188,381.515 231.259,375.442 225.188,369.37 225.188,342.944 190.445,342.944 184.043,349.348 177.639,342.944 "
|
||||
id="polygon32" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g36"
|
||||
transform="translate(-40.188,-71.694)">
|
||||
<g
|
||||
id="g35">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="177.618,330.944 184.188,337.514 190.757,330.944 225.188,330.944 225.188,266.944 190.778,266.944 183.71,274.014 176.64,266.944 144.188,266.944 144.188,330.944 "
|
||||
id="polygon34" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g38"
|
||||
transform="translate(-40.188,-71.694)">
|
||||
<g
|
||||
id="g37">
|
||||
<polygon
|
||||
fill="#e6e6e6"
|
||||
points="177.118,254.944 183.688,261.514 190.257,254.944 224.688,254.944 224.688,190.944 191.445,190.944 184.376,198.014 177.306,190.944 143.688,190.944 143.688,254.944 "
|
||||
id="polygon36" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g40"
|
||||
transform="matrix(1,0,0,0.86327911,0.062,-77.645148)">
|
||||
<g
|
||||
id="g39">
|
||||
<polygon
|
||||
fill="#4a4a30"
|
||||
points="81.188,221.611 0.188,221.611 0.188,285.61 81.188,285.61 81.188,260.181 87.259,254.109 81.188,248.037 "
|
||||
id="polygon38" />
|
||||
</g>
|
||||
</g><g
|
||||
id="g40-0"
|
||||
transform="matrix(1,0,0,0.86327911,0.312,-18.368819)">
|
||||
<g
|
||||
id="g39-6">
|
||||
<polygon
|
||||
fill="#4a4a30"
|
||||
points="87.259,254.109 81.188,248.037 81.188,221.611 0.188,221.611 0.188,285.61 81.188,285.61 81.188,260.181 "
|
||||
id="polygon38-4" />
|
||||
</g>
|
||||
</g><g
|
||||
id="g40-0-2"
|
||||
transform="matrix(1,0,0,0.86327911,0.062,40.907511)">
|
||||
<g
|
||||
id="g39-6-5">
|
||||
<polygon
|
||||
fill="#4a4a30"
|
||||
points="87.259,254.109 81.188,248.037 81.188,221.611 0.188,221.611 0.188,285.61 81.188,285.61 81.188,260.181 "
|
||||
id="polygon38-4-8" />
|
||||
</g>
|
||||
</g><g
|
||||
id="g40-0-28"
|
||||
transform="matrix(1,0,0,0.86327911,-0.188,100.18384)">
|
||||
<g
|
||||
id="g39-6-4">
|
||||
<polygon
|
||||
fill="#4a4a30"
|
||||
points="81.188,285.61 81.188,260.181 87.259,254.109 81.188,248.037 81.188,221.611 0.188,221.611 0.188,285.61 "
|
||||
id="polygon38-4-7" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g42"
|
||||
transform="translate(0.062,-71.944)"
|
||||
style="fill:#ff7f2a">
|
||||
<g
|
||||
id="g41"
|
||||
style="fill:#ff7f2a">
|
||||
<polygon
|
||||
fill="#7e8082"
|
||||
points="178.618,123.944 185.188,130.514 191.757,123.944 215.188,123.944 215.188,71.944 154.188,71.944 154.188,123.944 "
|
||||
id="polygon40"
|
||||
style="fill:#ff7f2a" />
|
||||
</g>
|
||||
</g>
|
||||
<rect
|
||||
x="126.062"
|
||||
y="75.334"
|
||||
fill="none"
|
||||
width="116.666"
|
||||
height="21.333"
|
||||
id="rect42" />
|
||||
<text
|
||||
fill="#ffffff"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text42"
|
||||
x="139.47949"
|
||||
y="82.440079"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Source Materials</text>
|
||||
<rect
|
||||
x="155.41699"
|
||||
y="10.834001"
|
||||
fill="none"
|
||||
width="58.666"
|
||||
height="40.667"
|
||||
id="rect43" />
|
||||
<text
|
||||
id="text44"
|
||||
x="190.00726"
|
||||
y="29.10741"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:49.6985"
|
||||
transform="translate(-5.5244746,-7.8775879)"
|
||||
xml:space="preserve"><tspan
|
||||
x="190.00726"
|
||||
y="29.10741"
|
||||
id="tspan1">Local<tspan
|
||||
y="29.10741"
|
||||
id="tspan2"> </tspan></tspan><tspan
|
||||
x="190.00726"
|
||||
y="42.440787"
|
||||
id="tspan3">Projects</tspan></text>
|
||||
<g
|
||||
id="g45"
|
||||
transform="translate(0.062,-71.944)"
|
||||
style="fill:#ff7f2a">
|
||||
<g
|
||||
id="g44"
|
||||
style="fill:#ff7f2a">
|
||||
<polygon
|
||||
fill="#7e8082"
|
||||
points="245.118,123.944 251.688,130.514 258.257,123.944 281.688,123.944 281.688,71.944 220.688,71.944 220.688,123.944 "
|
||||
id="polygon44"
|
||||
style="fill:#ff7f2a" />
|
||||
</g>
|
||||
</g>
|
||||
<rect
|
||||
x="221.91699"
|
||||
y="7.8340006"
|
||||
fill="none"
|
||||
width="58.666"
|
||||
height="40.667"
|
||||
id="rect45" />
|
||||
<text
|
||||
id="text47"
|
||||
x="258.17291"
|
||||
y="26.10741"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:56.5275;fill:#000000"
|
||||
transform="translate(-6.4360358,-3.6326896)"
|
||||
xml:space="preserve"><tspan
|
||||
x="258.17291"
|
||||
y="26.10741"
|
||||
id="tspan4">SCMs<tspan
|
||||
y="26.10741"
|
||||
id="tspan5"> </tspan></tspan><tspan
|
||||
x="258.17291"
|
||||
y="39.440787"
|
||||
id="tspan6">(optional)</tspan></text>
|
||||
<g
|
||||
id="g48"
|
||||
transform="translate(0.062,-71.944)"
|
||||
style="fill:#ff7f2a">
|
||||
<g
|
||||
id="g47"
|
||||
style="fill:#ff7f2a">
|
||||
<polygon
|
||||
fill="#7e8082"
|
||||
points="111.618,123.944 118.188,130.514 124.757,123.944 148.188,123.944 148.188,71.944 87.188,71.944 87.188,123.944 "
|
||||
id="polygon47"
|
||||
style="fill:#ff7f2a" />
|
||||
</g>
|
||||
</g>
|
||||
<rect
|
||||
x="88.417007"
|
||||
y="10.834001"
|
||||
fill="none"
|
||||
width="58.666"
|
||||
height="40.667"
|
||||
id="rect48" />
|
||||
<text
|
||||
id="text49"
|
||||
x="125.51399"
|
||||
y="29.10741"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:64.823"
|
||||
transform="translate(-8.2169997,-13.75401)"
|
||||
xml:space="preserve"><tspan
|
||||
x="125.51399"
|
||||
y="29.10741"
|
||||
id="tspan7">Upstream<tspan
|
||||
y="29.10741"
|
||||
id="tspan8"> </tspan></tspan><tspan
|
||||
x="125.51399"
|
||||
y="42.440787"
|
||||
id="tspan9">Project<tspan
|
||||
y="42.440787"
|
||||
id="tspan10"> </tspan></tspan><tspan
|
||||
x="125.51399"
|
||||
y="55.774165"
|
||||
id="tspan11">Releases</tspan></text>
|
||||
<rect
|
||||
x="115.167"
|
||||
y="137.084"
|
||||
fill="none"
|
||||
width="58.666"
|
||||
height="40.667"
|
||||
id="rect49" />
|
||||
<text
|
||||
id="text51"
|
||||
x="128.34723"
|
||||
y="147.37112"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"><tspan
|
||||
x="128.34723"
|
||||
y="147.37112"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan50"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Source </tspan><tspan
|
||||
x="123.54125"
|
||||
y="161.77113"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan51"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Fetching</tspan></text>
|
||||
<rect
|
||||
x="115.167"
|
||||
y="215.08401"
|
||||
fill="none"
|
||||
width="58.666"
|
||||
height="40.666"
|
||||
id="rect51" />
|
||||
<text
|
||||
id="text53"
|
||||
x="131.82678"
|
||||
y="224.31099"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"><tspan
|
||||
x="131.82678"
|
||||
y="224.31099"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan52"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Patch </tspan><tspan
|
||||
x="117.00081"
|
||||
y="238.70999"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan53"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Application</tspan></text>
|
||||
<rect
|
||||
x="107.167"
|
||||
y="279.08401"
|
||||
fill="none"
|
||||
width="74.166"
|
||||
height="69.237"
|
||||
id="rect53" />
|
||||
<text
|
||||
id="text57"
|
||||
x="149.00055"
|
||||
y="297.35791"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:74.8743"
|
||||
transform="translate(-3.496696,4.953096)"
|
||||
xml:space="preserve"><tspan
|
||||
x="149.00055"
|
||||
y="297.35791"
|
||||
id="tspan12">Configuration /<tspan
|
||||
y="297.35791"
|
||||
id="tspan13"> </tspan></tspan><tspan
|
||||
x="149.00055"
|
||||
y="310.69127"
|
||||
id="tspan14">Compile</tspan></text>
|
||||
<rect
|
||||
x="201.16699"
|
||||
y="184.084"
|
||||
fill="none"
|
||||
width="74.166"
|
||||
height="89.237"
|
||||
id="rect57" />
|
||||
<text
|
||||
id="text63"
|
||||
x="221.86859"
|
||||
y="192.60429"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"><tspan
|
||||
x="221.86859"
|
||||
y="192.60429"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan58"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Output </tspan><tspan
|
||||
x="211.42859"
|
||||
y="207.0043"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan59"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Analysis for </tspan><tspan
|
||||
x="218.94058"
|
||||
y="221.4043"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan60"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">package </tspan><tspan
|
||||
x="207.54759"
|
||||
y="235.80429"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan61"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">splitting plus </tspan><tspan
|
||||
x="218.94058"
|
||||
y="250.2043"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan62"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">package </tspan><tspan
|
||||
x="207.81059"
|
||||
y="264.60431"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan63"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">relationships</tspan></text><text
|
||||
id="text63-1"
|
||||
x="555.48315"
|
||||
y="202.90402"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:31.0495"
|
||||
transform="translate(-42.334211,23.629617)"
|
||||
xml:space="preserve"><tspan
|
||||
x="555.48315"
|
||||
y="202.90402"
|
||||
id="tspan15">QA<tspan
|
||||
y="202.90402"
|
||||
id="tspan16"> </tspan></tspan><tspan
|
||||
x="555.48315"
|
||||
y="216.2374"
|
||||
id="tspan18">Tests</tspan></text>
|
||||
<rect
|
||||
x="319.146"
|
||||
y="127.084"
|
||||
fill="none"
|
||||
width="116.666"
|
||||
height="21.333"
|
||||
id="rect63" />
|
||||
<text
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text64"
|
||||
x="335.19238"
|
||||
y="189.60429"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">.rpm generation</text>
|
||||
<rect
|
||||
x="319.146"
|
||||
y="166.584"
|
||||
fill="none"
|
||||
width="116.666"
|
||||
height="21.333"
|
||||
id="rect64" />
|
||||
<text
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text65"
|
||||
x="335.76849"
|
||||
y="229.10429"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">.deb generation</text>
|
||||
<rect
|
||||
x="319.146"
|
||||
y="205.08401"
|
||||
fill="none"
|
||||
width="116.666"
|
||||
height="21.333"
|
||||
id="rect65" />
|
||||
<text
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text66"
|
||||
x="337.9404"
|
||||
y="267.60391"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">.ipk generation</text>
|
||||
<rect
|
||||
x="296.16699"
|
||||
y="307.08401"
|
||||
fill="none"
|
||||
width="77.166"
|
||||
height="30.237"
|
||||
id="rect66" />
|
||||
|
||||
<rect
|
||||
x="299.66699"
|
||||
y="261.08401"
|
||||
fill="none"
|
||||
width="71.853996"
|
||||
height="33.664001"
|
||||
id="rect67" />
|
||||
|
||||
<rect
|
||||
x="395.97998"
|
||||
y="261.08401"
|
||||
fill="none"
|
||||
width="71.853996"
|
||||
height="33.664001"
|
||||
id="rect69" />
|
||||
|
||||
<rect
|
||||
x="390.66699"
|
||||
y="307.08401"
|
||||
fill="none"
|
||||
width="77.166"
|
||||
height="30.237"
|
||||
id="rect71" />
|
||||
|
||||
<rect
|
||||
y="133"
|
||||
fill="none"
|
||||
width="81.666"
|
||||
height="39.334"
|
||||
id="rect73"
|
||||
x="0.061999973" />
|
||||
<text
|
||||
id="text75"
|
||||
x="64.610138"
|
||||
y="186.94585"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:66.7773"
|
||||
transform="translate(-23.458902,-49.50401)"
|
||||
xml:space="preserve"><tspan
|
||||
x="64.610138"
|
||||
y="186.94585"
|
||||
id="tspan20"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan19">User</tspan>
|
||||
</tspan><tspan
|
||||
x="64.610138"
|
||||
y="200.27922"
|
||||
id="tspan22"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan21">Configuration</tspan></tspan></text><text
|
||||
id="text75-4"
|
||||
x="64.610138"
|
||||
y="186.94585"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:66.7773"
|
||||
transform="translate(-24.603766,70.32617)"
|
||||
xml:space="preserve"><tspan
|
||||
x="64.610138"
|
||||
y="186.94585"
|
||||
id="tspan24"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan23">Machine BSP</tspan>
|
||||
</tspan><tspan
|
||||
x="64.610138"
|
||||
y="200.27922"
|
||||
id="tspan26"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan25">Configuration</tspan></tspan></text><text
|
||||
id="text75-4-6"
|
||||
x="64.610138"
|
||||
y="186.94585"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:66.7773"
|
||||
transform="translate(-25.353766,128.82617)"
|
||||
xml:space="preserve"><tspan
|
||||
x="64.610138"
|
||||
y="186.94585"
|
||||
id="tspan28"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan27">Policy</tspan>
|
||||
</tspan><tspan
|
||||
x="64.610138"
|
||||
y="200.27922"
|
||||
id="tspan30"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan29">Configuration</tspan></tspan></text>
|
||||
|
||||
<rect
|
||||
y="211.16798"
|
||||
fill="none"
|
||||
width="81.666"
|
||||
height="39.333"
|
||||
id="rect76"
|
||||
x="0.061999973" />
|
||||
<text
|
||||
id="text78"
|
||||
x="70.02713"
|
||||
y="265.4418"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:89.4625"
|
||||
transform="translate(-28.848315,-69.549143)"
|
||||
xml:space="preserve"><tspan
|
||||
x="70.02713"
|
||||
y="265.4418"
|
||||
id="tspan32"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan31">Metadata
|
||||
</tspan></tspan><tspan
|
||||
x="70.02713"
|
||||
y="278.77516"
|
||||
id="tspan34"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan33">(.bb + patches)</tspan></tspan></text>
|
||||
<rect
|
||||
x="612.83502"
|
||||
y="131.418"
|
||||
fill="none"
|
||||
width="112.186"
|
||||
height="20.163"
|
||||
id="rect78" />
|
||||
<text
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text79"
|
||||
x="629.87451"
|
||||
y="142.68779"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Package Feeds</text>
|
||||
<rect
|
||||
x="579.98102"
|
||||
y="306.25101"
|
||||
fill="none"
|
||||
width="81.666"
|
||||
height="39.332001"
|
||||
id="rect79" />
|
||||
<text
|
||||
fill="#ffffff"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text80"
|
||||
x="604.24854"
|
||||
y="319.7699"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Images</text>
|
||||
<rect
|
||||
x="584.14703"
|
||||
y="216.08499"
|
||||
fill="none"
|
||||
width="71.853996"
|
||||
height="33.664001"
|
||||
id="rect80" />
|
||||
<text
|
||||
id="text81"
|
||||
x="606.88434"
|
||||
y="227.1058"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"><tspan
|
||||
x="606.88434"
|
||||
y="227.1058"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan80"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Image </tspan><tspan
|
||||
x="594.48834"
|
||||
y="241.50479"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan81"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Generation</tspan></text>
|
||||
<rect
|
||||
x="678.83301"
|
||||
y="215.08499"
|
||||
fill="none"
|
||||
width="77.166"
|
||||
height="30.237"
|
||||
id="rect81" />
|
||||
<text
|
||||
id="text83"
|
||||
x="708.21045"
|
||||
y="228.6058"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"><tspan
|
||||
x="708.21045"
|
||||
y="228.6058"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan82"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">SDK </tspan><tspan
|
||||
x="690.33142"
|
||||
y="243.00479"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="tspan83"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Generation</tspan></text>
|
||||
<rect
|
||||
x="379.06299"
|
||||
y="86.834"
|
||||
fill="none"
|
||||
width="199.03999"
|
||||
height="21.164"
|
||||
id="rect83" />
|
||||
<text
|
||||
fill="#333333"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text84"
|
||||
x="426.28253"
|
||||
y="26.005543"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333">OpenEmbedded Architecture Workflow</text><g
|
||||
id="g18"
|
||||
transform="translate(-10.254525,-9.75401)"><rect
|
||||
style="fill:#00b6de;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-5"
|
||||
width="10"
|
||||
height="9.9646282"
|
||||
x="442.00568"
|
||||
y="76.711205"
|
||||
transform="matrix(1,0,0,1.0035497,0,-1.2832284)" /><text
|
||||
fill="#333333"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text84-6"
|
||||
x="456.48013"
|
||||
y="84.126945"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33333px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"
|
||||
id="tspan17">Build System</tspan></text></g><g
|
||||
id="g18-4"
|
||||
transform="translate(-10.254525,-25.970712)"><rect
|
||||
style="fill:#4a4a30;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-5-8"
|
||||
width="10"
|
||||
height="9.9646282"
|
||||
x="442.00568"
|
||||
y="76.711205"
|
||||
transform="matrix(1,0,0,1.0035497,0,-1.2832284)" /><text
|
||||
fill="#333333"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text84-6-0"
|
||||
x="456.48013"
|
||||
y="84.126945"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33333px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"
|
||||
id="tspan17-4">Metadata/Inputs</tspan></text></g><g
|
||||
id="g18-4-9"
|
||||
transform="translate(-10.254525,-42.187414)"><rect
|
||||
style="fill:#ff7f2a;fill-opacity:1;stroke:#ff631a;stroke-width:0.49911493;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-5-8-6"
|
||||
width="10"
|
||||
height="9.9646282"
|
||||
x="442.00568"
|
||||
y="76.711205"
|
||||
transform="matrix(1,0,0,1.0035497,0,-1.2832284)" /><text
|
||||
fill="#333333"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text84-6-0-1"
|
||||
x="456.48013"
|
||||
y="84.126945"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33333px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"
|
||||
id="tspan17-4-0">Upstream Source</tspan></text></g><g
|
||||
id="g18-4-9-2"
|
||||
transform="translate(101.50803,-40.934366)"><rect
|
||||
style="fill:#c1d82f;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-5-8-6-2"
|
||||
width="10"
|
||||
height="9.9646282"
|
||||
x="442.00568"
|
||||
y="76.711205"
|
||||
transform="matrix(1,0,0,1.0035497,0,-1.2832284)" /><text
|
||||
fill="#333333"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text84-6-0-1-2"
|
||||
x="456.48013"
|
||||
y="84.126945"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33333px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"
|
||||
id="tspan17-4-0-0">Output Packages</tspan></text></g><g
|
||||
id="g18-4-9-2-5"
|
||||
transform="translate(101.50803,-24.709046)"><rect
|
||||
style="fill:#e6e6e6;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-5-8-6-2-2"
|
||||
width="10"
|
||||
height="9.9646282"
|
||||
x="442.00568"
|
||||
y="76.711205"
|
||||
transform="matrix(1,0,0,1.0035497,0,-1.2832284)" /><text
|
||||
fill="#333333"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text84-6-0-1-2-9"
|
||||
x="456.48013"
|
||||
y="84.126945"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33333px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"
|
||||
id="tspan17-4-0-0-0">Process steps (tasks)</tspan></text></g><g
|
||||
id="g18-4-9-2-5-8"
|
||||
transform="translate(101.50803,-8.4837252)"><rect
|
||||
style="fill:#000080;fill-opacity:1;stroke:#ff631a;stroke-width:0;stroke-linejoin:bevel;stroke-miterlimit:0;stroke-dasharray:none"
|
||||
id="rect11-5-8-6-2-2-3"
|
||||
width="10"
|
||||
height="9.9646282"
|
||||
x="442.00568"
|
||||
y="76.711205"
|
||||
transform="matrix(1,0,0,1.0035497,0,-1.2832284)" /><text
|
||||
fill="#333333"
|
||||
font-family="MyriadPro-Regular"
|
||||
font-size="12px"
|
||||
id="text84-6-0-1-2-9-8"
|
||||
x="456.48013"
|
||||
y="84.126945"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#333333"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33333px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"
|
||||
id="tspan17-4-0-0-0-0">Output Imaga Data</tspan></text></g>
|
||||
|
||||
|
||||
<rect
|
||||
x="675.64801"
|
||||
y="304.91699"
|
||||
fill="none"
|
||||
width="81.666"
|
||||
height="39.332001"
|
||||
id="rect85" />
|
||||
<text
|
||||
id="text86"
|
||||
x="720.58508"
|
||||
y="322.93991"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.6667px;font-family:'Nimbus Sans L';-inkscape-font-specification:'Nimbus Sans L, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;text-anchor:middle;white-space:pre;inline-size:65.518"
|
||||
transform="translate(-2.5824824,-12.25401)"
|
||||
xml:space="preserve"><tspan
|
||||
x="720.58508"
|
||||
y="322.93991"
|
||||
id="tspan36"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan35">Application</tspan><tspan
|
||||
y="322.93991"
|
||||
id="tspan37"> </tspan></tspan><tspan
|
||||
x="720.58508"
|
||||
y="336.27327"
|
||||
id="tspan39"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan38">Development</tspan><tspan
|
||||
y="336.27327"
|
||||
id="tspan40"> </tspan></tspan><tspan
|
||||
x="720.58508"
|
||||
y="349.60665"
|
||||
id="tspan42"><tspan
|
||||
style="fill:#ffffff"
|
||||
id="tspan41">SDK</tspan></tspan></text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 38 KiB |
@@ -44,7 +44,7 @@ Here are features and advantages of the Yocto Project:
|
||||
system, software, and service vendors adopt and support the Yocto
|
||||
Project in their products and services. For a look at the Yocto
|
||||
Project community and the companies involved with the Yocto Project,
|
||||
see the "COMMUNITY" and "ECOSYSTEM" tabs on the
|
||||
see the "COMMUNITY" and "ABOUT" tabs on the
|
||||
:yocto_home:`Yocto Project <>` home page.
|
||||
|
||||
- *Architecture Agnostic:* Yocto Project supports Intel, ARM, MIPS,
|
||||
@@ -60,10 +60,9 @@ Here are features and advantages of the Yocto Project:
|
||||
move between architectures without moving to new development
|
||||
environments. Additionally, if you have used the Yocto Project to
|
||||
create an image or application and you find yourself not able to
|
||||
support it, commercial Linux vendors such as Wind River, Mentor
|
||||
Graphics, Timesys, and ENEA could take it and provide ongoing
|
||||
support. These vendors have offerings that are built using the Yocto
|
||||
Project.
|
||||
support it, commercial Linux vendors listed on :yocto_home:`/members/` and
|
||||
:yocto_home:`/about/participants/` could take it and provide ongoing
|
||||
support.
|
||||
|
||||
- *Flexibility:* Corporations use the Yocto Project many different
|
||||
ways. One example is to create an internal Linux distribution as a
|
||||
@@ -734,7 +733,7 @@ The :term:`OpenEmbedded Build System` uses a "workflow" to
|
||||
accomplish image and SDK generation. The following figure overviews that
|
||||
workflow:
|
||||
|
||||
.. image:: figures/YP-flow-diagram.png
|
||||
.. image:: svg/yp-flow-diagram.*
|
||||
:align: center
|
||||
|
||||
Here is a brief summary of the "workflow":
|
||||
@@ -760,7 +759,8 @@ Here is a brief summary of the "workflow":
|
||||
package feed that is used to create the final root file image.
|
||||
|
||||
7. The build system generates the file system image and a customized
|
||||
Extensible SDK (eSDK) for application development in parallel.
|
||||
:doc:`SDK </sdk-manual/index>` (Software Development Kit) for application
|
||||
development in parallel.
|
||||
|
||||
For a very detailed look at this workflow, see the
|
||||
":ref:`overview-manual/concepts:openembedded build system concepts`" section.
|
||||
|
||||
@@ -1118,6 +1118,53 @@ The :ref:`ref-classes-image_types` class also handles conversion and compression
|
||||
:term:`IMAGE_FSTYPES`. This would also be similar for Virtual Box Virtual Disk
|
||||
Image ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.
|
||||
|
||||
.. _ref-classes-image-container:
|
||||
|
||||
``image-container``
|
||||
===================
|
||||
|
||||
The :ref:`ref-classes-image-container` class is automatically inherited in
|
||||
:doc:`image </ref-manual/images>` recipes that have the ``container`` image type
|
||||
in :term:`IMAGE_FSTYPES`. It provides relevant settings to generate an image
|
||||
ready for use with an :wikipedia:`OCI <Open_Container_Initiative>`-compliant
|
||||
container management tool, such as :wikipedia:`Podman <Podman>` or
|
||||
:wikipedia:`Docker <Docker_(software)>`.
|
||||
|
||||
.. note::
|
||||
|
||||
This class neither builds nor installs container management tools on the
|
||||
target. Those tools are available in the :yocto_git:`meta-virtualization
|
||||
</meta-virtualization>` layer.
|
||||
|
||||
You should set the :term:`PREFERRED_PROVIDER` for the Linux kernel to
|
||||
``linux-dummy`` in a :term:`configuration file`::
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
|
||||
|
||||
Otherwise an error is triggered. If desired, the
|
||||
:term:`IMAGE_CONTAINER_NO_DUMMY` variable can be set to "1" to avoid triggering
|
||||
this error.
|
||||
|
||||
The ``linux-dummy`` recipe acts as a Linux kernel recipe but builds nothing. It
|
||||
is relevant to use as the preferred Linux kernel provider in this case as a
|
||||
container image does not need to include a Linux kernel. Selecting it as the
|
||||
preferred provider for the kernel will also decrease build time.
|
||||
|
||||
Using this class only deploys an additional ``tar.bz2`` archive to
|
||||
:term:`DEPLOY_DIR_IMAGE`. This archive can be used in a container file (a file
|
||||
typically named ``Dockerfile`` or ``Containerfile``). For example, to be used with
|
||||
:wikipedia:`Podman <Podman>` or :wikipedia:`Docker <Docker_(software)>`, the
|
||||
`container file <https://docs.docker.com/reference/dockerfile/>`__ could contain
|
||||
the following instructions:
|
||||
|
||||
.. code-block:: dockerfile
|
||||
|
||||
FROM scratch
|
||||
ADD ./image-container-qemux86-64.rootfs.tar.bz2 /
|
||||
ENTRYPOINT /bin/sh
|
||||
|
||||
This is suitable to build a container using our generated root filesystem image.
|
||||
|
||||
.. _ref-classes-image-live:
|
||||
|
||||
``image-live``
|
||||
@@ -3233,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.
|
||||
|
||||
@@ -45,6 +45,45 @@ release process validates the content of the new branch.
|
||||
Realize that there can be patches merged onto the stable release
|
||||
branches as and when they become available.
|
||||
|
||||
.. _ref-yp-development-cycle:
|
||||
|
||||
Development Cycle
|
||||
=================
|
||||
|
||||
As explained in the previous :ref:`ref-manual/release-process:Major and Minor
|
||||
Release Cadence` section, a new release comes out every six months.
|
||||
|
||||
During this six-months period of time, the Yocto Project releases four
|
||||
"Milestone" releases which represent distinct points of time. The milestone
|
||||
releases are tested through the :ref:`ref-manual/release-process:Testing and
|
||||
Quality Assurance` process and helps spotting issues before the actual release
|
||||
is out.
|
||||
|
||||
The time span between milestone releases can vary, but they are in general
|
||||
evenly spaced out during this six-months period of time.
|
||||
|
||||
These milestone releases are tagged with a capital "M" after the future release
|
||||
tag name. For example, the milestone tags "&DISTRO_RELEASE_SERIES;M1",
|
||||
"&DISTRO_RELEASE_SERIES;M2", and "&DISTRO_RELEASE_SERIES;M3" are released before
|
||||
the actual "&DISTRO_RELEASE_SERIES;" release.
|
||||
|
||||
.. note::
|
||||
|
||||
The fourth milestone (M4) is not actually released and announced, but
|
||||
represents a point of time for the Quality Assurance team to start the
|
||||
:ref:`ref-manual/release-process:Testing and Quality Assurance` process
|
||||
before tagging and delivering the final release.
|
||||
|
||||
After the third milestone release (M3), the Yocto Project enters **Feature
|
||||
Freeze**. This means that the maintainers of :term:`OpenEmbedded-Core
|
||||
(OE-Core)`, :term:`BitBake` and other core repositories stop accepting
|
||||
significant changes on the "master" branch. Changes that may be accepted are
|
||||
minor upgrades to core components and security/bug fixes.
|
||||
|
||||
During feature freeze, a new branch is created and maintained separately to
|
||||
test new features and enhancements received from contributors, but these changes
|
||||
will only make it to the master branch after the release is out.
|
||||
|
||||
Major Release Codenames
|
||||
=======================
|
||||
|
||||
|
||||
@@ -608,7 +608,7 @@
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||
id="tspan10317-2-9-1-4">4.2</tspan></text>
|
||||
<rect
|
||||
style="opacity:1;fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
style="opacity:0.5;fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
id="rect917-0-0-4-4-9-4-5-3-9-2-3-6"
|
||||
width="140"
|
||||
height="45.000004"
|
||||
@@ -632,7 +632,7 @@
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||
id="tspan10317-2-9-1-4-6-5-6">5.1</tspan></text>
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1;opacity:0.5"
|
||||
id="rect917-0-0-4-4-9-4-5-3-9-2-3-6-2"
|
||||
width="140"
|
||||
height="45.000004"
|
||||
@@ -656,26 +656,26 @@
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||
id="tspan10317-2-9-1-4-6-5-6-9">5.2</tspan></text>
|
||||
<rect
|
||||
style="opacity:0.75;fill:#251f32;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
style="opacity:1;fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
id="rect917-0-0-4-4-9-4-5-3-9-2-3-67"
|
||||
width="140"
|
||||
height="45.000004"
|
||||
x="1163.6425"
|
||||
x="1223.8723"
|
||||
y="-382.27469"
|
||||
ry="2.2558987" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:bold;font-size:13.3333px;line-height:125%;font-family:'Nimbus Roman';-inkscape-font-specification:'Nimbus Roman, Bold';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#fffefe;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="1214.9716"
|
||||
x="1275.2014"
|
||||
y="-363.89413"
|
||||
id="text1185-3-55-4-0-0-0-1-1-6-4-3-53"><tspan
|
||||
sodipodi:role="line"
|
||||
x="1214.9716"
|
||||
x="1275.2014"
|
||||
y="-363.89413"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||
id="tspan957-2-8-6-3-9-7-4-2-0-5-5">Whinlatter</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="1214.9716"
|
||||
x="1275.2014"
|
||||
y="-345.89746"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||
id="tspan10317-2-9-1-4-6-5-6-6-6">5.3</tspan></text>
|
||||
@@ -1847,7 +1847,7 @@
|
||||
x="2128.7158"
|
||||
y="-7.6722765"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none"
|
||||
id="tspan10317-2-9-1-4-6-5-6-6-5-9-7">Current (Apr. 25)</tspan></text>
|
||||
id="tspan10317-2-9-1-4-6-5-6-6-5-9-7">Current (Dec. 25)</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:bold;font-size:13.3333px;line-height:125%;font-family:'Nimbus Roman';-inkscape-font-specification:'Nimbus Roman, Bold';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#fffefe;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
|
||||
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
@@ -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,7 @@ organizations publishing them no longer make updates publicly available:
|
||||
|
||||
- Fedora 39
|
||||
- Fedora 40
|
||||
- Ubuntu 20.04 (LTS)
|
||||
- Fedora 41
|
||||
|
||||
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 +119,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::
|
||||
|
||||
|
||||
@@ -1102,6 +1102,12 @@ system and gives an overview of their function and contents.
|
||||
:term:`CCACHE_DISABLE` variable can be set to "1" in a recipe to disable
|
||||
`Ccache` support. This is useful when the recipe is known to not support it.
|
||||
|
||||
:term:`CCACHE_TOP_DIR`
|
||||
When inheriting the :ref:`ref-classes-ccache` class, the
|
||||
:term:`CCACHE_TOP_DIR` variable can be set to the location of where
|
||||
`Ccache` stores its cache files. This directory can be shared between
|
||||
builds.
|
||||
|
||||
:term:`CFLAGS`
|
||||
Specifies the flags to pass to the C compiler. This variable is
|
||||
exported to an environment variable and thus made visible to the
|
||||
@@ -3314,6 +3320,24 @@ system and gives an overview of their function and contents.
|
||||
variable, see the :ref:`image_types <ref-classes-image_types>`
|
||||
class file, which is ``meta/classes/image_types.bbclass``.
|
||||
|
||||
:term:`IMAGE_CONTAINER_NO_DUMMY`
|
||||
When an image recipe has the ``container`` image type in
|
||||
:term:`IMAGE_FSTYPES`, it expects the :term:`PREFERRED_PROVIDER` for
|
||||
the Linux kernel (``virtual/kernel``) to be set to ``linux-dummy`` from a
|
||||
:term:`configuration file`. Otherwise, an error is triggered.
|
||||
|
||||
When set to "1", the :term:`IMAGE_CONTAINER_NO_DUMMY` variable allows the
|
||||
:term:`PREFERRED_PROVIDER` variable to be set to another value, thus
|
||||
skipping the check and not triggering the build error. Any other value
|
||||
will keep the check.
|
||||
|
||||
This variable should be set from the image recipe using the ``container``
|
||||
image type.
|
||||
|
||||
See the documentation of the :ref:`ref-classes-image-container` class for
|
||||
more information on why setting the :term:`PREFERRED_PROVIDER` to
|
||||
``linux-dummy`` is advised with this class.
|
||||
|
||||
:term:`IMAGE_DEVICE_TABLES`
|
||||
Specifies one or more files that contain custom device tables that
|
||||
are passed to the ``makedevs`` command as part of creating an image.
|
||||
|
||||
14
documentation/security-reference/index.rst
Normal file
14
documentation/security-reference/index.rst
Normal file
@@ -0,0 +1,14 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
================================
|
||||
Yocto Project Security Reference
|
||||
================================
|
||||
|
||||
.. toctree::
|
||||
:caption: Table of Contents
|
||||
:numbered:
|
||||
|
||||
security-team
|
||||
reporting-vulnerabilities
|
||||
|
||||
.. include:: /boilerplate.rst
|
||||
@@ -0,0 +1,85 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Reporting Vulnerabilities
|
||||
*************************
|
||||
|
||||
The Yocto Project and OpenEmbedded are open-source, community-based projects
|
||||
used in numerous products. They assemble multiple other open-source projects,
|
||||
and need to handle security issues and practices both internal (in the code
|
||||
maintained by both projects), and external (maintained by other projects and
|
||||
organizations).
|
||||
|
||||
This manual assembles security-related information concerning the whole
|
||||
ecosystem. It includes information on reporting a potential security issue,
|
||||
the operation of the YP Security team and how to contribute in the
|
||||
related code. It is written to be useful for both security researchers and
|
||||
YP developers.
|
||||
|
||||
How to report a potential security vulnerability?
|
||||
=================================================
|
||||
|
||||
If you would like to report a public issue (for example, one with a released
|
||||
CVE number), please report it using the
|
||||
:yocto_bugs:`Security Bugzilla </enter_bug.cgi?product=Security>`.
|
||||
|
||||
If you are dealing with a not-yet-released issue, or an urgent one, please send
|
||||
a message to security AT yoctoproject DOT org, including as many details as
|
||||
possible: the layer or software module affected, the recipe and its version,
|
||||
and any example code, if available. This mailing list is monitored by the
|
||||
Yocto Project Security team.
|
||||
|
||||
For each layer, you might also look for specific instructions (if any) for
|
||||
reporting potential security issues in the specific ``SECURITY.md`` file at the
|
||||
root of the repository. Instructions on how and where submit a patch are
|
||||
usually available in ``README.md``. If this is your first patch to the
|
||||
Yocto Project/OpenEmbedded, you might want to have a look into the
|
||||
Contributor's Manual section
|
||||
":ref:`contributor-guide/submit-changes:preparing changes for submission`".
|
||||
|
||||
Branches maintained with security fixes
|
||||
---------------------------------------
|
||||
|
||||
See the
|
||||
:ref:`Release process <ref-manual/release-process:Stable Release Process>`
|
||||
documentation for details regarding the policies and maintenance of stable
|
||||
branches.
|
||||
|
||||
The :yocto_home:`Releases </development/releases/>` page contains a list of all
|
||||
releases of the Yocto Project, grouped into current and previous releases.
|
||||
Previous releases are no longer actively maintained with security patches, but
|
||||
well-tested patches may still be accepted for them for significant issues.
|
||||
|
||||
Security-related discussions at the Yocto Project
|
||||
-------------------------------------------------
|
||||
|
||||
We have set up two security-related emails/mailing lists:
|
||||
|
||||
- Public Mailing List: yocto [dash] security [at] yoctoproject[dot] org
|
||||
|
||||
This is a public mailing list for anyone to subscribe to. This list is an
|
||||
open list to discuss public security issues/patches and security-related
|
||||
initiatives. For more information, including subscription information,
|
||||
please see the :yocto_lists:`yocto-security mailing list info page
|
||||
</g/yocto-security>`.
|
||||
|
||||
This list requires moderator approval for new topics to be posted, to avoid
|
||||
private security reports to be posted by mistake.
|
||||
|
||||
- Yocto Project Security Team: security [at] yoctoproject [dot] org
|
||||
|
||||
This is an email for reporting non-published potential vulnerabilities.
|
||||
Emails sent to this address are forwarded to the Yocto Project Security
|
||||
Team members.
|
||||
|
||||
|
||||
What you should do if you find a security vulnerability
|
||||
-------------------------------------------------------
|
||||
|
||||
If you find a security flaw: a crash, an information leakage, or anything that
|
||||
can have a security impact if exploited in any Open Source software built or
|
||||
used by the Yocto Project, please report this to the Yocto Project Security
|
||||
Team. If you prefer to contact the upstream project directly, please send a
|
||||
copy to the security team at the Yocto Project as well. If you believe this is
|
||||
highly sensitive information, please report the vulnerability in a secure way,
|
||||
i.e. encrypt the email and send it to the private list. This ensures that
|
||||
the exploit is not leaked and exploited before a response/fix has been generated.
|
||||
110
documentation/security-reference/security-team.rst
Normal file
110
documentation/security-reference/security-team.rst
Normal file
@@ -0,0 +1,110 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Security team
|
||||
*************
|
||||
|
||||
The Yocto Project/OpenEmbedded security team coordinates the work on security
|
||||
subjects in the project. All general discussion takes place publicly. The
|
||||
Security Team only uses confidential communication tools to deal with private
|
||||
vulnerability reports before they are released.
|
||||
|
||||
Security team appointment
|
||||
=========================
|
||||
|
||||
The Yocto Project Security Team consists of at least three members. When new
|
||||
members are needed, the Yocto Project Technical Steering Committee (YP TSC)
|
||||
asks for nominations by public channels including a nomination deadline.
|
||||
Self-nominations are possible. When the limit time is
|
||||
reached, the YP TSC posts the list of candidates for the comments of project
|
||||
participants and developers. Comments may be sent publicly or privately to the
|
||||
YP and OE TSCs. The candidates are approved by both YP TSC and OpenEmbedded
|
||||
Technical Steering Committee (OE TSC) and the final list of the team members
|
||||
is announced publicly. The aim is to have people representing technical
|
||||
leadership, security knowledge and infrastructure present with enough people
|
||||
to provide backup/coverage but keep the notification list small enough to
|
||||
minimize information risk and maintain trust.
|
||||
|
||||
YP Security Team members may resign at any time.
|
||||
|
||||
Security Team Operations
|
||||
========================
|
||||
|
||||
The work of the Security Team might require high confidentiality. Team members
|
||||
are individuals selected by merit and do not represent the companies they work
|
||||
for. They do not share information about confidential issues outside of the team
|
||||
and do not hint about ongoing embargoes.
|
||||
|
||||
Team members can bring in domain experts as needed. Those people should be
|
||||
added to individual issues only and adhere to the same standards as the YP
|
||||
Security Team.
|
||||
|
||||
The YP security team organizes its meetings and communication as needed.
|
||||
|
||||
When the YP Security team receives a report about a potential security
|
||||
vulnerability, they quickly analyze and notify the reporter of the result.
|
||||
They might also request more information.
|
||||
|
||||
If the issue is confirmed and affects the code maintained by the YP, they
|
||||
confidentially notify maintainers of that code and work with them to prepare
|
||||
a fix.
|
||||
|
||||
If the issue is confirmed and affects an upstream project, the YP security team
|
||||
notifies the project. Usually, the upstream project analyzes the problem again.
|
||||
If they deem it a real security problem in their software, they develop and
|
||||
release a fix following their security policy. They may want to include the
|
||||
original reporter in the loop. There is also sometimes some coordination for
|
||||
handling patches, backporting patches etc, or just understanding the problem
|
||||
or what caused it.
|
||||
|
||||
When the fix is publicly available, the YP security team member or the
|
||||
package maintainer sends patches against the YP code base, following usual
|
||||
procedures, including public code review.
|
||||
|
||||
What Yocto Security Team does when it receives a security vulnerability
|
||||
=======================================================================
|
||||
|
||||
The YP Security Team team performs a quick analysis and would usually report
|
||||
the flaw to the upstream project. Normally the upstream project analyzes the
|
||||
problem. If they deem it a real security problem in their software, they
|
||||
develop and release a fix following their own security policy. They may want
|
||||
to include the original reporter in the loop. There is also sometimes some
|
||||
coordination for handling patches, backporting patches etc, or just
|
||||
understanding the problem or what caused it.
|
||||
|
||||
The security policy of the upstream project might include a notification to
|
||||
Linux distributions or other important downstream projects in advance to
|
||||
discuss coordinated disclosure. These mailing lists are normally non-public.
|
||||
|
||||
When the upstream project releases a version with the fix, they are responsible
|
||||
for contacting `Mitre <https://www.cve.org/>`__ to get a CVE number assigned and
|
||||
the CVE record published.
|
||||
|
||||
If an upstream project does not respond quickly
|
||||
===============================================
|
||||
|
||||
If an upstream project does not fix the problem in a reasonable time,
|
||||
the Yocto's Security Team will contact other interested parties (usually
|
||||
other distributions) in the community and together try to solve the
|
||||
vulnerability as quickly as possible.
|
||||
|
||||
The Yocto Project Security team adheres to the 90 days disclosure policy
|
||||
by default. An increase of the embargo time is possible when necessary.
|
||||
|
||||
Security Team Members
|
||||
=====================
|
||||
|
||||
For secure communications, please send your messages encrypted using the GPG
|
||||
keys. Remember, message headers are not encrypted so do not include sensitive
|
||||
information in the subject line.
|
||||
|
||||
- Ross Burton: <ross [at] burtonini [dot] com> `Public key <https://keys.openpgp.org/search?q=ross%40burtonini.com>`__
|
||||
|
||||
- Michael Halstead: <mhalstead [at] linuxfoundation [dot] org>
|
||||
`Public key <https://pgp.mit.edu/pks/lookup?op=vindex&search=0x3373170601861969>`__
|
||||
or `Public key <https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xd1f2407285e571ed12a407a73373170601861969>`__
|
||||
|
||||
- Richard Purdie: <richard.purdie [at] linuxfoundation [dot] org> `Public key <https://keys.openpgp.org/search?q=richard.purdie%40linuxfoundation.org>`__
|
||||
|
||||
- Marta Rybczynska: <marta DOT rybczynska [at] syslinbit [dot] com> `Public key <https://keys.openpgp.org/search?q=marta.rybczynska@syslinbit.com>`__
|
||||
|
||||
- Steve Sakoman: <steve [at] sakoman [dot] com> `Public key <https://keys.openpgp.org/search?q=steve%40sakoman.com>`__
|
||||
@@ -70,6 +70,25 @@ test. Here is what you have to do for each recipe:
|
||||
cd test
|
||||
make -k runtest-TESTS
|
||||
|
||||
- *Return an appropriate exit code*: The ``run-ptest`` script must return 0 on
|
||||
success, 1 on failure. This is needed by ``ptest-runner`` to keep track of
|
||||
the successful and failed tests.
|
||||
|
||||
- *Make sure the test prints at least one test result*: The execution of the
|
||||
``run-ptest`` script must result in at least one test result output on the
|
||||
console, with the following format::
|
||||
|
||||
result: testname
|
||||
|
||||
Where ``result`` can be one of ``PASS``, ``SKIP``, or ``FAIL``. ``testname``
|
||||
can be any name.
|
||||
|
||||
There can be as many test results as desired.
|
||||
|
||||
This information is read by the :ref:`ref-classes-testimage` class and
|
||||
:oe_git:`logparser </openembedded-core/tree/meta/lib/oeqa/utils/logparser.py>`
|
||||
module.
|
||||
|
||||
- *Ensure dependencies are met:* If the test adds build or runtime
|
||||
dependencies that normally do not exist for the package (such as
|
||||
requiring "make" to run the test suite), use the
|
||||
|
||||
@@ -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.32"
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -95,3 +95,39 @@ addtask addto_recipe_sysroot after do_populate_sysroot
|
||||
do_addto_recipe_sysroot[deptask] = "do_populate_sysroot"
|
||||
|
||||
PATH:prepend = "${COREBASE}/scripts/cross-intercept:"
|
||||
|
||||
#
|
||||
# Cross task outputs can call native dependencies and even when cross
|
||||
# recipe output doesn't change it might produce different results when
|
||||
# the called native dependency is changed, e.g. clang-cross-${TARGET_ARCH}
|
||||
# contains symlink to clang binary from clang-native, but when clang-native
|
||||
# outhash is changed, clang-cross-${TARGET_ARCH} will still be considered
|
||||
# equivalent and target recipes aren't rebuilt with new clang binary, see
|
||||
# work around in https://github.com/kraj/meta-clang/pull/1140 to make target
|
||||
# recipes to depend directly not only on clang-cross-${TARGET_ARCH} but
|
||||
# clang-native as well.
|
||||
#
|
||||
# This can cause poor interactions with hash equivalence, since this recipes
|
||||
# output-changing dependency is "hidden" and downstream task only see that this
|
||||
# recipe has the same outhash and therefore is equivalent. This can result in
|
||||
# different output in different cases.
|
||||
#
|
||||
# To resolve this, unhide the output-changing dependency by adding its unihash
|
||||
# to this tasks outhash calculation. Unfortunately, don't know specifically
|
||||
# know which dependencies are output-changing, so we have to add all of them.
|
||||
#
|
||||
python cross_add_do_populate_sysroot_deps () {
|
||||
current_task = "do_" + d.getVar("BB_CURRENTTASK")
|
||||
if current_task != "do_populate_sysroot":
|
||||
return
|
||||
|
||||
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
|
||||
pn = d.getVar("PN")
|
||||
deps = {
|
||||
dep[0]:dep[6] for dep in taskdepdata.values() if
|
||||
dep[1] == current_task and dep[0] != pn
|
||||
}
|
||||
|
||||
d.setVar("HASHEQUIV_EXTRA_SIGDATA", "\n".join("%s: %s" % (k, deps[k]) for k in sorted(deps.keys())))
|
||||
}
|
||||
SSTATECREATEFUNCS += "cross_add_do_populate_sysroot_deps"
|
||||
|
||||
@@ -12,7 +12,7 @@ class BuildCpioTest(OERuntimeTestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.13.tar.gz'
|
||||
uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.14.tar.gz'
|
||||
cls.project = TargetBuildProject(cls.tc.target,
|
||||
uri,
|
||||
dl_dir = cls.tc.td['DL_DIR'])
|
||||
|
||||
@@ -17,10 +17,10 @@ class BuildCpioTest(OESDKTestCase):
|
||||
"""
|
||||
def test_cpio(self):
|
||||
with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir:
|
||||
tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftpmirror.gnu.org/gnu/cpio/cpio-2.13.tar.gz")
|
||||
tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftpmirror.gnu.org/gnu/cpio/cpio-2.14.tar.gz")
|
||||
|
||||
dirs = {}
|
||||
dirs["source"] = os.path.join(testdir, "cpio-2.13")
|
||||
dirs["source"] = os.path.join(testdir, "cpio-2.14")
|
||||
dirs["build"] = os.path.join(testdir, "build")
|
||||
dirs["install"] = os.path.join(testdir, "install")
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class MetaIDE(OESelftestTestCase):
|
||||
def test_meta_ide_can_build_cpio_project(self):
|
||||
dl_dir = self.td.get('DL_DIR', None)
|
||||
self.project = SDKBuildProject(self.tmpdir_metaideQA + "/cpio/", self.environment_script_path,
|
||||
"https://ftpmirror.gnu.org/gnu/cpio/cpio-2.13.tar.gz",
|
||||
"https://ftpmirror.gnu.org/gnu/cpio/cpio-2.14.tar.gz",
|
||||
self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
|
||||
self.project.download_archive()
|
||||
self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS --disable-maintainer-mode','sed -i -e "/char \*program_name/d" src/global.c;'), 0,
|
||||
|
||||
40
meta/recipes-bsp/grub/files/CVE-2025-61661.patch
Normal file
40
meta/recipes-bsp/grub/files/CVE-2025-61661.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 9c2ae73b549a653f5f1bd5d4edebc50a764bad06 Mon Sep 17 00:00:00 2001
|
||||
From: Jamie <volticks@gmail.com>
|
||||
Date: Mon, 14 Jul 2025 09:52:59 +0100
|
||||
Subject: [PATCH 1/3] commands/usbtest: Use correct string length field
|
||||
|
||||
An incorrect length field is used for buffer allocation. This leads to
|
||||
grub_utf16_to_utf8() receiving an incorrect/different length and possibly
|
||||
causing OOB write. This makes sure to use the correct length.
|
||||
|
||||
Fixes: CVE-2025-61661
|
||||
|
||||
CVE: CVE-2025-61661
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://gitweb.git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=549a9cc372fd0b96a4ccdfad0e12140476cc62a3]
|
||||
|
||||
Reported-by: Jamie <volticks@gmail.com>
|
||||
Signed-off-by: Jamie <volticks@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
---
|
||||
grub-core/commands/usbtest.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/commands/usbtest.c b/grub-core/commands/usbtest.c
|
||||
index 2c6d93fe6..8ef187a9a 100644
|
||||
--- a/grub-core/commands/usbtest.c
|
||||
+++ b/grub-core/commands/usbtest.c
|
||||
@@ -99,7 +99,7 @@ grub_usb_get_string (grub_usb_device_t dev, grub_uint8_t index, int langid,
|
||||
return GRUB_USB_ERR_NONE;
|
||||
}
|
||||
|
||||
- *string = grub_malloc (descstr.length * 2 + 1);
|
||||
+ *string = grub_malloc (descstrp->length * 2 + 1);
|
||||
if (! *string)
|
||||
{
|
||||
grub_free (descstrp);
|
||||
--
|
||||
2.34.1
|
||||
|
||||
72
meta/recipes-bsp/grub/files/CVE-2025-61662.patch
Normal file
72
meta/recipes-bsp/grub/files/CVE-2025-61662.patch
Normal file
@@ -0,0 +1,72 @@
|
||||
From c47760a907c91283bac9a8400d6975574b1d3986 Mon Sep 17 00:00:00 2001
|
||||
From: Alec Brown <alec.r.brown@oracle.com>
|
||||
Date: Thu, 21 Aug 2025 21:14:06 +0000
|
||||
Subject: [PATCH 2/3] gettext/gettext: Unregister gettext command on module
|
||||
unload
|
||||
|
||||
When the gettext module is loaded, the gettext command is registered but
|
||||
isn't unregistered when the module is unloaded. We need to add a call to
|
||||
grub_unregister_command() when unloading the module.
|
||||
|
||||
Fixes: CVE-2025-61662
|
||||
|
||||
CVE: CVE-2025-61662
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://gitweb.git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=8ed78fd9f0852ab218cc1f991c38e5a229e43807]
|
||||
|
||||
Reported-by: Alec Brown <alec.r.brown@oracle.com>
|
||||
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
---
|
||||
grub-core/gettext/gettext.c | 19 ++++++++++++-------
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
|
||||
index 7a25c9d67..ef1258ee0 100644
|
||||
--- a/grub-core/gettext/gettext.c
|
||||
+++ b/grub-core/gettext/gettext.c
|
||||
@@ -502,6 +502,8 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static grub_command_t cmd;
|
||||
+
|
||||
GRUB_MOD_INIT (gettext)
|
||||
{
|
||||
const char *lang;
|
||||
@@ -521,13 +523,14 @@ GRUB_MOD_INIT (gettext)
|
||||
grub_register_variable_hook ("locale_dir", NULL, read_main);
|
||||
grub_register_variable_hook ("secondary_locale_dir", NULL, read_secondary);
|
||||
|
||||
- grub_register_command_p1 ("gettext", grub_cmd_translate,
|
||||
- N_("STRING"),
|
||||
- /* TRANSLATORS: It refers to passing the string through gettext.
|
||||
- So it's "translate" in the same meaning as in what you're
|
||||
- doing now.
|
||||
- */
|
||||
- N_("Translates the string with the current settings."));
|
||||
+ cmd = grub_register_command_p1 ("gettext", grub_cmd_translate,
|
||||
+ N_("STRING"),
|
||||
+ /*
|
||||
+ * TRANSLATORS: It refers to passing the string through gettext.
|
||||
+ * So it's "translate" in the same meaning as in what you're
|
||||
+ * doing now.
|
||||
+ */
|
||||
+ N_("Translates the string with the current settings."));
|
||||
|
||||
/* Reload .mo file information if lang changes. */
|
||||
grub_register_variable_hook ("lang", NULL, grub_gettext_env_write_lang);
|
||||
@@ -544,6 +547,8 @@ GRUB_MOD_FINI (gettext)
|
||||
grub_register_variable_hook ("secondary_locale_dir", NULL, NULL);
|
||||
grub_register_variable_hook ("lang", NULL, NULL);
|
||||
|
||||
+ grub_unregister_command (cmd);
|
||||
+
|
||||
grub_gettext_delete_list (&main_context);
|
||||
grub_gettext_delete_list (&secondary_context);
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
64
meta/recipes-bsp/grub/files/CVE-2025-61663_61664.patch
Normal file
64
meta/recipes-bsp/grub/files/CVE-2025-61663_61664.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
From a182bd873e4aa93205ecbb7845ef7f0eda99dcf5 Mon Sep 17 00:00:00 2001
|
||||
From: Alec Brown <alec.r.brown@oracle.com>
|
||||
Date: Thu, 21 Aug 2025 21:14:07 +0000
|
||||
Subject: [PATCH 3/3] normal/main: Unregister commands on module unload
|
||||
|
||||
When the normal module is loaded, the normal and normal_exit commands
|
||||
are registered but aren't unregistered when the module is unloaded. We
|
||||
need to add calls to grub_unregister_command() when unloading the module
|
||||
for these commands.
|
||||
|
||||
Fixes: CVE-2025-61663
|
||||
Fixes: CVE-2025-61664
|
||||
|
||||
CVE: CVE-2025-61663 CVE-2025-61664
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://gitweb.git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=05d3698b8b03eccc49e53491bbd75dba15f40917]
|
||||
|
||||
Reported-by: Alec Brown <alec.r.brown@oracle.com>
|
||||
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
|
||||
---
|
||||
grub-core/normal/main.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index a95c25e5f..9d576de7a 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -499,7 +499,7 @@ grub_mini_cmd_clear (struct grub_command *cmd __attribute__ ((unused)),
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static grub_command_t cmd_clear;
|
||||
+static grub_command_t cmd_clear, cmd_normal, cmd_normal_exit;
|
||||
|
||||
static void (*grub_xputs_saved) (const char *str);
|
||||
static const char *features[] = {
|
||||
@@ -541,10 +541,10 @@ GRUB_MOD_INIT(normal)
|
||||
grub_env_export ("pager");
|
||||
|
||||
/* Register a command "normal" for the rescue mode. */
|
||||
- grub_register_command ("normal", grub_cmd_normal,
|
||||
- 0, N_("Enter normal mode."));
|
||||
- grub_register_command ("normal_exit", grub_cmd_normal_exit,
|
||||
- 0, N_("Exit from normal mode."));
|
||||
+ cmd_normal = grub_register_command ("normal", grub_cmd_normal,
|
||||
+ 0, N_("Enter normal mode."));
|
||||
+ cmd_normal_exit = grub_register_command ("normal_exit", grub_cmd_normal_exit,
|
||||
+ 0, N_("Exit from normal mode."));
|
||||
|
||||
/* Reload terminal colors when these variables are written to. */
|
||||
grub_register_variable_hook ("color_normal", NULL, grub_env_write_color_normal);
|
||||
@@ -586,4 +586,6 @@ GRUB_MOD_FINI(normal)
|
||||
grub_register_variable_hook ("color_highlight", NULL, NULL);
|
||||
grub_fs_autoload_hook = 0;
|
||||
grub_unregister_command (cmd_clear);
|
||||
+ grub_unregister_command (cmd_normal);
|
||||
+ grub_unregister_command (cmd_normal_exit);
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -60,6 +60,9 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
|
||||
file://CVE-2025-0690.patch \
|
||||
file://CVE-2025-1118.patch \
|
||||
file://CVE-2024-56738.patch \
|
||||
file://CVE-2025-61661.patch \
|
||||
file://CVE-2025-61662.patch \
|
||||
file://CVE-2025-61663_61664.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 7224be0fe2f4beb916b7b69141f478facd0f0634 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ovsienko <denis@ovsienko.info>
|
||||
Date: Sat, 27 Dec 2025 21:36:11 +0000
|
||||
Subject: [PATCH] Rename one of the xdtoi() copies to simplify backporting.
|
||||
|
||||
CVE: CVE-2025-11961
|
||||
Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/7224be0fe2f4beb916b7b69141f478facd0f0634]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
nametoaddr.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/nametoaddr.c b/nametoaddr.c
|
||||
index dc75495c..bdaacbf1 100644
|
||||
--- a/nametoaddr.c
|
||||
+++ b/nametoaddr.c
|
||||
@@ -646,7 +646,7 @@ pcap_nametollc(const char *s)
|
||||
|
||||
/* Hex digit to 8-bit unsigned integer. */
|
||||
static inline u_char
|
||||
-xdtoi(u_char c)
|
||||
+pcapint_xdtoi(u_char c)
|
||||
{
|
||||
if (c >= '0' && c <= '9')
|
||||
return (u_char)(c - '0');
|
||||
@@ -728,10 +728,10 @@ pcap_ether_aton(const char *s)
|
||||
while (*s) {
|
||||
if (*s == ':' || *s == '.' || *s == '-')
|
||||
s += 1;
|
||||
- d = xdtoi(*s++);
|
||||
+ d = pcapint_xdtoi(*s++);
|
||||
if (PCAP_ISXDIGIT(*s)) {
|
||||
d <<= 4;
|
||||
- d |= xdtoi(*s++);
|
||||
+ d |= pcapint_xdtoi(*s++);
|
||||
}
|
||||
*ep++ = d;
|
||||
}
|
||||
@@ -0,0 +1,433 @@
|
||||
From b2d2f9a9a0581c40780bde509f7cc715920f1c02 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Ovsienko <denis@ovsienko.info>
|
||||
Date: Fri, 19 Dec 2025 17:31:13 +0000
|
||||
Subject: [PATCH] CVE-2025-11961: Fix OOBR and OOBW in pcap_ether_aton().
|
||||
|
||||
pcap_ether_aton() has for a long time required its string argument to be
|
||||
a well-formed MAC-48 address, which is always the case when the argument
|
||||
comes from other libpcap code, so the function has never validated the
|
||||
input and used a simple loop to parse any of the three common MAC-48
|
||||
address formats. However, the function has also been a part of the
|
||||
public API, so calling it directly with a malformed address can cause
|
||||
the loop to read beyond the end of the input string and/or to write
|
||||
beyond the end of the allocated output buffer.
|
||||
|
||||
To handle invalid input more appropriately, replace the simple loop with
|
||||
new functions and require the input to match a supported address format.
|
||||
|
||||
This problem was reported by Jin Wei, Kunwei Qian and Ping Chen.
|
||||
|
||||
(backported from commit dd08e53e9380e217ae7c7768da9cc3d7bf37bf83)
|
||||
|
||||
CVE: CVE-2025-11961
|
||||
Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/b2d2f9a9a0581c40780bde509f7cc715920f1c02]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
gencode.c | 5 +
|
||||
nametoaddr.c | 367 +++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 349 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/gencode.c b/gencode.c
|
||||
index 3ddd15f8..76fb2d82 100644
|
||||
--- a/gencode.c
|
||||
+++ b/gencode.c
|
||||
@@ -7206,6 +7206,11 @@ gen_ecode(compiler_state_t *cstate, const char *s, struct qual q)
|
||||
return (NULL);
|
||||
|
||||
if ((q.addr == Q_HOST || q.addr == Q_DEFAULT) && q.proto == Q_LINK) {
|
||||
+ /*
|
||||
+ * Because the lexer guards the input string format, in this
|
||||
+ * context the function returns NULL iff the implicit malloc()
|
||||
+ * has failed.
|
||||
+ */
|
||||
cstate->e = pcap_ether_aton(s);
|
||||
if (cstate->e == NULL)
|
||||
bpf_error(cstate, "malloc");
|
||||
diff --git a/nametoaddr.c b/nametoaddr.c
|
||||
index f9fcd288..f50d0da5 100644
|
||||
--- a/nametoaddr.c
|
||||
+++ b/nametoaddr.c
|
||||
@@ -703,39 +703,360 @@ __pcap_atodn(const char *s, bpf_u_int32 *addr)
|
||||
return(32);
|
||||
}
|
||||
|
||||
+// Man page: "xxxxxxxxxxxx", regexp: "^[0-9a-fA-F]{12}$".
|
||||
+static u_char
|
||||
+pcapint_atomac48_xxxxxxxxxxxx(const char *s, uint8_t *addr)
|
||||
+{
|
||||
+ if (strlen(s) == 12 &&
|
||||
+ PCAP_ISXDIGIT(s[0]) &&
|
||||
+ PCAP_ISXDIGIT(s[1]) &&
|
||||
+ PCAP_ISXDIGIT(s[2]) &&
|
||||
+ PCAP_ISXDIGIT(s[3]) &&
|
||||
+ PCAP_ISXDIGIT(s[4]) &&
|
||||
+ PCAP_ISXDIGIT(s[5]) &&
|
||||
+ PCAP_ISXDIGIT(s[6]) &&
|
||||
+ PCAP_ISXDIGIT(s[7]) &&
|
||||
+ PCAP_ISXDIGIT(s[8]) &&
|
||||
+ PCAP_ISXDIGIT(s[9]) &&
|
||||
+ PCAP_ISXDIGIT(s[10]) &&
|
||||
+ PCAP_ISXDIGIT(s[11])) {
|
||||
+ addr[0] = pcapint_xdtoi(s[0]) << 4 | pcapint_xdtoi(s[1]);
|
||||
+ addr[1] = pcapint_xdtoi(s[2]) << 4 | pcapint_xdtoi(s[3]);
|
||||
+ addr[2] = pcapint_xdtoi(s[4]) << 4 | pcapint_xdtoi(s[5]);
|
||||
+ addr[3] = pcapint_xdtoi(s[6]) << 4 | pcapint_xdtoi(s[7]);
|
||||
+ addr[4] = pcapint_xdtoi(s[8]) << 4 | pcapint_xdtoi(s[9]);
|
||||
+ addr[5] = pcapint_xdtoi(s[10]) << 4 | pcapint_xdtoi(s[11]);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+// Man page: "xxxx.xxxx.xxxx", regexp: "^[0-9a-fA-F]{4}(\.[0-9a-fA-F]{4}){2}$".
|
||||
+static u_char
|
||||
+pcapint_atomac48_xxxx_3_times(const char *s, uint8_t *addr)
|
||||
+{
|
||||
+ const char sep = '.';
|
||||
+ if (strlen(s) == 14 &&
|
||||
+ PCAP_ISXDIGIT(s[0]) &&
|
||||
+ PCAP_ISXDIGIT(s[1]) &&
|
||||
+ PCAP_ISXDIGIT(s[2]) &&
|
||||
+ PCAP_ISXDIGIT(s[3]) &&
|
||||
+ s[4] == sep &&
|
||||
+ PCAP_ISXDIGIT(s[5]) &&
|
||||
+ PCAP_ISXDIGIT(s[6]) &&
|
||||
+ PCAP_ISXDIGIT(s[7]) &&
|
||||
+ PCAP_ISXDIGIT(s[8]) &&
|
||||
+ s[9] == sep &&
|
||||
+ PCAP_ISXDIGIT(s[10]) &&
|
||||
+ PCAP_ISXDIGIT(s[11]) &&
|
||||
+ PCAP_ISXDIGIT(s[12]) &&
|
||||
+ PCAP_ISXDIGIT(s[13])) {
|
||||
+ addr[0] = pcapint_xdtoi(s[0]) << 4 | pcapint_xdtoi(s[1]);
|
||||
+ addr[1] = pcapint_xdtoi(s[2]) << 4 | pcapint_xdtoi(s[3]);
|
||||
+ addr[2] = pcapint_xdtoi(s[5]) << 4 | pcapint_xdtoi(s[6]);
|
||||
+ addr[3] = pcapint_xdtoi(s[7]) << 4 | pcapint_xdtoi(s[8]);
|
||||
+ addr[4] = pcapint_xdtoi(s[10]) << 4 | pcapint_xdtoi(s[11]);
|
||||
+ addr[5] = pcapint_xdtoi(s[12]) << 4 | pcapint_xdtoi(s[13]);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
- * Convert 's', which can have the one of the forms:
|
||||
+ * Man page: "xx:xx:xx:xx:xx:xx", regexp: "^[0-9a-fA-F]{1,2}(:[0-9a-fA-F]{1,2}){5}$".
|
||||
+ * Man page: "xx-xx-xx-xx-xx-xx", regexp: "^[0-9a-fA-F]{1,2}(-[0-9a-fA-F]{1,2}){5}$".
|
||||
+ * Man page: "xx.xx.xx.xx.xx.xx", regexp: "^[0-9a-fA-F]{1,2}(\.[0-9a-fA-F]{1,2}){5}$".
|
||||
+ * (Any "xx" above can be "x", which is equivalent to "0x".)
|
||||
*
|
||||
- * "xx:xx:xx:xx:xx:xx"
|
||||
- * "xx.xx.xx.xx.xx.xx"
|
||||
- * "xx-xx-xx-xx-xx-xx"
|
||||
- * "xxxx.xxxx.xxxx"
|
||||
- * "xxxxxxxxxxxx"
|
||||
+ * An equivalent (and parametrisable for EUI-64) FSM could be implemented using
|
||||
+ * a smaller graph, but that graph would be neither acyclic nor planar nor
|
||||
+ * trivial to verify.
|
||||
*
|
||||
- * (or various mixes of ':', '.', and '-') into a new
|
||||
- * ethernet address. Assumes 's' is well formed.
|
||||
+ * |
|
||||
+ * [.] v
|
||||
+ * +<---------- START
|
||||
+ * | |
|
||||
+ * | | [0-9a-fA-F]
|
||||
+ * | [.] v
|
||||
+ * +<--------- BYTE0_X ----------+
|
||||
+ * | | |
|
||||
+ * | | [0-9a-fA-F] |
|
||||
+ * | [.] v |
|
||||
+ * +<--------- BYTE0_XX | [:\.-]
|
||||
+ * | | |
|
||||
+ * | | [:\.-] |
|
||||
+ * | [.] v |
|
||||
+ * +<----- BYTE0_SEP_BYTE1 <-----+
|
||||
+ * | |
|
||||
+ * | | [0-9a-fA-F]
|
||||
+ * | [.] v
|
||||
+ * +<--------- BYTE1_X ----------+
|
||||
+ * | | |
|
||||
+ * | | [0-9a-fA-F] |
|
||||
+ * | [.] v |
|
||||
+ * +<--------- BYTE1_XX | <sep>
|
||||
+ * | | |
|
||||
+ * | | <sep> |
|
||||
+ * | [.] v |
|
||||
+ * +<----- BYTE1_SEP_BYTE2 <-----+
|
||||
+ * | |
|
||||
+ * | | [0-9a-fA-F]
|
||||
+ * | [.] v
|
||||
+ * +<--------- BYTE2_X ----------+
|
||||
+ * | | |
|
||||
+ * | | [0-9a-fA-F] |
|
||||
+ * | [.] v |
|
||||
+ * +<--------- BYTE2_XX | <sep>
|
||||
+ * | | |
|
||||
+ * | | <sep> |
|
||||
+ * | [.] v |
|
||||
+ * +<----- BYTE2_SEP_BYTE3 <-----+
|
||||
+ * | |
|
||||
+ * | | [0-9a-fA-F]
|
||||
+ * | [.] v
|
||||
+ * +<--------- BYTE3_X ----------+
|
||||
+ * | | |
|
||||
+ * | | [0-9a-fA-F] |
|
||||
+ * | [.] v |
|
||||
+ * +<--------- BYTE3_XX | <sep>
|
||||
+ * | | |
|
||||
+ * | | <sep> |
|
||||
+ * | [.] v |
|
||||
+ * +<----- BYTE3_SEP_BYTE4 <-----+
|
||||
+ * | |
|
||||
+ * | | [0-9a-fA-F]
|
||||
+ * | [.] v
|
||||
+ * +<--------- BYTE4_X ----------+
|
||||
+ * | | |
|
||||
+ * | | [0-9a-fA-F] |
|
||||
+ * | [.] v |
|
||||
+ * +<--------- BYTE4_XX | <sep>
|
||||
+ * | | |
|
||||
+ * | | <sep> |
|
||||
+ * | [.] v |
|
||||
+ * +<----- BYTE4_SEP_BYTE5 <-----+
|
||||
+ * | |
|
||||
+ * | | [0-9a-fA-F]
|
||||
+ * | [.] v
|
||||
+ * +<--------- BYTE5_X ----------+
|
||||
+ * | | |
|
||||
+ * | | [0-9a-fA-F] |
|
||||
+ * | [.] v |
|
||||
+ * +<--------- BYTE5_XX | \0
|
||||
+ * | | |
|
||||
+ * | | \0 |
|
||||
+ * | | v
|
||||
+ * +--> (reject) +---------> (accept)
|
||||
+ *
|
||||
+ */
|
||||
+static u_char
|
||||
+pcapint_atomac48_x_xx_6_times(const char *s, uint8_t *addr)
|
||||
+{
|
||||
+ enum {
|
||||
+ START,
|
||||
+ BYTE0_X,
|
||||
+ BYTE0_XX,
|
||||
+ BYTE0_SEP_BYTE1,
|
||||
+ BYTE1_X,
|
||||
+ BYTE1_XX,
|
||||
+ BYTE1_SEP_BYTE2,
|
||||
+ BYTE2_X,
|
||||
+ BYTE2_XX,
|
||||
+ BYTE2_SEP_BYTE3,
|
||||
+ BYTE3_X,
|
||||
+ BYTE3_XX,
|
||||
+ BYTE3_SEP_BYTE4,
|
||||
+ BYTE4_X,
|
||||
+ BYTE4_XX,
|
||||
+ BYTE4_SEP_BYTE5,
|
||||
+ BYTE5_X,
|
||||
+ BYTE5_XX,
|
||||
+ } fsm_state = START;
|
||||
+ uint8_t buf[6];
|
||||
+ const char *seplist = ":.-";
|
||||
+ char sep;
|
||||
+
|
||||
+ while (*s) {
|
||||
+ switch (fsm_state) {
|
||||
+ case START:
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[0] = pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE0_X;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE0_X:
|
||||
+ if (strchr(seplist, *s)) {
|
||||
+ sep = *s;
|
||||
+ fsm_state = BYTE0_SEP_BYTE1;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[0] = buf[0] << 4 | pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE0_XX;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE0_XX:
|
||||
+ if (strchr(seplist, *s)) {
|
||||
+ sep = *s;
|
||||
+ fsm_state = BYTE0_SEP_BYTE1;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE0_SEP_BYTE1:
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[1] = pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE1_X;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE1_X:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE1_SEP_BYTE2;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[1] = buf[1] << 4 | pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE1_XX;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE1_XX:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE1_SEP_BYTE2;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE1_SEP_BYTE2:
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[2] = pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE2_X;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE2_X:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE2_SEP_BYTE3;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[2] = buf[2] << 4 | pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE2_XX;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE2_XX:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE2_SEP_BYTE3;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE2_SEP_BYTE3:
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[3] = pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE3_X;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE3_X:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE3_SEP_BYTE4;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[3] = buf[3] << 4 | pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE3_XX;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE3_XX:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE3_SEP_BYTE4;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE3_SEP_BYTE4:
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[4] = pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE4_X;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE4_X:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE4_SEP_BYTE5;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[4] = buf[4] << 4 | pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE4_XX;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE4_XX:
|
||||
+ if (*s == sep) {
|
||||
+ fsm_state = BYTE4_SEP_BYTE5;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE4_SEP_BYTE5:
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[5] = pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE5_X;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE5_X:
|
||||
+ if (PCAP_ISXDIGIT(*s)) {
|
||||
+ buf[5] = buf[5] << 4 | pcapint_xdtoi(*s);
|
||||
+ fsm_state = BYTE5_XX;
|
||||
+ break;
|
||||
+ }
|
||||
+ goto reject;
|
||||
+ case BYTE5_XX:
|
||||
+ goto reject;
|
||||
+ } // switch
|
||||
+ s++;
|
||||
+ } // while
|
||||
+
|
||||
+ if (fsm_state == BYTE5_X || fsm_state == BYTE5_XX) {
|
||||
+ // accept
|
||||
+ memcpy(addr, buf, sizeof(buf));
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+reject:
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+// The 'addr' argument must point to an array of at least 6 elements.
|
||||
+static int
|
||||
+pcapint_atomac48(const char *s, uint8_t *addr)
|
||||
+{
|
||||
+ return s && (
|
||||
+ pcapint_atomac48_xxxxxxxxxxxx(s, addr) ||
|
||||
+ pcapint_atomac48_xxxx_3_times(s, addr) ||
|
||||
+ pcapint_atomac48_x_xx_6_times(s, addr)
|
||||
+ );
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * If 's' is a MAC-48 address in one of the forms documented in pcap-filter(7)
|
||||
+ * for "ether host", return a pointer to an allocated buffer with the binary
|
||||
+ * value of the address. Return NULL on any error.
|
||||
*/
|
||||
u_char *
|
||||
pcap_ether_aton(const char *s)
|
||||
{
|
||||
- register u_char *ep, *e;
|
||||
- register u_char d;
|
||||
+ uint8_t tmp[6];
|
||||
+ if (! pcapint_atomac48(s, tmp))
|
||||
+ return (NULL);
|
||||
|
||||
- e = ep = (u_char *)malloc(6);
|
||||
+ u_char *e = malloc(6);
|
||||
if (e == NULL)
|
||||
return (NULL);
|
||||
-
|
||||
- while (*s) {
|
||||
- if (*s == ':' || *s == '.' || *s == '-')
|
||||
- s += 1;
|
||||
- d = pcapint_xdtoi(*s++);
|
||||
- if (PCAP_ISXDIGIT(*s)) {
|
||||
- d <<= 4;
|
||||
- d |= pcapint_xdtoi(*s++);
|
||||
- }
|
||||
- *ep++ = d;
|
||||
- }
|
||||
-
|
||||
+ memcpy(e, tmp, sizeof(tmp));
|
||||
return (e);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 7fabf607f2319a36a0bd78444247180acb838e69 Mon Sep 17 00:00:00 2001
|
||||
From: Guy Harris <gharris@sonic.net>
|
||||
Date: Sun, 7 Sep 2025 12:51:56 -0700
|
||||
Subject: [PATCH] Fix a copy-and-pasteo in utf_16le_to_utf_8_truncated().
|
||||
|
||||
For the four octets of UTF-8 case, it was decrementing the remaining
|
||||
buffer length by 3, not 4.
|
||||
|
||||
Thanks to a team of developers from the Univesity of Waterloo for
|
||||
reporting this.
|
||||
|
||||
(cherry picked from commit aebfca1aea2fc8c177760a26e8f4de27b51d1b3b)
|
||||
|
||||
CVE: CVE-2025-11964
|
||||
Upstream-Status: Backport [https://github.com/the-tcpdump-group/libpcap/commit/7fabf607f2319a36a0bd78444247180acb838e69]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
fmtutils.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fmtutils.c b/fmtutils.c
|
||||
index a5a4fe62..78a0f8b7 100644
|
||||
--- a/fmtutils.c
|
||||
+++ b/fmtutils.c
|
||||
@@ -235,7 +235,7 @@ utf_16le_to_utf_8_truncated(const wchar_t *utf_16, char *utf_8,
|
||||
*utf_8++ = ((uc >> 12) & 0x3F) | 0x80;
|
||||
*utf_8++ = ((uc >> 6) & 0x3F) | 0x80;
|
||||
*utf_8++ = ((uc >> 0) & 0x3F) | 0x80;
|
||||
- utf_8_len -= 3;
|
||||
+ utf_8_len -= 4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz \
|
||||
file://CVE-2023-7256-pre4.patch \
|
||||
file://CVE-2023-7256.patch \
|
||||
file://CVE-2024-8006.patch \
|
||||
file://CVE-2025-11961-01.patch \
|
||||
file://CVE-2025-11961-02.patch \
|
||||
file://CVE-2025-11964.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4"
|
||||
|
||||
@@ -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"
|
||||
@@ -34,6 +34,7 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
|
||||
file://0001-Add-m_snprintf-that-won-t-return-negative.patch \
|
||||
file://0001-Handle-arbitrary-length-paths-and-commands-in-multih.patch \
|
||||
file://CVE-2025-47203.patch \
|
||||
file://CVE-2019-6111.patch \
|
||||
"
|
||||
|
||||
PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
|
||||
|
||||
157
meta/recipes-core/dropbear/dropbear/CVE-2019-6111.patch
Normal file
157
meta/recipes-core/dropbear/dropbear/CVE-2019-6111.patch
Normal file
@@ -0,0 +1,157 @@
|
||||
From 48a17cff6aa104b8e806ddb2191f83f1024060f1 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnston <matt@ucc.asn.au>
|
||||
Date: Tue, 9 Dec 2025 22:59:19 +0900
|
||||
Subject: [PATCH] scp CVE-2019-6111 fix
|
||||
|
||||
Cherry-pick from OpenSSH portable
|
||||
|
||||
391ffc4b9d31 ("upstream: check in scp client that filenames sent during")
|
||||
|
||||
upstream: check in scp client that filenames sent during
|
||||
|
||||
remote->local directory copies satisfy the wildcard specified by the user.
|
||||
|
||||
This checking provides some protection against a malicious server
|
||||
sending unexpected filenames, but it comes at a risk of rejecting wanted
|
||||
files due to differences between client and server wildcard expansion rules.
|
||||
|
||||
For this reason, this also adds a new -T flag to disable the check.
|
||||
|
||||
reported by Harry Sintonen
|
||||
fix approach suggested by markus@;
|
||||
has been in snaps for ~1wk courtesy deraadt@
|
||||
|
||||
CVE: CVE-2019-6111
|
||||
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/48a17cff6aa104b8e806ddb2191f83f1024060f1]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
scp.c | 38 +++++++++++++++++++++++++++++---------
|
||||
1 file changed, 29 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/scp.c b/scp.c
|
||||
index 384f2cb..bf98986 100644
|
||||
--- a/scp.c
|
||||
+++ b/scp.c
|
||||
@@ -76,6 +76,8 @@
|
||||
#include "includes.h"
|
||||
/*RCSID("$OpenBSD: scp.c,v 1.130 2006/01/31 10:35:43 djm Exp $");*/
|
||||
|
||||
+#include <fnmatch.h>
|
||||
+
|
||||
#include "atomicio.h"
|
||||
#include "compat.h"
|
||||
#include "scpmisc.h"
|
||||
@@ -291,14 +293,14 @@ void verifydir(char *);
|
||||
|
||||
uid_t userid;
|
||||
int errs, remin, remout;
|
||||
-int pflag, iamremote, iamrecursive, targetshouldbedirectory;
|
||||
+int Tflag, pflag, iamremote, iamrecursive, targetshouldbedirectory;
|
||||
|
||||
#define CMDNEEDS 64
|
||||
char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
|
||||
|
||||
int response(void);
|
||||
void rsource(char *, struct stat *);
|
||||
-void sink(int, char *[]);
|
||||
+void sink(int, char *[], const char *);
|
||||
void source(int, char *[]);
|
||||
void tolocal(int, char *[]);
|
||||
void toremote(char *, int, char *[]);
|
||||
@@ -325,8 +327,8 @@ main(int argc, char **argv)
|
||||
args.list = NULL;
|
||||
addargs(&args, "%s", ssh_program);
|
||||
|
||||
- fflag = tflag = 0;
|
||||
- while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q1246S:o:F:")) != -1)
|
||||
+ fflag = Tflag = tflag = 0;
|
||||
+ while ((ch = getopt(argc, argv, "dfl:prtTvBCc:i:P:q1246S:o:F:")) != -1)
|
||||
switch (ch) {
|
||||
/* User-visible flags. */
|
||||
case '1':
|
||||
@@ -389,9 +391,12 @@ main(int argc, char **argv)
|
||||
setmode(0, O_BINARY);
|
||||
#endif
|
||||
break;
|
||||
+ case 'T':
|
||||
+ Tflag = 1;
|
||||
+ break;
|
||||
default:
|
||||
usage();
|
||||
- }
|
||||
+ }
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
@@ -409,7 +414,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
if (tflag) {
|
||||
/* Receive data. */
|
||||
- sink(argc, argv);
|
||||
+ sink(argc, argv, NULL);
|
||||
exit(errs != 0);
|
||||
}
|
||||
if (argc < 2)
|
||||
@@ -590,7 +595,7 @@ tolocal(int argc, char **argv)
|
||||
continue;
|
||||
}
|
||||
xfree(bp);
|
||||
- sink(1, argv + argc - 1);
|
||||
+ sink(1, argv + argc - 1, src);
|
||||
(void) close(remin);
|
||||
remin = remout = -1;
|
||||
}
|
||||
@@ -823,7 +828,7 @@ bwlimit(int amount)
|
||||
}
|
||||
|
||||
void
|
||||
-sink(int argc, char **argv)
|
||||
+sink(int argc, char **argv, const char *src)
|
||||
{
|
||||
static BUF buffer;
|
||||
struct stat stb;
|
||||
@@ -837,6 +842,7 @@ sink(int argc, char **argv)
|
||||
off_t size, statbytes;
|
||||
int setimes, targisdir, wrerrno = 0;
|
||||
char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];
|
||||
+ char *src_copy = NULL, *restrict_pattern = NULL;
|
||||
struct timeval tv[2];
|
||||
|
||||
#define atime tv[0]
|
||||
@@ -858,6 +864,17 @@ sink(int argc, char **argv)
|
||||
(void) atomicio(vwrite, remout, "", 1);
|
||||
if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
|
||||
targisdir = 1;
|
||||
+ if (src != NULL && !iamrecursive && !Tflag) {
|
||||
+ /*
|
||||
+ * Prepare to try to restrict incoming filenames to match
|
||||
+ * the requested destination file glob.
|
||||
+ */
|
||||
+ if ((src_copy = strdup(src)) == NULL)
|
||||
+ fatal("strdup failed");
|
||||
+ if ((restrict_pattern = strrchr(src_copy, '/')) != NULL) {
|
||||
+ *restrict_pattern++ = '\0';
|
||||
+ }
|
||||
+ }
|
||||
for (first = 1;; first = 0) {
|
||||
cp = buf;
|
||||
if (atomicio(read, remin, cp, 1) != 1)
|
||||
@@ -940,6 +957,9 @@ sink(int argc, char **argv)
|
||||
run_err("error: unexpected filename: %s", cp);
|
||||
exit(1);
|
||||
}
|
||||
+ if (restrict_pattern != NULL &&
|
||||
+ fnmatch(restrict_pattern, cp, 0) != 0)
|
||||
+ SCREWUP("filename does not match request");
|
||||
if (targisdir) {
|
||||
static char *namebuf = NULL;
|
||||
static size_t cursize = 0;
|
||||
@@ -978,7 +998,7 @@ sink(int argc, char **argv)
|
||||
goto bad;
|
||||
}
|
||||
vect[0] = xstrdup(np);
|
||||
- sink(1, vect);
|
||||
+ sink(1, vect, src);
|
||||
if (setimes) {
|
||||
setimes = 0;
|
||||
if (utimes(vect[0], tv) < 0)
|
||||
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/"
|
||||
|
||||
125
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-13601-01.patch
Normal file
125
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-13601-01.patch
Normal file
@@ -0,0 +1,125 @@
|
||||
From f28340ee62c655487972ad3c632d231ee098fb7f Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Thu, 13 Nov 2025 18:27:22 +0000
|
||||
Subject: [PATCH] gconvert: Error out if g_escape_uri_string() would overflow
|
||||
|
||||
If the string to escape contains a very large number of unacceptable
|
||||
characters (which would need escaping), the calculation of the length of
|
||||
the escaped string could overflow, leading to a potential write off the
|
||||
end of the newly allocated string.
|
||||
|
||||
In addition to that, the number of unacceptable characters was counted
|
||||
in a signed integer, which would overflow to become negative, making it
|
||||
easier for an attacker to craft an input string which would cause an
|
||||
out-of-bounds write.
|
||||
|
||||
Fix that by validating the allocation length, and using an unsigned
|
||||
integer to count the number of unacceptable characters.
|
||||
|
||||
Spotted by treeplus. Thanks to the Sovereign Tech Resilience programme
|
||||
from the Sovereign Tech Agency. ID: #YWH-PGM9867-134
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
|
||||
Fixes: #3827
|
||||
|
||||
CVE: CVE-2025-13601
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/f28340ee62c655487972ad3c632d231ee098fb7f]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gconvert.c | 36 +++++++++++++++++++++++++-----------
|
||||
1 file changed, 25 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/glib/gconvert.c b/glib/gconvert.c
|
||||
index b066dd5a8..a02d2ea73 100644
|
||||
--- a/glib/gconvert.c
|
||||
+++ b/glib/gconvert.c
|
||||
@@ -1425,8 +1425,9 @@ static const gchar hex[] = "0123456789ABCDEF";
|
||||
/* Note: This escape function works on file: URIs, but if you want to
|
||||
* escape something else, please read RFC-2396 */
|
||||
static gchar *
|
||||
-g_escape_uri_string (const gchar *string,
|
||||
- UnsafeCharacterSet mask)
|
||||
+g_escape_uri_string (const gchar *string,
|
||||
+ UnsafeCharacterSet mask,
|
||||
+ GError **error)
|
||||
{
|
||||
#define ACCEPTABLE(a) ((a)>=32 && (a)<128 && (acceptable[(a)-32] & use_mask))
|
||||
|
||||
@@ -1434,7 +1435,7 @@ g_escape_uri_string (const gchar *string,
|
||||
gchar *q;
|
||||
gchar *result;
|
||||
int c;
|
||||
- gint unacceptable;
|
||||
+ size_t unacceptable;
|
||||
UnsafeCharacterSet use_mask;
|
||||
|
||||
g_return_val_if_fail (mask == UNSAFE_ALL
|
||||
@@ -1451,7 +1452,14 @@ g_escape_uri_string (const gchar *string,
|
||||
if (!ACCEPTABLE (c))
|
||||
unacceptable++;
|
||||
}
|
||||
-
|
||||
+
|
||||
+ if (unacceptable >= (G_MAXSIZE - (p - string)) / 2)
|
||||
+ {
|
||||
+ g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_BAD_URI,
|
||||
+ _("The URI is too long"));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
result = g_malloc (p - string + unacceptable * 2 + 1);
|
||||
|
||||
use_mask = mask;
|
||||
@@ -1476,12 +1484,13 @@ g_escape_uri_string (const gchar *string,
|
||||
|
||||
|
||||
static gchar *
|
||||
-g_escape_file_uri (const gchar *hostname,
|
||||
- const gchar *pathname)
|
||||
+g_escape_file_uri (const gchar *hostname,
|
||||
+ const gchar *pathname,
|
||||
+ GError **error)
|
||||
{
|
||||
char *escaped_hostname = NULL;
|
||||
- char *escaped_path;
|
||||
- char *res;
|
||||
+ char *escaped_path = NULL;
|
||||
+ char *res = NULL;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
char *p, *backslash;
|
||||
@@ -1502,10 +1511,14 @@ g_escape_file_uri (const gchar *hostname,
|
||||
|
||||
if (hostname && *hostname != '\0')
|
||||
{
|
||||
- escaped_hostname = g_escape_uri_string (hostname, UNSAFE_HOST);
|
||||
+ escaped_hostname = g_escape_uri_string (hostname, UNSAFE_HOST, error);
|
||||
+ if (escaped_hostname == NULL)
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
- escaped_path = g_escape_uri_string (pathname, UNSAFE_PATH);
|
||||
+ escaped_path = g_escape_uri_string (pathname, UNSAFE_PATH, error);
|
||||
+ if (escaped_path == NULL)
|
||||
+ goto out;
|
||||
|
||||
res = g_strconcat ("file://",
|
||||
(escaped_hostname) ? escaped_hostname : "",
|
||||
@@ -1513,6 +1526,7 @@ g_escape_file_uri (const gchar *hostname,
|
||||
escaped_path,
|
||||
NULL);
|
||||
|
||||
+out:
|
||||
#ifdef G_OS_WIN32
|
||||
g_free ((char *) pathname);
|
||||
#endif
|
||||
@@ -1832,7 +1846,7 @@ g_filename_to_uri (const gchar *filename,
|
||||
hostname = NULL;
|
||||
#endif
|
||||
|
||||
- escaped_uri = g_escape_file_uri (hostname, filename);
|
||||
+ escaped_uri = g_escape_file_uri (hostname, filename, error);
|
||||
|
||||
return escaped_uri;
|
||||
}
|
||||
128
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-13601-02.patch
Normal file
128
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-13601-02.patch
Normal file
@@ -0,0 +1,128 @@
|
||||
From 7bd3fc372040cdf8eada7f65c32c30da52a7461d Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Thu, 13 Nov 2025 18:31:43 +0000
|
||||
Subject: [PATCH] fuzzing: Add fuzz tests for g_filename_{to,from}_uri()
|
||||
|
||||
These functions could be called on untrusted input data, and since they
|
||||
do URI escaping/unescaping, they have non-trivial string handling code.
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
|
||||
See: #3827
|
||||
|
||||
CVE: CVE-2025-13601
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/7bd3fc372040cdf8eada7f65c32c30da52a7461d]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
fuzzing/fuzz_filename_from_uri.c | 40 ++++++++++++++++++++++++++++++++
|
||||
fuzzing/fuzz_filename_to_uri.c | 40 ++++++++++++++++++++++++++++++++
|
||||
fuzzing/meson.build | 2 ++
|
||||
3 files changed, 82 insertions(+)
|
||||
create mode 100644 fuzzing/fuzz_filename_from_uri.c
|
||||
create mode 100644 fuzzing/fuzz_filename_to_uri.c
|
||||
|
||||
diff --git a/fuzzing/fuzz_filename_from_uri.c b/fuzzing/fuzz_filename_from_uri.c
|
||||
new file mode 100644
|
||||
index 000000000..9b7a715f0
|
||||
--- /dev/null
|
||||
+++ b/fuzzing/fuzz_filename_from_uri.c
|
||||
@@ -0,0 +1,40 @@
|
||||
+/*
|
||||
+ * Copyright 2025 GNOME Foundation, Inc.
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include "fuzz.h"
|
||||
+
|
||||
+int
|
||||
+LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
|
||||
+{
|
||||
+ unsigned char *nul_terminated_data = NULL;
|
||||
+ char *filename = NULL;
|
||||
+ GError *local_error = NULL;
|
||||
+
|
||||
+ fuzz_set_logging_func ();
|
||||
+
|
||||
+ /* ignore @size (g_filename_from_uri() doesn’t support it); ensure @data is nul-terminated */
|
||||
+ nul_terminated_data = (unsigned char *) g_strndup ((const char *) data, size);
|
||||
+ filename = g_filename_from_uri ((const char *) nul_terminated_data, NULL, &local_error);
|
||||
+ g_free (nul_terminated_data);
|
||||
+
|
||||
+ g_free (filename);
|
||||
+ g_clear_error (&local_error);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/fuzzing/fuzz_filename_to_uri.c b/fuzzing/fuzz_filename_to_uri.c
|
||||
new file mode 100644
|
||||
index 000000000..acb319203
|
||||
--- /dev/null
|
||||
+++ b/fuzzing/fuzz_filename_to_uri.c
|
||||
@@ -0,0 +1,40 @@
|
||||
+/*
|
||||
+ * Copyright 2025 GNOME Foundation, Inc.
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include "fuzz.h"
|
||||
+
|
||||
+int
|
||||
+LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
|
||||
+{
|
||||
+ unsigned char *nul_terminated_data = NULL;
|
||||
+ char *uri = NULL;
|
||||
+ GError *local_error = NULL;
|
||||
+
|
||||
+ fuzz_set_logging_func ();
|
||||
+
|
||||
+ /* ignore @size (g_filename_to_uri() doesn’t support it); ensure @data is nul-terminated */
|
||||
+ nul_terminated_data = (unsigned char *) g_strndup ((const char *) data, size);
|
||||
+ uri = g_filename_to_uri ((const char *) nul_terminated_data, NULL, &local_error);
|
||||
+ g_free (nul_terminated_data);
|
||||
+
|
||||
+ g_free (uri);
|
||||
+ g_clear_error (&local_error);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/fuzzing/meson.build b/fuzzing/meson.build
|
||||
index addbe9071..05f936eeb 100644
|
||||
--- a/fuzzing/meson.build
|
||||
+++ b/fuzzing/meson.build
|
||||
@@ -4,6 +4,8 @@ fuzz_targets = [
|
||||
'fuzz_date_parse',
|
||||
'fuzz_date_time_new_from_iso8601',
|
||||
'fuzz_dbus_message',
|
||||
+ 'fuzz_filename_from_uri',
|
||||
+ 'fuzz_filename_to_uri',
|
||||
'fuzz_inet_address_mask_new_from_string',
|
||||
'fuzz_inet_address_new_from_string',
|
||||
'fuzz_inet_socket_address_new_from_string',
|
||||
69
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14087-01.patch
Normal file
69
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14087-01.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
From 31f82e22e21bae520b7228f7f57d357fb20df8a4 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Tue, 25 Nov 2025 19:02:56 +0000
|
||||
Subject: [PATCH] gvariant-parser: Fix potential integer overflow parsing
|
||||
(byte)strings
|
||||
|
||||
The termination condition for parsing string and bytestring literals in
|
||||
GVariant text format input was subject to an integer overflow for input
|
||||
string (or bytestring) literals longer than `INT_MAX`.
|
||||
|
||||
Fix that by counting as a `size_t` rather than as an `int`. The counter
|
||||
can never correctly be negative.
|
||||
|
||||
Spotted by treeplus. Thanks to the Sovereign Tech Resilience programme
|
||||
from the Sovereign Tech Agency. ID: #YWH-PGM9867-145
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
Fixes: #3834
|
||||
|
||||
CVE: CVE-2025-14087
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/31f82e22e21bae520b7228f7f57d357fb20df8a4]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gvariant-parser.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
|
||||
index 2f1d3db9f..2d6e9856f 100644
|
||||
--- a/glib/gvariant-parser.c
|
||||
+++ b/glib/gvariant-parser.c
|
||||
@@ -594,7 +594,7 @@ ast_resolve (AST *ast,
|
||||
{
|
||||
GVariant *value;
|
||||
gchar *pattern;
|
||||
- gint i, j = 0;
|
||||
+ size_t i, j = 0;
|
||||
|
||||
pattern = ast_get_pattern (ast, error);
|
||||
|
||||
@@ -1555,9 +1555,9 @@ string_free (AST *ast)
|
||||
* No leading/trailing space allowed. */
|
||||
static gboolean
|
||||
unicode_unescape (const gchar *src,
|
||||
- gint *src_ofs,
|
||||
+ size_t *src_ofs,
|
||||
gchar *dest,
|
||||
- gint *dest_ofs,
|
||||
+ size_t *dest_ofs,
|
||||
gsize length,
|
||||
SourceRef *ref,
|
||||
GError **error)
|
||||
@@ -1618,7 +1618,7 @@ string_parse (TokenStream *stream,
|
||||
gsize length;
|
||||
gchar quote;
|
||||
gchar *str;
|
||||
- gint i, j;
|
||||
+ size_t i, j;
|
||||
|
||||
token_stream_start_ref (stream, &ref);
|
||||
token = token_stream_get (stream);
|
||||
@@ -1748,7 +1748,7 @@ bytestring_parse (TokenStream *stream,
|
||||
gsize length;
|
||||
gchar quote;
|
||||
gchar *str;
|
||||
- gint i, j;
|
||||
+ size_t i, j;
|
||||
|
||||
token_stream_start_ref (stream, &ref);
|
||||
token = token_stream_get (stream);
|
||||
240
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14087-02.patch
Normal file
240
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14087-02.patch
Normal file
@@ -0,0 +1,240 @@
|
||||
From ac9de0871281cf734f6e269988f90a2521582a08 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Tue, 25 Nov 2025 19:19:16 +0000
|
||||
Subject: [PATCH] gvariant-parser: Use size_t to count numbers of child
|
||||
elements
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Rather than using `gint`, which could overflow for arrays (or dicts, or
|
||||
tuples) longer than `INT_MAX`. There may be other limits which prevent
|
||||
parsed containers becoming that long, but we might as well make the type
|
||||
system reflect the programmer’s intention as best it can anyway.
|
||||
|
||||
For arrays and tuples this is straightforward. For dictionaries, it’s
|
||||
slightly complicated by the fact that the code used
|
||||
`dict->n_children == -1` to indicate that the `Dictionary` struct in
|
||||
question actually represented a single freestanding dict entry. In
|
||||
GVariant text format, that would be `{1, "one"}`.
|
||||
|
||||
The implementation previously didn’t define the semantics of
|
||||
`dict->n_children < -1`.
|
||||
|
||||
Now, instead, change `Dictionary.n_children` to `size_t`, and define a
|
||||
magic value `DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY` to indicate that
|
||||
the `Dictionary` represents a single freestanding dict entry.
|
||||
|
||||
This magic value is `SIZE_MAX`, and given that a dictionary entry takes
|
||||
more than one byte to represent in GVariant text format, that means it’s
|
||||
not possible to have that many entries in a parsed dictionary, so this
|
||||
magic value won’t be hit by a normal dictionary. An assertion checks
|
||||
this anyway.
|
||||
|
||||
Spotted while working on #3834.
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
|
||||
CVE: CVE-2025-14087
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/ac9de0871281cf734f6e269988f90a2521582a08]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gvariant-parser.c | 58 ++++++++++++++++++++++++------------------
|
||||
1 file changed, 33 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
|
||||
index 2d6e9856f..519baa3f3 100644
|
||||
--- a/glib/gvariant-parser.c
|
||||
+++ b/glib/gvariant-parser.c
|
||||
@@ -647,9 +647,9 @@ static AST *parse (TokenStream *stream,
|
||||
GError **error);
|
||||
|
||||
static void
|
||||
-ast_array_append (AST ***array,
|
||||
- gint *n_items,
|
||||
- AST *ast)
|
||||
+ast_array_append (AST ***array,
|
||||
+ size_t *n_items,
|
||||
+ AST *ast)
|
||||
{
|
||||
if ((*n_items & (*n_items - 1)) == 0)
|
||||
*array = g_renew (AST *, *array, *n_items ? 2 ** n_items : 1);
|
||||
@@ -658,10 +658,10 @@ ast_array_append (AST ***array,
|
||||
}
|
||||
|
||||
static void
|
||||
-ast_array_free (AST **array,
|
||||
- gint n_items)
|
||||
+ast_array_free (AST **array,
|
||||
+ size_t n_items)
|
||||
{
|
||||
- gint i;
|
||||
+ size_t i;
|
||||
|
||||
for (i = 0; i < n_items; i++)
|
||||
ast_free (array[i]);
|
||||
@@ -670,11 +670,11 @@ ast_array_free (AST **array,
|
||||
|
||||
static gchar *
|
||||
ast_array_get_pattern (AST **array,
|
||||
- gint n_items,
|
||||
+ size_t n_items,
|
||||
GError **error)
|
||||
{
|
||||
gchar *pattern;
|
||||
- gint i;
|
||||
+ size_t i;
|
||||
|
||||
/* Find the pattern which applies to all children in the array, by l-folding a
|
||||
* coalesce operation.
|
||||
@@ -706,7 +706,7 @@ ast_array_get_pattern (AST **array,
|
||||
* pair of values.
|
||||
*/
|
||||
{
|
||||
- int j = 0;
|
||||
+ size_t j = 0;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
@@ -891,7 +891,7 @@ typedef struct
|
||||
AST ast;
|
||||
|
||||
AST **children;
|
||||
- gint n_children;
|
||||
+ size_t n_children;
|
||||
} Array;
|
||||
|
||||
static gchar *
|
||||
@@ -924,7 +924,7 @@ array_get_value (AST *ast,
|
||||
Array *array = (Array *) ast;
|
||||
const GVariantType *childtype;
|
||||
GVariantBuilder builder;
|
||||
- gint i;
|
||||
+ size_t i;
|
||||
|
||||
if (!g_variant_type_is_array (type))
|
||||
return ast_type_error (ast, type, error);
|
||||
@@ -1010,7 +1010,7 @@ typedef struct
|
||||
AST ast;
|
||||
|
||||
AST **children;
|
||||
- gint n_children;
|
||||
+ size_t n_children;
|
||||
} Tuple;
|
||||
|
||||
static gchar *
|
||||
@@ -1020,7 +1020,7 @@ tuple_get_pattern (AST *ast,
|
||||
Tuple *tuple = (Tuple *) ast;
|
||||
gchar *result = NULL;
|
||||
gchar **parts;
|
||||
- gint i;
|
||||
+ size_t i;
|
||||
|
||||
parts = g_new (gchar *, tuple->n_children + 4);
|
||||
parts[tuple->n_children + 1] = (gchar *) ")";
|
||||
@@ -1050,7 +1050,7 @@ tuple_get_value (AST *ast,
|
||||
Tuple *tuple = (Tuple *) ast;
|
||||
const GVariantType *childtype;
|
||||
GVariantBuilder builder;
|
||||
- gint i;
|
||||
+ size_t i;
|
||||
|
||||
if (!g_variant_type_is_tuple (type))
|
||||
return ast_type_error (ast, type, error);
|
||||
@@ -1242,9 +1242,16 @@ typedef struct
|
||||
|
||||
AST **keys;
|
||||
AST **values;
|
||||
- gint n_children;
|
||||
+
|
||||
+ /* Iff this is DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY then this struct
|
||||
+ * represents a single freestanding dict entry (`{1, "one"}`) rather than a
|
||||
+ * full dict. In the freestanding case, @keys and @values have exactly one
|
||||
+ * member each. */
|
||||
+ size_t n_children;
|
||||
} Dictionary;
|
||||
|
||||
+#define DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY ((size_t) -1)
|
||||
+
|
||||
static gchar *
|
||||
dictionary_get_pattern (AST *ast,
|
||||
GError **error)
|
||||
@@ -1259,7 +1266,7 @@ dictionary_get_pattern (AST *ast,
|
||||
return g_strdup ("Ma{**}");
|
||||
|
||||
key_pattern = ast_array_get_pattern (dict->keys,
|
||||
- abs (dict->n_children),
|
||||
+ (dict->n_children == DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY) ? 1 : dict->n_children,
|
||||
error);
|
||||
|
||||
if (key_pattern == NULL)
|
||||
@@ -1290,7 +1297,7 @@ dictionary_get_pattern (AST *ast,
|
||||
return NULL;
|
||||
|
||||
result = g_strdup_printf ("M%s{%c%s}",
|
||||
- dict->n_children > 0 ? "a" : "",
|
||||
+ (dict->n_children > 0 && dict->n_children != DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY) ? "a" : "",
|
||||
key_char, value_pattern);
|
||||
g_free (value_pattern);
|
||||
|
||||
@@ -1304,7 +1311,7 @@ dictionary_get_value (AST *ast,
|
||||
{
|
||||
Dictionary *dict = (Dictionary *) ast;
|
||||
|
||||
- if (dict->n_children == -1)
|
||||
+ if (dict->n_children == DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY)
|
||||
{
|
||||
const GVariantType *subtype;
|
||||
GVariantBuilder builder;
|
||||
@@ -1337,7 +1344,7 @@ dictionary_get_value (AST *ast,
|
||||
{
|
||||
const GVariantType *entry, *key, *val;
|
||||
GVariantBuilder builder;
|
||||
- gint i;
|
||||
+ size_t i;
|
||||
|
||||
if (!g_variant_type_is_subtype_of (type, G_VARIANT_TYPE_DICTIONARY))
|
||||
return ast_type_error (ast, type, error);
|
||||
@@ -1378,12 +1385,12 @@ static void
|
||||
dictionary_free (AST *ast)
|
||||
{
|
||||
Dictionary *dict = (Dictionary *) ast;
|
||||
- gint n_children;
|
||||
+ size_t n_children;
|
||||
|
||||
- if (dict->n_children > -1)
|
||||
- n_children = dict->n_children;
|
||||
- else
|
||||
+ if (dict->n_children == DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY)
|
||||
n_children = 1;
|
||||
+ else
|
||||
+ n_children = dict->n_children;
|
||||
|
||||
ast_array_free (dict->keys, n_children);
|
||||
ast_array_free (dict->values, n_children);
|
||||
@@ -1401,7 +1408,7 @@ dictionary_parse (TokenStream *stream,
|
||||
maybe_wrapper, dictionary_get_value,
|
||||
dictionary_free
|
||||
};
|
||||
- gint n_keys, n_values;
|
||||
+ size_t n_keys, n_values;
|
||||
gboolean only_one;
|
||||
Dictionary *dict;
|
||||
AST *first;
|
||||
@@ -1444,7 +1451,7 @@ dictionary_parse (TokenStream *stream,
|
||||
goto error;
|
||||
|
||||
g_assert (n_keys == 1 && n_values == 1);
|
||||
- dict->n_children = -1;
|
||||
+ dict->n_children = DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY;
|
||||
|
||||
return (AST *) dict;
|
||||
}
|
||||
@@ -1477,6 +1484,7 @@ dictionary_parse (TokenStream *stream,
|
||||
}
|
||||
|
||||
g_assert (n_keys == n_values);
|
||||
+ g_assert (n_keys != DICTIONARY_N_CHILDREN_FREESTANDING_ENTRY);
|
||||
dict->n_children = n_keys;
|
||||
|
||||
return (AST *) dict;
|
||||
150
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14087-03.patch
Normal file
150
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14087-03.patch
Normal file
@@ -0,0 +1,150 @@
|
||||
From acaabfedff42e974334dd5368e6103d2845aaba6 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Tue, 25 Nov 2025 19:25:58 +0000
|
||||
Subject: [PATCH] gvariant-parser: Convert error handling code to use size_t
|
||||
|
||||
The error handling code allows for printing out the range of input bytes
|
||||
related to a parsing error. This was previously done using `gint`, but
|
||||
the input could be longer than `INT_MAX`, so it should really be done
|
||||
using `size_t`.
|
||||
|
||||
Spotted while working on #3834.
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
|
||||
CVE: CVE-2025-14087
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/acaabfedff42e974334dd5368e6103d2845aaba6]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gvariant-parser.c | 36 +++++++++++++++++++++++-------------
|
||||
1 file changed, 23 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
|
||||
index 519baa3f3..1b1ddd654 100644
|
||||
--- a/glib/gvariant-parser.c
|
||||
+++ b/glib/gvariant-parser.c
|
||||
@@ -88,7 +88,9 @@ g_variant_parser_get_error_quark (void)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
- gint start, end;
|
||||
+ /* Offsets from the start of the input, in bytes. Can be equal when referring
|
||||
+ * to a point rather than a range. The invariant `end >= start` always holds. */
|
||||
+ size_t start, end;
|
||||
} SourceRef;
|
||||
|
||||
G_GNUC_PRINTF(5, 0)
|
||||
@@ -103,14 +105,16 @@ parser_set_error_va (GError **error,
|
||||
GString *msg = g_string_new (NULL);
|
||||
|
||||
if (location->start == location->end)
|
||||
- g_string_append_printf (msg, "%d", location->start);
|
||||
+ g_string_append_printf (msg, "%" G_GSIZE_FORMAT, location->start);
|
||||
else
|
||||
- g_string_append_printf (msg, "%d-%d", location->start, location->end);
|
||||
+ g_string_append_printf (msg, "%" G_GSIZE_FORMAT "-%" G_GSIZE_FORMAT,
|
||||
+ location->start, location->end);
|
||||
|
||||
if (other != NULL)
|
||||
{
|
||||
g_assert (other->start != other->end);
|
||||
- g_string_append_printf (msg, ",%d-%d", other->start, other->end);
|
||||
+ g_string_append_printf (msg, ",%" G_GSIZE_FORMAT "-%" G_GSIZE_FORMAT,
|
||||
+ other->start, other->end);
|
||||
}
|
||||
g_string_append_c (msg, ':');
|
||||
|
||||
@@ -137,11 +141,15 @@ parser_set_error (GError **error,
|
||||
|
||||
typedef struct
|
||||
{
|
||||
+ /* We should always have the following ordering constraint:
|
||||
+ * start <= this <= stream <= end
|
||||
+ * Additionally, unless in an error or EOF state, `this < stream`.
|
||||
+ */
|
||||
const gchar *start;
|
||||
const gchar *stream;
|
||||
const gchar *end;
|
||||
|
||||
- const gchar *this;
|
||||
+ const gchar *this; /* (nullable) */
|
||||
} TokenStream;
|
||||
|
||||
|
||||
@@ -172,7 +180,7 @@ token_stream_set_error (TokenStream *stream,
|
||||
static gboolean
|
||||
token_stream_prepare (TokenStream *stream)
|
||||
{
|
||||
- gint brackets = 0;
|
||||
+ gssize brackets = 0;
|
||||
const gchar *end;
|
||||
|
||||
if (stream->this != NULL)
|
||||
@@ -402,7 +410,7 @@ static void
|
||||
pattern_copy (gchar **out,
|
||||
const gchar **in)
|
||||
{
|
||||
- gint brackets = 0;
|
||||
+ gssize brackets = 0;
|
||||
|
||||
while (**in == 'a' || **in == 'm' || **in == 'M')
|
||||
*(*out)++ = *(*in)++;
|
||||
@@ -2666,7 +2674,7 @@ g_variant_builder_add_parsed (GVariantBuilder *builder,
|
||||
static gboolean
|
||||
parse_num (const gchar *num,
|
||||
const gchar *limit,
|
||||
- guint *result)
|
||||
+ size_t *result)
|
||||
{
|
||||
gchar *endptr;
|
||||
gint64 bignum;
|
||||
@@ -2676,10 +2684,12 @@ parse_num (const gchar *num,
|
||||
if (endptr != limit)
|
||||
return FALSE;
|
||||
|
||||
+ /* The upper bound here is more restrictive than it technically needs to be,
|
||||
+ * but should be enough for any practical situation: */
|
||||
if (bignum < 0 || bignum > G_MAXINT)
|
||||
return FALSE;
|
||||
|
||||
- *result = (guint) bignum;
|
||||
+ *result = (size_t) bignum;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -2690,7 +2700,7 @@ add_last_line (GString *err,
|
||||
{
|
||||
const gchar *last_nl;
|
||||
gchar *chomped;
|
||||
- gint i;
|
||||
+ size_t i;
|
||||
|
||||
/* This is an error at the end of input. If we have a file
|
||||
* with newlines, that's probably the empty string after the
|
||||
@@ -2835,7 +2845,7 @@ g_variant_parse_error_print_context (GError *error,
|
||||
|
||||
if (dash == NULL || colon < dash)
|
||||
{
|
||||
- guint point;
|
||||
+ size_t point;
|
||||
|
||||
/* we have a single point */
|
||||
if (!parse_num (error->message, colon, &point))
|
||||
@@ -2853,7 +2863,7 @@ g_variant_parse_error_print_context (GError *error,
|
||||
/* We have one or two ranges... */
|
||||
if (comma && comma < colon)
|
||||
{
|
||||
- guint start1, end1, start2, end2;
|
||||
+ size_t start1, end1, start2, end2;
|
||||
const gchar *dash2;
|
||||
|
||||
/* Two ranges */
|
||||
@@ -2869,7 +2879,7 @@ g_variant_parse_error_print_context (GError *error,
|
||||
}
|
||||
else
|
||||
{
|
||||
- guint start, end;
|
||||
+ size_t start, end;
|
||||
|
||||
/* One range */
|
||||
if (!parse_num (error->message, dash, &start) || !parse_num (dash + 1, colon, &end))
|
||||
70
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14512.patch
Normal file
70
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-14512.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
From 1909d8ea9297287f1ff6862968608dcf06e60523 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Thu, 4 Dec 2025 16:37:19 +0000
|
||||
Subject: [PATCH] gfileattribute: Fix integer overflow calculating escaping for
|
||||
byte strings
|
||||
|
||||
The number of invalid characters in the byte string (characters which
|
||||
would have to be percent-encoded) was only stored in an `int`, which
|
||||
gave the possibility of a long string largely full of invalid
|
||||
characters overflowing this and allowing an attacker-controlled buffer
|
||||
size to be allocated.
|
||||
|
||||
This could be triggered by an attacker controlled file attribute (of
|
||||
type `G_FILE_ATTRIBUTE_TYPE_BYTE_STRING`), such as
|
||||
`G_FILE_ATTRIBUTE_THUMBNAIL_PATH` or `G_FILE_ATTRIBUTE_STANDARD_NAME`,
|
||||
being read by user code.
|
||||
|
||||
Spotted by Codean Labs.
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
|
||||
Fixes: #3845
|
||||
|
||||
CVE: CVE-2025-14512
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/1909d8ea9297287f1ff6862968608dcf06e60523]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
gio/gfileattribute.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gio/gfileattribute.c b/gio/gfileattribute.c
|
||||
index c6fde60fa..d3083e5bd 100644
|
||||
--- a/gio/gfileattribute.c
|
||||
+++ b/gio/gfileattribute.c
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gfileattribute.h"
|
||||
@@ -271,11 +272,12 @@ valid_char (char c)
|
||||
return c >= 32 && c <= 126 && c != '\\';
|
||||
}
|
||||
|
||||
+/* Returns NULL on error */
|
||||
static char *
|
||||
escape_byte_string (const char *str)
|
||||
{
|
||||
size_t i, len;
|
||||
- int num_invalid;
|
||||
+ size_t num_invalid;
|
||||
char *escaped_val, *p;
|
||||
unsigned char c;
|
||||
const char hex_digits[] = "0123456789abcdef";
|
||||
@@ -293,7 +295,12 @@ escape_byte_string (const char *str)
|
||||
return g_strdup (str);
|
||||
else
|
||||
{
|
||||
- escaped_val = g_malloc (len + num_invalid*3 + 1);
|
||||
+ /* Check for overflow. We want to check the inequality:
|
||||
+ * !(len + num_invalid * 3 + 1 > SIZE_MAX) */
|
||||
+ if (num_invalid >= (SIZE_MAX - len) / 3)
|
||||
+ return NULL;
|
||||
+
|
||||
+ escaped_val = g_malloc (len + num_invalid * 3 + 1);
|
||||
|
||||
p = escaped_val;
|
||||
for (i = 0; i < len; i++)
|
||||
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);
|
||||
|
||||
@@ -64,6 +64,20 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
|
||||
file://CVE-2025-4373-02.patch \
|
||||
file://CVE-2025-7039-01.patch \
|
||||
file://CVE-2025-7039-02.patch \
|
||||
file://CVE-2025-13601-01.patch \
|
||||
file://CVE-2025-13601-02.patch \
|
||||
file://CVE-2025-14087-01.patch \
|
||||
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 ?= "cb1206dd8460f2701df03b1e9224825bad23a90e"
|
||||
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"
|
||||
|
||||
@@ -42,6 +42,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
|
||||
file://CVE-2024-28085-0004.patch \
|
||||
file://CVE-2024-28085-0005.patch \
|
||||
file://fstab-isolation.patch \
|
||||
file://CVE-2025-14104-01.patch \
|
||||
file://CVE-2025-14104-02.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "634e6916ad913366c3536b6468e7844769549b99a7b2bf80314de78ab5655b83"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From aaa9e718c88d6916b003da7ebcfe38a3c88df8e6 Mon Sep 17 00:00:00 2001
|
||||
From: Mohamed Maatallah <hotelsmaatallahrecemail@gmail.com>
|
||||
Date: Sat, 24 May 2025 03:16:09 +0100
|
||||
Subject: [PATCH] Update setpwnam.c
|
||||
|
||||
CVE: CVE-2025-14104
|
||||
Upstream-Status: Backport [https://github.com/util-linux/util-linux/commit/aaa9e718c88d6916b003da7ebcfe38a3c88df8e6]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
login-utils/setpwnam.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/login-utils/setpwnam.c b/login-utils/setpwnam.c
|
||||
index 3e3c1abde..95e470b5a 100644
|
||||
--- a/login-utils/setpwnam.c
|
||||
+++ b/login-utils/setpwnam.c
|
||||
@@ -126,10 +126,12 @@ int setpwnam(struct passwd *pwd, const char *prefix)
|
||||
}
|
||||
|
||||
/* Is this the username we were sent to change? */
|
||||
- if (!found && linebuf[namelen] == ':' &&
|
||||
- !strncmp(linebuf, pwd->pw_name, namelen)) {
|
||||
- /* Yes! So go forth in the name of the Lord and
|
||||
- * change it! */
|
||||
+ if (!found &&
|
||||
+ strncmp(linebuf, pwd->pw_name, namelen) == 0 &&
|
||||
+ strlen(linebuf) > namelen &&
|
||||
+ linebuf[namelen] == ':') {
|
||||
+ /* Yes! But this time let’s not walk past the end of the buffer
|
||||
+ * in the name of the Lord, SUID, or anything else. */
|
||||
if (putpwent(pwd, fp) < 0)
|
||||
goto fail;
|
||||
found = 1;
|
||||
@@ -0,0 +1,28 @@
|
||||
From 9a36d77012c4c771f8d51eba46b6e62c29bf572a Mon Sep 17 00:00:00 2001
|
||||
From: Mohamed Maatallah <hotelsmaatallahrecemail@gmail.com>
|
||||
Date: Mon, 26 May 2025 10:06:02 +0100
|
||||
Subject: [PATCH] Update bufflen
|
||||
|
||||
Update buflen
|
||||
|
||||
CVE: CVE-2025-14104
|
||||
Upstream-Status: Backport [https://github.com/util-linux/util-linux/commit/9a36d77012c4c771f8d51eba46b6e62c29bf572a]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
login-utils/setpwnam.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/login-utils/setpwnam.c b/login-utils/setpwnam.c
|
||||
index 95e470b5a..7778e98f7 100644
|
||||
--- a/login-utils/setpwnam.c
|
||||
+++ b/login-utils/setpwnam.c
|
||||
@@ -99,7 +99,8 @@ int setpwnam(struct passwd *pwd, const char *prefix)
|
||||
goto fail;
|
||||
|
||||
namelen = strlen(pwd->pw_name);
|
||||
-
|
||||
+ if (namelen > buflen)
|
||||
+ buflen += namelen;
|
||||
linebuf = malloc(buflen);
|
||||
if (!linebuf)
|
||||
goto fail;
|
||||
@@ -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"
|
||||
|
||||
@@ -86,5 +86,10 @@ SRC_URI = "\
|
||||
file://0047-CVE-2025-8225.patch \
|
||||
file://CVE-2025-11412.patch \
|
||||
file://CVE-2025-11413.patch \
|
||||
file://0048-CVE-2025-11494.patch \
|
||||
file://0049-CVE-2025-11839.patch \
|
||||
file://0050-CVE-2025-11840.patch \
|
||||
file://CVE-2025-1181-pre.patch \
|
||||
file://CVE-2025-1181.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Tue, 30 Sep 2025 08:13:56 +0800
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=b6ac5a8a5b82f0ae6a4642c8d7149b325f4cc60a]
|
||||
CVE: CVE-2025-11494
|
||||
|
||||
Since x86 .eh_frame section may reference _GLOBAL_OFFSET_TABLE_, keep
|
||||
_GLOBAL_OFFSET_TABLE_ if there is dynamic section and the output
|
||||
.eh_frame section is non-empty.
|
||||
|
||||
PR ld/33499
|
||||
* elfxx-x86.c (_bfd_x86_elf_late_size_sections): Keep
|
||||
_GLOBAL_OFFSET_TABLE_ if there is dynamic section and the
|
||||
output .eh_frame section is non-empty.
|
||||
|
||||
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
|
||||
|
||||
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
|
||||
index c054f7cd..ddc15945 100644
|
||||
--- a/bfd/elfxx-x86.c
|
||||
+++ b/bfd/elfxx-x86.c
|
||||
@@ -2447,6 +2447,8 @@ _bfd_x86_elf_late_size_sections (bfd *output_bfd,
|
||||
|
||||
if (htab->elf.sgotplt)
|
||||
{
|
||||
+ asection *eh_frame;
|
||||
+
|
||||
/* Don't allocate .got.plt section if there are no GOT nor PLT
|
||||
entries and there is no reference to _GLOBAL_OFFSET_TABLE_. */
|
||||
if ((htab->elf.hgot == NULL
|
||||
@@ -2459,7 +2461,11 @@ _bfd_x86_elf_late_size_sections (bfd *output_bfd,
|
||||
&& (htab->elf.iplt == NULL
|
||||
|| htab->elf.iplt->size == 0)
|
||||
&& (htab->elf.igotplt == NULL
|
||||
- || htab->elf.igotplt->size == 0))
|
||||
+ || htab->elf.igotplt->size == 0)
|
||||
+ && (!htab->elf.dynamic_sections_created
|
||||
+ || (eh_frame = bfd_get_section_by_name (output_bfd,
|
||||
+ ".eh_frame")) == NULL
|
||||
+ || eh_frame->rawsize == 0))
|
||||
{
|
||||
htab->elf.sgotplt->size = 0;
|
||||
/* Solaris requires to keep _GLOBAL_OFFSET_TABLE_ even if it
|
||||
@@ -0,0 +1,32 @@
|
||||
From 12ef7d5b7b02d0023db645d86eb9d0797bc747fe Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Mon, 3 Nov 2025 11:49:02 +0000
|
||||
Subject: [PATCH] Remove call to abort in the DGB debug format printing code,
|
||||
thus allowing the display of a fuzzed input file to complete without
|
||||
triggering an abort.
|
||||
|
||||
PR 33448
|
||||
---
|
||||
binutils/prdbg.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=12ef7d5b7b02d0023db645d86eb9d0797bc747fe]
|
||||
CVE: CVE-2025-11839
|
||||
|
||||
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
|
||||
|
||||
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
|
||||
index c239aeb1a79..5d405c48e3d 100644
|
||||
--- a/binutils/prdbg.c
|
||||
+++ b/binutils/prdbg.c
|
||||
@@ -2449,7 +2449,6 @@ tg_tag_type (void *p, const char *name, unsigned int id,
|
||||
t = "union class ";
|
||||
break;
|
||||
default:
|
||||
- abort ();
|
||||
return false;
|
||||
}
|
||||
|
||||
--
|
||||
2.43.7
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From f6b0f53a36820da91eadfa9f466c22f92e4256e0 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Mon, 3 Nov 2025 09:03:37 +1030
|
||||
Subject: [PATCH] PR 33455 SEGV in vfinfo at ldmisc.c:527
|
||||
|
||||
A reloc howto set up with EMPTY_HOWTO has a NULL name. More than one
|
||||
place emitting diagnostics assumes a reloc howto won't have a NULL
|
||||
name.
|
||||
|
||||
PR 33455
|
||||
* coffcode.h (coff_slurp_reloc_table): Don't allow a howto with
|
||||
a NULL name.
|
||||
---
|
||||
bfd/coffcode.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=f6b0f53a36820da91eadfa9f466c22f92e4256e0]
|
||||
CVE: CVE-2025-11840
|
||||
|
||||
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
|
||||
|
||||
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
|
||||
index 1e5acc0032c..ce1e39131b4 100644
|
||||
--- a/bfd/coffcode.h
|
||||
+++ b/bfd/coffcode.h
|
||||
@@ -5345,7 +5345,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
|
||||
RTYPE2HOWTO (cache_ptr, &dst);
|
||||
#endif /* RELOC_PROCESSING */
|
||||
|
||||
- if (cache_ptr->howto == NULL)
|
||||
+ if (cache_ptr->howto == NULL || cache_ptr->howto->name == NULL)
|
||||
{
|
||||
_bfd_error_handler
|
||||
/* xgettext:c-format */
|
||||
--
|
||||
2.43.7
|
||||
|
||||
149
meta/recipes-devtools/binutils/binutils/CVE-2025-1181-pre.patch
Normal file
149
meta/recipes-devtools/binutils/binutils/CVE-2025-1181-pre.patch
Normal file
@@ -0,0 +1,149 @@
|
||||
Backported of:
|
||||
|
||||
From 18cc11a2771d9e40180485da9a4fb660c03efac3 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Wed, 5 Feb 2025 14:31:10 +0000
|
||||
Subject: [PATCH] Prevent illegal memory access when checking relocs in a
|
||||
corrupt ELF binary.
|
||||
|
||||
PR 32641
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/binutils/tree/debian/patches/CVE-2025-1181-pre.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=18cc11a2771d9e40180485da9a4fb660c03efac3]
|
||||
CVE: CVE-2025-1181
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
bfd/elf-bfd.h | 3 +++
|
||||
bfd/elf64-x86-64.c | 10 +++++-----
|
||||
bfd/elflink.c | 24 ++++++++++++++++++++++++
|
||||
bfd/elfxx-x86.c | 20 +++++++-------------
|
||||
4 files changed, 39 insertions(+), 18 deletions(-)
|
||||
Index: binutils-2.38/bfd/elf-bfd.h
|
||||
===================================================================
|
||||
--- binutils-2.38.orig/bfd/elf-bfd.h
|
||||
+++ binutils-2.38/bfd/elf-bfd.h
|
||||
@@ -3007,6 +3007,9 @@ extern bool _bfd_elf_maybe_set_textrel
|
||||
extern bool _bfd_elf_add_dynamic_tags
|
||||
(bfd *, struct bfd_link_info *, bool);
|
||||
|
||||
+extern struct elf_link_hash_entry * _bfd_elf_get_link_hash_entry
|
||||
+ (struct elf_link_hash_entry **, unsigned int, Elf_Internal_Shdr *);
|
||||
+
|
||||
/* Large common section. */
|
||||
extern asection _bfd_elf_large_com_section;
|
||||
|
||||
Index: binutils-2.38/bfd/elf64-x86-64.c
|
||||
===================================================================
|
||||
--- binutils-2.38.orig/bfd/elf64-x86-64.c
|
||||
+++ binutils-2.38/bfd/elf64-x86-64.c
|
||||
@@ -1484,7 +1484,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd
|
||||
bool to_reloc_pc32;
|
||||
bool abs_symbol;
|
||||
bool local_ref;
|
||||
- asection *tsec;
|
||||
+ asection *tsec = NULL;
|
||||
bfd_signed_vma raddend;
|
||||
unsigned int opcode;
|
||||
unsigned int modrm;
|
||||
@@ -1639,6 +1639,9 @@ elf_x86_64_convert_load_reloc (bfd *abfd
|
||||
return true;
|
||||
}
|
||||
|
||||
+ if (tsec == NULL)
|
||||
+ return false;
|
||||
+
|
||||
/* Don't convert GOTPCREL relocation against large section. */
|
||||
if (elf_section_data (tsec) != NULL
|
||||
&& (elf_section_flags (tsec) & SHF_X86_64_LARGE) != 0)
|
||||
@@ -1915,10 +1918,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
|
||||
else
|
||||
{
|
||||
isym = NULL;
|
||||
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
|
||||
- while (h->root.type == bfd_link_hash_indirect
|
||||
- || h->root.type == bfd_link_hash_warning)
|
||||
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
+ h = _bfd_elf_get_link_hash_entry (sym_hashes, r_symndx, symtab_hdr);
|
||||
}
|
||||
|
||||
/* Check invalid x32 relocations. */
|
||||
Index: binutils-2.38/bfd/elflink.c
|
||||
===================================================================
|
||||
--- binutils-2.38.orig/bfd/elflink.c
|
||||
+++ binutils-2.38/bfd/elflink.c
|
||||
@@ -62,6 +62,27 @@ struct elf_find_verdep_info
|
||||
static bool _bfd_elf_fix_symbol_flags
|
||||
(struct elf_link_hash_entry *, struct elf_info_failed *);
|
||||
|
||||
+struct elf_link_hash_entry *
|
||||
+_bfd_elf_get_link_hash_entry (struct elf_link_hash_entry ** sym_hashes,
|
||||
+ unsigned int symndx,
|
||||
+ Elf_Internal_Shdr * symtab_hdr)
|
||||
+{
|
||||
+ if (symndx < symtab_hdr->sh_info)
|
||||
+ return NULL;
|
||||
+
|
||||
+ struct elf_link_hash_entry *h = sym_hashes[symndx - symtab_hdr->sh_info];
|
||||
+
|
||||
+ /* The hash might be empty. See PR 32641 for an example of this. */
|
||||
+ if (h == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ while (h->root.type == bfd_link_hash_indirect
|
||||
+ || h->root.type == bfd_link_hash_warning)
|
||||
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
+
|
||||
+ return h;
|
||||
+}
|
||||
+
|
||||
static struct elf_link_hash_entry *
|
||||
get_ext_sym_hash (struct elf_reloc_cookie *cookie, unsigned long r_symndx)
|
||||
{
|
||||
@@ -75,6 +96,9 @@ get_ext_sym_hash (struct elf_reloc_cooki
|
||||
|
||||
h = cookie->sym_hashes[r_symndx - cookie->extsymoff];
|
||||
|
||||
+ if (h == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
while (h->root.type == bfd_link_hash_indirect
|
||||
|| h->root.type == bfd_link_hash_warning)
|
||||
h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
Index: binutils-2.38/bfd/elfxx-x86.c
|
||||
===================================================================
|
||||
--- binutils-2.38.orig/bfd/elfxx-x86.c
|
||||
+++ binutils-2.38/bfd/elfxx-x86.c
|
||||
@@ -973,15 +973,7 @@ _bfd_x86_elf_check_relocs (bfd *abfd,
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
- if (r_symndx < symtab_hdr->sh_info)
|
||||
- h = NULL;
|
||||
- else
|
||||
- {
|
||||
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
|
||||
- while (h->root.type == bfd_link_hash_indirect
|
||||
- || h->root.type == bfd_link_hash_warning)
|
||||
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
- }
|
||||
+ h = _bfd_elf_get_link_hash_entry (sym_hashes, r_symndx, symtab_hdr);
|
||||
|
||||
if (X86_NEED_DYNAMIC_RELOC_TYPE_P (is_x86_64, r_type)
|
||||
&& NEED_DYNAMIC_RELOCATION_P (is_x86_64, info, true, h, sec,
|
||||
@@ -1200,10 +1192,12 @@ _bfd_x86_elf_link_relax_section (bfd *ab
|
||||
else
|
||||
{
|
||||
/* Get H and SEC for GENERATE_DYNAMIC_RELOCATION_P below. */
|
||||
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
|
||||
- while (h->root.type == bfd_link_hash_indirect
|
||||
- || h->root.type == bfd_link_hash_warning)
|
||||
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
+ h = _bfd_elf_get_link_hash_entry (sym_hashes, r_symndx, symtab_hdr);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ /* FIXMEL: Issue an error message ? */
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
if (h->root.type == bfd_link_hash_defined
|
||||
|| h->root.type == bfd_link_hash_defweak)
|
||||
342
meta/recipes-devtools/binutils/binutils/CVE-2025-1181.patch
Normal file
342
meta/recipes-devtools/binutils/binutils/CVE-2025-1181.patch
Normal file
@@ -0,0 +1,342 @@
|
||||
Backported of:
|
||||
|
||||
From 931494c9a89558acb36a03a340c01726545eef24 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Wed, 5 Feb 2025 15:43:04 +0000
|
||||
Subject: [PATCH] Add even more checks for corrupt input when processing
|
||||
relocations for ELF files.
|
||||
|
||||
PR 32643
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/binutils/tree/debian/patches/CVE-2025-1181.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=931494c9a89558acb36a03a340c01726545eef24]
|
||||
CVE: CVE-2025-1181
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
|
||||
Index: binutils-2.38/bfd/elflink.c
|
||||
===================================================================
|
||||
--- binutils-2.38.orig/bfd/elflink.c
|
||||
+++ binutils-2.38/bfd/elflink.c
|
||||
@@ -62,15 +62,17 @@ struct elf_find_verdep_info
|
||||
static bool _bfd_elf_fix_symbol_flags
|
||||
(struct elf_link_hash_entry *, struct elf_info_failed *);
|
||||
|
||||
-struct elf_link_hash_entry *
|
||||
-_bfd_elf_get_link_hash_entry (struct elf_link_hash_entry ** sym_hashes,
|
||||
- unsigned int symndx,
|
||||
- Elf_Internal_Shdr * symtab_hdr)
|
||||
+static struct elf_link_hash_entry *
|
||||
+get_link_hash_entry (struct elf_link_hash_entry ** sym_hashes,
|
||||
+ unsigned int symndx,
|
||||
+ unsigned int ext_sym_start)
|
||||
{
|
||||
- if (symndx < symtab_hdr->sh_info)
|
||||
+ if (sym_hashes == NULL
|
||||
+ /* Guard against corrupt input. See PR 32636 for an example. */
|
||||
+ || symndx < ext_sym_start)
|
||||
return NULL;
|
||||
|
||||
- struct elf_link_hash_entry *h = sym_hashes[symndx - symtab_hdr->sh_info];
|
||||
+ struct elf_link_hash_entry *h = sym_hashes[symndx - ext_sym_start];
|
||||
|
||||
/* The hash might be empty. See PR 32641 for an example of this. */
|
||||
if (h == NULL)
|
||||
@@ -83,29 +85,28 @@ _bfd_elf_get_link_hash_entry (struct elf
|
||||
return h;
|
||||
}
|
||||
|
||||
-static struct elf_link_hash_entry *
|
||||
-get_ext_sym_hash (struct elf_reloc_cookie *cookie, unsigned long r_symndx)
|
||||
+struct elf_link_hash_entry *
|
||||
+_bfd_elf_get_link_hash_entry (struct elf_link_hash_entry ** sym_hashes,
|
||||
+ unsigned int symndx,
|
||||
+ Elf_Internal_Shdr * symtab_hdr)
|
||||
{
|
||||
- struct elf_link_hash_entry *h = NULL;
|
||||
-
|
||||
- if ((r_symndx >= cookie->locsymcount
|
||||
- || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL)
|
||||
- /* Guard against corrupt input. See PR 32636 for an example. */
|
||||
- && r_symndx >= cookie->extsymoff)
|
||||
- {
|
||||
-
|
||||
- h = cookie->sym_hashes[r_symndx - cookie->extsymoff];
|
||||
-
|
||||
- if (h == NULL)
|
||||
- return NULL;
|
||||
+ if (symtab_hdr == NULL)
|
||||
+ return NULL;
|
||||
|
||||
- while (h->root.type == bfd_link_hash_indirect
|
||||
- || h->root.type == bfd_link_hash_warning)
|
||||
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
+ return get_link_hash_entry (sym_hashes, symndx, symtab_hdr->sh_info);
|
||||
+}
|
||||
|
||||
- }
|
||||
+static struct elf_link_hash_entry *
|
||||
+get_ext_sym_hash_from_cookie (struct elf_reloc_cookie *cookie, unsigned long r_symndx)
|
||||
+{
|
||||
+ if (cookie == NULL || cookie->sym_hashes == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (r_symndx >= cookie->locsymcount
|
||||
+ || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL)
|
||||
+ return get_link_hash_entry (cookie->sym_hashes, r_symndx, cookie->extsymoff);
|
||||
|
||||
- return h;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
asection *
|
||||
@@ -115,7 +116,7 @@ _bfd_elf_section_for_symbol (struct elf_
|
||||
{
|
||||
struct elf_link_hash_entry *h;
|
||||
|
||||
- h = get_ext_sym_hash (cookie, r_symndx);
|
||||
+ h = get_ext_sym_hash_from_cookie (cookie, r_symndx);
|
||||
|
||||
if (h != NULL)
|
||||
{
|
||||
@@ -8783,7 +8784,6 @@ set_symbol_value (bfd *bfd_with_globals,
|
||||
size_t symidx,
|
||||
bfd_vma val)
|
||||
{
|
||||
- struct elf_link_hash_entry **sym_hashes;
|
||||
struct elf_link_hash_entry *h;
|
||||
size_t extsymoff = locsymcount;
|
||||
|
||||
@@ -8806,12 +8806,12 @@ set_symbol_value (bfd *bfd_with_globals,
|
||||
|
||||
/* It is a global symbol: set its link type
|
||||
to "defined" and give it a value. */
|
||||
-
|
||||
- sym_hashes = elf_sym_hashes (bfd_with_globals);
|
||||
- h = sym_hashes [symidx - extsymoff];
|
||||
- while (h->root.type == bfd_link_hash_indirect
|
||||
- || h->root.type == bfd_link_hash_warning)
|
||||
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
+ h = get_link_hash_entry (elf_sym_hashes (bfd_with_globals), symidx, extsymoff);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ /* FIXMEL What should we do ? */
|
||||
+ return;
|
||||
+ }
|
||||
h->root.type = bfd_link_hash_defined;
|
||||
h->root.u.def.value = val;
|
||||
h->root.u.def.section = bfd_abs_section_ptr;
|
||||
@@ -11281,10 +11281,19 @@ elf_link_input_bfd (struct elf_final_lin
|
||||
|| (elf_bad_symtab (input_bfd)
|
||||
&& flinfo->sections[symndx] == NULL))
|
||||
{
|
||||
- struct elf_link_hash_entry *h = sym_hashes[symndx - extsymoff];
|
||||
- while (h->root.type == bfd_link_hash_indirect
|
||||
- || h->root.type == bfd_link_hash_warning)
|
||||
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
+ struct elf_link_hash_entry *h;
|
||||
+
|
||||
+ h = get_link_hash_entry (sym_hashes, symndx, extsymoff);
|
||||
+ if (h == NULL)
|
||||
+ {
|
||||
+ _bfd_error_handler
|
||||
+ /* xgettext:c-format */
|
||||
+ (_("error: %pB: unable to create group section symbol"),
|
||||
+ input_bfd);
|
||||
+ bfd_set_error (bfd_error_bad_value);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
/* Arrange for symbol to be output. */
|
||||
h->indx = -2;
|
||||
elf_section_data (osec)->this_hdr.sh_info = -2;
|
||||
@@ -11411,7 +11420,7 @@ elf_link_input_bfd (struct elf_final_lin
|
||||
|| (elf_bad_symtab (input_bfd)
|
||||
&& flinfo->sections[r_symndx] == NULL))
|
||||
{
|
||||
- h = sym_hashes[r_symndx - extsymoff];
|
||||
+ h = get_link_hash_entry (sym_hashes, r_symndx, extsymoff);
|
||||
|
||||
/* Badly formatted input files can contain relocs that
|
||||
reference non-existant symbols. Check here so that
|
||||
@@ -11420,17 +11429,13 @@ elf_link_input_bfd (struct elf_final_lin
|
||||
{
|
||||
_bfd_error_handler
|
||||
/* xgettext:c-format */
|
||||
- (_("error: %pB contains a reloc (%#" PRIx64 ") for section %pA "
|
||||
+ (_("error: %pB contains a reloc (%#" PRIx64 ") for section '%pA' "
|
||||
"that references a non-existent global symbol"),
|
||||
input_bfd, (uint64_t) rel->r_info, o);
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return false;
|
||||
}
|
||||
|
||||
- while (h->root.type == bfd_link_hash_indirect
|
||||
- || h->root.type == bfd_link_hash_warning)
|
||||
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
-
|
||||
s_type = h->type;
|
||||
|
||||
/* If a plugin symbol is referenced from a non-IR file,
|
||||
@@ -11646,7 +11651,6 @@ elf_link_input_bfd (struct elf_final_lin
|
||||
&& flinfo->sections[r_symndx] == NULL))
|
||||
{
|
||||
struct elf_link_hash_entry *rh;
|
||||
- unsigned long indx;
|
||||
|
||||
/* This is a reloc against a global symbol. We
|
||||
have not yet output all the local symbols, so
|
||||
@@ -11655,15 +11659,16 @@ elf_link_input_bfd (struct elf_final_lin
|
||||
reloc to point to the global hash table entry
|
||||
for this symbol. The symbol index is then
|
||||
set at the end of bfd_elf_final_link. */
|
||||
- indx = r_symndx - extsymoff;
|
||||
- rh = elf_sym_hashes (input_bfd)[indx];
|
||||
- while (rh->root.type == bfd_link_hash_indirect
|
||||
- || rh->root.type == bfd_link_hash_warning)
|
||||
- rh = (struct elf_link_hash_entry *) rh->root.u.i.link;
|
||||
-
|
||||
- /* Setting the index to -2 tells
|
||||
- elf_link_output_extsym that this symbol is
|
||||
- used by a reloc. */
|
||||
+ rh = get_link_hash_entry (elf_sym_hashes (input_bfd),
|
||||
+ r_symndx, extsymoff);
|
||||
+ if (rh == NULL)
|
||||
+ {
|
||||
+ /* FIXME: Generate an error ? */
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /* Setting the index to -2 tells elf_link_output_extsym
|
||||
+ that this symbol is used by a reloc. */
|
||||
BFD_ASSERT (rh->indx < 0);
|
||||
rh->indx = -2;
|
||||
*rel_hash = rh;
|
||||
@@ -13615,25 +13620,21 @@ _bfd_elf_gc_mark_hook (asection *sec,
|
||||
struct elf_link_hash_entry *h,
|
||||
Elf_Internal_Sym *sym)
|
||||
{
|
||||
- if (h != NULL)
|
||||
+ if (h == NULL)
|
||||
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
|
||||
+
|
||||
+ switch (h->root.type)
|
||||
{
|
||||
- switch (h->root.type)
|
||||
- {
|
||||
- case bfd_link_hash_defined:
|
||||
- case bfd_link_hash_defweak:
|
||||
- return h->root.u.def.section;
|
||||
+ case bfd_link_hash_defined:
|
||||
+ case bfd_link_hash_defweak:
|
||||
+ return h->root.u.def.section;
|
||||
|
||||
- case bfd_link_hash_common:
|
||||
- return h->root.u.c.p->section;
|
||||
+ case bfd_link_hash_common:
|
||||
+ return h->root.u.c.p->section;
|
||||
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
+ default:
|
||||
+ return NULL;
|
||||
}
|
||||
- else
|
||||
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
|
||||
-
|
||||
- return NULL;
|
||||
}
|
||||
|
||||
/* Return the debug definition section. */
|
||||
@@ -13682,46 +13683,49 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_i
|
||||
if (r_symndx == STN_UNDEF)
|
||||
return NULL;
|
||||
|
||||
- h = get_ext_sym_hash (cookie, r_symndx);
|
||||
-
|
||||
- if (h != NULL)
|
||||
+ h = get_ext_sym_hash_from_cookie (cookie, r_symndx);
|
||||
+ if (h == NULL)
|
||||
{
|
||||
- bool was_marked;
|
||||
+ /* A corrup tinput file can lead to a situation where the index
|
||||
+ does not reference either a local or an external symbol. */
|
||||
+ if (r_symndx >= cookie->locsymcount)
|
||||
+ return NULL;
|
||||
|
||||
- was_marked = h->mark;
|
||||
- h->mark = 1;
|
||||
- /* Keep all aliases of the symbol too. If an object symbol
|
||||
- needs to be copied into .dynbss then all of its aliases
|
||||
- should be present as dynamic symbols, not just the one used
|
||||
- on the copy relocation. */
|
||||
- hw = h;
|
||||
- while (hw->is_weakalias)
|
||||
- {
|
||||
- hw = hw->u.alias;
|
||||
- hw->mark = 1;
|
||||
- }
|
||||
+ return (*gc_mark_hook) (sec, info, cookie->rel, NULL,
|
||||
+ &cookie->locsyms[r_symndx]);
|
||||
+ }
|
||||
|
||||
- if (!was_marked && h->start_stop && !h->root.ldscript_def)
|
||||
- {
|
||||
- if (info->start_stop_gc)
|
||||
- return NULL;
|
||||
+ bool was_marked = h->mark;
|
||||
|
||||
- /* To work around a glibc bug, mark XXX input sections
|
||||
- when there is a reference to __start_XXX or __stop_XXX
|
||||
- symbols. */
|
||||
- else if (start_stop != NULL)
|
||||
- {
|
||||
- asection *s = h->u2.start_stop_section;
|
||||
- *start_stop = true;
|
||||
- return s;
|
||||
- }
|
||||
- }
|
||||
+ h->mark = 1;
|
||||
+ /* Keep all aliases of the symbol too. If an object symbol
|
||||
+ needs to be copied into .dynbss then all of its aliases
|
||||
+ should be present as dynamic symbols, not just the one used
|
||||
+ on the copy relocation. */
|
||||
+ hw = h;
|
||||
+ while (hw->is_weakalias)
|
||||
+ {
|
||||
+ hw = hw->u.alias;
|
||||
+ hw->mark = 1;
|
||||
+ }
|
||||
|
||||
- return (*gc_mark_hook) (sec, info, cookie->rel, h, NULL);
|
||||
+ if (!was_marked && h->start_stop && !h->root.ldscript_def)
|
||||
+ {
|
||||
+ if (info->start_stop_gc)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* To work around a glibc bug, mark XXX input sections
|
||||
+ when there is a reference to __start_XXX or __stop_XXX
|
||||
+ symbols. */
|
||||
+ else if (start_stop != NULL)
|
||||
+ {
|
||||
+ asection *s = h->u2.start_stop_section;
|
||||
+ *start_stop = true;
|
||||
+ return s;
|
||||
+ }
|
||||
}
|
||||
|
||||
- return (*gc_mark_hook) (sec, info, cookie->rel, NULL,
|
||||
- &cookie->locsyms[r_symndx]);
|
||||
+ return (*gc_mark_hook) (sec, info, cookie->rel, h, NULL);
|
||||
}
|
||||
|
||||
/* COOKIE->rel describes a relocation against section SEC, which is
|
||||
@@ -14735,7 +14739,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma
|
||||
|
||||
struct elf_link_hash_entry *h;
|
||||
|
||||
- h = get_ext_sym_hash (rcookie, r_symndx);
|
||||
+ h = get_ext_sym_hash_from_cookie (rcookie, r_symndx);
|
||||
|
||||
if (h != NULL)
|
||||
{
|
||||
@@ -69,10 +69,14 @@ SRC_URI = "https://golang.org/dl/go${PV}.src.tar.gz;name=main \
|
||||
file://CVE-2025-47907.patch \
|
||||
file://CVE-2025-47906.patch \
|
||||
file://CVE-2024-24783.patch \
|
||||
file://CVE-2025-58187.patch \
|
||||
file://CVE-2025-58187-1.patch \
|
||||
file://CVE-2025-58187-2.patch \
|
||||
file://CVE-2025-58189.patch \
|
||||
file://CVE-2025-61723.patch \
|
||||
file://CVE-2025-61724.patch \
|
||||
file://CVE-2023-39323.patch \
|
||||
file://CVE-2025-61727.patch \
|
||||
file://CVE-2025-61729.patch \
|
||||
"
|
||||
SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
|
||||
|
||||
|
||||
516
meta/recipes-devtools/go/go-1.18/CVE-2025-58187-2.patch
Normal file
516
meta/recipes-devtools/go/go-1.18/CVE-2025-58187-2.patch
Normal file
@@ -0,0 +1,516 @@
|
||||
From ca6a5545ba18844a97c88a90a385eb6335bb7526 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <roland@golang.org>
|
||||
Date: Thu, 9 Oct 2025 13:35:24 -0700
|
||||
Subject: [PATCH] [release-branch.go1.24] crypto/x509: rework fix for
|
||||
CVE-2025-58187
|
||||
|
||||
In CL 709854 we enabled strict validation for a number of properties of
|
||||
domain names (and their constraints). This caused significant breakage,
|
||||
since we didn't previously disallow the creation of certificates which
|
||||
contained these malformed domains.
|
||||
|
||||
Rollback a number of the properties we enforced, making domainNameValid
|
||||
only enforce the same properties that domainToReverseLabels does. Since
|
||||
this also undoes some of the DoS protections our initial fix enabled,
|
||||
this change also adds caching of constraints in isValid (which perhaps
|
||||
is the fix we should've initially chosen).
|
||||
|
||||
Updates #75835
|
||||
Updates #75828
|
||||
Fixes #75860
|
||||
|
||||
Change-Id: Ie6ca6b4f30e9b8a143692b64757f7bbf4671ed0e
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/710735
|
||||
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
(cherry picked from commit 1cd71689f2ed8f07031a0cc58fc3586ca501839f)
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/710879
|
||||
Reviewed-by: Michael Pratt <mpratt@google.com>
|
||||
Auto-Submit: Michael Pratt <mpratt@google.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/ca6a5545ba18844a97c88a90a385eb6335bb7526]
|
||||
CVE: CVE-2025-58187
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/crypto/x509/name_constraints_test.go | 66 +++++++++++++++++--
|
||||
src/crypto/x509/parser.go | 57 +++++++++++-----
|
||||
src/crypto/x509/parser_test.go | 84 +++++++++++++++++++++---
|
||||
src/crypto/x509/verify.go | 53 ++++++++++-----
|
||||
src/crypto/x509/verify_test.go | 2 +-
|
||||
5 files changed, 213 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/src/crypto/x509/name_constraints_test.go b/src/crypto/x509/name_constraints_test.go
|
||||
index d4f7d41..c59a7dc 100644
|
||||
--- a/src/crypto/x509/name_constraints_test.go
|
||||
+++ b/src/crypto/x509/name_constraints_test.go
|
||||
@@ -1452,7 +1452,63 @@ var nameConstraintsTests = []nameConstraintsTest{
|
||||
requestedEKUs: []ExtKeyUsage{ExtKeyUsageServerAuth},
|
||||
},
|
||||
|
||||
- // #77: if several EKUs are requested, satisfying any of them is sufficient.
|
||||
+ // An invalid DNS SAN should be detected only at validation time so
|
||||
+ // that we can process CA certificates in the wild that have invalid SANs.
|
||||
+ // See https://github.com/golang/go/issues/23995
|
||||
+
|
||||
+ // #77: an invalid DNS or mail SAN will not be detected if name constraint
|
||||
+ // checking is not triggered.
|
||||
+ {
|
||||
+ roots: make([]constraintsSpec, 1),
|
||||
+ intermediates: [][]constraintsSpec{
|
||||
+ {
|
||||
+ {},
|
||||
+ },
|
||||
+ },
|
||||
+ leaf: leafSpec{
|
||||
+ sans: []string{"dns:this is invalid", "email:this @ is invalid"},
|
||||
+ },
|
||||
+ },
|
||||
+
|
||||
+ // #78: an invalid DNS SAN will be detected if any name constraint checking
|
||||
+ // is triggered.
|
||||
+ {
|
||||
+ roots: []constraintsSpec{
|
||||
+ {
|
||||
+ bad: []string{"uri:"},
|
||||
+ },
|
||||
+ },
|
||||
+ intermediates: [][]constraintsSpec{
|
||||
+ {
|
||||
+ {},
|
||||
+ },
|
||||
+ },
|
||||
+ leaf: leafSpec{
|
||||
+ sans: []string{"dns:this is invalid"},
|
||||
+ },
|
||||
+ expectedError: "cannot parse dnsName",
|
||||
+ },
|
||||
+
|
||||
+ // #79: an invalid email SAN will be detected if any name constraint
|
||||
+ // checking is triggered.
|
||||
+ {
|
||||
+ roots: []constraintsSpec{
|
||||
+ {
|
||||
+ bad: []string{"uri:"},
|
||||
+ },
|
||||
+ },
|
||||
+ intermediates: [][]constraintsSpec{
|
||||
+ {
|
||||
+ {},
|
||||
+ },
|
||||
+ },
|
||||
+ leaf: leafSpec{
|
||||
+ sans: []string{"email:this @ is invalid"},
|
||||
+ },
|
||||
+ expectedError: "cannot parse rfc822Name",
|
||||
+ },
|
||||
+
|
||||
+ // #80: if several EKUs are requested, satisfying any of them is sufficient.
|
||||
{
|
||||
roots: make([]constraintsSpec, 1),
|
||||
intermediates: [][]constraintsSpec{
|
||||
@@ -1467,7 +1523,7 @@ var nameConstraintsTests = []nameConstraintsTest{
|
||||
requestedEKUs: []ExtKeyUsage{ExtKeyUsageClientAuth, ExtKeyUsageEmailProtection},
|
||||
},
|
||||
|
||||
- // #78: EKUs that are not asserted in VerifyOpts are not required to be
|
||||
+ // #81: EKUs that are not asserted in VerifyOpts are not required to be
|
||||
// nested.
|
||||
{
|
||||
roots: make([]constraintsSpec, 1),
|
||||
@@ -1486,7 +1542,7 @@ var nameConstraintsTests = []nameConstraintsTest{
|
||||
},
|
||||
},
|
||||
|
||||
- // #79: a certificate without SANs and CN is accepted in a constrained chain.
|
||||
+ // #82: a certificate without SANs and CN is accepted in a constrained chain.
|
||||
{
|
||||
roots: []constraintsSpec{
|
||||
{
|
||||
@@ -1503,7 +1559,7 @@ var nameConstraintsTests = []nameConstraintsTest{
|
||||
},
|
||||
},
|
||||
|
||||
- // #80: a certificate without SANs and with a CN that does not parse as a
|
||||
+ // #83: a certificate without SANs and with a CN that does not parse as a
|
||||
// hostname is accepted in a constrained chain.
|
||||
{
|
||||
roots: []constraintsSpec{
|
||||
@@ -1522,7 +1578,7 @@ var nameConstraintsTests = []nameConstraintsTest{
|
||||
},
|
||||
},
|
||||
|
||||
- // #81: a certificate with SANs and CN is accepted in a constrained chain.
|
||||
+ // #84: a certificate with SANs and CN is accepted in a constrained chain.
|
||||
{
|
||||
roots: []constraintsSpec{
|
||||
{
|
||||
diff --git a/src/crypto/x509/parser.go b/src/crypto/x509/parser.go
|
||||
index 0788210..cfe4c86 100644
|
||||
--- a/src/crypto/x509/parser.go
|
||||
+++ b/src/crypto/x509/parser.go
|
||||
@@ -391,14 +391,10 @@ func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string
|
||||
if err := isIA5String(email); err != nil {
|
||||
return errors.New("x509: SAN rfc822Name is malformed")
|
||||
}
|
||||
- parsed, ok := parseRFC2821Mailbox(email)
|
||||
- if !ok || (ok && !domainNameValid(parsed.domain, false)) {
|
||||
- return errors.New("x509: SAN rfc822Name is malformed")
|
||||
- }
|
||||
emailAddresses = append(emailAddresses, email)
|
||||
case nameTypeDNS:
|
||||
name := string(data)
|
||||
- if err := isIA5String(name); err != nil || (err == nil && !domainNameValid(name, false)) {
|
||||
+ if err := isIA5String(name); err != nil {
|
||||
return errors.New("x509: SAN dNSName is malformed")
|
||||
}
|
||||
dnsNames = append(dnsNames, string(name))
|
||||
@@ -408,9 +404,12 @@ func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string
|
||||
return errors.New("x509: SAN uniformResourceIdentifier is malformed")
|
||||
}
|
||||
uri, err := url.Parse(uriStr)
|
||||
- if err != nil || (err == nil && uri.Host != "" && !domainNameValid(uri.Host, false)) {
|
||||
+ if err != nil {
|
||||
return fmt.Errorf("x509: cannot parse URI %q: %s", uriStr, err)
|
||||
}
|
||||
+ if len(uri.Host) > 0 && !domainNameValid(uri.Host, false) {
|
||||
+ return fmt.Errorf("x509: cannot parse URI %q: invalid domain", uriStr)
|
||||
+ }
|
||||
uris = append(uris, uri)
|
||||
case nameTypeIP:
|
||||
switch len(data) {
|
||||
@@ -990,36 +989,58 @@ func ParseCertificates(der []byte) ([]*Certificate, error) {
|
||||
return certs, nil
|
||||
}
|
||||
|
||||
-// domainNameValid does minimal domain name validity checking. In particular it
|
||||
-// enforces the following properties:
|
||||
-// - names cannot have the trailing period
|
||||
-// - names can only have a leading period if constraint is true
|
||||
-// - names must be <= 253 characters
|
||||
-// - names cannot have empty labels
|
||||
-// - names cannot labels that are longer than 63 characters
|
||||
-//
|
||||
-// Note that this does not enforce the LDH requirements for domain names.
|
||||
+// domainNameValid is an alloc-less version of the checks that
|
||||
+// domainToReverseLabels does.
|
||||
func domainNameValid(s string, constraint bool) bool {
|
||||
- if len(s) == 0 && constraint {
|
||||
+ // TODO(#75835): This function omits a number of checks which we
|
||||
+ // really should be doing to enforce that domain names are valid names per
|
||||
+ // RFC 1034. We previously enabled these checks, but this broke a
|
||||
+ // significant number of certificates we previously considered valid, and we
|
||||
+ // happily create via CreateCertificate (et al). We should enable these
|
||||
+ // checks, but will need to gate them behind a GODEBUG.
|
||||
+ //
|
||||
+ // I have left the checks we previously enabled, noted with "TODO(#75835)" so
|
||||
+ // that we can easily re-enable them once we unbreak everyone.
|
||||
+
|
||||
+ // TODO(#75835): this should only be true for constraints.
|
||||
+ if len(s) == 0 {
|
||||
return true
|
||||
}
|
||||
- if len(s) == 0 || (!constraint && s[0] == '.') || s[len(s)-1] == '.' || len(s) > 253 {
|
||||
+
|
||||
+ // Do not allow trailing period (FQDN format is not allowed in SANs or
|
||||
+ // constraints).
|
||||
+ if s[len(s)-1] == '.' {
|
||||
return false
|
||||
}
|
||||
+
|
||||
+ // TODO(#75835): domains must have at least one label, cannot have
|
||||
+ // a leading empty label, and cannot be longer than 253 characters.
|
||||
+ // if len(s) == 0 || (!constraint && s[0] == '.') || len(s) > 253 {
|
||||
+ // return false
|
||||
+ // }
|
||||
+
|
||||
lastDot := -1
|
||||
if constraint && s[0] == '.' {
|
||||
s = s[1:]
|
||||
}
|
||||
|
||||
for i := 0; i <= len(s); i++ {
|
||||
+ if i < len(s) && (s[i] < 33 || s[i] > 126) {
|
||||
+ // Invalid character.
|
||||
+ return false
|
||||
+ }
|
||||
if i == len(s) || s[i] == '.' {
|
||||
labelLen := i
|
||||
if lastDot >= 0 {
|
||||
labelLen -= lastDot + 1
|
||||
}
|
||||
- if labelLen == 0 || labelLen > 63 {
|
||||
+ if labelLen == 0 {
|
||||
return false
|
||||
}
|
||||
+ // TODO(#75835): labels cannot be longer than 63 characters.
|
||||
+ // if labelLen > 63 {
|
||||
+ // return false
|
||||
+ // }
|
||||
lastDot = i
|
||||
}
|
||||
}
|
||||
diff --git a/src/crypto/x509/parser_test.go b/src/crypto/x509/parser_test.go
|
||||
index 95ed116..662e305 100644
|
||||
--- a/src/crypto/x509/parser_test.go
|
||||
+++ b/src/crypto/x509/parser_test.go
|
||||
@@ -4,6 +4,9 @@
|
||||
package x509
|
||||
|
||||
import (
|
||||
+ "crypto/ecdsa"
|
||||
+ "crypto/elliptic"
|
||||
+ "crypto/rand"
|
||||
"encoding/asn1"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -109,7 +112,31 @@ func TestDomainNameValid(t *testing.T) {
|
||||
constraint bool
|
||||
valid bool
|
||||
}{
|
||||
- {"empty name, name", "", false, false},
|
||||
+ // TODO(#75835): these tests are for stricter name validation, which we
|
||||
+ // had to disable. Once we reenable these strict checks, behind a
|
||||
+ // GODEBUG, we should add them back in.
|
||||
+ // {"empty name, name", "", false, false},
|
||||
+ // {"254 char label, name", strings.Repeat("a.a", 84) + "aaa", false, false},
|
||||
+ // {"254 char label, constraint", strings.Repeat("a.a", 84) + "aaa", true, false},
|
||||
+ // {"253 char label, name", strings.Repeat("a.a", 84) + "aa", false, false},
|
||||
+ // {"253 char label, constraint", strings.Repeat("a.a", 84) + "aa", true, false},
|
||||
+ // {"64 char single label, name", strings.Repeat("a", 64), false, false},
|
||||
+ // {"64 char single label, constraint", strings.Repeat("a", 64), true, false},
|
||||
+ // {"64 char label, name", "a." + strings.Repeat("a", 64), false, false},
|
||||
+ // {"64 char label, constraint", "a." + strings.Repeat("a", 64), true, false},
|
||||
+
|
||||
+ // TODO(#75835): these are the inverse of the tests above, they should be removed
|
||||
+ // once the strict checking is enabled.
|
||||
+ {"254 char label, name", strings.Repeat("a.a", 84) + "aaa", false, true},
|
||||
+ {"254 char label, constraint", strings.Repeat("a.a", 84) + "aaa", true, true},
|
||||
+ {"253 char label, name", strings.Repeat("a.a", 84) + "aa", false, true},
|
||||
+ {"253 char label, constraint", strings.Repeat("a.a", 84) + "aa", true, true},
|
||||
+ {"64 char single label, name", strings.Repeat("a", 64), false, true},
|
||||
+ {"64 char single label, constraint", strings.Repeat("a", 64), true, true},
|
||||
+ {"64 char label, name", "a." + strings.Repeat("a", 64), false, true},
|
||||
+ {"64 char label, constraint", "a." + strings.Repeat("a", 64), true, true},
|
||||
+
|
||||
+ // Check we properly enforce properties of domain names.
|
||||
{"empty name, constraint", "", true, true},
|
||||
{"empty label, name", "a..a", false, false},
|
||||
{"empty label, constraint", "a..a", true, false},
|
||||
@@ -123,23 +150,60 @@ func TestDomainNameValid(t *testing.T) {
|
||||
{"trailing period, constraint", "a.", true, false},
|
||||
{"bare label, name", "a", false, true},
|
||||
{"bare label, constraint", "a", true, true},
|
||||
- {"254 char label, name", strings.Repeat("a.a", 84) + "aaa", false, false},
|
||||
- {"254 char label, constraint", strings.Repeat("a.a", 84) + "aaa", true, false},
|
||||
- {"253 char label, name", strings.Repeat("a.a", 84) + "aa", false, false},
|
||||
- {"253 char label, constraint", strings.Repeat("a.a", 84) + "aa", true, false},
|
||||
- {"64 char single label, name", strings.Repeat("a", 64), false, false},
|
||||
- {"64 char single label, constraint", strings.Repeat("a", 64), true, false},
|
||||
{"63 char single label, name", strings.Repeat("a", 63), false, true},
|
||||
{"63 char single label, constraint", strings.Repeat("a", 63), true, true},
|
||||
- {"64 char label, name", "a." + strings.Repeat("a", 64), false, false},
|
||||
- {"64 char label, constraint", "a." + strings.Repeat("a", 64), true, false},
|
||||
{"63 char label, name", "a." + strings.Repeat("a", 63), false, true},
|
||||
{"63 char label, constraint", "a." + strings.Repeat("a", 63), true, true},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
- if tc.valid != domainNameValid(tc.dnsName, tc.constraint) {
|
||||
+ valid := domainNameValid(tc.dnsName, tc.constraint)
|
||||
+ if tc.valid != valid {
|
||||
t.Errorf("domainNameValid(%q, %t) = %v; want %v", tc.dnsName, tc.constraint, !tc.valid, tc.valid)
|
||||
}
|
||||
+ // Also check that we enforce the same properties as domainToReverseLabels
|
||||
+ trimmedName := tc.dnsName
|
||||
+ if tc.constraint && len(trimmedName) > 1 && trimmedName[0] == '.' {
|
||||
+ trimmedName = trimmedName[1:]
|
||||
+ }
|
||||
+ _, revValid := domainToReverseLabels(trimmedName)
|
||||
+ if valid != revValid {
|
||||
+ t.Errorf("domainNameValid(%q, %t) = %t != domainToReverseLabels(%q) = %t", tc.dnsName, tc.constraint, valid, trimmedName, revValid)
|
||||
+ }
|
||||
})
|
||||
}
|
||||
}
|
||||
+
|
||||
+func TestRoundtripWeirdSANs(t *testing.T) {
|
||||
+ // TODO(#75835): check that certificates we create with CreateCertificate that have malformed SAN values
|
||||
+ // can be parsed by ParseCertificate. We should eventually restrict this, but for now we have to maintain
|
||||
+ // this property as people have been relying on it.
|
||||
+ k, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||
+ if err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ badNames := []string{
|
||||
+ "baredomain",
|
||||
+ "baredomain.",
|
||||
+ strings.Repeat("a", 255),
|
||||
+ strings.Repeat("a", 65) + ".com",
|
||||
+ }
|
||||
+ tmpl := &Certificate{
|
||||
+ EmailAddresses: badNames,
|
||||
+ DNSNames: badNames,
|
||||
+ }
|
||||
+ b, err := CreateCertificate(rand.Reader, tmpl, tmpl, &k.PublicKey, k)
|
||||
+ if err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ _, err = ParseCertificate(b)
|
||||
+ if err != nil {
|
||||
+ t.Fatalf("Couldn't roundtrip certificate: %v", err)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func FuzzDomainNameValid(f *testing.F) {
|
||||
+ f.Fuzz(func(t *testing.T, data string) {
|
||||
+ domainNameValid(data, false)
|
||||
+ domainNameValid(data, true)
|
||||
+ })
|
||||
+}
|
||||
diff --git a/src/crypto/x509/verify.go b/src/crypto/x509/verify.go
|
||||
index fb2f4b2..99f38a0 100644
|
||||
--- a/src/crypto/x509/verify.go
|
||||
+++ b/src/crypto/x509/verify.go
|
||||
@@ -390,7 +390,7 @@ func domainToReverseLabels(domain string) (reverseLabels []string, ok bool) {
|
||||
return reverseLabels, true
|
||||
}
|
||||
|
||||
-func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string) (bool, error) {
|
||||
+func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
// If the constraint contains an @, then it specifies an exact mailbox
|
||||
// name.
|
||||
if strings.Contains(constraint, "@") {
|
||||
@@ -403,10 +403,10 @@ func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string) (bool, erro
|
||||
|
||||
// Otherwise the constraint is like a DNS constraint of the domain part
|
||||
// of the mailbox.
|
||||
- return matchDomainConstraint(mailbox.domain, constraint)
|
||||
+ return matchDomainConstraint(mailbox.domain, constraint, reversedDomainsCache, reversedConstraintsCache)
|
||||
}
|
||||
|
||||
-func matchURIConstraint(uri *url.URL, constraint string) (bool, error) {
|
||||
+func matchURIConstraint(uri *url.URL, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
// From RFC 5280, Section 4.2.1.10:
|
||||
// “a uniformResourceIdentifier that does not include an authority
|
||||
// component with a host name specified as a fully qualified domain
|
||||
@@ -433,7 +433,7 @@ func matchURIConstraint(uri *url.URL, constraint string) (bool, error) {
|
||||
return false, fmt.Errorf("URI with IP (%q) cannot be matched against constraints", uri.String())
|
||||
}
|
||||
|
||||
- return matchDomainConstraint(host, constraint)
|
||||
+ return matchDomainConstraint(host, constraint, reversedDomainsCache, reversedConstraintsCache)
|
||||
}
|
||||
|
||||
func matchIPConstraint(ip net.IP, constraint *net.IPNet) (bool, error) {
|
||||
@@ -450,16 +450,21 @@ func matchIPConstraint(ip net.IP, constraint *net.IPNet) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
-func matchDomainConstraint(domain, constraint string) (bool, error) {
|
||||
+func matchDomainConstraint(domain, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
// The meaning of zero length constraints is not specified, but this
|
||||
// code follows NSS and accepts them as matching everything.
|
||||
if len(constraint) == 0 {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
- domainLabels, ok := domainToReverseLabels(domain)
|
||||
- if !ok {
|
||||
- return false, fmt.Errorf("x509: internal error: cannot parse domain %q", domain)
|
||||
+ domainLabels, found := reversedDomainsCache[domain]
|
||||
+ if !found {
|
||||
+ var ok bool
|
||||
+ domainLabels, ok = domainToReverseLabels(domain)
|
||||
+ if !ok {
|
||||
+ return false, fmt.Errorf("x509: internal error: cannot parse domain %q", domain)
|
||||
+ }
|
||||
+ reversedDomainsCache[domain] = domainLabels
|
||||
}
|
||||
|
||||
// RFC 5280 says that a leading period in a domain name means that at
|
||||
@@ -473,9 +478,14 @@ func matchDomainConstraint(domain, constraint string) (bool, error) {
|
||||
constraint = constraint[1:]
|
||||
}
|
||||
|
||||
- constraintLabels, ok := domainToReverseLabels(constraint)
|
||||
- if !ok {
|
||||
- return false, fmt.Errorf("x509: internal error: cannot parse domain %q", constraint)
|
||||
+ constraintLabels, found := reversedConstraintsCache[constraint]
|
||||
+ if !found {
|
||||
+ var ok bool
|
||||
+ constraintLabels, ok = domainToReverseLabels(constraint)
|
||||
+ if !ok {
|
||||
+ return false, fmt.Errorf("x509: internal error: cannot parse domain %q", constraint)
|
||||
+ }
|
||||
+ reversedConstraintsCache[constraint] = constraintLabels
|
||||
}
|
||||
|
||||
if len(domainLabels) < len(constraintLabels) ||
|
||||
@@ -598,6 +608,19 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
leaf = currentChain[0]
|
||||
}
|
||||
|
||||
+ // Each time we do constraint checking, we need to check the constraints in
|
||||
+ // the current certificate against all of the names that preceded it. We
|
||||
+ // reverse these names using domainToReverseLabels, which is a relatively
|
||||
+ // expensive operation. Since we check each name against each constraint,
|
||||
+ // this requires us to do N*C calls to domainToReverseLabels (where N is the
|
||||
+ // total number of names that preceed the certificate, and C is the total
|
||||
+ // number of constraints in the certificate). By caching the results of
|
||||
+ // calling domainToReverseLabels, we can reduce that to N+C calls at the
|
||||
+ // cost of keeping all of the parsed names and constraints in memory until
|
||||
+ // we return from isValid.
|
||||
+ reversedDomainsCache := map[string][]string{}
|
||||
+ reversedConstraintsCache := map[string][]string{}
|
||||
+
|
||||
if (certType == intermediateCertificate || certType == rootCertificate) &&
|
||||
c.hasNameConstraints() && leaf.hasSANExtension() {
|
||||
err := forEachSAN(leaf.getSANExtension(), func(tag int, data []byte) error {
|
||||
@@ -611,20 +634,20 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
|
||||
if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "email address", name, mailbox,
|
||||
func(parsedName, constraint interface{}) (bool, error) {
|
||||
- return matchEmailConstraint(parsedName.(rfc2821Mailbox), constraint.(string))
|
||||
+ return matchEmailConstraint(parsedName.(rfc2821Mailbox), constraint.(string), reversedDomainsCache, reversedConstraintsCache)
|
||||
}, c.PermittedEmailAddresses, c.ExcludedEmailAddresses); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
case nameTypeDNS:
|
||||
name := string(data)
|
||||
- if _, ok := domainToReverseLabels(name); !ok {
|
||||
+ if !domainNameValid(name, false) {
|
||||
return fmt.Errorf("x509: cannot parse dnsName %q", name)
|
||||
}
|
||||
|
||||
if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "DNS name", name, name,
|
||||
func(parsedName, constraint interface{}) (bool, error) {
|
||||
- return matchDomainConstraint(parsedName.(string), constraint.(string))
|
||||
+ return matchDomainConstraint(parsedName.(string), constraint.(string), reversedDomainsCache, reversedConstraintsCache)
|
||||
}, c.PermittedDNSDomains, c.ExcludedDNSDomains); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -638,7 +661,7 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
|
||||
if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "URI", name, uri,
|
||||
func(parsedName, constraint interface{}) (bool, error) {
|
||||
- return matchURIConstraint(parsedName.(*url.URL), constraint.(string))
|
||||
+ return matchURIConstraint(parsedName.(*url.URL), constraint.(string), reversedDomainsCache, reversedConstraintsCache)
|
||||
}, c.PermittedURIDomains, c.ExcludedURIDomains); err != nil {
|
||||
return err
|
||||
}
|
||||
diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go
|
||||
index 9da39ca..31e8149 100644
|
||||
--- a/src/crypto/x509/verify_test.go
|
||||
+++ b/src/crypto/x509/verify_test.go
|
||||
@@ -1648,7 +1648,7 @@ var nameConstraintTests = []struct {
|
||||
|
||||
func TestNameConstraints(t *testing.T) {
|
||||
for i, test := range nameConstraintTests {
|
||||
- result, err := matchDomainConstraint(test.domain, test.constraint)
|
||||
+ result, err := matchDomainConstraint(test.domain, test.constraint, map[string][]string{}, map[string][]string{})
|
||||
|
||||
if err != nil && !test.expectError {
|
||||
t.Errorf("unexpected error for test #%d: domain=%s, constraint=%s, err=%s", i, test.domain, test.constraint, err)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
229
meta/recipes-devtools/go/go-1.18/CVE-2025-61727.patch
Normal file
229
meta/recipes-devtools/go/go-1.18/CVE-2025-61727.patch
Normal file
@@ -0,0 +1,229 @@
|
||||
From 04db77a423cac75bb82cc9a6859991ae9c016344 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Mon, 24 Nov 2025 08:46:08 -0800
|
||||
Subject: [PATCH] [release-branch.go1.24] crypto/x509: excluded subdomain
|
||||
constraints preclude wildcard SANs
|
||||
|
||||
When evaluating name constraints in a certificate chain, the presence of
|
||||
an excluded subdomain constraint (e.g., excluding "test.example.com")
|
||||
should preclude the use of a wildcard SAN (e.g., "*.example.com").
|
||||
|
||||
Fixes #76442
|
||||
Fixes #76463
|
||||
Fixes CVE-2025-61727
|
||||
|
||||
Change-Id: I42a0da010cb36d2ec9d1239ae3f61cf25eb78bba
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/724401
|
||||
Reviewed-by: Nicholas Husin <husin@google.com>
|
||||
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
|
||||
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
||||
Reviewed-by: Nicholas Husin <nsh@golang.org>
|
||||
Reviewed-by: Neal Patel <nealpatel@google.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/04db77a423cac75bb82cc9a6859991ae9c016344]
|
||||
CVE: CVE-2025-61727
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/crypto/x509/name_constraints_test.go | 34 ++++++++++++++++++++
|
||||
src/crypto/x509/verify.go | 40 +++++++++++++++---------
|
||||
src/crypto/x509/verify_test.go | 2 +-
|
||||
3 files changed, 60 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/crypto/x509/name_constraints_test.go b/src/crypto/x509/name_constraints_test.go
|
||||
index c59a7dc..963bc5a 100644
|
||||
--- a/src/crypto/x509/name_constraints_test.go
|
||||
+++ b/src/crypto/x509/name_constraints_test.go
|
||||
@@ -1595,6 +1595,40 @@ var nameConstraintsTests = []nameConstraintsTest{
|
||||
cn: "foo.bar",
|
||||
},
|
||||
},
|
||||
+ // #87: subdomain excluded constraints preclude wildcard names
|
||||
+ {
|
||||
+ roots: []constraintsSpec{
|
||||
+ {
|
||||
+ bad: []string{"dns:foo.example.com"},
|
||||
+ },
|
||||
+ },
|
||||
+ intermediates: [][]constraintsSpec{
|
||||
+ {
|
||||
+ {},
|
||||
+ },
|
||||
+ },
|
||||
+ leaf: leafSpec{
|
||||
+ sans: []string{"dns:*.example.com"},
|
||||
+ },
|
||||
+ expectedError: "\"*.example.com\" is excluded by constraint \"foo.example.com\"",
|
||||
+ },
|
||||
+ // #88: wildcard names are not matched by subdomain permitted constraints
|
||||
+ {
|
||||
+ roots: []constraintsSpec{
|
||||
+ {
|
||||
+ ok: []string{"dns:foo.example.com"},
|
||||
+ },
|
||||
+ },
|
||||
+ intermediates: [][]constraintsSpec{
|
||||
+ {
|
||||
+ {},
|
||||
+ },
|
||||
+ },
|
||||
+ leaf: leafSpec{
|
||||
+ sans: []string{"dns:*.example.com"},
|
||||
+ },
|
||||
+ expectedError: "\"*.example.com\" is not permitted",
|
||||
+ },
|
||||
}
|
||||
|
||||
func makeConstraintsCACert(constraints constraintsSpec, name string, key *ecdsa.PrivateKey, parent *Certificate, parentKey *ecdsa.PrivateKey) (*Certificate, error) {
|
||||
diff --git a/src/crypto/x509/verify.go b/src/crypto/x509/verify.go
|
||||
index 99f38a0..88260ee 100644
|
||||
--- a/src/crypto/x509/verify.go
|
||||
+++ b/src/crypto/x509/verify.go
|
||||
@@ -390,7 +390,7 @@ func domainToReverseLabels(domain string) (reverseLabels []string, ok bool) {
|
||||
return reverseLabels, true
|
||||
}
|
||||
|
||||
-func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
+func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string, excluded bool, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
// If the constraint contains an @, then it specifies an exact mailbox
|
||||
// name.
|
||||
if strings.Contains(constraint, "@") {
|
||||
@@ -403,10 +403,10 @@ func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string, reversedDom
|
||||
|
||||
// Otherwise the constraint is like a DNS constraint of the domain part
|
||||
// of the mailbox.
|
||||
- return matchDomainConstraint(mailbox.domain, constraint, reversedDomainsCache, reversedConstraintsCache)
|
||||
+ return matchDomainConstraint(mailbox.domain, constraint, excluded, reversedDomainsCache, reversedConstraintsCache)
|
||||
}
|
||||
|
||||
-func matchURIConstraint(uri *url.URL, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
+func matchURIConstraint(uri *url.URL, constraint string, excluded bool, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
// From RFC 5280, Section 4.2.1.10:
|
||||
// “a uniformResourceIdentifier that does not include an authority
|
||||
// component with a host name specified as a fully qualified domain
|
||||
@@ -433,7 +433,7 @@ func matchURIConstraint(uri *url.URL, constraint string, reversedDomainsCache ma
|
||||
return false, fmt.Errorf("URI with IP (%q) cannot be matched against constraints", uri.String())
|
||||
}
|
||||
|
||||
- return matchDomainConstraint(host, constraint, reversedDomainsCache, reversedConstraintsCache)
|
||||
+ return matchDomainConstraint(host, constraint, excluded, reversedDomainsCache, reversedConstraintsCache)
|
||||
}
|
||||
|
||||
func matchIPConstraint(ip net.IP, constraint *net.IPNet) (bool, error) {
|
||||
@@ -450,7 +450,7 @@ func matchIPConstraint(ip net.IP, constraint *net.IPNet) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
-func matchDomainConstraint(domain, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
+func matchDomainConstraint(domain, constraint string, excluded bool, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) {
|
||||
// The meaning of zero length constraints is not specified, but this
|
||||
// code follows NSS and accepts them as matching everything.
|
||||
if len(constraint) == 0 {
|
||||
@@ -467,6 +467,11 @@ func matchDomainConstraint(domain, constraint string, reversedDomainsCache map[s
|
||||
reversedDomainsCache[domain] = domainLabels
|
||||
}
|
||||
|
||||
+ wildcardDomain := false
|
||||
+ if len(domain) > 0 && domain[0] == '*' {
|
||||
+ wildcardDomain = true
|
||||
+ }
|
||||
+
|
||||
// RFC 5280 says that a leading period in a domain name means that at
|
||||
// least one label must be prepended, but only for URI and email
|
||||
// constraints, not DNS constraints. The code also supports that
|
||||
@@ -493,6 +498,11 @@ func matchDomainConstraint(domain, constraint string, reversedDomainsCache map[s
|
||||
return false, nil
|
||||
}
|
||||
|
||||
+ if excluded && wildcardDomain && len(domainLabels) > 1 && len(constraintLabels) > 0 {
|
||||
+ domainLabels = domainLabels[:len(domainLabels)-1]
|
||||
+ constraintLabels = constraintLabels[:len(constraintLabels)-1]
|
||||
+ }
|
||||
+
|
||||
for i, constraintLabel := range constraintLabels {
|
||||
if !strings.EqualFold(constraintLabel, domainLabels[i]) {
|
||||
return false, nil
|
||||
@@ -512,7 +522,7 @@ func (c *Certificate) checkNameConstraints(count *int,
|
||||
nameType string,
|
||||
name string,
|
||||
parsedName interface{},
|
||||
- match func(parsedName, constraint interface{}) (match bool, err error),
|
||||
+ match func(parsedName, constraint interface{}, excluded bool) (match bool, err error),
|
||||
permitted, excluded interface{}) error {
|
||||
|
||||
excludedValue := reflect.ValueOf(excluded)
|
||||
@@ -524,7 +534,7 @@ func (c *Certificate) checkNameConstraints(count *int,
|
||||
|
||||
for i := 0; i < excludedValue.Len(); i++ {
|
||||
constraint := excludedValue.Index(i).Interface()
|
||||
- match, err := match(parsedName, constraint)
|
||||
+ match, err := match(parsedName, constraint, true)
|
||||
if err != nil {
|
||||
return CertificateInvalidError{c, CANotAuthorizedForThisName, err.Error()}
|
||||
}
|
||||
@@ -546,7 +556,7 @@ func (c *Certificate) checkNameConstraints(count *int,
|
||||
constraint := permittedValue.Index(i).Interface()
|
||||
|
||||
var err error
|
||||
- if ok, err = match(parsedName, constraint); err != nil {
|
||||
+ if ok, err = match(parsedName, constraint, false); err != nil {
|
||||
return CertificateInvalidError{c, CANotAuthorizedForThisName, err.Error()}
|
||||
}
|
||||
|
||||
@@ -633,8 +643,8 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
}
|
||||
|
||||
if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "email address", name, mailbox,
|
||||
- func(parsedName, constraint interface{}) (bool, error) {
|
||||
- return matchEmailConstraint(parsedName.(rfc2821Mailbox), constraint.(string), reversedDomainsCache, reversedConstraintsCache)
|
||||
+ func(parsedName, constraint interface{}, excluded bool) (bool, error) {
|
||||
+ return matchEmailConstraint(parsedName.(rfc2821Mailbox), constraint.(string), excluded, reversedDomainsCache, reversedConstraintsCache)
|
||||
}, c.PermittedEmailAddresses, c.ExcludedEmailAddresses); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -646,8 +656,8 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
}
|
||||
|
||||
if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "DNS name", name, name,
|
||||
- func(parsedName, constraint interface{}) (bool, error) {
|
||||
- return matchDomainConstraint(parsedName.(string), constraint.(string), reversedDomainsCache, reversedConstraintsCache)
|
||||
+ func(parsedName, constraint interface{}, excluded bool) (bool, error) {
|
||||
+ return matchDomainConstraint(parsedName.(string), constraint.(string), excluded, reversedDomainsCache, reversedConstraintsCache)
|
||||
}, c.PermittedDNSDomains, c.ExcludedDNSDomains); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -660,8 +670,8 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
}
|
||||
|
||||
if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "URI", name, uri,
|
||||
- func(parsedName, constraint interface{}) (bool, error) {
|
||||
- return matchURIConstraint(parsedName.(*url.URL), constraint.(string), reversedDomainsCache, reversedConstraintsCache)
|
||||
+ func(parsedName, constraint interface{}, excluded bool) (bool, error) {
|
||||
+ return matchURIConstraint(parsedName.(*url.URL), constraint.(string), excluded, reversedDomainsCache, reversedConstraintsCache)
|
||||
}, c.PermittedURIDomains, c.ExcludedURIDomains); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -673,7 +683,7 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V
|
||||
}
|
||||
|
||||
if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "IP address", ip.String(), ip,
|
||||
- func(parsedName, constraint interface{}) (bool, error) {
|
||||
+ func(parsedName, constraint interface{}, _ bool) (bool, error) {
|
||||
return matchIPConstraint(parsedName.(net.IP), constraint.(*net.IPNet))
|
||||
}, c.PermittedIPRanges, c.ExcludedIPRanges); err != nil {
|
||||
return err
|
||||
diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go
|
||||
index 31e8149..5f7c834 100644
|
||||
--- a/src/crypto/x509/verify_test.go
|
||||
+++ b/src/crypto/x509/verify_test.go
|
||||
@@ -1648,7 +1648,7 @@ var nameConstraintTests = []struct {
|
||||
|
||||
func TestNameConstraints(t *testing.T) {
|
||||
for i, test := range nameConstraintTests {
|
||||
- result, err := matchDomainConstraint(test.domain, test.constraint, map[string][]string{}, map[string][]string{})
|
||||
+ result, err := matchDomainConstraint(test.domain, test.constraint, false, map[string][]string{}, map[string][]string{})
|
||||
|
||||
if err != nil && !test.expectError {
|
||||
t.Errorf("unexpected error for test #%d: domain=%s, constraint=%s, err=%s", i, test.domain, test.constraint, err)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
172
meta/recipes-devtools/go/go-1.18/CVE-2025-61729.patch
Normal file
172
meta/recipes-devtools/go/go-1.18/CVE-2025-61729.patch
Normal file
@@ -0,0 +1,172 @@
|
||||
From 3a842bd5c6aa8eefa13c0174de3ab361e50bd672 Mon Sep 17 00:00:00 2001
|
||||
From: "Nicholas S. Husin" <nsh@golang.org>
|
||||
Date: Mon, 24 Nov 2025 14:56:23 -0500
|
||||
Subject: [PATCH] [release-branch.go1.24] crypto/x509: prevent
|
||||
HostnameError.Error() from consuming excessive resource
|
||||
|
||||
Constructing HostnameError.Error() takes O(N^2) runtime due to using a
|
||||
string concatenation in a loop. Additionally, there is no limit on how
|
||||
many names are included in the error message. As a result, a malicious
|
||||
attacker could craft a certificate with an infinite amount of names to
|
||||
unfairly consume resource.
|
||||
|
||||
To remediate this, we will now use strings.Builder to construct the
|
||||
error message, preventing O(N^2) runtime. When a certificate has 100 or
|
||||
more names, we will also not print each name individually.
|
||||
|
||||
Thanks to Philippe Antoine (Catena cyber) for reporting this issue.
|
||||
|
||||
Updates #76445
|
||||
Fixes #76460
|
||||
Fixes CVE-2025-61729
|
||||
|
||||
Change-Id: I6343776ec3289577abc76dad71766c491c1a7c81
|
||||
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/3000
|
||||
Reviewed-by: Neal Patel <nealpatel@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/3220
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/725820
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
|
||||
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Reviewed-by: Mark Freeman <markfreeman@google.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/3a842bd5c6aa8eefa13c0174de3ab361e50bd672]
|
||||
CVE: CVE-2025-61729
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
src/crypto/x509/verify.go | 21 ++++++++++-----
|
||||
src/crypto/x509/verify_test.go | 47 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 61 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/crypto/x509/verify.go b/src/crypto/x509/verify.go
|
||||
index 88260ee..c167191 100644
|
||||
--- a/src/crypto/x509/verify.go
|
||||
+++ b/src/crypto/x509/verify.go
|
||||
@@ -97,31 +97,38 @@ type HostnameError struct {
|
||||
|
||||
func (h HostnameError) Error() string {
|
||||
c := h.Certificate
|
||||
+ maxNamesIncluded := 100
|
||||
|
||||
if !c.hasSANExtension() && matchHostnames(c.Subject.CommonName, h.Host) {
|
||||
return "x509: certificate relies on legacy Common Name field, use SANs instead"
|
||||
}
|
||||
|
||||
- var valid string
|
||||
+ var valid strings.Builder
|
||||
if ip := net.ParseIP(h.Host); ip != nil {
|
||||
// Trying to validate an IP
|
||||
if len(c.IPAddresses) == 0 {
|
||||
return "x509: cannot validate certificate for " + h.Host + " because it doesn't contain any IP SANs"
|
||||
}
|
||||
+ if len(c.IPAddresses) >= maxNamesIncluded {
|
||||
+ return fmt.Sprintf("x509: certificate is valid for %d IP SANs, but none matched %s", len(c.IPAddresses), h.Host)
|
||||
+ }
|
||||
for _, san := range c.IPAddresses {
|
||||
- if len(valid) > 0 {
|
||||
- valid += ", "
|
||||
+ if valid.Len() > 0 {
|
||||
+ valid.WriteString(", ")
|
||||
}
|
||||
- valid += san.String()
|
||||
+ valid.WriteString(san.String())
|
||||
}
|
||||
} else {
|
||||
- valid = strings.Join(c.DNSNames, ", ")
|
||||
+ if len(c.DNSNames) >= maxNamesIncluded {
|
||||
+ return fmt.Sprintf("x509: certificate is valid for %d names, but none matched %s", len(c.DNSNames), h.Host)
|
||||
+ }
|
||||
+ valid.WriteString(strings.Join(c.DNSNames, ", "))
|
||||
}
|
||||
|
||||
- if len(valid) == 0 {
|
||||
+ if valid.Len() == 0 {
|
||||
return "x509: certificate is not valid for any names, but wanted to match " + h.Host
|
||||
}
|
||||
- return "x509: certificate is valid for " + valid + ", not " + h.Host
|
||||
+ return "x509: certificate is valid for " + valid.String() + ", not " + h.Host
|
||||
}
|
||||
|
||||
// UnknownAuthorityError results when the certificate issuer is unknown
|
||||
diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go
|
||||
index 5f7c834..c2c2025 100644
|
||||
--- a/src/crypto/x509/verify_test.go
|
||||
+++ b/src/crypto/x509/verify_test.go
|
||||
@@ -9,11 +9,14 @@ import (
|
||||
"crypto/ecdsa"
|
||||
"crypto/elliptic"
|
||||
"crypto/rand"
|
||||
+ "crypto/rsa"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
+ "log"
|
||||
"math/big"
|
||||
+ "net"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -70,6 +73,26 @@ var verifyTests = []verifyTest{
|
||||
|
||||
errorCallback: expectHostnameError("certificate is valid for"),
|
||||
},
|
||||
+ {
|
||||
+ name: "TooManyDNS",
|
||||
+ leaf: generatePEMCertWithRepeatSAN(1677615892, 200, "fake.dns"),
|
||||
+ roots: []string{generatePEMCertWithRepeatSAN(1677615892, 200, "fake.dns")},
|
||||
+ currentTime: 1677615892,
|
||||
+ dnsName: "www.example.com",
|
||||
+ systemSkip: true, // does not chain to a system root
|
||||
+
|
||||
+ errorCallback: expectHostnameError("certificate is valid for 200 names, but none matched"),
|
||||
+ },
|
||||
+ {
|
||||
+ name: "TooManyIPs",
|
||||
+ leaf: generatePEMCertWithRepeatSAN(1677615892, 150, "4.3.2.1"),
|
||||
+ roots: []string{generatePEMCertWithRepeatSAN(1677615892, 150, "4.3.2.1")},
|
||||
+ currentTime: 1677615892,
|
||||
+ dnsName: "1.2.3.4",
|
||||
+ systemSkip: true, // does not chain to a system root
|
||||
+
|
||||
+ errorCallback: expectHostnameError("certificate is valid for 150 IP SANs, but none matched"),
|
||||
+ },
|
||||
{
|
||||
name: "IPMissing",
|
||||
leaf: googleLeaf,
|
||||
@@ -584,6 +607,30 @@ func nameToKey(name *pkix.Name) string {
|
||||
return strings.Join(name.Country, ",") + "/" + strings.Join(name.Organization, ",") + "/" + strings.Join(name.OrganizationalUnit, ",") + "/" + name.CommonName
|
||||
}
|
||||
|
||||
+func generatePEMCertWithRepeatSAN(currentTime int64, count int, san string) string {
|
||||
+ cert := Certificate{
|
||||
+ NotBefore: time.Unix(currentTime, 0),
|
||||
+ NotAfter: time.Unix(currentTime, 0),
|
||||
+ }
|
||||
+ if ip := net.ParseIP(san); ip != nil {
|
||||
+ cert.IPAddresses = slices.Repeat([]net.IP{ip}, count)
|
||||
+ } else {
|
||||
+ cert.DNSNames = slices.Repeat([]string{san}, count)
|
||||
+ }
|
||||
+ privKey, err := rsa.GenerateKey(rand.Reader, 4096)
|
||||
+ if err != nil {
|
||||
+ log.Fatal(err)
|
||||
+ }
|
||||
+ certBytes, err := CreateCertificate(rand.Reader, &cert, &cert, &privKey.PublicKey, privKey)
|
||||
+ if err != nil {
|
||||
+ log.Fatal(err)
|
||||
+ }
|
||||
+ return string(pem.EncodeToMemory(&pem.Block{
|
||||
+ Type: "CERTIFICATE",
|
||||
+ Bytes: certBytes,
|
||||
+ }))
|
||||
+}
|
||||
+
|
||||
const geoTrustRoot = `-----BEGIN CERTIFICATE-----
|
||||
MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
|
||||
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
|
||||
--
|
||||
2.25.1
|
||||
|
||||
55
meta/recipes-devtools/go/go-1.21/CVE-2023-39323.patch
Normal file
55
meta/recipes-devtools/go/go-1.21/CVE-2023-39323.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From 5e0a62c44fbaff6443bffe67911370bc0ea25f6d Mon Sep 17 00:00:00 2001
|
||||
From: Ian Lance Taylor <iant@golang.org>
|
||||
Date: Wed, 20 Sep 2023 16:16:29 -0700
|
||||
Subject: [PATCH] cmd/compile: use absolute file name in isCgo check
|
||||
|
||||
For #23672
|
||||
Fixes #63211
|
||||
Fixes CVE-2023-39323
|
||||
|
||||
Change-Id: I4586a69e1b2560036afec29d53e53cf25e6c7352
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2032884
|
||||
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/534158
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
||||
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
||||
Auto-Submit: Ian Lance Taylor <iant@google.com>
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2023-39323
|
||||
|
||||
Reference to upstream patch:
|
||||
https://github.com/golang/go/commit/e7c142a19d8b3944c2f1b9ab7fd94c63d8d0c555
|
||||
|
||||
Backport patch to fix CVE-2023-39323 and drop the modifications of test codes.
|
||||
|
||||
Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
|
||||
---
|
||||
src/cmd/compile/internal/noder/noder.go | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cmd/compile/internal/noder/noder.go b/src/cmd/compile/internal/noder/noder.go
|
||||
index 5fcad096c2..f35e065a31 100644
|
||||
--- a/src/cmd/compile/internal/noder/noder.go
|
||||
+++ b/src/cmd/compile/internal/noder/noder.go
|
||||
@@ -1690,8 +1690,14 @@ func (p *noder) pragma(pos syntax.Pos, blankLine bool, text string, old syntax.P
|
||||
// contain cgo directives, and for security reasons
|
||||
// (primarily misuse of linker flags), other files are not.
|
||||
// See golang.org/issue/23672.
|
||||
+// Note that cmd/go ignores files whose names start with underscore,
|
||||
+// so the only _cgo_ files we will see from cmd/go are generated by cgo.
|
||||
+// It's easy to bypass this check by calling the compiler directly;
|
||||
+// we only protect against uses by cmd/go.
|
||||
func isCgoGeneratedFile(pos syntax.Pos) bool {
|
||||
- return strings.HasPrefix(filepath.Base(filepath.Clean(fileh(pos.Base().Filename()))), "_cgo_")
|
||||
+ // We need the absolute file, independent of //line directives,
|
||||
+ // so we call pos.Base().Pos().Base().
|
||||
+ return strings.HasPrefix(filepath.Base(filepath.Clean(fileh(pos.Base().Pos().Base().Filename()))), "_cgo_")
|
||||
}
|
||||
|
||||
// safeArg reports whether arg is a "safe" command-line argument,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
From b5545c08e6c674c49aef14b47a56a3e92df4d2a7 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 17 Feb 2016 07:36:34 +0000
|
||||
Subject: [pseudo][PATCH] configure: Prune PIE flags
|
||||
|
||||
LDFLAGS are not taken from environment and CFLAGS is used for LDFLAGS
|
||||
however when using security options -fpie and -pie options are coming
|
||||
as part of ARCH_FLAGS and they get into LDFLAGS of shared objects as
|
||||
well so we end up with conflicting options -shared -pie, which gold
|
||||
rejects outright and bfd linker lets the one appearning last in cmdline
|
||||
take effect. This create quite a unpleasant situation in OE when
|
||||
security flags are enabled and gold or not-gold options are used
|
||||
it errors out but errors are not same.
|
||||
|
||||
Anyway, with this patch we filter pie options from ARCH_FLAGS
|
||||
ouright and take control of generating PIC objects
|
||||
|
||||
Helps with errors like
|
||||
|
||||
| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: pseudo_client.o: relocation R_X86_64_PC32 against symbol `pseudo_util_debug_flags' can not be used when making a shared object; recompile with -fPIC
|
||||
| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value
|
||||
| collect2: error: ld returned 1 exit status
|
||||
| make: *** [lib/pseudo/lib64/libpseudo.so] Error 1
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Submitted
|
||||
|
||||
configure | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index e5ef9ce..83b0890 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -339,3 +339,5 @@ sed -e '
|
||||
s,@ARCH@,'"$opt_arch"',g
|
||||
s,@BITS@,'"$opt_bits"',g
|
||||
' < Makefile.in > Makefile
|
||||
+
|
||||
+sed -i -e 's/\-[f]*pie//g' Makefile
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by
|
||||
_GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
|
||||
to turn this off within pseudo_wrappers.c. Elsewhere we can switch to _DEFAULT_SOURCE
|
||||
rather than _GNU_SOURCE.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Index: git/pseudo_wrappers.c
|
||||
===================================================================
|
||||
--- git.orig/pseudo_wrappers.c
|
||||
+++ git/pseudo_wrappers.c
|
||||
@@ -6,6 +6,18 @@
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*
|
||||
*/
|
||||
+/* glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by
|
||||
+ * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
|
||||
+ * to turn this off.
|
||||
+ */
|
||||
+#include <features.h>
|
||||
+#undef __GLIBC_USE_ISOC2X
|
||||
+#undef __GLIBC_USE_C2X_STRTOL
|
||||
+#define __GLIBC_USE_C2X_STRTOL 0
|
||||
+#undef __GLIBC_USE_ISOC23
|
||||
+#undef __GLIBC_USE_C23_STRTOL
|
||||
+#define __GLIBC_USE_C23_STRTOL 0
|
||||
+
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
Index: git/pseudo_util.c
|
||||
===================================================================
|
||||
--- git.orig/pseudo_util.c
|
||||
+++ git/pseudo_util.c
|
||||
@@ -8,6 +8,17 @@
|
||||
*/
|
||||
/* we need access to RTLD_NEXT for a horrible workaround */
|
||||
#define _GNU_SOURCE
|
||||
+/* glibc 2.38 would include __isoc23_strtol and similar symbols. This is trggerd by
|
||||
+ * _GNU_SOURCE but we have to set that for other definitions. Therefore play with defines
|
||||
+ * to turn this off.
|
||||
+ */
|
||||
+#include <features.h>
|
||||
+#undef __GLIBC_USE_ISOC2X
|
||||
+#undef __GLIBC_USE_C2X_STRTOL
|
||||
+#define __GLIBC_USE_C2X_STRTOL 0
|
||||
+#undef __GLIBC_USE_ISOC23
|
||||
+#undef __GLIBC_USE_C23_STRTOL
|
||||
+#define __GLIBC_USE_C23_STRTOL 0
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
Index: git/pseudo_client.c
|
||||
===================================================================
|
||||
--- git.orig/pseudo_client.c
|
||||
+++ git/pseudo_client.c
|
||||
@@ -6,7 +6,7 @@
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*
|
||||
*/
|
||||
-#define _GNU_SOURCE
|
||||
+#define _DEFAULT_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
@@ -28,10 +28,10 @@ diff --git a/Makefile.in b/Makefile.in
|
||||
@@ -120,7 +120,7 @@ $(PSEUDODB): pseudodb.o $(SHOBJS) $(DBOBJS) pseudo_ipc.o | $(BIN)
|
||||
libpseudo: $(LIBPSEUDO)
|
||||
|
||||
$(LIBPSEUDO): $(WRAPOBJS) pseudo_client.o pseudo_ipc.o $(SHOBJS) | $(LIB)
|
||||
$(LIBPSEUDO): $(WRAPOBJS) pseudo_client.o pseudo_client_scanf.o pseudo_ipc.o $(SHOBJS) | $(LIB)
|
||||
- $(CC) $(CFLAGS) $(CFLAGS_PSEUDO) -shared -o $(LIBPSEUDO) \
|
||||
+ $(CC) $(CFLAGS) -Lprebuilt/$(shell uname -m)-linux/lib/ $(CFLAGS_PSEUDO) -shared -o $(LIBPSEUDO) \
|
||||
pseudo_client.o pseudo_ipc.o \
|
||||
pseudo_client.o pseudo_client_scanf.o pseudo_ipc.o \
|
||||
$(WRAPOBJS) $(SHOBJS) $(LDFLAGS) $(CLIENT_LDFLAGS)
|
||||
|
||||
diff --git a/pseudo_wrappers.c b/pseudo_wrappers.c
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user