Compare commits

..

177 Commits

Author SHA1 Message Date
Steve Sakoman
f16cffd030 build-appliance-image: Update to scarthgap head revision
(From OE-Core rev: 7af6b75221d5703ba5bf43c7cd9f1e7a2e0ed20b)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:48:55 -07:00
Steve Sakoman
517a1206e0 poky.conf: bump version for 5.0.13
(From meta-yocto rev: 3ff7ca786732390cd56ae92ff4a43aba46a1bf2e)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:46:28 -07:00
Steve Sakoman
2eb674803a oeqa/sdk/cases/buildcpio.py: use gnu mirror instead of main server
ftp.gnu.org is the main server of the GNU project, however download speed
can vary greatly based on one's location.

Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror,
which should result sometimes in significantly faster download speed, depending
on one's location. This should also distribute the traffic more across the mirrors.

This information was sourced from https://www.gnu.org/prep/ftp.html

(From OE-Core rev: b0ce480eca6397fab71082ed202c3cf9dd02456f)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Steve Sakoman
6e74167ad4 selftest/cases/meta_ide.py: use use gnu mirror instead of main server
ftp.gnu.org is the main server of the GNU project, however download speed
can vary greatly based on one's location.

Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror,
which should result sometimes in significantly faster download speed, depending
on one's location. This should also distribute the traffic more across the mirrors.

This information was sourced from https://www.gnu.org/prep/ftp.html

(From OE-Core rev: aa7ff5a115f55c092f8ca5badad63734c8f4f5b7)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Gyorgy Sarvari
697d7cc740 conf/bitbake.conf: use gnu mirror instead of main server
ftp.gnu.org is the main server of the GNU project, however download speed
can vary greatly based on one's location.

Using ftpmirror.gnu.org should redirect the request to the closest up-to-date mirror,
which should result sometimes in significantly faster download speed, depending
on one's location. This should also distribute the traffic more across the mirrors.

This information was sourced from https://www.gnu.org/prep/ftp.html .

(From OE-Core rev: ef14bcae0f3f27acdd4e591fac69515aa912f194)

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d8c6f01d7467e018aa0ed27a87850d9e4434a47a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
2f0df0334a openssl: upgrade 3.2.4 -> 3.2.6
3.2.6 has fixed 3.2.5 regression which broke python3 ptests so we can
upgrade now. We can also drop CVE-2025-27587 patch which was taken
instead of 3.2.5 upgrade under:
https://github.com/openssl/openssl/pull/28198

Release information:
https://github.com/openssl/openssl/blob/openssl-3.0/NEWS.md#major-changes-between-openssl-3017-and-openssl-3018-30-sep-2025

OpenSSL 3.2.6 is a security patch release. The most severe CVE fixed in this release is Moderate.
This release incorporates the following bug fixes and mitigations:
* Fix Out-of-bounds read & write in RFC 3211 KEK Unwrap. (CVE-2025-9230)
* Fix Timing side-channel in SM2 algorithm on 64 bit ARM. (CVE-2025-9231)
* Fix Out-of-bounds read in HTTP client no_proxy handling. (CVE-2025-9232)

Release information:
https://github.com/openssl/openssl/blob/openssl-3.2/NEWS.md#major-changes-between-openssl-324-and-openssl-325-1-jul-2025

OpenSSL 3.2.5 is a bug fix release.
This release incorporates the following bug fixes and mitigations:
* Miscellaneous minor bug fixes.

(From OE-Core rev: ef6bbf39c10ff7bd8ad36d5d2f59ddd0756e0141)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Aleksandar Nikolic
9dafc77bd8 scripts/install-buildtools: Update to 5.0.12
Update to the 5.0.12 release of the 5.0 series for buildtools

(From OE-Core rev: 2f69dceeebbb67ce06ceda8782a60a71a0ed7f22)

Signed-off-by: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Archana Polampalli
e085cf0d53 go: fix CVE-2025-47906
If the PATH environment variable contains paths which are executables
(rather than just directories), passing certain strings to LookPath
("", ".", and ".."), can result in the binaries listed in the PATH
 being unexpectedly returned.

(From OE-Core rev: ed6df1883225ec08e637a0d7a15a6a5da4665d8d)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
8c8680d4c0 ffmpeg: ignore 8 CVEs fixed in 6.1.1 and 6.1.3 releases
Following are mentioned in commit upgrading the recipe to 6.1.3:
* CVE-2023-49502 CVE-2023-50007 CVE-2023-50008 CVE-2024-31578 CVE-2024-31582

Following are fixed via mentioned commits already in 6.1.1:
* CVE-2023-50009: 162b4c60c8
* CVE-2023-50010: e809c23786
* CVE-2024-31585: 3061bf668f

(From OE-Core rev: 8286570b3baf275ff48c45ca0864348a8d3faa01)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
ac57f3b9d2 tiff: ignore 5 CVEs
These CVEs are for tools which were removed in v4.6.0 via [1] and
re-introduced again in v4.7.0 via [2].

[1] eab89a627f
[2] 9ab54a8580

(From OE-Core rev: faf1e12ae0f9de56402830460315e5be0d13f4a5)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Ross Burton
aca68169cc pulseaudio: ignore CVE-2024-11586
As per the linked ticket, this issue is related to an Ubuntu-specific
patch that we don't have.

(From OE-Core rev: dc81fdc6bdf8ab39b7f2fd994d50256430c36558)

(From OE-Core rev: 72e63e44a0c6ad5a408c4dc59a24288c36463439)

(From OE-Core rev: 4cdcb27238be40e815ce5a0b67ce419331079801)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
da7d29485c expat: follow-up for CVE-2024-8176
Expat release 2.7.3 implemented a follow-up for this CVE.
References:
* https://github.com/libexpat/libexpat/blob/R_2_7_3/expat/Changes
* https://security-tracker.debian.org/tracker/CVE-2024-8176
* https://github.com/libexpat/libexpat/pull/1059

(From OE-Core rev: 5bbb9ee52674f5aa6eed5d6cf3f515704092994d)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
9fb26deedd ghostscript: patch CVE-2025-59800
Pick commit mentioned in the NVD report.

(From OE-Core rev: a63bb2ccc8294c8a97f5957f1ca9f0a4880713ac)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
0db5ae637d ghostscript: patch CVE-2025-59799
Pick commit mentioned in the NVD report.

(From OE-Core rev: 2f1d5b9ad1af6d2b28e9e7b46aadd879a67b8fc6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
7698e2910d ghostscript: patch CVE-2025-59798
Pick commit mentioned in the NVD report.

(From OE-Core rev: 4a2f47d9541d7a13da7a9ce16bd5088870c45ec4)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
8a80300d0f gstreamer1.0: ignore CVE-2025-2759
Copy statement from [1] that it is problem of installers (non-Linux).
Also [2] linked in NVD says "Fixed in 1.25.1 Gstreamer Installer".
Since Yocto builds from sources into our own packages, ignore it.

[1] https://security-tracker.debian.org/tracker/CVE-2025-2759
[2] https://www.zerodayinitiative.com/advisories/ZDI-25-268/

(From OE-Core rev: 99ee1df6bde2ffd4fa2ddea44c0a9b94d9d77bae)

(From OE-Core rev: 7937625a30f6046ba483a000497b15169659f5eb)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:58 -07:00
Peter Marko
bb7e27a5db gstreamer1.0: ignore CVEs fixed in plugins
All these CVEs were fixed in recent commits.

(From OE-Core rev: c5a68886247d4417de4ecaa8460e25e84ab93b0d)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:57 -07:00
Hitendra Prajapati
09dadcefe3 grub2: mark CVE-2024-2312 as not applicable
This issue is specific to the peimage module that Ubuntu add, and is not
an upstream issue.

(From OE-Core rev: 8d2fe3f403e6435e1ffe122a6776381090752d8a)

(From OE-Core rev: d005eda88dad37f31bdc59e45e20b209f3771a26)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:57 -07:00
Peter Marko
a981860c32 busybox: patch CVE-2025-46394
Pick commit mentioning this CVE.
Additionally fix test broken by the CVE fix.

(From OE-Core rev: e348e10f35cc082ebfe22c890c5f64c4a06dcea3)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-13 12:42:57 -07:00
Adam Blank
fbc7beca68 ref-manual/variables.rst: fix the description of STAGING_DIR
There is no single "recipe-sysroots" directory, but rather many
"recipe-sysroot*" directories.

(From yocto-docs rev: 6f086fd3d9dbbb0c80f6c3e89b8df4fed422e79a)

Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit f2d6e228409cb1dd1dbf339c405699ac6d3900be)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Antonin Godard
8e94da9219 ref-manual/structure: document the auto.conf file
Add documentation for auto.conf, which is used by external tools for
automatically setting variables.

(From yocto-docs rev: c16beccd7fa836a6bc77bb0a9d3274508bd3c6ff)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 134e54a75e0144c4629f702c6f43e92ed1f12dce)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Talel BELHAJ SALEM
a405b570b3 dev-manual/building.rst: add note about externalsrc variables absolute paths
(From yocto-docs rev: ab776a0348877d8dbf6c37823a65715fe30e34f6)

Signed-off-by: Talel BELHAJ SALEM <bhstalel@gmail.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 33166d70b6ad093bd95ffccafc0b07820682f656)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Adam Blank
ec2689b334 ref-manual/variables.rst: fix the description of KBUILD_DEFCONFIG
Remove some leftover confusing mention of KMACHINE.

(From yocto-docs rev: fd6f21b40b7fb58e7b465bbe97b8308f7a09313d)

Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 582ee9e0b4930aea03255542b3d3913df19af8b0)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Adam Blank
77c866901d kernel-dev/common.rst: fix the in-tree defconfig description
The description of the relation between KBUILD_DEFCONFIG and
SRC_URI is reversed. In fact it is the SRC_URI provided
defconfig which will be dropped by the kernel-yocto class
if both are provided.

(From yocto-docs rev: 3dc8212748d014f0b2cd1bb6777404bafe6d5a58)

Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit a808420655a0976ba08f013f468cf80f379b1d89)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Adrian Freihofer
ea119eaa46 expect: fix native build with GCC 15
This does not work for native builds:
  CFLAGS += "-std=gnu17"
The line from native.bbclass gets priority:
  CFLAGS = "${BUILD_CFLAGS}"

From bitbake-getvar -r expect-native CFLAGS
  ...
  append ...poky/meta/recipes-devtools/expect/expect_5.45.4.bb:44
     "-std=gnu17"
  set ...poky/meta/classes-recipe/native.bbclass:44
     "${BUILD_CFLAGS}"
  ...

(From OE-Core rev: 2696c50af9946f425ccaf7d0e7e0eb3fd87c36bb)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Khem Raj
ddda72f2bd expect: Fix build with GCC 15
Stick to C17 standard as GCC 15 switches to C23

(From OE-Core rev: a1ac756f2f55c4f27a95cb8b1e63ee2db06dd327)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Ross Burton
b95695a302 expect: cleanup do_install
Clean up the do_install append, and remove a long-standing unused
variable that appears to be intending to not install the scripts but
would have never actually done that as the relevant override since 2008
has been task-install.  As we've been installing the scripts, keep
instaling them.

(From OE-Core rev: 10a501b3bfe8f73ce2eb15673900df71e547b54d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Ross Burton
e49d690cf1 expect: don't run aclocal in do_configure
expect has a hand-maintained aclocal.m4 so don't run aclocal, which has the
side effect of not deleting the aclocal.m4 file which pulls in macros.

The build works without this change more through luck and a combination
of behaviours than design.

(From OE-Core rev: 61dbfd66210b090ec8abfbf1f4688e5691299d68)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Ross Burton
357a4beab6 expect: update code for Tcl channel implementation
Tcl 8.4.0 changed the channel implementation, take a patch submitted
upstream to update the code for the new interface and remove the silencing
of the incompatible assignment error which was due to this issue.

(From OE-Core rev: 20cadf7b66f30e8a3b409b4a96eced614ac21013)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:46 -07:00
Adrian Freihofer
c8a81cd75f expect: Revert "expect-native: fix do_compile failure with gcc-14"
In the meantime there is a cleaner fix on the master branch and we also
need to back-port more patches to support gcc-15 as well.

This reverts commit 8bfdb53247 which is
not in the master branch as a preparation for cherry-picking the newer
fixes from there.

(From OE-Core rev: 4ea89ba363228aa5e16412f85644608f4c645d5f)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:45 -07:00
Vijay Anusuri
6a8b1708e0 gstreamer1.0-plugins-bad: Fix CVE-2025-3887
Upstream-Status: Backport from
5463f0e097
& bcaab36098

(From OE-Core rev: 7ef632c2a85e42c16b5509edec822705a236cafb)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:45 -07:00
Yogita Urade
2ce56bd707 tiff: fix CVE-2025-9900
A flaw was found in Libtiff. This vulnerability is a "write-what-where"
condition, triggered when the library processes a specially crafted TIFF
image file.[EOL][EOL]By providing an abnormally large image height value
in the file's metadata, an attacker can trick the library into writing
attacker-controlled color data to an arbitrary memory location. This
memory corruption can be exploited to cause a denial of service (application
crash) or to achieve arbitrary code execution with the permissions of the user.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-9900

Upstream patch:
3e0dcf0ec6

(From OE-Core rev: c1303b8eb4e85a031a175867361876a256bfb763)

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-09 12:16:45 -07:00
Antonin Godard
eae801c832 test-manual/yocto-project-compatible.rst: fix a typo
Fix a typo in yocto-project-compatible.rst.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
(From yocto-docs rev: 6b248c541580eadab663f605ce6310302d7a2dae)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit a84c234acfedfa714419006c743405e2f9acaedc)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Quentin Schulz
e9069b0404 contributor-guide: submit-changes: make "Crediting contributors" part of "Commit your changes"
There's no need to differentiate crediting contributors from committing
your changes, so let's simply make it the last step of "Commit your
changes" section.

This simply indents the text so it's now part of "Commit your changes"
list instead of the main list in the "Implement and commit changes"
section. Because of this reorganisation, the instruction to use "git
commit --amend" to add the contributors is moved to a note, and the
first few sentences are reworded to better match the wording of other
items in the "Commit your changes" list of instructions.

(From yocto-docs rev: 6ba61d7bc3e641b3d4194f2d99a276f3b29f82b8)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit eff4d14e28d323ebfdaeb0c5c805b5f1e2ad153d)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Quentin Schulz
9baa7dfdfd contributor-guide: submit-changes: number instruction list in commit your changes
... so that it's clear that you need to read and follow each and every
instruction in this list.

(From yocto-docs rev: 6dfef402b2785675870d513f4afeed6b7e7a4df1)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit c628a489f081925fabaabb5acac6752251150269)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Quentin Schulz
1b7cb8a80c contributor-guide: submit-changes: reword commit message instructions
This should hopefully make it clearer what is expected from the
contributor.

This follows my understanding of git-commit(1)[1] where the following is
a git commit message:

"""
git commit title

git commit description
"""

I'm putting the "Fixes [YOCTO" line in "body of the commit message" so
it's understood as being different from the git commit description so
that the note admonition allowing us to have an empty commit description
doesn't apply to the "Fixes [YOCTO" line.

[1] https://www.man7.org/linux/man-pages/man1/git-commit.1.html#DISCUSSION

(From yocto-docs rev: f0f9d40a04cba684a476caaa053b6f24ade9fb99)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit b84903a760350bd118c56ea9ce4e98039edf6e55)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Quentin Schulz
afd75083e9 contributor-guide: submit-changes: make the Cc tag follow kernel guidelines
The kernel docs specifies[1] a Cc: tag and not CC: tag, so let's align
with that.

[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

(From yocto-docs rev: 49934860119ccd0844b0c600ea6be0a776b11a12)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit f800fef4e9e2c1d3584ac49be8324638d2923b17)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Quentin Schulz
42ad822f6b contributor-guide: submit-changes: align CC tag description
The other tag descriptions have the double colon outside of the
highlight, and start the sentence with a lowercase word, so let's align
the CC tag with those.

(From yocto-docs rev: 4dba30a040fd64e4e547bc485878b90e691c1373)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit f116e93fb335e9d0f85891c4cb501bcf55b18ccf)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Quentin Schulz
4ae162f572 contributor-guide: submit-changes: clarify example with Yocto bug ID
The example could be understood as the content of the commit message
once the editor (git config core.editor) opens, where the first
line is the actual commit title and not the commit description.

This example would make the Fixes line the commit title, which is not
what we want.

In short, according to my understanding of git-commit(1):

The following is a git commit message:

"""
git commit title

git commit description
"""

Reported-by: Barne Carstensen <barne.carstensen@danfoss.com>
(From yocto-docs rev: 5244b934db878a5bdb73118f1629cf20e391faa7)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit a5862406bf3230befe9db9f2539bbbc86c02015d)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Quentin Schulz
93eb8227dd contributor-guide: submit-changes: fix improper bold string
I don't know what was the initial intent but this doesn't seem right, so
let's remove the bold formatting.

Fixes: 4abe87cb20d3 ("contributor-guide: submit-changes: detail commit and patch creation")
Cc: Michael Opdenacker <michael.opdenacker@rootcommit.com>
(From yocto-docs rev: 80be07404bd8215b198f5fb0936e3786072559b6)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 6c499b3796a578a0fe4c319c9547b4321b0d41df)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Barne Carstensen
b55b77df5f test-manual: update runtime-testing Exporting Tests section
This has changed since commit ed4238487c81 ("testexport: Fix to work as
an image class") in OE-Core.

[Antonin Godard: mention oecore commit in commit body]

(From yocto-docs rev: fd16d625089eab377ad3061f6aa21f94c251deb9)

Signed-off-by: Barne Carstensen <barne.carstensen@danfoss.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 2caa8e581feaf3640bea68108f9a02583b17b21b)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Divya Chellam
619804e1fc vim: upgrade 9.1.1652 -> 9.1.1683
Handles CVE-2025-9389

Changes between 9.1.1652 -> 9.1.1683
====================================
https://github.com/vim/vim/compare/v9.1.1652...v9.1.1683

(From OE-Core rev: 55e0c38dc28b73fa689446e2d5e564d235a24084)

Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Chris Laplante
b079439d07 util-linux: use ${B} instead of ${WORKDIR}/build, to fix building under devtool
This change already exists on master, but it was made as part of the
larger migration to ${UNPACKDIR} and is not cherry-pickable.

See: d73595df696 (recipes: Update WORKDIR references to UNPACKDIR)

(From OE-Core rev: 378f87f087651bacdb6efc6b98168bc6ba865070)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Nitin Wankhade
15078fe63f examples: genl: fix wrong attribute size
This example no longer works on more recent kernels:

genl-family-get
error: Invalid argument

dmesg says:
netlink: 'genl-family-get': attribute type 1 has an invalid length.

Fix this and also zero out the reserved field in the genl header,
while not validated yet for dumps this could change.

Upstream-Status: Backport [https://git.netfilter.org/libmnl/patch/?id=54dea548d796653534645c6e3c8577eaf7d77411]

Reported-by: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in>
(From OE-Core rev: bae5ecea1c40847ffc3760173192f85e28ed9d7b)

Signed-off-by: Florian Westphal <fw@strlen.de>
(cherry picked from commit 54dea548d796653534645c6e3c8577eaf7d77411)
Signed-off-by: Divyanshu Rathore <divyanshu.rathore@bmwtechworks.in>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
AshishKumar Mishra
2a912b5065 p11-kit: backport fix for handle USE_NLS from master
Disable NLS in the build when USE_NLS is off.

(From OE-Core rev: b94798ecd535956ef4565663710ea9a701ff21ed)

This change corresponds to upstream eeb3974472
from master .
Since the p11-kit version are different between master & scarthgap
applied the patch manually

(From OE-Core rev: 96602ea67463170c4cadf748525f5615ce9bbd91)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Philip Lorenz
5ee0ccc856 shared-mime-info: Handle USE_NLS
Skip building of translations when NLS is disabled.

(From OE-Core rev: b58a3f4e9c78522423a94821b7ba7a35eb18f75a)

(From OE-Core rev: 49a9aebc0e9f668cf2896d0b522f8194bb4049ad)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
AshishKumar Mishra
b418221cab systemd: backport fix for handle USE_NLS from master
Do not build translations when NLS is disabled.
(From OE-Core rev: 83795ef6c3fa12a863cd20b7ec1a2607606987b6)

This change corresponds to upstream d848b454e6
from master .
Since the systemd version are different between master & scarthgap
applied the patch manually

(From OE-Core rev: 780b902a0fd124420f00ee5e55f4fd362d2d8913)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Martin Jansa
e753480a05 lib/oe/utils: use multiprocessing from bb
Fixes build with python-3.14

It was added to bitbake in 62be9113d98fccb347c6aa0a10d5c4ee2857f8b6
and oe-core now requires latest bitbake already, so we can use this.

[YOCTO #15858]

(From OE-Core rev: 92369c8acf0b4d6c2ced88abbda5f5defd276ba2)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Reviewed-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Martin Jansa
f82e18eee1 sanity.conf: Update minimum bitbake version to 2.8.1
Needed for multiprocessing module in bb used in the next commit.

It was added to bitbake in 62be9113d98fccb347c6aa0a10d5c4ee2857f8b6
which was backported to 2.8 branch and tagged as 2.8.1

(From OE-Core rev: 95888aa944847cf6dbfac501997a3e2980344b66)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Adrian Freihofer
f19d608f58 llvm: fix build with gcc-15
Pick 3 patches from meta-clang's scartsgap branch to fix build with
gcc-15. These patches are already in upstream llvm but not in
18.1.8 release.

Note: the patch 0039-Fix-build-with-GCC-15.patch from meta-clang
is not needed as it targets lldb which we do not build.

(From OE-Core rev: a2c5e1d6ec6c905bbf31f017a010b0496b39b211)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Adrian Freihofer
8cb12165ed llvm: update from 18.1.6 to 18.1.8
(From OE-Core rev: 3a171fde7d5cb0c2dfb6d1b11f08b061826284c2)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Yogita Urade
4543508143 curl: fix CVE-2025-9086
1, A cookie is set using the secure keyword for https://target
2, curl is redirected to or otherwise made to speak with http://target
(same hostname, but using clear text HTTP) using the same cookie set
3, The same cookie name is set - but with just a slash as path (path="/").
Since this site is not secure, the cookie should just be ignored.
4, A bug in the path comparison logic makes curl read outside a heap buffer boundary

The bug either causes a crash or it potentially makes the comparison come to
the wrong conclusion and lets the clear-text site override the contents of
the secure cookie, contrary to expectations and depending on the memory contents
immediately following the single-byte allocation that holds the path.

The presumed and correct behavior would be to plainly ignore the second set of
the cookie since it was already set as secure on a secure host so overriding
it on an insecure host should not be okay.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-9086

Upstream patch:
https://github.com/curl/curl/commit/c6ae07c6a541e0e96d0040afb6

(From OE-Core rev: b0cc7001a628deaa96d1aebb5ded52797898a0be)

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Ross Burton
829e065196 libxslt: apply patch for CVE-2025-7424
This patch is taken from the upstream bug, and is used by Apple in their
build of WebKit.

(From OE-Core rev: f59e07fd9f6c437e30431607763672fde42511ad)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Anil Dongare <adongare@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-30 08:01:59 -07:00
Haixiao Yan
e3ce89324d buildtools-tarball: fix unbound variable issues under 'set -u'
When Bash runs with 'set -u' (nounset), accessing an unset variable
directly (e.g. [ -z "$SSL_CERT_FILE" ]) causes a fatal "unbound variable"
error. As a result, the fallback logic to set SSL_CERT_FILE/SSL_CERT_DIR
is never triggered and the script aborts.

The current code assumes these variables may be unset or empty, but does
not guard against 'set -u'. This breaks builds in stricter shell
environments or when users explicitly enable 'set -u'.

Fix this by using parameter expansion with a default value, e.g.
"${SSL_CERT_FILE:-}", so that unset variables are treated as empty
strings. This preserves the intended logic (respect host env first, then
CAFILE/CAPATH, then buildtools defaults) and makes the script robust
under 'set -u'.

(From OE-Core rev: 4cf131ebd157b79226533b5a5074691dd0e1a4ab)

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4d880c2eccd534133a2a4e6579d955605c0956ec)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Libo Chen
54578cd039 runqemu: fix special characters bug
Fix the bug in runqemu that happens when the file path contains
the specific words such as 'vmlinux', e.g. /home/frank/vmlinux.

runqemu - ERROR - wic doesn't need kernel

(From OE-Core rev: 0276bd0e8d5cefb6f98d685bc9faa0451780bef9)

Signed-off-by: Libo Chen <libo.chen.cn@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3c186fe7741adecb0887e36c8a9164a58fc16437)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Martin Jansa
d2c6c66c1e license.py: avoid deprecated ast.Str
* it's deprecated since python-3.12 and removed in 3.14 causing:

openembedded-core/meta/lib/oe/license.py', lineno: 176, function: visit
     0172:
     0173:        LicenseVisitor.__init__(self)
     0174:
     0175:    def visit(self, node):
 *** 0176:        if isinstance(node, ast.Str):
     0177:            lic = node.s
     0178:
     0179:            if license_ok(self._canonical_license(self._d, lic),
     0180:                    self._dont_want_licenses) == True:
Exception: AttributeError: module 'ast' has no attribute 'Str'

(From OE-Core rev: df9898f13c261eeac2cc343569c843bc7dcaf163)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Jinfeng Wang
838a12c621 systemtap: Fix task_work_cancel build
Backport a patch to fix:
 107 |         twork = task_work_cancel(task, func);
      |                                        ^~~~
      |                                        |
      |                                        task_work_func_t {aka void (*)(struct callback_head *)}
/work/rad/wrs/wrl-systemtap-demo/qemux86-64-std-23p17/build/tmp-glibc/work/x86_64-linux/systemtap-native/4.8-r0/recipe-sysroot-native/usr/share/systemtap/runtime/stp_task_work.c:107:40: note: expected 'struct callback_head *' but argument is of type 'task_work_func_t' {aka 'void (*)(struct callback_head *)'}
/work/rad/wrs/wrl-systemtap-demo/qemux86-64-std-23p17/build/tmp-glibc/work/x86_64-linux/systemtap-native/4.8-r0/recipe-sysroot-native/usr/share/systemtap/runtime/stp_task_work.c:13:26: error: incompatible types when assigning to type 'struct callback_head *' from type 'bool' {aka '_Bool'}
   13 | #define task_work_cancel (* (task_work_cancel_fn)kallsyms_task_work_cancel)
      |                          ^
/work/rad/wrs/wrl-systemtap-demo/qemux86-64-std-23p17/build/tmp-glibc/work/x86_64-linux/systemtap-native/4.8-r0/recipe-sysroot-native/usr/share/systemtap/runtime/stp_task_work.c:107:17: note: in expansion of macro 'task_work_cancel'
  107 |         twork = task_work_cancel(task, func);
      |                 ^~~~~~~~~~~~~~~~

(From OE-Core rev: 58509b54a464cd5b692ad4ef8dd333eb9c14abfa)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Vijay Anusuri
c0775e4999 cups: Fix for CVE-2025-58060 and CVE-2025-58364
Upstream-Status: Backport from
595d691075
& e58cba9d6f

(From OE-Core rev: 6f3b7e6efdf14d080b74a48d8cdc445255e9025f)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Vijay Anusuri
d4f27582ea cups: upgrade 2.4.10 -> 2.4.11
Removed CVE-2024-47175 patches which is fixed by upgrade
system-cups.slice added to FILES

Changelog
==========

v2.4.11

CUPS 2.4.11 brings several bug fixes regarding IPP response validation, processing PPD values, Web UI support (checkbox support, modifying printers) and others fixes.

Detailed list of changes is available in CHANGES.md

(From OE-Core rev: 117a401756a3cf26d1fc0a6694b0c42967e00fec)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Ross Burton
2eccfb8b45 grub2: fix CVE-2024-56738
Backport an algorithmic change to grub_crypto_memcmp() so that it
completes in constant time and thus isn't susceptible to side-channel
attacks.

(From OE-Core rev: 319210be147ec57518c237cb705857aeda9943e6)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 30a1cc225a2bd5d044bf608d863a67df3f9c03be)
Signed-off-by: Shubham Pushpkar <spushpka@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Divya Chellam
6b93199776 wpa-supplicant: fix CVE-2022-37660
In hostapd 2.10 and earlier, the PKEX code remains active even after a successful
PKEX association. An attacker that successfully bootstrapped public keys with
another entity using PKEX in the past, will be able to subvert a future bootstrapping
by passively observing public keys, re-using the encrypting element Qi and subtracting
it from the captured message M (X = M - Qi). This will result in the public ephemeral
key X; the only element required to subvert the PKEX association.

CVE-2022-37660-0001, CVE-2022-37660-0002, CVE-2022-37660-0003 and  CVE-2022-37660-0004
are dependent commits while CVE-2022-37660-0005 is actual CVE fix.

Reference:
https://security-tracker.debian.org/tracker/CVE-2022-37660

Upstream-patches:
https://git.w1.fi/cgit/hostap/commit/?id=9d3f347a2b14652e767d51142600206a32676b62
https://git.w1.fi/cgit/hostap/commit/?id=80213629981a21825e4688fde1b590e4c4d4bcea
https://git.w1.fi/cgit/hostap/commit/?id=bdcccbc2755dd1a75731496782e02b5435fb9534
https://git.w1.fi/cgit/hostap/commit/?id=d7be749335f2585658cf98c4f0e7d6cd5ac06865
https://git.w1.fi/cgit/hostap/commit/?id=15af83cf1846870873a011ed4d714732f01cd2e4

(From OE-Core rev: 91848ac13ec18f98469f7f8ed68c6153fea31607)

Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 13:17:52 -07:00
Lee Chee Yang
31b2c45764 migration-guides: add release notes for 5.0.12
(From yocto-docs rev: 79b37fe79fee03a46a4d791fd9f50e23d4e24797)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit e77139b5c616e6e5ad436eb91416fd804389425f)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-17 15:36:45 -07:00
Joao Marcos Costa
ef363542ca ref-manual/variables.rst: expand IMAGE_OVERHEAD_FACTOR glossary entry
There's a (second) overhead factor applied in images generated with Wic,
and this is already documented in the .wks reference. However, the
IMAGE_OVERHEAD_FACTOR entry does not mention it, and by looking at the
partition sizes (e.g. with parted) one may find it confusing that they
don't match with the expected rootfs size (e.g. in a scenario where the
extra space is "0" and IMAGE_OVERHEAD_FACTOR="1.0").

This second overhead is already documented, though:
https://docs.yoctoproject.org/ref-manual/kickstart.html#command-part-or-partition

Mention the '--overhead-factor' option in the glossary entry and add a
reference to the wks documentation.

(From yocto-docs rev: 18a0dcefd4e688d60e57e8531b0ac283764e4e89)

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit b9040e20b015e9b02683ec3014e4ade5eb59d41a)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-17 15:36:45 -07:00
Antonin Godard
91a33194a4 dev-manual/security-subjects.rst: update mailing lists
Update mailing lists following changes by Michael Halstead
(https://lists.yoctoproject.org/g/yocto-security/message/1478).

Also fix formatting/spacing.

(From yocto-docs rev: c5c104ea79a42d630e33f4f002aeec0bb9cbb3b3)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 8066aa92a1acae6c99fbee92d24ee1feea65d974)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-17 15:36:45 -07:00
Jan Vermaete
4807896466 sdk: The main in the C example should return an int
see C17 (ISO/IEC 9899:2018)

(From yocto-docs rev: 260b386dd2184f9d32547e08d1ed578c45d86cc9)

Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 1ebaed299f7ef80a49b68608f45bf25884900d13)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-17 15:36:45 -07:00
Lee Chee Yang
3ab5d2556b migration-guides: add release notes for 4.0.29
(From yocto-docs rev: 1c219c46556e59757073f3ca7b94f9ef14d2a8ba)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit d3bbfed9cad4cda0960ee0623c728ea2a18e1b29)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-17 15:36:44 -07:00
Martin Jansa
3bb8b0dd37 bitbake: bitbake: Bump version to 2.8.1
To indicate compatibility with python 3.14

[YOCTO #15858]

(Bitbake rev: 1c9ec1ffde75809de34c10d3ec2b40d84d258cb4)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-17 15:36:44 -07:00
Joshua Watt
f00c4968ff bitbake: Use a "fork" multiprocessing context
Python 3.14 changes the default multiprocessing context from "fork" to
"forkserver"; however bitbake heavily relies on "fork" to efficiently
pass data to the child processes. As such, make "fork" context in the bb
namespace and use it in place of the normal multiprocessing module.

Note that multiprocessing contexts were added in Python 3.4, so this
should be safe to use even before Python 3.14

[YOCTO #15858]

(Bitbake rev: 15d7448e04aa78c827d2cef9eb1a62bd6e0dd119)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-17 15:36:44 -07:00
Kyungjik Min
6400741e0c pulseaudio: Add audio group explicitly
Since pulseaudio-server requires the audio group, we explicitly add it.

When use useradd-staticids or do not use the default group in
base-passwd, an error will occur because the audio group is not defined.

NOTE: pulseaudio: Performing useradd with [--root
TOPDIR/tmp/work/cortexa72-poky-linux/pulseaudio/17.0/recipe-sysroot
--home-dir /var/run/pulse --gid 998 --groups audio,pulse
--no-create-home --system --shell /bin/false --uid 998 pulse]
useradd: group 'audio' does not exist
ERROR: pulseaudio: useradd command did not succeed.

(From OE-Core rev: baa5e7ea5f37f54c2a00080798ad7fb4c0664f69)

Signed-off-by: Kyungjik Min <dpmin7@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-09 09:08:09 -07:00
Deepak Rathore
b078df11eb default-distrovars.inc: Fix CONNECTIVITY_CHECK_URIS redirect issue
The default CONNECTIVITY_CHECK_URIS uses "https://yoctoproject.org/connectivity.html"
which redirect to "https://www.yoctoproject.org/connectivity.html".

Some network configurations with proxies or restricted internet access
don't handle HTTP redirects properly during the sanity check phase,
causing build failures with:

ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:

Fetcher failure for URL: 'https://yoctoproject.org/connectivity.html'. URL doesn't work.

Updated the default URL to use the final destination directly to avoid
redirect-related connectivity check failures.

Also updated SDK test cases in https.py to use the corrected URL for
consistency.

(From OE-Core rev: bd624ebbcf4e6d7a24c4ab232ca2e138b1ac3433)

Signed-off-by: Deepak Rathore <deeratho@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 60cdf960a3560f391babd559737f1afb31fb2c5c)
Signed-off-by: Deepak Rathore <deeratho@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-09 09:08:09 -07:00
Hongxu Jia
5c8ceb35b4 rpm: keep leading `/' from sed operation
For /usr/lib/rpm/macros, Yocto explicitly set OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM
= "ONLY" [1][2] to search tools from CMAKE_FIND_ROOT_PATH [5] which locates in
native recipe sysroot or HOSTTOOLS_DIR. If found in native recipe sysroot or
HOSTTOOLS_DIR, the sed operation removed leading `/'

root@qemux86-64:~# vi /usr/lib/rpm/macros
...
%__xz                   usr/bin/xz
%__make                 usr/bin/make
%__zstd                 usr/bin/zstd
%__quilt                usr/bin/quilt
%__patch                usr/bin/patch
...

root@qemux86-64:~# rpm --eval "%{__xz} %{__make} %{__zstd} %{__quilt} %{__patch}"
usr/bin/xz usr/bin/make usr/bin/zstd usr/bin/quilt usr/bin/patch

This commit keeps leading `/' from sed operation, and similar reason for
/usr/lib/cmake/rpm/rpm-targets.cmake

After applying this commit:
root@qemux86-64:~# rpm --eval "%{__xz} %{__make} %{__zstd} %{__quilt} %{__patch}"
/usr/bin/xz /usr/bin/make /usr/bin/zstd /usr/bin/quilt /usr/bin/patch

[1] https://git.openembedded.org/openembedded-core/commit/?id=f4ea12f6635125ee793f4dd801c538c0186f9dc3
[2] https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.html

(From OE-Core rev: cab720b5508411f9a63025e2765d4d46914a1404)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0d0773879ab9520c475c4a8c930b2e663de0e032)
Signed-off-by: Deepak Rathore <deeratho@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-09 09:08:09 -07:00
Stanislav Vovk
da9006ac51 libpam: fix CVE-2024-10963
Upstream-Status: Backport from 940747f88c

(From OE-Core rev: 2be498fd0872d7ccbf0e9b2eb0a1d4879823c968)

Signed-off-by: Stanislav Vovk <stanislav.vovk@est.tech>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-09 09:08:09 -07:00
Vrushti Dabhi
328b35d7e3 curl: update CVE_STATUS for CVE-2025-5025
This CVE applies only when curl is built with wolfSSL support.
Revised CVE_STATUS description to align with CVE details.

Reference: https://github.com/openembedded/openembedded-core/commit/93ae0758ef35

(From OE-Core rev: fddc4dcc89a9491abdf8f5d0ea4df9a6526b1538)

Signed-off-by: Vrushti Dabhi <vdabhi@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-09 09:08:09 -07:00
Peter Marko
9ce8f26d37 sudo: remove devtool FIXME comment
This comment should not have been merged.
It shows that the license did not change.

(From OE-Core rev: a19afb7db1b9995ce433f8bfeb5406c9fd1fdc19)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:57 -07:00
Jiaying Song
844ad4dc30 ruby-ptest : some ptest fixes
- Skip the test_rm_r_no_permissions test under the root user, as
  deletion always succeeds.
- Filter out tests under the -ext- directory in run-ptest. Due to the
  commit [1],the packaging of .so test files under the .ext directory
  was removed. As a result, adjust the test filtering rules to avoid
  test failures caused by missing files.
- Add installation of rdoc.rb and did_you_mean.rb files in
  do_install_ptest to ensure complete test dependencies.
- Add init.rb file to PTEST installation path.

(From OE-Core rev: fbbfbfd59fe74c6f742af29d32fae1327068b9ff)

Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:57 -07:00
Khem Raj
285b5070bb cpio: Pin to use C17 std
Fixes build with GCC-15 which is defaulting to C23

For scarthgap also add it in BUILD_CFLAGS.

(From OE-Core rev: 874701c4fd96134e18f73eba4bd5c8b513ad251b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Michael Halstead
ebbbada5b8 yocto-uninative: Update to 4.9 for glibc 2.42
(From OE-Core rev: 9f0cc5fe65f71cf1d28b7a34272f29db03dc6778)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Michael Halstead
438c0f8acb yocto-uninative: Update to 4.8 for GCC 15.1
(From OE-Core rev: 02b285fb0258587e9b78ee4b1b4b2eea0e0a4b3e)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
225f4064f3 dbus-glib: fix build with gcc-15
(From OE-Core rev: 6c546567adc84667fc76d777b02fc78e9c472f51)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
41e1323758 binutils: fix build with gcc-15
(From OE-Core rev: f7d791585632b7db5f80090c92b5389eacd60fab)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
cb17b874de elfutils: fix build with gcc-15
(From OE-Core rev: ece06774fd1c261c333f61779579614e0b40b927)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
e2e54e0354 libtirpc: Fix build with gcc-15/C23
Update declarations to allow building with gcc-15 with C23 std
being default now.

Fixes:
error: conflicting types for 'xdr_opaque_auth

(From OE-Core rev: 65036ab0a519c14338fb26ac8162d159d965da2b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
765333686d rust-llvm: fix build with gcc-15
As in meta-clang for clang-native:
f915bbfc71

(From OE-Core rev: 818750db213dc2c0daac4757d078092be6de3fe6)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
52ac1f3309 libgpg-error: fix build with gcc-15
Backport a fix for native build with gcc-15 on host

(From OE-Core rev: cef0a6c3245a2556614f7e009c2e00e1eb16e08e)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
7de6526866 pkgconfig: fix build with gcc-15
* on hosts with gcc-15 or whenever glib PACKAGECONFIG isn't enabled
  and pkgconfig uses own old bundled glib

* fixes:
  http://errors.yoctoproject.org/Errors/Details/853015/
../../../git/glib/glib/goption.c:169:14: error: two or more data types in declaration specifiers
  169 |     gboolean bool;
      |              ^~~~
../../../git/glib/glib/goption.c:169:18: warning: declaration does not declare anything
  169 |     gboolean bool;
      |                  ^

(From OE-Core rev: 948e0170d83949e2d5a676afb81edc44f07c5ba4)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
6b639e1975 unifdef: Don't use C23 constexpr keyword
Fixes build with GCC-15

(From OE-Core rev: 3085783dd5585a85a3853858215689c362429c64)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
2a0bd475e8 gdbm: Use C11 standard
GCC15 is switching defaults to C23 and gdbm is not yet ready to
compile using C23 std.

For scarthgap also add it in BUILD_CFLAGS.

(From OE-Core rev: 97989d81c5e30434594beadd9449e907e98d3ceb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
0fdc4f72f5 gmp: Fix build with older gcc versions
The fix to make this work with GCC15/C23 caused problems with older gcc versions.
Add a fix for that.

(From OE-Core rev: 237085506a454fb927389d681f30c8c995bc7b2b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
f06f09415b gmp: Fix build with GCC15/C23
(From OE-Core rev: 5114bea0e9fe3cc15cb4f4d264a932d5b9897296)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
9bea9b7394 m4: Stick to C17 standard
GCC15 imposes C23 by default and 1.4.19 release has gnulib version which
can not be compiled without errors, while new release of m4 is in progress
we might use C17 until then and use GCC15 to compile it

For scarthgap also add it in BUILD_CFLAGS.

(From OE-Core rev: 94ec72b332dce71a2756560ddf738f864e3c853d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
b63fff4544 unzip: Fix build with GCC-15
Add a patch to remove redundant declarations

(From OE-Core rev: b84d6ceb89277462d7069defaeb9ecfed9c30d56)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
38b5ba89e6 git: fix build with gcc-15 on host
(From OE-Core rev: a534cf958f9c7d05af795def43ee5ba09fb34ca2)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Martin Jansa
c345127b52 cmake: fix build with gcc-15 on host
(From OE-Core rev: bdfccaa382c1669bff8788e09953c3a770243fab)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Peter Marko
96cf0503ed vim: upgrade 9.1.1198 -> 9.1.1652
Handles CVE-2025-53905, CVE-2025-53906, CVE-2025-55157, CVE-2025-55158.

Changes between 9.1.1198 -> 9.1.1652
====================================
https://github.com/vim/vim/compare/v9.1.1198...v9.1.1652

Refresh patches.

Disable newly introduced wayland support (in patch version 1485).
To this belongs also adding recursion in delete command for dir auto
which was newly failing as there is wayland directory inside now.
If someone is interested, this can be probably enabled, but without
additional work it results in compilation error due to function
redefinition conflicts.

(From OE-Core rev: e87d427d928234ef0441f9ce1fe8631fbe471094)

(From OE-Core rev: 052fd7e55d2c73f13f63267fbfb5e39fa504baa3)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Peter Marko
5368900445 libarchive: patch regression of patch for CVE-2025-5918
Picked commit per [1].

[1] https://security-tracker.debian.org/tracker/CVE-2025-5918

(From OE-Core rev: d2b8d2f7d579779a9effcff677960dbc576b1cc8)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Peter Marko
bf7f8a0202 dpkg: patch CVE-2025-6297
Pick commit per [1] from 1.22.x branch.

[1] https://nvd.nist.gov/vuln/detail/CVE-2025-6297

(From OE-Core rev: 859e5a47744a91b40d5d12c46ff4d8657ef5cf6e)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Peter Marko
3270b1284e glib-2.0: patch CVE-2025-6052
Pick commit per [1].
Also pick commits from [2] which is referencing this CVE as the original
fix was not complete.

[1] https://security-tracker.debian.org/tracker/CVE-2025-6052
[2] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4681

(From OE-Core rev: 8e85effc1a79e78f34b0b17341dd223bb80b25e4)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Peter Marko
3a75849ff5 glib-2.0: patch CVE-2025-7039
Pick commit per [1].

[1] https://security-tracker.debian.org/tracker/CVE-2025-7039

(From OE-Core rev: 36402f219bc6fc03970e5277d449f2717199cf44)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Peter Marko
3f6144ca20 go-binary-native: ignore CVE-2025-0913
This was already done for all other go recipes.

(From OE-Core rev: 63dfdbf774dc24ea4e736a6d13d6aa8c72ebee4d)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Peter Marko
0ecde9a2a2 qemu: set status of CVE-2024-7730 to fixed
This was backported to v8.2.7 and also it is mentioned in commit
upgrading qemu in oe-core.

(From OE-Core rev: d05df779286288d1f8b69159ebcfc45a853bd23b)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Khem Raj
8ade657e16 ncurses: Pin to C17 standard
Newer snapshots of ncurses have the fixes but they are many needed to get
C23 going. Until next release lets stick with C17 even while GCC 15 switches
to C23 defaults.

For scarthgap also add it in BUILD_CFLAGS.

(From OE-Core rev: 2ee706f58a96f30904ac3d292c0ac532739c91ea)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Praveen Kumar
766dfe5115 go: fix CVE-2025-47907
Cancelling a query (e.g. by cancelling the context passed to one of
the query methods) during a call to the Scan method of the returned
Rows can result in unexpected results if other queries are being made
in parallel. This can result in a race condition that may overwrite
the expected results with those of another query, causing the call to
Scan to return either unexpected results from the other query or an
error.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-47907

Upstream-patch:
8a924caaf3

(From OE-Core rev: 22d8ac9884208b8f9b2a69ec6a257c62e1f2f8d2)

Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Archana Polampalli
f584b357c3 ffmpeg: fix CVE-2025-1594
A vulnerability, which was classified as critical, was found in FFmpeg up to 7.1.
This affects the function ff_aac_search_for_tns of the file libavcodec/aacenc_tns.c
of the component AAC Encoder. The manipulation leads to stack-based buffer overflow.
It is possible to initiate the attack remotely. The exploit has been disclosed to the
public and may be used.

(From OE-Core rev: c9a15206bae7f1e85dc3b8812eabb936a7e6d383)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Archana Polampalli
c1b0ad70b4 ffmpeg: upgrade 6.1.2 -> 6.1.3
Fixes:
CVE-2023-6604
CVE-2023-6602
CVE-2025-7700

Changelog:
https://github.com/FFmpeg/FFmpeg/blob/n6.1.3/Changelog

Removed the CVE patches which are already fixed with this upgrade

ref:
c104119c6b
7d79d0a43b
a4b6e37ad5
efedc1d1b6
dcf34f13f5
bed04417b4
b43a12363c
e2b20632b8
43f64690ad

(From OE-Core rev: 901304a22413030b9744006ae18b587146b71953)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Hitendra Prajapati
35cae2014a gstreamer1.0-plugins-base: fix CVE-2025-47807
Upstream-Status: Backport from 9e2238adc1

(From OE-Core rev: 19eca5d7373667dbacd02a2c1dd8c9de8101cd34)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Archana Polampalli
b4135ab254 go: fix CVE-2025-4674
The go command may execute unexpected commands when operating in untrusted VCS repositories.
This occurs when possibly dangerous VCS configuration is present in repositories.
This can happen when a repository was fetched via one VCS (e.g. Git), but contains metadata
for another VCS (e.g. Mercurial). Modules which are retrieved using the go command line,
i.e. via "go get", are not affected.

(From OE-Core rev: efdc4920571677c9051d4402eaa801672eeb24e3)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Steve Sakoman
ec220ae083 build-appliance-image: Update to scarthgap head revision
(From OE-Core rev: 93c7489d843a0e46fe4fc685b356d0ae885300d7)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 06:04:30 -07:00
Steve Sakoman
1df3fcb4a5 poky.conf: bump version for 5.0.12
(From meta-yocto rev: 82602cda1a89644d1acbe230a81c93e3fb5031c8)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 06:01:57 -07:00
Martin Jansa
93c7e11457 bash: use -std=gnu17 also for native CFLAGS
* fixes builds on host with gcc-15:
  http://errors.yoctoproject.org/Errors/Details/853016/

../../bash-5.2.37/builtins/mkbuiltins.c:268:29: error: too many arguments to function ‘xmalloc’; expected 0, have 1
  268 |           error_directory = xmalloc (2 + strlen (argv[arg_index]));
      |                             ^~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(From OE-Core rev: 55c144bd17665f70cd15e36f3405f502a962f039)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:55 -07:00
Khem Raj
fb9746b787 bash: Stick to C17 std
GCC 15 defaults to C23 and bash is not yet ready for that
so keep using C17 like GCC 14 for now

(From OE-Core rev: adf63fe5f76cbd0fd93ce5fa23229a388211e992)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:55 -07:00
Martin Jansa
dcfcbb21c2 cairo: fix build with gcc-15 on host
* backports from 1.18.2 used since:
  https://git.openembedded.org/openembedded-core/commit/?id=070d79c8adec7e0a8862019cf61910a59b18613a

* fixes build on hosts with gcc-15 (e.g. ubuntu-25.10)

../cairo-1.18.0/test/pdiff/pdiff.h:22:13: error: ‘bool’ cannot be defined via ‘typedef’
   22 | typedef int bool;
      |             ^~~~
../cairo-1.18.0/test/pdiff/pdiff.h:22:13: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
../cairo-1.18.0/test/pdiff/pdiff.h:22:1: warning: useless type name in empty declaration
   22 | typedef int bool;
      | ^~~~~~~

(From OE-Core rev: 6bd49cba1d7e12a6d8a4521a2097ff9f5ddc6368)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:55 -07:00
Khem Raj
f1647fba72 parted: Fix build with GCC 15
(From OE-Core rev: 67c47f0ed5ba852930e0815691ee7ec06dec1d0e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:55 -07:00
Khem Raj
19dd05ccc9 e2fsprogs: Fix build failure with gcc 15
Backport a needed fix

(From OE-Core rev: f5a7d9aa471e05d7cdb3127eaec3dba1b15bf72d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:55 -07:00
Daniel Turull
3318b5eb4d libxml2: ignore CVE-2025-8732
The code maintainer disputes the CVE as the issue can only be triggered with
untrusted SGML catalogs and it makes absolutely no sense to use untrusted
catalogs.

The issue triggers a crash if an invalid file is provided.
Source: https://gitlab.gnome.org/GNOME/libxml2/-/issues/958"

(From OE-Core rev: 348ce728af1cea4f909de5c3597801b5612719e4)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:55 -07:00
Peter Marko
9c4fe6dac5 glib-2.0: ignore CVE-2025-4056
NVD report [1] says:
A flaw was found in GLib. A denial of service on **Windows platforms**
may occur if an application attempts to spawn a program using long
command lines.

The fix [3] (linked from [2]) also changes only files
glib/gspawn-win32-helper.c
glib/gspawn-win32.c

[1] https://nvd.nist.gov/vuln/detail/CVE-2025-4056
[2] https://gitlab.gnome.org/GNOME/glib/-/issues/3668
[3] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4570

(From OE-Core rev: 5858567a9222d9fff6f0a282cf7c7bda4e19af57)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:55 -07:00
Daniel Turull
819f151bed xz: ignore CVE-2024-47611
According to the NVD entry, it is only applicable when built
for native Windows (MinGW-w64 or MSVC).

(From OE-Core rev: 04ce4704e603cd66f30ffc001541c6497d84050e)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:54 -07:00
Peter Marko
40999c1bbd dropbear: patch CVE-2025-47203
Based on Debian patch for this CVE, pick the same commits as mentioned
in kirkstone for this CVE except those already included in 2022.83.

7f48e75892

(From OE-Core rev: 6d287785611c344aa0c97048c3bfc280b1787ff5)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:54 -07:00
Philip Lorenz
00ade479ef cve-check: Add missing call to exit_if_errors
check_cves may raise the cve_status_not_in_db QA check. Call
exit_if_errors to make sure that the task is marked as failed when the
check is categorized as an error.

cve_status_not_in_db was in the meantime dropped in OE-Core
452e605b55ad61c08f4af7089a5a9c576ca28f7d so this change is only required
on scarthgap.

(From OE-Core rev: b3d12589c26f4e86b153bbdcda774985e4e046bd)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-22 05:59:54 -07:00
Antonin Godard
4d2729b88c ref-manual/classes.rst: document the testexport class
This class has been in OE-Core for a while but never documented in the
reference manual. Add some description for it and link to the existing
documentation on it.

(From yocto-docs rev: dd665216fa578a1f2f268790d708c6a5d2912ecf)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 362a331255525fc853dab3af4ec905c417fabb0b)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Antonin Godard
c030f0e492 ref-manual/variables.rst: document SPL_DTB_BINARY
This variable is part of uboot-sign but not documented.

(From yocto-docs rev: 999e81f17bf60e187e709368ede3965df19bee59)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 05eb461cb1da76ad9cbaf634da7f47447b3f6765)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Antonin Godard
729f2a3d19 ref-manual/variables.rst: document the FIT_CONF_PREFIX variable
Added by commit 7892ee3dc37d ("kernel-fitimage: allow overriding FIT
configuration prefix") in OE-Core, but never documented.

(From yocto-docs rev: 47a0181cc471667d78f7810aa1ef55027a761a82)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 860891492b96eb127af5e7bab6348fca12167c68)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Erik Lindsten
1a02f43617 overview-manual/yp-intro.rst: fix broken link to article
(From yocto-docs rev: 1f7bad17b9457c9e74273bceb962c53eb60fdfe3)

Signed-off-by: Erik Lindsten <erik@awto.se>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit b9680ad83ad3fc5e2b87594f7c62c057134d198b)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Antonin Godard
0a71bd589c ref-manual/system-requirements.rst: update supported distributions
Update the distributions to match the list of workers on the
Autobuilder. This list was generated with the help of
yocto-autobuilder-helper/scripts/yocto-supported-distros.

Also:

- Sort the lists alphabetically.
- Decrease spacing between entries for readability.

(From yocto-docs rev: e99a9283e30ae2b844018d1ffb88560ab6877ab7)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Quentin Schulz
61545ac190 go-helloworld: fix license
The example repo doesn't seem to have ever been under MIT to begin with
but rather Apache-2.0. It was then changed to the license used by the
goland projectm that is BSD-3-Clause, 2 years ago in commit 00c7068f9d83
("all: update to Go license").

The license file exists in the sources, so use that one instead of
taking it from the OE-Core license directory.

License-Update: Incorrect license is now proper

(From OE-Core rev: fa45d6d5bec8fe503ff6b9166a3b4af31ea95369)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Nikhil R
95bbe19b02 cmake: Add PACKAGECONFIG option for debugger support
Starting from CMake version 2.27 support for interactive debugging of CMake
scripts and configurations was added. However, by default the `nativesdk-cmake`
is compiled with debugger support turned off.

This change adds debugger support for cmake

(From OE-Core rev: 8acfca456c3502f0d097ba01a2d08f83fb75ab60)

(From OE-Core rev: 776846eb8aa2f5f8c1ec8842cdbaff6b6bcdfa65)

Signed-off-by: Nikhil R <nikhilr5@kpit.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Martin Jansa
83fac1162d libpam: re-add missing libgen include
It was added by original commit for CVE-2025-6020-01.patch
475bd60c55 (diff-05f443e6acbe32a148a45648148739bf6f02f13acc5c20c6037bf933223d4d77)
but removed here in the rebase, causing:

../../../Linux-PAM-1.5.3/modules/pam_namespace/pam_namespace.c:326:11: error: call to undeclared function 'dirname'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  326 |         parent = dirname(buf);
      |                  ^
../../../Linux-PAM-1.5.3/modules/pam_namespace/pam_namespace.c:326:9: error: incompatible integer to pointer conversion assigning to 'char*' from 'int' [-Wint-conversion]
  326 |         parent = dirname(buf);
      |                ^ ~~~~~~~~~~~~

(From OE-Core rev: 6d88a28ac7b6ff61808eb46e5c85dabd17c77f2e)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Hitendra Prajapati
eb487bba3e gstreamer1.0-plugins-good: fix multiple CVEs
* CVE-2025-47183 - Upstream-Status: Backport from c4d0f4bbd9 && d76cae74da
* CVE-2025-47219 - Upstream-Status: Backport from b808039433

(From OE-Core rev: 3e82483c777d0a59a9d93e7c41f8fe88a9d75b22)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Hitendra Prajapati
1db6ffa609 gstreamer1.0-plugins-base: fix CVE-2025-47806
Upstream-Status: Backport from da4380c4df

(From OE-Core rev: fbe8dd2aa6160530b84d3a174f3f8fc14f9fbab5)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Hitendra Prajapati
ba10ae532a gstreamer1.0-plugins-base: fix CVE-2025-47808
Upstream-Status: Backport from 6b19f11751

(From OE-Core rev: 2611a16cad53d2bf0cda2946678e7d31e3ffa007)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Peter Marko
2cc9a0249b go: ignore CVE-2025-0913
This is problem on Windows platform only.

Per NVD report [1], CPE has "and" clause
Running on/with
 cpe:2.3microsoft:windows:-:*:*:*:*:*:*:*

Also linked patch [2] changes Windows files only (and tests).

[1] https://nvd.nist.gov/vuln/detail/CVE-2025-0913
[2] https://go-review.googlesource.com/c/go/+/672396

(From OE-Core rev: ec1c6ab989b298773e8df8a6a4532f88b93617ff)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Peter Marko
6d83b872af python3: patch CVE-2025-8194
Pick commit from 3.12 branch mentioned in NVD report.
https://nvd.nist.gov/vuln/detail/CVE-2025-8194

(From OE-Core rev: 34f1b4877a0601d2057453c159c76a54754f229a)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Zhang Peng
0263c3dfa4 avahi: fix CVE-2024-52615
CVE-2024-52615:
A flaw was found in Avahi-daemon, which relies on fixed source ports for wide-area
DNS queries. This issue simplifies attacks where malicious DNS responses are injected.

Reference:
[https://nvd.nist.gov/vuln/detail/CVE-2024-52615]
[https://github.com/avahi/avahi/security/advisories/GHSA-x6vp-f33h-h32g]

Upstream patches:
[4e2e1ea090]

(From OE-Core rev: ec22ec26b3f40ed5e0d84d60c29d8c315cf72e23)

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-20 07:37:19 -07:00
Robert P. J. Day
6f7e929ea6 variables.rst: remove references to obsolete tar packaging
The tar packaging format was removed some time ago. Also, add some
minor grammatical tweaking.

(From yocto-docs rev: 0c154c1f431be918c4c9ce3047c12099925a9c53)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 8e9fd1ca232f3c1e8be51cb881a68b4745ee548a)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:07 -07:00
Marco Cavallini
1fd82d514f dev-manual/start.rst: added missing command in Optimize your VHDX file using DiskPart
After compact vsdisk you have to detach it before exiting
  otherwise the vdisk remains attached.

  DISKPART> select vdisk file="<path_to_VHDX_file>"
  DISKPART> attach vdisk readonly
  DISKPART> compact vdisk
  DISKPART> detach     <------------ new missing command
  DISKPART> exit

(From yocto-docs rev: a1dc91850e0353866dc9b461fce8c08724e49dae)

Signed-off-by: Marco Cavallini <m.cavallini@koansoftware.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit 1cc65ddf1a074f61fe5a63d222f3079b7fcb4c1e)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:07 -07:00
Lee Chee Yang
7d110f9a94 migration-guides: add release notes for 5.0.11
(From yocto-docs rev: 736b0b06d8fb48cbf72386464df919745bcce90e)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit b5f6113cd95107132aac74b8f0e6e4895b7b0e90)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:07 -07:00
Fabio Berton
c82f7a0577 linux-libc-headers: Fix invalid conversion in cn_proc.h
Backport 'connector: Fix invalid conversion in cn_proc.h' commit to fix
error:
/
|/usr/include/linux/cn_proc.h: In function 'proc_cn_event
| valid_event(proc_cn_event)':
|/usr/include/linux/cn_proc.h:72:17: error: invalid conversion from
| 'unsigned int' to 'proc_cn_event' [-fpermissive]
|   72 |         ev_type &= PROC_EVENT_ALL;
|      |                 ^
|      |                 |
|      |                 unsigned int
\

Change is already merged in kernel branch linux-6.6.y [1].

1 - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=06e785aeb9ea8a43d0a3967c1ba6e69d758e82d4

(From OE-Core rev: f023779af6c0e5c838bdacbd6d9765d1c6740575)

Signed-off-by: Fabio Berton <fbberton@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:07 -07:00
Aleksandar Nikolic
f6b4415273 scripts/install-buildtools: Update to 5.0.11
Update to the 5.0.11 release of the 5.0 series for buildtools

(From OE-Core rev: 3b3a672ae6c024096cc263a669b1131e3f653b79)

Signed-off-by: Aleksandar Nikolic <aleksandar.nikolic@zeiss.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:07 -07:00
Peter Marko
d9b992de0d glibc: fix CVE-2025-8058
This is a single commit bump containing only CVE fix
$ git log --oneline cff1042cceec3502269947e96cf7023451af22f3..b027d5b145f1b2908f370bdb96dfe40180d0fcb6
b027d5b145 posix: Fix double-free after allocation failure in regcomp (bug 33185)

Test results didn't change except newly added test succeeding.
(tst-regcomp-bracket-free)

(From OE-Core rev: c2b63f171719e2b1c12ba049cbe776adf9e0244b)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:07 -07:00
Peter Marko
2156b7931e libxml2: patch CVE-2025-6170
Pick commit referencing this CVE from 2.13 branch.

(From OE-Core rev: 061610dfca8a72b71e1baca3ad4aa2c9fb64449b)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:07 -07:00
Peter Marko
664f26b3f0 ncurses: patch CVE-2025-6141
Pick relevant part of snapshot commit 20250329, see [1].

That has:
add a buffer-limit check in postprocess_termcap (report/testcase by
Yifan Zhang).

[1] https://invisible-island.net/ncurses/NEWS.html#index-t20250329

(From OE-Core rev: 79b080eb93918431c97edbbc80de5f70a2b09a4a)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Peter Marko
114eddfaef gnutls: patch CVE-2025-6395
Pick relevant commit from 3.8.10 release MR [1].

[1] https://gitlab.com/gnutls/gnutls/-/merge_requests/1979

(From OE-Core rev: 14fbbdc51f7d02bc10b8078c0ba1de17f1563d73)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Peter Marko
f569a0f2d9 gnutls: patch CVE-2025-32990
Pick relevant commit from 3.8.10 release MR [1].

[1] https://gitlab.com/gnutls/gnutls/-/merge_requests/1979

(From OE-Core rev: 823cdb5574c15a595dfeab413421304007899aa2)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Peter Marko
f5aab38227 gnutls: patch CVE-2025-32988
Pick relevant commit from 3.8.10 release MR [1].

[1] https://gitlab.com/gnutls/gnutls/-/merge_requests/1979

(From OE-Core rev: 2838dae57a1236d4f6eb97e32eb500892ba67184)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Peter Marko
bee76dfe7e gnutls: patch reject zero-length version in certificate request
Pick relevant commit from 3.8.10 release MR [1].
The MR contains referece to undiscoled issue, so any security relevant
patch should be picked.

Binary test file was added as separate file as binary diffs are not
supported.

[1] https://gitlab.com/gnutls/gnutls/-/merge_requests/1979

(From OE-Core rev: d1aaef9bbaa240c83cc7d485b55570449203da0b)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Peter Marko
5de981dd1c gnutls: patch read buffer overrun in the "pre_shared_key" extension
Pick relevant commit from 3.8.10 release MR [1].
The ME contains referece to undiscoled issue, so any security relevant
patch should be picked.

Binary test file was added as separate file as binary diffs are not
supported.

[1] https://gitlab.com/gnutls/gnutls/-/merge_requests/1979

(From OE-Core rev: 8f825e7f4ca36d7ac62062e452cea256f3c058aa)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Peter Marko
e9a35f720c gnutls: patch CVE-2025-32989
Pick relevant commit from 3.8.10 release MR [1].

Binary test file was added as separate file as binary diffs are not
supported.

[1] https://gitlab.com/gnutls/gnutls/-/merge_requests/1979

(From OE-Core rev: 9d9ce14e2edceb211c3193cef88715d9c67fd3e0)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Richard Purdie
511d3e23f5 bitbake: utils: Optimise signal/sigmask performance
Running "time bitbake -pP idle" with a valid cache shows around 800,000
calls to enum creation from python's signal.py. We don't care about this
overhead and it adversely affects cache load time quite badly.

Try and use _signal directly, falling back to signal, which avoids
this overhead we don't need and makes cache loading much faster.

(Bitbake rev: 982645110a19ebb94d519926a4e14c8a2a205cfd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ee5fce67ce35b025c68aa61e2e758903269ee346)
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Mark Hatle
bfb799ef2a bitbake: bitbake: runqueue: Verify mcdepends are valid
In order to avoid a potentially confusing backtrace, check that the mcdepend
is valid when we add it.

Add a test case to ensure invalid configurations are caught and trigger an
error.

[RP: Reworked test case to simplify and improve code]
(Bitbake rev: 9f6f049870e0ec829e171fe91ec8f7a092ddd2ab)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-04 07:55:06 -07:00
Jinfeng Wang
e711b2f39a mtools: upgrade 4.0.48 -> 4.0.49
New version includes check for overlong file names, see [1].

[1] https://lists.gnu.org/archive/html/info-mtools/2025-06/msg00005.html

(From OE-Core rev: c374e6cfcdd2c8ba17d82ffcfdeb97d21144e2bf)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>

(From OE-Core rev: 044c2bceefcc12262cb2421e8f1da5f6c2ed9f72)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Wang Mingyu
f578ce2a73 mtools: upgrade 4.0.47 -> 4.0.48
clang_UNUSED.patch
disable-hardcoded-configs.patch
refreshed for 4.0.48

(From OE-Core rev: d2c56de7c9d403c3432213bc20e04c2ed5f1db16)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(From OE-Core rev: 1d5aee7e67cd614073a15b47b832375428865260)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Richard Purdie
057c86df84 mtools: upgrade 4.0.46 -> 4.0.47
(From OE-Core rev: cf705382534d8f5af6880511221f701a733d84d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(From OE-Core rev: 14ef270cc003646e6ca97ff3405507f2b9e92736)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Wang Mingyu
8721aab7af mtools: upgrade 4.0.45 -> 4.0.46
clang_UNUSED.patch
mtools-makeinfo.patch
refreshed for 4.0.46

Changelog:
=============
- iconv buffer overflow fixes
- removed references to mread and mwrite (obsolete subcommands
from mcopy)
- documented mdoctorfat, and addressed 2 bugs/oversights
- removed references to obsolete mread and mwrite
- portability fixes (dietlibc and MacOS X) & simplification

(From OE-Core rev: daab05bc863611c83223a383dd83ff2134cae6f8)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(From OE-Core rev: f5a5b2372669d8be4ae3f19ed6892264ea3999d0)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Wang Mingyu
8b8f23e650 mtools: upgrade 4.0.44 -> 4.0.45
Changelog:
============
- Fixed iconv descriptor leak
- Fixed size of error message buffer

(From OE-Core rev: 77340d2bb1f31e305394df5d589fc0d3a0c5cd9a)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(From OE-Core rev: cc1975888ffdc58655e80d3d14450cf68ee0f719)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Alexander Kanavin
93663dc300 mtools: upgrade 4.0.43 -> 4.0.44
(From OE-Core rev: b09b06ed6351685e5351f8bf80a88d2f42093ca4)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(From OE-Core rev: dd8c333576d7ebb8abab3a62b3451439519a0caa)

Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Vijay Anusuri
0bc339e2fc xserver-xorg: upgrade 21.1.6 -> 21.1.18
xorg-server 21.1.17
This release contains the fixes for the issues reported in today's security
advisory: https://lists.x.org/archives/xorg/2025-June/062055.html

   * CVE-2025-49175
   * CVE-2025-49176
   * CVE-2025-49177
   * CVE-2025-49178
   * CVE-2025-49179
   * CVE-2025-49180

Additionally, this release includes a fix for CVE-2022-49737 which was
issued after the fix was merged back in 2022 and several other various fixes.

Ref: https://lists.x.org/archives/xorg-announce/2025-June/003609.html

xorg-server 21.1.18
This release contains an additional fix for CVE-2025-49176 from June 17
security advisory: https://lists.x.org/archives/xorg/2025-June/062055.html

Ref: https://lists.x.org/archives/xorg-announce/2025-June/003612.html

(From OE-Core rev: 2ab7c45631f78ac8f6d19889fa8526d062329992)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a59b385184fb3a548dc27310fd04d64351d8dfba)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Deepesh Varatharajan
3327031e2b glibc: stable 2.39 branch updates
$ git log --oneline 06a70769fd0b2e1f2a3085ad50ab620282bd77b3..cff1042cceec3502269947e96cf7023451af22f3
cff1042cce Fix error reporting (false negatives) in SGID tests
1924d341c0 support: Pick group in support_capture_subprogram_self_sgid if UID == 0

Testing Results:
             Before   After    Diff
PASS          5074     5082     +8
XPASS         4        4         0
FAIL          121      116      -5
XFAIL         16       16        0
UNSUPPORTED   157      154      -3

cff1042cce Fix error reporting (false negatives) in SGID tests
Improved SGID test handling by unifying error reporting and using secure temporary directories.
Replaced non-standard exit codes and fixed premature exits to avoid masking failures.
These changes reduced false negatives, increasing overall test pass rates

UNSUPPORTED tests changes
-UNSUPPORTED: stdlib/tst-secure-getenv
-UNSUPPORTED: elf/tst-env-setuid-static
-UNSUPPORTED: elf/tst-env-setuid-tunables

FAILed tests changes
-FAIL: malloc/tst-aligned-alloc-random-thread-cross-malloc-check
-FAIL: malloc/tst-aligned-alloc-random-thread-malloc-check
-FAIL: malloc/tst-dynarray
-FAIL: malloc/tst-dynarray-mem
-FAIL: resolv/tst-resolv-aliases

PASSed tests changes
+PASS: stdlib/tst-secure-getenv
+PASS: elf/tst-env-setuid-static
+PASS: elf/tst-env-setuid-tunables
+PASS: malloc/tst-aligned-alloc-random-thread-cross-malloc-check
+PASS: malloc/tst-aligned-alloc-random-thread-malloc-check
+PASS: malloc/tst-dynarray
+PASS: malloc/tst-dynarray-mem
+PASS: resolv/tst-resolv-aliases

(From OE-Core rev: c40b9c33061c4019ed7790ccb799bb3491998b3d)

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:53 -07:00
Hitendra Prajapati
cf89d7b3bf libpam: fix CVE-2025-6020
Upstream-Status: Backport from 475bd60c55 && 592d84e126 && 976c200793

(From OE-Core rev: dd5bbac75b1d8f7ebd83d5c9945bd860e397ba07)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Peter Marko
99f48be958 openssl: patch CVE-2025-27587
Pick commits for Minerva fix between 3.2.4 and 3.2.5 release.

Update to 3.2.5 is blocked due to problem with python ptest errors, so
use patch instead of upgrade for now.

(From OE-Core rev: 57c04a32997c1b045121aff045f3ffaa7bb0b5f5)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Peter Marko
ed5a1a7443 openssl: CVE-2024-41996
As discussed in [1], this commit fixes CVE-2024-41996.
Although openssl project does not consider this a vulnerability, it got
CVE number assigned so it deserves attention.

[1] https://github.com/openssl/openssl/pull/25088

(From OE-Core rev: cb49b9e49b4561ccea4c231cac591af557b9749c)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Peter Marko
5f469434d3 orc: set CVE_PRODUCT
There are new CVEs reported for this recipe which are not for this
componene, but for a component with same name from apache.

sqlite> select vendor, product, id, count(*) from products where product like 'orc' group by vendor, product, id;
apache|orc|CVE-2018-8015|1
apache|orc|CVE-2025-47436|4
gstreamer|orc|CVE-2024-40897|1

(From OE-Core rev: f5e320c0ea57ce1813ed09da703fe2b33f4976e6)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Roland Kovacs
d5613f0d2e sqlite3: fix CVE-2025-6965
There exists a vulnerability in SQLite versions before 3.50.2 where the
number of aggregate terms could exceed the number of columns available.
This could lead to a memory corruption issue.

(From OE-Core rev: 52499a5ea3b4ba145914aca873844ab718953289)

Signed-off-by: Roland Kovacs <roland.kovacs@est.tech>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Deepesh Varatharajan
76f88baf01 binutils: Fix CVE-2025-7545
objcopy: Don't extend the output section size
Since the output section contents are copied from the input, don't
extend the output section size beyond the input section size.

Backport a patch from upstream to fix CVE-2025-7545
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944]

(From OE-Core rev: 128e40c39d8eafdd32fea71b902b38801afec202)

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Yash Shinde
b162dfb492 binutils: Fix CVE-2025-7546
Report corrupted group section instead of trying to recover.

CVE: CVE-2025-7546
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41461010eb7c79fee7a9d5f6209accdaac66cc6b]
PR  33050 [https://sourceware.org/bugzilla/show_bug.cgi?id=33050]

(From OE-Core rev: 3a54f11b9462905e103e13161a77ef681f14dc92)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Roland Kovacs
6269788fef libxml2: fix CVE-2025-49795
A NULL pointer dereference vulnerability was found in libxml2 when processing
XPath XML expressions. This flaw allows an attacker to craft a malicious XML
input to libxml2, leading to a denial of service.

(From OE-Core rev: b144c3ef3ba1797d925ea44d9450a6ec0fe32047)

Signed-off-by: Roland Kovacs <roland.kovacs@est.tech>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Richard Purdie
0efe19beef bitbake: test/fetch: Switch u-boot based test to use our own mirror
The upstream servers are having issues so switch to our own shadow copy
of the repo.

(Bitbake rev: 86e7a58c0e9904c33b1b94dddc3d683c2da22d1a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-29 07:59:52 -07:00
Joe Slater
792d18b4cb oe-debuginfod: add option for data storage
Storing the data files under $HOME can be unreliable if debuginfod
is used for several projects, especially if $HOME is shared
between machines.  We provide an option to save files under the
project directory.  The default behavior is unchanged.

(From OE-Core rev: e1e0cf82f559077e2a51447baf137086202c0c4a)

(From OE-Core rev: 24c0ab18045920bb5c1e965c0ea6d176fd6de234)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:22 -07:00
Michal Seben
15a4d0cfb1 timedated: wait for jobs before SetNTP response
Backport a fix to address the dbus SetNTP response timing issue.
Fix is already available since systemd v256-rc1.

(From OE-Core rev: 4db0483cfd14e31c3e7cc87d538d73275fd51bbf)

Signed-off-by: Michal Seben <michal.seben@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:22 -07:00
Yi Zhao
f2a6317735 kea: set correct permissions for /var/run/kea
Set the permissions of /var/run/kea to 750 to fix kea server startup
error:

ERROR [kea-dhcp4.dhcp4/445.140718820303936] DHCP4_INIT_FAIL failed to
initialize Kea server: configuration error using file
'/etc/kea/kea-dhcp4.conf': 'socket-name' is invalid: socket
path:/var/run/kea does not exist or does not have permssions = 750

This permission check was introduced by commit[1] in kea 2.4.2.

[1] f7061c4e97

(From OE-Core rev: 5b709e2c165bf46f4f35e1783ab7ec54fabd2ec3)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:22 -07:00
Deepesh Varatharajan
d06bc81271 binutils: stable 2.42 branch updates
Below commit on binutils-2.42 stable branch are updated.

x86: Check MODRM for call and jmp in binutils older than 2.45

Test Results:
                                 Before  After  Diff
No. of expected passes            302     302    0
No. of unexpected failures        2       2      0
No. of untested testcases         1       1      0
No. of unsupported tests          7       7      0

Testing was done and there were no regressions found

(From OE-Core rev: 412def8923a89f3c385eae25901bed0c07859029)

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:22 -07:00
Praveen Kumar
a27ca8e3c0 sudo: upgrade 1.9.15p5 -> 1.9.17p1
Changelog:
===========
* Fixed CVE-2025-32462.  Sudo's -h (--host) option could be specified
   when running a command or editing a file.  This could enable a
   local privilege escalation attack if the sudoers file allows the
   user to run commands on a different host.

* Fixed CVE-2025-32463.  An attacker can leverage sudo's -R
  (--chroot) option to run arbitrary commands as root, even if
  they are not listed in the sudoers file.  The chroot support has
  been deprecated an will be removed entirely in a future release.

License-Update: Copyright updated to 2025

0001-sudo.conf.in-fix-conflict-with-multilib.patch refreshed for 1.9.17

(From OE-Core rev: b04af6db102c97f3d4338dbcfdcab927b5194a69)

Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:22 -07:00
Steve Sakoman
38f0ee2ec7 Revert "sudo: Fix CVE-2025-32462"
This CVE is fixed in the following version bump

This reverts commit d01f888a5ec43fdc8e7bd496ae9317c0fa28da9b.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:22 -07:00
Vijay Anusuri
9302874dda git: Upgrade 2.44.3 -> 2.44.4
Addresses the security issues - CVE-2025-27613, CVE-2025-27614, CVE-2025-46334,
CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386.

Release Notes:
https://github.com/git/git/blob/v2.44.4/Documentation/RelNotes/2.44.4.txt

(From OE-Core rev: 3a9fdcb2ea0dd2744f59a62f2722bfa276302324)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:22 -07:00
Archana Polampalli
c172c46096 gdk-pixbuf: fix CVE-2025-7345
A flaw exists in gdk‑pixbuf within the gdk_pixbuf__jpeg_image_load_increment function
(io-jpeg.c) and in glib’s g_base64_encode_step (glib/gbase64.c). When processing
maliciously crafted JPEG images, a heap buffer overflow can occur during Base64 encoding,
allowing out-of-bounds reads from heap memory, potentially causing application crashes or
arbitrary code execution.

(From OE-Core rev: 78a52a7feb995b4ab4f4df6b16feaac60f6ad59b)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:21 -07:00
Peter Marko
83ba977250 iputils: patch CVE-2025-48964
Pick commit referencing this CVE.

(From OE-Core rev: a8193571c8cdba55f568d831a4546e0fed892be0)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:21 -07:00
Peter Marko
ef6f8d5f46 busybox: apply patch for CVE-2023-39810
Backport patch referencing this CVE.

Note that the hardening is not activated by default, it adds defconfig
option to enable it.
Since it introduces a breaking change, it shouldn't be enabled in LTS
release by default.
This patch makes busybox cpio equivalent in this release to what is
currently in master and in kirkstone.
Also note that gnu cpio also does not have this hardening, but the CVE
is created only against busybox.

(From OE-Core rev: 3f2b235526d135094408e3895c01bff7b5b938fb)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:21 -07:00
Peter Marko
ae35f06bb1 python3: update CVE product
There are two "new" CVEs reported for python3, their CPEs are:
* CVE-2020-1171: cpe:2.3🅰️microsoft:python:*:*:*:*:*:visual_studio_code:*:* (< 2020.5.0)
* CVE-2020-1192: cpe:2.3🅰️microsoft:python:*:*:*:*:*:visual_studio_code:*:* (< 2020.5.0)
These are for "Visual Studio Code Python extension".

Solve this by addding CVE vendor to python CVE product to avoid
confusion with Microsoft as vendor.

Examining CVE DB for historical python entries shows:
sqlite> select vendor, product, count(*) from products where product = 'python' or product = 'cpython'
   ...> or product like 'python%3' group by vendor, product;
microsoft|python|2
python|python|1054
python_software_foundation|python|2

Note that this already shows that cpython product is not used, so
CVE-2023-33595 mentioned in 62598e1138f21a16d8b1cdd1cfe902aeed854c5c
was updated.
But let's keep it for future in case new CVE starts with that again.

(From OE-Core rev: 72369cd66f78a371608c3fff205e0e96c248f2b3)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:21 -07:00
Hitendra Prajapati
6d2f2bd3f7 libxml2: fix CVE-2025-49794 & CVE-2025-49796
Upstream-Status: Backport from 71e1e8af5e

(From OE-Core rev: bb20ddc599314161f3bcd6d5479e81478ceaaa3a)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-07-21 09:07:21 -07:00
261 changed files with 15889 additions and 1489 deletions

View File

@@ -27,7 +27,7 @@ from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
bb.utils.check_system_locale()
__version__ = "2.8.0"
__version__ = "2.8.1"
if __name__ == "__main__":
if __version__ != bb.__version__:

View File

@@ -9,7 +9,7 @@
# SPDX-License-Identifier: GPL-2.0-only
#
__version__ = "2.8.0"
__version__ = "2.8.1"
import sys
if sys.version_info < (3, 8, 0):
@@ -37,6 +37,34 @@ class BBHandledException(Exception):
import os
import logging
from collections import namedtuple
import multiprocessing as mp
# Python 3.14 changes the default multiprocessing context from "fork" to
# "forkserver". However, bitbake heavily relies on "fork" behavior to
# efficiently pass data to the child processes. Places that need this should do:
# from bb import multiprocessing
# in place of
# import multiprocessing
class MultiprocessingContext(object):
"""
Multiprocessing proxy object that uses the "fork" context for a property if
available, otherwise goes to the main multiprocessing module. This allows
it to be a drop-in replacement for the multiprocessing module, but use the
fork context
"""
def __init__(self):
super().__setattr__("_ctx", mp.get_context("fork"))
def __getattr__(self, name):
if hasattr(self._ctx, name):
return getattr(self._ctx, name)
return getattr(mp, name)
def __setattr__(self, name, value):
raise AttributeError(f"Unable to set attribute {name}")
multiprocessing = MultiprocessingContext()
class NullHandler(logging.Handler):

View File

@@ -11,7 +11,7 @@ import os
import signal
import socket
import sys
import multiprocessing
from bb import multiprocessing
import logging
from .connection import StreamConnection, WebsocketConnection
from .exceptions import ClientError, ServerError, ConnectionClosedError, InvokeError

View File

@@ -12,7 +12,7 @@
import sys, os, glob, os.path, re, time
import itertools
import logging
import multiprocessing
from bb import multiprocessing
import threading
from io import StringIO, UnsupportedOperation
from contextlib import closing

View File

@@ -729,6 +729,8 @@ class RunQueueData:
if mc == frommc:
fn = taskData[mcdep].build_targets[pn][0]
newdep = '%s:%s' % (fn,deptask)
if newdep not in taskData[mcdep].taskentries:
bb.fatal("Task mcdepends on non-existent task %s" % (newdep))
taskData[mc].taskentries[tid].tdepends.append(newdep)
for mc in taskData:

View File

@@ -13,7 +13,7 @@
import bb
import bb.event
import logging
import multiprocessing
from bb import multiprocessing
import threading
import array
import os

View File

@@ -1421,7 +1421,7 @@ class FetchLatestVersionTest(FetcherTest):
# combination version pattern
("sysprof", "git://git.yoctoproject.org/sysprof.git;protocol=https;branch=master", "cd44ee6644c3641507fb53b8a2a69137f2971219", "", "")
: "1.2.0",
("u-boot-mkimage", "git://source.denx.de/u-boot/u-boot.git;branch=master;protocol=https", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "", "")
("u-boot-mkimage", "git://git.yoctoproject.org/bbfetchtests-u-boot.git;branch=master;protocol=https", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "", "")
: "2014.01",
# version pattern "yyyymmdd"
("mobile-broadband-provider-info", "git://git.yoctoproject.org/mobile-broadband-provider-info.git;protocol=https;branch=master", "4ed19e11c2975105b71b956440acdb25d46a347d", "", "")

View File

@@ -0,0 +1,2 @@
do_build[mcdepends] = "mc::mc-1:h1:do_invalid"

View File

@@ -26,7 +26,7 @@ class RunQueueTests(unittest.TestCase):
a1_sstatevalid = "a1:do_package a1:do_package_qa a1:do_packagedata a1:do_package_write_ipk a1:do_package_write_rpm a1:do_populate_lic a1:do_populate_sysroot"
b1_sstatevalid = "b1:do_package b1:do_package_qa b1:do_packagedata b1:do_package_write_ipk b1:do_package_write_rpm b1:do_populate_lic b1:do_populate_sysroot"
def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False):
def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False, allowfailure=False):
env = os.environ.copy()
env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests"))
env["BB_ENV_PASSTHROUGH_ADDITIONS"] = "SSTATEVALID SLOWTASKS TOPDIR"
@@ -41,6 +41,8 @@ class RunQueueTests(unittest.TestCase):
output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir)
print(output)
except subprocess.CalledProcessError as e:
if allowfailure:
return e.output
self.fail("Command %s failed with %s" % (cmd, e.output))
tasks = []
tasklog = builddir + "/task.log"
@@ -314,6 +316,13 @@ class RunQueueTests(unittest.TestCase):
["mc_2:a1:%s" % t for t in rerun_tasks]
self.assertEqual(set(tasks), set(expected))
# Check that a multiconfig that doesn't exist rasies a correct error message
error_output = self.run_bitbakecmd(["bitbake", "g1"], tempdir, "", extraenv=extraenv, cleanup=True, allowfailure=True)
self.assertIn("non-existent task", error_output)
# If the word 'Traceback' or 'KeyError' is in the output we've regressed
self.assertNotIn("Traceback", error_output)
self.assertNotIn("KeyError", error_output)
self.shutdown(tempdir)
def test_hashserv_single(self):

View File

@@ -3,7 +3,7 @@
#
import http.server
import multiprocessing
from bb import multiprocessing
import os
import traceback
import signal
@@ -43,7 +43,7 @@ class HTTPService(object):
self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir, self.logger])
# The signal handler from testimage.bbclass can cause deadlocks here
# if the HTTPServer is terminated before it can restore the standard
# if the HTTPServer is terminated before it can restore the standard
#signal behaviour
orig = signal.getsignal(signal.SIGTERM)
signal.signal(signal.SIGTERM, signal.SIG_DFL)

View File

@@ -14,7 +14,7 @@ import logging
import bb
import bb.msg
import locale
import multiprocessing
from bb import multiprocessing
import fcntl
import importlib
import importlib.machinery
@@ -1174,8 +1174,6 @@ def process_profilelog(fn, pout = None):
#
def multiprocessingpool(*args, **kwargs):
import multiprocessing.pool
#import multiprocessing.util
#multiprocessing.util.log_to_stderr(10)
# Deal with a multiprocessing bug where signals to the processes would be delayed until the work
# completes. Putting in a timeout means the signals (like SIGINT/SIGTERM) get processed.
@@ -1854,6 +1852,15 @@ def path_is_descendant(descendant, ancestor):
return False
# Recomputing the sets in signal.py is expensive (bitbake -pP idle)
# so try and use _signal directly to avoid it
valid_signals = signal.valid_signals()
try:
import _signal
sigmask = _signal.pthread_sigmask
except ImportError:
sigmask = signal.pthread_sigmask
# If we don't have a timeout of some kind and a process/thread exits badly (for example
# OOM killed) and held a lock, we'd just hang in the lock futex forever. It is better
# we exit at some point than hang. 5 minutes with no progress means we're probably deadlocked.
@@ -1863,7 +1870,7 @@ def path_is_descendant(descendant, ancestor):
@contextmanager
def lock_timeout(lock):
try:
s = signal.pthread_sigmask(signal.SIG_BLOCK, signal.valid_signals())
s = sigmask(signal.SIG_BLOCK, valid_signals)
held = lock.acquire(timeout=5*60)
if not held:
bb.server.process.serverlog("Couldn't get the lock for 5 mins, timed out, exiting.\n%s" % traceback.format_stack())
@@ -1871,16 +1878,16 @@ def lock_timeout(lock):
yield held
finally:
lock.release()
signal.pthread_sigmask(signal.SIG_SETMASK, s)
sigmask(signal.SIG_SETMASK, s)
# A version of lock_timeout without the check that the lock was locked and a shorter timeout
@contextmanager
def lock_timeout_nocheck(lock):
try:
s = signal.pthread_sigmask(signal.SIG_BLOCK, signal.valid_signals())
s = sigmask(signal.SIG_BLOCK, valid_signals)
l = lock.acquire(timeout=10)
yield l
finally:
if l:
lock.release()
signal.pthread_sigmask(signal.SIG_SETMASK, s)
sigmask(signal.SIG_SETMASK, s)

View File

@@ -11,7 +11,7 @@ from bb.asyncrpc import InvokeError
from .client import ClientPool
import hashlib
import logging
import multiprocessing
from bb import multiprocessing
import os
import sys
import tempfile

View File

@@ -123,110 +123,116 @@ to add the upgraded version.
$ git commit -s file1 file2 dir1 dir2 ...
To include **a**\ ll staged files::
To include all staged files::
$ git commit -sa
- The ``-s`` option of ``git commit`` adds a "Signed-off-by:" line
to your commit message. There is the same requirement for contributing
to the Linux kernel. Adding such a line signifies that you, the
submitter, have agreed to the `Developer's Certificate of Origin 1.1
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin>`__
as follows:
#. The ``-s`` option of ``git commit`` adds a "Signed-off-by:" line
to your commit message. There is the same requirement for contributing
to the Linux kernel. Adding such a line signifies that you, the
submitter, have agreed to the `Developer's Certificate of Origin 1.1
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin>`__
as follows:
.. code-block:: none
.. code-block:: none
Developer's Certificate of Origin 1.1
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
- Provide a single-line summary of the change and, if more
explanation is needed, provide more detail in the body of the
commit. This summary is typically viewable in the "shortlist" of
changes. Thus, providing something short and descriptive that
gives the reader a summary of the change is useful when viewing a
list of many commits. You should prefix this short description
with the recipe name (if changing a recipe), or else with the
short form path to the file being changed.
#. Provide a single-line summary of the change and, if more
explanation is needed, provide more detail in the description of the
commit. This summary is typically viewable in the "shortlist" of
changes. Thus, providing something short and descriptive that
gives the reader a summary of the change is useful when viewing a
list of many commits. You should prefix this short description
with the recipe name (if changing a recipe), or else with the
short form path to the file being changed.
.. note::
To find a suitable prefix for the commit summary, a good idea
is to look for prefixes used in previous commits touching the
same files or directories::
git log --oneline <paths>
#. For the commit description, provide detailed information
that describes what you changed, why you made the change, and the
approach you used. It might also be helpful if you mention how you
tested the change. Provide as much detail as you can in the commit
description.
.. note::
If the single line summary is enough to describe a simple
change, the commit description can be left empty.
#. If the change addresses a specific bug or issue that is associated
with a bug-tracking ID, include a reference to that ID in the body of the
commit message. For example, the Yocto Project uses a
specific convention for bug references --- any commit that addresses
a specific bug should use the following form for the body of the commit
message. Be sure to use the actual bug-tracking ID from
Bugzilla for bug-id::
single-line summary of change
Fixes [YOCTO #bug-id]
detailed description of change
#. If other people participated in this patch, add some tags to the commit
description to credit other contributors to the change:
- ``Reported-by``: name and email of a person reporting a bug
that your commit is trying to fix. This is a good practice
to encourage people to go on reporting bugs and let them
know that their reports are taken into account.
- ``Suggested-by``: name and email of a person to credit for the
idea of making the change.
- ``Tested-by``, ``Reviewed-by``: name and email for people having
tested your changes or reviewed their code. These fields are
usually added by the maintainer accepting a patch, or by
yourself if you submitted your patches to early reviewers,
or are submitting an unmodified patch again as part of a
new iteration of your patch series.
- ``Cc``: name and email of people you want to send a copy
of your changes to. This field will be used by ``git send-email``.
See `more guidance about using such tags
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`__
in the Linux kernel documentation.
.. note::
To find a suitable prefix for the commit summary, a good idea
is to look for prefixes used in previous commits touching the
same files or directories::
git log --oneline <paths>
- For the body of the commit message, provide detailed information
that describes what you changed, why you made the change, and the
approach you used. It might also be helpful if you mention how you
tested the change. Provide as much detail as you can in the body
of the commit message.
.. note::
If the single line summary is enough to describe a simple
change, the body of the commit message can be left empty.
- If the change addresses a specific bug or issue that is associated
with a bug-tracking ID, include a reference to that ID in your
detailed description. For example, the Yocto Project uses a
specific convention for bug references --- any commit that addresses
a specific bug should use the following form for the detailed
description. Be sure to use the actual bug-tracking ID from
Bugzilla for bug-id::
Fixes [YOCTO #bug-id]
detailed description of change
#. *Crediting contributors:* By using the ``git commit --amend`` command,
you can add some tags to the commit description to credit other contributors
to the change:
- ``Reported-by``: name and email of a person reporting a bug
that your commit is trying to fix. This is a good practice
to encourage people to go on reporting bugs and let them
know that their reports are taken into account.
- ``Suggested-by``: name and email of a person to credit for the
idea of making the change.
- ``Tested-by``, ``Reviewed-by``: name and email for people having
tested your changes or reviewed their code. These fields are
usually added by the maintainer accepting a patch, or by
yourself if you submitted your patches to early reviewers,
or are submitting an unmodified patch again as part of a
new iteration of your patch series.
- ``CC:`` Name and email of people you want to send a copy
of your changes to. This field will be used by ``git send-email``.
See `more guidance about using such tags
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`__
in the Linux kernel documentation.
One can amend an existing git commit message to add missing tags for
contributors with the ``git commit --amend`` command.
Test your changes
-----------------

View File

@@ -909,6 +909,11 @@ to point to that directory::
EXTERNALSRC_BUILD:pn-myrecipe = "path-to-your-source-tree"
.. note::
The values of :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
must be absolute paths.
Replicating a Build Offline
===========================

View File

@@ -52,19 +52,24 @@ for them for significant issues.
Security-related discussions at the Yocto Project
-------------------------------------------------
We have set up two security-related mailing lists:
We have set up two security-related emails/mailing lists:
- Public List: yocto [dash] security [at] yoctoproject[dot] org
- 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 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>`.
- Private List: security [at] yoctoproject [dot] org
This list requires moderator approval for new topics to be posted, to avoid
private security reports to be posted by mistake.
This is a private mailing list for reporting non-published potential
vulnerabilities. The list is monitored by the Yocto Project Security team.
- 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

View File

@@ -543,6 +543,7 @@ your Yocto Project build host:
DISKPART> select vdisk file="<path_to_VHDX_file>"
DISKPART> attach vdisk readonly
DISKPART> compact vdisk
DISKPART> detach
DISKPART> exit
.. note::

View File

@@ -650,13 +650,9 @@ the Broadcom 2708/2709 chipset::
KBUILD_DEFCONFIG:raspberrypi2 ?= "bcm2709_defconfig"
Aside from modifying your kernel recipe and providing your own
``defconfig`` file, you need to be sure no files or statements set
:term:`SRC_URI` to use a ``defconfig`` other than your "in-tree" file (e.g.
a kernel's ``linux-``\ `machine`\ ``.inc`` file). In other words, if the
build system detects a statement that identifies an "out-of-tree"
``defconfig`` file, that statement will override your
:term:`KBUILD_DEFCONFIG` variable.
If the build system detects a statement that identifies an "out-of-tree"
``defconfig`` file, your :term:`KBUILD_DEFCONFIG` variable will take precedence
over it.
See the
:term:`KBUILD_DEFCONFIG`

View File

@@ -35,3 +35,4 @@ Release 4.0 (kirkstone)
release-notes-4.0.26
release-notes-4.0.27
release-notes-4.0.28
release-notes-4.0.29

View File

@@ -17,3 +17,5 @@ Release 5.0 (scarthgap)
release-notes-5.0.8
release-notes-5.0.9
release-notes-5.0.10
release-notes-5.0.11
release-notes-5.0.12

View File

@@ -0,0 +1,178 @@
Release notes for Yocto-4.0.29 (Kirkstone)
------------------------------------------
Security Fixes in Yocto-4.0.29
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- avahi: Fix :cve_nist:`2024-52615`
- binutils: Fix :cve_nist:`2025-7545` and :cve_nist:`2025-7546`
- coreutils: Fix :cve_nist:`2025-5278`
- curl: Fix :cve_nist:`2024-11053` and :cve_nist:`2025-0167`
- dropbear: Fix :cve_nist:`2025-47203`
- ffmpeg: Ignore :cve_nist:`2022-3109` and :cve_nist:`2022-3341`
- gdk-pixbuf: Fix :cve_nist:`2025-7345`
- ghostscript: Ignore :cve_nist:`2025-46646`
- gnupg: Fix :cve_nist:`2025-30258`
- gnutls: Fix :cve_nist:`2025-6395`, :cve_nist:`2025-32988`, :cve_nist:`2025-32989` and
:cve_nist:`2025-32990`
- iputils: Fix :cve_nist:`2025-48964`
- libarchive: Fix :cve_nist:`2025-5914`, :cve_nist:`2025-5915`, :cve_nist:`2025-5916` and
:cve_nist:`2025-5917`
- libpam: Fix :cve_nist:`2025-6020`
- libsoup-2.4: Fix :cve_nist:`2025-4945`
- libsoup-2.4: Fix :cve_nist:`2025-4969` (update patch)
- libsoup: Fix :cve_nist:`2025-4945`, :cve_nist:`2025-6021`, :cve_nist:`2025-6170`,
:cve_nist:`2025-49794` and :cve_nist:`2025-49796`
- ncurses: Fix :cve_nist:`2025-6141`
- ofono: Fix :cve_nist:`2023-4232` and :cve_nist:`2023-4235`
- openssl: Fix :cve_nist:`2024-41996`
- python3-urllib3: Fix :cve_nist:`2025-50181`
- ruby: Fix :cve_nist:`2024-43398` (update patches)
- sqlite3: Fix :cve_nist:`2025-6965` and :cve_nist:`2025-7458`
- sqlite3: Ignore :cve_nist:`2025-3277`
- systemd: Fix :cve_nist:`2025-4598`
- xwayland: Fix :cve_nist:`2025-49175`, :cve_nist:`2025-49176`, :cve_nist:`2025-49177`,
:cve_nist:`2025-49178`, :cve_nist:`2025-49179` and :cve_nist:`2025-49180`
Fixes in Yocto-4.0.29
~~~~~~~~~~~~~~~~~~~~~
- bintuils: stable 2.38 branch update
- bitbake: test/fetch: Switch u-boot based test to use our own mirror
- build-appliance-image: Update to kirkstone head revision
- conf.py: improve SearchEnglish to handle terms with dots
- db: ignore implicit-int and implicit-function-declaration issues fatal with gcc-14
- dev-manual/start.rst: added missing command in Optimize your VHDX file using DiskPart
- glibc: stable 2.35 branch updates
- gnutls: patch read buffer overrun in the "pre_shared_key" extension
- gnutls: patch reject zero-length version in certificate request
- linux-yocto/5.15: update to v5.15.186
- migration-guides: add release notes for 4.0.28
- oeqa/core/decorator: add decorators to skip based on :term:`HOST_ARCH`
- openssl: upgrade to 3.0.17
- orc: set :term:`CVE_PRODUCT`
- overview-manual/concepts.rst: fix sayhello hardcoded bindir
- poky.conf: bump version for 4.0.29
- python3: update CVE product
- ref-manual: document :term:`KERNEL_SPLIT_MODULES` variable
- scripts/install-buildtools: Update to 4.0.28
- sudo: upgrade to 1.9.17p1
- tcf-agent: correct the :term:`SRC_URI`
Known Issues in Yocto-4.0.29
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- N/A
Contributors to Yocto-4.0.29
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Aleksandar Nikolic
- Antonin Godard
- Archana Polampalli
- Bruce Ashfield
- Changqing Li
- Chen Qi
- Colin Pinnell McAllister
- Daniel Díaz
- Deepesh Varatharajan
- Divya Chellam
- Dixit Parmar
- Enrico Jörns
- Guocai He
- Hitendra Prajapati
- Lee Chee Yang
- Marco Cavallini
- Martin Jansa
- Peter Marko
- Praveen Kumar
- Richard Purdie
- Rob Woolley
- Ross Burton
- Steve Sakoman
- Vijay Anusuri
- Yash Shinde
- Yogita Urade
- Zhang Peng
Repositories / Downloads for Yocto-4.0.29
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poky
- Repository Location: :yocto_git:`/poky`
- Branch: :yocto_git:`kirkstone </poky/log/?h=kirkstone>`
- Tag: :yocto_git:`yocto-4.0.29 </poky/log/?h=yocto-4.0.29>`
- Git Revision: :yocto_git:`81ab000fa437ca04f584a3327b076f7a512dc6d0 </poky/commit/?id=81ab000fa437ca04f584a3327b076f7a512dc6d0>`
- Release Artefact: poky-81ab000fa437ca04f584a3327b076f7a512dc6d0
- sha: 2fecf3cac5c2361c201b5ae826960af92289862ec9be13837a8431138e534fd2
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.29/poky-81ab000fa437ca04f584a3327b076f7a512dc6d0.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/poky-81ab000fa437ca04f584a3327b076f7a512dc6d0.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.29 </openembedded-core/log/?h=yocto-4.0.29>`
- Git Revision: :oe_git:`bd620eb14660075fd0f7476bbbb65d5da6293874 </openembedded-core/commit/?id=bd620eb14660075fd0f7476bbbb65d5da6293874>`
- Release Artefact: oecore-bd620eb14660075fd0f7476bbbb65d5da6293874
- sha: f32ab195c7090268e6e87ccf8db2813cf705c517030654326d14b25d926de88e
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.29/oecore-bd620eb14660075fd0f7476bbbb65d5da6293874.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/oecore-bd620eb14660075fd0f7476bbbb65d5da6293874.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.29 </meta-mingw/log/?h=yocto-4.0.29>`
- 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.29/meta-mingw-87c22abb1f11be430caf4372e6b833dc7d77564e.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/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.29 </meta-gplv2/log/?h=yocto-4.0.29>`
- 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.29/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/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.29 </bitbake/log/?h=yocto-4.0.29>`
- 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.29/bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2.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.29 </meta-yocto/log/?h=yocto-4.0.29>`
- Git Revision: :yocto_git:`e916d3bad58f955b73e2c67aba975e63cd191394 </meta-yocto/commit/?id=e916d3bad58f955b73e2c67aba975e63cd191394>`
yocto-docs
- Repository Location: :yocto_git:`/yocto-docs`
- Branch: :yocto_git:`kirkstone </yocto-docs/log/?h=kirkstone>`
- Tag: :yocto_git:`yocto-4.0.29 </yocto-docs/log/?h=yocto-4.0.29>`
- Git Revision: :yocto_git:`bf855ecaf4bec4cef9bbfea2e50caa65a8339828 </yocto-docs/commit/?id=bf855ecaf4bec4cef9bbfea2e50caa65a8339828>`

View File

@@ -0,0 +1,219 @@
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Release notes for Yocto-5.0.11 (Scarthgap)
------------------------------------------
Security Fixes in Yocto-5.0.11
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- binutils: Fix :cve_nist:`2025-5244` and :cve_nist:`2025-5245`
- busybox: Fix :cve_nist:`2022-48174`
- coreutils: Fix :cve_nist:`2025-5278`
- curl: Ignore :cve_nist:`2025-5025` if :term:`PACKAGECONFIG` set with openssl
- ffmpeg: Fix :cve_nist:`2025-1373`
- glibc: fix :cve_nist:`2025-4802` and :cve_nist:`2025-5702`
- gnupg: Fix :cve_nist:`2025-30258`
- go: Fix :cve_nist:`2025-4673`
- go: Ignore :cve_nist:`2024-3566`
- icu: Fix :cve_nist:`2025-5222`
- kea: Fix :cve_nist:`2025-32801`, :cve_nist:`2025-32802` and :cve_nist:`2025-32803`
- libarchive: fix :cve_nist:`2025-5914`, :cve_nist:`2025-5915`, :cve_nist:`2025-5916`,
:cve_nist:`2025-5917` and :cve_nist:`2025-5918`
- libsoup-2.4: Fix :cve_nist:`2025-2784`, :cve_nist:`2025-4476`, :cve_nist:`2025-4945`,
:cve_nist:`2025-4948`, :cve_nist:`2025-4969`, :cve_nist:`2025-32050`, :cve_nist:`2025-32052`,
:cve_nist:`2025-32053`, :cve_nist:`2025-32907` and :cve_nist:`2025-46421`
- libsoup-3.4: Fix :cve_nist:`2025-2784`, :cve_nist:`2025-4945`, :cve_nist:`2025-4948`,
:cve_nist:`2025-4969`, :cve_nist:`2025-32050`, :cve_nist:`2025-32051`, :cve_nist:`2025-32052`,
:cve_nist:`2025-32053`, :cve_nist:`2025-32907`, :cve_nist:`2025-32908` and :cve_nist:`2025-46421`
- libxml2: Fix :cve_nist:`2025-6021`
- linux-yocto-6.6: Fix :cve_nist:`2025-21995`, :cve_nist:`2025-21996`, :cve_nist:`2025-21997`,
:cve_nist:`2025-21999`, :cve_nist:`2025-22001`, :cve_nist:`2025-22003`, :cve_nist:`2025-22004`,
:cve_nist:`2025-22005`, :cve_nist:`2025-22007`, :cve_nist:`2025-22009`, :cve_nist:`2025-22010`,
:cve_nist:`2025-22014`, :cve_nist:`2025-22018`, :cve_nist:`2025-22020`, :cve_nist:`2025-22027`,
:cve_nist:`2025-22033`, :cve_nist:`2025-22035`, :cve_nist:`2025-22038`, :cve_nist:`2025-22040`,
:cve_nist:`2025-22041`, :cve_nist:`2025-22054`, :cve_nist:`2025-22056`, :cve_nist:`2025-22063`,
:cve_nist:`2025-22066`, :cve_nist:`2025-22080`, :cve_nist:`2025-22081`, :cve_nist:`2025-22088`,
:cve_nist:`2025-22097`, :cve_nist:`2025-23136`, :cve_nist:`2025-37785`, :cve_nist:`2025-37800`,
:cve_nist:`2025-37801`, :cve_nist:`2025-37803`, :cve_nist:`2025-37805`, :cve_nist:`2025-37838`,
:cve_nist:`2025-37893`, :cve_nist:`2025-38152`, :cve_nist:`2025-39728` and :cve_nist:`2025-39735`
- net-tools: Fix :cve_nist:`2025-46836`
- python3-setuptools: Fix :cve_nist:`2025-47273`
- python3-requests: fix :cve_nist:`2024-47081`
- python3-urllib3: Fix :cve_nist:`2025-50181`
- python3: Fix CVE 2024-12718 CVE 2025-4138 CVE 2025-4330 CVE 2025-4435 :cve_nist:`2025-4516` CVE
2025-4517
- screen: fix :cve_nist:`2025-46802`, :cve_nist:`2025-46804` and :cve_nist:`2025-46805`
- sudo: Fix :cve_nist:`2025-32462`
- xwayland: Fix :cve_nist:`2025-49175`, :cve_nist:`2025-49176`, :cve_nist:`2025-49177`,
:cve_nist:`2025-49178`, :cve_nist:`2025-49179` and :cve_nist:`2025-49180`
Fixes in Yocto-5.0.11
~~~~~~~~~~~~~~~~~~~~~
- bitbake: ast: Change deferred inherits to happen per recipe
- bitbake: fetch2: Avoid deprecation warning
- bitbake: gcp.py: remove slow calls to gsutil stat
- bitbake: toaster/tests/buildtest: Switch to new CDN
- brief-yoctoprojectqs/ref-manual: Switch to new CDN
- bsp-guide: update kernel version example to 6.12
- bsp-guide: update all of section 1.8.2 to reflect current beaglebone conf file
- bsp-guide: update lonely "4.12" kernel reference to "6.12"
- build-appliance-image: Update to scarthgap head revision
- cmake: Correctly handle cost data of tests with arbitrary chars in name
- conf.py: improve SearchEnglish to handle terms with dots
- docs: Clean up explanation of minimum required version numbers
- docs: README: specify how to contribute instead of pointing at another file
- docs: conf.py: silence SyntaxWarning on js_splitter_code
- gcc: Upgrade to GCC 13.4
- ghostscript: upgrade to 10.05.1
- glibc: stable 2.39 branch updates (06a70769fd...)
- gnupg: update to 2.4.8
- gtk+: add missing libdrm dependency
- kea: upgrade to 2.4.2
- libpng: Add ptest
- libsoup-2.4: fix do_compile failure
- linux-yocto/6.6: fix beaglebone ethernet
- linux-yocto/6.6: update to v6.6.96
- local.conf.sample: Switch to new CDN
- ltp: backport patch to fix compilation error for x86_64
- migration-guides: add release notes for 4.0.27, 4.0.28, 5.0.10
- minicom: correct the :term:`SRC_URI`
- nfs-utils: don't use signals to shut down nfs server.
- overview-manual/concepts.rst: fix sayhello hardcoded bindir
- overview-manual: small number of pedantic cleanups
- package: export debugsources in :term:`PKGDESTWORK` as json
- poky.conf: bump version for 5.0.11
- python3-requests: upgrade to 2.32.4
- python3: upgrade to 3.12.11
- ref-manual: clarify :term:`KCONFIG_MODE` default behaviour
- ref-manual: classes: nativesdk: move note to appropriate section
- ref-manual: classes: reword to clarify that native/nativesdk options are exclusive
- ref-manual: document :term:`KERNEL_SPLIT_MODULES` variable
- scripts/install-buildtools: Update to 5.0.10
- spdx: add option to include only compiled sources
- sstatetests: Switch to new CDN
- systemd: Rename systemd_v255.21 to systemd_255.21
- systemd: upgrade to 255.21
- tcf-agent: correct the :term:`SRC_URI`
- testimage: get real os-release file
- tune-cortexr52: Remove aarch64 for ARM Cortex-R52
- uboot: Allow for customizing installed/deployed file names
Known Issues in Yocto-5.0.11
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- N/A
Contributors to Yocto-5.0.11
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks to the following people who contributed to this release:
- Aleksandar Nikolic
- Andrew Fernandes
- Antonin Godard
- Archana Polampalli
- Ashish Sharma
- Bruce Ashfield
- Carlos Sánchez de La Lama
- Changqing Li
- Chen Qi
- Colin Pinnell McAllister
- Daniel Turull
- Deepesh Varatharajan
- Divya Chellam
- Dixit Parmar
- Enrico Jörns
- Etienne Cordonnier
- Guocai He
- Guðni Már Gilbert
- Hitendra Prajapati
- Jiaying Song
- Lee Chee Yang
- Moritz Haase
- NeilBrown
- Peter Marko
- Poonam Jadhav
- Praveen Kumar
- Preeti Sachan
- Quentin Schulz
- Richard Purdie
- Robert P. J. Day
- Roland Kovacs
- Ryan Eatmon
- Sandeep Gundlupet Raju
- Savvas Etairidis
- Steve Sakoman
- Victor Giraud
- Vijay Anusuri
- Virendra Thakur
- Wang Mingyu
- Yogita Urade
Repositories / Downloads for Yocto-5.0.11
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poky
- Repository Location: :yocto_git:`/poky`
- Branch: :yocto_git:`scarthgap </poky/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.11 </poky/log/?h=yocto-5.0.11>`
- Git Revision: :yocto_git:`ae2d52758fc2fcb0ed996aa234430464ebf4b310 </poky/commit/?id=ae2d52758fc2fcb0ed996aa234430464ebf4b310>`
- Release Artefact: poky-ae2d52758fc2fcb0ed996aa234430464ebf4b310
- sha: 48dec434dd51e5c9c626abdccc334da300fa2b4975137d526f5df6703e5a930e
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/poky-ae2d52758fc2fcb0ed996aa234430464ebf4b310.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/poky-ae2d52758fc2fcb0ed996aa234430464ebf4b310.tar.bz2
openembedded-core
- Repository Location: :oe_git:`/openembedded-core`
- Branch: :oe_git:`scarthgap </openembedded-core/log/?h=scarthgap>`
- Tag: :oe_git:`yocto-5.0.11 </openembedded-core/log/?h=yocto-5.0.11>`
- Git Revision: :oe_git:`7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b </openembedded-core/commit/?id=7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b>`
- Release Artefact: oecore-7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b
- sha: fb50992a28298915fe195e327628d6d5872fd2dbc74189c2d840178cd860bb2e
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/oecore-7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/oecore-7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b.tar.bz2
meta-mingw
- Repository Location: :yocto_git:`/meta-mingw`
- Branch: :yocto_git:`scarthgap </meta-mingw/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.11 </meta-mingw/log/?h=yocto-5.0.11>`
- Git Revision: :yocto_git:`bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f </meta-mingw/commit/?id=bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f>`
- Release Artefact: meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f
- sha: ab073def6487f237ac125d239b3739bf02415270959546b6b287778664f0ae65
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
bitbake
- Repository Location: :oe_git:`/bitbake`
- Branch: :oe_git:`2.8 </bitbake/log/?h=2.8>`
- Tag: :oe_git:`yocto-5.0.11 </bitbake/log/?h=yocto-5.0.11>`
- Git Revision: :oe_git:`139f61fe9eec221745184a14b3618d2dfa650b91 </bitbake/commit/?id=139f61fe9eec221745184a14b3618d2dfa650b91>`
- Release Artefact: bitbake-139f61fe9eec221745184a14b3618d2dfa650b91
- sha: 86669d4220c50d35c0703f151571954ad9c6285cc91a870afbb878d2e555d2ca
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/bitbake-139f61fe9eec221745184a14b3618d2dfa650b91.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/bitbake-139f61fe9eec221745184a14b3618d2dfa650b91.tar.bz2
meta-yocto
- Repository Location: :yocto_git:`/meta-yocto`
- Branch: :yocto_git:`scarthgap </meta-yocto/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.11 </meta-yocto/log/?h=yocto-5.0.11>`
- Git Revision: :yocto_git:`50e5c0d85d3775ac1294bdcd7f11deaa382c9d08 </meta-yocto/commit/?id=50e5c0d85d3775ac1294bdcd7f11deaa382c9d08>`
yocto-docs
- Repository Location: :yocto_git:`/yocto-docs`
- Branch: :yocto_git:`scarthgap </yocto-docs/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.11 </yocto-docs/log/?h=yocto-5.0.11>`
- Git Revision: :yocto_git:`3f88cb85cca8f9128cfaab36882c4563457b03d9 </yocto-docs/commit/?id=3f88cb85cca8f9128cfaab36882c4563457b03d9>`

View File

@@ -0,0 +1,184 @@
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Release notes for Yocto-5.0.12 (Scarthgap)
------------------------------------------
Security Fixes in Yocto-5.0.12
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- avahi: Fix :cve_nist:`2024-52615`
- binutils: Fix :cve_nist:`2025-7545` and :cve_nist:`2025-7546`
- busybox: Fix :cve_nist:`2023-39810`
- dropbear: Fix :cve_nist:`2025-47203`
- gdk-pixbuf: Fix :cve_nist:`2025-7345`
- git: Fix :cve_nist:`2025-27613`, :cve_nist:`2025-27614`, :cve_nist:`2025-46334`,
:cve_nist:`2025-46835`, :cve_nist:`2025-48384`, :cve_nist:`2025-48385` and :cve_nist:`2025-48386`
- glib-2.0: Ignore :cve_nist:`2025-4056`
- glibc: Fix :cve_nist:`2025-8058`
- gnutls: Fix :cve_nist:`2025-6395`, :cve_nist:`2025-32988`, :cve_nist:`2025-32989` and
:cve_nist:`2025-32990`
- go: Ignore :cve_nist:`2025-0913`
- gstreamer1.0-plugins-base: Fix :cve_nist:`2025-47806` and :cve_nist:`2025-47808`
- gstreamer1.0-plugins-good: Fix :cve_nist:`2025-47183` and :cve_nist:`2025-47219`
- iputils: Fix :cve_nist:`2025-48964`
- libpam: Fix :cve_nist:`2025-6020`
- libxml2: Fix :cve_nist:`2025-6170`, :cve_nist:`2025-49794`, :cve_nist:`2025-49795` and
:cve_nist:`2025-49796`
- libxml2: Ignore :cve_nist:`2025-8732`
- ncurses: Fix :cve_nist:`2025-6141`
- openssl: Fix :cve_nist:`2024-41996` and :cve_nist:`2025-27587`
- python3: Fix :cve_nist:`2025-8194`
- sqlite3: Fix :cve_nist:`2025-6965`
- sudo: Fix :cve_nist:`2025-32463`
- xserver-xorg: Fix :cve_nist:`2022-49737`, :cve_nist:`2025-49175`, :cve_nist:`2025-49176`,
:cve_nist:`2025-49177`, :cve_nist:`2025-49178`, :cve_nist:`2025-49179`, :cve_nist:`2025-49180`
and :cve_nist:`2025-49176`
- xz: Ignore :cve_nist:`2024-47611`
Fixes in Yocto-5.0.12
~~~~~~~~~~~~~~~~~~~~~
- bash: Stick to C17 std
- bash: use -std=gnu17 also for native :term:`CFLAGS`
- binutils: stable 2.42 branch updates
- bitbake: bitbake: runqueue: Verify mcdepends are valid
- bitbake: test/fetch: Switch u-boot based test to use our own mirror
- bitbake: utils: Optimise signal/sigmask performance
- build-appliance-image: Update to scarthgap head revision
- cairo: fix build with gcc-15 on host
- cmake: Add :term:`PACKAGECONFIG` option for debugger support
- cve-check: Add missing call to exit_if_errors
- dev-manual/start.rst: added missing command in Optimize your VHDX file using DiskPart
- e2fsprogs: Fix build failure with gcc 15
- git: Upgrade to 2.44.4
- glibc: stable 2.39 branch updates
- gnutls: patch read buffer overrun in the "pre_shared_key" extension
- gnutls: patch reject zero-length version in certificate request
- go-helloworld: fix license
- kea: set correct permissions for /var/run/kea
- linux-libc-headers: Fix invalid conversion in cn_proc.h
- migration-guides: add release notes for 5.0.11
- mtools: upgrade to 4.0.49
- oe-debuginfod: add option for data storage
- orc: set :term:`CVE_PRODUCT`
- overview-manual/yp-intro.rst: fix broken link to article
- parted: Fix build with GCC 15
- poky.conf: bump version for 5.0.12
- python3: update CVE product
- ref-manual/classes.rst: document the testexport class
- ref-manual/system-requirements.rst: update supported distributions
- ref-manual/variables.rst: document :term:`SPL_DTB_BINARY` :term:`FIT_CONF_PREFIX` variable
- scripts/install-buildtools: Update to 5.0.11
- sudo: upgrade to 1.9.17p1
- timedated: wait for jobs before SetNTP response
- variables.rst: remove references to obsolete tar packaging
- xserver-xorg: upgrade to 21.1.18
Known Issues in Yocto-5.0.12
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- N/A
Contributors to Yocto-5.0.12
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks to the following people who contributed to this release:
- Aleksandar Nikolic
- Alexander Kanavin
- Antonin Godard
- Archana Polampalli
- Daniel Turull
- Deepesh Varatharajan
- Erik Lindsten
- Fabio Berton
- Hitendra Prajapati
- Jinfeng Wang
- Joe Slater
- Khem Raj
- Lee Chee Yang
- Marco Cavallini
- Mark Hatle
- Martin Jansa
- Michal Seben
- Nikhil R
- Peter Marko
- Philip Lorenz
- Praveen Kumar
- Quentin Schulz
- Richard Purdie
- Robert P. J. Day
- Roland Kovacs
- Steve Sakoman
- Vijay Anusuri
- Wang Mingyu
- Yash Shinde
- Yi Zhao
- Zhang Peng
Repositories / Downloads for Yocto-5.0.12
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poky
- Repository Location: :yocto_git:`/poky`
- Branch: :yocto_git:`scarthgap </poky/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.12 </poky/log/?h=yocto-5.0.12>`
- Git Revision: :yocto_git:`ec220ae083dba35c279192b2249ad03fe238446e </poky/commit/?id=ec220ae083dba35c279192b2249ad03fe238446e>`
- Release Artefact: poky-ec220ae083dba35c279192b2249ad03fe238446e
- sha: a5f8c2ad491c59d0bdfb85f46a136b0ee66cfdd4359ab1ab9dac2430d0a52c17
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/poky-ec220ae083dba35c279192b2249ad03fe238446e.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/poky-ec220ae083dba35c279192b2249ad03fe238446e.tar.bz2
openembedded-core
- Repository Location: :oe_git:`/openembedded-core`
- Branch: :oe_git:`scarthgap </openembedded-core/log/?h=scarthgap>`
- Tag: :oe_git:`yocto-5.0.12 </openembedded-core/log/?h=yocto-5.0.12>`
- Git Revision: :oe_git:`93c7489d843a0e46fe4fc685b356d0ae885300d7 </openembedded-core/commit/?id=93c7489d843a0e46fe4fc685b356d0ae885300d7>`
- Release Artefact: oecore-93c7489d843a0e46fe4fc685b356d0ae885300d7
- sha: 49695592179cd777eee337d922aae354dad4ab503628f0344b1b53329900c4d9
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/oecore-93c7489d843a0e46fe4fc685b356d0ae885300d7.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/oecore-93c7489d843a0e46fe4fc685b356d0ae885300d7.tar.bz2
meta-mingw
- Repository Location: :yocto_git:`/meta-mingw`
- Branch: :yocto_git:`scarthgap </meta-mingw/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.12 </meta-mingw/log/?h=yocto-5.0.12>`
- Git Revision: :yocto_git:`bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f </meta-mingw/commit/?id=bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f>`
- Release Artefact: meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f
- sha: ab073def6487f237ac125d239b3739bf02415270959546b6b287778664f0ae65
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
bitbake
- Repository Location: :oe_git:`/bitbake`
- Branch: :oe_git:`2.8 </bitbake/log/?h=2.8>`
- Tag: :oe_git:`yocto-5.0.12 </bitbake/log/?h=yocto-5.0.12>`
- Git Revision: :oe_git:`982645110a19ebb94d519926a4e14c8a2a205cfd </bitbake/commit/?id=982645110a19ebb94d519926a4e14c8a2a205cfd>`
- Release Artefact: bitbake-982645110a19ebb94d519926a4e14c8a2a205cfd
- sha: f8d777d322b8f05372d7ce75c67df2db2b7de3f64d5b7769b8051c507161245d
- Download Locations:
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/bitbake-982645110a19ebb94d519926a4e14c8a2a205cfd.tar.bz2
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/bitbake-982645110a19ebb94d519926a4e14c8a2a205cfd.tar.bz2
meta-yocto
- Repository Location: :yocto_git:`/meta-yocto`
- Branch: :yocto_git:`scarthgap </meta-yocto/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.12 </meta-yocto/log/?h=yocto-5.0.12>`
- Git Revision: :yocto_git:`82602cda1a89644d1acbe230a81c93e3fb5031c8 </meta-yocto/commit/?id=82602cda1a89644d1acbe230a81c93e3fb5031c8>`
yocto-docs
- Repository Location: :yocto_git:`/yocto-docs`
- Branch: :yocto_git:`scarthgap </yocto-docs/log/?h=scarthgap>`
- Tag: :yocto_git:`yocto-5.0.12 </yocto-docs/log/?h=yocto-5.0.12>`
- Git Revision: :yocto_git:`dd665216fa578a1f2f268790d708c6a5d2912ecf </yocto-docs/commit/?id=dd665216fa578a1f2f268790d708c6a5d2912ecf>`

View File

@@ -28,7 +28,7 @@ platforms as well as software stacks that can be maintained and scaled.
For further introductory information on the Yocto Project, you might be
interested in this
`article <https://www.embedded.com/electronics-blogs/say-what-/4458600/Why-the-Yocto-Project-for-my-IoT-Project->`__
`article <https://www.embedded.com/why-the-yocto-project-for-my-iot-project/>`__
by Drew Moseley and in this short introductory
`video <https://www.youtube.com/watch?v=utZpKM7i5Z4>`__.

View File

@@ -3186,6 +3186,22 @@ class assuming :term:`PATCHRESOLVE` is set to "user", the
:ref:`ref-classes-cml1` class, and the :ref:`ref-classes-devshell` class all
use the :ref:`ref-classes-terminal` class.
.. _ref-classes-testexport:
``testexport``
==============
Based on the :ref:`ref-classes-testimage` class, the
:ref:`ref-classes-testexport` class can be used to export the test environment
outside of the :term:`OpenEmbedded Build System`. This will generate the
directory structure to execute the runtime tests using the
:oe_git:`runexported.py </openembedded-core/tree/meta/lib/oeqa/runexported.py>`
Python script.
For more details on how to use :ref:`ref-classes-testexport`, see
the :ref:`test-manual/runtime-testing:Exporting Tests` section in the Yocto
Project Test Environment Manual.
.. _ref-classes-testimage:
``testimage``
@@ -3316,6 +3332,9 @@ The variables used by this class are:
- :term:`SPL_SIGN_ENABLE`: enable signing the FIT image.
- :term:`SPL_SIGN_KEYDIR`: directory containing the signing keys.
- :term:`SPL_SIGN_KEYNAME`: base filename of the signing keys.
- :term:`SPL_DTB_BINARY`: Name of the SPL device tree binary. Can be set to an
empty string to indicate that no SPL should be created and added to the FIT
image.
- :term:`UBOOT_FIT_ADDRESS_CELLS`: ``#address-cells`` value for the FIT image.
- :term:`UBOOT_FIT_DESC`: description string encoded into the FIT image.
- :term:`UBOOT_FIT_GENERATE_KEYS`: generate the keys if they don't exist yet.

View File

@@ -344,6 +344,15 @@ This configuration file is generated by :doc:`bblock </dev-manual/bblock>` and
contains the signatures locked by ``bblock``. By default, it does not exist
and will be created upon the first invocation of ``bblock``.
.. _structure-build-conf-auto.conf:
``build/conf/auto.conf``
------------------------
This file contains configuration variables that are automatically modified by
tools such as :oe_git:`bitbake-config-build </bitbake/tree/bin/bitbake-config-build>`.
This file should not be modified manually.
.. _structure-build-downloads:
``build/downloads/``

View File

@@ -58,36 +58,35 @@ Supported Linux Distributions
Currently, the &DISTRO; release ("&DISTRO_NAME;") of the Yocto Project is
supported on the following distributions:
- Ubuntu 20.04 (LTS)
- Ubuntu 22.04 (LTS)
- Ubuntu 23.04
- Fedora 38
- Fedora 39
- CentOS Stream 8
- Debian GNU/Linux 11 (Bullseye)
- Debian GNU/Linux 12 (Bookworm)
- OpenSUSE Leap 15.4
..
Can be generated with yocto-autobuilder-helper's scripts/yocto-supported-distros:
yocto-supported-distros --release scarthgap --config yocto-autobuilder2/config.py --output-format docs --poky-distros
- AlmaLinux 8
- AlmaLinux 9
- Rocky 9
- Debian 11
- Debian 12
- Fedora 39
- Fedora 40
- 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:
- Ubuntu 18.04 (LTS)
..
This list contains EOL distros that are still tested on the Autobuilder
(meaning there are running workers).
See https://endoflife.date for information of EOL releases.
- Ubuntu 23.04
- Fedora 39
- Fedora 40
- Ubuntu 20.04 (LTS)
Note that the Yocto Project doesn't have access to private updates
that some of these versions may have. Therefore, our testing has
@@ -96,7 +95,15 @@ limited value if you have access to such updates.
Finally, here are the distribution versions which were previously
tested on former revisions of "&DISTRO_NAME;", but no longer are:
*This list is currently empty*
..
Can be generated with yocto-autobuilder-helper's scripts/yocto-supported-distros.
yocto-supported-distros --release scarthgap --config yocto-autobuilder2/config.py --output-format docs --old-distros
- CentOS Stream 8
- Fedora 38
- OpenSUSE Leap 15.4
- Ubuntu 18.04
- Ubuntu 23.04
.. note::

View File

@@ -3270,6 +3270,10 @@ system and gives an overview of their function and contents.
This variable is used in the :ref:`ref-classes-kernel-fitimage` class.
:term:`FIT_CONF_PREFIX`
When using the :ref:`ref-classes-kernel-fitimage`, this is the prefix
used for creating FIT configuration nodes. Its default value is "conf-".
:term:`FIT_DESC`
Specifies the description string encoded into a FIT image. The
default value is set by the :ref:`ref-classes-kernel-fitimage` class as
@@ -4075,14 +4079,20 @@ system and gives an overview of their function and contents.
added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
variable.
When using Wic tool, beware that a second overhead factor is also applied.
This overhead value is defined by the ``--overhead-factor`` option, which
defaults to "1.3" when omitted. See the
:ref:`ref-manual/kickstart:command: part or partition` chapter in
:doc:`/ref-manual/kickstart` for details.
:term:`IMAGE_PKGTYPE`
Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
Defines the package type (i.e. DEB, RPM or IPK) used by the
OpenEmbedded build system. The variable is defined appropriately by
the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`,
or :ref:`ref-classes-package_ipk` class.
one of the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`,
or :ref:`ref-classes-package_ipk` classes.
The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image`
classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs.
classes use the :term:`IMAGE_PKGTYPE` for packaging images and SDKs.
You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
variable is set indirectly through the appropriate
@@ -4091,12 +4101,6 @@ system and gives an overview of their function and contents.
OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
or IPK) that appears with the variable
.. note::
Files using the ``.tar`` format are never used as a substitute
packaging format for DEB, RPM, and IPK formatted files for your image
or SDK.
:term:`IMAGE_POSTPROCESS_COMMAND`
Specifies a list of functions to call once the OpenEmbedded build
system creates the final image output files. You can specify
@@ -4772,8 +4776,7 @@ system and gives an overview of their function and contents.
would place patch files and configuration fragment files (i.e.
"out-of-tree"). However, if you want to use a ``defconfig`` file that
is part of the kernel tree (i.e. "in-tree"), you can use the
:term:`KBUILD_DEFCONFIG` variable and append the
:term:`KMACHINE` variable to point to the
:term:`KBUILD_DEFCONFIG` variable to point to the
``defconfig`` file.
To use the variable, set it in the append file for your kernel recipe
@@ -8451,6 +8454,11 @@ system and gives an overview of their function and contents.
section in the Yocto Project Board Support Package Developer's Guide
for additional information.
:term:`SPL_DTB_BINARY`
When inheriting the :ref:`ref-classes-uboot-sign` class, the
:term:`SPL_DTB_BINARY` variable contains the name of the SPL binary to be
compiled.
:term:`SPL_MKIMAGE_DTCOPTS`
Options for the device tree compiler passed to ``mkimage -D`` feature
while creating a FIT image with the :ref:`ref-classes-uboot-sign`
@@ -8820,7 +8828,7 @@ system and gives an overview of their function and contents.
directory for the build host.
:term:`STAGING_DIR`
Helps construct the ``recipe-sysroots`` directory, which is used
Helps construct the ``recipe-sysroot*`` directories, which are used
during packaging.
For information on how staging for recipe-specific sysroots occurs,

View File

@@ -56,9 +56,10 @@ project:
#include <stdio.h>
main()
int main()
{
printf("Hello World!\n");
return 0;
}
- ``configure.ac``::

View File

@@ -403,7 +403,7 @@ defined in :term:`TEST_SUITES`.
If your image is already built, make sure the following are set in your
``local.conf`` file::
INHERIT += "testexport"
IMAGE_CLASSES += "testexport"
TEST_TARGET_IP = "IP-address-for-the-test-target"
TEST_SERVER_IP = "IP-address-for-the-test-server"
@@ -413,18 +413,23 @@ following BitBake command form::
$ bitbake image -c testexport
Exporting the tests places them in the :term:`Build Directory` in
``tmp/testexport/``\ image, which is controlled by the :term:`TEST_EXPORT_DIR`
``tmp/testimage/``\ image, which is controlled by the :term:`TEST_EXPORT_DIR`
variable.
You can now run the tests outside of the build environment::
$ cd tmp/testexport/image
$ ./runexported.py testdata.json
$ cd tmp/testimage/image
$ ./oe-test runtime
.. note::
You might need to run the image under QEMU or deploy it to your
hardware before you can run the tests.
Here is a complete example that shows IP addresses and uses the
``core-image-sato`` image::
INHERIT += "testexport"
IMAGE_CLASSES += "testexport"
TEST_TARGET_IP = "192.168.7.2"
TEST_SERVER_IP = "192.168.7.1"
@@ -435,8 +440,8 @@ Use BitBake to export the tests::
Run the tests outside of
the build environment using the following::
$ cd tmp/testexport/core-image-sato
$ ./runexported.py testdata.json
$ cd tmp/testimage/core-image-sato
$ ./oe-test runtime
Writing New Tests
=================

View File

@@ -38,7 +38,7 @@ Benefits
and flexible: it gives users the ultimate power to change pretty much any
aspect of the system but as with most things, power comes with responsibility.
The Yocto Project would like to see people able to mix and match BSPs with
distro configs or software stacks and be able to merge succesfully.
distro configs or software stacks and be able to merge successfully.
Over time, the project identified characteristics in layers that allow them
to operate well together. "anti-patterns" were also found, preventing layers
from working well together.

View File

@@ -1,6 +1,6 @@
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "5.0.11"
DISTRO_VERSION = "5.0.13"
DISTRO_CODENAME = "scarthgap"
SDK_VENDOR = "-pokysdk"
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"

View File

@@ -27,3 +27,4 @@ render:x:527:
sgx:x:528:
ptest:x:529:
xuser:x:530:
audio:x:531:

View File

@@ -196,6 +196,7 @@ python do_cve_check () {
else:
bb.note("No CVE database found, skipping CVE check")
oe.qa.exit_if_errors(d)
}
addtask cve_check before do_build

View File

@@ -703,7 +703,7 @@ DEBIAN_MIRROR = "http://ftp.debian.org/debian/pool"
GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
GNOME_GIT = "git://gitlab.gnome.org/GNOME"
GNOME_MIRROR = "https://download.gnome.org/sources/"
GNU_MIRROR = "https://ftp.gnu.org/gnu"
GNU_MIRROR = "https://ftpmirror.gnu.org/gnu"
GNUPG_MIRROR = "https://www.gnupg.org/ftp/gcrypt"
GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
KERNELORG_MIRROR = "https://cdn.kernel.org/pub"

View File

@@ -61,4 +61,4 @@ KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master;branch=master
CONNECTIVITY_CHECK_URIS ?= "https://yoctoproject.org/connectivity.html"
CONNECTIVITY_CHECK_URIS ?= "https://www.yoctoproject.org/connectivity.html"

View File

@@ -6,10 +6,10 @@
# to the distro running on the build machine.
#
UNINATIVE_MAXGLIBCVERSION = "2.41"
UNINATIVE_VERSION = "4.7"
UNINATIVE_MAXGLIBCVERSION = "2.42"
UNINATIVE_VERSION = "4.9"
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
UNINATIVE_CHECKSUM[aarch64] ?= "ac440e4fc80665c79f9718c665c6e28d771e51609c088c3c97ba3ad5cfed197a"
UNINATIVE_CHECKSUM[i686] ?= "c5efa31450f3bbd63ea961d4e7c747ae41317937d429f65e1d5cf2050338e27a"
UNINATIVE_CHECKSUM[x86_64] ?= "5800d4e9a129d1be09cf548918d25f74e91a7c1193ae5239d5b0c9246c486d2c"
UNINATIVE_CHECKSUM[aarch64] ?= "812045d826b7fda88944055e8526b95a5a9440bfef608d5b53fd52faab49bf85"
UNINATIVE_CHECKSUM[i686] ?= "5cc28efd0c15a75de4bcb147c6cce65f1c1c9d442173a220f08427f40a3ffa09"
UNINATIVE_CHECKSUM[x86_64] ?= "4c03d1ed2b7b4e823aca4a1a23d8f2e322f1770fc10e859adcede5777aff4f3a"

View File

@@ -3,7 +3,7 @@
# See sanity.bbclass
#
# Expert users can confirm their sanity with "touch conf/sanity.conf"
BB_MIN_VERSION = "2.7.3"
BB_MIN_VERSION = "2.8.1"
SANITY_ABIFILE = "${TMPDIR}/abi_version"

View File

@@ -172,8 +172,8 @@ class ManifestVisitor(LicenseVisitor):
LicenseVisitor.__init__(self)
def visit(self, node):
if isinstance(node, ast.Str):
lic = node.s
if isinstance(node, ast.Constant):
lic = node.value
if license_ok(self._canonical_license(self._d, lic),
self._dont_want_licenses) == True:

View File

@@ -5,10 +5,11 @@
#
import subprocess
import multiprocessing
import traceback
import errno
from bb import multiprocessing
def read_file(filename):
try:
f = open( filename, "r" )

View File

@@ -15,8 +15,8 @@ class HTTPTests(OESDKTestCase):
"""
def test_wget(self):
self._run('env -i wget --debug --output-document /dev/null https://yoctoproject.org/connectivity.html')
self._run('env -i wget --debug --output-document /dev/null https://www.yoctoproject.org/connectivity.html')
def test_python(self):
# urlopen() returns a file-like object on success and throws an exception otherwise
self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://yoctoproject.org/connectivity.html")\'')
self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://www.yoctoproject.org/connectivity.html")\'')

View File

@@ -24,7 +24,7 @@ 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://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz")
tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.gz")
dirs = {}
dirs["source"] = os.path.join(testdir, "cpio-2.15")

View File

@@ -44,7 +44,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://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz",
"https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.gz",
self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
self.project.download_archive()
self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS'), 0,

View File

@@ -0,0 +1,75 @@
From 4cef2fc7308b2132317ad166939994f098b41561 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Tue, 9 Sep 2025 14:23:14 +0100
Subject: [PATCH] CVE-2024-56738
Backport an algorithmic change to grub_crypto_memcmp() so that it completes in
constant time and thus isn't susceptible to side-channel attacks.
This is a partial backport of grub 0739d24cd
("libgcrypt: Adjust import script, definitions and API users for libgcrypt 1.11")
CVE: CVE-2024-56738
Upstream-Status: Backport [0739d24cd]
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
grub-core/lib/crypto.c | 23 ++++++++++++++++-------
include/grub/crypto.h | 2 +-
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
index 396f76410..19db7870a 100644
--- a/grub-core/lib/crypto.c
+++ b/grub-core/lib/crypto.c
@@ -433,19 +433,28 @@ grub_crypto_gcry_error (gcry_err_code_t in)
return GRUB_ACCESS_DENIED;
}
+/*
+ * Compare byte arrays of length LEN, return 1 if it's not same,
+ * 0, otherwise.
+ */
int
-grub_crypto_memcmp (const void *a, const void *b, grub_size_t n)
+grub_crypto_memcmp (const void *b1, const void *b2, grub_size_t len)
{
- register grub_size_t counter = 0;
- const grub_uint8_t *pa, *pb;
+ const grub_uint8_t *a = b1;
+ const grub_uint8_t *b = b2;
+ int ab, ba;
+ grub_size_t i;
- for (pa = a, pb = b; n; pa++, pb++, n--)
+ /* Constant-time compare. */
+ for (i = 0, ab = 0, ba = 0; i < len; i++)
{
- if (*pa != *pb)
- counter++;
+ /* If a[i] != b[i], either ab or ba will be negative. */
+ ab |= a[i] - b[i];
+ ba |= b[i] - a[i];
}
- return !!counter;
+ /* 'ab | ba' is negative when buffers are not equal, extract sign bit. */
+ return ((unsigned int)(ab | ba) >> (sizeof(unsigned int) * 8 - 1)) & 1;
}
#ifndef GRUB_UTIL
diff --git a/include/grub/crypto.h b/include/grub/crypto.h
index 31c87c302..20ad4c5f7 100644
--- a/include/grub/crypto.h
+++ b/include/grub/crypto.h
@@ -393,7 +393,7 @@ grub_crypto_pbkdf2 (const struct gcry_md_spec *md,
grub_uint8_t *DK, grub_size_t dkLen);
int
-grub_crypto_memcmp (const void *a, const void *b, grub_size_t n);
+grub_crypto_memcmp (const void *b1, const void *b2, grub_size_t len);
int
grub_password_get (char buf[], unsigned buf_size);
--
2.43.0

View File

@@ -37,6 +37,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
file://CVE-2024-45778_CVE-2024-45779.patch \
file://CVE-2025-0677_CVE-2025-0684_CVE-2025-0685_CVE-2025-0686_CVE-2025-0689.patch \
file://CVE-2025-0678_CVE-2025-1125.patch \
file://CVE-2024-56738.patch \
"
SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91"
@@ -44,6 +45,7 @@ SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154
CVE_STATUS[CVE-2019-14865] = "not-applicable-platform: applies only to RHEL"
CVE_STATUS[CVE-2023-4001] = "not-applicable-platform: Applies only to RHEL/Fedora"
CVE_STATUS[CVE-2024-1048] = "not-applicable-platform: Applies only to RHEL/Fedora"
CVE_STATUS[CVE-2024-2312] = "not-applicable-platform: Applies only to Ubuntu"
DEPENDS = "flex-native bison-native gettext-native"

View File

@@ -36,6 +36,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \
file://CVE-2023-38472.patch \
file://CVE-2023-38473.patch \
file://CVE-2024-52616.patch \
file://CVE-2024-52615.patch \
"
GITHUB_BASE_URI = "https://github.com/avahi/avahi/releases/"

View File

@@ -0,0 +1,228 @@
From 4e2e1ea0908d7e6ad7f38ae04fdcdf2411f8b942 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Wed, 27 Nov 2024 18:07:32 +0100
Subject: [PATCH] core/wide-area: fix for CVE-2024-52615
CVE: CVE-2024-52615
Upstream-Status: Backport [https://github.com/avahi/avahi/commit/4e2e1ea0908d7e6ad7f38ae04fdcdf2411f8b942]
Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
---
avahi-core/wide-area.c | 128 ++++++++++++++++++++++-------------------
1 file changed, 69 insertions(+), 59 deletions(-)
diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c
index 00a15056e..06df7afc6 100644
--- a/avahi-core/wide-area.c
+++ b/avahi-core/wide-area.c
@@ -81,6 +81,10 @@ struct AvahiWideAreaLookup {
AvahiAddress dns_server_used;
+ int fd;
+ AvahiWatch *watch;
+ AvahiProtocol proto;
+
AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, lookups);
AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, by_key);
};
@@ -88,9 +92,6 @@ struct AvahiWideAreaLookup {
struct AvahiWideAreaLookupEngine {
AvahiServer *server;
- int fd_ipv4, fd_ipv6;
- AvahiWatch *watch_ipv4, *watch_ipv6;
-
/* Cache */
AVAHI_LLIST_HEAD(AvahiWideAreaCacheEntry, cache);
AvahiHashmap *cache_by_key;
@@ -125,35 +126,67 @@ static AvahiWideAreaLookup* find_lookup(AvahiWideAreaLookupEngine *e, uint16_t i
return l;
}
+static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata);
+
static int send_to_dns_server(AvahiWideAreaLookup *l, AvahiDnsPacket *p) {
+ AvahiWideAreaLookupEngine *e;
AvahiAddress *a;
+ AvahiServer *s;
+ AvahiWatch *w;
+ int r;
assert(l);
assert(p);
- if (l->engine->n_dns_servers <= 0)
+ e = l->engine;
+ assert(e);
+
+ s = e->server;
+ assert(s);
+
+ if (e->n_dns_servers <= 0)
return -1;
- assert(l->engine->current_dns_server < l->engine->n_dns_servers);
+ assert(e->current_dns_server < e->n_dns_servers);
- a = &l->engine->dns_servers[l->engine->current_dns_server];
+ a = &e->dns_servers[e->current_dns_server];
l->dns_server_used = *a;
- if (a->proto == AVAHI_PROTO_INET) {
+ if (l->fd >= 0) {
+ /* We are reusing lookup object and sending packet to another server so let's cleanup before we establish connection to new server. */
+ s->poll_api->watch_free(l->watch);
+ l->watch = NULL;
- if (l->engine->fd_ipv4 < 0)
- return -1;
+ close(l->fd);
+ l->fd = -EBADF;
+ }
- return avahi_send_dns_packet_ipv4(l->engine->fd_ipv4, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv4, AVAHI_DNS_PORT);
+ assert(a->proto == AVAHI_PROTO_INET || a->proto == AVAHI_PROTO_INET6);
- } else {
- assert(a->proto == AVAHI_PROTO_INET6);
+ if (a->proto == AVAHI_PROTO_INET)
+ r = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1;
+ else
+ r = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1;
- if (l->engine->fd_ipv6 < 0)
- return -1;
+ if (r < 0) {
+ avahi_log_error(__FILE__ ": Failed to create socket for wide area lookup");
+ return -1;
+ }
- return avahi_send_dns_packet_ipv6(l->engine->fd_ipv6, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv6, AVAHI_DNS_PORT);
+ w = s->poll_api->watch_new(s->poll_api, r, AVAHI_WATCH_IN, socket_event, l);
+ if (!w) {
+ close(r);
+ avahi_log_error(__FILE__ ": Failed to create socket watch for wide area lookup");
+ return -1;
}
+
+ l->fd = r;
+ l->watch = w;
+ l->proto = a->proto;
+
+ return a->proto == AVAHI_PROTO_INET ?
+ avahi_send_dns_packet_ipv4(l->fd, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv4, AVAHI_DNS_PORT):
+ avahi_send_dns_packet_ipv6(l->fd, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv6, AVAHI_DNS_PORT);
}
static void next_dns_server(AvahiWideAreaLookupEngine *e) {
@@ -246,6 +279,9 @@ AvahiWideAreaLookup *avahi_wide_area_lookup_new(
l->dead = 0;
l->key = avahi_key_ref(key);
l->cname_key = avahi_key_new_cname(l->key);
+ l->fd = -EBADF;
+ l->watch = NULL;
+ l->proto = AVAHI_PROTO_UNSPEC;
l->callback = callback;
l->userdata = userdata;
@@ -314,6 +350,12 @@ static void lookup_destroy(AvahiWideAreaLookup *l) {
if (l->cname_key)
avahi_key_unref(l->cname_key);
+ if (l->watch)
+ l->engine->server->poll_api->watch_free(l->watch);
+
+ if (l->fd >= 0)
+ close(l->fd);
+
avahi_free(l);
}
@@ -572,14 +614,20 @@ static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) {
}
static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata) {
- AvahiWideAreaLookupEngine *e = userdata;
+ AvahiWideAreaLookup *l = userdata;
+ AvahiWideAreaLookupEngine *e = l->engine;
AvahiDnsPacket *p = NULL;
- if (fd == e->fd_ipv4)
- p = avahi_recv_dns_packet_ipv4(e->fd_ipv4, NULL, NULL, NULL, NULL, NULL);
+ assert(l);
+ assert(e);
+ assert(l->fd == fd);
+
+ if (l->proto == AVAHI_PROTO_INET)
+ p = avahi_recv_dns_packet_ipv4(l->fd, NULL, NULL, NULL, NULL, NULL);
else {
- assert(fd == e->fd_ipv6);
- p = avahi_recv_dns_packet_ipv6(e->fd_ipv6, NULL, NULL, NULL, NULL, NULL);
+ assert(l->proto == AVAHI_PROTO_INET6);
+
+ p = avahi_recv_dns_packet_ipv6(l->fd, NULL, NULL, NULL, NULL, NULL);
}
if (p) {
@@ -598,32 +646,6 @@ AvahiWideAreaLookupEngine *avahi_wide_area_engine_new(AvahiServer *s) {
e->server = s;
e->cleanup_dead = 0;
- /* Create sockets */
- e->fd_ipv4 = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1;
- e->fd_ipv6 = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1;
-
- if (e->fd_ipv4 < 0 && e->fd_ipv6 < 0) {
- avahi_log_error(__FILE__": Failed to create wide area sockets: %s", strerror(errno));
-
- if (e->fd_ipv6 >= 0)
- close(e->fd_ipv6);
-
- if (e->fd_ipv4 >= 0)
- close(e->fd_ipv4);
-
- avahi_free(e);
- return NULL;
- }
-
- /* Create watches */
-
- e->watch_ipv4 = e->watch_ipv6 = NULL;
-
- if (e->fd_ipv4 >= 0)
- e->watch_ipv4 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv4, AVAHI_WATCH_IN, socket_event, e);
- if (e->fd_ipv6 >= 0)
- e->watch_ipv6 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv6, AVAHI_WATCH_IN, socket_event, e);
-
e->n_dns_servers = e->current_dns_server = 0;
/* Initialize cache */
@@ -651,18 +673,6 @@ void avahi_wide_area_engine_free(AvahiWideAreaLookupEngine *e) {
avahi_hashmap_free(e->lookups_by_id);
avahi_hashmap_free(e->lookups_by_key);
- if (e->watch_ipv4)
- e->server->poll_api->watch_free(e->watch_ipv4);
-
- if (e->watch_ipv6)
- e->server->poll_api->watch_free(e->watch_ipv6);
-
- if (e->fd_ipv6 >= 0)
- close(e->fd_ipv6);
-
- if (e->fd_ipv4 >= 0)
- close(e->fd_ipv4);
-
avahi_free(e);
}
@@ -680,7 +690,7 @@ void avahi_wide_area_set_servers(AvahiWideAreaLookupEngine *e, const AvahiAddres
if (a) {
for (e->n_dns_servers = 0; n > 0 && e->n_dns_servers < AVAHI_WIDE_AREA_SERVERS_MAX; a++, n--)
- if ((a->proto == AVAHI_PROTO_INET && e->fd_ipv4 >= 0) || (a->proto == AVAHI_PROTO_INET6 && e->fd_ipv6 >= 0))
+ if (a->proto == AVAHI_PROTO_INET || a->proto == AVAHI_PROTO_INET6)
e->dns_servers[e->n_dns_servers++] = *a;
} else {
assert(n == 0);

View File

@@ -6,6 +6,7 @@ After=time-sync.target
[Service]
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
[Install]

View File

@@ -6,6 +6,7 @@ After=time-sync.target
[Service]
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf

View File

@@ -6,6 +6,7 @@ After=time-sync.target
[Service]
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf

View File

@@ -4,20 +4,20 @@ export OPENSSL_ENGINES="$OECORE_NATIVE_SYSROOT/usr/lib/engines-3"
# Respect host env SSL_CERT_FILE/SSL_CERT_DIR first, then auto-detected host cert, then cert in buildtools
# CAFILE/CAPATH is auto-deteced when source buildtools
if [ -z "$SSL_CERT_FILE" ]; then
if [ -n "$CAFILE" ];then
export SSL_CERT_FILE="$CAFILE"
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs/ca-certificates.crt"
fi
if [ -z "${SSL_CERT_FILE:-}" ]; then
if [ -n "${CAFILE:-}" ];then
export SSL_CERT_FILE="$CAFILE"
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs/ca-certificates.crt"
fi
fi
if [ -z "$SSL_CERT_DIR" ]; then
if [ -n "$CAPATH" ];then
export SSL_CERT_DIR="$CAPATH"
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs"
fi
if [ -z "${SSL_CERT_DIR:-}" ]; then
if [ -n "${CAPATH:-}" ];then
export SSL_CERT_DIR="$CAPATH"
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs"
fi
fi
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} SSL_CERT_DIR SSL_CERT_FILE"

View File

@@ -0,0 +1,44 @@
From e70e34d857d4003199bcb5d3b52ca8102ccc1b98 Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tomas@openssl.org>
Date: Mon, 5 Aug 2024 17:54:14 +0200
Subject: [PATCH] dh_kmgmt.c: Avoid expensive public key validation for known
safe-prime groups
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The partial validation is fully sufficient to check the key validity.
Thanks to Szilárd Pfeiffer for reporting the issue.
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25088)
CVE: CVE-2024-41996
Upstream-Status: Backport [https://github.com/openssl/openssl/commit/e70e34d857d4003199bcb5d3b52ca8102ccc1b98]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
providers/implementations/keymgmt/dh_kmgmt.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c
index 82c3093b12..ebdce76710 100644
--- a/providers/implementations/keymgmt/dh_kmgmt.c
+++ b/providers/implementations/keymgmt/dh_kmgmt.c
@@ -387,9 +387,11 @@ static int dh_validate_public(const DH *dh, int checktype)
if (pub_key == NULL)
return 0;
- /* The partial test is only valid for named group's with q = (p - 1) / 2 */
- if (checktype == OSSL_KEYMGMT_VALIDATE_QUICK_CHECK
- && ossl_dh_is_named_safe_prime_group(dh))
+ /*
+ * The partial test is only valid for named group's with q = (p - 1) / 2
+ * but for that case it is also fully sufficient to check the key validity.
+ */
+ if (ossl_dh_is_named_safe_prime_group(dh))
return ossl_dh_check_pub_key_partial(dh, pub_key, &res);
return DH_check_pub_key_ex(dh, pub_key);

View File

@@ -12,13 +12,14 @@ SRC_URI = "https://github.com/openssl/openssl/releases/download/openssl-${PV}/op
file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
file://0001-Configure-do-not-tweak-mips-cflags.patch \
file://0001-Added-handshake-history-reporting-when-test-fails.patch \
file://CVE-2024-41996.patch \
"
SRC_URI:append:class-nativesdk = " \
file://environment.d-openssl.sh \
"
SRC_URI[sha256sum] = "b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716"
SRC_URI[sha256sum] = "89681a9ddaa9ed7cf25ea8ef61338db805200bae47d00510490623547380c148"
inherit lib_package multilib_header multilib_script ptest perlnative manpages
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"

View File

@@ -0,0 +1,254 @@
From 9d3f347a2b14652e767d51142600206a32676b62 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <quic_jouni@quicinc.com>
Date: Mon, 24 Jan 2022 20:57:19 +0200
Subject: [PATCH] DPP3: Add PKEX initiator retries and fallback from v2 to v1
for hostapd
This extends hostapd with the design used in wpa_supplicant for PKEX
initiator retries and automatic version fallback from v2 to v1 (the
latter is enabled only with CONFIG_DPP3=y).
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
CVE: CVE-2022-37660
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=9d3f347a2b14652e767d51142600206a32676b62]
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
---
src/ap/dpp_hostapd.c | 188 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 171 insertions(+), 17 deletions(-)
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index 13e1fc5..6c30ba3 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -216,6 +216,163 @@ static void hostapd_dpp_auth_resp_retry(struct hostapd_data *hapd)
}
+static int hostapd_dpp_allow_ir(struct hostapd_data *hapd, unsigned int freq)
+{
+ int i, j;
+
+ if (!hapd->iface->hw_features)
+ return -1;
+
+ for (i = 0; i < hapd->iface->num_hw_features; i++) {
+ struct hostapd_hw_modes *mode = &hapd->iface->hw_features[i];
+
+ for (j = 0; j < mode->num_channels; j++) {
+ struct hostapd_channel_data *chan = &mode->channels[j];
+
+ if (chan->freq != (int) freq)
+ continue;
+
+ if (chan->flag & (HOSTAPD_CHAN_DISABLED |
+ HOSTAPD_CHAN_NO_IR |
+ HOSTAPD_CHAN_RADAR))
+ continue;
+
+ return 1;
+ }
+ }
+
+ wpa_printf(MSG_DEBUG,
+ "DPP: Frequency %u MHz not supported or does not allow PKEX initiation in the current channel list",
+ freq);
+
+ return 0;
+}
+
+
+static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
+ struct dpp_pkex *pkex)
+{
+ if (pkex->freq == 2437)
+ pkex->freq = 5745;
+ else if (pkex->freq == 5745)
+ pkex->freq = 5220;
+ else if (pkex->freq == 5220)
+ pkex->freq = 60480;
+ else
+ return -1; /* no more channels to try */
+
+ if (hostapd_dpp_allow_ir(hapd, pkex->freq) == 1) {
+ wpa_printf(MSG_DEBUG, "DPP: Try to initiate on %u MHz",
+ pkex->freq);
+ return 0;
+ }
+
+ /* Could not use this channel - try the next one */
+ return hostapd_dpp_pkex_next_channel(hapd, pkex);
+}
+
+
+static int hostapd_dpp_pkex_init(struct hostapd_data *hapd, bool v2)
+{
+ struct dpp_pkex *pkex;
+ struct wpabuf *msg;
+ unsigned int wait_time;
+
+ wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
+ dpp_pkex_free(hapd->dpp_pkex);
+ hapd->dpp_pkex = dpp_pkex_init(hapd->msg_ctx, hapd->dpp_pkex_bi,
+ hapd->own_addr,
+ hapd->dpp_pkex_identifier,
+ hapd->dpp_pkex_code, v2);
+ pkex = hapd->dpp_pkex;
+ if (!pkex)
+ return -1;
+
+ msg = hapd->dpp_pkex->exchange_req;
+ wait_time = 2000; /* TODO: hapd->max_remain_on_chan; */
+ pkex->freq = 2437;
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
+ " freq=%u type=%d", MAC2STR(broadcast), pkex->freq,
+ v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
+ DPP_PA_PKEX_V1_EXCHANGE_REQ);
+ hostapd_drv_send_action(hapd, pkex->freq, 0, broadcast,
+ wpabuf_head(msg), wpabuf_len(msg));
+ pkex->exch_req_wait_time = wait_time;
+ pkex->exch_req_tries = 1;
+
+ return 0;
+}
+
+
+static void hostapd_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
+{
+ struct hostapd_data *hapd = eloop_ctx;
+ struct dpp_pkex *pkex = hapd->dpp_pkex;
+
+ if (!pkex || !pkex->exchange_req)
+ return;
+ if (pkex->exch_req_tries >= 5) {
+ if (hostapd_dpp_pkex_next_channel(hapd, pkex) < 0) {
+#ifdef CONFIG_DPP3
+ if (pkex->v2) {
+ wpa_printf(MSG_DEBUG,
+ "DPP: Fall back to PKEXv1");
+ hostapd_dpp_pkex_init(hapd, false);
+ return;
+ }
+#endif /* CONFIG_DPP3 */
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_FAIL
+ "No response from PKEX peer");
+ dpp_pkex_free(pkex);
+ hapd->dpp_pkex = NULL;
+ return;
+ }
+ pkex->exch_req_tries = 0;
+ }
+
+ pkex->exch_req_tries++;
+ wpa_printf(MSG_DEBUG, "DPP: Retransmit PKEX Exchange Request (try %u)",
+ pkex->exch_req_tries);
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
+ " freq=%u type=%d",
+ MAC2STR(broadcast), pkex->freq,
+ pkex->v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
+ DPP_PA_PKEX_V1_EXCHANGE_REQ);
+ hostapd_drv_send_action(hapd, pkex->freq, pkex->exch_req_wait_time,
+ broadcast,
+ wpabuf_head(pkex->exchange_req),
+ wpabuf_len(pkex->exchange_req));
+}
+
+
+static void hostapd_dpp_pkex_tx_status(struct hostapd_data *hapd, const u8 *dst,
+ const u8 *data, size_t data_len, int ok)
+{
+ struct dpp_pkex *pkex = hapd->dpp_pkex;
+
+ if (pkex->failed) {
+ wpa_printf(MSG_DEBUG,
+ "DPP: Terminate PKEX exchange due to an earlier error");
+ if (pkex->t > pkex->own_bi->pkex_t)
+ pkex->own_bi->pkex_t = pkex->t;
+ dpp_pkex_free(pkex);
+ hapd->dpp_pkex = NULL;
+ return;
+ }
+
+ if (pkex->exch_req_wait_time && pkex->exchange_req) {
+ /* Wait for PKEX Exchange Response frame and retry request if
+ * no response is seen. */
+ eloop_cancel_timeout(hostapd_dpp_pkex_retry_timeout, hapd,
+ NULL);
+ eloop_register_timeout(pkex->exch_req_wait_time / 1000,
+ (pkex->exch_req_wait_time % 1000) * 1000,
+ hostapd_dpp_pkex_retry_timeout, hapd,
+ NULL);
+ }
+}
+
+
void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst,
const u8 *data, size_t data_len, int ok)
{
@@ -227,6 +384,11 @@ void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst,
" result=%s", MAC2STR(dst), ok ? "SUCCESS" : "FAILED");
if (!hapd->dpp_auth) {
+ if (hapd->dpp_pkex) {
+ hostapd_dpp_pkex_tx_status(hapd, dst, data, data_len,
+ ok);
+ return;
+ }
wpa_printf(MSG_DEBUG,
"DPP: Ignore TX status since there is no ongoing authentication exchange");
return;
@@ -1783,6 +1945,9 @@ hostapd_dpp_rx_pkex_exchange_resp(struct hostapd_data *hapd, const u8 *src,
return;
}
+ eloop_cancel_timeout(hostapd_dpp_pkex_retry_timeout, hapd, NULL);
+ hapd->dpp_pkex->exch_req_wait_time = 0;
+
msg = dpp_pkex_rx_exchange_resp(hapd->dpp_pkex, src, buf, len);
if (!msg) {
wpa_printf(MSG_DEBUG, "DPP: Failed to process the response");
@@ -2172,26 +2337,14 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
return -1;
if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
- struct wpabuf *msg;
+#ifdef CONFIG_DPP3
+ bool v2 = true;
+#else /* CONFIG_DPP3 */
bool v2 = os_strstr(cmd, " init=2") != NULL;
+#endif /* CONFIG_DPP3 */
- wpa_printf(MSG_DEBUG, "DPP: Initiating PKEX");
- dpp_pkex_free(hapd->dpp_pkex);
- hapd->dpp_pkex = dpp_pkex_init(hapd->msg_ctx, own_bi,
- hapd->own_addr,
- hapd->dpp_pkex_identifier,
- hapd->dpp_pkex_code, v2);
- if (!hapd->dpp_pkex)
+ if (hostapd_dpp_pkex_init(hapd, v2) < 0)
return -1;
-
- msg = hapd->dpp_pkex->exchange_req;
- /* TODO: Which channel to use? */
- wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
- " freq=%u type=%d", MAC2STR(broadcast), 2437,
- v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
- DPP_PA_PKEX_V1_EXCHANGE_REQ);
- hostapd_drv_send_action(hapd, 2437, 0, broadcast,
- wpabuf_head(msg), wpabuf_len(msg));
}
/* TODO: Support multiple PKEX info entries */
@@ -2319,6 +2472,7 @@ void hostapd_dpp_deinit(struct hostapd_data *hapd)
#endif /* CONFIG_TESTING_OPTIONS */
if (!hapd->dpp_init_done)
return;
+ eloop_cancel_timeout(hostapd_dpp_pkex_retry_timeout, hapd, NULL);
eloop_cancel_timeout(hostapd_dpp_reply_wait_timeout, hapd, NULL);
eloop_cancel_timeout(hostapd_dpp_auth_conf_wait_timeout, hapd, NULL);
eloop_cancel_timeout(hostapd_dpp_init_timeout, hapd, NULL);
--
2.40.0

View File

@@ -0,0 +1,139 @@
From 80213629981a21825e4688fde1b590e4c4d4bcea Mon Sep 17 00:00:00 2001
From: Jouni Malinen <quic_jouni@quicinc.com>
Date: Mon, 24 Jan 2022 20:21:24 +0200
Subject: [PATCH] DPP3: Start with PKEXv2 and fall back to v1
Use automatic PKEX version negotiation as the initiator by starting with
PKEXv2 and if no response is received, trying again with PKEXv1. For
now, this is enabled only in wpa_supplicant CONFIG_DPP3=y builds.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
CVE: CVE-2022-37660
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=80213629981a21825e4688fde1b590e4c4d4bcea]
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
---
wpa_supplicant/dpp_supplicant.c | 81 +++++++++++++++++++++------------
1 file changed, 52 insertions(+), 29 deletions(-)
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 584654a..43c85d3 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2557,6 +2557,45 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
}
+static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s, bool v2)
+{
+ struct dpp_pkex *pkex;
+ struct wpabuf *msg;
+ unsigned int wait_time;
+
+ wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
+ dpp_pkex_free(wpa_s->dpp_pkex);
+ wpa_s->dpp_pkex = dpp_pkex_init(wpa_s, wpa_s->dpp_pkex_bi,
+ wpa_s->own_addr,
+ wpa_s->dpp_pkex_identifier,
+ wpa_s->dpp_pkex_code, v2);
+ pkex = wpa_s->dpp_pkex;
+ if (!pkex)
+ return -1;
+
+ msg = pkex->exchange_req;
+ wait_time = wpa_s->max_remain_on_chan;
+ if (wait_time > 2000)
+ wait_time = 2000;
+ pkex->freq = 2437;
+ wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
+ " freq=%u type=%d",
+ MAC2STR(broadcast), pkex->freq,
+ v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
+ DPP_PA_PKEX_V1_EXCHANGE_REQ);
+ offchannel_send_action(wpa_s, pkex->freq, broadcast,
+ wpa_s->own_addr, broadcast,
+ wpabuf_head(msg), wpabuf_len(msg),
+ wait_time, wpas_dpp_tx_pkex_status, 0);
+ if (wait_time == 0)
+ wait_time = 2000;
+ pkex->exch_req_wait_time = wait_time;
+ pkex->exch_req_tries = 1;
+
+ return 0;
+}
+
+
static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
{
struct wpa_supplicant *wpa_s = eloop_ctx;
@@ -2566,6 +2605,14 @@ static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
return;
if (pkex->exch_req_tries >= 5) {
if (wpas_dpp_pkex_next_channel(wpa_s, pkex) < 0) {
+#ifdef CONFIG_DPP3
+ if (pkex->v2) {
+ wpa_printf(MSG_DEBUG,
+ "DPP: Fall back to PKEXv1");
+ wpas_dpp_pkex_init(wpa_s, false);
+ return;
+ }
+#endif /* CONFIG_DPP3 */
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_FAIL
"No response from PKEX peer");
dpp_pkex_free(pkex);
@@ -3271,7 +3318,6 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
{
struct dpp_bootstrap_info *own_bi;
const char *pos, *end;
- unsigned int wait_time;
pos = os_strstr(cmd, " own=");
if (!pos)
@@ -3315,37 +3361,14 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
return -1;
if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
- struct dpp_pkex *pkex;
- struct wpabuf *msg;
+#ifdef CONFIG_DPP3
+ bool v2 = true;
+#else /* CONFIG_DPP3 */
bool v2 = os_strstr(cmd, " init=2") != NULL;
+#endif /* CONFIG_DPP3 */
- wpa_printf(MSG_DEBUG, "DPP: Initiating PKEX");
- dpp_pkex_free(wpa_s->dpp_pkex);
- wpa_s->dpp_pkex = dpp_pkex_init(wpa_s, own_bi, wpa_s->own_addr,
- wpa_s->dpp_pkex_identifier,
- wpa_s->dpp_pkex_code, v2);
- pkex = wpa_s->dpp_pkex;
- if (!pkex)
+ if (wpas_dpp_pkex_init(wpa_s, v2) < 0)
return -1;
-
- msg = pkex->exchange_req;
- wait_time = wpa_s->max_remain_on_chan;
- if (wait_time > 2000)
- wait_time = 2000;
- pkex->freq = 2437;
- wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
- " freq=%u type=%d",
- MAC2STR(broadcast), pkex->freq,
- v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
- DPP_PA_PKEX_V1_EXCHANGE_REQ);
- offchannel_send_action(wpa_s, pkex->freq, broadcast,
- wpa_s->own_addr, broadcast,
- wpabuf_head(msg), wpabuf_len(msg),
- wait_time, wpas_dpp_tx_pkex_status, 0);
- if (wait_time == 0)
- wait_time = 2000;
- pkex->exch_req_wait_time = wait_time;
- pkex->exch_req_tries = 1;
}
/* TODO: Support multiple PKEX info entries */
--
2.40.0

View File

@@ -0,0 +1,196 @@
From bdcccbc2755dd1a75731496782e02b5435fb9534 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <quic_jouni@quicinc.com>
Date: Tue, 25 Jan 2022 20:06:49 +0200
Subject: [PATCH] DPP: Change PKEX version configuration design
Use a separate ver=<1|2> parameter to DPP_PKEX_ADD instead of
overloading init=1 with version indication. This allows additional
options for forcing v1-only and v2-only in addition to automatic mode
(start with v2 and fall back to v1, if needed).
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
CVE: CVE-2022-37660
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=bdcccbc2755dd1a75731496782e02b5435fb9534]
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
---
src/ap/dpp_hostapd.c | 37 ++++++++++++++++++++++++++-------
src/common/dpp.h | 1 +
wpa_supplicant/dpp_supplicant.c | 37 ++++++++++++++++++++++++++-------
3 files changed, 61 insertions(+), 14 deletions(-)
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index 6c30ba3..fdfdcf9 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -272,11 +272,19 @@ static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
}
-static int hostapd_dpp_pkex_init(struct hostapd_data *hapd, bool v2)
+enum hostapd_dpp_pkex_ver {
+ PKEX_VER_AUTO,
+ PKEX_VER_ONLY_1,
+ PKEX_VER_ONLY_2,
+};
+
+static int hostapd_dpp_pkex_init(struct hostapd_data *hapd,
+ enum hostapd_dpp_pkex_ver ver)
{
struct dpp_pkex *pkex;
struct wpabuf *msg;
unsigned int wait_time;
+ bool v2 = ver != PKEX_VER_ONLY_1;
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
dpp_pkex_free(hapd->dpp_pkex);
@@ -287,6 +295,7 @@ static int hostapd_dpp_pkex_init(struct hostapd_data *hapd, bool v2)
pkex = hapd->dpp_pkex;
if (!pkex)
return -1;
+ pkex->forced_ver = ver != PKEX_VER_AUTO;
msg = hapd->dpp_pkex->exchange_req;
wait_time = 2000; /* TODO: hapd->max_remain_on_chan; */
@@ -314,10 +323,10 @@ static void hostapd_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
if (pkex->exch_req_tries >= 5) {
if (hostapd_dpp_pkex_next_channel(hapd, pkex) < 0) {
#ifdef CONFIG_DPP3
- if (pkex->v2) {
+ if (pkex->v2 && !pkex->forced_ver) {
wpa_printf(MSG_DEBUG,
"DPP: Fall back to PKEXv1");
- hostapd_dpp_pkex_init(hapd, false);
+ hostapd_dpp_pkex_init(hapd, PKEX_VER_ONLY_1);
return;
}
#endif /* CONFIG_DPP3 */
@@ -2336,14 +2345,28 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
if (!hapd->dpp_pkex_code)
return -1;
- if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
+ if (os_strstr(cmd, " init=1")) {
#ifdef CONFIG_DPP3
- bool v2 = true;
+ enum hostapd_dpp_pkex_ver ver = PKEX_VER_AUTO;
#else /* CONFIG_DPP3 */
- bool v2 = os_strstr(cmd, " init=2") != NULL;
+ enum hostapd_dpp_pkex_ver ver = PKEX_VER_ONLY_1;
#endif /* CONFIG_DPP3 */
- if (hostapd_dpp_pkex_init(hapd, v2) < 0)
+ pos = os_strstr(cmd, " ver=");
+ if (pos) {
+ int v;
+
+ pos += 5;
+ v = atoi(pos);
+ if (v == 1)
+ ver = PKEX_VER_ONLY_1;
+ else if (v == 2)
+ ver = PKEX_VER_ONLY_2;
+ else
+ return -1;
+ }
+
+ if (hostapd_dpp_pkex_init(hapd, ver) < 0)
return -1;
}
diff --git a/src/common/dpp.h b/src/common/dpp.h
index 8d62a0e..bfea446 100644
--- a/src/common/dpp.h
+++ b/src/common/dpp.h
@@ -177,6 +177,7 @@ struct dpp_pkex {
unsigned int exchange_done:1;
unsigned int failed:1;
unsigned int v2:1;
+ unsigned int forced_ver:1;
struct dpp_bootstrap_info *own_bi;
u8 own_mac[ETH_ALEN];
u8 peer_mac[ETH_ALEN];
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 43c85d3..61b300f 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2557,11 +2557,19 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
}
-static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s, bool v2)
+enum wpas_dpp_pkex_ver {
+ PKEX_VER_AUTO,
+ PKEX_VER_ONLY_1,
+ PKEX_VER_ONLY_2,
+};
+
+static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s,
+ enum wpas_dpp_pkex_ver ver)
{
struct dpp_pkex *pkex;
struct wpabuf *msg;
unsigned int wait_time;
+ bool v2 = ver != PKEX_VER_ONLY_1;
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
dpp_pkex_free(wpa_s->dpp_pkex);
@@ -2572,6 +2580,7 @@ static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s, bool v2)
pkex = wpa_s->dpp_pkex;
if (!pkex)
return -1;
+ pkex->forced_ver = ver != PKEX_VER_AUTO;
msg = pkex->exchange_req;
wait_time = wpa_s->max_remain_on_chan;
@@ -2606,10 +2615,10 @@ static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
if (pkex->exch_req_tries >= 5) {
if (wpas_dpp_pkex_next_channel(wpa_s, pkex) < 0) {
#ifdef CONFIG_DPP3
- if (pkex->v2) {
+ if (pkex->v2 && !pkex->forced_ver) {
wpa_printf(MSG_DEBUG,
"DPP: Fall back to PKEXv1");
- wpas_dpp_pkex_init(wpa_s, false);
+ wpas_dpp_pkex_init(wpa_s, PKEX_VER_ONLY_1);
return;
}
#endif /* CONFIG_DPP3 */
@@ -3360,14 +3369,28 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
if (!wpa_s->dpp_pkex_code)
return -1;
- if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
+ if (os_strstr(cmd, " init=1")) {
#ifdef CONFIG_DPP3
- bool v2 = true;
+ enum wpas_dpp_pkex_ver ver = PKEX_VER_AUTO;
#else /* CONFIG_DPP3 */
- bool v2 = os_strstr(cmd, " init=2") != NULL;
+ enum wpas_dpp_pkex_ver ver = PKEX_VER_ONLY_1;
#endif /* CONFIG_DPP3 */
- if (wpas_dpp_pkex_init(wpa_s, v2) < 0)
+ pos = os_strstr(cmd, " ver=");
+ if (pos) {
+ int v;
+
+ pos += 5;
+ v = atoi(pos);
+ if (v == 1)
+ ver = PKEX_VER_ONLY_1;
+ else if (v == 2)
+ ver = PKEX_VER_ONLY_2;
+ else
+ return -1;
+ }
+
+ if (wpas_dpp_pkex_init(wpa_s, ver) < 0)
return -1;
}
--
2.40.0

View File

@@ -0,0 +1,941 @@
From d7be749335f2585658cf98c4f0e7d6cd5ac06865 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <jouni@qca.qualcomm.com>
Date: Tue, 25 Jan 2022 00:35:36 +0200
Subject: [PATCH] DPP3: PKEX over TCP
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
CVE: CVE-2022-37660
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=d7be749335f2585658cf98c4f0e7d6cd5ac06865]
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
---
src/ap/dpp_hostapd.c | 155 ++++++++++++++--
src/common/dpp.h | 13 ++
src/common/dpp_pkex.c | 18 +-
src/common/dpp_tcp.c | 308 +++++++++++++++++++++++++++++++-
wpa_supplicant/dpp_supplicant.c | 122 ++++++++++++-
5 files changed, 580 insertions(+), 36 deletions(-)
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index fdfdcf9..d956be9 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -28,12 +28,16 @@ static void hostapd_dpp_auth_conf_wait_timeout(void *eloop_ctx,
static void hostapd_dpp_auth_success(struct hostapd_data *hapd, int initiator);
static void hostapd_dpp_init_timeout(void *eloop_ctx, void *timeout_ctx);
static int hostapd_dpp_auth_init_next(struct hostapd_data *hapd);
+static void hostapd_dpp_set_testing_options(struct hostapd_data *hapd,
+ struct dpp_authentication *auth);
#ifdef CONFIG_DPP2
static void hostapd_dpp_reconfig_reply_wait_timeout(void *eloop_ctx,
void *timeout_ctx);
static void hostapd_dpp_handle_config_obj(struct hostapd_data *hapd,
struct dpp_authentication *auth,
struct dpp_config_obj *conf);
+static int hostapd_dpp_process_conf_obj(void *ctx,
+ struct dpp_authentication *auth);
#endif /* CONFIG_DPP2 */
static const u8 broadcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
@@ -272,6 +276,75 @@ static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
}
+#ifdef CONFIG_DPP2
+static int hostapd_dpp_pkex_done(void *ctx, void *conn,
+ struct dpp_bootstrap_info *peer_bi)
+{
+ struct hostapd_data *hapd = ctx;
+ const char *cmd = hapd->dpp_pkex_auth_cmd;
+ const char *pos;
+ u8 allowed_roles = DPP_CAPAB_CONFIGURATOR;
+ struct dpp_bootstrap_info *own_bi = NULL;
+ struct dpp_authentication *auth;
+
+ if (!cmd)
+ cmd = "";
+ wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
+ cmd);
+
+ pos = os_strstr(cmd, " own=");
+ if (pos) {
+ pos += 5;
+ own_bi = dpp_bootstrap_get_id(hapd->iface->interfaces->dpp,
+ atoi(pos));
+ if (!own_bi) {
+ wpa_printf(MSG_INFO,
+ "DPP: Could not find bootstrapping info for the identified local entry");
+ return -1;
+ }
+
+ if (peer_bi->curve != own_bi->curve) {
+ wpa_printf(MSG_INFO,
+ "DPP: Mismatching curves in bootstrapping info (peer=%s own=%s)",
+ peer_bi->curve->name, own_bi->curve->name);
+ return -1;
+ }
+ }
+
+ pos = os_strstr(cmd, " role=");
+ if (pos) {
+ pos += 6;
+ if (os_strncmp(pos, "configurator", 12) == 0)
+ allowed_roles = DPP_CAPAB_CONFIGURATOR;
+ else if (os_strncmp(pos, "enrollee", 8) == 0)
+ allowed_roles = DPP_CAPAB_ENROLLEE;
+ else if (os_strncmp(pos, "either", 6) == 0)
+ allowed_roles = DPP_CAPAB_CONFIGURATOR |
+ DPP_CAPAB_ENROLLEE;
+ else
+ return -1;
+ }
+
+ auth = dpp_auth_init(hapd->iface->interfaces->dpp, hapd->msg_ctx,
+ peer_bi, own_bi, allowed_roles, 0,
+ hapd->iface->hw_features,
+ hapd->iface->num_hw_features);
+ if (!auth)
+ return -1;
+
+ hostapd_dpp_set_testing_options(hapd, auth);
+ if (dpp_set_configurator(auth, cmd) < 0) {
+ dpp_auth_deinit(auth);
+ return -1;
+ }
+
+ return dpp_tcp_auth(hapd->iface->interfaces->dpp, conn, auth,
+ hapd->conf->dpp_name, DPP_NETROLE_AP,
+ hostapd_dpp_process_conf_obj);
+}
+#endif /* CONFIG_DPP2 */
+
+
enum hostapd_dpp_pkex_ver {
PKEX_VER_AUTO,
PKEX_VER_ONLY_1,
@@ -279,7 +352,9 @@ enum hostapd_dpp_pkex_ver {
};
static int hostapd_dpp_pkex_init(struct hostapd_data *hapd,
- enum hostapd_dpp_pkex_ver ver)
+ enum hostapd_dpp_pkex_ver ver,
+ const struct hostapd_ip_addr *ipaddr,
+ int tcp_port)
{
struct dpp_pkex *pkex;
struct wpabuf *msg;
@@ -288,15 +363,26 @@ static int hostapd_dpp_pkex_init(struct hostapd_data *hapd,
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
dpp_pkex_free(hapd->dpp_pkex);
- hapd->dpp_pkex = dpp_pkex_init(hapd->msg_ctx, hapd->dpp_pkex_bi,
- hapd->own_addr,
- hapd->dpp_pkex_identifier,
- hapd->dpp_pkex_code, v2);
- pkex = hapd->dpp_pkex;
+ hapd->dpp_pkex = NULL;
+ pkex = dpp_pkex_init(hapd->msg_ctx, hapd->dpp_pkex_bi, hapd->own_addr,
+ hapd->dpp_pkex_identifier,
+ hapd->dpp_pkex_code, v2);
if (!pkex)
return -1;
pkex->forced_ver = ver != PKEX_VER_AUTO;
+ if (ipaddr) {
+#ifdef CONFIG_DPP2
+ return dpp_tcp_pkex_init(hapd->iface->interfaces->dpp, pkex,
+ ipaddr, tcp_port,
+ hapd->msg_ctx, hapd,
+ hostapd_dpp_pkex_done);
+#else /* CONFIG_DPP2 */
+ return -1;
+#endif /* CONFIG_DPP2 */
+ }
+
+ hapd->dpp_pkex = pkex;
msg = hapd->dpp_pkex->exchange_req;
wait_time = 2000; /* TODO: hapd->max_remain_on_chan; */
pkex->freq = 2437;
@@ -326,7 +412,8 @@ static void hostapd_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
if (pkex->v2 && !pkex->forced_ver) {
wpa_printf(MSG_DEBUG,
"DPP: Fall back to PKEXv1");
- hostapd_dpp_pkex_init(hapd, PKEX_VER_ONLY_1);
+ hostapd_dpp_pkex_init(hapd, PKEX_VER_ONLY_1,
+ NULL, 0);
return;
}
#endif /* CONFIG_DPP3 */
@@ -1883,7 +1970,7 @@ static void hostapd_dpp_rx_peer_disc_req(struct hostapd_data *hapd,
static void
hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
- const u8 *buf, size_t len,
+ const u8 *hdr, const u8 *buf, size_t len,
unsigned int freq, bool v2)
{
struct wpabuf *msg;
@@ -1897,14 +1984,14 @@ hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
if (!hapd->dpp_pkex_code || !hapd->dpp_pkex_bi) {
wpa_printf(MSG_DEBUG,
"DPP: No PKEX code configured - ignore request");
- return;
+ goto try_relay;
}
if (hapd->dpp_pkex) {
/* TODO: Support parallel operations */
wpa_printf(MSG_DEBUG,
"DPP: Already in PKEX session - ignore new request");
- return;
+ goto try_relay;
}
hapd->dpp_pkex = dpp_pkex_rx_exchange_req(hapd->msg_ctx,
@@ -1916,7 +2003,7 @@ hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
if (!hapd->dpp_pkex) {
wpa_printf(MSG_DEBUG,
"DPP: Failed to process the request - ignore it");
- return;
+ goto try_relay;
}
msg = hapd->dpp_pkex->exchange_resp;
@@ -1933,6 +2020,17 @@ hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
dpp_pkex_free(hapd->dpp_pkex);
hapd->dpp_pkex = NULL;
}
+
+ return;
+
+try_relay:
+#ifdef CONFIG_DPP2
+ if (v2)
+ dpp_relay_rx_action(hapd->iface->interfaces->dpp,
+ src, hdr, buf, len, freq, NULL, NULL, hapd);
+#else /* CONFIG_DPP2 */
+ wpa_printf(MSG_DEBUG, "DPP: No relay functionality included - skip");
+#endif /* CONFIG_DPP2 */
}
@@ -2132,12 +2230,12 @@ void hostapd_dpp_rx_action(struct hostapd_data *hapd, const u8 *src,
/* This is for PKEXv2, but for now, process only with
* CONFIG_DPP3 to avoid issues with a capability that has not
* been tested with other implementations. */
- hostapd_dpp_rx_pkex_exchange_req(hapd, src, buf, len, freq,
+ hostapd_dpp_rx_pkex_exchange_req(hapd, src, hdr, buf, len, freq,
true);
break;
#endif /* CONFIG_DPP3 */
case DPP_PA_PKEX_V1_EXCHANGE_REQ:
- hostapd_dpp_rx_pkex_exchange_req(hapd, src, buf, len, freq,
+ hostapd_dpp_rx_pkex_exchange_req(hapd, src, hdr, buf, len, freq,
false);
break;
case DPP_PA_PKEX_EXCHANGE_RESP:
@@ -2303,6 +2401,29 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
{
struct dpp_bootstrap_info *own_bi;
const char *pos, *end;
+ int tcp_port = DPP_TCP_PORT;
+ struct hostapd_ip_addr *ipaddr = NULL;
+#ifdef CONFIG_DPP2
+ struct hostapd_ip_addr ipaddr_buf;
+ char *addr;
+
+ pos = os_strstr(cmd, " tcp_port=");
+ if (pos) {
+ pos += 10;
+ tcp_port = atoi(pos);
+ }
+
+ addr = get_param(cmd, " tcp_addr=");
+ if (addr) {
+ int res;
+
+ res = hostapd_parse_ip_addr(addr, &ipaddr_buf);
+ os_free(addr);
+ if (res)
+ return -1;
+ ipaddr = &ipaddr_buf;
+ }
+#endif /* CONFIG_DPP2 */
pos = os_strstr(cmd, " own=");
if (!pos)
@@ -2366,8 +2487,14 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
return -1;
}
- if (hostapd_dpp_pkex_init(hapd, ver) < 0)
+ if (hostapd_dpp_pkex_init(hapd, ver, ipaddr, tcp_port) < 0)
return -1;
+ } else {
+#ifdef CONFIG_DPP2
+ dpp_controller_pkex_add(hapd->iface->interfaces->dpp, own_bi,
+ hapd->dpp_pkex_code,
+ hapd->dpp_pkex_identifier);
+#endif /* CONFIG_DPP2 */
}
/* TODO: Support multiple PKEX info entries */
diff --git a/src/common/dpp.h b/src/common/dpp.h
index bfea446..ca33fe3 100644
--- a/src/common/dpp.h
+++ b/src/common/dpp.h
@@ -550,6 +550,9 @@ int dpp_auth_conf_rx(struct dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len);
int dpp_notify_new_qr_code(struct dpp_authentication *auth,
struct dpp_bootstrap_info *peer_bi);
+void dpp_controller_pkex_add(struct dpp_global *dpp,
+ struct dpp_bootstrap_info *bi,
+ const char *code, const char *identifier);
struct dpp_configuration * dpp_configuration_alloc(const char *type);
int dpp_akm_psk(enum dpp_akm akm);
int dpp_akm_sae(enum dpp_akm akm);
@@ -688,12 +691,22 @@ struct dpp_authentication * dpp_controller_get_auth(struct dpp_global *dpp,
unsigned int id);
void dpp_controller_new_qr_code(struct dpp_global *dpp,
struct dpp_bootstrap_info *bi);
+int dpp_tcp_pkex_init(struct dpp_global *dpp, struct dpp_pkex *pkex,
+ const struct hostapd_ip_addr *addr, int port,
+ void *msg_ctx, void *cb_ctx,
+ int (*pkex_done)(void *ctx, void *conn,
+ struct dpp_bootstrap_info *bi));
int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
const struct hostapd_ip_addr *addr, int port,
const char *name, enum dpp_netrole netrole, void *msg_ctx,
void *cb_ctx,
int (*process_conf_obj)(void *ctx,
struct dpp_authentication *auth));
+int dpp_tcp_auth(struct dpp_global *dpp, void *_conn,
+ struct dpp_authentication *auth, const char *name,
+ enum dpp_netrole netrole,
+ int (*process_conf_obj)(void *ctx,
+ struct dpp_authentication *auth));
struct wpabuf * dpp_build_presence_announcement(struct dpp_bootstrap_info *bi);
void dpp_notify_chirp_received(void *msg_ctx, int id, const u8 *src,
diff --git a/src/common/dpp_pkex.c b/src/common/dpp_pkex.c
index 38349fa..72084d9 100644
--- a/src/common/dpp_pkex.c
+++ b/src/common/dpp_pkex.c
@@ -469,8 +469,10 @@ struct dpp_pkex * dpp_pkex_rx_exchange_req(void *msg_ctx,
pkex->t = bi->pkex_t;
pkex->msg_ctx = msg_ctx;
pkex->own_bi = bi;
- os_memcpy(pkex->own_mac, own_mac, ETH_ALEN);
- os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
+ if (own_mac)
+ os_memcpy(pkex->own_mac, own_mac, ETH_ALEN);
+ if (peer_mac)
+ os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
if (identifier) {
pkex->identifier = os_strdup(identifier);
if (!pkex->identifier)
@@ -742,7 +744,8 @@ struct wpabuf * dpp_pkex_rx_exchange_resp(struct dpp_pkex *pkex,
}
#endif /* CONFIG_DPP2 */
- os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
+ if (peer_mac)
+ os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
attr_status = dpp_get_attr(buf, buflen, DPP_ATTR_STATUS,
&attr_status_len);
@@ -1341,9 +1344,12 @@ dpp_pkex_finish(struct dpp_global *dpp, struct dpp_pkex *pkex, const u8 *peer,
return NULL;
bi->id = dpp_next_id(dpp);
bi->type = DPP_BOOTSTRAP_PKEX;
- os_memcpy(bi->mac_addr, peer, ETH_ALEN);
- bi->num_freq = 1;
- bi->freq[0] = freq;
+ if (peer)
+ os_memcpy(bi->mac_addr, peer, ETH_ALEN);
+ if (freq) {
+ bi->num_freq = 1;
+ bi->freq[0] = freq;
+ }
bi->curve = pkex->own_bi->curve;
bi->pubkey = pkex->peer_bootstrap_key;
pkex->peer_bootstrap_key = NULL;
diff --git a/src/common/dpp_tcp.c b/src/common/dpp_tcp.c
index fb8ef1c..1a8a7c7 100644
--- a/src/common/dpp_tcp.c
+++ b/src/common/dpp_tcp.c
@@ -24,10 +24,12 @@ struct dpp_connection {
struct dpp_controller *ctrl;
struct dpp_relay_controller *relay;
struct dpp_global *global;
+ struct dpp_pkex *pkex;
struct dpp_authentication *auth;
void *msg_ctx;
void *cb_ctx;
int (*process_conf_obj)(void *ctx, struct dpp_authentication *auth);
+ int (*pkex_done)(void *ctx, void *conn, struct dpp_bootstrap_info *bi);
int sock;
u8 mac_addr[ETH_ALEN];
unsigned int freq;
@@ -71,6 +73,9 @@ struct dpp_controller {
struct dl_list conn; /* struct dpp_connection */
char *configurator_params;
enum dpp_netrole netrole;
+ struct dpp_bootstrap_info *pkex_bi;
+ char *pkex_code;
+ char *pkex_identifier;
void *msg_ctx;
void *cb_ctx;
int (*process_conf_obj)(void *ctx, struct dpp_authentication *auth);
@@ -102,6 +107,7 @@ static void dpp_connection_free(struct dpp_connection *conn)
wpabuf_free(conn->msg);
wpabuf_free(conn->msg_out);
dpp_auth_deinit(conn->auth);
+ dpp_pkex_free(conn->pkex);
os_free(conn->name);
os_free(conn);
}
@@ -525,6 +531,8 @@ int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr,
/* TODO: Could send this to all configured Controllers. For now,
* only the first Controller is supported. */
ctrl = dpp_relay_controller_get_ctx(dpp, cb_ctx);
+ } else if (type == DPP_PA_PKEX_EXCHANGE_REQ) {
+ ctrl = dpp_relay_controller_get_ctx(dpp, cb_ctx);
} else {
if (!r_bootstrap)
return -1;
@@ -609,6 +617,8 @@ static void dpp_controller_free(struct dpp_controller *ctrl)
eloop_unregister_sock(ctrl->sock, EVENT_TYPE_READ);
}
os_free(ctrl->configurator_params);
+ os_free(ctrl->pkex_code);
+ os_free(ctrl->pkex_identifier);
os_free(ctrl);
}
@@ -955,6 +965,143 @@ static int dpp_controller_rx_reconfig_auth_resp(struct dpp_connection *conn,
}
+static int dpp_controller_rx_pkex_exchange_req(struct dpp_connection *conn,
+ const u8 *hdr, const u8 *buf,
+ size_t len)
+{
+ struct dpp_controller *ctrl = conn->ctrl;
+
+ if (!ctrl)
+ return 0;
+
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Exchange Request");
+
+ /* TODO: Support multiple PKEX codes by iterating over all the enabled
+ * values here */
+
+ if (!ctrl->pkex_code || !ctrl->pkex_bi) {
+ wpa_printf(MSG_DEBUG,
+ "DPP: No PKEX code configured - ignore request");
+ return 0;
+ }
+
+ if (conn->pkex || conn->auth) {
+ wpa_printf(MSG_DEBUG,
+ "DPP: Already in PKEX/Authentication session - ignore new PKEX request");
+ return 0;
+ }
+
+ conn->pkex = dpp_pkex_rx_exchange_req(conn->ctrl->global, ctrl->pkex_bi,
+ NULL, NULL,
+ ctrl->pkex_identifier,
+ ctrl->pkex_code,
+ buf, len, true);
+ if (!conn->pkex) {
+ wpa_printf(MSG_DEBUG,
+ "DPP: Failed to process the request");
+ return -1;
+ }
+
+ return dpp_tcp_send_msg(conn, conn->pkex->exchange_resp);
+}
+
+
+static int dpp_controller_rx_pkex_exchange_resp(struct dpp_connection *conn,
+ const u8 *hdr, const u8 *buf,
+ size_t len)
+{
+ struct dpp_pkex *pkex = conn->pkex;
+ struct wpabuf *msg;
+ int res;
+
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Exchange Response");
+
+ if (!pkex || !pkex->initiator || pkex->exchange_done) {
+ wpa_printf(MSG_DEBUG, "DPP: No matching PKEX session");
+ return 0;
+ }
+
+ msg = dpp_pkex_rx_exchange_resp(pkex, NULL, buf, len);
+ if (!msg) {
+ wpa_printf(MSG_DEBUG, "DPP: Failed to process the response");
+ return -1;
+ }
+
+ wpa_printf(MSG_DEBUG, "DPP: Send PKEX Commit-Reveal Request");
+ res = dpp_tcp_send_msg(conn, msg);
+ wpabuf_free(msg);
+ return res;
+}
+
+
+static int dpp_controller_rx_pkex_commit_reveal_req(struct dpp_connection *conn,
+ const u8 *hdr,
+ const u8 *buf, size_t len)
+{
+ struct dpp_pkex *pkex = conn->pkex;
+ struct wpabuf *msg;
+ int res;
+ struct dpp_bootstrap_info *bi;
+
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Commit-Reveal Request");
+
+ if (!pkex || pkex->initiator || !pkex->exchange_done) {
+ wpa_printf(MSG_DEBUG, "DPP: No matching PKEX session");
+ return 0;
+ }
+
+ msg = dpp_pkex_rx_commit_reveal_req(pkex, hdr, buf, len);
+ if (!msg) {
+ wpa_printf(MSG_DEBUG, "DPP: Failed to process the request");
+ return -1;
+ }
+
+ wpa_printf(MSG_DEBUG, "DPP: Send PKEX Commit-Reveal Response");
+ res = dpp_tcp_send_msg(conn, msg);
+ wpabuf_free(msg);
+ if (res < 0)
+ return res;
+ bi = dpp_pkex_finish(conn->global, pkex, NULL, 0);
+ if (!bi)
+ return -1;
+ conn->pkex = NULL;
+ return 0;
+}
+
+
+static int
+dpp_controller_rx_pkex_commit_reveal_resp(struct dpp_connection *conn,
+ const u8 *hdr,
+ const u8 *buf, size_t len)
+{
+ struct dpp_pkex *pkex = conn->pkex;
+ int res;
+ struct dpp_bootstrap_info *bi;
+
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Commit-Reveal Response");
+
+ if (!pkex || !pkex->initiator || !pkex->exchange_done) {
+ wpa_printf(MSG_DEBUG, "DPP: No matching PKEX session");
+ return 0;
+ }
+
+ res = dpp_pkex_rx_commit_reveal_resp(pkex, hdr, buf, len);
+ if (res < 0) {
+ wpa_printf(MSG_DEBUG, "DPP: Failed to process the response");
+ return res;
+ }
+
+ bi = dpp_pkex_finish(conn->global, pkex, NULL, 0);
+ if (!bi)
+ return -1;
+ conn->pkex = NULL;
+
+ if (!conn->pkex_done)
+ return -1;
+ return conn->pkex_done(conn->cb_ctx, conn, bi);
+}
+
+
static int dpp_controller_rx_action(struct dpp_connection *conn, const u8 *msg,
size_t len)
{
@@ -1014,6 +1161,22 @@ static int dpp_controller_rx_action(struct dpp_connection *conn, const u8 *msg,
case DPP_PA_RECONFIG_AUTH_RESP:
return dpp_controller_rx_reconfig_auth_resp(conn, msg, pos,
end - pos);
+ case DPP_PA_PKEX_V1_EXCHANGE_REQ:
+ wpa_printf(MSG_DEBUG,
+ "DPP: Ignore PKEXv1 Exchange Request - not supported over TCP");
+ return -1;
+ case DPP_PA_PKEX_EXCHANGE_REQ:
+ return dpp_controller_rx_pkex_exchange_req(conn, msg, pos,
+ end - pos);
+ case DPP_PA_PKEX_EXCHANGE_RESP:
+ return dpp_controller_rx_pkex_exchange_resp(conn, msg, pos,
+ end - pos);
+ case DPP_PA_PKEX_COMMIT_REVEAL_REQ:
+ return dpp_controller_rx_pkex_commit_reveal_req(conn, msg, pos,
+ end - pos);
+ case DPP_PA_PKEX_COMMIT_REVEAL_RESP:
+ return dpp_controller_rx_pkex_commit_reveal_resp(conn, msg, pos,
+ end - pos);
default:
/* TODO: missing messages types */
wpa_printf(MSG_DEBUG,
@@ -1559,6 +1722,101 @@ fail:
}
+int dpp_tcp_pkex_init(struct dpp_global *dpp, struct dpp_pkex *pkex,
+ const struct hostapd_ip_addr *addr, int port,
+ void *msg_ctx, void *cb_ctx,
+ int (*pkex_done)(void *ctx, void *conn,
+ struct dpp_bootstrap_info *bi))
+{
+ struct dpp_connection *conn;
+ struct sockaddr_storage saddr;
+ socklen_t addrlen;
+ const u8 *hdr, *pos, *end;
+ char txt[100];
+
+ wpa_printf(MSG_DEBUG, "DPP: Initialize TCP connection to %s port %d",
+ hostapd_ip_txt(addr, txt, sizeof(txt)), port);
+ if (dpp_ipaddr_to_sockaddr((struct sockaddr *) &saddr, &addrlen,
+ addr, port) < 0) {
+ dpp_pkex_free(pkex);
+ return -1;
+ }
+
+ conn = os_zalloc(sizeof(*conn));
+ if (!conn) {
+ dpp_pkex_free(pkex);
+ return -1;
+ }
+
+ conn->msg_ctx = msg_ctx;
+ conn->cb_ctx = cb_ctx;
+ conn->pkex_done = pkex_done;
+ conn->global = dpp;
+ conn->pkex = pkex;
+ conn->sock = socket(AF_INET, SOCK_STREAM, 0);
+ if (conn->sock < 0)
+ goto fail;
+
+ if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) != 0) {
+ wpa_printf(MSG_DEBUG, "DPP: fnctl(O_NONBLOCK) failed: %s",
+ strerror(errno));
+ goto fail;
+ }
+
+ if (connect(conn->sock, (struct sockaddr *) &saddr, addrlen) < 0) {
+ if (errno != EINPROGRESS) {
+ wpa_printf(MSG_DEBUG, "DPP: Failed to connect: %s",
+ strerror(errno));
+ goto fail;
+ }
+
+ /*
+ * Continue connecting in the background; eloop will call us
+ * once the connection is ready (or failed).
+ */
+ }
+
+ if (eloop_register_sock(conn->sock, EVENT_TYPE_WRITE,
+ dpp_conn_tx_ready, conn, NULL) < 0)
+ goto fail;
+ conn->write_eloop = 1;
+
+ hdr = wpabuf_head(pkex->exchange_req);
+ end = hdr + wpabuf_len(pkex->exchange_req);
+ hdr += 2; /* skip Category and Actiom */
+ pos = hdr + DPP_HDR_LEN;
+ conn->msg_out = dpp_tcp_encaps(hdr, pos, end - pos);
+ if (!conn->msg_out)
+ goto fail;
+ /* Message will be sent in dpp_conn_tx_ready() */
+
+ /* TODO: eloop timeout to clear a connection if it does not complete
+ * properly */
+ dl_list_add(&dpp->tcp_init, &conn->list);
+ return 0;
+fail:
+ dpp_connection_free(conn);
+ return -1;
+}
+
+
+static int dpp_tcp_auth_start(struct dpp_connection *conn,
+ struct dpp_authentication *auth)
+{
+ const u8 *hdr, *pos, *end;
+
+ hdr = wpabuf_head(auth->req_msg);
+ end = hdr + wpabuf_len(auth->req_msg);
+ hdr += 2; /* skip Category and Actiom */
+ pos = hdr + DPP_HDR_LEN;
+ conn->msg_out = dpp_tcp_encaps(hdr, pos, end - pos);
+ if (!conn->msg_out)
+ return -1;
+ /* Message will be sent in dpp_conn_tx_ready() */
+ return 0;
+}
+
+
int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
const struct hostapd_ip_addr *addr, int port, const char *name,
enum dpp_netrole netrole, void *msg_ctx, void *cb_ctx,
@@ -1568,7 +1826,6 @@ int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
struct dpp_connection *conn;
struct sockaddr_storage saddr;
socklen_t addrlen;
- const u8 *hdr, *pos, *end;
char txt[100];
wpa_printf(MSG_DEBUG, "DPP: Initialize TCP connection to %s port %d",
@@ -1620,14 +1877,8 @@ int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
goto fail;
conn->write_eloop = 1;
- hdr = wpabuf_head(auth->req_msg);
- end = hdr + wpabuf_len(auth->req_msg);
- hdr += 2; /* skip Category and Actiom */
- pos = hdr + DPP_HDR_LEN;
- conn->msg_out = dpp_tcp_encaps(hdr, pos, end - pos);
- if (!conn->msg_out)
+ if (dpp_tcp_auth_start(conn, auth) < 0)
goto fail;
- /* Message will be sent in dpp_conn_tx_ready() */
/* TODO: eloop timeout to clear a connection if it does not complete
* properly */
@@ -1639,6 +1890,30 @@ fail:
}
+int dpp_tcp_auth(struct dpp_global *dpp, void *_conn,
+ struct dpp_authentication *auth, const char *name,
+ enum dpp_netrole netrole,
+ int (*process_conf_obj)(void *ctx,
+ struct dpp_authentication *auth))
+{
+ struct dpp_connection *conn = _conn;
+
+ /* Continue with Authentication exchange on an existing TCP connection.
+ */
+ conn->process_conf_obj = process_conf_obj;
+ os_free(conn->name);
+ conn->name = os_strdup(name ? name : "Test");
+ conn->netrole = netrole;
+ conn->auth = auth;
+
+ if (dpp_tcp_auth_start(conn, auth) < 0)
+ return -1;
+
+ dpp_conn_tx_ready(conn->sock, conn, NULL);
+ return 0;
+}
+
+
int dpp_controller_start(struct dpp_global *dpp,
struct dpp_controller_config *config)
{
@@ -1789,6 +2064,23 @@ void dpp_controller_new_qr_code(struct dpp_global *dpp,
}
+void dpp_controller_pkex_add(struct dpp_global *dpp,
+ struct dpp_bootstrap_info *bi,
+ const char *code, const char *identifier)
+{
+ struct dpp_controller *ctrl = dpp->controller;
+
+ if (!ctrl)
+ return;
+
+ ctrl->pkex_bi = bi;
+ os_free(ctrl->pkex_code);
+ ctrl->pkex_code = code ? os_strdup(code) : NULL;
+ os_free(ctrl->pkex_identifier);
+ ctrl->pkex_identifier = identifier ? os_strdup(identifier) : NULL;
+}
+
+
void dpp_tcp_init_flush(struct dpp_global *dpp)
{
struct dpp_connection *conn, *tmp;
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 61b300f..aab94cb 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2557,6 +2557,71 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
}
+#ifdef CONFIG_DPP2
+static int wpas_dpp_pkex_done(void *ctx, void *conn,
+ struct dpp_bootstrap_info *peer_bi)
+{
+ struct wpa_supplicant *wpa_s = ctx;
+ const char *cmd = wpa_s->dpp_pkex_auth_cmd;
+ const char *pos;
+ u8 allowed_roles = DPP_CAPAB_CONFIGURATOR;
+ struct dpp_bootstrap_info *own_bi = NULL;
+ struct dpp_authentication *auth;
+
+ if (!cmd)
+ cmd = "";
+ wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
+ cmd);
+
+ pos = os_strstr(cmd, " own=");
+ if (pos) {
+ pos += 5;
+ own_bi = dpp_bootstrap_get_id(wpa_s->dpp, atoi(pos));
+ if (!own_bi) {
+ wpa_printf(MSG_INFO,
+ "DPP: Could not find bootstrapping info for the identified local entry");
+ return -1;
+ }
+
+ if (peer_bi->curve != own_bi->curve) {
+ wpa_printf(MSG_INFO,
+ "DPP: Mismatching curves in bootstrapping info (peer=%s own=%s)",
+ peer_bi->curve->name, own_bi->curve->name);
+ return -1;
+ }
+ }
+
+ pos = os_strstr(cmd, " role=");
+ if (pos) {
+ pos += 6;
+ if (os_strncmp(pos, "configurator", 12) == 0)
+ allowed_roles = DPP_CAPAB_CONFIGURATOR;
+ else if (os_strncmp(pos, "enrollee", 8) == 0)
+ allowed_roles = DPP_CAPAB_ENROLLEE;
+ else if (os_strncmp(pos, "either", 6) == 0)
+ allowed_roles = DPP_CAPAB_CONFIGURATOR |
+ DPP_CAPAB_ENROLLEE;
+ else
+ return -1;
+ }
+
+ auth = dpp_auth_init(wpa_s->dpp, wpa_s, peer_bi, own_bi, allowed_roles,
+ 0, wpa_s->hw.modes, wpa_s->hw.num_modes);
+ if (!auth)
+ return -1;
+
+ wpas_dpp_set_testing_options(wpa_s, auth);
+ if (dpp_set_configurator(auth, cmd) < 0) {
+ dpp_auth_deinit(auth);
+ return -1;
+ }
+
+ return dpp_tcp_auth(wpa_s->dpp, conn, auth, wpa_s->conf->dpp_name,
+ DPP_NETROLE_STA, wpas_dpp_process_conf_obj);
+}
+#endif /* CONFIG_DPP2 */
+
+
enum wpas_dpp_pkex_ver {
PKEX_VER_AUTO,
PKEX_VER_ONLY_1,
@@ -2564,7 +2629,9 @@ enum wpas_dpp_pkex_ver {
};
static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s,
- enum wpas_dpp_pkex_ver ver)
+ enum wpas_dpp_pkex_ver ver,
+ const struct hostapd_ip_addr *ipaddr,
+ int tcp_port)
{
struct dpp_pkex *pkex;
struct wpabuf *msg;
@@ -2573,15 +2640,24 @@ static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s,
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
dpp_pkex_free(wpa_s->dpp_pkex);
- wpa_s->dpp_pkex = dpp_pkex_init(wpa_s, wpa_s->dpp_pkex_bi,
- wpa_s->own_addr,
- wpa_s->dpp_pkex_identifier,
- wpa_s->dpp_pkex_code, v2);
- pkex = wpa_s->dpp_pkex;
+ wpa_s->dpp_pkex = NULL;
+ pkex = dpp_pkex_init(wpa_s, wpa_s->dpp_pkex_bi, wpa_s->own_addr,
+ wpa_s->dpp_pkex_identifier,
+ wpa_s->dpp_pkex_code, v2);
if (!pkex)
return -1;
pkex->forced_ver = ver != PKEX_VER_AUTO;
+ if (ipaddr) {
+#ifdef CONFIG_DPP2
+ return dpp_tcp_pkex_init(wpa_s->dpp, pkex, ipaddr, tcp_port,
+ wpa_s, wpa_s, wpas_dpp_pkex_done);
+#else /* CONFIG_DPP2 */
+ return -1;
+#endif /* CONFIG_DPP2 */
+ }
+
+ wpa_s->dpp_pkex = pkex;
msg = pkex->exchange_req;
wait_time = wpa_s->max_remain_on_chan;
if (wait_time > 2000)
@@ -2618,7 +2694,8 @@ static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
if (pkex->v2 && !pkex->forced_ver) {
wpa_printf(MSG_DEBUG,
"DPP: Fall back to PKEXv1");
- wpas_dpp_pkex_init(wpa_s, PKEX_VER_ONLY_1);
+ wpas_dpp_pkex_init(wpa_s, PKEX_VER_ONLY_1,
+ NULL, 0);
return;
}
#endif /* CONFIG_DPP3 */
@@ -3327,6 +3404,29 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
{
struct dpp_bootstrap_info *own_bi;
const char *pos, *end;
+ int tcp_port = DPP_TCP_PORT;
+ struct hostapd_ip_addr *ipaddr = NULL;
+#ifdef CONFIG_DPP2
+ struct hostapd_ip_addr ipaddr_buf;
+ char *addr;
+
+ pos = os_strstr(cmd, " tcp_port=");
+ if (pos) {
+ pos += 10;
+ tcp_port = atoi(pos);
+ }
+
+ addr = get_param(cmd, " tcp_addr=");
+ if (addr) {
+ int res;
+
+ res = hostapd_parse_ip_addr(addr, &ipaddr_buf);
+ os_free(addr);
+ if (res)
+ return -1;
+ ipaddr = &ipaddr_buf;
+ }
+#endif /* CONFIG_DPP2 */
pos = os_strstr(cmd, " own=");
if (!pos)
@@ -3390,8 +3490,14 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
return -1;
}
- if (wpas_dpp_pkex_init(wpa_s, ver) < 0)
+ if (wpas_dpp_pkex_init(wpa_s, ver, ipaddr, tcp_port) < 0)
return -1;
+ } else {
+#ifdef CONFIG_DPP2
+ dpp_controller_pkex_add(wpa_s->dpp, own_bi,
+ wpa_s->dpp_pkex_code,
+ wpa_s->dpp_pkex_identifier);
+#endif /* CONFIG_DPP2 */
}
/* TODO: Support multiple PKEX info entries */
--
2.40.0

View File

@@ -0,0 +1,144 @@
From 15af83cf1846870873a011ed4d714732f01cd2e4 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <quic_jouni@quicinc.com>
Date: Tue, 19 Jul 2022 21:23:04 +0300
Subject: [PATCH] DPP: Delete PKEX code and identifier on success completion of
PKEX
We are not supposed to reuse these without being explicitly requested to
perform PKEX again. There is not a strong use case for being able to
provision an Enrollee multiple times with PKEX, so this should have no
issues on the Enrollee. For a Configurator, there might be some use
cases that would benefit from being able to use the same code with
multiple Enrollee devices, e.g., for guess access with a laptop and a
smart phone. That case will now require a new DPP_PKEX_ADD command on
the Configurator after each completion of the provisioning exchange.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
CVE: CVE-2022-37660
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=15af83cf1846870873a011ed4d714732f01cd2e4]
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
---
src/ap/dpp_hostapd.c | 22 +++++++++++++++++++++-
wpa_supplicant/dpp_supplicant.c | 21 ++++++++++++++++++++-
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index d956be9..73b09ba 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -276,6 +276,22 @@ static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
}
+static void hostapd_dpp_pkex_clear_code(struct hostapd_data *hapd)
+{
+ if (!hapd->dpp_pkex_code && !hapd->dpp_pkex_identifier)
+ return;
+
+ /* Delete PKEX code and identifier on successful completion of
+ * PKEX. We are not supposed to reuse these without being
+ * explicitly requested to perform PKEX again. */
+ wpa_printf(MSG_DEBUG, "DPP: Delete PKEX code/identifier");
+ os_free(hapd->dpp_pkex_code);
+ hapd->dpp_pkex_code = NULL;
+ os_free(hapd->dpp_pkex_identifier);
+ hapd->dpp_pkex_identifier = NULL;
+}
+
+
#ifdef CONFIG_DPP2
static int hostapd_dpp_pkex_done(void *ctx, void *conn,
struct dpp_bootstrap_info *peer_bi)
@@ -287,6 +303,8 @@ static int hostapd_dpp_pkex_done(void *ctx, void *conn,
struct dpp_bootstrap_info *own_bi = NULL;
struct dpp_authentication *auth;
+ hostapd_dpp_pkex_clear_code(hapd);
+
if (!cmd)
cmd = "";
wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
@@ -2114,6 +2132,7 @@ hostapd_dpp_rx_pkex_commit_reveal_req(struct hostapd_data *hapd, const u8 *src,
wpabuf_head(msg), wpabuf_len(msg));
wpabuf_free(msg);
+ hostapd_dpp_pkex_clear_code(hapd);
bi = dpp_pkex_finish(hapd->iface->interfaces->dpp, pkex, src, freq);
if (!bi)
return;
@@ -2145,6 +2164,7 @@ hostapd_dpp_rx_pkex_commit_reveal_resp(struct hostapd_data *hapd, const u8 *src,
return;
}
+ hostapd_dpp_pkex_clear_code(hapd);
bi = dpp_pkex_finish(hapd->iface->interfaces->dpp, pkex, src, freq);
if (!bi)
return;
@@ -2518,7 +2538,7 @@ int hostapd_dpp_pkex_remove(struct hostapd_data *hapd, const char *id)
return -1;
}
- if ((id_val != 0 && id_val != 1) || !hapd->dpp_pkex_code)
+ if ((id_val != 0 && id_val != 1))
return -1;
/* TODO: Support multiple PKEX entries */
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index aab94cb..015ae66 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2557,6 +2557,22 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
}
+static void wpas_dpp_pkex_clear_code(struct wpa_supplicant *wpa_s)
+{
+ if (!wpa_s->dpp_pkex_code && !wpa_s->dpp_pkex_identifier)
+ return;
+
+ /* Delete PKEX code and identifier on successful completion of
+ * PKEX. We are not supposed to reuse these without being
+ * explicitly requested to perform PKEX again. */
+ os_free(wpa_s->dpp_pkex_code);
+ wpa_s->dpp_pkex_code = NULL;
+ os_free(wpa_s->dpp_pkex_identifier);
+ wpa_s->dpp_pkex_identifier = NULL;
+
+}
+
+
#ifdef CONFIG_DPP2
static int wpas_dpp_pkex_done(void *ctx, void *conn,
struct dpp_bootstrap_info *peer_bi)
@@ -2568,6 +2584,8 @@ static int wpas_dpp_pkex_done(void *ctx, void *conn,
struct dpp_bootstrap_info *own_bi = NULL;
struct dpp_authentication *auth;
+ wpas_dpp_pkex_clear_code(wpa_s);
+
if (!cmd)
cmd = "";
wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
@@ -2872,6 +2890,7 @@ wpas_dpp_pkex_finish(struct wpa_supplicant *wpa_s, const u8 *peer,
{
struct dpp_bootstrap_info *bi;
+ wpas_dpp_pkex_clear_code(wpa_s);
bi = dpp_pkex_finish(wpa_s->dpp, wpa_s->dpp_pkex, peer, freq);
if (!bi)
return NULL;
@@ -3521,7 +3540,7 @@ int wpas_dpp_pkex_remove(struct wpa_supplicant *wpa_s, const char *id)
return -1;
}
- if ((id_val != 0 && id_val != 1) || !wpa_s->dpp_pkex_code)
+ if ((id_val != 0 && id_val != 1))
return -1;
/* TODO: Support multiple PKEX entries */
--
2.40.0

View File

@@ -31,6 +31,11 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
file://0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch \
file://0002-SAE-Check-for-invalid-Rejected-Groups-element-length.patch \
file://0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch \
file://CVE-2022-37660-0001.patch \
file://CVE-2022-37660-0002.patch \
file://CVE-2022-37660-0003.patch \
file://CVE-2022-37660-0004.patch \
file://CVE-2022-37660-0005.patch \
"
SRC_URI[sha256sum] = "20df7ae5154b3830355f8ab4269123a87affdea59fe74fe9292a91d0d7e17b2f"

View File

@@ -0,0 +1,136 @@
From 9a8796436b9b0641e13480811902ea2ac57881d3 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Wed, 2 Oct 2024 10:12:05 +0200
Subject: [PATCH] archival: disallow path traversals (CVE-2023-39810)
Create new configure option for archival/libarchive based extractions to
disallow path traversals.
As this is a paranoid option and might introduce backward
incompatibility, default it to no.
Fixes: CVE-2023-39810
Based on the patch by Peter Kaestle <peter.kaestle@nokia.com>
function old new delta
data_extract_all 921 945 +24
strip_unsafe_prefix 101 102 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 25/0) Total: 25 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
CVE: CVE-2023-39810
Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=9a8796436b9b0641e13480811902ea2ac57881d3]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
archival/Config.src | 11 +++++++++++
archival/libarchive/data_extract_all.c | 8 ++++++++
archival/libarchive/unsafe_prefix.c | 6 +++++-
scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +-
testsuite/cpio.tests | 23 ++++++++++++++++++++++
5 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/archival/Config.src b/archival/Config.src
index 6f4f30c43..cbcd7217c 100644
--- a/archival/Config.src
+++ b/archival/Config.src
@@ -35,4 +35,15 @@ config FEATURE_LZMA_FAST
This option reduces decompression time by about 25% at the cost of
a 1K bigger binary.
+config FEATURE_PATH_TRAVERSAL_PROTECTION
+ bool "Prevent extraction of filenames with /../ path component"
+ default n
+ help
+ busybox tar and unzip remove "PREFIX/../" (if it exists)
+ from extracted names.
+ This option enables this behavior for all other unpacking applets,
+ such as cpio, ar, rpm.
+ GNU cpio 2.15 has NO such sanity check.
+# try other archivers and document their behavior?
+
endmenu
diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c
index 049c2c156..8a69711c1 100644
--- a/archival/libarchive/data_extract_all.c
+++ b/archival/libarchive/data_extract_all.c
@@ -65,6 +65,14 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
} while (--n != 0);
}
#endif
+#if ENABLE_FEATURE_PATH_TRAVERSAL_PROTECTION
+ /* Strip leading "/" and up to last "/../" path component */
+ dst_name = (char *)strip_unsafe_prefix(dst_name);
+#endif
+// ^^^ This may be a problem if some applets do need to extract absolute names.
+// (Probably will need to invent ARCHIVE_ALLOW_UNSAFE_NAME flag).
+// You might think that rpm needs it, but in my tests rpm's internal cpio
+// archive has names like "./usr/bin/FOO", not "/usr/bin/FOO".
if (archive_handle->ah_flags & ARCHIVE_CREATE_LEADING_DIRS) {
char *slash = strrchr(dst_name, '/');
diff --git a/archival/libarchive/unsafe_prefix.c b/archival/libarchive/unsafe_prefix.c
index 33e487bf9..667081195 100644
--- a/archival/libarchive/unsafe_prefix.c
+++ b/archival/libarchive/unsafe_prefix.c
@@ -14,7 +14,11 @@ const char* FAST_FUNC strip_unsafe_prefix(const char *str)
cp++;
continue;
}
- if (is_prefixed_with(cp, "/../"+1)) {
+ /* We are called lots of times.
+ * is_prefixed_with(cp, "../") is slower than open-coding it,
+ * with minimal code growth (~few bytes).
+ */
+ if (cp[0] == '.' && cp[1] == '.' && cp[2] == '/') {
cp += 3;
continue;
}
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 5075ebf2d..910ca1f7c 100755
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -55,7 +55,7 @@ trap "rm -f $tmp" 0 1 2 3 15
check() {
$cc -x c - -o $tmp 2>/dev/null <<'EOF'
#include CURSES_LOC
-main() {}
+int main() { return 0; }
EOF
if [ $? != 0 ]; then
echo " *** Unable to find the ncurses libraries or the" 1>&2
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests
index 85e746589..a4462c53e 100755
--- a/testsuite/cpio.tests
+++ b/testsuite/cpio.tests
@@ -154,6 +154,29 @@ testing "cpio -R with extract" \
" "" ""
SKIP=
+# Create an archive containing a file with "../dont_write" filename.
+# See that it will not be allowed to unpack.
+# NB: GNU cpio 2.15 DOES NOT do such checks.
+optional FEATURE_PATH_TRAVERSAL_PROTECTION
+rm -rf cpio.testdir
+mkdir -p cpio.testdir/prepare/inner
+echo "file outside of destination was written" > cpio.testdir/prepare/dont_write
+echo "data" > cpio.testdir/prepare/inner/to_extract
+mkdir -p cpio.testdir/extract
+testing "cpio extract file outside of destination" "\
+(cd cpio.testdir/prepare/inner && echo -e '../dont_write\nto_extract' | cpio -o -H newc) | (cd cpio.testdir/extract && cpio -vi 2>&1)
+echo \$?
+ls cpio.testdir/dont_write 2>&1" \
+"\
+cpio: removing leading '../' from member names
+../dont_write
+to_extract
+1 blocks
+0
+ls: cpio.testdir/dont_write: No such file or directory
+" "" ""
+SKIP=
+
# Clean up
rm -rf cpio.testdir cpio.testdir2 2>/dev/null

View File

@@ -0,0 +1,57 @@
From f5e1bf966b19ea1821f00a8c9ecd7774598689b4 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Wed, 24 Sep 2025 03:28:47 +0200
Subject: [PATCH] archival/libarchive: sanitize filenames on output (prevent
control sequence attacks
This fixes CVE-2025-46394 (terminal escape sequence injection)
Original credit: Ian.Norton at entrust.com
function old new delta
header_list 9 15 +6
header_verbose_list 239 244 +5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 11/0) Total: 11 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
CVE: CVE-2025-46394
Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=f5e1bf966b19ea1821f00a8c9ecd7774598689b4]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
archival/libarchive/header_list.c | 2 +-
archival/libarchive/header_verbose_list.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/archival/libarchive/header_list.c b/archival/libarchive/header_list.c
index 0621aa406..9490b3635 100644
--- a/archival/libarchive/header_list.c
+++ b/archival/libarchive/header_list.c
@@ -8,5 +8,5 @@
void FAST_FUNC header_list(const file_header_t *file_header)
{
//TODO: cpio -vp DIR should output "DIR/NAME", not just "NAME" */
- puts(file_header->name);
+ puts(printable_string(file_header->name));
}
diff --git a/archival/libarchive/header_verbose_list.c b/archival/libarchive/header_verbose_list.c
index a575a08a0..e7a09430d 100644
--- a/archival/libarchive/header_verbose_list.c
+++ b/archival/libarchive/header_verbose_list.c
@@ -57,13 +57,13 @@ void FAST_FUNC header_verbose_list(const file_header_t *file_header)
ptm->tm_hour,
ptm->tm_min,
ptm->tm_sec,
- file_header->name);
+ printable_string(file_header->name));
#endif /* FEATURE_TAR_UNAME_GNAME */
/* NB: GNU tar shows "->" for symlinks and "link to" for hardlinks */
if (file_header->link_target) {
- printf(" -> %s", file_header->link_target);
+ printf(" -> %s", printable_string(file_header->link_target));
}
bb_putchar('\n');
}

View File

@@ -0,0 +1,32 @@
From 7378db981d87b4a2264e14d60340a7fb5c67ae59 Mon Sep 17 00:00:00 2001
From: Peter Marko <peter.marko@siemens.com>
Date: Fri, 3 Oct 2025 16:12:56 +0200
Subject: [PATCH] testsuite/tar.tests: fix test after CVE-2025-46394
tar now sanitizes output and this test needs to expect that.
Signed-off-by: Peter Marko <peter.marko@siemens.com>
CVE: CVE-2025-46394
Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2025-October/091743.html]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
testsuite/tar.tests | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
index 0f2e89112..48fc38114 100755
--- a/testsuite/tar.tests
+++ b/testsuite/tar.tests
@@ -325,9 +325,9 @@ unset LANG
rm -rf etc usr
' "\
etc/ssl/certs/3b2716e5.0
-etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
+etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.pem
etc/ssl/certs/f80cc7f6.0
-usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
+usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.crt
0
etc/ssl/certs/3b2716e5.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem -> /usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt

View File

@@ -58,6 +58,9 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://0001-awk.c-fix-CVE-2023-42366-bug-15874.patch \
file://0001-cut-Fix-s-flag-to-omit-blank-lines.patch \
file://CVE-2022-48174.patch \
file://CVE-2023-39810.patch \
file://CVE-2025-46394-01.patch \
file://CVE-2025-46394-02.patch \
"
SRC_URI:append:libc-musl = " file://musl.cfg "
# TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html

View File

@@ -0,0 +1,37 @@
From 8c32bc9fa67513f46199bc31498dc1fecbb611bb Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Thu, 13 Mar 2025 14:19:28 +0000
Subject: [PATCH] dbus-gvalue: Avoid using the reserved word 'bool'
This is reserved in C23 for the equivalent of `<stdbool.h>`.
Bug-Debian: https://bugs.debian.org/1096507
Signed-off-by: Simon McVittie <smcv@collabora.com>
Upstream-Status: Backport [https://gitlab.freedesktop.org/dbus/dbus-glib/-/commit/8c32bc9fa67513f46199bc31498dc1fecbb611bb]
igned-off-by: Martin Jansa <martin.jansa@gmail.com>
---
dbus/dbus-gvalue.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c
index 534e90a..788e360 100644
--- a/dbus/dbus-gvalue.c
+++ b/dbus/dbus-gvalue.c
@@ -545,11 +545,11 @@ demarshal_basic (DBusGValueMarshalCtx *context,
{
case DBUS_TYPE_BOOLEAN:
{
- dbus_bool_t bool;
+ dbus_bool_t b;
if (!G_VALUE_HOLDS (value, G_TYPE_BOOLEAN))
goto invalid_type;
- dbus_message_iter_get_basic (iter, &bool);
- g_value_set_boolean (value, bool);
+ dbus_message_iter_get_basic (iter, &b);
+ g_value_set_boolean (value, b);
return TRUE;
}
case DBUS_TYPE_BYTE:
--
GitLab

View File

@@ -13,6 +13,7 @@ DEPENDS:class-native = "glib-2.0-native dbus-native"
SRC_URI = "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
file://no-examples.patch \
file://test-install-makefile.patch \
file://fix-build-with-gcc-15.patch \
"
SRC_URI[md5sum] = "021e6c8a288df02c227e4aafbf7e7527"
SRC_URI[sha256sum] = "7d550dccdfcd286e33895501829ed971eeb65c614e73aadb4a08aeef719b143a"

View File

@@ -0,0 +1,27 @@
From d59436a4d56de58b856142a5d489a4a8fc7382ed Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Mon, 8 Apr 2024 22:01:21 +0800
Subject: [PATCH] Avoid unused variable with DROPBEAR_CLI_PUBKEY_AUTH 0
Fixes PR #291
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/d59436a4d56de58b856142a5d489a4a8fc7382ed]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
cli-runopts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cli-runopts.c b/cli-runopts.c
index b853a13..6668aee 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -533,7 +533,9 @@ static void loadidentityfile(const char* filename, int warnfail) {
static char* multihop_passthrough_args(void) {
char *args = NULL;
unsigned int len, total;
+#if DROPBEAR_CLI_PUBKEY_AUTH
m_list_elem *iter;
+#endif
/* Sufficient space for non-string args */
len = 100;

View File

@@ -0,0 +1,63 @@
From 697b1f86c0b2b0caf12e9e32bab29161093ab5d4 Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Mon, 1 Apr 2024 11:50:26 +0800
Subject: [PATCH] Handle arbitrary length paths and commands in
multihop_passthrough_args()
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/697b1f86c0b2b0caf12e9e32bab29161093ab5d4]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
cli-runopts.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/cli-runopts.c b/cli-runopts.c
index 37ea61d..219fc53 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -528,15 +528,29 @@ static void loadidentityfile(const char* filename, int warnfail) {
#if DROPBEAR_CLI_MULTIHOP
-static char*
-multihop_passthrough_args() {
- char *ret, args[256];
+/* Fill out -i, -y, -W options that make sense for all
+ * the intermediate processes */
+static char* multihop_passthrough_args(void) {
+ char *args = NULL;
unsigned int len, total;
m_list_elem *iter;
- /* Fill out -i, -y, -W options that make sense for all
- * the intermediate processes */
+ /* Sufficient space for non-string args */
+ len = 100;
+
+ /* String arguments have arbitrary length, so determine space required */
+ if (cli_opts.proxycmd) {
+ len += strlen(cli_opts.proxycmd);
+ }
+ for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
+ {
+ sign_key * key = (sign_key*)iter->item;
+ len += 4 + strlen(key->filename);
+ }
+
+ args = m_malloc(len);
total = 0;
- len = 255;
+
+ /* Create new argument string */
if (cli_opts.quiet) {
total += m_snprintf(args+total, len-total, "-q ");
@@ -564,9 +578,7 @@ multihop_passthrough_args() {
}
#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
- ret = m_malloc(total + 1);
- strcpy(ret,args);
- return ret;
+ return args;
}
/* Sets up 'onion-forwarding' connections. This will spawn

View File

@@ -0,0 +1,81 @@
From 2f1177e55f33afd676e08c9449ab7ab517fc3b30 Mon Sep 17 00:00:00 2001
From: HansH111 <hans@atbas.org>
Date: Sat, 24 Feb 2024 08:29:30 +0000
Subject: [PATCH] add -o BatchMode and also forward this when multihop
destination is used
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/2f1177e55f33afd676e08c9449ab7ab517fc3b30]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
cli-runopts.c | 33 +++++++++++----------------------
1 file changed, 11 insertions(+), 22 deletions(-)
diff --git a/cli-runopts.c b/cli-runopts.c
index 38a73f7..37ea61d 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -530,53 +530,42 @@ static void loadidentityfile(const char* filename, int warnfail) {
static char*
multihop_passthrough_args() {
- char *ret;
+ char *ret, args[256];
unsigned int len, total;
m_list_elem *iter;
/* Fill out -i, -y, -W options that make sense for all
- * the intermediate processes */
- len = 30; /* space for "-q -y -y -W <size>\0" */
-#if DROPBEAR_CLI_PUBKEY_AUTH
- for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
- {
- sign_key * key = (sign_key*)iter->item;
- len += 3 + strlen(key->filename);
- }
-#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
- if (cli_opts.proxycmd) {
- /* "-J 'cmd'" */
- len += 6 + strlen(cli_opts.proxycmd);
- }
-
- ret = m_malloc(len);
+ * the intermediate processes */
total = 0;
+ len = 255;
if (cli_opts.quiet) {
- total += m_snprintf(ret+total, len-total, "-q ");
+ total += m_snprintf(args+total, len-total, "-q ");
}
if (cli_opts.no_hostkey_check) {
- total += m_snprintf(ret+total, len-total, "-y -y ");
+ total += m_snprintf(args+total, len-total, "-y -y ");
} else if (cli_opts.always_accept_key) {
- total += m_snprintf(ret+total, len-total, "-y ");
+ total += m_snprintf(args+total, len-total, "-y ");
}
if (cli_opts.proxycmd) {
- total += m_snprintf(ret+total, len-total, "-J '%s' ", cli_opts.proxycmd);
+ total += m_snprintf(args+total, len-total, "-J '%s' ", cli_opts.proxycmd);
}
if (opts.recv_window != DEFAULT_RECV_WINDOW) {
- total += m_snprintf(ret+total, len-total, "-W %u ", opts.recv_window);
+ total += m_snprintf(args+total, len-total, "-W %u ", opts.recv_window);
}
#if DROPBEAR_CLI_PUBKEY_AUTH
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
{
sign_key * key = (sign_key*)iter->item;
- total += m_snprintf(ret+total, len-total, "-i %s ", key->filename);
+ total += m_snprintf(args+total, len-total, "-i %s ", key->filename);
}
#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
+ ret = m_malloc(total + 1);
+ strcpy(ret,args);
return ret;
}

View File

@@ -0,0 +1,29 @@
From dd03da772bfad6174425066ff9752b60e25ed183 Mon Sep 17 00:00:00 2001
From: Sergey Ponomarev <stokito@gmail.com>
Date: Sun, 7 Apr 2024 21:16:50 +0300
Subject: [PATCH] cli-runopts.c add missing DROPBEAR_CLI_PUBKEY_AUTH
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/dd03da772bfad6174425066ff9752b60e25ed183]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
cli-runopts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cli-runopts.c b/cli-runopts.c
index 219fc53..b853a13 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -541,11 +541,13 @@ static char* multihop_passthrough_args(void) {
if (cli_opts.proxycmd) {
len += strlen(cli_opts.proxycmd);
}
+#if DROPBEAR_CLI_PUBKEY_AUTH
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
{
sign_key * key = (sign_key*)iter->item;
len += 4 + strlen(key->filename);
}
+#endif
args = m_malloc(len);
total = 0;

View File

@@ -0,0 +1,367 @@
From e5a0ef27c227f7ae69d9a9fec98a056494409b9b Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Mon, 5 May 2025 23:14:19 +0800
Subject: [PATCH] Execute multihop commands directly, no shell
This avoids problems with shell escaping if arguments contain special
characters.
CVE: CVE-2025-47203
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/e5a0ef27c227f7ae69d9a9fec98a056494409b9b]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
cli-main.c | 59 +++++++++++++++++++----------
cli-runopts.c | 100 +++++++++++++++++++++++++++++---------------------
dbutil.c | 9 ++++-
dbutil.h | 1 +
runopts.h | 5 +++
5 files changed, 112 insertions(+), 62 deletions(-)
diff --git a/cli-main.c b/cli-main.c
index 065fd76..2fafa88 100644
--- a/cli-main.c
+++ b/cli-main.c
@@ -77,9 +77,8 @@ int main(int argc, char ** argv) {
}
#if DROPBEAR_CLI_PROXYCMD
- if (cli_opts.proxycmd) {
+ if (cli_opts.proxycmd || cli_opts.proxyexec) {
cli_proxy_cmd(&sock_in, &sock_out, &proxy_cmd_pid);
- m_free(cli_opts.proxycmd);
if (signal(SIGINT, kill_proxy_sighandler) == SIG_ERR ||
signal(SIGTERM, kill_proxy_sighandler) == SIG_ERR ||
signal(SIGHUP, kill_proxy_sighandler) == SIG_ERR) {
@@ -101,7 +100,8 @@ int main(int argc, char ** argv) {
}
#endif /* DBMULTI stuff */
-static void exec_proxy_cmd(const void *user_data_cmd) {
+#if DROPBEAR_CLI_PROXYCMD
+static void shell_proxy_cmd(const void *user_data_cmd) {
const char *cmd = user_data_cmd;
char *usershell;
@@ -110,41 +110,62 @@ static void exec_proxy_cmd(const void *user_data_cmd) {
dropbear_exit("Failed to run '%s'\n", cmd);
}
-#if DROPBEAR_CLI_PROXYCMD
+static void exec_proxy_cmd(const void *unused) {
+ (void)unused;
+ run_command(cli_opts.proxyexec[0], cli_opts.proxyexec, ses.maxfd);
+ dropbear_exit("Failed to run '%s'\n", cli_opts.proxyexec[0]);
+}
+
static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
- char * ex_cmd = NULL;
- size_t ex_cmdlen;
+ char * cmd_arg = NULL;
+ void (*exec_fn)(const void *user_data) = NULL;
int ret;
+ /* exactly one of cli_opts.proxycmd or cli_opts.proxyexec should be set */
+
/* File descriptor "-j &3" */
- if (*cli_opts.proxycmd == '&') {
+ if (cli_opts.proxycmd && *cli_opts.proxycmd == '&') {
char *p = cli_opts.proxycmd + 1;
int sock = strtoul(p, &p, 10);
/* must be a single number, and not stdin/stdout/stderr */
if (sock > 2 && sock < 1024 && *p == '\0') {
*sock_in = sock;
*sock_out = sock;
- return;
+ goto cleanup;
}
}
- /* Normal proxycommand */
+ if (cli_opts.proxycmd) {
+ /* Normal proxycommand */
+ size_t shell_cmdlen;
+ /* So that spawn_command knows which shell to run */
+ fill_passwd(cli_opts.own_user);
- /* So that spawn_command knows which shell to run */
- fill_passwd(cli_opts.own_user);
+ shell_cmdlen = strlen(cli_opts.proxycmd) + 6; /* "exec " + command + '\0' */
+ cmd_arg = m_malloc(shell_cmdlen);
+ snprintf(cmd_arg, shell_cmdlen, "exec %s", cli_opts.proxycmd);
+ exec_fn = shell_proxy_cmd;
+ } else {
+ /* No shell */
+ exec_fn = exec_proxy_cmd;
+ }
- ex_cmdlen = strlen(cli_opts.proxycmd) + 6; /* "exec " + command + '\0' */
- ex_cmd = m_malloc(ex_cmdlen);
- snprintf(ex_cmd, ex_cmdlen, "exec %s", cli_opts.proxycmd);
-
- ret = spawn_command(exec_proxy_cmd, ex_cmd,
- sock_out, sock_in, NULL, pid_out);
- DEBUG1(("cmd: %s pid=%d", ex_cmd,*pid_out))
- m_free(ex_cmd);
+ ret = spawn_command(exec_fn, cmd_arg, sock_out, sock_in, NULL, pid_out);
if (ret == DROPBEAR_FAILURE) {
dropbear_exit("Failed running proxy command");
*sock_in = *sock_out = -1;
}
+
+cleanup:
+ m_free(cli_opts.proxycmd);
+ m_free(cmd_arg);
+ if (cli_opts.proxyexec) {
+ char **a = NULL;
+ for (a = cli_opts.proxyexec; *a; a++) {
+ m_free_direct(*a);
+ }
+ m_free(cli_opts.proxyexec);
+ }
}
static void kill_proxy_sighandler(int UNUSED(signo)) {
diff --git a/cli-runopts.c b/cli-runopts.c
index 6668aee..b9add84 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -530,58 +530,81 @@ static void loadidentityfile(const char* filename, int warnfail) {
/* Fill out -i, -y, -W options that make sense for all
* the intermediate processes */
-static char* multihop_passthrough_args(void) {
- char *args = NULL;
- unsigned int len, total;
+static char** multihop_args(const char* argv0, const char* prior_hops) {
+ /* null terminated array */
+ char **args = NULL;
+ size_t max_args = 14, pos = 0, len;
#if DROPBEAR_CLI_PUBKEY_AUTH
m_list_elem *iter;
#endif
- /* Sufficient space for non-string args */
- len = 100;
- /* String arguments have arbitrary length, so determine space required */
- if (cli_opts.proxycmd) {
- len += strlen(cli_opts.proxycmd);
- }
#if DROPBEAR_CLI_PUBKEY_AUTH
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
{
- sign_key * key = (sign_key*)iter->item;
- len += 4 + strlen(key->filename);
+ /* "-i file" for each */
+ max_args += 2;
}
#endif
- args = m_malloc(len);
- total = 0;
+ args = m_malloc(sizeof(char*) * max_args);
+ pos = 0;
- /* Create new argument string */
+ args[pos] = m_strdup(argv0);
+ pos++;
if (cli_opts.quiet) {
- total += m_snprintf(args+total, len-total, "-q ");
+ args[pos] = m_strdup("-q");
+ pos++;
}
if (cli_opts.no_hostkey_check) {
- total += m_snprintf(args+total, len-total, "-y -y ");
+ args[pos] = m_strdup("-y");
+ pos++;
+ args[pos] = m_strdup("-y");
+ pos++;
} else if (cli_opts.always_accept_key) {
- total += m_snprintf(args+total, len-total, "-y ");
+ args[pos] = m_strdup("-y");
+ pos++;
}
if (cli_opts.proxycmd) {
- total += m_snprintf(args+total, len-total, "-J '%s' ", cli_opts.proxycmd);
+ args[pos] = m_strdup("-J");
+ pos++;
+ args[pos] = m_strdup(cli_opts.proxycmd);
+ pos++;
}
if (opts.recv_window != DEFAULT_RECV_WINDOW) {
- total += m_snprintf(args+total, len-total, "-W %u ", opts.recv_window);
+ args[pos] = m_strdup("-W");
+ pos++;
+ args[pos] = m_malloc(11);
+ m_snprintf(args[pos], 11, "%u", opts.recv_window);
+ pos++;
}
#if DROPBEAR_CLI_PUBKEY_AUTH
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
{
sign_key * key = (sign_key*)iter->item;
- total += m_snprintf(args+total, len-total, "-i %s ", key->filename);
+ args[pos] = m_strdup("-i");
+ pos++;
+ args[pos] = m_strdup(key->filename);
+ pos++;
}
#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
+ /* last hop */
+ args[pos] = m_strdup("-B");
+ pos++;
+ len = strlen(cli_opts.remotehost) + strlen(cli_opts.remoteport) + 2;
+ args[pos] = m_malloc(len);
+ snprintf(args[pos], len, "%s:%s", cli_opts.remotehost, cli_opts.remoteport);
+ pos++;
+
+ /* hostnames of prior hops */
+ args[pos] = m_strdup(prior_hops);
+ pos++;
+
return args;
}
@@ -596,7 +619,7 @@ static char* multihop_passthrough_args(void) {
* etc for as many hosts as we want.
*
* Note that "-J" arguments aren't actually used, instead
- * below sets cli_opts.proxycmd directly.
+ * below sets cli_opts.proxyexec directly.
*
* Ports for hosts can be specified as host/port.
*/
@@ -604,7 +627,7 @@ static void parse_multihop_hostname(const char* orighostarg, const char* argv0)
char *userhostarg = NULL;
char *hostbuf = NULL;
char *last_hop = NULL;
- char *remainder = NULL;
+ char *prior_hops = NULL;
/* both scp and rsync parse a user@host argument
* and turn it into "-l user host". This breaks
@@ -622,6 +645,8 @@ static void parse_multihop_hostname(const char* orighostarg, const char* argv0)
}
userhostarg = hostbuf;
+ /* Split off any last hostname and use that as remotehost/remoteport.
+ * That is used for authorized_keys checking etc */
last_hop = strrchr(userhostarg, ',');
if (last_hop) {
if (last_hop == userhostarg) {
@@ -629,35 +654,28 @@ static void parse_multihop_hostname(const char* orighostarg, const char* argv0)
}
*last_hop = '\0';
last_hop++;
- remainder = userhostarg;
+ prior_hops = userhostarg;
userhostarg = last_hop;
}
+ /* Update cli_opts.remotehost and cli_opts.remoteport */
parse_hostname(userhostarg);
- if (last_hop) {
- /* Set up the proxycmd */
- unsigned int cmd_len = 0;
- char *passthrough_args = multihop_passthrough_args();
- if (cli_opts.remoteport == NULL) {
- cli_opts.remoteport = "22";
+ /* Construct any multihop proxy command. Use proxyexec to
+ * avoid worrying about shell escaping. */
+ if (prior_hops) {
+ cli_opts.proxyexec = multihop_args(argv0, prior_hops);
+ /* Any -J argument has been copied to proxyexec */
+ if (cli_opts.proxycmd) {
+ m_free(cli_opts.proxycmd);
}
- cmd_len = strlen(argv0) + strlen(remainder)
- + strlen(cli_opts.remotehost) + strlen(cli_opts.remoteport)
- + strlen(passthrough_args)
- + 30;
- /* replace proxycmd. old -J arguments have been copied
- to passthrough_args */
- cli_opts.proxycmd = m_realloc(cli_opts.proxycmd, cmd_len);
- m_snprintf(cli_opts.proxycmd, cmd_len, "%s -B %s:%s %s %s",
- argv0, cli_opts.remotehost, cli_opts.remoteport,
- passthrough_args, remainder);
+
#ifndef DISABLE_ZLIB
- /* The stream will be incompressible since it's encrypted. */
+ /* This outer stream will be incompressible since it's encrypted. */
opts.compress_mode = DROPBEAR_COMPRESS_OFF;
#endif
- m_free(passthrough_args);
}
+
m_free(hostbuf);
}
#endif /* !DROPBEAR_CLI_MULTIHOP */
diff --git a/dbutil.c b/dbutil.c
index bd66454..910fa27 100644
--- a/dbutil.c
+++ b/dbutil.c
@@ -371,7 +371,6 @@ int spawn_command(void(*exec_fn)(const void *user_data), const void *exec_data,
void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell) {
char * argv[4];
char * baseshell = NULL;
- unsigned int i;
baseshell = basename(usershell);
@@ -393,6 +392,12 @@ void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell) {
argv[1] = NULL;
}
+ run_command(usershell, argv, maxfd);
+}
+
+void run_command(const char* argv0, char** args, unsigned int maxfd) {
+ unsigned int i;
+
/* Re-enable SIGPIPE for the executed process */
if (signal(SIGPIPE, SIG_DFL) == SIG_ERR) {
dropbear_exit("signal() error");
@@ -404,7 +409,7 @@ void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell) {
m_close(i);
}
- execv(usershell, argv);
+ execv(argv0, args);
}
#if DEBUG_TRACE
diff --git a/dbutil.h b/dbutil.h
index 64af170..bfc1f1f 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -63,6 +63,7 @@ char * stripcontrol(const char * text);
int spawn_command(void(*exec_fn)(const void *user_data), const void *exec_data,
int *writefd, int *readfd, int *errfd, pid_t *pid);
void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell);
+void run_command(const char* argv0, char** args, unsigned int maxfd);
#if ENABLE_CONNECT_UNIX
int connect_unix(const char* addr);
#endif
diff --git a/runopts.h b/runopts.h
index 1675836..11c3ef2 100644
--- a/runopts.h
+++ b/runopts.h
@@ -188,7 +188,12 @@ typedef struct cli_runopts {
unsigned int netcat_port;
#endif
#if DROPBEAR_CLI_PROXYCMD
+ /* A proxy command to run via the user's shell */
char *proxycmd;
+#endif
+#if DROPBEAR_CLI_MULTIHOP
+ /* Similar to proxycmd, but is arguments for execve(), not shell */
+ char **proxyexec;
#endif
char *bind_address;
char *bind_port;

View File

@@ -24,6 +24,11 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
file://CVE-2023-36328.patch \
file://CVE-2023-48795.patch \
file://0001-add-o-BatchMode-and-also-forward-this-when-multihop-.patch \
file://0001-Handle-arbitrary-length-paths-and-commands-in-multih.patch \
file://0001-cli-runopts.c-add-missing-DROPBEAR_CLI_PUBKEY_AUTH.patch \
file://0001-Avoid-unused-variable-with-DROPBEAR_CLI_PUBKEY_AUTH-.patch \
file://CVE-2025-47203.patch \
"
SRC_URI[sha256sum] = "bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b"

View File

@@ -0,0 +1,35 @@
From ba80428c2207259103b73871d447dee34755340c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Berkay=20Eren=20=C3=9Cr=C3=BCn?= <berkay.ueruen@tum.de>
Date: Tue, 23 Sep 2025 11:22:14 +0200
Subject: [PATCH] lib: Fix detection of asynchronous tags in entities
According to the XML standard, tags must be closed within the same
element in which they are opened. Since the change of the entity
processing method in version 2.7.0, violations of this rule have not
been handled correctly for entities.
This commit adds the required checks to detect any violations and
restores the correct behaviour.
CVE: CVE-2024-8176
Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1059]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
lib/xmlparse.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
index ce29ab6f..ba4e3c48 100644
--- a/lib/xmlparse.c
+++ b/lib/xmlparse.c
@@ -6087,6 +6087,10 @@ internalEntityProcessor(XML_Parser parser, const char *s, const char *end,
// process its possible inner entities (which are added to the
// m_openInternalEntities during doProlog or doContent calls above)
entity->hasMore = XML_FALSE;
+ if (! entity->is_param
+ && (openEntity->startTagLevel != parser->m_tagLevel)) {
+ return XML_ERROR_ASYNC_ENTITY;
+ }
triggerReenter(parser);
return result;
} // End of entity processing, "if" block will return here

View File

@@ -0,0 +1,115 @@
From 81a114f7eebcd41a6993337128cda337986a26f4 Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Mon, 15 Sep 2025 21:57:07 +0200
Subject: [PATCH] tests: Cover XML_ERROR_ASYNC_ENTITY cases
CVE: CVE-2024-8176
Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1059]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
tests/misc_tests.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 3346bce6..19f41df7 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -621,6 +621,91 @@ START_TEST(test_misc_expected_event_ptr_issue_980) {
}
END_TEST
+START_TEST(test_misc_sync_entity_tolerated) {
+ const char *const doc = "<!DOCTYPE t0 [\n"
+ " <!ENTITY a '<t1></t1>'>\n"
+ " <!ENTITY b '<t2>two</t2>'>\n"
+ " <!ENTITY c '<t3>three<t4>four</t4>three</t3>'>\n"
+ " <!ENTITY d '<t5>&b;</t5>'>\n"
+ "]>\n"
+ "<t0>&a;&b;&c;&d;</t0>\n";
+ XML_Parser parser = XML_ParserCreate(NULL);
+
+ assert_true(_XML_Parse_SINGLE_BYTES(parser, doc, (int)strlen(doc),
+ /*isFinal=*/XML_TRUE)
+ == XML_STATUS_OK);
+
+ XML_ParserFree(parser);
+}
+END_TEST
+
+START_TEST(test_misc_async_entity_rejected) {
+ struct test_case {
+ const char *doc;
+ enum XML_Status expectedStatusNoGE;
+ enum XML_Error expectedErrorNoGE;
+ };
+ const struct test_case cases[] = {
+ // Opened by one entity, closed by another
+ {"<!DOCTYPE t0 [\n"
+ " <!ENTITY open '<t1>'>\n"
+ " <!ENTITY close '</t1>'>\n"
+ "]>\n"
+ "<t0>&open;&close;</t0>\n",
+ XML_STATUS_OK, XML_ERROR_NONE},
+ // Opened by tag, closed by entity (non-root case)
+ {"<!DOCTYPE t0 [\n"
+ " <!ENTITY g0 ''>\n"
+ " <!ENTITY g1 '&g0;</t1>'>\n"
+ "]>\n"
+ "<t0><t1>&g1;</t0>\n",
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
+ // Opened by tag, closed by entity (root case)
+ {"<!DOCTYPE t0 [\n"
+ " <!ENTITY g0 ''>\n"
+ " <!ENTITY g1 '&g0;</t0>'>\n"
+ "]>\n"
+ "<t0>&g1;\n",
+ XML_STATUS_ERROR, XML_ERROR_NO_ELEMENTS},
+ // Opened by entity, closed by tag <-- regression from 2.7.0
+ {"<!DOCTYPE t0 [\n"
+ " <!ENTITY g0 ''>\n"
+ " <!ENTITY g1 '<t1>&g0;'>\n"
+ "]>\n"
+ "<t0>&g1;</t1></t0>\n",
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
+ // Opened by tag, closed by entity; then the other way around
+ {"<!DOCTYPE t0 [\n"
+ " <!ENTITY open '<t1>'>\n"
+ " <!ENTITY close '</t1>'>\n"
+ "]>\n"
+ "<t0><t1>&close;&open;</t1></t0>\n",
+ XML_STATUS_OK, XML_ERROR_NONE},
+ };
+
+ for (size_t i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) {
+ const struct test_case testCase = cases[i];
+ set_subtest("cases[%d]", (int)i);
+
+ const char *const doc = testCase.doc;
+#if XML_GE == 1
+ const enum XML_Status expectedStatus = XML_STATUS_ERROR;
+ const enum XML_Error expectedError = XML_ERROR_ASYNC_ENTITY;
+#else
+ const enum XML_Status expectedStatus = testCase.expectedStatusNoGE;
+ const enum XML_Error expectedError = testCase.expectedErrorNoGE;
+#endif
+
+ XML_Parser parser = XML_ParserCreate(NULL);
+ assert_true(_XML_Parse_SINGLE_BYTES(parser, doc, (int)strlen(doc),
+ /*isFinal=*/XML_TRUE)
+ == expectedStatus);
+ assert_true(XML_GetErrorCode(parser) == expectedError);
+ XML_ParserFree(parser);
+ }
+}
+END_TEST
+
void
make_miscellaneous_test_case(Suite *s) {
TCase *tc_misc = tcase_create("miscellaneous tests");
@@ -649,4 +734,6 @@ make_miscellaneous_test_case(Suite *s) {
tcase_add_test(tc_misc, test_misc_stopparser_rejects_unstarted_parser);
tcase_add_test__if_xml_ge(tc_misc, test_renter_loop_finite_content);
tcase_add_test(tc_misc, test_misc_expected_event_ptr_issue_980);
+ tcase_add_test(tc_misc, test_misc_sync_entity_tolerated);
+ tcase_add_test(tc_misc, test_misc_async_entity_rejected);
}

View File

@@ -0,0 +1,78 @@
From a9aaf85cfc3025b7013b5adc4bef2ce32ecc7fb1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Berkay=20Eren=20=C3=9Cr=C3=BCn?= <berkay.ueruen@tum.de>
Date: Tue, 23 Sep 2025 12:12:50 +0200
Subject: [PATCH] tests: Add line/column checks to async entity tests
CVE: CVE-2024-8176
Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1059]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
tests/misc_tests.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tests/misc_tests.c b/tests/misc_tests.c
index 19f41df7..7a4d2455 100644
--- a/tests/misc_tests.c
+++ b/tests/misc_tests.c
@@ -644,6 +644,8 @@ START_TEST(test_misc_async_entity_rejected) {
const char *doc;
enum XML_Status expectedStatusNoGE;
enum XML_Error expectedErrorNoGE;
+ XML_Size expectedErrorLine;
+ XML_Size expectedErrorColumn;
};
const struct test_case cases[] = {
// Opened by one entity, closed by another
@@ -652,35 +654,35 @@ START_TEST(test_misc_async_entity_rejected) {
" <!ENTITY close '</t1>'>\n"
"]>\n"
"<t0>&open;&close;</t0>\n",
- XML_STATUS_OK, XML_ERROR_NONE},
+ XML_STATUS_OK, XML_ERROR_NONE, 5, 4},
// Opened by tag, closed by entity (non-root case)
{"<!DOCTYPE t0 [\n"
" <!ENTITY g0 ''>\n"
" <!ENTITY g1 '&g0;</t1>'>\n"
"]>\n"
"<t0><t1>&g1;</t0>\n",
- XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH, 5, 8},
// Opened by tag, closed by entity (root case)
{"<!DOCTYPE t0 [\n"
" <!ENTITY g0 ''>\n"
" <!ENTITY g1 '&g0;</t0>'>\n"
"]>\n"
"<t0>&g1;\n",
- XML_STATUS_ERROR, XML_ERROR_NO_ELEMENTS},
+ XML_STATUS_ERROR, XML_ERROR_NO_ELEMENTS, 5, 4},
// Opened by entity, closed by tag <-- regression from 2.7.0
{"<!DOCTYPE t0 [\n"
" <!ENTITY g0 ''>\n"
" <!ENTITY g1 '<t1>&g0;'>\n"
"]>\n"
"<t0>&g1;</t1></t0>\n",
- XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH, 5, 4},
// Opened by tag, closed by entity; then the other way around
{"<!DOCTYPE t0 [\n"
" <!ENTITY open '<t1>'>\n"
" <!ENTITY close '</t1>'>\n"
"]>\n"
"<t0><t1>&close;&open;</t1></t0>\n",
- XML_STATUS_OK, XML_ERROR_NONE},
+ XML_STATUS_OK, XML_ERROR_NONE, 5, 8},
};
for (size_t i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) {
@@ -701,6 +703,11 @@ START_TEST(test_misc_async_entity_rejected) {
/*isFinal=*/XML_TRUE)
== expectedStatus);
assert_true(XML_GetErrorCode(parser) == expectedError);
+#if XML_GE == 1
+ assert_true(XML_GetCurrentLineNumber(parser) == testCase.expectedErrorLine);
+ assert_true(XML_GetCurrentColumnNumber(parser)
+ == testCase.expectedErrorColumn);
+#endif
XML_ParserFree(parser);
}
}

View File

@@ -13,6 +13,9 @@ SRC_URI = "${GITHUB_BASE_URI}/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \
file://0001-tests-Cover-indirect-entity-recursion.patch;striplevel=2 \
file://CVE-2024-8176-01.patch;striplevel=2 \
file://CVE-2024-8176-02.patch;striplevel=2 \
file://CVE-2024-8176-03.patch \
file://CVE-2024-8176-04.patch \
file://CVE-2024-8176-05.patch \
"
GITHUB_BASE_URI = "https://github.com/libexpat/libexpat/releases/"

View File

@@ -0,0 +1,69 @@
From 987309f23ada52592bffdb5db0d8a5d58bd8097b Mon Sep 17 00:00:00 2001
From: Philip Withnall <pwithnall@gnome.org>
Date: Tue, 3 Jun 2025 11:31:04 +0100
Subject: [PATCH] gstring: Fix overflow check when expanding the string
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
After commit 34b7992fd6e3894bf6d2229b8aa59cac34bcb1b5 the overflow check
was only done when expanding the string, but we need to do it before
checking whether to expand the string, otherwise that calculation could
overflow and falsely decide that the string is big enough already.
As a concrete example, consider a `GString` which has:
* `.len = G_MAXSIZE / 2 + 1`
* `.allocated_len = G_MAXSIZE / 2 + 1`
and `g_string_append()` is called on it with an input string of length
`G_MAXSIZE / 2`.
This results in a call `g_string_maybe_expand (string, G_MAXSIZE / 2)`,
which calculates `string->len + len` as `(G_MAXSIZE / 2 + 1) +
(G_MAXSIZE / 2)` which evaluates to `1` as it overflows. This is not
greater than `string->allocated_len` (which is `G_MAXSIZE / 2 + 1`), so
`g_string_expand()` is *not* called, and `g_string_maybe_expand()`
returns successfully. The caller then assumes that theres enough space
in the buffer, and happily continues to cause a buffer overflow.
Its unlikely anyone could hit this in practice because it requires
ludicrously big strings and `GString` allocations, which likely would
have been blocked by other code, but if were going to have the overflow
checks in `GString` then they should be effective.
Spotted by code inspection.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
CVE: CVE-2025-6052
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/987309f23ada52592bffdb5db0d8a5d58bd8097b]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
glib/gstring.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/glib/gstring.c b/glib/gstring.c
index 2a399ee21..8a489ca0d 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -78,10 +78,6 @@ static void
g_string_expand (GString *string,
gsize len)
{
- /* Detect potential overflow */
- if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
- g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
-
string->allocated_len = g_nearest_pow (string->len + len + 1);
/* If the new size is bigger than G_MAXSIZE / 2, only allocate enough
* memory for this string and don't over-allocate.
@@ -96,6 +92,10 @@ static inline void
g_string_maybe_expand (GString *string,
gsize len)
{
+ /* Detect potential overflow */
+ if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
+ g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
+
if (G_UNLIKELY (string->len + len >= string->allocated_len))
g_string_expand (string, len);
}

View File

@@ -0,0 +1,97 @@
From 6aa97beda32bb337370858862f4efe2f3372619f Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Mon, 7 Jul 2025 20:52:24 +0200
Subject: [PATCH] gstring: Fix g_string_sized_new segmentation fault
If glib is compiled with -Dglib_assert=false, i.e. no asserts
enabled, then g_string_sized_new(G_MAXSIZE) leads to a segmentation
fault due to an out of boundary write.
This happens because the overflow check was moved into
g_string_maybe_expand which is not called by g_string_sized_new.
By assuming that string->allocated_len is always larger than
string->len (and the code would be in huge trouble if that is not true),
the G_UNLIKELY check in g_string_maybe_expand can be rephrased to
avoid a potential G_MAXSIZE overflow.
This in turn leads to 150-200 bytes smaller compiled library
depending on gcc and clang versions, and one less check for the most
common code paths.
Reverts https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4655 and
reorders internal g_string_maybe_expand check to still fix
CVE-2025-6052.
CVE: CVE-2025-6052
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6aa97beda32bb337370858862f4efe2f3372619f]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
glib/gstring.c | 10 +++++-----
glib/tests/string.c | 18 ++++++++++++++++++
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/glib/gstring.c b/glib/gstring.c
index 010a8e976..24c4bfb40 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -78,6 +78,10 @@ static void
g_string_expand (GString *string,
gsize len)
{
+ /* Detect potential overflow */
+ if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
+ g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
+
string->allocated_len = g_nearest_pow (string->len + len + 1);
/* If the new size is bigger than G_MAXSIZE / 2, only allocate enough
* memory for this string and don't over-allocate.
@@ -92,11 +96,7 @@ static inline void
g_string_maybe_expand (GString *string,
gsize len)
{
- /* Detect potential overflow */
- if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
- g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
-
- if (G_UNLIKELY (string->len + len >= string->allocated_len))
+ if (G_UNLIKELY (len >= string->allocated_len - string->len))
g_string_expand (string, len);
}
diff --git a/glib/tests/string.c b/glib/tests/string.c
index aa363c57a..e3bc4a02e 100644
--- a/glib/tests/string.c
+++ b/glib/tests/string.c
@@ -743,6 +743,23 @@ test_string_new_take_null (void)
g_string_free (g_steal_pointer (&string), TRUE);
}
+static void
+test_string_sized_new (void)
+{
+
+ if (g_test_subprocess ())
+ {
+ GString *string = g_string_sized_new (G_MAXSIZE);
+ g_string_free (string, TRUE);
+ }
+ else
+ {
+ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
+ g_test_trap_assert_failed ();
+ g_test_trap_assert_stderr ("*string would overflow*");
+ }
+}
+
int
main (int argc,
char *argv[])
@@ -772,6 +789,7 @@ main (int argc,
g_test_add_func ("/string/test-string-steal", test_string_steal);
g_test_add_func ("/string/test-string-new-take", test_string_new_take);
g_test_add_func ("/string/test-string-new-take/null", test_string_new_take_null);
+ g_test_add_func ("/string/sized-new", test_string_sized_new);
return g_test_run();
}

View File

@@ -0,0 +1,35 @@
From 3752760c5091eaed561ec11636b069e529533514 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Mon, 7 Jul 2025 20:57:41 +0200
Subject: [PATCH] gstring: Improve g_string_append_len_inline checks
Use the same style for the G_LIKELY check here as in g_string_sized_new.
The check could overflow on 32 bit systems.
Also improve the memcpy/memmove check to use memcpy if val itself is
adjacent to end + len_unsigned, which means that no overlapping exists.
CVE: CVE-2025-6052
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/3752760c5091eaed561ec11636b069e529533514]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
glib/gstring.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/glib/gstring.h b/glib/gstring.h
index e817176c9..c5e64b33a 100644
--- a/glib/gstring.h
+++ b/glib/gstring.h
@@ -228,10 +228,10 @@ g_string_append_len_inline (GString *gstring,
else
len_unsigned = (gsize) len;
- if (G_LIKELY (gstring->len + len_unsigned < gstring->allocated_len))
+ if (G_LIKELY (len_unsigned < gstring->allocated_len - gstring->len))
{
char *end = gstring->str + gstring->len;
- if (G_LIKELY (val + len_unsigned <= end || val > end + len_unsigned))
+ if (G_LIKELY (val + len_unsigned <= end || val >= end + len_unsigned))
memcpy (end, val, len_unsigned);
else
memmove (end, val, len_unsigned);

View File

@@ -0,0 +1,43 @@
From 61e963284889ddb4544e6f1d5261c16120f6fcc3 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Tue, 1 Jul 2025 10:58:07 -0500
Subject: [PATCH] gfileutils: fix computation of temporary file name
We need to ensure that the value we use to index into the letters array
is always positive.
Fixes #3716
CVE: CVE-2025-7039
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/61e963284889ddb4544e6f1d5261c16120f6fcc3]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
glib/gfileutils.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index c7d3339d1..286b1b154 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -1532,9 +1532,9 @@ get_tmp_file (gchar *tmpl,
static const char letters[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
static const int NLETTERS = sizeof (letters) - 1;
- gint64 value;
- gint64 now_us;
- static int counter = 0;
+ guint64 value;
+ guint64 now_us;
+ static guint counter = 0;
g_return_val_if_fail (tmpl != NULL, -1);
@@ -1553,7 +1553,7 @@ get_tmp_file (gchar *tmpl,
for (count = 0; count < 100; value += 7777, ++count)
{
- gint64 v = value;
+ guint64 v = value;
/* Fill in the random bits. */
XXXXXX[0] = letters[v % NLETTERS];

View File

@@ -29,6 +29,10 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://CVE-2025-3360-06.patch \
file://CVE-2025-4373-01.patch \
file://CVE-2025-4373-02.patch \
file://CVE-2025-7039.patch \
file://CVE-2025-6052-01.patch \
file://CVE-2025-6052-02.patch \
file://CVE-2025-6052-03.patch \
"
SRC_URI:append:class-native = " file://relocate-modules.patch \
file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
@@ -66,3 +70,5 @@ def find_meson_cross_files(d):
python () {
find_meson_cross_files(d)
}
CVE_STATUS[CVE-2025-4056] = "not-applicable-platform: Issue only applies on Windows"

View File

@@ -1,6 +1,6 @@
SRCBRANCH ?= "release/2.39/master"
PV = "2.39+git"
SRCREV_glibc ?= "06a70769fd0b2e1f2a3085ad50ab620282bd77b3"
SRCREV_glibc ?= "b027d5b145f1b2908f370bdb96dfe40180d0fcb6"
SRCREV_localedef ?= "fab74f31b3811df543e24b6de47efdf45b538abc"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git;protocol=https"

View File

@@ -18,7 +18,7 @@ easier access for another. 'ASLR bypass itself is not a vulnerability.'"
CVE_STATUS_GROUPS += "CVE_STATUS_STABLE_BACKPORTS"
CVE_STATUS_STABLE_BACKPORTS = "CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602 CVE-2025-0395 \
CVE-2025-4802 CVE-2025-5702"
CVE-2025-4802 CVE-2025-5702 CVE-2025-8058"
CVE_STATUS_STABLE_BACKPORTS[status] = "cpe-stable-backport: fix available in used git hash"
DEPENDS += "gperf-native bison-native"

View File

@@ -26,7 +26,7 @@ inherit core-image setuptools3 features_check
REQUIRED_DISTRO_FEATURES += "xattr"
SRCREV ?= "e5c05018e042e762c886c2f5476f2277a787b9c6"
SRCREV ?= "517a1206e0e7fbb5d0f05b25a08b0f06462a4b8c"
SRC_URI = "git://git.yoctoproject.org/poky;branch=scarthgap \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \

View File

@@ -0,0 +1,186 @@
From 71e1e8af5ee46dad1b57bb96cfbf1c3ad21fbd7b Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Fri, 4 Jul 2025 14:28:26 +0200
Subject: [PATCH] schematron: Fix memory safety issues in
xmlSchematronReportOutput
Fix use-after-free (CVE-2025-49794) and type confusion (CVE-2025-49796)
in xmlSchematronReportOutput.
Fixes #931.
Fixes #933.
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/71e1e8af5ee46dad1b57bb96cfbf1c3ad21fbd7b]
CVE: CVE-2025-49794 CVE-2025-49796
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
result/schematron/cve-2025-49794_0.err | 2 ++
result/schematron/cve-2025-49796_0.err | 2 ++
schematron.c | 49 ++++++++++++++------------
test/schematron/cve-2025-49794.sct | 10 ++++++
test/schematron/cve-2025-49794_0.xml | 6 ++++
test/schematron/cve-2025-49796.sct | 9 +++++
test/schematron/cve-2025-49796_0.xml | 3 ++
7 files changed, 58 insertions(+), 23 deletions(-)
create mode 100644 result/schematron/cve-2025-49794_0.err
create mode 100644 result/schematron/cve-2025-49796_0.err
create mode 100644 test/schematron/cve-2025-49794.sct
create mode 100644 test/schematron/cve-2025-49794_0.xml
create mode 100644 test/schematron/cve-2025-49796.sct
create mode 100644 test/schematron/cve-2025-49796_0.xml
diff --git a/result/schematron/cve-2025-49794_0.err b/result/schematron/cve-2025-49794_0.err
new file mode 100644
index 0000000..5775231
--- /dev/null
+++ b/result/schematron/cve-2025-49794_0.err
@@ -0,0 +1,2 @@
+./test/schematron/cve-2025-49794_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2:
+./test/schematron/cve-2025-49794_0.xml fails to validate
diff --git a/result/schematron/cve-2025-49796_0.err b/result/schematron/cve-2025-49796_0.err
new file mode 100644
index 0000000..bf875ee
--- /dev/null
+++ b/result/schematron/cve-2025-49796_0.err
@@ -0,0 +1,2 @@
+./test/schematron/cve-2025-49796_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2:
+./test/schematron/cve-2025-49796_0.xml fails to validate
diff --git a/schematron.c b/schematron.c
index a825920..411a515 100644
--- a/schematron.c
+++ b/schematron.c
@@ -1389,27 +1389,15 @@ exit:
* *
************************************************************************/
-static xmlNodePtr
+static xmlXPathObjectPtr
xmlSchematronGetNode(xmlSchematronValidCtxtPtr ctxt,
xmlNodePtr cur, const xmlChar *xpath) {
- xmlNodePtr node = NULL;
- xmlXPathObjectPtr ret;
-
if ((ctxt == NULL) || (cur == NULL) || (xpath == NULL))
return(NULL);
ctxt->xctxt->doc = cur->doc;
ctxt->xctxt->node = cur;
- ret = xmlXPathEval(xpath, ctxt->xctxt);
- if (ret == NULL)
- return(NULL);
-
- if ((ret->type == XPATH_NODESET) &&
- (ret->nodesetval != NULL) && (ret->nodesetval->nodeNr > 0))
- node = ret->nodesetval->nodeTab[0];
-
- xmlXPathFreeObject(ret);
- return(node);
+ return(xmlXPathEval(xpath, ctxt->xctxt));
}
/**
@@ -1455,25 +1443,40 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
(child->type == XML_CDATA_SECTION_NODE))
ret = xmlStrcat(ret, child->content);
else if (IS_SCHEMATRON(child, "name")) {
+ xmlXPathObject *obj = NULL;
xmlChar *path;
path = xmlGetNoNsProp(child, BAD_CAST "path");
node = cur;
if (path != NULL) {
- node = xmlSchematronGetNode(ctxt, cur, path);
- if (node == NULL)
- node = cur;
+ obj = xmlSchematronGetNode(ctxt, cur, path);
+ if ((obj != NULL) &&
+ (obj->type == XPATH_NODESET) &&
+ (obj->nodesetval != NULL) &&
+ (obj->nodesetval->nodeNr > 0))
+ node = obj->nodesetval->nodeTab[0];
xmlFree(path);
}
- if ((node->ns == NULL) || (node->ns->prefix == NULL))
- ret = xmlStrcat(ret, node->name);
- else {
- ret = xmlStrcat(ret, node->ns->prefix);
- ret = xmlStrcat(ret, BAD_CAST ":");
- ret = xmlStrcat(ret, node->name);
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if ((node->ns == NULL) || (node->ns->prefix == NULL))
+ ret = xmlStrcat(ret, node->name);
+ else {
+ ret = xmlStrcat(ret, node->ns->prefix);
+ ret = xmlStrcat(ret, BAD_CAST ":");
+ ret = xmlStrcat(ret, node->name);
+ }
+ break;
+
+ /* TODO: handle other node types */
+ default:
+ break;
}
+
+ xmlXPathFreeObject(obj);
} else if (IS_SCHEMATRON(child, "value-of")) {
xmlChar *select;
xmlXPathObjectPtr eval;
diff --git a/test/schematron/cve-2025-49794.sct b/test/schematron/cve-2025-49794.sct
new file mode 100644
index 0000000..7fc9ee3
--- /dev/null
+++ b/test/schematron/cve-2025-49794.sct
@@ -0,0 +1,10 @@
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+ <sch:pattern id="">
+ <sch:rule context="boo0">
+ <sch:report test="not(0)">
+ <sch:name path="&#9;e|namespace::*|e"/>
+ </sch:report>
+ <sch:report test="0"></sch:report>
+ </sch:rule>
+ </sch:pattern>
+</sch:schema>
diff --git a/test/schematron/cve-2025-49794_0.xml b/test/schematron/cve-2025-49794_0.xml
new file mode 100644
index 0000000..debc64b
--- /dev/null
+++ b/test/schematron/cve-2025-49794_0.xml
@@ -0,0 +1,6 @@
+<librar0>
+ <boo0 t="">
+ <author></author>
+ </boo0>
+ <ins></ins>
+</librar0>
diff --git a/test/schematron/cve-2025-49796.sct b/test/schematron/cve-2025-49796.sct
new file mode 100644
index 0000000..e9702d7
--- /dev/null
+++ b/test/schematron/cve-2025-49796.sct
@@ -0,0 +1,9 @@
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+ <sch:pattern id="">
+ <sch:rule context="boo0">
+ <sch:report test="not(0)">
+ <sch:name path="/"/>
+ </sch:report>
+ </sch:rule>
+ </sch:pattern>
+</sch:schema>
diff --git a/test/schematron/cve-2025-49796_0.xml b/test/schematron/cve-2025-49796_0.xml
new file mode 100644
index 0000000..be33c4e
--- /dev/null
+++ b/test/schematron/cve-2025-49796_0.xml
@@ -0,0 +1,3 @@
+<librar0>
+ <boo0/>
+</librar0>
--
2.49.0

View File

@@ -0,0 +1,92 @@
From 19e0a3ed092085a4d6689397d4f08cf5d86267af Mon Sep 17 00:00:00 2001
From: Michael Mann <mmann78@netscape.net>
Date: Sat, 21 Jun 2025 12:11:30 -0400
Subject: [PATCH] Schematron: Fix null pointer dereference leading to DoS
(CVE-2025-49795)
Fixes #932
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/c24909ba2601848825b49a60f988222da3019667]
CVE: CVE-2025-49795
(cherry picked from commit c24909ba2601848825b49a60f988222da3019667)
Signed-off-by: Roland Kovacs <roland.kovacs@est.tech>
---
result/schematron/zvon16_0 | 6 ++++++
result/schematron/zvon16_0.err | 5 +++++
schematron.c | 5 +++++
test/schematron/zvon16.sct | 7 +++++++
test/schematron/zvon16_0.xml | 5 +++++
5 files changed, 28 insertions(+)
create mode 100644 result/schematron/zvon16_0
create mode 100644 result/schematron/zvon16_0.err
create mode 100644 test/schematron/zvon16.sct
create mode 100644 test/schematron/zvon16_0.xml
diff --git a/result/schematron/zvon16_0 b/result/schematron/zvon16_0
new file mode 100644
index 00000000..768cf6f5
--- /dev/null
+++ b/result/schematron/zvon16_0
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<library>
+ <book title="Test Book" id="bk101">
+ <author>Test Author</author>
+ </book>
+</library>
diff --git a/result/schematron/zvon16_0.err b/result/schematron/zvon16_0.err
new file mode 100644
index 00000000..a4fab4c8
--- /dev/null
+++ b/result/schematron/zvon16_0.err
@@ -0,0 +1,5 @@
+Pattern: TestPattern
+xmlXPathCompOpEval: function falae not found
+XPath error : Unregistered function
+/library/book line 2: Book
+./test/schematron/zvon16_0.xml fails to validate
diff --git a/schematron.c b/schematron.c
index a8259201..86c63e64 100644
--- a/schematron.c
+++ b/schematron.c
@@ -1481,6 +1481,11 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
select = xmlGetNoNsProp(child, BAD_CAST "select");
comp = xmlXPathCtxtCompile(ctxt->xctxt, select);
eval = xmlXPathCompiledEval(comp, ctxt->xctxt);
+ if (eval == NULL) {
+ xmlXPathFreeCompExpr(comp);
+ xmlFree(select);
+ return ret;
+ }
switch (eval->type) {
case XPATH_NODESET: {
diff --git a/test/schematron/zvon16.sct b/test/schematron/zvon16.sct
new file mode 100644
index 00000000..f03848aa
--- /dev/null
+++ b/test/schematron/zvon16.sct
@@ -0,0 +1,7 @@
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+ <sch:pattern id="TestPattern">
+ <sch:rule context="book">
+ <sch:report test="not(@available)">Book <sch:value-of select="falae()"/> test</sch:report>
+ </sch:rule>
+ </sch:pattern>
+</sch:schema>
diff --git a/test/schematron/zvon16_0.xml b/test/schematron/zvon16_0.xml
new file mode 100644
index 00000000..551e2d65
--- /dev/null
+++ b/test/schematron/zvon16_0.xml
@@ -0,0 +1,5 @@
+<library>
+ <book title="Test Book" id="bk101">
+ <author>Test Author</author>
+ </book>
+</library>
--
2.34.1

View File

@@ -0,0 +1,103 @@
From 5e9ec5c107d3f5b5179c3dbc19df43df041cd55b Mon Sep 17 00:00:00 2001
From: Michael Mann <mmann78@netscape.net>
Date: Fri, 20 Jun 2025 23:05:00 -0400
Subject: [PATCH] [CVE-2025-6170] Fix potential buffer overflows of interactive
shell
Fixes #941
CVE: CVE-2025-6170
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/5e9ec5c107d3f5b5179c3dbc19df43df041cd55b]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
debugXML.c | 15 ++++++++++-----
result/scripts/long_command | 8 ++++++++
test/scripts/long_command.script | 6 ++++++
test/scripts/long_command.xml | 1 +
4 files changed, 25 insertions(+), 5 deletions(-)
create mode 100644 result/scripts/long_command
create mode 100644 test/scripts/long_command.script
create mode 100644 test/scripts/long_command.xml
diff --git a/debugXML.c b/debugXML.c
index ed56b0f8..452b9573 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -1043,6 +1043,10 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
xmlCtxtGenericNodeCheck(ctxt, node);
}
+#define MAX_PROMPT_SIZE 500
+#define MAX_ARG_SIZE 400
+#define MAX_COMMAND_SIZE 100
+
/**
* xmlCtxtDumpNode:
* @output: the FILE * for the output
@@ -2794,10 +2798,10 @@ void
xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
FILE * output)
{
- char prompt[500] = "/ > ";
+ char prompt[MAX_PROMPT_SIZE] = "/ > ";
char *cmdline = NULL, *cur;
- char command[100];
- char arg[400];
+ char command[MAX_COMMAND_SIZE];
+ char arg[MAX_ARG_SIZE];
int i;
xmlShellCtxtPtr ctxt;
xmlXPathObjectPtr list;
@@ -2855,7 +2859,8 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
cur++;
i = 0;
while ((*cur != ' ') && (*cur != '\t') &&
- (*cur != '\n') && (*cur != '\r')) {
+ (*cur != '\n') && (*cur != '\r') &&
+ (i < (MAX_COMMAND_SIZE - 1))) {
if (*cur == 0)
break;
command[i++] = *cur++;
@@ -2870,7 +2875,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
while ((*cur == ' ') || (*cur == '\t'))
cur++;
i = 0;
- while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
+ while ((*cur != '\n') && (*cur != '\r') && (*cur != 0) && (i < (MAX_ARG_SIZE-1))) {
if (*cur == 0)
break;
arg[i++] = *cur++;
diff --git a/result/scripts/long_command b/result/scripts/long_command
new file mode 100644
index 00000000..e6f00708
--- /dev/null
+++ b/result/scripts/long_command
@@ -0,0 +1,8 @@
+/ > b > b > Object is a Node Set :
+Set contains 1 nodes:
+1 ELEMENT a:c
+b > Unknown command This_is_a_really_long_command_string_designed_to_test_the_limits_of_the_memory_that_stores_the_comm
+b > b > Unknown command ess_currents_of_time_and_existence
+b > <?xml version="1.0"?>
+<a xmlns:a="bar"><b xmlns:a="foo">Navigating_the_labyrinthine_corridors_of_human_cognition_one_often_encounters_the_perplexing_paradox_that_the_more_we_delve_into_the_intricate_dance_of_neural_pathways_and_synaptic_firings_the_further_we_seem_to_stray_from_a_truly_holistic_understanding_of_consciousness_a_phenomenon_that_remains_as_elusive_as_a_moonbeam_caught_in_a_spiderweb_yet_undeniably_shapes_every_fleeting_thought_every_prof</b></a>
+b >
\ No newline at end of file
diff --git a/test/scripts/long_command.script b/test/scripts/long_command.script
new file mode 100644
index 00000000..00f6df09
--- /dev/null
+++ b/test/scripts/long_command.script
@@ -0,0 +1,6 @@
+cd a/b
+set <a:c/>
+xpath //*[namespace-uri()="foo"]
+This_is_a_really_long_command_string_designed_to_test_the_limits_of_the_memory_that_stores_the_command_please_dont_crash foo
+set Navigating_the_labyrinthine_corridors_of_human_cognition_one_often_encounters_the_perplexing_paradox_that_the_more_we_delve_into_the_intricate_dance_of_neural_pathways_and_synaptic_firings_the_further_we_seem_to_stray_from_a_truly_holistic_understanding_of_consciousness_a_phenomenon_that_remains_as_elusive_as_a_moonbeam_caught_in_a_spiderweb_yet_undeniably_shapes_every_fleeting_thought_every_profound_emotion_and_every_grand_aspiration_that_propels_our_species_ever_onward_through_the_relentless_currents_of_time_and_existence
+save -
diff --git a/test/scripts/long_command.xml b/test/scripts/long_command.xml
new file mode 100644
index 00000000..1ba44016
--- /dev/null
+++ b/test/scripts/long_command.xml
@@ -0,0 +1 @@
+<a xmlns:a="bar"><b xmlns:a="foo"/></a>

View File

@@ -21,6 +21,9 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt
file://CVE-2025-32414.patch \
file://CVE-2025-32415.patch \
file://CVE-2025-6021.patch \
file://CVE-2025-49794-CVE-2025-49796.patch \
file://CVE-2025-49795.patch \
file://CVE-2025-6170.patch \
"
SRC_URI[archive.sha256sum] = "c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995"
@@ -29,6 +32,10 @@ SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be47223
# Disputed as a security issue, but fixed in d39f780
CVE_STATUS[CVE-2023-45322] = "disputed: issue requires memory allocation to fail"
# Disputed as a security issue, if attempts to process an invalid file, it fails
# https://gitlab.gnome.org/GNOME/libxml2/-/issues/958
CVE_STATUS[CVE-2025-8732] = "disputed: the code maintainer explains, that the issue can only be triggered with untrusted SGML catalogs and it makes absolutely no sense to use untrusted catalogs. The issue triggers a crash if an invalid file is provided. https://gitlab.gnome.org/GNOME/libxml2/-/issues/958"
BINCONFIG = "${bindir}/xml2-config"
PACKAGECONFIG ??= "python \

View File

@@ -0,0 +1,25 @@
From 27d1493340d714e7be6e08c0a8f43e48276149c4 Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@invisible-island.net>
Date: Sat, 29 Mar 2025 22:52:37 +0000
Subject: [PATCH] snapshot of project "ncurses", label v6_5_20250329
CVE: CVE-2025-6141
Upstream-Status: Backport [https://github.com/ThomasDickey/ncurses-snapshots/commit/27d1493340d714e7be6e08c0a8f43e48276149c4]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
ncurses/tinfo/parse_entry.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
index a2278c07..c551c780 100644
--- a/ncurses/tinfo/parse_entry.c
+++ b/ncurses/tinfo/parse_entry.c
@@ -985,6 +985,8 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
bp = tp->Strings[from_ptr->nte_index];
if (VALID_STRING(bp)) {
for (dp = buf2; *bp; bp++) {
+ if ((size_t) (dp - buf2) >= (sizeof(buf2) - sizeof(TERMTYPE2)))
+ break;
if (bp[0] == '$' && bp[1] == '<') {
while (*bp && *bp != '>') {
++bp;

View File

@@ -30,6 +30,10 @@ ENABLE_WIDEC ?= "true"
# _GNU_SOURCE is required for widec stuff and is not detected automatically
CPPFLAGS += "-D_GNU_SOURCE"
# Check if we still need it when next release (6.6) happens
CFLAGS += "-std=gnu17"
BUILD_CFLAGS += "-std=gnu17"
# natives don't generally look in base_libdir
base_libdir:class-native = "${libdir}"

View File

@@ -8,6 +8,7 @@ SRC_URI += "file://0001-tic-hang.patch \
file://0001-Updating-reset-code-ncurses-6.4-patch-20231104.patch \
file://CVE-2023-50495.patch \
file://CVE-2023-45918.patch \
file://CVE-2025-6141.patch \
"
# commit id corresponds to the revision in package version
SRCREV = "1003914e200fd622a27237abca155ce6bf2e6030"

View File

@@ -0,0 +1,97 @@
From 3a51e31be9f626cf772733cb289ed64739fab0e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
Date: Tue, 20 Feb 2024 19:26:16 +0100
Subject: [PATCH] timedated: Respond on org.freedesktop.timedate1.SetNTP only
when really finished
The method returns prematurely (before jobs it triggers terminate). This
is externally visible because other methods may fail if jobs did not
finish.
Postpone the DBus method response until we collect all signals for
finished jobs.
systemd-timedated keeps track of in-flight DBus requests and answers
them all in unspecified order when jobs finish. The capacity of requests
in systemd-timedated is limited.
Fixes: #17739
Upstream-Status: Backport [https://github.com/systemd/systemd/commit/3a51e31be9f626cf772733cb289ed64739fab0e4]
Signed-off-by: Michal Seben <michal.seben@siemens.com>
---
src/timedate/timedated.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
Index: git/src/timedate/timedated.c
===================================================================
--- git.orig/src/timedate/timedated.c
+++ git/src/timedate/timedated.c
@@ -45,6 +45,7 @@
#define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n"
#define UNIT_LIST_DIRS (const char* const*) CONF_PATHS_STRV("systemd/ntp-units.d")
+#define SET_NTP_IN_FLIGHT_MAX 16
typedef struct UnitStatusInfo {
char *name;
@@ -61,6 +62,7 @@ typedef struct Context {
bool local_rtc;
Hashmap *polkit_registry;
sd_bus_message *cache;
+ Set *set_ntp_calls;
sd_bus_slot *slot_job_removed;
@@ -121,6 +123,7 @@ static void context_clear(Context *c) {
free(c->zone);
bus_verify_polkit_async_registry_free(c->polkit_registry);
sd_bus_message_unref(c->cache);
+ set_free(c->set_ntp_calls);
sd_bus_slot_unref(c->slot_job_removed);
@@ -461,11 +464,19 @@ static int match_job_removed(sd_bus_mess
n += !!u->path;
if (n == 0) {
+ sd_bus_message *cm;
+
c->slot_job_removed = sd_bus_slot_unref(c->slot_job_removed);
(void) sd_bus_emit_properties_changed(sd_bus_message_get_bus(m),
"/org/freedesktop/timedate1", "org.freedesktop.timedate1", "NTP",
NULL);
+ while ((cm = set_steal_first(c->set_ntp_calls))) {
+ r = sd_bus_reply_method_return(cm, NULL);
+ if (r < 0)
+ log_debug_errno(r, "Failed to reply to SetNTP method call, ignoring: %m");
+ sd_bus_message_unref(cm);
+ }
}
return 0;
@@ -944,6 +955,9 @@ static int method_set_ntp(sd_bus_message
LIST_FOREACH(units, u, c->units)
u->path = mfree(u->path);
+ if (set_size(c->set_ntp_calls) >= SET_NTP_IN_FLIGHT_MAX)
+ return sd_bus_error_set_errnof(error, EAGAIN, "Too many calls in flight.");
+
if (!c->slot_job_removed) {
r = bus_match_signal_async(
bus,
@@ -998,11 +1012,12 @@ static int method_set_ntp(sd_bus_message
c->slot_job_removed = TAKE_PTR(slot);
if (selected)
- log_info("Set NTP to enabled (%s).", selected->name);
+ log_info("Set NTP to be enabled (%s).", selected->name);
else
- log_info("Set NTP to disabled.");
+ log_info("Set NTP to be disabled.");
- return sd_bus_reply_method_return(m, NULL);
+ /* Asynchrounous reply to m in match_job_removed() */
+ return set_ensure_consume(&c->set_ntp_calls, &bus_message_hash_ops, sd_bus_message_ref(m));
}
static int method_list_timezones(sd_bus_message *m, void *userdata, sd_bus_error *error) {

View File

@@ -27,6 +27,7 @@ SRC_URI += " \
file://99-default.preset \
file://systemd-pager.sh \
file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
file://0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch \
file://0008-implment-systemd-sysv-install-for-OE.patch \
"
@@ -246,6 +247,7 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
-Dmode=release \
-Dsystem-alloc-uid-min=101 \
-Dsystem-uid-max=999 \
-Dtranslations=${@'false' if d.getVar('USE_NLS') == 'no' else 'true'} \
-Dsystem-alloc-gid-min=101 \
-Dsystem-gid-max=999 \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \

View File

@@ -329,7 +329,7 @@ do_install_ptest() {
cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/
cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/
cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH}
cp ${B}/config.h ${D}${PTEST_PATH}
sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest

View File

@@ -21,7 +21,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
CVE_STATUS[CVE-2023-25584] = "cpe-incorrect: Applies only for version 2.40 and earlier"
CVE_STATUS[CVE-2025-1180] = "patched: fixed by patch for CVE-2025-1176"
SRCREV ?= "6558f9f5f0ccc107a083ae7fbf106ebcb5efa817"
SRCREV ?= "f9488b0d92b591bdf3ff8cce485cb0e1b3727cc0"
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https"
SRC_URI = "\
${BINUTILS_GIT_URI} \
@@ -39,6 +39,10 @@ SRC_URI = "\
file://0015-gprofng-change-use-of-bignum-to-bigint.patch \
file://0016-CVE-2024-53589.patch \
file://0017-dlltool-file-name-too-long.patch \
file://0018-opcodes-fix-std-gnu23-compatibility-wrt-static_assert.patch \
file://0019-Fix-32097-Warnings-when-building-gprofng-with-Clang.patch \
file://0020-gprofng-fix-std-gnu23-compatibility-wrt-unprototyped.patch \
file://0021-gprofng-fix-build-with-std-gnu23.patch \
file://0018-CVE-2025-0840.patch \
file://CVE-2025-1176.patch \
file://CVE-2025-1178.patch \
@@ -53,5 +57,7 @@ SRC_URI = "\
file://CVE-2025-1179.patch \
file://0022-CVE-2025-5245.patch \
file://0022-CVE-2025-5244.patch \
file://0023-CVE-2025-7546.patch \
file://0023-CVE-2025-7545.patch \
"
S = "${WORKDIR}/git"

View File

@@ -0,0 +1,89 @@
From 8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 16 Nov 2024 05:03:52 +0000
Subject: [PATCH] opcodes: fix -std=gnu23 compatibility wrt static_assert
static_assert is declared in C23 so we can't reuse that identifier:
* Define our own static_assert conditionally;
* Rename "static assert" hacks to _N as we do already in some places
to avoid a conflict.
ChangeLog:
PR ld/32372
* i386-gen.c (static_assert): Define conditionally.
* mips-formats.h (MAPPED_INT): Rename identifier.
(MAPPED_REG): Rename identifier.
(OPTIONAL_MAPPED_REG): Rename identifier.
* s390-opc.c (static_assert): Define conditionally.
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
opcodes/i386-gen.c | 2 ++
opcodes/mips-formats.h | 6 +++---
opcodes/s390-opc.c | 2 ++
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
index 053b66675c5..7ee8a30310c 100644
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -30,7 +30,9 @@
/* Build-time checks are preferrable over runtime ones. Use this construct
in preference where possible. */
+#ifndef static_assert
#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
+#endif
static const char *program_name = NULL;
static int debug = 0;
diff --git a/opcodes/mips-formats.h b/opcodes/mips-formats.h
index 90df7100803..c4dec6352bf 100644
--- a/opcodes/mips-formats.h
+++ b/opcodes/mips-formats.h
@@ -49,7 +49,7 @@
#define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \
{ \
typedef char ATTRIBUTE_UNUSED \
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_mapped_int_operand op = { \
{ OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \
}; \
@@ -83,7 +83,7 @@
#define MAPPED_REG(SIZE, LSB, BANK, MAP) \
{ \
typedef char ATTRIBUTE_UNUSED \
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_reg_operand op = { \
{ OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
}; \
@@ -93,7 +93,7 @@
#define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \
{ \
typedef char ATTRIBUTE_UNUSED \
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_reg_operand op = { \
{ OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
}; \
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 9d9f0973e55..49efd714157 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -36,7 +36,9 @@
/* Build-time checks are preferrable over runtime ones. Use this construct
in preference where possible. */
+#ifndef static_assert
#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
+#endif
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
--
2.43.7

View File

@@ -0,0 +1,767 @@
From b7888eb5a45772ed2e9a2030c50625a15b5ef795 Mon Sep 17 00:00:00 2001
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Date: Tue, 3 Sep 2024 21:30:31 -0700
Subject: [PATCH] Fix 32097 Warnings when building gprofng with Clang
gprofng/ChangeLog
2024-09-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>.
PR gprofng/32097
* common/hwcdrv.c: Fix -Wempty-body warnings.
* common/hwcentry.h: Fix -Wdeprecated-non-prototype warnings.
* common/hwctable.c: Fix -Wdeprecated-non-prototype warnings.
* libcollector/collector.c: Likewise.
* libcollector/collector.h: Likewise.
* libcollector/collectorAPI.c: Likewise.
* libcollector/dispatcher.c: Likewise.
* libcollector/iotrace.c: Likewise.
* libcollector/libcol_util.c: Fix -Wunused-but-set-variable warnings.
* libcollector/libcol_util.h: Remove unused declarations.
* libcollector/linetrace.c: Fix -Wdeprecated-non-prototype warnings.
* src/BaseMetricTreeNode.h: Fix -Wunused-private-field warnings.
* src/Dbe.cc: Fix -Wself-assign warnings.
* src/DbeSession.cc: Fix -Wunused-but-set-variable warnings.
* src/Disasm.cc: Fix -Wunused-const-variable warnings.
* src/Experiment.cc: Fix -Wunused-private-field warnings.
* src/HashMap.h: Fix -Wself-assign warnings.
* src/IOActivity.h: Fix -Wunused-private-field warnings.
* src/collctrl.cc: Fix -Wself-assign, -Wparentheses-equality warnings.
* src/collctrl.h: Fix -Wunused-private-field warnings.
* src/collector_module.h: Fix -Wdeprecated-non-prototype warnings.
* src/gp-display-src.cc: Fix -Wunused-private-field warnings.
* src/gp-print.h: Fix -Wheader-guard warnings.
* src/hwc_intel_icelake.h: Fix -Winitializer-overrides warnings.
* src/util.cc: Fix -Wunused-but-set-variable warnings.
Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/b79c457ca01df82dbe1facb708e45def4584c903]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
gprofng/common/hwcdrv.c | 3 ++-
gprofng/common/hwcentry.h | 7 +----
gprofng/common/hwctable.c | 13 +---------
gprofng/libcollector/collector.c | 15 ++++-------
gprofng/libcollector/collector.h | 2 +-
gprofng/libcollector/collectorAPI.c | 15 ++++++-----
gprofng/libcollector/dispatcher.c | 19 ++++++++------
gprofng/libcollector/iotrace.c | 12 ++++-----
gprofng/libcollector/libcol_util.c | 2 --
gprofng/libcollector/libcol_util.h | 6 -----
gprofng/libcollector/linetrace.c | 40 +++++++++++++++++------------
gprofng/src/BaseMetricTreeNode.h | 1 -
gprofng/src/Dbe.cc | 12 ++++-----
gprofng/src/DbeSession.cc | 3 ---
gprofng/src/Disasm.cc | 1 -
gprofng/src/Experiment.cc | 2 --
gprofng/src/HashMap.h | 3 +--
gprofng/src/IOActivity.h | 1 -
gprofng/src/collctrl.cc | 14 +++++-----
gprofng/src/collctrl.h | 1 -
gprofng/src/collector_module.h | 20 +++++++--------
gprofng/src/gp-display-src.cc | 8 ------
gprofng/src/gp-print.h | 2 +-
gprofng/src/util.cc | 10 +++-----
24 files changed, 84 insertions(+), 128 deletions(-)
diff --git a/gprofng/common/hwcdrv.c b/gprofng/common/hwcdrv.c
index 2d549b0d6a5..fa1ad32430b 100644
--- a/gprofng/common/hwcdrv.c
+++ b/gprofng/common/hwcdrv.c
@@ -650,6 +650,7 @@ read_sample (counter_state_t *ctr_state, int msgsz, uint64_t *rvalue,
static void
dump_perf_event_attr (struct perf_event_attr *at)
{
+#if defined(DEBUG)
TprintfT (DBG_LT2, "dump_perf_event_attr: size=%d type=%d sample_period=%lld\n"
" config=0x%llx config1=0x%llx config2=0x%llx wakeup_events=%lld __reserved_1=%lld\n",
(int) at->size, (int) at->type, (unsigned long long) at->sample_period,
@@ -665,13 +666,13 @@ dump_perf_event_attr (struct perf_event_attr *at)
DUMP_F (exclude_kernel);
DUMP_F (exclude_hv);
DUMP_F (exclude_idle);
- // DUMP_F(xmmap);
DUMP_F (comm);
DUMP_F (freq);
DUMP_F (inherit_stat);
DUMP_F (enable_on_exec);
DUMP_F (task);
DUMP_F (watermark);
+#endif
}
static void
diff --git a/gprofng/common/hwcentry.h b/gprofng/common/hwcentry.h
index a35a363e693..7899875cf96 100644
--- a/gprofng/common/hwcentry.h
+++ b/gprofng/common/hwcentry.h
@@ -202,17 +202,12 @@ extern "C"
extern char *hwc_get_docref (char *buf, size_t buflen);
/* Return a CPU HWC document reference, or NULL. */
- // TBR
- extern char *hwc_get_default_cntrs ();
- /* Return a default HW counter string; may be NULL, or zero-length */
- /* NULL means none is defined in the table; or zero-length means string defined could not be loaded */
-
extern char *hwc_get_default_cntrs2 (int forKernel, int style);
/* like hwc_get_default_cntrs() for style==1 */
/* but allows other styles of formatting as well */
/* deprecate and eventually remove hwc_get_default_cntrs() */
- extern char *hwc_get_orig_default_cntrs ();
+ extern char *hwc_get_orig_default_cntrs (int forKernel);
/* Get the default HW counter string as set in the table */
/* NULL means none is defined in the table */
diff --git a/gprofng/common/hwctable.c b/gprofng/common/hwctable.c
index d0735132fac..fe9153190e7 100644
--- a/gprofng/common/hwctable.c
+++ b/gprofng/common/hwctable.c
@@ -3231,7 +3231,7 @@ check_tables ()
}
#endif
-static int try_a_counter ();
+static int try_a_counter (int forKernel);
static void hwc_process_raw_ctrs (int forKernel, Hwcentry ***pstd_out,
Hwcentry ***praw_out, Hwcentry ***phidden_out,
Hwcentry**static_tables,
@@ -4321,17 +4321,6 @@ hwc_get_docref (char *buf, size_t buflen)
return buf;
}
-//TBR:
-
-extern char*
-hwc_get_default_cntrs ()
-{
- setup_cpcx ();
- if (cpcx_default_hwcs[0] != NULL)
- return strdup (cpcx_default_hwcs[0]); // TBR deprecate this
- return NULL;
-}
-
extern char*
hwc_get_default_cntrs2 (int forKernel, int style)
{
diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
index 39529758600..ef580dcbdd9 100644
--- a/gprofng/libcollector/collector.c
+++ b/gprofng/libcollector/collector.c
@@ -210,15 +210,10 @@ get_collector_interface ()
static void
collector_module_init (CollectorInterface *col_intf)
{
- int nmodules = 0;
-
ModuleInitFunc next_init = (ModuleInitFunc) dlsym (RTLD_DEFAULT, "__collector_module_init");
if (next_init != NULL)
- {
- nmodules++;
- next_init (col_intf);
- }
- TprintfT (DBG_LT1, "collector_module_init: %d modules\n", nmodules);
+ next_init (col_intf);
+ TprintfT (DBG_LT1, "collector_module_init: %d modules\n", next_init ? 1 : 0);
}
/* Routines concerned with general experiment start and stop */
@@ -1784,7 +1779,7 @@ __collector_pause ()
}
void
-__collector_pause_m (char *reason)
+__collector_pause_m (const char *reason)
{
hrtime_t now;
char xreason[MAXPATHLEN];
@@ -2451,8 +2446,8 @@ __collector_dlog (int tflag, int level, char *format, ...)
static void (*__real__exit) (int status) = NULL; /* libc only: _exit */
static void (*__real__Exit) (int status) = NULL; /* libc only: _Exit */
-void _exit () __attribute__ ((weak, alias ("__collector_exit")));
-void _Exit () __attribute__ ((weak, alias ("__collector_Exit")));
+void _exit (int status) __attribute__ ((weak, alias ("__collector_exit")));
+void _Exit (int status) __attribute__ ((weak, alias ("__collector_Exit")));
void
__collector_exit (int status)
diff --git a/gprofng/libcollector/collector.h b/gprofng/libcollector/collector.h
index 07a03bdd17a..eda68a0e4f5 100644
--- a/gprofng/libcollector/collector.h
+++ b/gprofng/libcollector/collector.h
@@ -123,7 +123,7 @@ extern void __collector_terminate_expt ();
extern void __collector_terminate_hook ();
extern void __collector_sample (char *name);
extern void __collector_pause ();
-extern void __collector_pause_m ();
+extern void __collector_pause_m (const char *reason);
extern void __collector_resume ();
extern int collector_sigemt_sigaction (const struct sigaction*,
struct sigaction*);
diff --git a/gprofng/libcollector/collectorAPI.c b/gprofng/libcollector/collectorAPI.c
index 5fa6403ad49..449bbbaab65 100644
--- a/gprofng/libcollector/collectorAPI.c
+++ b/gprofng/libcollector/collectorAPI.c
@@ -26,16 +26,17 @@
#include "collectorAPI.h"
#include "gp-experiment.h"
-static void *__real_collector_sample = NULL;
-static void *__real_collector_pause = NULL;
-static void *__real_collector_resume = NULL;
-static void *__real_collector_terminate_expt = NULL;
-static void *__real_collector_func_load = NULL;
-static void *__real_collector_func_unload = NULL;
+static void (*__real_collector_sample)(const char *) = NULL;
+static void (*__real_collector_pause)() = NULL;
+static void (*__real_collector_resume)() = NULL;
+static void (*__real_collector_terminate_expt)() = NULL;
+static void (*__real_collector_func_load)(const char *, const char *,
+ const char *, void *, int, int, Lineno *) = NULL;
+static void (*__real_collector_func_unload)(void *) = NULL;
#define INIT_API if (init_API == 0) collectorAPI_initAPI()
#define NULL_PTR(x) (__real_##x == NULL)
-#define CALL_REAL(x) (*(void(*)())__real_##x)
+#define CALL_REAL(x) (__real_##x)
#define CALL_IF_REAL(x) INIT_API; if (!NULL_PTR(x)) CALL_REAL(x)
static int init_API = 0;
diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c
index d2a4ad0b60b..867753a22ec 100644
--- a/gprofng/libcollector/dispatcher.c
+++ b/gprofng/libcollector/dispatcher.c
@@ -909,8 +909,9 @@ sigset (int sig, sighandler_t handler)
// map interposed symbol versions
static int
-gprofng_timer_create (int (real_func) (), clockid_t clockid,
- struct sigevent *sevp, timer_t *timerid)
+gprofng_timer_create (int (real_func) (clockid_t, struct sigevent *, timer_t *),
+ clockid_t clockid,
+ struct sigevent *sevp, timer_t *timerid)
{
// collector reserves SIGPROF
if (sevp == NULL || sevp->sigev_notify != SIGEV_SIGNAL ||
@@ -1045,7 +1046,7 @@ __collector_thr_sigsetmask (int how, const sigset_t* iset, sigset_t* oset)
// map interposed symbol versions
static int
-gprofng_pthread_sigmask (int (real_func) (),
+gprofng_pthread_sigmask (int (real_func) (int, const sigset_t *, sigset_t*),
int how, const sigset_t *iset, sigset_t* oset)
{
sigset_t lsigset;
@@ -1140,9 +1141,10 @@ collector_root (void *cargs)
// map interposed symbol versions
static int
-gprofng_pthread_create (int (real_func) (), pthread_t *thread,
- const pthread_attr_t *attr,
- void *(*func)(void*), void *arg)
+gprofng_pthread_create (int (real_func) (pthread_t *, const pthread_attr_t *,
+ void *(*)(void *), void *),
+ pthread_t *thread, const pthread_attr_t *attr,
+ void *(*func)(void*), void *arg)
{
TprintfT (DBG_LTT, "gprofng_pthread_create @%p\n", real_func);
if (dispatch_mode != DISPATCH_ON)
@@ -1277,6 +1279,7 @@ __collector_ext_clone_pthread (int (*fn)(void *), void *child_stack, int flags,
}
// weak symbols:
-int sigprocmask () __attribute__ ((weak, alias ("__collector_sigprocmask")));
-int thr_sigsetmask () __attribute__ ((weak, alias ("__collector_thr_sigsetmask")));
+int sigprocmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_sigprocmask")));
+int thr_sigsetmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_thr_sigsetmask")));
int setitimer () __attribute__ ((weak, alias ("_setitimer")));
+
diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c
index 18060864796..3deb441d9c7 100644
--- a/gprofng/libcollector/iotrace.c
+++ b/gprofng/libcollector/iotrace.c
@@ -1350,7 +1350,7 @@ mkstemp (char *template)
unsigned pktSize;
if (NULL_PTR (mkstemp))
init_io_intf ();
- if (CHCK_REENTRANCE (guard) || template == NULL)
+ if (CHCK_REENTRANCE (guard))
return CALL_REAL (mkstemp)(template);
PUSH_REENTRANCE (guard);
hrtime_t reqt = gethrtime ();
@@ -1405,7 +1405,7 @@ mkstemps (char *template, int slen)
unsigned pktSize;
if (NULL_PTR (mkstemps))
init_io_intf ();
- if (CHCK_REENTRANCE (guard) || template == NULL)
+ if (CHCK_REENTRANCE (guard))
return CALL_REAL (mkstemps)(template, slen);
PUSH_REENTRANCE (guard);
hrtime_t reqt = gethrtime ();
@@ -1485,7 +1485,7 @@ close (int fildes)
/*------------------------------------------------------------- fopen */
static FILE*
-gprofng_fopen (FILE*(real_fopen) (), const char *filename, const char *mode)
+gprofng_fopen (FILE*(real_fopen) (const char *, const char *), const char *filename, const char *mode)
{
int *guard;
FILE *fp = NULL;
@@ -1559,7 +1559,7 @@ DCL_FOPEN (fopen)
/*------------------------------------------------------------- fclose */
static int
-gprofng_fclose (int(real_fclose) (), FILE *stream)
+gprofng_fclose (int(real_fclose) (FILE *), FILE *stream)
{
int *guard;
int stat;
@@ -1645,7 +1645,7 @@ fflush (FILE *stream)
/*------------------------------------------------------------- fdopen */
static FILE*
-gprofng_fdopen (FILE*(real_fdopen) (), int fildes, const char *mode)
+gprofng_fdopen (FILE*(real_fdopen) (int, const char *), int fildes, const char *mode)
{
int *guard;
FILE *fp = NULL;
@@ -2957,7 +2957,7 @@ DCL_FGETPOS (fgetpos)
/*------------------------------------------------------------- fgetpos64 */
static int
-gprofng_fgetpos64 (int(real_fgetpos64) (), FILE *stream, fpos64_t *pos)
+gprofng_fgetpos64 (int(real_fgetpos64) (FILE *, fpos64_t *), FILE *stream, fpos64_t *pos)
{
int *guard;
int ret;
diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
index 15ba24d2ab5..c2b82894e6b 100644
--- a/gprofng/libcollector/libcol_util.c
+++ b/gprofng/libcollector/libcol_util.c
@@ -1013,7 +1013,6 @@ __collector_open (const char *path, int oflag, ...)
mode_t mode = 0;
hrtime_t t_timeout = __collector_gethrtime () + 5 * ((hrtime_t) NANOSEC);
- int nretries = 0;
long long delay = 100; /* start at some small, arbitrary value */
/* get optional mode argument if it's expected/required */
@@ -1058,7 +1057,6 @@ __collector_open (const char *path, int oflag, ...)
delay *= 2;
if (delay > 100000000)
delay = 100000000; /* cap at some large, arbitrary value */
- nretries++;
}
return fd;
}
diff --git a/gprofng/libcollector/libcol_util.h b/gprofng/libcollector/libcol_util.h
index 2eeeaeed50b..1b1b928180a 100644
--- a/gprofng/libcollector/libcol_util.h
+++ b/gprofng/libcollector/libcol_util.h
@@ -81,12 +81,6 @@ extern int __collector_mutex_trylock (collector_mutex_t *mp);
#define __collector_mutex_init(xx) \
do { collector_mutex_t tmp=COLLECTOR_MUTEX_INITIALIZER; *(xx)=tmp; } while(0)
-void __collector_sample (char *name);
-void __collector_terminate_expt ();
-void __collector_pause ();
-void __collector_pause_m ();
-void __collector_resume ();
-
struct DT_lineno;
typedef enum
diff --git a/gprofng/libcollector/linetrace.c b/gprofng/libcollector/linetrace.c
index 67b2d7e9030..66844bc1337 100644
--- a/gprofng/libcollector/linetrace.c
+++ b/gprofng/libcollector/linetrace.c
@@ -1207,7 +1207,7 @@ __collector_vfork (void)
}
/*------------------------------------------------------------- execve */
-int execve () __attribute__ ((weak, alias ("__collector_execve")));
+int execve (const char *, char *const [], char *const []) __attribute__ ((weak, alias ("__collector_execve")));
int
__collector_execve (const char* path, char *const argv[], char *const envp[])
@@ -1237,7 +1237,7 @@ __collector_execve (const char* path, char *const argv[], char *const envp[])
return ret;
}
-int execvp () __attribute__ ((weak, alias ("__collector_execvp")));
+int execvp (const char *, char *const []) __attribute__ ((weak, alias ("__collector_execvp")));
int
__collector_execvp (const char* file, char *const argv[])
@@ -1269,7 +1269,7 @@ __collector_execvp (const char* file, char *const argv[])
return ret;
}
-int execv () __attribute__ ((weak, alias ("__collector_execv")));
+int execv (const char *, char *const []) __attribute__ ((weak, alias ("__collector_execv")));
int
__collector_execv (const char* path, char *const argv[])
@@ -1408,7 +1408,10 @@ __collector_execl (const char* path, const char *arg0, ...)
/*-------------------------------------------------------- posix_spawn */
// map interposed symbol versions
static int
-gprofng_posix_spawn (int(real_posix_spawn) (),
+gprofng_posix_spawn (int(real_posix_spawn) (pid_t *, const char *,
+ const posix_spawn_file_actions_t *,
+ const posix_spawnattr_t *,
+ char *const [], char *const []),
pid_t *pidp, const char *path,
const posix_spawn_file_actions_t *file_actions,
const posix_spawnattr_t *attrp,
@@ -1466,7 +1469,10 @@ DCL_POSIX_SPAWN (posix_spawn)
/*-------------------------------------------------------- posix_spawnp */
static int
-gprofng_posix_spawnp (int (real_posix_spawnp) (),
+gprofng_posix_spawnp (int (real_posix_spawnp) (pid_t *, const char *,
+ const posix_spawn_file_actions_t *,
+ const posix_spawnattr_t *,
+ char *const [], char *const []),
pid_t *pidp, const char *path,
const posix_spawn_file_actions_t *file_actions,
const posix_spawnattr_t *attrp,
@@ -1754,8 +1760,8 @@ __collector_clone (int (*fn)(void *), void *child_stack, int flags, void *arg,
}
/*-------------------------------------------------------------------- setuid */
-int setuid () __attribute__ ((weak, alias ("__collector_setuid")));
-int _setuid () __attribute__ ((weak, alias ("__collector_setuid")));
+int setuid (uid_t) __attribute__ ((weak, alias ("__collector_setuid")));
+int _setuid (uid_t) __attribute__ ((weak, alias ("__collector_setuid")));
int
__collector_setuid (uid_t ruid)
@@ -1770,8 +1776,8 @@ __collector_setuid (uid_t ruid)
}
/*------------------------------------------------------------------- seteuid */
-int seteuid () __attribute__ ((weak, alias ("__collector_seteuid")));
-int _seteuid () __attribute__ ((weak, alias ("__collector_seteuid")));
+int seteuid (uid_t) __attribute__ ((weak, alias ("__collector_seteuid")));
+int _seteuid (uid_t) __attribute__ ((weak, alias ("__collector_seteuid")));
int
__collector_seteuid (uid_t euid)
@@ -1786,8 +1792,8 @@ __collector_seteuid (uid_t euid)
}
/*------------------------------------------------------------------ setreuid */
-int setreuid () __attribute__ ((weak, alias ("__collector_setreuid")));
-int _setreuid () __attribute__ ((weak, alias ("__collector_setreuid")));
+int setreuid (uid_t, uid_t) __attribute__ ((weak, alias ("__collector_setreuid")));
+int _setreuid (uid_t, uid_t) __attribute__ ((weak, alias ("__collector_setreuid")));
int
__collector_setreuid (uid_t ruid, uid_t euid)
@@ -1802,8 +1808,8 @@ __collector_setreuid (uid_t ruid, uid_t euid)
}
/*-------------------------------------------------------------------- setgid */
-int setgid () __attribute__ ((weak, alias ("__collector_setgid")));
-int _setgid () __attribute__ ((weak, alias ("__collector_setgid")));
+int setgid (gid_t) __attribute__ ((weak, alias ("__collector_setgid")));
+int _setgid (gid_t) __attribute__ ((weak, alias ("__collector_setgid")));
int
__collector_setgid (gid_t rgid)
@@ -1818,8 +1824,8 @@ __collector_setgid (gid_t rgid)
}
/*------------------------------------------------------------------- setegid */
-int setegid () __attribute__ ((weak, alias ("__collector_setegid")));
-int _setegid () __attribute__ ((weak, alias ("__collector_setegid")));
+int setegid (gid_t) __attribute__ ((weak, alias ("__collector_setegid")));
+int _setegid (gid_t) __attribute__ ((weak, alias ("__collector_setegid")));
int
__collector_setegid (gid_t egid)
@@ -1834,8 +1840,8 @@ __collector_setegid (gid_t egid)
}
/*------------------------------------------------------------------ setregid */
-int setregid () __attribute__ ((weak, alias ("__collector_setregid")));
-int _setregid () __attribute__ ((weak, alias ("__collector_setregid")));
+int setregid (gid_t, gid_t) __attribute__ ((weak, alias ("__collector_setregid")));
+int _setregid (gid_t, gid_t) __attribute__ ((weak, alias ("__collector_setregid")));
int
__collector_setregid (gid_t rgid, gid_t egid)
diff --git a/gprofng/src/BaseMetricTreeNode.h b/gprofng/src/BaseMetricTreeNode.h
index d73d244e27e..7698f9c6eaf 100644
--- a/gprofng/src/BaseMetricTreeNode.h
+++ b/gprofng/src/BaseMetricTreeNode.h
@@ -85,7 +85,6 @@ private:
BaseMetricTreeNode *root; // root of tree
BaseMetricTreeNode *parent; // my parent
- bool aggregation; // value is based on children's values
char *name; // bm->get_cmd() for metrics, unique string otherwise
char *uname; // user-visible text
char *unit; // see UNIT_* defines
diff --git a/gprofng/src/Dbe.cc b/gprofng/src/Dbe.cc
index 91a5aa5ef05..bcbf4694565 100644
--- a/gprofng/src/Dbe.cc
+++ b/gprofng/src/Dbe.cc
@@ -9594,14 +9594,12 @@ dbeGetTLDataRepVals (VMode view_mode, hrtime_t start_ts, hrtime_t delta,
}
if (sampleVals != NULL)
{
- Sample* sample = (Sample*) packets->getObjValue (PROP_SMPLOBJ, packetIdx);
- if (!sample || !sample->get_usage ())
- sample = sample;
- else
+ Sample *sample = (Sample*) packets->getObjValue (PROP_SMPLOBJ, packetIdx);
+ if (sample != NULL)
{
- PrUsage* prusage = sample->get_usage ();
- Vector<long long> *mstateVals = prusage->getMstateValues ();
- sampleVals->store (eventIdx, mstateVals);
+ PrUsage *prusage = sample->get_usage ();
+ if (prusage != NULL)
+ sampleVals->store (eventIdx, prusage->getMstateValues ());
}
}
}
diff --git a/gprofng/src/DbeSession.cc b/gprofng/src/DbeSession.cc
index 20329091167..5d6bab75638 100644
--- a/gprofng/src/DbeSession.cc
+++ b/gprofng/src/DbeSession.cc
@@ -1162,8 +1162,6 @@ DbeSession::open_experiment (Experiment *exp, char *path)
closedir (exp_dir);
exp_names->sort (dir_name_cmp);
Experiment **t_exp_list = new Experiment *[exp_names->size ()];
- int nsubexps = 0;
-
for (int j = 0, jsz = exp_names->size (); j < jsz; j++)
{
t_exp_list[j] = NULL;
@@ -1220,7 +1218,6 @@ DbeSession::open_experiment (Experiment *exp, char *path)
dexp->open (dpath);
append (dexp);
t_exp_list[j] = dexp;
- nsubexps++;
dexp->set_clock (exp->clock);
// DbeView add_experiment() is split into two parts
diff --git a/gprofng/src/Disasm.cc b/gprofng/src/Disasm.cc
index 1396e4fb072..d78212cee39 100644
--- a/gprofng/src/Disasm.cc
+++ b/gprofng/src/Disasm.cc
@@ -49,7 +49,6 @@ struct DisContext
};
static const int MAX_DISASM_STR = 2048;
-static const int MAX_INSTR_SIZE = 8;
Disasm::Disasm (char *fname)
{
diff --git a/gprofng/src/Experiment.cc b/gprofng/src/Experiment.cc
index 02a24ebc40d..a31550aff66 100644
--- a/gprofng/src/Experiment.cc
+++ b/gprofng/src/Experiment.cc
@@ -1935,8 +1935,6 @@ private:
}
Experiment *exp;
- char *hostname;
- hrtime_t time, tstamp;
};
void
diff --git a/gprofng/src/HashMap.h b/gprofng/src/HashMap.h
index 918c0dc95f9..c5fdd345ba8 100644
--- a/gprofng/src/HashMap.h
+++ b/gprofng/src/HashMap.h
@@ -78,9 +78,8 @@ copy_key (uint64_t a)
}
template<> inline void
-delete_key (uint64_t a)
+delete_key (uint64_t)
{
- a = a;
}
template<> inline int
diff --git a/gprofng/src/IOActivity.h b/gprofng/src/IOActivity.h
index cf462cf8d55..f3a22ada6b1 100644
--- a/gprofng/src/IOActivity.h
+++ b/gprofng/src/IOActivity.h
@@ -78,7 +78,6 @@ private:
Hist_data *hist_data_file_all;
Hist_data *hist_data_vfd_all;
Hist_data *hist_data_callstack_all;
- Hist_data *hist_data_callstack;
DbeView *dbev;
};
diff --git a/gprofng/src/collctrl.cc b/gprofng/src/collctrl.cc
index ebf888c5a20..b0ed66efcdc 100644
--- a/gprofng/src/collctrl.cc
+++ b/gprofng/src/collctrl.cc
@@ -952,9 +952,7 @@ Coll_Ctrl::set_clkprof (const char *string, char** warn)
double dval = strtod (string, &endchar);
if (*endchar == 'm' || *endchar == 0) /* user specified milliseconds */
dval = dval * 1000.;
- else if (*endchar == 'u') /* user specified microseconds */
- dval = dval;
- else
+ else if (*endchar != 'u')
return dbe_sprintf (GTXT ("Unrecognized clock-profiling interval `%s'\n"), string);
nclkprof_timer = (int) (dval + 0.5);
}
@@ -2901,7 +2899,7 @@ Coll_Ctrl::get (char * control)
}
if (!strncmp (control, ipc_str_javaprof, len))
{
- if ((java_mode == 0))
+ if (java_mode == 0)
return strdup (ipc_str_off);
return strdup (ipc_str_on);
}
@@ -2917,7 +2915,7 @@ Coll_Ctrl::get (char * control)
}
if (!strncmp (control, ipc_str_sample_sig, len))
{
- if ((sample_sig == 0))
+ if (sample_sig == 0)
return strdup (ipc_str_off);
char *str_signal = find_signal_name (sample_sig);
if (str_signal != NULL)
@@ -2951,15 +2949,15 @@ Coll_Ctrl::get (char * control)
}
if (!strncmp (control, ipc_str_iotrace, len))
{
- if ((iotrace_enabled == 0))
+ if (iotrace_enabled == 0)
return strdup (ipc_str_off);
return strdup (ipc_str_on);
}
if (!strncmp (control, ipc_str_count, len))
{
- if ((count_enabled == 0))
+ if (count_enabled == 0)
return strdup (ipc_str_off);
- if ((count_enabled < 0))
+ if (count_enabled < 0)
return strdup ("on\nstatic");
return strdup (ipc_str_on);
}
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
index bb48eadb9f8..ebcdbca561f 100644
--- a/gprofng/src/collector_module.h
+++ b/gprofng/src/collector_module.h
@@ -40,12 +40,12 @@ struct tm;
* If you add any, please put it in the right place */
typedef struct CollectorUtilFuncs
{
- int (*access)();
+ int (*access)(const char *, int);
int (*atoi)(const char *nptr);
void *(*calloc)(size_t nelem, size_t elsize);
int (*clearenv)(void);
int (*close)(int);
- int (*closedir)();
+ int (*closedir)(DIR *);
int (*execv)(const char *path, char *const argv[]);
void (*exit)(int status);
int (*fclose)(FILE *stream);
@@ -66,20 +66,20 @@ typedef struct CollectorUtilFuncs
off_t (*lseek)(int fd, off_t offset, int whence);
void *(*malloc)(size_t size);
void *(*memset)(void *s1, int c, size_t n);
- int (*mkdir)();
+ int (*mkdir)(const char *, mode_t);
time_t (*mktime)(struct tm *timeptr);
void *(*mmap)(void *, size_t, int, int, int, off_t);
- void *(*mmap64_)();
- int (*munmap)();
+ void *(*mmap64_)(void *, size_t, int, int, int, off_t);
+ int (*munmap)(void *, size_t);
int (*open)(const char *, int, ...);
int (*open_bare)(const char *, int, ...);
- DIR *(*opendir)();
+ DIR *(*opendir)(const char *);
int (*pclose)(FILE *stream);
FILE *(*popen)(const char *command, const char *mode);
int (*putenv)(char *string);
- ssize_t (*pwrite)();
- ssize_t (*pwrite64_)();
- ssize_t (*read)();
+ ssize_t (*pwrite)(int, const void *, size_t, off_t);
+ ssize_t (*pwrite64_)(int, const void *, size_t, off_t);
+ ssize_t (*read)(int, void *, size_t);
int (*setenv)(const char *name, const char *value, int overwrite);
int (*sigfillset)(sigset_t *set);
int (*sigprocmask)(int how, const sigset_t *set, sigset_t *oldset);
@@ -112,7 +112,7 @@ typedef struct CollectorUtilFuncs
int (*unsetenv)(const char *name);
int (*vsnprintf)(char *str, size_t size, const char *format, va_list ap);
pid_t (*waitpid)(pid_t pid, int *stat_loc, int options);
- ssize_t (*write)();
+ ssize_t (*write)(int, void *, size_t);
double (*atof)();
void *n_a;
} CollectorUtilFuncs;
diff --git a/gprofng/src/gp-display-src.cc b/gprofng/src/gp-display-src.cc
index 200e6080d2e..24af375edf1 100644
--- a/gprofng/src/gp-display-src.cc
+++ b/gprofng/src/gp-display-src.cc
@@ -75,14 +75,6 @@ private:
bool v_opt;
int multiple;
char *str_compcom;
- bool hex_visible;
- int src_visible;
- int vis_src;
- int vis_dis;
- int threshold_src;
- int threshold_dis;
- int threshold;
- int vis_bits;
};
static int
diff --git a/gprofng/src/gp-print.h b/gprofng/src/gp-print.h
index 1b748ea60a3..1a8ad3b6c13 100644
--- a/gprofng/src/gp-print.h
+++ b/gprofng/src/gp-print.h
@@ -19,7 +19,7 @@
MA 02110-1301, USA. */
#ifndef _GP_PRINT_H
-#define _ER_PRINT_H
+#define _GP_PRINT_H
#include "Command.h"
#include "DbeApplication.h"
diff --git a/gprofng/src/util.cc b/gprofng/src/util.cc
index 201f7088b66..228140b61ae 100644
--- a/gprofng/src/util.cc
+++ b/gprofng/src/util.cc
@@ -741,17 +741,13 @@ get_relative_link (const char *path_from, const char *path_to)
s2 = canonical_path (s2);
long l = dbe_sstrlen (s1);
// try to find common directories
- int common_slashes = 0;
int last_common_slash = -1;
for (int i = 0; i < l; i++)
{
- if (s1[i] != s2[i]) break;
- if (s1[i] == 0) break;
+ if (s1[i] != s2[i] || s1[i] == 0)
+ break;
if (s1[i] == '/')
- {
- common_slashes++;
- last_common_slash = i;
- }
+ last_common_slash = i;
}
// find slashes in remaining path_to
int slashes = 0;

View File

@@ -0,0 +1,606 @@
From 610889f9e0cace025758fdd0ce8e8f9edf9f4223 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sat, 16 Nov 2024 05:13:48 +0000
Subject: [PATCH] gprofng: fix -std=gnu23 compatibility wrt unprototyped
functions
C23 removes support for unprototyped functions. Fix function pointer types
accordingly.
This does not fix all instances, there's a few left as I commented on in
PR32374 (e.g. setitimer which I have a local workaround for but it involves
a glibc implementation detail; the Linaro precommit CI tester pointed that
out too, so dropped that).
ChangeLog:
PR gprofng/32374
* libcollector/collector.c (collector_sample): Fix prototype.
* libcollector/envmgmt.c (putenv): Ditto.
(_putenv): Ditto.
(__collector_putenv): Ditto.
(setenv): Ditto.
(_setenv): Ditto.
(__collector_setenv): Ditto.
(unsetenv): Ditto.
(_unsetenv): Ditto.
(__collector_unsetenv): Ditto.
* libcollector/jprofile.c (open_experiment): Ditto.
(__collector_jprofile_enable_synctrace): Ditto.
(jprof_find_asyncgetcalltrace): Ditto.
* libcollector/libcol_util.c (__collector_util_init): Ditto.
(ARCH): Ditto.
* libcollector/mmaptrace.c (collector_func_load): Ditto.
(collector_func_unload): Ditto.
* libcollector/unwind.c (__collector_ext_unwind_init): Ditto.
* src/collector_module.h: Ditto.
Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/a2f774427e078f3da2c06bdea25f77a61979a695]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
gprofng/libcollector/collector.c | 2 +-
gprofng/libcollector/envmgmt.c | 24 ++++-----
gprofng/libcollector/jprofile.c | 10 ++--
gprofng/libcollector/libcol_util.c | 84 +++++++++++++++---------------
gprofng/libcollector/mmaptrace.c | 4 +-
gprofng/libcollector/unwind.c | 2 +-
gprofng/src/collector_module.h | 2 +-
7 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
index ef580dcbdd9..899f08a5381 100644
--- a/gprofng/libcollector/collector.c
+++ b/gprofng/libcollector/collector.c
@@ -1579,7 +1579,7 @@ __collector_resume_experiment ()
}
/* Code to support Samples and Pause/Resume */
-void collector_sample () __attribute__ ((weak, alias ("__collector_sample")));
+void collector_sample (char *name) __attribute__ ((weak, alias ("__collector_sample")));
void
__collector_sample (char *name)
{
diff --git a/gprofng/libcollector/envmgmt.c b/gprofng/libcollector/envmgmt.c
index ebe08f82007..0ff7621070d 100644
--- a/gprofng/libcollector/envmgmt.c
+++ b/gprofng/libcollector/envmgmt.c
@@ -692,8 +692,8 @@ __collector_env_update (char *envp[])
/*------------------------------------------------------------- putenv */
-int putenv () __attribute__ ((weak, alias ("__collector_putenv")));
-int _putenv () __attribute__ ((weak, alias ("__collector_putenv")));
+int putenv (char*) __attribute__ ((weak, alias ("__collector_putenv")));
+int _putenv (char*) __attribute__ ((weak, alias ("__collector_putenv")));
int
__collector_putenv (char * string)
@@ -701,9 +701,9 @@ __collector_putenv (char * string)
if (CALL_UTIL (putenv) == __collector_putenv ||
CALL_UTIL (putenv) == NULL)
{ // __collector_libc_funcs_init failed
- CALL_UTIL (putenv) = (int(*)())dlsym (RTLD_NEXT, "putenv");
+ CALL_UTIL (putenv) = (int(*)(char*))dlsym (RTLD_NEXT, "putenv");
if (CALL_UTIL (putenv) == NULL || CALL_UTIL (putenv) == __collector_putenv)
- CALL_UTIL (putenv) = (int(*)())dlsym (RTLD_DEFAULT, "putenv");
+ CALL_UTIL (putenv) = (int(*)(char*))dlsym (RTLD_DEFAULT, "putenv");
if (CALL_UTIL (putenv) == NULL || CALL_UTIL (putenv) == __collector_putenv)
{
TprintfT (DBG_LT2, "__collector_putenv(): ERROR: no pointer found.\n");
@@ -719,8 +719,8 @@ __collector_putenv (char * string)
}
/*------------------------------------------------------------- setenv */
-int setenv () __attribute__ ((weak, alias ("__collector_setenv")));
-int _setenv () __attribute__ ((weak, alias ("__collector_setenv")));
+int setenv (const char*, const char*, int) __attribute__ ((weak, alias ("__collector_setenv")));
+int _setenv (const char*, const char*, int) __attribute__ ((weak, alias ("__collector_setenv")));
int
__collector_setenv (const char *name, const char *value, int overwrite)
@@ -728,9 +728,9 @@ __collector_setenv (const char *name, const char *value, int overwrite)
if (CALL_UTIL (setenv) == __collector_setenv ||
CALL_UTIL (setenv) == NULL)
{ // __collector_libc_funcs_init failed
- CALL_UTIL (setenv) = (int(*)())dlsym (RTLD_NEXT, "setenv");
+ CALL_UTIL (setenv) = (int(*)(const char*, const char*, int))dlsym (RTLD_NEXT, "setenv");
if (CALL_UTIL (setenv) == NULL || CALL_UTIL (setenv) == __collector_setenv)
- CALL_UTIL (setenv) = (int(*)())dlsym (RTLD_DEFAULT, "setenv");
+ CALL_UTIL (setenv) = (int(*)(const char*, const char*, int))dlsym (RTLD_DEFAULT, "setenv");
if (CALL_UTIL (setenv) == NULL || CALL_UTIL (setenv) == __collector_setenv)
{
TprintfT (DBG_LT2, "__collector_setenv(): ERROR: no pointer found.\n");
@@ -765,8 +765,8 @@ __collector_setenv (const char *name, const char *value, int overwrite)
}
/*------------------------------------------------------------- unsetenv */
-int unsetenv () __attribute__ ((weak, alias ("__collector_unsetenv")));
-int _unsetenv () __attribute__ ((weak, alias ("__collector_unsetenv")));
+int unsetenv (const char*) __attribute__ ((weak, alias ("__collector_unsetenv")));
+int _unsetenv (const char*) __attribute__ ((weak, alias ("__collector_unsetenv")));
int
__collector_unsetenv (const char *name)
@@ -774,9 +774,9 @@ __collector_unsetenv (const char *name)
if (CALL_UTIL (unsetenv) == __collector_unsetenv ||
CALL_UTIL (unsetenv) == NULL)
{ // __collector_libc_funcs_init failed
- CALL_UTIL (unsetenv) = (int(*)())dlsym (RTLD_NEXT, "unsetenv");
+ CALL_UTIL (unsetenv) = (int(*)(const char*))dlsym (RTLD_NEXT, "unsetenv");
if (CALL_UTIL (unsetenv) == NULL || CALL_UTIL (unsetenv) == __collector_unsetenv)
- CALL_UTIL (unsetenv) = (int(*)())dlsym (RTLD_DEFAULT, "unsetenv");
+ CALL_UTIL (unsetenv) = (int(*)(const char*))dlsym (RTLD_DEFAULT, "unsetenv");
if (CALL_UTIL (unsetenv) == NULL || CALL_UTIL (unsetenv) == __collector_unsetenv)
{
TprintfT (DBG_LT2, "__collector_unsetenv(): ERROR: no pointer found.\n");
diff --git a/gprofng/libcollector/jprofile.c b/gprofng/libcollector/jprofile.c
index 1bacacc1a2a..11051f937ef 100644
--- a/gprofng/libcollector/jprofile.c
+++ b/gprofng/libcollector/jprofile.c
@@ -105,8 +105,8 @@ static void rwrite (int fd, const void *buf, size_t nbyte);
static void addToDynamicArchive (const char* name, const unsigned char* class_data, int class_data_len);
static void (*AsyncGetCallTrace)(JVMPI_CallTrace*, jint, ucontext_t*) = NULL;
static void (*collector_heap_record)(int, int, void*) = NULL;
-static void (*collector_jsync_begin)() = NULL;
-static void (*collector_jsync_end)(hrtime_t, void *) = NULL;
+static void (*collector_jsync_begin)(void) = NULL;
+static void (*collector_jsync_end)(hrtime_t, void*) = NULL;
#define gethrtime collector_interface->getHiResTime
@@ -230,7 +230,7 @@ open_experiment (const char *exp)
else if (__collector_strStartWith (args, "s:") == 0)
{
java_sync_mode = 1;
- collector_jsync_begin = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
+ collector_jsync_begin = (void(*)(void))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
collector_jsync_end = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_end");
}
#endif
@@ -255,7 +255,7 @@ __collector_jprofile_enable_synctrace ()
return;
}
java_sync_mode = 1;
- collector_jsync_begin = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
+ collector_jsync_begin = (void(*)(void))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
collector_jsync_end = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_end");
TprintfT (DBG_LT1, "jprofile: turning on Java synctrace, and requesting events\n");
}
@@ -1129,7 +1129,7 @@ jprof_find_asyncgetcalltrace ()
{
void *jvmhandle;
if (__collector_VM_ReadByteInstruction == NULL)
- __collector_VM_ReadByteInstruction = (int(*)()) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
+ __collector_VM_ReadByteInstruction = (int(*)(unsigned char*)) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
/* look for stack unwind function using default path */
AsyncGetCallTrace = (void (*)(JVMPI_CallTrace*, jint, ucontext_t*))
diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
index c2b82894e6b..688bdf19c6d 100644
--- a/gprofng/libcollector/libcol_util.c
+++ b/gprofng/libcollector/libcol_util.c
@@ -1114,7 +1114,7 @@ __collector_util_init ()
ptr = dlsym (libc, "munmap");
if (ptr)
- __collector_util_funcs.munmap = (int(*)())ptr;
+ __collector_util_funcs.munmap = (int(*)(void *, size_t))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT munmap: %s\n", dlerror ());
@@ -1123,7 +1123,7 @@ __collector_util_init ()
ptr = dlsym (libc, "close");
if (ptr)
- __collector_util_funcs.close = (int(*)())ptr;
+ __collector_util_funcs.close = (int(*)(int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT close: %s\n", dlerror ());
@@ -1158,7 +1158,7 @@ __collector_util_init ()
ptr = dlsym (libc, "close");
if (ptr)
- __collector_util_funcs.close = (int(*)())ptr;
+ __collector_util_funcs.close = (int(*)(int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT close: %s\n", dlerror ());
@@ -1167,7 +1167,7 @@ __collector_util_init ()
ptr = dlsym (libc, "read");
if (ptr)
- __collector_util_funcs.read = (ssize_t (*)())ptr;
+ __collector_util_funcs.read = (ssize_t (*)(int, void*, size_t))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT read: %s\n", dlerror ());
@@ -1176,7 +1176,7 @@ __collector_util_init ()
ptr = dlsym (libc, "write");
if (ptr)
- __collector_util_funcs.write = (ssize_t (*)())ptr;
+ __collector_util_funcs.write = (ssize_t (*)(int, void*, size_t))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT write: %s\n", dlerror ());
@@ -1186,14 +1186,14 @@ __collector_util_init ()
#if ARCH(Intel) && WSIZE(32)
ptr = dlvsym (libc, "pwrite", "GLIBC_2.2"); // it is in /lib/libpthread.so.0
if (ptr)
- __collector_util_funcs.pwrite = (ssize_t (*)())ptr;
+ __collector_util_funcs.pwrite = (ssize_t (*)(int, void*, size_t, off_t))ptr;
else
{
Tprintf (DBG_LT0, "libcol_util: WARNING: dlvsym for %s@%s failed. Using dlsym() instead.", "pwrite", "GLIBC_2.2");
#endif /* ARCH(Intel) && WSIZE(32) */
ptr = dlsym (libc, "pwrite");
if (ptr)
- __collector_util_funcs.pwrite = (ssize_t (*)())ptr;
+ __collector_util_funcs.pwrite = (ssize_t (*)(int, const void*, size_t, off_t))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT pwrite: %s\n", dlerror ());
@@ -1213,7 +1213,7 @@ __collector_util_init ()
#endif /* ARCH(Intel) && WSIZE(32) */
ptr = dlsym (libc, "pwrite64");
if (ptr)
- __collector_util_funcs.pwrite64_ = (ssize_t (*)())ptr;
+ __collector_util_funcs.pwrite64_ = (ssize_t (*)(int, const void*, size_t, off_t))ptr;
else
__collector_util_funcs.pwrite64_ = __collector_util_funcs.pwrite;
#if ARCH(Intel) && WSIZE(32)
@@ -1222,7 +1222,7 @@ __collector_util_init ()
ptr = dlsym (libc, "lseek");
if (ptr)
- __collector_util_funcs.lseek = (off_t (*)())ptr;
+ __collector_util_funcs.lseek = (off_t (*)(int, off_t, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT lseek: %s\n", dlerror ());
@@ -1231,7 +1231,7 @@ __collector_util_init ()
ptr = dlsym (libc, "access");
if (ptr)
- __collector_util_funcs.access = (int(*)())ptr;
+ __collector_util_funcs.access = (int(*)(const char*, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT access: %s\n", dlerror ());
@@ -1240,7 +1240,7 @@ __collector_util_init ()
ptr = dlsym (libc, "mkdir");
if (ptr)
- __collector_util_funcs.mkdir = (int(*)())ptr;
+ __collector_util_funcs.mkdir = (int(*)(const char*, mode_t))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT mkdir: %s\n", dlerror ());
@@ -1249,7 +1249,7 @@ __collector_util_init ()
ptr = dlsym (libc, "opendir");
if (ptr)
- __collector_util_funcs.opendir = (DIR * (*)())ptr;
+ __collector_util_funcs.opendir = (DIR * (*)(const char*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT opendir: %s\n", dlerror ());
@@ -1258,7 +1258,7 @@ __collector_util_init ()
ptr = dlsym (libc, "closedir");
if (ptr)
- __collector_util_funcs.closedir = (int(*)())ptr;
+ __collector_util_funcs.closedir = (int(*)(DIR*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT closedir: %s\n", dlerror ());
@@ -1267,7 +1267,7 @@ __collector_util_init ()
ptr = dlsym (libc, "execv");
if (ptr)
- __collector_util_funcs.execv = (int(*)())ptr;
+ __collector_util_funcs.execv = (int(*)(const char*, char* const*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT execv: %s\n", dlerror ());
@@ -1276,7 +1276,7 @@ __collector_util_init ()
ptr = dlsym (libc, "exit");
if (ptr)
- __collector_util_funcs.exit = (void(*)())ptr;
+ __collector_util_funcs.exit = (void(*)(int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT exit: %s\n", dlerror ());
@@ -1285,7 +1285,7 @@ __collector_util_init ()
ptr = dlsym (libc, "vfork");
if (ptr)
- __collector_util_funcs.vfork = (pid_t (*)())ptr;
+ __collector_util_funcs.vfork = (pid_t (*)(void))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT vfork: %s\n", dlerror ());
@@ -1294,7 +1294,7 @@ __collector_util_init ()
ptr = dlsym (libc, "waitpid");
if (ptr)
- __collector_util_funcs.waitpid = (pid_t (*)())ptr;
+ __collector_util_funcs.waitpid = (pid_t (*)(pid_t, int*, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT waitpid: %s\n", dlerror ());
@@ -1313,7 +1313,7 @@ __collector_util_init ()
ptr = dlsym (libc, "getcontext");
if (ptr)
- __collector_util_funcs.getcontext = (int(*)())ptr;
+ __collector_util_funcs.getcontext = (int(*)(ucontext_t*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT getcontext: %s\n", dlerror ());
@@ -1331,7 +1331,7 @@ __collector_util_init ()
ptr = dlsym (libc, "putenv");
if (ptr)
- __collector_util_funcs.putenv = (int(*)())ptr;
+ __collector_util_funcs.putenv = (int(*)(char*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT putenv: %s\n", dlerror ());
@@ -1340,7 +1340,7 @@ __collector_util_init ()
ptr = dlsym (libc, "getenv");
if (ptr)
- __collector_util_funcs.getenv = (char*(*)())ptr;
+ __collector_util_funcs.getenv = (char*(*)(const char*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT getenv: %s\n", dlerror ());
@@ -1349,7 +1349,7 @@ __collector_util_init ()
ptr = dlsym (libc, "time");
if (ptr)
- __collector_util_funcs.time = (time_t (*)())ptr;
+ __collector_util_funcs.time = (time_t (*)(time_t*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT time: %s\n", dlerror ());
@@ -1358,7 +1358,7 @@ __collector_util_init ()
ptr = dlsym (libc, "mktime");
if (ptr)
- __collector_util_funcs.mktime = (time_t (*)())ptr;
+ __collector_util_funcs.mktime = (time_t (*)(struct tm*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT mktime: %s\n", dlerror ());
@@ -1372,7 +1372,7 @@ __collector_util_init ()
ptr = dlsym (libc, "gmtime_r");
if (ptr)
- __collector_util_funcs.gmtime_r = (struct tm * (*)())ptr;
+ __collector_util_funcs.gmtime_r = (struct tm * (*)(const time_t*, struct tm*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT gmtime_r: %s\n", dlerror ());
@@ -1381,7 +1381,7 @@ __collector_util_init ()
ptr = dlsym (libc, "strtol");
if (ptr)
- __collector_util_funcs.strtol = (long (*)())ptr;
+ __collector_util_funcs.strtol = (long (*)(const char*, char**, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtol: %s\n", dlerror ());
@@ -1390,7 +1390,7 @@ __collector_util_init ()
ptr = dlsym (libc, "strtoll");
if (ptr)
- __collector_util_funcs.strtoll = (long long (*)())ptr;
+ __collector_util_funcs.strtoll = (long long (*)(const char*, char**, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtoll: %s\n", dlerror ());
@@ -1402,7 +1402,7 @@ __collector_util_init ()
ptr = dlsym (libc, "setenv");
if (ptr)
- __collector_util_funcs.setenv = (int(*)())ptr;
+ __collector_util_funcs.setenv = (int(*)(const char*, const char*, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT setenv: %s\n", dlerror ());
@@ -1411,7 +1411,7 @@ __collector_util_init ()
ptr = dlsym (libc, "unsetenv");
if (ptr)
- __collector_util_funcs.unsetenv = (int(*)())ptr;
+ __collector_util_funcs.unsetenv = (int(*)(const char*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT unsetenv: %s\n", dlerror ());
@@ -1498,7 +1498,7 @@ __collector_util_init ()
ptr = dlsym (libc, "pclose");
if (ptr)
- __collector_util_funcs.pclose = (int(*)())ptr;
+ __collector_util_funcs.pclose = (int(*)(FILE*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT pclose: %s\n", dlerror ());
@@ -1507,7 +1507,7 @@ __collector_util_init ()
ptr = dlsym (libc, "fgets");
if (ptr)
- __collector_util_funcs.fgets = (char*(*)())ptr;
+ __collector_util_funcs.fgets = (char*(*)(char*, int, FILE*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT fgets: %s\n", dlerror ());
@@ -1534,7 +1534,7 @@ __collector_util_init ()
ptr = dlsym (libc, "vsnprintf");
if (ptr)
- __collector_util_funcs.vsnprintf = (int(*)())ptr;
+ __collector_util_funcs.vsnprintf = (int(*)(char*, size_t, const char*, ...))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT vsnprintf: %s\n", dlerror ());
@@ -1543,7 +1543,7 @@ __collector_util_init ()
ptr = dlsym (libc, "atoi");
if (ptr)
- __collector_util_funcs.atoi = (int(*)())ptr;
+ __collector_util_funcs.atoi = (int(*)(const char*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT atoi: %s\n", dlerror ());
@@ -1552,7 +1552,7 @@ __collector_util_init ()
ptr = dlsym (libc, "calloc");
if (ptr)
- __collector_util_funcs.calloc = (void*(*)())ptr;
+ __collector_util_funcs.calloc = (void*(*)(size_t, size_t))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT calloc: %s\n", dlerror ());
@@ -1562,7 +1562,7 @@ __collector_util_init ()
ptr = dlsym (libc, "free");
if (ptr)
{
- __collector_util_funcs.free = (void(*)())ptr;
+ __collector_util_funcs.free = (void(*)(void*))ptr;
}
else
{
@@ -1572,7 +1572,7 @@ __collector_util_init ()
ptr = dlsym (libc, "strdup");
if (ptr)
- __collector_util_funcs.libc_strdup = (char*(*)())ptr;
+ __collector_util_funcs.libc_strdup = (char*(*)(const char*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strdup: %s\n", dlerror ());
@@ -1585,7 +1585,7 @@ __collector_util_init ()
ptr = dlsym (libc, "strerror");
if (ptr)
- __collector_util_funcs.strerror = (char*(*)())ptr;
+ __collector_util_funcs.strerror = (char*(*)(int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strerror: %s\n", dlerror ());
@@ -1593,7 +1593,7 @@ __collector_util_init ()
}
ptr = dlsym (libc, "strerror_r");
if (ptr)
- __collector_util_funcs.strerror_r = (int(*)())ptr;
+ __collector_util_funcs.strerror_r = (int(*)(int, char*, size_t))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strerror_r: %s\n", dlerror ());
@@ -1601,7 +1601,7 @@ __collector_util_init ()
}
ptr = dlsym (libc, "strspn");
if (ptr)
- __collector_util_funcs.strspn = (size_t (*)())ptr;
+ __collector_util_funcs.strspn = (size_t (*)(const char*, const char*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strspn: %s\n", dlerror ());
@@ -1610,7 +1610,7 @@ __collector_util_init ()
ptr = dlsym (libc, "strtoul");
if (ptr)
- __collector_util_funcs.strtoul = (unsigned long int(*)())ptr;
+ __collector_util_funcs.strtoul = (unsigned long int(*)(const char*, char**, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtoul: %s\n", dlerror ());
@@ -1619,7 +1619,7 @@ __collector_util_init ()
ptr = dlsym (libc, "strtoull");
if (ptr)
- __collector_util_funcs.strtoull = (unsigned long long int(*)())ptr;
+ __collector_util_funcs.strtoull = (unsigned long long int(*)(const char*, char**, int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtoull: %s\n", dlerror ());
@@ -1664,7 +1664,7 @@ __collector_util_init ()
ptr = dlsym (libc, "sysconf");
if (ptr)
- __collector_util_funcs.sysconf = (long(*)())ptr;
+ __collector_util_funcs.sysconf = (long(*)(int))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sysconf: %s\n", dlerror ());
@@ -1673,7 +1673,7 @@ __collector_util_init ()
ptr = dlsym (libc, "sigfillset");
if (ptr)
- __collector_util_funcs.sigfillset = (int(*)())ptr;
+ __collector_util_funcs.sigfillset = (int(*)(sigset_t*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sigfillset: %s\n", dlerror ());
@@ -1682,7 +1682,7 @@ __collector_util_init ()
ptr = dlsym (libc, "sigprocmask");
if (ptr)
- __collector_util_funcs.sigprocmask = (int(*)())ptr;
+ __collector_util_funcs.sigprocmask = (int(*)(int, const sigset_t*, sigset_t*))ptr;
else
{
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sigprocmask: %s\n", dlerror ());
diff --git a/gprofng/libcollector/mmaptrace.c b/gprofng/libcollector/mmaptrace.c
index f07f4d76513..2a6857ab58e 100644
--- a/gprofng/libcollector/mmaptrace.c
+++ b/gprofng/libcollector/mmaptrace.c
@@ -1209,7 +1209,7 @@ process_vsyscall_page ()
/*
* collector API for dynamic functions
*/
-void collector_func_load () __attribute__ ((weak, alias ("__collector_func_load")));
+void collector_func_load (char*, char*, char*, void*, int, int, DT_lineno *) __attribute__ ((weak, alias ("__collector_func_load")));
void
__collector_func_load (char *name, char *alias, char *sourcename,
void *vaddr, int size, int lntsize, DT_lineno *lntable)
@@ -1218,7 +1218,7 @@ __collector_func_load (char *name, char *alias, char *sourcename,
vaddr, size, lntsize, lntable);
}
-void collector_func_unload () __attribute__ ((weak, alias ("__collector_func_unload")));
+void collector_func_unload (void *vaddr) __attribute__ ((weak, alias ("__collector_func_unload")));
void
__collector_func_unload (void *vaddr)
{
diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
index 91678b1e334..cd47d4fbe0f 100644
--- a/gprofng/libcollector/unwind.c
+++ b/gprofng/libcollector/unwind.c
@@ -416,7 +416,7 @@ __collector_ext_unwind_init (int record)
omp_no_walk = 1;
if (__collector_VM_ReadByteInstruction == NULL)
- __collector_VM_ReadByteInstruction = (int(*)()) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
+ __collector_VM_ReadByteInstruction = (int(*)(unsigned char*)) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
#if ARCH(SPARC)
#if WSIZE(64)
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
index ebcdbca561f..fd888cd58dd 100644
--- a/gprofng/src/collector_module.h
+++ b/gprofng/src/collector_module.h
@@ -110,7 +110,7 @@ typedef struct CollectorUtilFuncs
long (*sysinfo)(int command, char *buf, long count);
time_t (*time)(time_t *tloc);
int (*unsetenv)(const char *name);
- int (*vsnprintf)(char *str, size_t size, const char *format, va_list ap);
+ int (*vsnprintf)(char *str, size_t size, const char *format, ...);
pid_t (*waitpid)(pid_t pid, int *stat_loc, int options);
ssize_t (*write)(int, void *, size_t);
double (*atof)();

View File

@@ -0,0 +1,196 @@
From 7683ea4411d2b76f346a8100b761615d09343448 Mon Sep 17 00:00:00 2001
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Date: Thu, 21 Nov 2024 14:48:20 -0800
Subject: [PATCH] gprofng: fix build with -std=gnu23
Fix function pointer types accordingly.
Remove unused function pointers.
gprofng/ChangeLog
2024-11-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/32374
PR gprofng/32373
* common/cpuid.c: Define ATTRIBUTE_UNUSED if necessary.
* libcollector/libcol_util.c (sysinfo): Remove unused pointer.
* src/collector_module.h: Likewise.
* libcollector/dispatcher.c (setitimer): Fix prototype.
* libcollector/linetrace.c (system, grantpt, ptsname): Likewise.
* testsuite/gprofng.display/mttest/mttest.c (dump_arrays): Likewise.
* testsuite/gprofng.display/synprog/endcases.c (xinline_code,
s_inline_code): Likewise.
* testsuite/gprofng.display/synprog/inc_inline.h (ext_inline_code):
Likewise.
* testsuite/gprofng.display/synprog/synprog.c (doabort): Rename nullptr.
Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/4e943705e3e8a5a9448d087502bcb390a694ad02]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
gprofng/common/cpuid.c | 2 ++
gprofng/libcollector/dispatcher.c | 3 +--
gprofng/libcollector/libcol_util.c | 9 ---------
gprofng/libcollector/linetrace.c | 10 +++++-----
gprofng/src/collector_module.h | 1 -
gprofng/testsuite/gprofng.display/mttest/mttest.c | 2 +-
gprofng/testsuite/gprofng.display/synprog/endcases.c | 4 ++--
gprofng/testsuite/gprofng.display/synprog/inc_inline.h | 2 +-
gprofng/testsuite/gprofng.display/synprog/synprog.c | 4 ++--
9 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/gprofng/common/cpuid.c b/gprofng/common/cpuid.c
index af15439eb27..0373969693b 100644
--- a/gprofng/common/cpuid.c
+++ b/gprofng/common/cpuid.c
@@ -21,7 +21,9 @@
#if defined(__i386__) || defined(__x86_64)
#include <cpuid.h> /* GCC-provided */
#elif defined(__aarch64__)
+#if !defined(ATTRIBUTE_UNUSED)
#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
static inline uint_t __attribute_const__
__get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax,
diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c
index 867753a22ec..e85c343c776 100644
--- a/gprofng/libcollector/dispatcher.c
+++ b/gprofng/libcollector/dispatcher.c
@@ -1281,5 +1281,4 @@ __collector_ext_clone_pthread (int (*fn)(void *), void *child_stack, int flags,
// weak symbols:
int sigprocmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_sigprocmask")));
int thr_sigsetmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_thr_sigsetmask")));
-int setitimer () __attribute__ ((weak, alias ("_setitimer")));
-
+__typeof(setitimer) setitimer __attribute__ ((weak, alias ("_setitimer")));
diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
index 688bdf19c6d..46f8b80ccb4 100644
--- a/gprofng/libcollector/libcol_util.c
+++ b/gprofng/libcollector/libcol_util.c
@@ -1427,15 +1427,6 @@ __collector_util_init ()
err = COL_ERROR_UTIL_INIT;
}
- ptr = dlsym (libc, "sysinfo");
- if (ptr)
- __collector_util_funcs.sysinfo = (long (*)())ptr;
- else
- {
- CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sysinfo: %s\n", dlerror ());
- err = COL_ERROR_UTIL_INIT;
- }
-
ptr = dlsym (libc, "clearenv");
if (ptr)
__collector_util_funcs.clearenv = (int(*)())ptr;
diff --git a/gprofng/libcollector/linetrace.c b/gprofng/libcollector/linetrace.c
index 66844bc1337..c81ae1a2272 100644
--- a/gprofng/libcollector/linetrace.c
+++ b/gprofng/libcollector/linetrace.c
@@ -1527,7 +1527,7 @@ DCL_FUNC_VER (DCL_POSIX_SPAWNP, posix_spawnp_2_2, posix_spawnp@GLIBC_2.2)
DCL_POSIX_SPAWNP (posix_spawnp)
/*------------------------------------------------------------- system */
-int system () __attribute__ ((weak, alias ("__collector_system")));
+int system (const char *cmd) __attribute__ ((weak, alias ("__collector_system")));
int
__collector_system (const char *cmd)
@@ -1582,10 +1582,10 @@ DCL_FUNC_VER (DCL_POPEN, popen_2_0, popen@GLIBC_2.0)
DCL_POPEN (popen)
/*------------------------------------------------------------- grantpt */
-int grantpt () __attribute__ ((weak, alias ("__collector_grantpt")));
+int grantpt (int fildes) __attribute__ ((weak, alias ("__collector_grantpt")));
int
-__collector_grantpt (const int fildes)
+__collector_grantpt (int fildes)
{
if (NULL_PTR (grantpt))
init_lineage_intf ();
@@ -1607,10 +1607,10 @@ __collector_grantpt (const int fildes)
}
/*------------------------------------------------------------- ptsname */
-char *ptsname () __attribute__ ((weak, alias ("__collector_ptsname")));
+char *ptsname (int fildes) __attribute__ ((weak, alias ("__collector_ptsname")));
char *
-__collector_ptsname (const int fildes)
+__collector_ptsname (int fildes)
{
if (NULL_PTR (ptsname))
init_lineage_intf ();
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
index fd888cd58dd..6640f12fa3c 100644
--- a/gprofng/src/collector_module.h
+++ b/gprofng/src/collector_module.h
@@ -107,7 +107,6 @@ typedef struct CollectorUtilFuncs
int (*symlink)(const char *s1, const char *s2);
int (*syscall)(int number, ...);
long (*sysconf)(int name);
- long (*sysinfo)(int command, char *buf, long count);
time_t (*time)(time_t *tloc);
int (*unsetenv)(const char *name);
int (*vsnprintf)(char *str, size_t size, const char *format, ...);
diff --git a/gprofng/testsuite/gprofng.display/mttest/mttest.c b/gprofng/testsuite/gprofng.display/mttest/mttest.c
index e0835c833e5..3db5b8d8e86 100644
--- a/gprofng/testsuite/gprofng.display/mttest/mttest.c
+++ b/gprofng/testsuite/gprofng.display/mttest/mttest.c
@@ -171,7 +171,7 @@ void computeJ (workStruct_t *x);
void computeK (workStruct_t *x);
void addone (workCtr_t *x);
void init_arrays (int strat);
-void dump_arrays ();
+void dump_arrays (hrtime_t real, hrtime_t cpu, int case_index);
void *do_work (void *v);
void thread_work ();
void nothreads (Workblk *array, struct scripttab *k);
diff --git a/gprofng/testsuite/gprofng.display/synprog/endcases.c b/gprofng/testsuite/gprofng.display/synprog/endcases.c
index a6a1389658a..6f1c83b6859 100644
--- a/gprofng/testsuite/gprofng.display/synprog/endcases.c
+++ b/gprofng/testsuite/gprofng.display/synprog/endcases.c
@@ -40,8 +40,8 @@ static void s_inline_code (int);
void ext_inline_code (int);
#ifndef NO_INLINE
-void xinline_code () __attribute__ ((always_inline));
-void s_inline_code () __attribute__ ((always_inline));
+void xinline_code (int) __attribute__ ((always_inline));
+void s_inline_code (int) __attribute__ ((always_inline));
#endif
#include "inc_inline.h"
diff --git a/gprofng/testsuite/gprofng.display/synprog/inc_inline.h b/gprofng/testsuite/gprofng.display/synprog/inc_inline.h
index da42563c828..6600eacb66d 100644
--- a/gprofng/testsuite/gprofng.display/synprog/inc_inline.h
+++ b/gprofng/testsuite/gprofng.display/synprog/inc_inline.h
@@ -19,7 +19,7 @@
MA 02110-1301, USA. */
#ifndef NO_INLINE
-void ext_inline_code() __attribute__ ((always_inline));
+void ext_inline_code(int) __attribute__ ((always_inline));
#endif
void
diff --git a/gprofng/testsuite/gprofng.display/synprog/synprog.c b/gprofng/testsuite/gprofng.display/synprog/synprog.c
index cf1bc5b0909..05920dc7419 100644
--- a/gprofng/testsuite/gprofng.display/synprog/synprog.c
+++ b/gprofng/testsuite/gprofng.display/synprog/synprog.c
@@ -528,14 +528,14 @@ reapchildren ()
int
doabort (int k)
{
- char *nullptr = NULL;
+ char *p = NULL;
char c;
/* Log the event */
wlog ("start of doabort", NULL);
/* and dereference a NULL */
- c = *nullptr;
+ c = *p;
/* this should never be reached */
return (int) c;

View File

@@ -0,0 +1,39 @@
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sat, 21 Jun 2025 06:36:56 +0800
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944]
CVE: CVE-2025-7545
Since the output section contents are copied from the input, don't
extend the output section size beyond the input section size.
PR binutils/33049
* objcopy.c (copy_section): Don't extend the output section
size beyond the input section size.
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index a85d2620..18cd1bfd 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -4547,6 +4547,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
char *to = (char *) memhunk;
char *end = (char *) memhunk + size;
int i;
+ bfd_size_type memhunk_size = size;
/* If the section address is not exactly divisible by the interleave,
then we must bias the from address. If the copy_byte is less than
@@ -4566,6 +4567,11 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
}
size = (size + interleave - 1 - copy_byte) / interleave * copy_width;
+
+ /* Don't extend the output section size. */
+ if (size > memhunk_size)
+ size = memhunk_size;
+
osection->lma /= interleave;
if (copy_byte < extra)
osection->lma++;

View File

@@ -0,0 +1,58 @@
From 41461010eb7c79fee7a9d5f6209accdaac66cc6b Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sat, 21 Jun 2025 06:52:00 +0800
Subject: [PATCH] elf: Report corrupted group section
Report corrupted group section instead of trying to recover.
PR binutils/33050
* elf.c (bfd_elf_set_group_contents): Report corrupted group
section.
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41461010eb7c79fee7a9d5f6209accdaac66cc6b]
CVE: CVE-2025-7546
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
bfd/elf.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/bfd/elf.c b/bfd/elf.c
index 14ce15c7254..ee894eb05f2 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3971,20 +3971,17 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
break;
}
- /* We should always get here with loc == sec->contents + 4, but it is
- possible to craft bogus SHT_GROUP sections that will cause segfaults
- in objcopy without checking loc here and in the loop above. */
- if (loc == sec->contents)
- BFD_ASSERT (0);
- else
+ /* We should always get here with loc == sec->contents + 4. Return
+ an error for bogus SHT_GROUP sections. */
+ loc -= 4;
+ if (loc != sec->contents)
{
- loc -= 4;
- if (loc != sec->contents)
- {
- BFD_ASSERT (0);
- memset (sec->contents + 4, 0, loc - sec->contents);
- loc = sec->contents;
- }
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: corrupted group section: `%pA'"),
+ abfd, sec);
+ bfd_set_error (bfd_error_bad_value);
+ *failedptr = true;
+ return;
}
H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
--
2.43.5

Some files were not shown because too many files have changed in this diff Show More