mirror of
https://git.yoctoproject.org/poky
synced 2026-02-21 17:09:42 +01:00
Compare commits
81 Commits
kirkstone-
...
yocto-4.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc697fe874 | ||
|
|
5ded548a1e | ||
|
|
18469232f6 | ||
|
|
a81330c455 | ||
|
|
49b2b70749 | ||
|
|
da8512f9b0 | ||
|
|
62257379ea | ||
|
|
aa12c43757 | ||
|
|
756c144ee1 | ||
|
|
d3153b2847 | ||
|
|
55724a7c45 | ||
|
|
ab6c16cb55 | ||
|
|
17760d65dd | ||
|
|
5e0dd7be76 | ||
|
|
8bc1f7e015 | ||
|
|
7f8a4aa6cf | ||
|
|
7412714f7d | ||
|
|
c71fb0017d | ||
|
|
7d75bf2e97 | ||
|
|
351dca5a44 | ||
|
|
263d5df539 | ||
|
|
8a6e38dd24 | ||
|
|
1e8fd09f78 | ||
|
|
c4c9531c9b | ||
|
|
075d712b28 | ||
|
|
1a63c9703f | ||
|
|
b4a7ec6e0e | ||
|
|
ab62b82a81 | ||
|
|
0498db775a | ||
|
|
a3983ed726 | ||
|
|
0e22295713 | ||
|
|
43b94d2b84 | ||
|
|
aab6fc20de | ||
|
|
51d6afc92f | ||
|
|
933033e54e | ||
|
|
20c192f0ec | ||
|
|
916105b352 | ||
|
|
fb53a9ec2b | ||
|
|
875400f96f | ||
|
|
f83291a946 | ||
|
|
15f7694793 | ||
|
|
3c6eb39773 | ||
|
|
1e6f147c68 | ||
|
|
ae34dbb410 | ||
|
|
b32d7da361 | ||
|
|
ab21fd0ec1 | ||
|
|
08252caaee | ||
|
|
ce8b35569a | ||
|
|
fdc1438438 | ||
|
|
5f26c81523 | ||
|
|
7cfdccfa4a | ||
|
|
b6c3cba355 | ||
|
|
011b8b4758 | ||
|
|
d68f782872 | ||
|
|
8f3b0b8e9b | ||
|
|
2afcf3e39f | ||
|
|
17955962d7 | ||
|
|
1184ea6f5e | ||
|
|
7350eae0c4 | ||
|
|
075e7e6d8c | ||
|
|
75b7d31614 | ||
|
|
722ace0444 | ||
|
|
950f4c74a6 | ||
|
|
9827c47368 | ||
|
|
ef68c9166b | ||
|
|
2118c5b7f8 | ||
|
|
1ba75c259c | ||
|
|
c6d6808e72 | ||
|
|
c94d5b8771 | ||
|
|
ed2a92b55d | ||
|
|
d81118899d | ||
|
|
9a514e19fa | ||
|
|
a23ae80a37 | ||
|
|
80bf4d4f9a | ||
|
|
65a57df04c | ||
|
|
645fd39e4b | ||
|
|
971da34872 | ||
|
|
b7f72b6d88 | ||
|
|
c84f68642e | ||
|
|
8af917d572 | ||
|
|
f72863d66e |
@@ -90,7 +90,8 @@ rst_prolog = """
|
||||
|
||||
# external links and substitutions
|
||||
extlinks = {
|
||||
'cve': ('https://nvd.nist.gov/vuln/detail/CVE-%s', 'CVE-'),
|
||||
'cve': ('https://nvd.nist.gov/vuln/detail/CVE-%s', 'CVE-%s'),
|
||||
'cve_mitre': ('https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s', 'CVE-%s'),
|
||||
'yocto_home': ('https://www.yoctoproject.org%s', None),
|
||||
'yocto_wiki': ('https://wiki.yoctoproject.org/wiki%s', None),
|
||||
'yocto_dl': ('https://downloads.yoctoproject.org%s', None),
|
||||
|
||||
@@ -16,3 +16,4 @@ Release 4.0 (kirkstone)
|
||||
release-notes-4.0.7
|
||||
release-notes-4.0.8
|
||||
release-notes-4.0.9
|
||||
release-notes-4.0.10
|
||||
|
||||
180
documentation/migration-guides/release-notes-4.0.10.rst
Normal file
180
documentation/migration-guides/release-notes-4.0.10.rst
Normal file
@@ -0,0 +1,180 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Release notes for Yocto-4.0.10 (Kirkstone)
|
||||
------------------------------------------
|
||||
|
||||
Security Fixes in Yocto-4.0.10
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- binutils: Fix :cve:`2023-1579`, :cve:`2023-1972`, :cve_mitre:`2023-25584`, :cve_mitre:`2023-25585` and :cve_mitre:`2023-25588`
|
||||
- cargo : Ignore :cve:`2022-46176`
|
||||
- connman: Fix :cve:`2023-28488`
|
||||
- curl: Fix :cve:`2023-27533`, :cve:`2023-27534`, :cve:`2023-27535`, :cve:`2023-27536` and :cve:`2023-27538`
|
||||
- ffmpeg: Fix :cve:`2022-48434`
|
||||
- freetype: Fix :cve:`2023-2004`
|
||||
- ghostscript: Fix :cve_mitre:`2023-29979`
|
||||
- git: Fix :cve:`2023-25652` and :cve:`2023-29007`
|
||||
- go: Fix :cve:`2022-41722`, :cve:`2022-41724`, :cve:`2022-41725`, :cve:`2023-24534`, :cve:`2023-24537` and :cve:`2023-24538`
|
||||
- go: Ignore :cve:`2022-41716`
|
||||
- libxml2: Fix :cve:`2023-28484` and :cve:`2023-29469`
|
||||
- libxpm: Fix :cve:`2022-44617`, :cve:`2022-46285` and :cve:`2022-4883`
|
||||
- linux-yocto: Ignore :cve:`2021-3759`, :cve:`2021-4135`, :cve:`2021-4155`, :cve:`2022-0168`, :cve:`2022-0171`, :cve:`2022-1016`, :cve:`2022-1184`, :cve:`2022-1198`, :cve:`2022-1199`, :cve:`2022-1462`, :cve:`2022-1734`, :cve:`2022-1852`, :cve:`2022-1882`, :cve:`2022-1998`, :cve:`2022-2078`, :cve:`2022-2196`, :cve:`2022-2318`, :cve:`2022-2380`, :cve:`2022-2503`, :cve:`2022-26365`, :cve:`2022-2663`, :cve:`2022-2873`, :cve:`2022-2905`, :cve:`2022-2959`, :cve:`2022-3028`, :cve:`2022-3078`, :cve:`2022-3104`, :cve:`2022-3105`, :cve:`2022-3106`, :cve:`2022-3107`, :cve:`2022-3111`, :cve:`2022-3112`, :cve:`2022-3113`, :cve:`2022-3115`, :cve:`2022-3202`, :cve:`2022-32250`, :cve:`2022-32296`, :cve:`2022-32981`, :cve:`2022-3303`, :cve:`2022-33740`, :cve:`2022-33741`, :cve:`2022-33742`, :cve:`2022-33743`, :cve:`2022-33744`, :cve:`2022-33981`, :cve:`2022-3424`, :cve:`2022-3435`, :cve:`2022-34918`, :cve:`2022-3521`, :cve:`2022-3545`, :cve:`2022-3564`, :cve:`2022-3586`, :cve:`2022-3594`, :cve:`2022-36123`, :cve:`2022-3621`, :cve:`2022-3623`, :cve:`2022-3629`, :cve:`2022-3633`, :cve:`2022-3635`, :cve:`2022-3646`, :cve:`2022-3649`, :cve:`2022-36879`, :cve:`2022-36946`, :cve:`2022-3707`, :cve:`2022-39188`, :cve:`2022-39190`, :cve:`2022-39842`, :cve:`2022-40307`, :cve:`2022-40768`, :cve:`2022-4095`, :cve:`2022-41218`, :cve:`2022-4139`, :cve:`2022-41849`, :cve:`2022-41850`, :cve:`2022-41858`, :cve:`2022-42328`, :cve:`2022-42329`, :cve:`2022-42703`, :cve:`2022-42721`, :cve:`2022-42722`, :cve:`2022-42895`, :cve:`2022-4382`, :cve:`2022-4662`, :cve:`2022-47518`, :cve:`2022-47519`, :cve:`2022-47520`, :cve:`2022-47929`, :cve:`2023-0179`, :cve:`2023-0394`, :cve:`2023-0461`, :cve:`2023-0590`, :cve:`2023-1073`, :cve:`2023-1074`, :cve:`2023-1077`, :cve:`2023-1078`, :cve:`2023-1079`, :cve:`2023-1095`, :cve:`2023-1118`, :cve:`2023-1249`, :cve:`2023-1252`, :cve:`2023-1281`, :cve:`2023-1382`, :cve:`2023-1513`, :cve:`2023-1829`, :cve:`2023-1838`, :cve:`2023-1998`, :cve:`2023-2006`, :cve:`2023-2008`, :cve:`2023-2162`, :cve:`2023-2166`, :cve:`2023-2177`, :cve:`2023-22999`, :cve:`2023-23002`, :cve:`2023-23004`, :cve:`2023-23454`, :cve:`2023-23455`, :cve:`2023-23559`, :cve:`2023-25012`, :cve:`2023-26545`, :cve:`2023-28327` and :cve:`2023-28328`
|
||||
- nasm: Fix :cve:`2022-44370`
|
||||
- python3-cryptography: Fix :cve:`2023-23931`
|
||||
- qemu: Ignore :cve:`2023-0664`
|
||||
- ruby: Fix :cve:`2023-28755` and :cve:`2023-28756`
|
||||
- screen: Fix :cve:`2023-24626`
|
||||
- shadow: Fix :cve:`2023-29383`
|
||||
- tiff: Fix :cve:`2022-4645`
|
||||
- webkitgtk: Fix :cve:`2022-32888` and :cve:`2022-32923`
|
||||
- xserver-xorg: Fix :cve:`2023-1393`
|
||||
|
||||
|
||||
Fixes in Yocto-4.0.10
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- bitbake: bin/utils: Ensure locale en_US.UTF-8 is available on the system
|
||||
- build-appliance-image: Update to kirkstone head revision
|
||||
- cmake: add CMAKE_SYSROOT to generated toolchain file
|
||||
- glibc: stable 2.35 branch updates.
|
||||
- kernel-devsrc: depend on python3-core instead of python3
|
||||
- kernel: improve initramfs bundle processing time
|
||||
- libarchive: Enable acls, xattr for native as well as target
|
||||
- libbsd: Add correct license for all packages
|
||||
- libpam: Fix the xtests/tst-pam_motd[1|3] failures
|
||||
- libxpm: upgrade to 3.5.15
|
||||
- linux-firmware: upgrade to 20230404
|
||||
- linux-yocto/5.15: upgrade to v5.15.108
|
||||
- migration-guides: add release-notes for 4.0.9
|
||||
- oeqa/utils/metadata.py: Fix running oe-selftest running with no distro set
|
||||
- openssl: Move microblaze to linux-latomic config
|
||||
- package.bbclass: correct check for /build in copydebugsources()
|
||||
- poky.conf: bump version for 4.0.10
|
||||
- populate_sdk_base: add zip options
|
||||
- populate_sdk_ext.bbclass: set :term:`METADATA_REVISION` with an :term:`DISTRO` override
|
||||
- run-postinsts: Set dependency for ldconfig to avoid boot issues
|
||||
- update-alternatives.bbclass: fix old override syntax
|
||||
- wic/bootimg-efi: if fixed-size is set then use that for mkdosfs
|
||||
- wpebackend-fdo: upgrade to 1.14.2
|
||||
- xorg-lib-common: Add variable to set tarball type
|
||||
- xserver-xorg: upgrade to 21.1.8
|
||||
|
||||
|
||||
Known Issues in Yocto-4.0.10
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- N/A
|
||||
|
||||
|
||||
Contributors to Yocto-4.0.10
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Archana Polampalli
|
||||
- Arturo Buzarra
|
||||
- Bruce Ashfield
|
||||
- Christoph Lauer
|
||||
- Deepthi Hemraj
|
||||
- Dmitry Baryshkov
|
||||
- Frank de Brabander
|
||||
- Hitendra Prajapati
|
||||
- Joe Slater
|
||||
- Kai Kang
|
||||
- Kyle Russell
|
||||
- Lee Chee Yang
|
||||
- Mark Hatle
|
||||
- Martin Jansa
|
||||
- Mingli Yu
|
||||
- Narpat Mali
|
||||
- Pascal Bach
|
||||
- Pawan Badganchi
|
||||
- Peter Bergin
|
||||
- Peter Marko
|
||||
- Piotr Łobacz
|
||||
- Randolph Sapp
|
||||
- Ranjitsinh Rathod
|
||||
- Ross Burton
|
||||
- Shubham Kulkarni
|
||||
- Siddharth Doshi
|
||||
- Steve Sakoman
|
||||
- Sundeep KOKKONDA
|
||||
- Thomas Roos
|
||||
- Virendra Thakur
|
||||
- Vivek Kumbhar
|
||||
- Wang Mingyu
|
||||
- Xiangyu Chen
|
||||
- Yash Shinde
|
||||
- Yoann Congal
|
||||
- Yogita Urade
|
||||
- Zhixiong Chi
|
||||
|
||||
|
||||
Repositories / Downloads for Yocto-4.0.10
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
poky
|
||||
|
||||
- Repository Location: :yocto_git:`/poky`
|
||||
- Branch: :yocto_git:`kirkstone </poky/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.10 </poky/log/?h=yocto-4.0.10>`
|
||||
- Git Revision: :yocto_git:`f53ab3a2ff206a130cdc843839dd0ea5ec4ad02f </poky/commit/?id=f53ab3a2ff206a130cdc843839dd0ea5ec4ad02f>`
|
||||
- Release Artefact: poky-f53ab3a2ff206a130cdc843839dd0ea5ec4ad02f
|
||||
- sha: 8820aeac857ce6bbd1c7ef26cadbb86eca02be93deded253b4a5f07ddd69255d
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.10/poky-f53ab3a2ff206a130cdc843839dd0ea5ec4ad02f.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.10/poky-f53ab3a2ff206a130cdc843839dd0ea5ec4ad02f.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.10 </openembedded-core/log/?h=yocto-4.0.10>`
|
||||
- Git Revision: :oe_git:`d2713785f9cd2d58731df877bc8b7bcc71b6c8e6 </openembedded-core/commit/?id=d2713785f9cd2d58731df877bc8b7bcc71b6c8e6>`
|
||||
- Release Artefact: oecore-d2713785f9cd2d58731df877bc8b7bcc71b6c8e6
|
||||
- sha: 78e084a1aceaaa6ec022702f29f80eaffade3159e9c42b6b8985c1b7ddd2fbab
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.10/oecore-d2713785f9cd2d58731df877bc8b7bcc71b6c8e6.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.10/oecore-d2713785f9cd2d58731df877bc8b7bcc71b6c8e6.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.10 </meta-mingw/log/?h=yocto-4.0.10>`
|
||||
- Git Revision: :yocto_git:`a90614a6498c3345704e9611f2842eb933dc51c1 </meta-mingw/commit/?id=a90614a6498c3345704e9611f2842eb933dc51c1>`
|
||||
- Release Artefact: meta-mingw-a90614a6498c3345704e9611f2842eb933dc51c1
|
||||
- sha: 49f9900bfbbc1c68136f8115b314e95d0b7f6be75edf36a75d9bcd1cca7c6302
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.10/meta-mingw-a90614a6498c3345704e9611f2842eb933dc51c1.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.10/meta-mingw-a90614a6498c3345704e9611f2842eb933dc51c1.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.10 </meta-gplv2/log/?h=yocto-4.0.10>`
|
||||
- Git Revision: :yocto_git:`d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a </meta-gplv2/commit/?id=d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a>`
|
||||
- Release Artefact: meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a
|
||||
- sha: c386f59f8a672747dc3d0be1d4234b6039273d0e57933eb87caa20f56b9cca6d
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.10/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.10/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.10 </bitbake/log/?h=yocto-4.0.10>`
|
||||
- Git Revision: :oe_git:`0c6f86b60cfba67c20733516957c0a654eb2b44c </bitbake/commit/?id=0c6f86b60cfba67c20733516957c0a654eb2b44c>`
|
||||
- Release Artefact: bitbake-0c6f86b60cfba67c20733516957c0a654eb2b44c
|
||||
- sha: 4caa94ee4d644017b0cc51b702e330191677f7d179018cbcec8b1793949ebc74
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.10/bitbake-0c6f86b60cfba67c20733516957c0a654eb2b44c.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.10/bitbake-0c6f86b60cfba67c20733516957c0a654eb2b44c.tar.bz2
|
||||
|
||||
yocto-docs
|
||||
|
||||
- Repository Location: :yocto_git:`/yocto-docs`
|
||||
- Branch: :yocto_git:`kirkstone </yocto-docs/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.10 </yocto-docs/log/?h=yocto-4.0.10>`
|
||||
- Git Revision: :yocto_git:`8388be749806bd0bf4fccf1005dae8f643aa4ef4 </yocto-docs/commit/?id=8388be749806bd0bf4fccf1005dae8f643aa4ef4>`
|
||||
|
||||
@@ -7,7 +7,7 @@ Security Fixes in Yocto-4.0.7
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- binutils: Fix :cve:`2022-4285`
|
||||
- curl: Fix :cve:`2022-43551` and `CVE-2022-43552 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-43552>`__
|
||||
- curl: Fix :cve:`2022-43551` and :cve_mitre:`2022-43552`
|
||||
- ffmpeg: Fix :cve:`2022-3109` and :cve:`2022-3341`
|
||||
- go: Fix :cve:`2022-41715` and :cve:`2022-41717`
|
||||
- libX11: Fix :cve:`2022-3554` and :cve:`2022-3555`
|
||||
@@ -24,7 +24,7 @@ Security Fixes in Yocto-4.0.7
|
||||
- sqlite: Fix :cve:`2022-46908`
|
||||
- systemd: Fix :cve:`2022-45873`
|
||||
- vim: Fix :cve:`2023-0049`, :cve:`2023-0051`, :cve:`2023-0054` and :cve:`2023-0088`
|
||||
- webkitgtk: Fix :cve:`2022-32886`, `CVE-2022-32891 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32891>`__ and :cve:`2022-32912`
|
||||
- webkitgtk: Fix :cve:`2022-32886`, :cve_mitre:`2022-32891`
|
||||
|
||||
|
||||
Fixes in Yocto-4.0.7
|
||||
|
||||
@@ -1982,7 +1982,7 @@ Thanks to this, the depending tasks will keep a previously recorded
|
||||
task hash, and BitBake will be able to retrieve their output from
|
||||
the Shared State cache, instead of re-executing them. Similarly, the
|
||||
output of further downstream tasks can also be retrieved from Shared
|
||||
Shate.
|
||||
State.
|
||||
|
||||
If the output hash is unknown, a new entry will be created on the Hash
|
||||
Equivalence server, matching the task hash to that output.
|
||||
|
||||
@@ -2401,20 +2401,21 @@ tracer writes to, blktrace provides a way to trace without perturbing
|
||||
the traced device at all by providing native support for sending all
|
||||
trace data over the network.
|
||||
|
||||
To have blktrace operate in this mode, start blktrace on the target
|
||||
system being traced with the -l option, along with the device to trace::
|
||||
To have blktrace operate in this mode, start blktrace in server mode on the
|
||||
host system, which is going to store the captured data::
|
||||
|
||||
root@crownbay:~# blktrace -l /dev/sdc
|
||||
$ blktrace -l
|
||||
server: waiting for connections...
|
||||
|
||||
On the host system, use the -h option to connect to the target system,
|
||||
also passing it the device to trace::
|
||||
On the target system that is going to be traced, start blktrace in client
|
||||
mode with the -h option to connect to the host system, also passing it the
|
||||
device to trace::
|
||||
|
||||
$ blktrace -d /dev/sdc -h 192.168.1.43
|
||||
root@crownbay:~# blktrace -d /dev/sdc -h 192.168.1.43
|
||||
blktrace: connecting to 192.168.1.43
|
||||
blktrace: connected!
|
||||
|
||||
On the target system, you should see this::
|
||||
On the host system, you should see this::
|
||||
|
||||
server: connection from 192.168.1.43
|
||||
|
||||
@@ -2424,7 +2425,7 @@ In another shell, execute a workload you want to trace. ::
|
||||
Connecting to downloads.yoctoproject.org (140.211.169.59:80)
|
||||
linux-2.6.19.2.tar.b 100% \|*******************************\| 41727k 0:00:00 ETA
|
||||
|
||||
When it's done, do a Ctrl-C on the host system to stop the
|
||||
When it's done, do a Ctrl-C on the target system to stop the
|
||||
trace::
|
||||
|
||||
^C=== sdc ===
|
||||
@@ -2432,7 +2433,7 @@ trace::
|
||||
CPU 1: 4109 events, 193 KiB data
|
||||
Total: 11800 events (dropped 0), 554 KiB data
|
||||
|
||||
On the target system, you should also see a trace summary for the trace
|
||||
On the host system, you should also see a trace summary for the trace
|
||||
just ended::
|
||||
|
||||
server: end of run for 192.168.1.43:sdc
|
||||
|
||||
@@ -7298,7 +7298,7 @@ system and gives an overview of their function and contents.
|
||||
that if you want to build a fixed revision and you want to avoid
|
||||
performing a query on the remote repository every time BitBake parses
|
||||
your recipe, you should specify a :term:`SRCREV` that is a full revision
|
||||
identifier and not just a tag.
|
||||
identifier (e.g. the full SHA hash in git) and not just a tag.
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
||||
DISTRO_VERSION = "4.0.10"
|
||||
DISTRO_VERSION = "4.0.11"
|
||||
DISTRO_CODENAME = "kirkstone"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
|
||||
@@ -26,7 +26,7 @@ CVE_PRODUCT ??= "${BPN}"
|
||||
CVE_VERSION ??= "${PV}"
|
||||
|
||||
CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
|
||||
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_1.1.db"
|
||||
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2.db"
|
||||
CVE_CHECK_DB_FILE_LOCK ?= "${CVE_CHECK_DB_FILE}.lock"
|
||||
|
||||
CVE_CHECK_LOG ?= "${T}/cve.log"
|
||||
@@ -155,7 +155,7 @@ python do_cve_check () {
|
||||
}
|
||||
|
||||
addtask cve_check before do_build
|
||||
do_cve_check[depends] = "cve-update-db-native:do_fetch"
|
||||
do_cve_check[depends] = "cve-update-nvd2-native:do_fetch"
|
||||
do_cve_check[nostamp] = "1"
|
||||
|
||||
python cve_check_cleanup () {
|
||||
|
||||
@@ -122,7 +122,7 @@ go_do_install() {
|
||||
tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \
|
||||
tar -C ${D}${libdir}/go --no-same-owner -xf -
|
||||
|
||||
if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
|
||||
if ls ${B}/${GO_BUILD_BINDIR}/* >/dev/null 2>/dev/null ; then
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/${GO_BUILD_BINDIR}/* ${D}${bindir}/
|
||||
fi
|
||||
|
||||
@@ -6,7 +6,12 @@ python () {
|
||||
d.appendVar("PACKAGES", " ${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
|
||||
}
|
||||
|
||||
FILES:${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
|
||||
# recursivly search for devicetree files
|
||||
FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
|
||||
/${KERNEL_DTBDEST}/**/*.dtb \
|
||||
/${KERNEL_DTBDEST}/**/*.dtbo \
|
||||
"
|
||||
|
||||
FILES:${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
|
||||
|
||||
# Generate kernel+devicetree bundle
|
||||
@@ -67,12 +72,16 @@ do_compile:append() {
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}/${KERNEL_DTBDEST}
|
||||
for dtbf in ${KERNEL_DEVICETREE}; do
|
||||
dtb=`normalize_dtb "$dtbf"`
|
||||
dtb_ext=${dtb##*.}
|
||||
dtb_base_name=`basename $dtb .$dtb_ext`
|
||||
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
|
||||
install -m 0644 $dtb_path ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
|
||||
if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
|
||||
dtb_ext=${dtb##*.}
|
||||
dtb_base_name=`basename $dtb .$dtb_ext`
|
||||
dtb=$dtb_base_name.$dtb_ext
|
||||
fi
|
||||
install -Dm 0644 $dtb_path ${D}/${KERNEL_DTBDEST}/$dtb
|
||||
done
|
||||
}
|
||||
|
||||
@@ -82,7 +91,10 @@ do_deploy:append() {
|
||||
dtb_ext=${dtb##*.}
|
||||
dtb_base_name=`basename $dtb .$dtb_ext`
|
||||
install -d $deployDir
|
||||
install -m 0644 ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
|
||||
if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
|
||||
dtb=$dtb_base_name.$dtb_ext
|
||||
fi
|
||||
install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
|
||||
if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then
|
||||
ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext $deployDir/$dtb_base_name.$dtb_ext
|
||||
fi
|
||||
|
||||
@@ -210,6 +210,8 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
|
||||
# The directory where built kernel lies in the kernel tree
|
||||
KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
|
||||
KERNEL_IMAGEDEST ?= "boot"
|
||||
KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
|
||||
KERNEL_DTBVENDORED ?= "0"
|
||||
|
||||
#
|
||||
# configuration
|
||||
@@ -230,7 +232,7 @@ KERNEL_EXTRA_ARGS ?= ""
|
||||
|
||||
EXTRA_OEMAKE += ' CC="${KERNEL_CC}" LD="${KERNEL_LD}"'
|
||||
EXTRA_OEMAKE += ' HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"'
|
||||
EXTRA_OEMAKE += ' HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}" PAHOLE=false'
|
||||
EXTRA_OEMAKE += ' HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}"'
|
||||
|
||||
KERNEL_ALT_IMAGETYPE ??= ""
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ def find_license_files(d):
|
||||
bb.fatal('%s: %s' % (d.getVar('PF'), exc))
|
||||
except SyntaxError:
|
||||
oe.qa.handle_error("license-syntax",
|
||||
"%s: Failed to parse it's LICENSE field." % (d.getVar('PF')), d)
|
||||
"%s: Failed to parse LICENSE: %s" % (d.getVar('PF'), d.getVar('LICENSE')), d)
|
||||
# Add files from LIC_FILES_CHKSUM to list of license files
|
||||
lic_chksum_paths = defaultdict(OrderedDict)
|
||||
for path, data in sorted(lic_chksums.items()):
|
||||
|
||||
@@ -262,7 +262,7 @@ def files_from_filevars(filevars):
|
||||
f = '.' + f
|
||||
if not f.startswith("./"):
|
||||
f = './' + f
|
||||
globbed = glob.glob(f)
|
||||
globbed = glob.glob(f, recursive=True)
|
||||
if globbed:
|
||||
if [ f ] != globbed:
|
||||
files += globbed
|
||||
|
||||
@@ -648,7 +648,7 @@ python staging_taskhandler() {
|
||||
bbtasks = e.tasklist
|
||||
for task in bbtasks:
|
||||
deps = d.getVarFlag(task, "depends")
|
||||
if task == "do_configure" or (deps and "populate_sysroot" in deps):
|
||||
if task != 'do_prepare_recipe_sysroot' and (task == "do_configure" or (deps and "populate_sysroot" in deps)):
|
||||
d.prependVarFlag(task, "prefuncs", "extend_recipe_sysroot ")
|
||||
}
|
||||
staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess"
|
||||
|
||||
@@ -948,7 +948,7 @@ BB_HASHCONFIG_IGNORE_VARS ?= "${BB_HASHEXCLUDE_COMMON} DATE TIME SSH_AGENT_PID \
|
||||
PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
|
||||
GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
|
||||
HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \
|
||||
BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT"
|
||||
BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT BB_NICE_LEVEL"
|
||||
BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
|
||||
lockfiles vardepsexclude vardeps vardepvalue vardepvalueexclude \
|
||||
file-checksums python task nostamp \
|
||||
|
||||
@@ -280,7 +280,7 @@ RECIPE_MAINTAINER:pn-intltool = "Alexander Kanavin <alex.kanavin@gmail.com>"
|
||||
RECIPE_MAINTAINER:pn-iproute2 = "Changhyeok Bae <changhyeok.bae@gmail.com>"
|
||||
RECIPE_MAINTAINER:pn-iptables = "Changhyeok Bae <changhyeok.bae@gmail.com>"
|
||||
RECIPE_MAINTAINER:pn-iputils = "Changhyeok Bae <changhyeok.bae@gmail.com>"
|
||||
RECIPE_MAINTAINER:pn-iso-codes = "Wang Mingyu <wangmy@cn.ujitsu.com>"
|
||||
RECIPE_MAINTAINER:pn-iso-codes = "Wang Mingyu <wangmy@cn.fujitsu.com>"
|
||||
RECIPE_MAINTAINER:pn-itstool = "Andreas Müller <schnitzeltony@gmail.com>"
|
||||
RECIPE_MAINTAINER:pn-iw = "Changhyeok Bae <changhyeok.bae@gmail.com>"
|
||||
RECIPE_MAINTAINER:pn-libjpeg-turbo = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||
@@ -700,7 +700,7 @@ RECIPE_MAINTAINER:pn-quilt-native = "Robert Yang <liezhi.yang@windriver.com>"
|
||||
RECIPE_MAINTAINER:pn-quota = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||
RECIPE_MAINTAINER:pn-re2c = "Khem Raj <raj.khem@gmail.com>"
|
||||
RECIPE_MAINTAINER:pn-readline = "Hongxu Jia <hongxu.jia@windriver.com>"
|
||||
RECIPE_MAINTAINER:pn-repo = "Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>"
|
||||
RECIPE_MAINTAINER:pn-repo = "Unassigned <unassigned@yoctoproject.org>"
|
||||
RECIPE_MAINTAINER:pn-resolvconf = "Chen Qi <Qi.Chen@windriver.com>"
|
||||
RECIPE_MAINTAINER:pn-rgb = "Unassigned <unassigned@yoctoproject.org>"
|
||||
RECIPE_MAINTAINER:pn-rpcbind = "Hongxu Jia <hongxu.jia@windriver.com>"
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
#
|
||||
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.37"
|
||||
UNINATIVE_VERSION = "3.9"
|
||||
UNINATIVE_VERSION = "4.0"
|
||||
|
||||
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "de35708c95c34573af140da910132c3291ba4fd26ebf7b74b755ada432cdf07b"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "adac07b08adb88eb26fc7fd87fee0cec9d5be167bf7c5ffd3a549a2a6699c29c"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "3dd82c3fbdb59e87bf091c3eef555a05fae528eeda3083828f76cd4deaceca8b"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "7baa8418a302df52e00916193b0a04f318356d9d2670c9a2bce3e966efefd738"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "83114d36883d43a521e280742b9849bf85d039b2f83d8e21d480659babe75ee8"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "fd75b2a1a67a10f6b7d65afb7d0f3e71a63b0038e428f34dfe420bb37716558a"
|
||||
|
||||
@@ -245,7 +245,7 @@ class OpkgPM(OpkgDpkgPM):
|
||||
"""
|
||||
if (self.d.getVar('FEED_DEPLOYDIR_BASE_URI') or "") != "":
|
||||
for arch in self.pkg_archs.split():
|
||||
cfg_file_name = os.path.join(self.target_rootfs,
|
||||
cfg_file_name = oe.path.join(self.target_rootfs,
|
||||
self.d.getVar("sysconfdir"),
|
||||
"opkg",
|
||||
"local-%s-feed.conf" % arch)
|
||||
|
||||
@@ -62,7 +62,7 @@ class PkgManifest(Manifest):
|
||||
if len(pkgs_to_install) == 0:
|
||||
return
|
||||
|
||||
output = pm.dummy_install(pkgs_to_install).decode('utf-8')
|
||||
output = pm.dummy_install(pkgs_to_install)
|
||||
|
||||
with open(self.full_manifest, 'w+') as manifest:
|
||||
pkg_re = re.compile('^Installing ([^ ]+) [^ ].*')
|
||||
|
||||
@@ -102,6 +102,10 @@ class Rxvt(XTerminal):
|
||||
command = 'rxvt -T "{title}" -e {command}'
|
||||
priority = 1
|
||||
|
||||
class URxvt(XTerminal):
|
||||
command = 'urxvt -T "{title}" -e {command}'
|
||||
priority = 1
|
||||
|
||||
class Screen(Terminal):
|
||||
command = 'screen -D -m -t "{title}" -S devshell {command}'
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import shutil
|
||||
import tempfile
|
||||
import glob
|
||||
import fnmatch
|
||||
import unittest
|
||||
|
||||
from oeqa.selftest.case import OESelftestTestCase
|
||||
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
|
||||
@@ -38,6 +39,13 @@ def setUpModule():
|
||||
canonical_layerpath = os.path.realpath(canonical_layerpath) + '/'
|
||||
edited_layers.append(layerpath)
|
||||
oldmetapath = os.path.realpath(layerpath)
|
||||
|
||||
# when downloading poky from tar.gz some tests will be skipped (BUG 12389)
|
||||
try:
|
||||
runCmd('git rev-parse --is-inside-work-tree', cwd=canonical_layerpath)
|
||||
except:
|
||||
raise unittest.SkipTest("devtool tests require folder to be a git repo")
|
||||
|
||||
result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath)
|
||||
oldreporoot = result.output.rstrip()
|
||||
newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot))
|
||||
|
||||
@@ -149,7 +149,7 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
|
||||
def setUpLocal(self):
|
||||
super().setUpLocal()
|
||||
needed_vars = ['TOPDIR', 'TARGET_PREFIX', 'BB_NUMBER_THREADS']
|
||||
needed_vars = ['TOPDIR', 'TARGET_PREFIX', 'BB_NUMBER_THREADS', 'BB_HASHSERVE']
|
||||
bb_vars = get_bb_vars(needed_vars)
|
||||
for v in needed_vars:
|
||||
setattr(self, v.lower(), bb_vars[v])
|
||||
@@ -223,7 +223,7 @@ class ReproducibleTests(OESelftestTestCase):
|
||||
# mirror, forcing a complete build from scratch
|
||||
config += textwrap.dedent('''\
|
||||
SSTATE_DIR = "${TMPDIR}/sstate"
|
||||
SSTATE_MIRRORS = ""
|
||||
SSTATE_MIRRORS = "file://.*/.*-native.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH file://.*/.*-cross.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
|
||||
''')
|
||||
|
||||
self.logger.info("Building %s (sstate%s allowed)..." % (name, '' if use_sstate else ' NOT'))
|
||||
|
||||
@@ -83,7 +83,6 @@ RRECOMMENDS:${PN}:append:libc-glibc = " libnss-mdns"
|
||||
do_install() {
|
||||
autotools_do_install
|
||||
rm -rf ${D}/run
|
||||
rm -rf ${D}${datadir}/dbus-1/interfaces
|
||||
test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
|
||||
rm -rf ${D}${libdir}/avahi
|
||||
|
||||
@@ -135,7 +134,7 @@ FILES:avahi-daemon = "${sbindir}/avahi-daemon \
|
||||
${sysconfdir}/avahi/services \
|
||||
${sysconfdir}/dbus-1 \
|
||||
${sysconfdir}/init.d/avahi-daemon \
|
||||
${datadir}/avahi/introspection/*.introspect \
|
||||
${datadir}/dbus-1/interfaces \
|
||||
${datadir}/avahi/avahi-service.dtd \
|
||||
${datadir}/avahi/service-types \
|
||||
${datadir}/dbus-1/system-services"
|
||||
|
||||
@@ -9,9 +9,7 @@ HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/"
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=d148485768fe85b9f1072b186a7e9b4d"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/"
|
||||
|
||||
SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
|
||||
SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=dhcpcd-9 \
|
||||
file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
|
||||
file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \
|
||||
file://0001-privsep-Allow-getrandom-sysctl-for-newer-glibc.patch \
|
||||
@@ -22,7 +20,8 @@ SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
|
||||
file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "819357634efed1ea5cf44ec01b24d3d3f8852fec8b4249925dcc5667c54e376c"
|
||||
SRCREV = "3c458fc7fa4146029a1e4f9e98cd7e7adf03081a"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit pkgconfig autotools-brokensep systemd useradd
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 91889b5a3e7554af474a21ce8e1ffd3eb1542f06 Mon Sep 17 00:00:00 2001
|
||||
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||
Date: Thu, 9 Mar 2023 06:58:26 +0000
|
||||
Subject: [PATCH] upstream: include destination constraints for smartcard keys
|
||||
too.
|
||||
|
||||
Spotted by Luci Stanescu; ok deraadt@ markus@
|
||||
|
||||
OpenBSD-Commit-ID: add879fac6903a1cb1d1e42c4309e5359c3d870f
|
||||
|
||||
CVE: CVE-2023-28531
|
||||
|
||||
Upstream-Status: Backport [54ac4ab2b53ce9fcb66b8250dee91c070e4167ed]
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
authfd.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/authfd.c b/authfd.c
|
||||
index 76e48aab..dca8e55b 100644
|
||||
--- a/authfd.c
|
||||
+++ b/authfd.c
|
||||
@@ -665,7 +665,7 @@ ssh_update_card(int sock, int add, const char *reader_id, const char *pin,
|
||||
struct dest_constraint **dest_constraints, size_t ndest_constraints)
|
||||
{
|
||||
struct sshbuf *msg;
|
||||
- int r, constrained = (life || confirm);
|
||||
+ int r, constrained = (life || confirm || dest_constraints);
|
||||
u_char type;
|
||||
|
||||
if (add) {
|
||||
--
|
||||
2.37.1
|
||||
|
||||
@@ -0,0 +1,984 @@
|
||||
From 7280401bdd77ca54be6867a154cc01e0d72612e0 Mon Sep 17 00:00:00 2001
|
||||
From: Damien Miller <djm@mindrot.org>
|
||||
Date: Fri, 24 Mar 2023 13:56:25 +1100
|
||||
Subject: [PATCH] remove support for old libcrypto
|
||||
|
||||
OpenSSH now requires LibreSSL 3.1.0 or greater or
|
||||
OpenSSL 1.1.1 or greater
|
||||
|
||||
with/ok dtucker@
|
||||
|
||||
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/7280401bdd77ca54be6867a154cc01e0d72612e0]
|
||||
Comment: Hunk are refreshed, removed couple of hunks from configure.ac as hunk code is not prasent
|
||||
and backported to the existing code.
|
||||
Signed-off-by: Riyaz Khan <Riyaz.Khan@kpit.com>
|
||||
|
||||
---
|
||||
.github/workflows/c-cpp.yml | 7 -
|
||||
INSTALL | 8 +-
|
||||
cipher-aes.c | 2 +-
|
||||
configure.ac | 96 ++---
|
||||
openbsd-compat/libressl-api-compat.c | 556 +--------------------------
|
||||
openbsd-compat/openssl-compat.h | 151 +-------
|
||||
6 files changed, 40 insertions(+), 780 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
|
||||
index 3d9aa22dba5..d299a32468d 100644
|
||||
--- a/.github/workflows/c-cpp.yml
|
||||
+++ b/.github/workflows/c-cpp.yml
|
||||
@@ -40,18 +40,11 @@
|
||||
- { os: ubuntu-20.04, configs: tcmalloc }
|
||||
- { os: ubuntu-20.04, configs: musl }
|
||||
- { os: ubuntu-latest, configs: libressl-master }
|
||||
- - { os: ubuntu-latest, configs: libressl-2.2.9 }
|
||||
- - { os: ubuntu-latest, configs: libressl-2.8.3 }
|
||||
- - { os: ubuntu-latest, configs: libressl-3.0.2 }
|
||||
- { os: ubuntu-latest, configs: libressl-3.2.6 }
|
||||
- { os: ubuntu-latest, configs: libressl-3.3.4 }
|
||||
- { os: ubuntu-latest, configs: libressl-3.4.1 }
|
||||
- { os: ubuntu-latest, configs: openssl-master }
|
||||
- { os: ubuntu-latest, configs: openssl-noec }
|
||||
- - { os: ubuntu-latest, configs: openssl-1.0.1 }
|
||||
- - { os: ubuntu-latest, configs: openssl-1.0.1u }
|
||||
- - { os: ubuntu-latest, configs: openssl-1.0.2u }
|
||||
- - { os: ubuntu-latest, configs: openssl-1.1.0h }
|
||||
- { os: ubuntu-latest, configs: openssl-1.1.1 }
|
||||
- { os: ubuntu-latest, configs: openssl-1.1.1k }
|
||||
- { os: ubuntu-latest, configs: openssl-3.0.0 }
|
||||
diff --git a/INSTALL b/INSTALL
|
||||
index 68b15e13190..f99d1e2a809 100644
|
||||
--- a/INSTALL
|
||||
+++ b/INSTALL
|
||||
@@ -21,12 +21,8 @@ https://zlib.net/
|
||||
|
||||
libcrypto from either of LibreSSL or OpenSSL. Building without libcrypto
|
||||
is supported but severely restricts the available ciphers and algorithms.
|
||||
- - LibreSSL (https://www.libressl.org/)
|
||||
- - OpenSSL (https://www.openssl.org) with any of the following versions:
|
||||
- - 1.0.x >= 1.0.1 or 1.1.0 >= 1.1.0g or any 1.1.1
|
||||
-
|
||||
-Note that due to a bug in EVP_CipherInit OpenSSL 1.1 versions prior to
|
||||
-1.1.0g can't be used.
|
||||
+ - LibreSSL (https://www.libressl.org/) 3.1.0 or greater
|
||||
+ - OpenSSL (https://www.openssl.org) 1.1.1 or greater
|
||||
|
||||
LibreSSL/OpenSSL should be compiled as a position-independent library
|
||||
(i.e. -fPIC, eg by configuring OpenSSL as "./config [options] -fPIC"
|
||||
diff --git a/cipher-aes.c b/cipher-aes.c
|
||||
index 8b101727284..87c763353d8 100644
|
||||
--- a/cipher-aes.c
|
||||
+++ b/cipher-aes.c
|
||||
@@ -69,7 +69,7 @@ ssh_rijndael_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
|
||||
|
||||
static int
|
||||
ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
|
||||
- LIBCRYPTO_EVP_INL_TYPE len)
|
||||
+ size_t len)
|
||||
{
|
||||
struct ssh_rijndael_ctx *c;
|
||||
u_char buf[RIJNDAEL_BLOCKSIZE];
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 22fee70f604..1c0ccdf19c5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2744,42 +2744,40 @@
|
||||
#include <openssl/crypto.h>
|
||||
#define DATA "conftest.ssllibver"
|
||||
]], [[
|
||||
- FILE *fd;
|
||||
- int rc;
|
||||
+ FILE *f;
|
||||
|
||||
- fd = fopen(DATA,"w");
|
||||
- if(fd == NULL)
|
||||
+ if ((f = fopen(DATA, "w")) == NULL)
|
||||
exit(1);
|
||||
-#ifndef OPENSSL_VERSION
|
||||
-# define OPENSSL_VERSION SSLEAY_VERSION
|
||||
-#endif
|
||||
-#ifndef HAVE_OPENSSL_VERSION
|
||||
-# define OpenSSL_version SSLeay_version
|
||||
-#endif
|
||||
-#ifndef HAVE_OPENSSL_VERSION_NUM
|
||||
-# define OpenSSL_version_num SSLeay
|
||||
-#endif
|
||||
- if ((rc = fprintf(fd, "%08lx (%s)\n",
|
||||
+ if (fprintf(f, "%08lx (%s)",
|
||||
(unsigned long)OpenSSL_version_num(),
|
||||
- OpenSSL_version(OPENSSL_VERSION))) < 0)
|
||||
+ OpenSSL_version(OPENSSL_VERSION)) < 0)
|
||||
+ exit(1);
|
||||
+#ifdef LIBRESSL_VERSION_NUMBER
|
||||
+ if (fprintf(f, " libressl-%08lx", LIBRESSL_VERSION_NUMBER) < 0)
|
||||
+ exit(1);
|
||||
+#endif
|
||||
+ if (fputc('\n', f) == EOF || fclose(f) == EOF)
|
||||
exit(1);
|
||||
-
|
||||
exit(0);
|
||||
]])],
|
||||
[
|
||||
- ssl_library_ver=`cat conftest.ssllibver`
|
||||
+ sslver=`cat conftest.ssllibver`
|
||||
+ ssl_showver=`echo "$sslver" | sed 's/ libressl-.*//'`
|
||||
# Check version is supported.
|
||||
- case "$ssl_library_ver" in
|
||||
- 10000*|0*)
|
||||
- AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
|
||||
- ;;
|
||||
- 100*) ;; # 1.0.x
|
||||
- 101000[[0123456]]*)
|
||||
- # https://github.com/openssl/openssl/pull/4613
|
||||
- AC_MSG_ERROR([OpenSSL 1.1.x versions prior to 1.1.0g have a bug that breaks their use with OpenSSH (have "$ssl_library_ver")])
|
||||
+ case "$sslver" in
|
||||
+ 100*|10100*) # 1.0.x, 1.1.0x
|
||||
+ AC_MSG_ERROR([OpenSSL >= 1.1.1 required (have "$ssl_showver")])
|
||||
;;
|
||||
101*) ;; # 1.1.x
|
||||
- 200*) ;; # LibreSSL
|
||||
+ 200*) # LibreSSL
|
||||
+ lver=`echo "$sslver" | sed 's/.*libressl-//'`
|
||||
+ case "$lver" in
|
||||
+ 2*|300*) # 2.x, 3.0.0
|
||||
+ AC_MSG_ERROR([LibreSSL >= 3.1.0 required (have "$ssl_showver")])
|
||||
+ ;;
|
||||
+ *) ;; # Assume all other versions are good.
|
||||
+ esac
|
||||
+ ;;
|
||||
300*) ;; # OpenSSL 3
|
||||
301*) ;; # OpenSSL development branch.
|
||||
*)
|
||||
@@ -2781,10 +2781,10 @@
|
||||
300*) ;; # OpenSSL 3
|
||||
301*) ;; # OpenSSL development branch.
|
||||
*)
|
||||
- AC_MSG_ERROR([Unknown/unsupported OpenSSL version ("$ssl_library_ver")])
|
||||
+ AC_MSG_ERROR([Unknown/unsupported OpenSSL version ("$ssl_showver")])
|
||||
;;
|
||||
esac
|
||||
- AC_MSG_RESULT([$ssl_library_ver])
|
||||
+ AC_MSG_RESULT([$ssl_showver])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([not found])
|
||||
@@ -2804,9 +2804,6 @@
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
]], [[
|
||||
-#ifndef HAVE_OPENSSL_VERSION_NUM
|
||||
-# define OpenSSL_version_num SSLeay
|
||||
-#endif
|
||||
exit(OpenSSL_version_num() == OPENSSL_VERSION_NUMBER ? 0 : 1);
|
||||
]])],
|
||||
[
|
||||
@@ -2881,44 +2878,13 @@
|
||||
)
|
||||
)
|
||||
|
||||
- # LibreSSL/OpenSSL 1.1x API
|
||||
+ # LibreSSL/OpenSSL API differences
|
||||
AC_CHECK_FUNCS([ \
|
||||
- OPENSSL_init_crypto \
|
||||
- DH_get0_key \
|
||||
- DH_get0_pqg \
|
||||
- DH_set0_key \
|
||||
- DH_set_length \
|
||||
- DH_set0_pqg \
|
||||
- DSA_get0_key \
|
||||
- DSA_get0_pqg \
|
||||
- DSA_set0_key \
|
||||
- DSA_set0_pqg \
|
||||
- DSA_SIG_get0 \
|
||||
- DSA_SIG_set0 \
|
||||
- ECDSA_SIG_get0 \
|
||||
- ECDSA_SIG_set0 \
|
||||
EVP_CIPHER_CTX_iv \
|
||||
EVP_CIPHER_CTX_iv_noconst \
|
||||
EVP_CIPHER_CTX_get_iv \
|
||||
EVP_CIPHER_CTX_get_updated_iv \
|
||||
EVP_CIPHER_CTX_set_iv \
|
||||
- RSA_get0_crt_params \
|
||||
- RSA_get0_factors \
|
||||
- RSA_get0_key \
|
||||
- RSA_set0_crt_params \
|
||||
- RSA_set0_factors \
|
||||
- RSA_set0_key \
|
||||
- RSA_meth_free \
|
||||
- RSA_meth_dup \
|
||||
- RSA_meth_set1_name \
|
||||
- RSA_meth_get_finish \
|
||||
- RSA_meth_set_priv_enc \
|
||||
- RSA_meth_set_priv_dec \
|
||||
- RSA_meth_set_finish \
|
||||
- EVP_PKEY_get0_RSA \
|
||||
- EVP_MD_CTX_new \
|
||||
- EVP_MD_CTX_free \
|
||||
- EVP_chacha20 \
|
||||
])
|
||||
|
||||
if test "x$openssl_engine" = "xyes" ; then
|
||||
@@ -3040,8 +3006,8 @@
|
||||
fi
|
||||
AC_CHECK_FUNCS([crypt DES_crypt])
|
||||
|
||||
- # Check for SHA256, SHA384 and SHA512 support in OpenSSL
|
||||
- AC_CHECK_FUNCS([EVP_sha256 EVP_sha384 EVP_sha512])
|
||||
+ # Check for various EVP support in OpenSSL
|
||||
+ AC_CHECK_FUNCS([EVP_sha256 EVP_sha384 EVP_sha512 EVP_chacha20])
|
||||
|
||||
# Check complete ECC support in OpenSSL
|
||||
AC_MSG_CHECKING([whether OpenSSL has NID_X9_62_prime256v1])
|
||||
diff --git a/openbsd-compat/libressl-api-compat.c b/openbsd-compat/libressl-api-compat.c
|
||||
index 498180dc894..59be17397c5 100644
|
||||
--- a/openbsd-compat/libressl-api-compat.c
|
||||
+++ b/openbsd-compat/libressl-api-compat.c
|
||||
@@ -1,129 +1,5 @@
|
||||
-/* $OpenBSD: dsa_lib.c,v 1.29 2018/04/14 07:09:21 tb Exp $ */
|
||||
-/* $OpenBSD: rsa_lib.c,v 1.37 2018/04/14 07:09:21 tb Exp $ */
|
||||
-/* $OpenBSD: evp_lib.c,v 1.17 2018/09/12 06:35:38 djm Exp $ */
|
||||
-/* $OpenBSD: dh_lib.c,v 1.32 2018/05/02 15:48:38 tb Exp $ */
|
||||
-/* $OpenBSD: p_lib.c,v 1.24 2018/05/30 15:40:50 tb Exp $ */
|
||||
-/* $OpenBSD: digest.c,v 1.30 2018/04/14 07:09:21 tb Exp $ */
|
||||
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
- * All rights reserved.
|
||||
- *
|
||||
- * This package is an SSL implementation written
|
||||
- * by Eric Young (eay@cryptsoft.com).
|
||||
- * The implementation was written so as to conform with Netscapes SSL.
|
||||
- *
|
||||
- * This library is free for commercial and non-commercial use as long as
|
||||
- * the following conditions are aheared to. The following conditions
|
||||
- * apply to all code found in this distribution, be it the RC4, RSA,
|
||||
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
- * included with this distribution is covered by the same copyright terms
|
||||
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
- *
|
||||
- * Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
- * the code are not to be removed.
|
||||
- * If this package is used in a product, Eric Young should be given attribution
|
||||
- * as the author of the parts of the library used.
|
||||
- * This can be in the form of a textual message at program startup or
|
||||
- * in documentation (online or textual) provided with the package.
|
||||
- *
|
||||
- * Redistribution and use in source and binary forms, with or without
|
||||
- * modification, are permitted provided that the following conditions
|
||||
- * are met:
|
||||
- * 1. Redistributions of source code must retain the copyright
|
||||
- * notice, this list of conditions and the following disclaimer.
|
||||
- * 2. Redistributions in binary form must reproduce the above copyright
|
||||
- * notice, this list of conditions and the following disclaimer in the
|
||||
- * documentation and/or other materials provided with the distribution.
|
||||
- * 3. All advertising materials mentioning features or use of this software
|
||||
- * must display the following acknowledgement:
|
||||
- * "This product includes cryptographic software written by
|
||||
- * Eric Young (eay@cryptsoft.com)"
|
||||
- * The word 'cryptographic' can be left out if the rouines from the library
|
||||
- * being used are not cryptographic related :-).
|
||||
- * 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
- * the apps directory (application code) you must include an acknowledgement:
|
||||
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
- *
|
||||
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
- * SUCH DAMAGE.
|
||||
- *
|
||||
- * The licence and distribution terms for any publically available version or
|
||||
- * derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
- * copied and put under another distribution licence
|
||||
- * [including the GNU Public Licence.]
|
||||
- */
|
||||
-
|
||||
-/* $OpenBSD: dsa_asn1.c,v 1.22 2018/06/14 17:03:19 jsing Exp $ */
|
||||
-/* $OpenBSD: ecs_asn1.c,v 1.9 2018/03/17 15:24:44 tb Exp $ */
|
||||
-/* $OpenBSD: digest.c,v 1.30 2018/04/14 07:09:21 tb Exp $ */
|
||||
-/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
|
||||
- * project 2000.
|
||||
- */
|
||||
-/* ====================================================================
|
||||
- * Copyright (c) 2000-2005 The OpenSSL Project. All rights reserved.
|
||||
- *
|
||||
- * Redistribution and use in source and binary forms, with or without
|
||||
- * modification, are permitted provided that the following conditions
|
||||
- * are met:
|
||||
- *
|
||||
- * 1. Redistributions of source code must retain the above copyright
|
||||
- * notice, this list of conditions and the following disclaimer.
|
||||
- *
|
||||
- * 2. Redistributions in binary form must reproduce the above copyright
|
||||
- * notice, this list of conditions and the following disclaimer in
|
||||
- * the documentation and/or other materials provided with the
|
||||
- * distribution.
|
||||
- *
|
||||
- * 3. All advertising materials mentioning features or use of this
|
||||
- * software must display the following acknowledgment:
|
||||
- * "This product includes software developed by the OpenSSL Project
|
||||
- * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
- *
|
||||
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
- * endorse or promote products derived from this software without
|
||||
- * prior written permission. For written permission, please contact
|
||||
- * licensing@OpenSSL.org.
|
||||
- *
|
||||
- * 5. Products derived from this software may not be called "OpenSSL"
|
||||
- * nor may "OpenSSL" appear in their names without prior written
|
||||
- * permission of the OpenSSL Project.
|
||||
- *
|
||||
- * 6. Redistributions of any form whatsoever must retain the following
|
||||
- * acknowledgment:
|
||||
- * "This product includes software developed by the OpenSSL Project
|
||||
- * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
- *
|
||||
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
- * OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
- * ====================================================================
|
||||
- *
|
||||
- * This product includes cryptographic software written by Eric Young
|
||||
- * (eay@cryptsoft.com). This product includes software written by Tim
|
||||
- * Hudson (tjh@cryptsoft.com).
|
||||
- *
|
||||
- */
|
||||
-
|
||||
-/* $OpenBSD: rsa_meth.c,v 1.2 2018/09/12 06:35:38 djm Exp $ */
|
||||
/*
|
||||
- * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
|
||||
+ * Copyright (c) 2018 Damien Miller <djm@mindrot.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -147,192 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#include <openssl/err.h>
|
||||
-#include <openssl/bn.h>
|
||||
-#include <openssl/dsa.h>
|
||||
-#include <openssl/rsa.h>
|
||||
#include <openssl/evp.h>
|
||||
-#ifdef OPENSSL_HAS_ECC
|
||||
-#include <openssl/ecdsa.h>
|
||||
-#endif
|
||||
-#include <openssl/dh.h>
|
||||
-
|
||||
-#ifndef HAVE_DSA_GET0_PQG
|
||||
-void
|
||||
-DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
|
||||
-{
|
||||
- if (p != NULL)
|
||||
- *p = d->p;
|
||||
- if (q != NULL)
|
||||
- *q = d->q;
|
||||
- if (g != NULL)
|
||||
- *g = d->g;
|
||||
-}
|
||||
-#endif /* HAVE_DSA_GET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DSA_SET0_PQG
|
||||
-int
|
||||
-DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g)
|
||||
-{
|
||||
- if ((d->p == NULL && p == NULL) || (d->q == NULL && q == NULL) ||
|
||||
- (d->g == NULL && g == NULL))
|
||||
- return 0;
|
||||
-
|
||||
- if (p != NULL) {
|
||||
- BN_free(d->p);
|
||||
- d->p = p;
|
||||
- }
|
||||
- if (q != NULL) {
|
||||
- BN_free(d->q);
|
||||
- d->q = q;
|
||||
- }
|
||||
- if (g != NULL) {
|
||||
- BN_free(d->g);
|
||||
- d->g = g;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_DSA_SET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DSA_GET0_KEY
|
||||
-void
|
||||
-DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key)
|
||||
-{
|
||||
- if (pub_key != NULL)
|
||||
- *pub_key = d->pub_key;
|
||||
- if (priv_key != NULL)
|
||||
- *priv_key = d->priv_key;
|
||||
-}
|
||||
-#endif /* HAVE_DSA_GET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_DSA_SET0_KEY
|
||||
-int
|
||||
-DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
|
||||
-{
|
||||
- if (d->pub_key == NULL && pub_key == NULL)
|
||||
- return 0;
|
||||
-
|
||||
- if (pub_key != NULL) {
|
||||
- BN_free(d->pub_key);
|
||||
- d->pub_key = pub_key;
|
||||
- }
|
||||
- if (priv_key != NULL) {
|
||||
- BN_free(d->priv_key);
|
||||
- d->priv_key = priv_key;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_DSA_SET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_RSA_GET0_KEY
|
||||
-void
|
||||
-RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
|
||||
-{
|
||||
- if (n != NULL)
|
||||
- *n = r->n;
|
||||
- if (e != NULL)
|
||||
- *e = r->e;
|
||||
- if (d != NULL)
|
||||
- *d = r->d;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_GET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_RSA_SET0_KEY
|
||||
-int
|
||||
-RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
|
||||
-{
|
||||
- if ((r->n == NULL && n == NULL) || (r->e == NULL && e == NULL))
|
||||
- return 0;
|
||||
-
|
||||
- if (n != NULL) {
|
||||
- BN_free(r->n);
|
||||
- r->n = n;
|
||||
- }
|
||||
- if (e != NULL) {
|
||||
- BN_free(r->e);
|
||||
- r->e = e;
|
||||
- }
|
||||
- if (d != NULL) {
|
||||
- BN_free(r->d);
|
||||
- r->d = d;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_SET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_RSA_GET0_CRT_PARAMS
|
||||
-void
|
||||
-RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
|
||||
- const BIGNUM **iqmp)
|
||||
-{
|
||||
- if (dmp1 != NULL)
|
||||
- *dmp1 = r->dmp1;
|
||||
- if (dmq1 != NULL)
|
||||
- *dmq1 = r->dmq1;
|
||||
- if (iqmp != NULL)
|
||||
- *iqmp = r->iqmp;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_GET0_CRT_PARAMS */
|
||||
-
|
||||
-#ifndef HAVE_RSA_SET0_CRT_PARAMS
|
||||
-int
|
||||
-RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
|
||||
-{
|
||||
- if ((r->dmp1 == NULL && dmp1 == NULL) ||
|
||||
- (r->dmq1 == NULL && dmq1 == NULL) ||
|
||||
- (r->iqmp == NULL && iqmp == NULL))
|
||||
- return 0;
|
||||
-
|
||||
- if (dmp1 != NULL) {
|
||||
- BN_free(r->dmp1);
|
||||
- r->dmp1 = dmp1;
|
||||
- }
|
||||
- if (dmq1 != NULL) {
|
||||
- BN_free(r->dmq1);
|
||||
- r->dmq1 = dmq1;
|
||||
- }
|
||||
- if (iqmp != NULL) {
|
||||
- BN_free(r->iqmp);
|
||||
- r->iqmp = iqmp;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_SET0_CRT_PARAMS */
|
||||
-
|
||||
-#ifndef HAVE_RSA_GET0_FACTORS
|
||||
-void
|
||||
-RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
|
||||
-{
|
||||
- if (p != NULL)
|
||||
- *p = r->p;
|
||||
- if (q != NULL)
|
||||
- *q = r->q;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_GET0_FACTORS */
|
||||
-
|
||||
-#ifndef HAVE_RSA_SET0_FACTORS
|
||||
-int
|
||||
-RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
|
||||
-{
|
||||
- if ((r->p == NULL && p == NULL) || (r->q == NULL && q == NULL))
|
||||
- return 0;
|
||||
-
|
||||
- if (p != NULL) {
|
||||
- BN_free(r->p);
|
||||
- r->p = p;
|
||||
- }
|
||||
- if (q != NULL) {
|
||||
- BN_free(r->q);
|
||||
- r->q = q;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_SET0_FACTORS */
|
||||
|
||||
#ifndef HAVE_EVP_CIPHER_CTX_GET_IV
|
||||
int
|
||||
@@ -392,249 +83,4 @@ EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len)
|
||||
}
|
||||
#endif /* HAVE_EVP_CIPHER_CTX_SET_IV */
|
||||
|
||||
-#ifndef HAVE_DSA_SIG_GET0
|
||||
-void
|
||||
-DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
|
||||
-{
|
||||
- if (pr != NULL)
|
||||
- *pr = sig->r;
|
||||
- if (ps != NULL)
|
||||
- *ps = sig->s;
|
||||
-}
|
||||
-#endif /* HAVE_DSA_SIG_GET0 */
|
||||
-
|
||||
-#ifndef HAVE_DSA_SIG_SET0
|
||||
-int
|
||||
-DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
|
||||
-{
|
||||
- if (r == NULL || s == NULL)
|
||||
- return 0;
|
||||
-
|
||||
- BN_clear_free(sig->r);
|
||||
- sig->r = r;
|
||||
- BN_clear_free(sig->s);
|
||||
- sig->s = s;
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_DSA_SIG_SET0 */
|
||||
-
|
||||
-#ifdef OPENSSL_HAS_ECC
|
||||
-#ifndef HAVE_ECDSA_SIG_GET0
|
||||
-void
|
||||
-ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
|
||||
-{
|
||||
- if (pr != NULL)
|
||||
- *pr = sig->r;
|
||||
- if (ps != NULL)
|
||||
- *ps = sig->s;
|
||||
-}
|
||||
-#endif /* HAVE_ECDSA_SIG_GET0 */
|
||||
-
|
||||
-#ifndef HAVE_ECDSA_SIG_SET0
|
||||
-int
|
||||
-ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
|
||||
-{
|
||||
- if (r == NULL || s == NULL)
|
||||
- return 0;
|
||||
-
|
||||
- BN_clear_free(sig->r);
|
||||
- BN_clear_free(sig->s);
|
||||
- sig->r = r;
|
||||
- sig->s = s;
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_ECDSA_SIG_SET0 */
|
||||
-#endif /* OPENSSL_HAS_ECC */
|
||||
-
|
||||
-#ifndef HAVE_DH_GET0_PQG
|
||||
-void
|
||||
-DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
|
||||
-{
|
||||
- if (p != NULL)
|
||||
- *p = dh->p;
|
||||
- if (q != NULL)
|
||||
- *q = dh->q;
|
||||
- if (g != NULL)
|
||||
- *g = dh->g;
|
||||
-}
|
||||
-#endif /* HAVE_DH_GET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DH_SET0_PQG
|
||||
-int
|
||||
-DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
|
||||
-{
|
||||
- if ((dh->p == NULL && p == NULL) || (dh->g == NULL && g == NULL))
|
||||
- return 0;
|
||||
-
|
||||
- if (p != NULL) {
|
||||
- BN_free(dh->p);
|
||||
- dh->p = p;
|
||||
- }
|
||||
- if (q != NULL) {
|
||||
- BN_free(dh->q);
|
||||
- dh->q = q;
|
||||
- }
|
||||
- if (g != NULL) {
|
||||
- BN_free(dh->g);
|
||||
- dh->g = g;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_DH_SET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DH_GET0_KEY
|
||||
-void
|
||||
-DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
|
||||
-{
|
||||
- if (pub_key != NULL)
|
||||
- *pub_key = dh->pub_key;
|
||||
- if (priv_key != NULL)
|
||||
- *priv_key = dh->priv_key;
|
||||
-}
|
||||
-#endif /* HAVE_DH_GET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_DH_SET0_KEY
|
||||
-int
|
||||
-DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
|
||||
-{
|
||||
- if (pub_key != NULL) {
|
||||
- BN_free(dh->pub_key);
|
||||
- dh->pub_key = pub_key;
|
||||
- }
|
||||
- if (priv_key != NULL) {
|
||||
- BN_free(dh->priv_key);
|
||||
- dh->priv_key = priv_key;
|
||||
- }
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_DH_SET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_DH_SET_LENGTH
|
||||
-int
|
||||
-DH_set_length(DH *dh, long length)
|
||||
-{
|
||||
- if (length < 0 || length > INT_MAX)
|
||||
- return 0;
|
||||
-
|
||||
- dh->length = length;
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_DH_SET_LENGTH */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_FREE
|
||||
-void
|
||||
-RSA_meth_free(RSA_METHOD *meth)
|
||||
-{
|
||||
- if (meth != NULL) {
|
||||
- free((char *)meth->name);
|
||||
- free(meth);
|
||||
- }
|
||||
-}
|
||||
-#endif /* HAVE_RSA_METH_FREE */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_DUP
|
||||
-RSA_METHOD *
|
||||
-RSA_meth_dup(const RSA_METHOD *meth)
|
||||
-{
|
||||
- RSA_METHOD *copy;
|
||||
-
|
||||
- if ((copy = calloc(1, sizeof(*copy))) == NULL)
|
||||
- return NULL;
|
||||
- memcpy(copy, meth, sizeof(*copy));
|
||||
- if ((copy->name = strdup(meth->name)) == NULL) {
|
||||
- free(copy);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- return copy;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_METH_DUP */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET1_NAME
|
||||
-int
|
||||
-RSA_meth_set1_name(RSA_METHOD *meth, const char *name)
|
||||
-{
|
||||
- char *copy;
|
||||
-
|
||||
- if ((copy = strdup(name)) == NULL)
|
||||
- return 0;
|
||||
- free((char *)meth->name);
|
||||
- meth->name = copy;
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_METH_SET1_NAME */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_GET_FINISH
|
||||
-int
|
||||
-(*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa)
|
||||
-{
|
||||
- return meth->finish;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_METH_GET_FINISH */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET_PRIV_ENC
|
||||
-int
|
||||
-RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
|
||||
- const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
|
||||
-{
|
||||
- meth->rsa_priv_enc = priv_enc;
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_METH_SET_PRIV_ENC */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET_PRIV_DEC
|
||||
-int
|
||||
-RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
|
||||
- const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
|
||||
-{
|
||||
- meth->rsa_priv_dec = priv_dec;
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_METH_SET_PRIV_DEC */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET_FINISH
|
||||
-int
|
||||
-RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa))
|
||||
-{
|
||||
- meth->finish = finish;
|
||||
- return 1;
|
||||
-}
|
||||
-#endif /* HAVE_RSA_METH_SET_FINISH */
|
||||
-
|
||||
-#ifndef HAVE_EVP_PKEY_GET0_RSA
|
||||
-RSA *
|
||||
-EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
|
||||
-{
|
||||
- if (pkey->type != EVP_PKEY_RSA) {
|
||||
- /* EVPerror(EVP_R_EXPECTING_AN_RSA_KEY); */
|
||||
- return NULL;
|
||||
- }
|
||||
- return pkey->pkey.rsa;
|
||||
-}
|
||||
-#endif /* HAVE_EVP_PKEY_GET0_RSA */
|
||||
-
|
||||
-#ifndef HAVE_EVP_MD_CTX_NEW
|
||||
-EVP_MD_CTX *
|
||||
-EVP_MD_CTX_new(void)
|
||||
-{
|
||||
- return calloc(1, sizeof(EVP_MD_CTX));
|
||||
-}
|
||||
-#endif /* HAVE_EVP_MD_CTX_NEW */
|
||||
-
|
||||
-#ifndef HAVE_EVP_MD_CTX_FREE
|
||||
-void
|
||||
-EVP_MD_CTX_free(EVP_MD_CTX *ctx)
|
||||
-{
|
||||
- if (ctx == NULL)
|
||||
- return;
|
||||
-
|
||||
- EVP_MD_CTX_cleanup(ctx);
|
||||
-
|
||||
- free(ctx);
|
||||
-}
|
||||
-#endif /* HAVE_EVP_MD_CTX_FREE */
|
||||
-
|
||||
#endif /* WITH_OPENSSL */
|
||||
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
|
||||
index 61a69dd56eb..d0dd2c3450d 100644
|
||||
--- a/openbsd-compat/openssl-compat.h
|
||||
+++ b/openbsd-compat/openssl-compat.h
|
||||
@@ -33,26 +33,13 @@
|
||||
int ssh_compatible_openssl(long, long);
|
||||
void ssh_libcrypto_init(void);
|
||||
|
||||
-#if (OPENSSL_VERSION_NUMBER < 0x1000100fL)
|
||||
-# error OpenSSL 1.0.1 or greater is required
|
||||
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
|
||||
+# error OpenSSL 1.1.0 or greater is required
|
||||
#endif
|
||||
-
|
||||
-#ifndef OPENSSL_VERSION
|
||||
-# define OPENSSL_VERSION SSLEAY_VERSION
|
||||
-#endif
|
||||
-
|
||||
-#ifndef HAVE_OPENSSL_VERSION
|
||||
-# define OpenSSL_version(x) SSLeay_version(x)
|
||||
-#endif
|
||||
-
|
||||
-#ifndef HAVE_OPENSSL_VERSION_NUM
|
||||
-# define OpenSSL_version_num SSLeay
|
||||
-#endif
|
||||
-
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10000001L
|
||||
-# define LIBCRYPTO_EVP_INL_TYPE unsigned int
|
||||
-#else
|
||||
-# define LIBCRYPTO_EVP_INL_TYPE size_t
|
||||
+#ifdef LIBRESSL_VERSION_NUMBER
|
||||
+# if LIBRESSL_VERSION_NUMBER < 0x3010000fL
|
||||
+# error LibreSSL 3.1.0 or greater is required
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_RSA_MAX_MODULUS_BITS
|
||||
@@ -68,25 +55,6 @@ void ssh_libcrypto_init(void);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-/* LibreSSL/OpenSSL 1.1x API compat */
|
||||
-#ifndef HAVE_DSA_GET0_PQG
|
||||
-void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q,
|
||||
- const BIGNUM **g);
|
||||
-#endif /* HAVE_DSA_GET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DSA_SET0_PQG
|
||||
-int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
|
||||
-#endif /* HAVE_DSA_SET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DSA_GET0_KEY
|
||||
-void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
|
||||
- const BIGNUM **priv_key);
|
||||
-#endif /* HAVE_DSA_GET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_DSA_SET0_KEY
|
||||
-int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
|
||||
-#endif /* HAVE_DSA_SET0_KEY */
|
||||
-
|
||||
#ifndef HAVE_EVP_CIPHER_CTX_GET_IV
|
||||
# ifdef HAVE_EVP_CIPHER_CTX_GET_UPDATED_IV
|
||||
# define EVP_CIPHER_CTX_get_iv EVP_CIPHER_CTX_get_updated_iv
|
||||
@@ -101,112 +69,5 @@ int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx,
|
||||
const unsigned char *iv, size_t len);
|
||||
#endif /* HAVE_EVP_CIPHER_CTX_SET_IV */
|
||||
|
||||
-#ifndef HAVE_RSA_GET0_KEY
|
||||
-void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e,
|
||||
- const BIGNUM **d);
|
||||
-#endif /* HAVE_RSA_GET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_RSA_SET0_KEY
|
||||
-int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
|
||||
-#endif /* HAVE_RSA_SET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_RSA_GET0_CRT_PARAMS
|
||||
-void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
|
||||
- const BIGNUM **iqmp);
|
||||
-#endif /* HAVE_RSA_GET0_CRT_PARAMS */
|
||||
-
|
||||
-#ifndef HAVE_RSA_SET0_CRT_PARAMS
|
||||
-int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
|
||||
-#endif /* HAVE_RSA_SET0_CRT_PARAMS */
|
||||
-
|
||||
-#ifndef HAVE_RSA_GET0_FACTORS
|
||||
-void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q);
|
||||
-#endif /* HAVE_RSA_GET0_FACTORS */
|
||||
-
|
||||
-#ifndef HAVE_RSA_SET0_FACTORS
|
||||
-int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
|
||||
-#endif /* HAVE_RSA_SET0_FACTORS */
|
||||
-
|
||||
-#ifndef DSA_SIG_GET0
|
||||
-void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
|
||||
-#endif /* DSA_SIG_GET0 */
|
||||
-
|
||||
-#ifndef DSA_SIG_SET0
|
||||
-int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
|
||||
-#endif /* DSA_SIG_SET0 */
|
||||
-
|
||||
-#ifdef OPENSSL_HAS_ECC
|
||||
-#ifndef HAVE_ECDSA_SIG_GET0
|
||||
-void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
|
||||
-#endif /* HAVE_ECDSA_SIG_GET0 */
|
||||
-
|
||||
-#ifndef HAVE_ECDSA_SIG_SET0
|
||||
-int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
|
||||
-#endif /* HAVE_ECDSA_SIG_SET0 */
|
||||
-#endif /* OPENSSL_HAS_ECC */
|
||||
-
|
||||
-#ifndef HAVE_DH_GET0_PQG
|
||||
-void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
|
||||
- const BIGNUM **g);
|
||||
-#endif /* HAVE_DH_GET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DH_SET0_PQG
|
||||
-int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
|
||||
-#endif /* HAVE_DH_SET0_PQG */
|
||||
-
|
||||
-#ifndef HAVE_DH_GET0_KEY
|
||||
-void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
|
||||
-#endif /* HAVE_DH_GET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_DH_SET0_KEY
|
||||
-int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
|
||||
-#endif /* HAVE_DH_SET0_KEY */
|
||||
-
|
||||
-#ifndef HAVE_DH_SET_LENGTH
|
||||
-int DH_set_length(DH *dh, long length);
|
||||
-#endif /* HAVE_DH_SET_LENGTH */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_FREE
|
||||
-void RSA_meth_free(RSA_METHOD *meth);
|
||||
-#endif /* HAVE_RSA_METH_FREE */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_DUP
|
||||
-RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
|
||||
-#endif /* HAVE_RSA_METH_DUP */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET1_NAME
|
||||
-int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
|
||||
-#endif /* HAVE_RSA_METH_SET1_NAME */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_GET_FINISH
|
||||
-int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
|
||||
-#endif /* HAVE_RSA_METH_GET_FINISH */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET_PRIV_ENC
|
||||
-int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
|
||||
- const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
|
||||
-#endif /* HAVE_RSA_METH_SET_PRIV_ENC */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET_PRIV_DEC
|
||||
-int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
|
||||
- const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
|
||||
-#endif /* HAVE_RSA_METH_SET_PRIV_DEC */
|
||||
-
|
||||
-#ifndef HAVE_RSA_METH_SET_FINISH
|
||||
-int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa));
|
||||
-#endif /* HAVE_RSA_METH_SET_FINISH */
|
||||
-
|
||||
-#ifndef HAVE_EVP_PKEY_GET0_RSA
|
||||
-RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey);
|
||||
-#endif /* HAVE_EVP_PKEY_GET0_RSA */
|
||||
-
|
||||
-#ifndef HAVE_EVP_MD_CTX_new
|
||||
-EVP_MD_CTX *EVP_MD_CTX_new(void);
|
||||
-#endif /* HAVE_EVP_MD_CTX_new */
|
||||
-
|
||||
-#ifndef HAVE_EVP_MD_CTX_free
|
||||
-void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
|
||||
-#endif /* HAVE_EVP_MD_CTX_free */
|
||||
-
|
||||
#endif /* WITH_OPENSSL */
|
||||
#endif /* _OPENSSL_COMPAT_H */
|
||||
@@ -26,6 +26,8 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
|
||||
file://add-test-support-for-busybox.patch \
|
||||
file://f107467179428a0e3ea9e4aa9738ac12ff02822d.patch \
|
||||
file://0001-Default-to-not-using-sandbox-when-cross-compiling.patch \
|
||||
file://7280401bdd77ca54be6867a154cc01e0d72612e0.patch \
|
||||
file://0001-upstream-include-destination-constraints-for-smartca.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "fd497654b7ab1686dac672fb83dfb4ba4096e8b5ffcdaccd262380ae58bec5e7"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Index: openssl-3.0.4/Configure
|
||||
}
|
||||
|
||||
-if ($target =~ /linux.*-mips/ && !$disabled{asm}
|
||||
- && !grep { $_ !~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) {
|
||||
- && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) {
|
||||
- # minimally required architecture flags for assembly modules
|
||||
- my $value;
|
||||
- $value = '-mips2' if ($target =~ /mips32/);
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
From 959c59c7a0164117e7f8366466a32bb1f8d77ff1 Mon Sep 17 00:00:00 2001
|
||||
From: Pauli <pauli@openssl.org>
|
||||
Date: Wed, 8 Mar 2023 15:28:20 +1100
|
||||
Subject: [PATCH] x509: excessive resource use verifying policy constraints
|
||||
|
||||
A security vulnerability has been identified in all supported versions
|
||||
of OpenSSL related to the verification of X.509 certificate chains
|
||||
that include policy constraints. Attackers may be able to exploit this
|
||||
vulnerability by creating a malicious certificate chain that triggers
|
||||
exponential use of computational resources, leading to a denial-of-service
|
||||
(DoS) attack on affected systems.
|
||||
|
||||
Fixes CVE-2023-0464
|
||||
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
|
||||
(Merged from https://github.com/openssl/openssl/pull/20568)
|
||||
|
||||
Upstream-Status: Backport from [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=959c59c7a0164117e7f8366466a32bb1f8d77ff1]
|
||||
CVE: CVE-2023-0464
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
crypto/x509/pcy_local.h | 8 +++++++-
|
||||
crypto/x509/pcy_node.c | 12 +++++++++---
|
||||
crypto/x509/pcy_tree.c | 36 ++++++++++++++++++++++++++----------
|
||||
3 files changed, 42 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/crypto/x509/pcy_local.h b/crypto/x509/pcy_local.h
|
||||
index 18b53cc..cba107c 100644
|
||||
--- a/crypto/x509/pcy_local.h
|
||||
+++ b/crypto/x509/pcy_local.h
|
||||
@@ -111,6 +111,11 @@ struct X509_POLICY_LEVEL_st {
|
||||
};
|
||||
|
||||
struct X509_POLICY_TREE_st {
|
||||
+ /* The number of nodes in the tree */
|
||||
+ size_t node_count;
|
||||
+ /* The maximum number of nodes in the tree */
|
||||
+ size_t node_maximum;
|
||||
+
|
||||
/* This is the tree 'level' data */
|
||||
X509_POLICY_LEVEL *levels;
|
||||
int nlevel;
|
||||
@@ -157,7 +162,8 @@ X509_POLICY_NODE *ossl_policy_tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk,
|
||||
X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_DATA *data,
|
||||
X509_POLICY_NODE *parent,
|
||||
- X509_POLICY_TREE *tree);
|
||||
+ X509_POLICY_TREE *tree,
|
||||
+ int extra_data);
|
||||
void ossl_policy_node_free(X509_POLICY_NODE *node);
|
||||
int ossl_policy_node_match(const X509_POLICY_LEVEL *lvl,
|
||||
const X509_POLICY_NODE *node, const ASN1_OBJECT *oid);
|
||||
diff --git a/crypto/x509/pcy_node.c b/crypto/x509/pcy_node.c
|
||||
index 9d9a7ea..450f95a 100644
|
||||
--- a/crypto/x509/pcy_node.c
|
||||
+++ b/crypto/x509/pcy_node.c
|
||||
@@ -59,10 +59,15 @@ X509_POLICY_NODE *ossl_policy_level_find_node(const X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_DATA *data,
|
||||
X509_POLICY_NODE *parent,
|
||||
- X509_POLICY_TREE *tree)
|
||||
+ X509_POLICY_TREE *tree,
|
||||
+ int extra_data)
|
||||
{
|
||||
X509_POLICY_NODE *node;
|
||||
|
||||
+ /* Verify that the tree isn't too large. This mitigates CVE-2023-0464 */
|
||||
+ if (tree->node_maximum > 0 && tree->node_count >= tree->node_maximum)
|
||||
+ return NULL;
|
||||
+
|
||||
node = OPENSSL_zalloc(sizeof(*node));
|
||||
if (node == NULL) {
|
||||
ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE);
|
||||
@@ -70,7 +75,7 @@ X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
|
||||
}
|
||||
node->data = data;
|
||||
node->parent = parent;
|
||||
- if (level) {
|
||||
+ if (level != NULL) {
|
||||
if (OBJ_obj2nid(data->valid_policy) == NID_any_policy) {
|
||||
if (level->anyPolicy)
|
||||
goto node_error;
|
||||
@@ -90,7 +95,7 @@ X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
|
||||
}
|
||||
}
|
||||
|
||||
- if (tree) {
|
||||
+ if (extra_data) {
|
||||
if (tree->extra_data == NULL)
|
||||
tree->extra_data = sk_X509_POLICY_DATA_new_null();
|
||||
if (tree->extra_data == NULL){
|
||||
@@ -103,6 +108,7 @@ X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level,
|
||||
}
|
||||
}
|
||||
|
||||
+ tree->node_count++;
|
||||
if (parent)
|
||||
parent->nchild++;
|
||||
|
||||
diff --git a/crypto/x509/pcy_tree.c b/crypto/x509/pcy_tree.c
|
||||
index fa45da5..f953a05 100644
|
||||
--- a/crypto/x509/pcy_tree.c
|
||||
+++ b/crypto/x509/pcy_tree.c
|
||||
@@ -14,6 +14,17 @@
|
||||
|
||||
#include "pcy_local.h"
|
||||
|
||||
+/*
|
||||
+ * If the maximum number of nodes in the policy tree isn't defined, set it to
|
||||
+ * a generous default of 1000 nodes.
|
||||
+ *
|
||||
+ * Defining this to be zero means unlimited policy tree growth which opens the
|
||||
+ * door on CVE-2023-0464.
|
||||
+ */
|
||||
+#ifndef OPENSSL_POLICY_TREE_NODES_MAX
|
||||
+# define OPENSSL_POLICY_TREE_NODES_MAX 1000
|
||||
+#endif
|
||||
+
|
||||
static void expected_print(BIO *channel,
|
||||
X509_POLICY_LEVEL *lev, X509_POLICY_NODE *node,
|
||||
int indent)
|
||||
@@ -163,6 +174,9 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
|
||||
return X509_PCY_TREE_INTERNAL;
|
||||
}
|
||||
|
||||
+ /* Limit the growth of the tree to mitigate CVE-2023-0464 */
|
||||
+ tree->node_maximum = OPENSSL_POLICY_TREE_NODES_MAX;
|
||||
+
|
||||
/*
|
||||
* http://tools.ietf.org/html/rfc5280#section-6.1.2, figure 3.
|
||||
*
|
||||
@@ -180,7 +194,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
|
||||
if ((data = ossl_policy_data_new(NULL,
|
||||
OBJ_nid2obj(NID_any_policy), 0)) == NULL)
|
||||
goto bad_tree;
|
||||
- if (ossl_policy_level_add_node(level, data, NULL, tree) == NULL) {
|
||||
+ if (ossl_policy_level_add_node(level, data, NULL, tree, 1) == NULL) {
|
||||
ossl_policy_data_free(data);
|
||||
goto bad_tree;
|
||||
}
|
||||
@@ -239,7 +253,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
|
||||
* Return value: 1 on success, 0 otherwise
|
||||
*/
|
||||
static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
|
||||
- X509_POLICY_DATA *data)
|
||||
+ X509_POLICY_DATA *data,
|
||||
+ X509_POLICY_TREE *tree)
|
||||
{
|
||||
X509_POLICY_LEVEL *last = curr - 1;
|
||||
int i, matched = 0;
|
||||
@@ -249,13 +264,13 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
|
||||
X509_POLICY_NODE *node = sk_X509_POLICY_NODE_value(last->nodes, i);
|
||||
|
||||
if (ossl_policy_node_match(last, node, data->valid_policy)) {
|
||||
- if (ossl_policy_level_add_node(curr, data, node, NULL) == NULL)
|
||||
+ if (ossl_policy_level_add_node(curr, data, node, tree, 0) == NULL)
|
||||
return 0;
|
||||
matched = 1;
|
||||
}
|
||||
}
|
||||
if (!matched && last->anyPolicy) {
|
||||
- if (ossl_policy_level_add_node(curr, data, last->anyPolicy, NULL) == NULL)
|
||||
+ if (ossl_policy_level_add_node(curr, data, last->anyPolicy, tree, 0) == NULL)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -268,7 +283,8 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
|
||||
* Return value: 1 on success, 0 otherwise.
|
||||
*/
|
||||
static int tree_link_nodes(X509_POLICY_LEVEL *curr,
|
||||
- const X509_POLICY_CACHE *cache)
|
||||
+ const X509_POLICY_CACHE *cache,
|
||||
+ X509_POLICY_TREE *tree)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -276,7 +292,7 @@ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
|
||||
X509_POLICY_DATA *data = sk_X509_POLICY_DATA_value(cache->data, i);
|
||||
|
||||
/* Look for matching nodes in previous level */
|
||||
- if (!tree_link_matching_nodes(curr, data))
|
||||
+ if (!tree_link_matching_nodes(curr, data, tree))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -307,7 +323,7 @@ static int tree_add_unmatched(X509_POLICY_LEVEL *curr,
|
||||
/* Curr may not have anyPolicy */
|
||||
data->qualifier_set = cache->anyPolicy->qualifier_set;
|
||||
data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS;
|
||||
- if (ossl_policy_level_add_node(curr, data, node, tree) == NULL) {
|
||||
+ if (ossl_policy_level_add_node(curr, data, node, tree, 1) == NULL) {
|
||||
ossl_policy_data_free(data);
|
||||
return 0;
|
||||
}
|
||||
@@ -370,7 +386,7 @@ static int tree_link_any(X509_POLICY_LEVEL *curr,
|
||||
/* Finally add link to anyPolicy */
|
||||
if (last->anyPolicy &&
|
||||
ossl_policy_level_add_node(curr, cache->anyPolicy,
|
||||
- last->anyPolicy, NULL) == NULL)
|
||||
+ last->anyPolicy, tree, 0) == NULL)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
@@ -553,7 +569,7 @@ static int tree_calculate_user_set(X509_POLICY_TREE *tree,
|
||||
extra->flags = POLICY_DATA_FLAG_SHARED_QUALIFIERS
|
||||
| POLICY_DATA_FLAG_EXTRA_NODE;
|
||||
node = ossl_policy_level_add_node(NULL, extra, anyPolicy->parent,
|
||||
- tree);
|
||||
+ tree, 1);
|
||||
}
|
||||
if (!tree->user_policies) {
|
||||
tree->user_policies = sk_X509_POLICY_NODE_new_null();
|
||||
@@ -580,7 +596,7 @@ static int tree_evaluate(X509_POLICY_TREE *tree)
|
||||
|
||||
for (i = 1; i < tree->nlevel; i++, curr++) {
|
||||
cache = ossl_policy_cache_set(curr->cert);
|
||||
- if (!tree_link_nodes(curr, cache))
|
||||
+ if (!tree_link_nodes(curr, cache, tree))
|
||||
return X509_PCY_TREE_INTERNAL;
|
||||
|
||||
if (!(curr->flags & X509_V_FLAG_INHIBIT_ANY)
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
From 1dd43e0709fece299b15208f36cc7c76209ba0bb Mon Sep 17 00:00:00 2001
|
||||
From: Matt Caswell <matt@openssl.org>
|
||||
Date: Tue, 7 Mar 2023 16:52:55 +0000
|
||||
Subject: [PATCH] Ensure that EXFLAG_INVALID_POLICY is checked even in leaf
|
||||
certs
|
||||
|
||||
Even though we check the leaf cert to confirm it is valid, we
|
||||
later ignored the invalid flag and did not notice that the leaf
|
||||
cert was bad.
|
||||
|
||||
Fixes: CVE-2023-0465
|
||||
|
||||
Reviewed-by: Hugo Landau <hlandau@openssl.org>
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/20587)
|
||||
|
||||
Upstream-Status: Backport from [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1dd43e0709fece299b15208f36cc7c76209ba0bb]
|
||||
CVE: CVE-2023-0465
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
crypto/x509/x509_vfy.c | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
|
||||
index 9384f1d..a0282c3 100644
|
||||
--- a/crypto/x509/x509_vfy.c
|
||||
+++ b/crypto/x509/x509_vfy.c
|
||||
@@ -1654,15 +1654,23 @@ static int check_policy(X509_STORE_CTX *ctx)
|
||||
goto memerr;
|
||||
/* Invalid or inconsistent extensions */
|
||||
if (ret == X509_PCY_TREE_INVALID) {
|
||||
- int i;
|
||||
+ int i, cbcalled = 0;
|
||||
|
||||
/* Locate certificates with bad extensions and notify callback. */
|
||||
- for (i = 1; i < sk_X509_num(ctx->chain); i++) {
|
||||
+ for (i = 0; i < sk_X509_num(ctx->chain); i++) {
|
||||
X509 *x = sk_X509_value(ctx->chain, i);
|
||||
|
||||
+ if ((x->ex_flags & EXFLAG_INVALID_POLICY) != 0)
|
||||
+ cbcalled = 1;
|
||||
CB_FAIL_IF((x->ex_flags & EXFLAG_INVALID_POLICY) != 0,
|
||||
ctx, x, i, X509_V_ERR_INVALID_POLICY_EXTENSION);
|
||||
}
|
||||
+ if (!cbcalled) {
|
||||
+ /* Should not be able to get here */
|
||||
+ ERR_raise(ERR_LIB_X509, ERR_R_INTERNAL_ERROR);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* The callback ignored the error so we return success */
|
||||
return 1;
|
||||
}
|
||||
if (ret == X509_PCY_TREE_FAILURE) {
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
From 51e8a84ce742db0f6c70510d0159dad8f7825908 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Mraz <tomas@openssl.org>
|
||||
Date: Tue, 21 Mar 2023 16:15:47 +0100
|
||||
Subject: [PATCH] Fix documentation of X509_VERIFY_PARAM_add0_policy()
|
||||
|
||||
The function was incorrectly documented as enabling policy checking.
|
||||
|
||||
Fixes: CVE-2023-0466
|
||||
|
||||
Reviewed-by: Matt Caswell <matt@openssl.org>
|
||||
Reviewed-by: Paul Dale <pauli@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/20563)
|
||||
|
||||
Upstream-Status: Backport from [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=51e8a84ce742db0f6c70510d0159dad8f7825908]
|
||||
CVE: CVE-2023-0466
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
doc/man3/X509_VERIFY_PARAM_set_flags.pod | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/doc/man3/X509_VERIFY_PARAM_set_flags.pod b/doc/man3/X509_VERIFY_PARAM_set_flags.pod
|
||||
index 75a1677..43c1900 100644
|
||||
--- a/doc/man3/X509_VERIFY_PARAM_set_flags.pod
|
||||
+++ b/doc/man3/X509_VERIFY_PARAM_set_flags.pod
|
||||
@@ -98,8 +98,9 @@ B<trust>.
|
||||
X509_VERIFY_PARAM_set_time() sets the verification time in B<param> to
|
||||
B<t>. Normally the current time is used.
|
||||
|
||||
-X509_VERIFY_PARAM_add0_policy() enables policy checking (it is disabled
|
||||
-by default) and adds B<policy> to the acceptable policy set.
|
||||
+X509_VERIFY_PARAM_add0_policy() adds B<policy> to the acceptable policy set.
|
||||
+Contrary to preexisting documentation of this function it does not enable
|
||||
+policy checking.
|
||||
|
||||
X509_VERIFY_PARAM_set1_policies() enables policy checking (it is disabled
|
||||
by default) and sets the acceptable policy set to B<policies>. Any existing
|
||||
@@ -400,6 +401,10 @@ The X509_VERIFY_PARAM_get_hostflags() function was added in OpenSSL 1.1.0i.
|
||||
The X509_VERIFY_PARAM_get0_host(), X509_VERIFY_PARAM_get0_email(),
|
||||
and X509_VERIFY_PARAM_get1_ip_asc() functions were added in OpenSSL 3.0.
|
||||
|
||||
+The function X509_VERIFY_PARAM_add0_policy() was historically documented as
|
||||
+enabling policy checking however the implementation has never done this.
|
||||
+The documentation was changed to align with the implementation.
|
||||
+
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright 2009-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -12,16 +12,13 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
|
||||
file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
|
||||
file://afalg.patch \
|
||||
file://0001-Configure-do-not-tweak-mips-cflags.patch \
|
||||
file://CVE-2023-0464.patch \
|
||||
file://CVE-2023-0465.patch \
|
||||
file://CVE-2023-0466.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-nativesdk = " \
|
||||
file://environment.d-openssl.sh \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e"
|
||||
SRC_URI[sha256sum] = "eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90"
|
||||
|
||||
inherit lib_package multilib_header multilib_script ptest perlnative
|
||||
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
|
||||
@@ -1,6 +1,6 @@
|
||||
SRCBRANCH ?= "release/2.35/master"
|
||||
PV = "2.35"
|
||||
SRCREV_glibc ?= "1c7f51c75ae300fe52ccb636e71b8e28cb20824c"
|
||||
SRCREV_glibc ?= "cbceb903c4d770acc7e4ba5641036516830ed69b"
|
||||
SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87"
|
||||
|
||||
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
From 952aff5c00ad7c6b83c3f310f2643939538827f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?=
|
||||
=?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= <leo@yuriev.ru>
|
||||
Date: Sat, 4 Feb 2023 14:41:38 +0300
|
||||
Subject: [PATCH] gmon: Fix allocated buffer overflow (bug 29444)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The `__monstartup()` allocates a buffer used to store all the data
|
||||
accumulated by the monitor.
|
||||
|
||||
The size of this buffer depends on the size of the internal structures
|
||||
used and the address range for which the monitor is activated, as well
|
||||
as on the maximum density of call instructions and/or callable functions
|
||||
that could be potentially on a segment of executable code.
|
||||
|
||||
In particular a hash table of arcs is placed at the end of this buffer.
|
||||
The size of this hash table is calculated in bytes as
|
||||
p->fromssize = p->textsize / HASHFRACTION;
|
||||
|
||||
but actually should be
|
||||
p->fromssize = ROUNDUP(p->textsize / HASHFRACTION, sizeof(*p->froms));
|
||||
|
||||
This results in writing beyond the end of the allocated buffer when an
|
||||
added arc corresponds to a call near from the end of the monitored
|
||||
address range, since `_mcount()` check the incoming caller address for
|
||||
monitored range but not the intermediate result hash-like index that
|
||||
uses to write into the table.
|
||||
|
||||
It should be noted that when the results are output to `gmon.out`, the
|
||||
table is read to the last element calculated from the allocated size in
|
||||
bytes, so the arcs stored outside the buffer boundary did not fall into
|
||||
`gprof` for analysis. Thus this "feature" help me to found this bug
|
||||
during working with https://sourceware.org/bugzilla/show_bug.cgi?id=29438
|
||||
|
||||
Just in case, I will explicitly note that the problem breaks the
|
||||
`make test t=gmon/tst-gmon-dso` added for Bug 29438.
|
||||
There, the arc of the `f3()` call disappears from the output, since in
|
||||
the DSO case, the call to `f3` is located close to the end of the
|
||||
monitored range.
|
||||
|
||||
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||
|
||||
Another minor error seems a related typo in the calculation of
|
||||
`kcountsize`, but since kcounts are smaller than froms, this is
|
||||
actually to align the p->froms data.
|
||||
|
||||
Co-authored-by: DJ Delorie <dj@redhat.com>
|
||||
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=801af9fafd4689337ebf27260aa115335a0cb2bc]
|
||||
CVE: CVE-2023-0687
|
||||
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
|
||||
---
|
||||
gmon/gmon.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gmon/gmon.c b/gmon/gmon.c
|
||||
index dee6480..bf76358 100644
|
||||
--- a/gmon/gmon.c
|
||||
+++ b/gmon/gmon.c
|
||||
@@ -132,6 +132,8 @@ __monstartup (u_long lowpc, u_long highpc)
|
||||
p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));
|
||||
p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));
|
||||
p->textsize = p->highpc - p->lowpc;
|
||||
+ /* This looks like a typo, but it's here to align the p->froms
|
||||
+ section. */
|
||||
p->kcountsize = ROUNDUP(p->textsize / HISTFRACTION, sizeof(*p->froms));
|
||||
p->hashfraction = HASHFRACTION;
|
||||
p->log_hashfraction = -1;
|
||||
@@ -142,7 +144,7 @@ __monstartup (u_long lowpc, u_long highpc)
|
||||
instead of integer division. Precompute shift amount. */
|
||||
p->log_hashfraction = ffs(p->hashfraction * sizeof(*p->froms)) - 1;
|
||||
}
|
||||
- p->fromssize = p->textsize / HASHFRACTION;
|
||||
+ p->fromssize = ROUNDUP(p->textsize / HASHFRACTION, sizeof(*p->froms));
|
||||
p->tolimit = p->textsize * ARCDENSITY / 100;
|
||||
if (p->tolimit < MINARCS)
|
||||
p->tolimit = MINARCS;
|
||||
--
|
||||
2.7.4
|
||||
@@ -50,7 +50,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
|
||||
file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \
|
||||
\
|
||||
file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \
|
||||
file://CVE-2023-0687.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${WORKDIR}/build-${TARGET_SYS}"
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "133d542a70d0e78390100b4e52a3d440a6b5b750"
|
||||
SRCREV ?= "5ded548a1e70d000f6c91f18082bbe996189db57"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=kirkstone \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
334
meta/recipes-core/meta/cve-update-nvd2-native.bb
Normal file
334
meta/recipes-core/meta/cve-update-nvd2-native.bb
Normal file
@@ -0,0 +1,334 @@
|
||||
SUMMARY = "Updates the NVD CVE database"
|
||||
LICENSE = "MIT"
|
||||
|
||||
# Important note:
|
||||
# This product uses the NVD API but is not endorsed or certified by the NVD.
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
inherit native
|
||||
|
||||
deltask do_unpack
|
||||
deltask do_patch
|
||||
deltask do_configure
|
||||
deltask do_compile
|
||||
deltask do_install
|
||||
deltask do_populate_sysroot
|
||||
|
||||
NVDCVE_URL ?= "https://services.nvd.nist.gov/rest/json/cves/2.0"
|
||||
|
||||
# CVE database update interval, in seconds. By default: once a day (24*60*60).
|
||||
# Use 0 to force the update
|
||||
# Use a negative value to skip the update
|
||||
CVE_DB_UPDATE_INTERVAL ?= "86400"
|
||||
|
||||
# Timeout for blocking socket operations, such as the connection attempt.
|
||||
CVE_SOCKET_TIMEOUT ?= "60"
|
||||
|
||||
CVE_DB_TEMP_FILE ?= "${CVE_CHECK_DB_DIR}/temp_nvdcve_2.db"
|
||||
|
||||
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2.db"
|
||||
|
||||
python () {
|
||||
if not bb.data.inherits_class("cve-check", d):
|
||||
raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
|
||||
}
|
||||
|
||||
python do_fetch() {
|
||||
"""
|
||||
Update NVD database with API 2.0
|
||||
"""
|
||||
import bb.utils
|
||||
import bb.progress
|
||||
import shutil
|
||||
|
||||
bb.utils.export_proxies(d)
|
||||
|
||||
db_file = d.getVar("CVE_CHECK_DB_FILE")
|
||||
db_dir = os.path.dirname(db_file)
|
||||
db_tmp_file = d.getVar("CVE_DB_TEMP_FILE")
|
||||
|
||||
cleanup_db_download(db_file, db_tmp_file)
|
||||
# By default let's update the whole database (since time 0)
|
||||
database_time = 0
|
||||
|
||||
# The NVD database changes once a day, so no need to update more frequently
|
||||
# Allow the user to force-update
|
||||
try:
|
||||
import time
|
||||
update_interval = int(d.getVar("CVE_DB_UPDATE_INTERVAL"))
|
||||
if update_interval < 0:
|
||||
bb.note("CVE database update skipped")
|
||||
return
|
||||
if time.time() - os.path.getmtime(db_file) < update_interval:
|
||||
bb.note("CVE database recently updated, skipping")
|
||||
return
|
||||
database_time = os.path.getmtime(db_file)
|
||||
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
bb.utils.mkdirhier(db_dir)
|
||||
if os.path.exists(db_file):
|
||||
shutil.copy2(db_file, db_tmp_file)
|
||||
|
||||
if update_db_file(db_tmp_file, d, database_time) == True:
|
||||
# Update downloaded correctly, can swap files
|
||||
shutil.move(db_tmp_file, db_file)
|
||||
else:
|
||||
# Update failed, do not modify the database
|
||||
bb.warn("CVE database update failed")
|
||||
os.remove(db_tmp_file)
|
||||
}
|
||||
|
||||
do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}"
|
||||
do_fetch[file-checksums] = ""
|
||||
do_fetch[vardeps] = ""
|
||||
|
||||
def cleanup_db_download(db_file, db_tmp_file):
|
||||
"""
|
||||
Cleanup the download space from possible failed downloads
|
||||
"""
|
||||
|
||||
# Clean up the updates done on the main file
|
||||
# Remove it only if a journal file exists - it means a complete re-download
|
||||
if os.path.exists("{0}-journal".format(db_file)):
|
||||
# If a journal is present the last update might have been interrupted. In that case,
|
||||
# just wipe any leftovers and force the DB to be recreated.
|
||||
os.remove("{0}-journal".format(db_file))
|
||||
|
||||
if os.path.exists(db_file):
|
||||
os.remove(db_file)
|
||||
|
||||
# Clean-up the temporary file downloads, we can remove both journal
|
||||
# and the temporary database
|
||||
if os.path.exists("{0}-journal".format(db_tmp_file)):
|
||||
# If a journal is present the last update might have been interrupted. In that case,
|
||||
# just wipe any leftovers and force the DB to be recreated.
|
||||
os.remove("{0}-journal".format(db_tmp_file))
|
||||
|
||||
if os.path.exists(db_tmp_file):
|
||||
os.remove(db_tmp_file)
|
||||
|
||||
def nvd_request_next(url, api_key, args):
|
||||
"""
|
||||
Request next part of the NVD dabase
|
||||
"""
|
||||
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import gzip
|
||||
import http
|
||||
|
||||
headers = {}
|
||||
if api_key:
|
||||
headers['apiKey'] = api_key
|
||||
|
||||
data = urllib.parse.urlencode(args)
|
||||
|
||||
full_request = url + '?' + data
|
||||
|
||||
for attempt in range(3):
|
||||
try:
|
||||
r = urllib.request.urlopen(full_request)
|
||||
|
||||
if (r.headers['content-encoding'] == 'gzip'):
|
||||
buf = r.read()
|
||||
raw_data = gzip.decompress(buf)
|
||||
else:
|
||||
raw_data = r.read().decode("utf-8")
|
||||
|
||||
r.close()
|
||||
|
||||
except UnicodeDecodeError:
|
||||
# Received garbage, retry
|
||||
bb.debug(2, "CVE database: received malformed data, retrying (request: %s)" %(full_request))
|
||||
pass
|
||||
except http.client.IncompleteRead:
|
||||
# Read incomplete, let's try again
|
||||
bb.debug(2, "CVE database: received incomplete data, retrying (request: %s)" %(full_request))
|
||||
pass
|
||||
else:
|
||||
return raw_data
|
||||
else:
|
||||
# We failed at all attempts
|
||||
return None
|
||||
|
||||
def update_db_file(db_tmp_file, d, database_time):
|
||||
"""
|
||||
Update the given database file
|
||||
"""
|
||||
import bb.utils, bb.progress
|
||||
import datetime
|
||||
import sqlite3
|
||||
import json
|
||||
|
||||
# Connect to database
|
||||
conn = sqlite3.connect(db_tmp_file)
|
||||
initialize_db(conn)
|
||||
|
||||
req_args = {'startIndex' : 0}
|
||||
|
||||
# The maximum range for time is 120 days
|
||||
# Force a complete update if our range is longer
|
||||
if (database_time != 0):
|
||||
database_date = datetime.datetime.combine(datetime.date.fromtimestamp(database_time), datetime.time())
|
||||
today_date = datetime.datetime.combine(datetime.date.today(), datetime.time())
|
||||
delta = today_date - database_date
|
||||
if delta.days < 120:
|
||||
bb.debug(2, "CVE database: performing partial update")
|
||||
req_args['lastModStartDate'] = database_date.isoformat()
|
||||
req_args['lastModEndDate'] = today_date.isoformat()
|
||||
else:
|
||||
bb.note("CVE database: file too old, forcing a full update")
|
||||
|
||||
with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f:
|
||||
|
||||
bb.debug(2, "Updating entries")
|
||||
index = 0
|
||||
url = d.getVar("NVDCVE_URL")
|
||||
while True:
|
||||
req_args['startIndex'] = index
|
||||
raw_data = nvd_request_next(url, None, req_args)
|
||||
if raw_data is None:
|
||||
# We haven't managed to download data
|
||||
return False
|
||||
|
||||
data = json.loads(raw_data)
|
||||
|
||||
index = data["startIndex"]
|
||||
total = data["totalResults"]
|
||||
per_page = data["resultsPerPage"]
|
||||
|
||||
for cve in data["vulnerabilities"]:
|
||||
update_db(conn, cve)
|
||||
|
||||
index += per_page
|
||||
ph.update((float(index) / (total+1)) * 100)
|
||||
if index >= total:
|
||||
break
|
||||
|
||||
# Recommended by NVD
|
||||
time.sleep(6)
|
||||
|
||||
# Update success, set the date to cve_check file.
|
||||
cve_f.write('CVE database update : %s\n\n' % datetime.date.today())
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
return True
|
||||
|
||||
def initialize_db(conn):
|
||||
with conn:
|
||||
c = conn.cursor()
|
||||
|
||||
c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)")
|
||||
|
||||
c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \
|
||||
SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)")
|
||||
|
||||
c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \
|
||||
VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \
|
||||
VERSION_END TEXT, OPERATOR_END TEXT)")
|
||||
c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_ID_IDX on PRODUCTS(ID);")
|
||||
|
||||
c.close()
|
||||
|
||||
def parse_node_and_insert(conn, node, cveId):
|
||||
|
||||
def cpe_generator():
|
||||
for cpe in node.get('cpeMatch', ()):
|
||||
if not cpe['vulnerable']:
|
||||
return
|
||||
cpe23 = cpe.get('criteria')
|
||||
if not cpe23:
|
||||
return
|
||||
cpe23 = cpe23.split(':')
|
||||
if len(cpe23) < 6:
|
||||
return
|
||||
vendor = cpe23[3]
|
||||
product = cpe23[4]
|
||||
version = cpe23[5]
|
||||
|
||||
if cpe23[6] == '*' or cpe23[6] == '-':
|
||||
version_suffix = ""
|
||||
else:
|
||||
version_suffix = "_" + cpe23[6]
|
||||
|
||||
if version != '*' and version != '-':
|
||||
# Version is defined, this is a '=' match
|
||||
yield [cveId, vendor, product, version + version_suffix, '=', '', '']
|
||||
elif version == '-':
|
||||
# no version information is available
|
||||
yield [cveId, vendor, product, version, '', '', '']
|
||||
else:
|
||||
# Parse start version, end version and operators
|
||||
op_start = ''
|
||||
op_end = ''
|
||||
v_start = ''
|
||||
v_end = ''
|
||||
|
||||
if 'versionStartIncluding' in cpe:
|
||||
op_start = '>='
|
||||
v_start = cpe['versionStartIncluding']
|
||||
|
||||
if 'versionStartExcluding' in cpe:
|
||||
op_start = '>'
|
||||
v_start = cpe['versionStartExcluding']
|
||||
|
||||
if 'versionEndIncluding' in cpe:
|
||||
op_end = '<='
|
||||
v_end = cpe['versionEndIncluding']
|
||||
|
||||
if 'versionEndExcluding' in cpe:
|
||||
op_end = '<'
|
||||
v_end = cpe['versionEndExcluding']
|
||||
|
||||
if op_start or op_end or v_start or v_end:
|
||||
yield [cveId, vendor, product, v_start, op_start, v_end, op_end]
|
||||
else:
|
||||
# This is no version information, expressed differently.
|
||||
# Save processing by representing as -.
|
||||
yield [cveId, vendor, product, '-', '', '', '']
|
||||
|
||||
conn.executemany("insert into PRODUCTS values (?, ?, ?, ?, ?, ?, ?)", cpe_generator()).close()
|
||||
|
||||
def update_db(conn, elt):
|
||||
"""
|
||||
Update a single entry in the on-disk database
|
||||
"""
|
||||
|
||||
accessVector = None
|
||||
cveId = elt['cve']['id']
|
||||
if elt['cve']['vulnStatus'] == "Rejected":
|
||||
return
|
||||
cveDesc = ""
|
||||
for desc in elt['cve']['descriptions']:
|
||||
if desc['lang'] == 'en':
|
||||
cveDesc = desc['value']
|
||||
date = elt['cve']['lastModified']
|
||||
try:
|
||||
accessVector = elt['cve']['metrics']['cvssMetricV2'][0]['cvssData']['accessVector']
|
||||
cvssv2 = elt['cve']['metrics']['cvssMetricV2'][0]['cvssData']['baseScore']
|
||||
except KeyError:
|
||||
cvssv2 = 0.0
|
||||
try:
|
||||
accessVector = accessVector or elt['impact']['baseMetricV3']['cvssV3']['attackVector']
|
||||
cvssv3 = elt['impact']['baseMetricV3']['cvssV3']['baseScore']
|
||||
except KeyError:
|
||||
accessVector = accessVector or "UNKNOWN"
|
||||
cvssv3 = 0.0
|
||||
|
||||
conn.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)",
|
||||
[cveId, cveDesc, cvssv2, cvssv3, date, accessVector]).close()
|
||||
|
||||
try:
|
||||
configurations = elt['cve']['configurations'][0]['nodes']
|
||||
for config in configurations:
|
||||
parse_node_and_insert(conn, config, cveId)
|
||||
except KeyError:
|
||||
bb.debug(2, "Entry without a configuration")
|
||||
|
||||
do_fetch[nostamp] = "1"
|
||||
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
@@ -184,12 +184,14 @@ class SystemdUnit():
|
||||
|
||||
raise SystemdUnitNotFoundError(self.root, unit)
|
||||
|
||||
def _process_deps(self, config, service, location, prop, dirstem):
|
||||
def _process_deps(self, config, service, location, prop, dirstem, instance):
|
||||
systemdir = self.root / SYSCONFDIR / "systemd" / "system"
|
||||
|
||||
target = ROOT / location.relative_to(self.root)
|
||||
try:
|
||||
for dependent in config.get('Install', prop):
|
||||
# expand any %i to instance (ignoring escape sequence %%)
|
||||
dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent)
|
||||
wants = systemdir / "{}.{}".format(dependent, dirstem) / service
|
||||
add_link(wants, target)
|
||||
|
||||
@@ -229,8 +231,8 @@ class SystemdUnit():
|
||||
else:
|
||||
service = self.unit
|
||||
|
||||
self._process_deps(config, service, path, 'WantedBy', 'wants')
|
||||
self._process_deps(config, service, path, 'RequiredBy', 'requires')
|
||||
self._process_deps(config, service, path, 'WantedBy', 'wants', instance)
|
||||
self._process_deps(config, service, path, 'RequiredBy', 'requires', instance)
|
||||
|
||||
try:
|
||||
for also in config.get('Install', 'Also'):
|
||||
|
||||
@@ -0,0 +1,358 @@
|
||||
From 31b25c7d360a2ef2da1717aa39f190de5222d11a Mon Sep 17 00:00:00 2001
|
||||
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Date: Mon, 31 Jan 2022 19:08:27 +0900
|
||||
Subject: [PATCH] network: remove only managed configs on reconfigure or
|
||||
carrier lost
|
||||
|
||||
Otherwise, if the carrir of the non-managed interface is lost, the
|
||||
configs such as addresses or routes on the interface will be removed by
|
||||
networkd.
|
||||
|
||||
Upstream-Status: Backport [systemd v251 a0e99a377a2f22c0ba460d3e7228214008714c14]
|
||||
Signed-off-by: C. Andy Martin <cam@myfastmail.com>
|
||||
---
|
||||
src/network/networkd-address.c | 13 +++++--------
|
||||
src/network/networkd-address.h | 2 +-
|
||||
src/network/networkd-link.c | 18 ++++++++++--------
|
||||
src/network/networkd-neighbor.c | 6 +++++-
|
||||
src/network/networkd-neighbor.h | 2 +-
|
||||
src/network/networkd-nexthop.c | 16 ++++++++++------
|
||||
src/network/networkd-nexthop.h | 2 +-
|
||||
src/network/networkd-route.c | 16 ++++++++++------
|
||||
src/network/networkd-route.h | 2 +-
|
||||
src/network/networkd-routing-policy-rule.c | 4 ++--
|
||||
src/network/networkd-routing-policy-rule.h | 2 +-
|
||||
test/test-network/systemd-networkd-tests.py | 2 +-
|
||||
12 files changed, 48 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
|
||||
index 7df743efb5..01c1d88dec 100644
|
||||
--- a/src/network/networkd-address.c
|
||||
+++ b/src/network/networkd-address.c
|
||||
@@ -891,22 +891,19 @@ int link_drop_foreign_addresses(Link *link) {
|
||||
return r;
|
||||
}
|
||||
|
||||
-int link_drop_addresses(Link *link) {
|
||||
+int link_drop_managed_addresses(Link *link) {
|
||||
Address *address;
|
||||
int k, r = 0;
|
||||
|
||||
assert(link);
|
||||
|
||||
SET_FOREACH(address, link->addresses) {
|
||||
- /* Ignore addresses not assigned yet or already removing. */
|
||||
- if (!address_exists(address))
|
||||
+ /* Do not touch addresses managed by kernel or other tools. */
|
||||
+ if (address->source == NETWORK_CONFIG_SOURCE_FOREIGN)
|
||||
continue;
|
||||
|
||||
- /* Do not drop IPv6LL addresses assigned by the kernel here. They will be dropped in
|
||||
- * link_drop_ipv6ll_addresses() if IPv6LL addressing is disabled. */
|
||||
- if (address->source == NETWORK_CONFIG_SOURCE_FOREIGN &&
|
||||
- address->family == AF_INET6 &&
|
||||
- in6_addr_is_link_local(&address->in_addr.in6))
|
||||
+ /* Ignore addresses not assigned yet or already removing. */
|
||||
+ if (!address_exists(address))
|
||||
continue;
|
||||
|
||||
k = address_remove(address);
|
||||
diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h
|
||||
index 41c4ce6fa4..b2110d8d21 100644
|
||||
--- a/src/network/networkd-address.h
|
||||
+++ b/src/network/networkd-address.h
|
||||
@@ -74,7 +74,7 @@ void address_set_broadcast(Address *a);
|
||||
|
||||
DEFINE_NETWORK_SECTION_FUNCTIONS(Address, address_free);
|
||||
|
||||
-int link_drop_addresses(Link *link);
|
||||
+int link_drop_managed_addresses(Link *link);
|
||||
int link_drop_foreign_addresses(Link *link);
|
||||
int link_drop_ipv6ll_addresses(Link *link);
|
||||
void link_foreignize_addresses(Link *link);
|
||||
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
|
||||
index b62a154828..12c592b257 100644
|
||||
--- a/src/network/networkd-link.c
|
||||
+++ b/src/network/networkd-link.c
|
||||
@@ -1070,27 +1070,27 @@ static int link_drop_foreign_config(Link *link) {
|
||||
return r;
|
||||
}
|
||||
|
||||
-static int link_drop_config(Link *link) {
|
||||
+static int link_drop_managed_config(Link *link) {
|
||||
int k, r;
|
||||
|
||||
assert(link);
|
||||
assert(link->manager);
|
||||
|
||||
- r = link_drop_routes(link);
|
||||
+ r = link_drop_managed_routes(link);
|
||||
|
||||
- k = link_drop_nexthops(link);
|
||||
+ k = link_drop_managed_nexthops(link);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
- k = link_drop_addresses(link);
|
||||
+ k = link_drop_managed_addresses(link);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
- k = link_drop_neighbors(link);
|
||||
+ k = link_drop_managed_neighbors(link);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
- k = link_drop_routing_policy_rules(link);
|
||||
+ k = link_drop_managed_routing_policy_rules(link);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
@@ -1318,7 +1318,9 @@ static int link_reconfigure_impl(Link *link, bool force) {
|
||||
* link_drop_foreign_config() in link_configure(). */
|
||||
link_foreignize_config(link);
|
||||
else {
|
||||
- r = link_drop_config(link);
|
||||
+ /* Remove all managed configs. Note, foreign configs are removed in later by
|
||||
+ * link_configure() -> link_drop_foreign_config() if the link is managed by us. */
|
||||
+ r = link_drop_managed_config(link);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
@@ -1705,7 +1707,7 @@ static int link_carrier_lost_impl(Link *link) {
|
||||
if (r < 0)
|
||||
ret = r;
|
||||
|
||||
- r = link_drop_config(link);
|
||||
+ r = link_drop_managed_config(link);
|
||||
if (r < 0 && ret >= 0)
|
||||
ret = r;
|
||||
|
||||
diff --git a/src/network/networkd-neighbor.c b/src/network/networkd-neighbor.c
|
||||
index 1766095e53..b58898a6dc 100644
|
||||
--- a/src/network/networkd-neighbor.c
|
||||
+++ b/src/network/networkd-neighbor.c
|
||||
@@ -406,13 +406,17 @@ int link_drop_foreign_neighbors(Link *link) {
|
||||
return r;
|
||||
}
|
||||
|
||||
-int link_drop_neighbors(Link *link) {
|
||||
+int link_drop_managed_neighbors(Link *link) {
|
||||
Neighbor *neighbor;
|
||||
int k, r = 0;
|
||||
|
||||
assert(link);
|
||||
|
||||
SET_FOREACH(neighbor, link->neighbors) {
|
||||
+ /* Do not touch nexthops managed by kernel or other tools. */
|
||||
+ if (neighbor->source == NETWORK_CONFIG_SOURCE_FOREIGN)
|
||||
+ continue;
|
||||
+
|
||||
/* Ignore neighbors not assigned yet or already removing. */
|
||||
if (!neighbor_exists(neighbor))
|
||||
continue;
|
||||
diff --git a/src/network/networkd-neighbor.h b/src/network/networkd-neighbor.h
|
||||
index e9e1854110..8e3c510cd5 100644
|
||||
--- a/src/network/networkd-neighbor.h
|
||||
+++ b/src/network/networkd-neighbor.h
|
||||
@@ -34,7 +34,7 @@ int neighbor_compare_func(const Neighbor *a, const Neighbor *b);
|
||||
|
||||
void network_drop_invalid_neighbors(Network *network);
|
||||
|
||||
-int link_drop_neighbors(Link *link);
|
||||
+int link_drop_managed_neighbors(Link *link);
|
||||
int link_drop_foreign_neighbors(Link *link);
|
||||
void link_foreignize_neighbors(Link *link);
|
||||
|
||||
diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c
|
||||
index b829aaab90..42aa8c4c59 100644
|
||||
--- a/src/network/networkd-nexthop.c
|
||||
+++ b/src/network/networkd-nexthop.c
|
||||
@@ -613,8 +613,8 @@ static void manager_mark_nexthops(Manager *manager, bool foreign, const Link *ex
|
||||
if (nexthop->protocol == RTPROT_KERNEL)
|
||||
continue;
|
||||
|
||||
- /* When 'foreign' is true, do not remove nexthops we configured. */
|
||||
- if (foreign && nexthop->source != NETWORK_CONFIG_SOURCE_FOREIGN)
|
||||
+ /* When 'foreign' is true, mark only foreign nexthops, and vice versa. */
|
||||
+ if (foreign != (nexthop->source == NETWORK_CONFIG_SOURCE_FOREIGN))
|
||||
continue;
|
||||
|
||||
/* Ignore nexthops not assigned yet or already removed. */
|
||||
@@ -641,7 +641,7 @@ static void manager_mark_nexthops(Manager *manager, bool foreign, const Link *ex
|
||||
}
|
||||
}
|
||||
|
||||
-static int manager_drop_nexthops(Manager *manager) {
|
||||
+static int manager_drop_marked_nexthops(Manager *manager) {
|
||||
NextHop *nexthop;
|
||||
int k, r = 0;
|
||||
|
||||
@@ -704,14 +704,14 @@ int link_drop_foreign_nexthops(Link *link) {
|
||||
|
||||
manager_mark_nexthops(link->manager, /* foreign = */ true, NULL);
|
||||
|
||||
- k = manager_drop_nexthops(link->manager);
|
||||
+ k = manager_drop_marked_nexthops(link->manager);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
-int link_drop_nexthops(Link *link) {
|
||||
+int link_drop_managed_nexthops(Link *link) {
|
||||
NextHop *nexthop;
|
||||
int k, r = 0;
|
||||
|
||||
@@ -723,6 +723,10 @@ int link_drop_nexthops(Link *link) {
|
||||
if (nexthop->protocol == RTPROT_KERNEL)
|
||||
continue;
|
||||
|
||||
+ /* Do not touch addresses managed by kernel or other tools. */
|
||||
+ if (nexthop->source == NETWORK_CONFIG_SOURCE_FOREIGN)
|
||||
+ continue;
|
||||
+
|
||||
/* Ignore nexthops not assigned yet or already removing. */
|
||||
if (!nexthop_exists(nexthop))
|
||||
continue;
|
||||
@@ -734,7 +738,7 @@ int link_drop_nexthops(Link *link) {
|
||||
|
||||
manager_mark_nexthops(link->manager, /* foreign = */ false, link);
|
||||
|
||||
- k = manager_drop_nexthops(link->manager);
|
||||
+ k = manager_drop_marked_nexthops(link->manager);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
diff --git a/src/network/networkd-nexthop.h b/src/network/networkd-nexthop.h
|
||||
index 7a8920238c..1e54e9f211 100644
|
||||
--- a/src/network/networkd-nexthop.h
|
||||
+++ b/src/network/networkd-nexthop.h
|
||||
@@ -44,7 +44,7 @@ int nexthop_compare_func(const NextHop *a, const NextHop *b);
|
||||
|
||||
void network_drop_invalid_nexthops(Network *network);
|
||||
|
||||
-int link_drop_nexthops(Link *link);
|
||||
+int link_drop_managed_nexthops(Link *link);
|
||||
int link_drop_foreign_nexthops(Link *link);
|
||||
void link_foreignize_nexthops(Link *link);
|
||||
|
||||
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
|
||||
index ee7a535075..7e6fe8bc11 100644
|
||||
--- a/src/network/networkd-route.c
|
||||
+++ b/src/network/networkd-route.c
|
||||
@@ -788,8 +788,8 @@ static void manager_mark_routes(Manager *manager, bool foreign, const Link *exce
|
||||
if (route->protocol == RTPROT_KERNEL)
|
||||
continue;
|
||||
|
||||
- /* When 'foreign' is true, do not remove routes we configured. */
|
||||
- if (foreign && route->source != NETWORK_CONFIG_SOURCE_FOREIGN)
|
||||
+ /* When 'foreign' is true, mark only foreign routes, and vice versa. */
|
||||
+ if (foreign != (route->source == NETWORK_CONFIG_SOURCE_FOREIGN))
|
||||
continue;
|
||||
|
||||
/* Do not touch dynamic routes. They will removed by dhcp_pd_prefix_lost() */
|
||||
@@ -834,7 +834,7 @@ static void manager_mark_routes(Manager *manager, bool foreign, const Link *exce
|
||||
}
|
||||
}
|
||||
|
||||
-static int manager_drop_routes(Manager *manager) {
|
||||
+static int manager_drop_marked_routes(Manager *manager) {
|
||||
Route *route;
|
||||
int k, r = 0;
|
||||
|
||||
@@ -955,14 +955,14 @@ int link_drop_foreign_routes(Link *link) {
|
||||
|
||||
manager_mark_routes(link->manager, /* foreign = */ true, NULL);
|
||||
|
||||
- k = manager_drop_routes(link->manager);
|
||||
+ k = manager_drop_marked_routes(link->manager);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
-int link_drop_routes(Link *link) {
|
||||
+int link_drop_managed_routes(Link *link) {
|
||||
Route *route;
|
||||
int k, r = 0;
|
||||
|
||||
@@ -973,6 +973,10 @@ int link_drop_routes(Link *link) {
|
||||
if (route_by_kernel(route))
|
||||
continue;
|
||||
|
||||
+ /* Do not touch routes managed by kernel or other tools. */
|
||||
+ if (route->source == NETWORK_CONFIG_SOURCE_FOREIGN)
|
||||
+ continue;
|
||||
+
|
||||
if (!route_exists(route))
|
||||
continue;
|
||||
|
||||
@@ -983,7 +987,7 @@ int link_drop_routes(Link *link) {
|
||||
|
||||
manager_mark_routes(link->manager, /* foreign = */ false, link);
|
||||
|
||||
- k = manager_drop_routes(link->manager);
|
||||
+ k = manager_drop_marked_routes(link->manager);
|
||||
if (k < 0 && r >= 0)
|
||||
r = k;
|
||||
|
||||
diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h
|
||||
index e3e22a5985..2180a196fc 100644
|
||||
--- a/src/network/networkd-route.h
|
||||
+++ b/src/network/networkd-route.h
|
||||
@@ -82,7 +82,7 @@ int route_remove(Route *route);
|
||||
|
||||
int route_get(Manager *manager, Link *link, const Route *in, Route **ret);
|
||||
|
||||
-int link_drop_routes(Link *link);
|
||||
+int link_drop_managed_routes(Link *link);
|
||||
int link_drop_foreign_routes(Link *link);
|
||||
void link_foreignize_routes(Link *link);
|
||||
|
||||
diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c
|
||||
index 90086f35a7..d4363060d8 100644
|
||||
--- a/src/network/networkd-routing-policy-rule.c
|
||||
+++ b/src/network/networkd-routing-policy-rule.c
|
||||
@@ -653,8 +653,8 @@ static void manager_mark_routing_policy_rules(Manager *m, bool foreign, const Li
|
||||
if (rule->protocol == RTPROT_KERNEL)
|
||||
continue;
|
||||
|
||||
- /* When 'foreign' is true, do not remove rules we configured. */
|
||||
- if (foreign && rule->source != NETWORK_CONFIG_SOURCE_FOREIGN)
|
||||
+ /* When 'foreign' is true, mark only foreign rules, and vice versa. */
|
||||
+ if (foreign != (rule->source == NETWORK_CONFIG_SOURCE_FOREIGN))
|
||||
continue;
|
||||
|
||||
/* Ignore rules not assigned yet or already removing. */
|
||||
diff --git a/src/network/networkd-routing-policy-rule.h b/src/network/networkd-routing-policy-rule.h
|
||||
index f52943bd2e..7cc6f55c8d 100644
|
||||
--- a/src/network/networkd-routing-policy-rule.h
|
||||
+++ b/src/network/networkd-routing-policy-rule.h
|
||||
@@ -71,7 +71,7 @@ int manager_drop_routing_policy_rules_internal(Manager *m, bool foreign, const L
|
||||
static inline int manager_drop_foreign_routing_policy_rules(Manager *m) {
|
||||
return manager_drop_routing_policy_rules_internal(m, true, NULL);
|
||||
}
|
||||
-static inline int link_drop_routing_policy_rules(Link *link) {
|
||||
+static inline int link_drop_managed_routing_policy_rules(Link *link) {
|
||||
assert(link);
|
||||
return manager_drop_routing_policy_rules_internal(link->manager, false, link);
|
||||
}
|
||||
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
|
||||
index ac2c1ba034..ed4d4992b1 100755
|
||||
--- a/test/test-network/systemd-networkd-tests.py
|
||||
+++ b/test/test-network/systemd-networkd-tests.py
|
||||
@@ -3876,7 +3876,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
print(output)
|
||||
self.assertRegex(output, 'NO-CARRIER')
|
||||
self.assertNotRegex(output, '192.168.0.15/24')
|
||||
- self.assertNotRegex(output, '192.168.0.16/24')
|
||||
+ self.assertRegex(output, '192.168.0.16/24') # foreign address is kept
|
||||
|
||||
print('### ip -6 route list table all dev bridge99')
|
||||
output = check_output('ip -6 route list table all dev bridge99')
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -30,6 +30,7 @@ SRC_URI += "file://touchscreen.rules \
|
||||
file://0001-shared-json-allow-json_variant_dump-to-return-an-err.patch \
|
||||
file://CVE-2022-4415-1.patch \
|
||||
file://CVE-2022-4415-2.patch \
|
||||
file://0001-network-remove-only-managed-configs-on-reconfigure-o.patch \
|
||||
"
|
||||
|
||||
# patches needed by musl
|
||||
|
||||
@@ -8,3 +8,4 @@ rm -f *.tmp
|
||||
rm -f *.ok
|
||||
rm -f *.failed
|
||||
rm -f *.log
|
||||
cp ../data/test_data.tmp ./
|
||||
|
||||
@@ -141,4 +141,7 @@ do_install_ptest() {
|
||||
|
||||
install -d ${D}${PTEST_PATH}/lib
|
||||
install -m 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/
|
||||
|
||||
install -d ${D}${PTEST_PATH}/data
|
||||
install -m 0644 ${B}/tests/test_data.tmp ${D}${PTEST_PATH}/data/
|
||||
}
|
||||
|
||||
@@ -68,7 +68,8 @@ do_configure () {
|
||||
# libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure
|
||||
# tests. Create a dummy empty lib for the purposes of configure.
|
||||
mkdir -p ${WORKDIR}/dummylib
|
||||
${CC} -x c /dev/null -nostartfiles -shared -o ${WORKDIR}/dummylib/libstdc++.so
|
||||
${CC} -x c /dev/null -c -o ${WORKDIR}/dummylib/dummylib.o
|
||||
${AR} rcs ${WORKDIR}/dummylib/libstdc++.a ${WORKDIR}/dummylib/dummylib.o
|
||||
for d in libgcc ${RUNTIMETARGET}; do
|
||||
echo "Configuring $d"
|
||||
rm -rf ${B}/${TARGET_SYS}/$d/
|
||||
|
||||
@@ -37,6 +37,8 @@ CVE_CHECK_IGNORE += "CVE-2022-24975"
|
||||
CVE_CHECK_IGNORE += "CVE-2022-41953"
|
||||
# specific to Git for Windows
|
||||
CVE_CHECK_IGNORE += "CVE-2023-22743"
|
||||
# This is specific to Git-for-Windows
|
||||
CVE_CHECK_IGNORE += "CVE-2023-25815"
|
||||
|
||||
PACKAGECONFIG ??= "expat curl"
|
||||
PACKAGECONFIG[cvsserver] = ""
|
||||
|
||||
@@ -30,6 +30,8 @@ SRC_URI += "\
|
||||
file://CVE-2023-24537.patch \
|
||||
file://CVE-2023-24534.patch \
|
||||
file://CVE-2023-24538.patch \
|
||||
file://CVE-2023-24540.patch \
|
||||
file://CVE-2023-24539.patch \
|
||||
"
|
||||
SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
|
||||
|
||||
|
||||
53
meta/recipes-devtools/go/go-1.18/CVE-2023-24539.patch
Normal file
53
meta/recipes-devtools/go/go-1.18/CVE-2023-24539.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From e49282327b05192e46086bf25fd3ac691205fe80 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Thu, 13 Apr 2023 15:40:44 -0700
|
||||
Subject: [PATCH] [release-branch.go1.19] html/template: disallow angle
|
||||
brackets in CSS values
|
||||
|
||||
Change-Id: Iccc659c9a18415992b0c05c178792228e3a7bae4
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1826636
|
||||
Reviewed-by: Julie Qiu <julieqiu@google.com>
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1851496
|
||||
Run-TryBot: Damien Neil <dneil@google.com>
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/491335
|
||||
Run-TryBot: Carlos Amedee <carlos@golang.org>
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
TryBot-Result: Gopher Robot <gobot@golang.org>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/e49282327b05192e46086bf25fd3ac691205fe80]
|
||||
CVE: CVE-2023-24539
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
src/html/template/css.go | 2 +-
|
||||
src/html/template/css_test.go | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/html/template/css.go b/src/html/template/css.go
|
||||
index 890a0c6b227fe..f650d8b3e843a 100644
|
||||
--- a/src/html/template/css.go
|
||||
+++ b/src/html/template/css.go
|
||||
@@ -238,7 +238,7 @@ func cssValueFilter(args ...any) string {
|
||||
// inside a string that might embed JavaScript source.
|
||||
for i, c := range b {
|
||||
switch c {
|
||||
- case 0, '"', '\'', '(', ')', '/', ';', '@', '[', '\\', ']', '`', '{', '}':
|
||||
+ case 0, '"', '\'', '(', ')', '/', ';', '@', '[', '\\', ']', '`', '{', '}', '<', '>':
|
||||
return filterFailsafe
|
||||
case '-':
|
||||
// Disallow <!-- or -->.
|
||||
diff --git a/src/html/template/css_test.go b/src/html/template/css_test.go
|
||||
index a735638b0314f..2b76256a766e9 100644
|
||||
--- a/src/html/template/css_test.go
|
||||
+++ b/src/html/template/css_test.go
|
||||
@@ -231,6 +231,8 @@ func TestCSSValueFilter(t *testing.T) {
|
||||
{`-exp\000052 ession(alert(1337))`, "ZgotmplZ"},
|
||||
{`-expre\0000073sion`, "-expre\x073sion"},
|
||||
{`@import url evil.css`, "ZgotmplZ"},
|
||||
+ {"<", "ZgotmplZ"},
|
||||
+ {">", "ZgotmplZ"},
|
||||
}
|
||||
for _, test := range tests {
|
||||
got := cssValueFilter(test.css)
|
||||
93
meta/recipes-devtools/go/go-1.19/CVE-2023-24540.patch
Normal file
93
meta/recipes-devtools/go/go-1.19/CVE-2023-24540.patch
Normal file
@@ -0,0 +1,93 @@
|
||||
From 2305cdb2aa5ac8e9960bd64e548a119c7dd87530 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Tue, 11 Apr 2023 16:27:43 +0100
|
||||
Subject: [PATCH] html/template: handle all JS whitespace characters
|
||||
|
||||
Rather than just a small set. Character class as defined by \s [0].
|
||||
|
||||
Thanks to Juho Nurminen of Mattermost for reporting this.
|
||||
|
||||
For #59721
|
||||
Fixes #59813
|
||||
Fixes CVE-2023-24540
|
||||
|
||||
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes
|
||||
|
||||
Change-Id: I56d4fa1ef08125b417106ee7dbfb5b0923b901ba
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1821459
|
||||
Reviewed-by: Julie Qiu <julieqiu@google.com>
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1851497
|
||||
Run-TryBot: Damien Neil <dneil@google.com>
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/491355
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Reviewed-by: Carlos Amedee <carlos@golang.org>
|
||||
TryBot-Bypass: Carlos Amedee <carlos@golang.org>
|
||||
Run-TryBot: Carlos Amedee <carlos@golang.org>
|
||||
|
||||
CVE: CVE-2023-24540
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/ce7bd33345416e6d8cac901792060591cafc2797]
|
||||
|
||||
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
|
||||
---
|
||||
src/html/template/js.go | 8 +++++++-
|
||||
src/html/template/js_test.go | 11 +++++++----
|
||||
2 files changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/html/template/js.go b/src/html/template/js.go
|
||||
index b888eaf..35994f0 100644
|
||||
--- a/src/html/template/js.go
|
||||
+++ b/src/html/template/js.go
|
||||
@@ -13,6 +13,11 @@ import (
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
+// jsWhitespace contains all of the JS whitespace characters, as defined
|
||||
+// by the \s character class.
|
||||
+// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes.
|
||||
+const jsWhitespace = "\f\n\r\t\v\u0020\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff"
|
||||
+
|
||||
// nextJSCtx returns the context that determines whether a slash after the
|
||||
// given run of tokens starts a regular expression instead of a division
|
||||
// operator: / or /=.
|
||||
@@ -26,7 +31,8 @@ import (
|
||||
// JavaScript 2.0 lexical grammar and requires one token of lookbehind:
|
||||
// https://www.mozilla.org/js/language/js20-2000-07/rationale/syntax.html
|
||||
func nextJSCtx(s []byte, preceding jsCtx) jsCtx {
|
||||
- s = bytes.TrimRight(s, "\t\n\f\r \u2028\u2029")
|
||||
+ // Trim all JS whitespace characters
|
||||
+ s = bytes.TrimRight(s, jsWhitespace)
|
||||
if len(s) == 0 {
|
||||
return preceding
|
||||
}
|
||||
diff --git a/src/html/template/js_test.go b/src/html/template/js_test.go
|
||||
index d7ee47b..8f5d76d 100644
|
||||
--- a/src/html/template/js_test.go
|
||||
+++ b/src/html/template/js_test.go
|
||||
@@ -81,14 +81,17 @@ func TestNextJsCtx(t *testing.T) {
|
||||
{jsCtxDivOp, "0"},
|
||||
// Dots that are part of a number are div preceders.
|
||||
{jsCtxDivOp, "0."},
|
||||
+ // Some JS interpreters treat NBSP as a normal space, so
|
||||
+ // we must too in order to properly escape things.
|
||||
+ {jsCtxRegexp, "=\u00A0"},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
- if nextJSCtx([]byte(test.s), jsCtxRegexp) != test.jsCtx {
|
||||
- t.Errorf("want %s got %q", test.jsCtx, test.s)
|
||||
+ if ctx := nextJSCtx([]byte(test.s), jsCtxRegexp); ctx != test.jsCtx {
|
||||
+ t.Errorf("%q: want %s got %s", test.s, test.jsCtx, ctx)
|
||||
}
|
||||
- if nextJSCtx([]byte(test.s), jsCtxDivOp) != test.jsCtx {
|
||||
- t.Errorf("want %s got %q", test.jsCtx, test.s)
|
||||
+ if ctx := nextJSCtx([]byte(test.s), jsCtxDivOp); ctx != test.jsCtx {
|
||||
+ t.Errorf("%q: want %s got %s", test.s, test.jsCtx, ctx)
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From a94bf34221fc4519bd8ec72560c2d363ffe2de4c Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyich@gmail.com>
|
||||
Date: Mon, 23 May 2022 08:03:23 +0100
|
||||
Subject: [PATCH] [Support] Add missing <cstdint> header to Signals.h
|
||||
|
||||
Without the change llvm build fails on this week's gcc-13 snapshot as:
|
||||
|
||||
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o
|
||||
In file included from llvm/lib/Support/Signals.cpp:14:
|
||||
llvm/include/llvm/Support/Signals.h:119:8: error: variable or field 'CleanupOnSignal' declared void
|
||||
119 | void CleanupOnSignal(uintptr_t Context);
|
||||
| ^~~~~~~~~~~~~~~
|
||||
|
||||
Upstream-Status: Backport [llvmorg-15.0.0 ff1681ddb303223973653f7f5f3f3435b48a1983]
|
||||
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||
---
|
||||
llvm/include/llvm/Support/Signals.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/llvm/include/llvm/Support/Signals.h b/llvm/include/llvm/Support/Signals.h
|
||||
index 44f5a750ff5c..937e0572d4a7 100644
|
||||
--- a/llvm/include/llvm/Support/Signals.h
|
||||
+++ b/llvm/include/llvm/Support/Signals.h
|
||||
@@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_SUPPORT_SIGNALS_H
|
||||
#define LLVM_SUPPORT_SIGNALS_H
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
@@ -32,6 +32,7 @@ SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=http
|
||||
file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \
|
||||
file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
|
||||
file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
|
||||
file://0001-Support-Add-missing-cstdint-header-to-Signals.h.patch;striplevel=2 \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)"
|
||||
|
||||
50
meta/recipes-devtools/nasm/nasm/CVE-2022-46457.patch
Normal file
50
meta/recipes-devtools/nasm/nasm/CVE-2022-46457.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From c8af73112027fad0ecbb277e9cba257678c405af Mon Sep 17 00:00:00 2001
|
||||
From: "H. Peter Anvin" <hpa@zytor.com>
|
||||
Date: Wed, 7 Dec 2022 10:23:46 -0800
|
||||
Subject: [PATCH] outieee: fix segfault on empty input
|
||||
|
||||
Fix the IEEE backend crashing if the input file is empty.
|
||||
|
||||
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/netwide-assembler/nasm/commit/c8af73112027fad0ecbb277e9cba257678c405af]
|
||||
CVE: CVE-2022-46457
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
output/outieee.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/output/outieee.c b/output/outieee.c
|
||||
index cdb8333..8bc5eaa 100644
|
||||
--- a/output/outieee.c
|
||||
+++ b/output/outieee.c
|
||||
@@ -919,7 +919,7 @@ static void ieee_write_file(void)
|
||||
* Write the section headers
|
||||
*/
|
||||
seg = seghead;
|
||||
- if (!debuginfo && !strcmp(seg->name, "??LINE"))
|
||||
+ if (!debuginfo && seg && !strcmp(seg->name, "??LINE"))
|
||||
seg = seg->next;
|
||||
while (seg) {
|
||||
char buf[256];
|
||||
@@ -954,7 +954,7 @@ static void ieee_write_file(void)
|
||||
/*
|
||||
* write the start address if there is one
|
||||
*/
|
||||
- if (ieee_entry_seg) {
|
||||
+ if (ieee_entry_seg && seghead) {
|
||||
for (seg = seghead; seg; seg = seg->next)
|
||||
if (seg->index == ieee_entry_seg)
|
||||
break;
|
||||
@@ -1067,7 +1067,7 @@ static void ieee_write_file(void)
|
||||
* put out section data;
|
||||
*/
|
||||
seg = seghead;
|
||||
- if (!debuginfo && !strcmp(seg->name, "??LINE"))
|
||||
+ if (!debuginfo && seg && !strcmp(seg->name, "??LINE"))
|
||||
seg = seg->next;
|
||||
while (seg) {
|
||||
if (seg->currentpos) {
|
||||
--
|
||||
2.40.0
|
||||
@@ -9,6 +9,7 @@ SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
|
||||
file://0001-stdlib-Add-strlcat.patch \
|
||||
file://0002-Add-debug-prefix-map-option.patch \
|
||||
file://CVE-2022-44370.patch \
|
||||
file://CVE-2022-46457.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "3c4b8339e5ab54b1bcb2316101f8985a5da50a3f9e504d43fa6f35668bee2fd0"
|
||||
|
||||
29
meta/recipes-devtools/perl/files/CVE-2023-31484.patch
Normal file
29
meta/recipes-devtools/perl/files/CVE-2023-31484.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From a625ec2cc3a0b6116c1f8b831d3480deb621c245 Mon Sep 17 00:00:00 2001
|
||||
From: Stig Palmquist <git@stig.io>
|
||||
Date: Tue, 28 Feb 2023 11:54:06 +0100
|
||||
Subject: [PATCH] Add verify_SSL=>1 to HTTP::Tiny to verify https server
|
||||
identity
|
||||
|
||||
Upstream-Status: Backport [https://github.com/andk/cpanpm/commit/9c98370287f4e709924aee7c58ef21c85289a7f0]
|
||||
|
||||
CVE: CVE-2023-31484
|
||||
|
||||
Signed-off-by: Soumya <soumya.sambu@windriver.com>
|
||||
---
|
||||
cpan/CPAN/lib/CPAN/HTTP/Client.pm | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cpan/CPAN/lib/CPAN/HTTP/Client.pm b/cpan/CPAN/lib/CPAN/HTTP/Client.pm
|
||||
index 4fc792c..a616fee 100644
|
||||
--- a/cpan/CPAN/lib/CPAN/HTTP/Client.pm
|
||||
+++ b/cpan/CPAN/lib/CPAN/HTTP/Client.pm
|
||||
@@ -32,6 +32,7 @@ sub mirror {
|
||||
|
||||
my $want_proxy = $self->_want_proxy($uri);
|
||||
my $http = HTTP::Tiny->new(
|
||||
+ verify_SSL => 1,
|
||||
$want_proxy ? (proxy => $self->{proxy}) : ()
|
||||
);
|
||||
|
||||
--
|
||||
2.40.0
|
||||
@@ -18,6 +18,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
|
||||
file://determinism.patch \
|
||||
file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
|
||||
file://0001-Fix-build-with-gcc-12.patch \
|
||||
file://CVE-2023-31484.patch \
|
||||
"
|
||||
SRC_URI:append:class-native = " \
|
||||
file://perl-configpm-switch.patch \
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From cd0128c0becd8729d0f8733bf42fbd333d51f833 Mon Sep 17 00:00:00 2001
|
||||
From: Nate Prewitt <nate.prewitt@gmail.com>
|
||||
Date: Mon, 5 Jun 2023 09:31:36 +0000
|
||||
Subject: [PATCH] Merge pull request from GHSA-j8r2-6x86-q33q
|
||||
|
||||
CVE: CVE-2023-32681
|
||||
|
||||
Upstream-Status: Backport [https://github.com/psf/requests/commit/74ea7cf7a6a27a4eeb2ae24e162bcc942a6706d5]
|
||||
|
||||
Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
|
||||
---
|
||||
requests/sessions.py | 4 +++-
|
||||
tests/test_requests.py | 20 ++++++++++++++++++++
|
||||
2 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/requests/sessions.py b/requests/sessions.py
|
||||
index 3f59cab..648cffa 100644
|
||||
--- a/requests/sessions.py
|
||||
+++ b/requests/sessions.py
|
||||
@@ -293,7 +293,9 @@ class SessionRedirectMixin(object):
|
||||
except KeyError:
|
||||
username, password = None, None
|
||||
|
||||
- if username and password:
|
||||
+ # urllib3 handles proxy authorization for us in the standard adapter.
|
||||
+ # Avoid appending this to TLS tunneled requests where it may be leaked.
|
||||
+ if not scheme.startswith('https') and username and password:
|
||||
headers['Proxy-Authorization'] = _basic_auth_str(username, password)
|
||||
|
||||
return new_proxies
|
||||
diff --git a/tests/test_requests.py b/tests/test_requests.py
|
||||
index 29b3aca..6a37777 100644
|
||||
--- a/tests/test_requests.py
|
||||
+++ b/tests/test_requests.py
|
||||
@@ -601,6 +601,26 @@ class TestRequests:
|
||||
|
||||
assert sent_headers.get("Proxy-Authorization") == proxy_auth_value
|
||||
|
||||
+
|
||||
+ @pytest.mark.parametrize(
|
||||
+ "url,has_proxy_auth",
|
||||
+ (
|
||||
+ ('http://example.com', True),
|
||||
+ ('https://example.com', False),
|
||||
+ ),
|
||||
+ )
|
||||
+ def test_proxy_authorization_not_appended_to_https_request(self, url, has_proxy_auth):
|
||||
+ session = requests.Session()
|
||||
+ proxies = {
|
||||
+ 'http': 'http://test:pass@localhost:8080',
|
||||
+ 'https': 'http://test:pass@localhost:8090',
|
||||
+ }
|
||||
+ req = requests.Request('GET', url)
|
||||
+ prep = req.prepare()
|
||||
+ session.rebuild_proxies(prep, proxies)
|
||||
+
|
||||
+ assert ('Proxy-Authorization' in prep.headers) is has_proxy_auth
|
||||
+
|
||||
def test_basicauth_with_netrc(self, httpbin):
|
||||
auth = ('user', 'pass')
|
||||
wrong_auth = ('wronguser', 'wrongpass')
|
||||
--
|
||||
2.40.0
|
||||
@@ -3,6 +3,8 @@ HOMEPAGE = "http://python-requests.org"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
|
||||
|
||||
SRC_URI += "file://CVE-2023-32681.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"
|
||||
|
||||
inherit pypi setuptools3
|
||||
|
||||
@@ -14,6 +14,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
|
||||
file://0001-tests-Allow-different-output-from-mv.patch \
|
||||
file://fix-grep-3.8.patch \
|
||||
file://faildiff-order.patch \
|
||||
file://0001-test-Fix-a-race-condition-in-merge.test.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch"
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From c1ce964f3e9312100a60f03c1e1fdd601e1911f2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
|
||||
<congdanhqx@gmail.com>
|
||||
Date: Tue, 28 Feb 2023 18:45:15 +0100
|
||||
Subject: [PATCH] test: Fix a race condition in merge.test
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Just like commit 4dfe7f9, (test: Fix a race condition, 2023-01-20),
|
||||
this fix a test race when stdout and stderr in any order.
|
||||
|
||||
Upstream-Status: Backport [https://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=c1ce964f3e9312100a60f03c1e1fdd601e1911f2]
|
||||
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
|
||||
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
||||
---
|
||||
test/merge.test | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/merge.test b/test/merge.test
|
||||
index c64b33d..2e67d4f 100644
|
||||
--- a/test/merge.test
|
||||
+++ b/test/merge.test
|
||||
@@ -39,8 +39,9 @@ Test the patch merging functionality of `quilt diff'.
|
||||
> Applying patch %{P}c.diff
|
||||
> Now at patch %{P}c.diff
|
||||
|
||||
- $ quilt diff -P b.diff | grep -v "^\\(---\\|+++\\)"
|
||||
+ $ quilt diff -P b.diff >/dev/null
|
||||
> Warning: more recent patches modify files in patch %{P}b.diff
|
||||
+ $ quilt diff -P b.diff 2>/dev/null | grep -v "^\\(---\\|+++\\)"
|
||||
>~ Index: [^/]+/abc\.txt
|
||||
> ===================================================================
|
||||
> @@ -1,3 +1,3 @@
|
||||
@@ -49,8 +50,9 @@ Test the patch merging functionality of `quilt diff'.
|
||||
> +b+
|
||||
> c
|
||||
|
||||
- $ quilt diff --combine a.diff -P b.diff | grep -v "^\\(---\\|+++\\)"
|
||||
+ $ quilt diff --combine a.diff -P b.diff >/dev/null
|
||||
> Warning: more recent patches modify files in patch %{P}b.diff
|
||||
+ $ quilt diff --combine a.diff -P b.diff 2>/dev/null | grep -v "^\\(---\\|+++\\)"
|
||||
>~ Index: [^/]+/abc\.txt
|
||||
> ===================================================================
|
||||
> @@ -1,3 +1,3 @@
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 77ff5f1be394eb2c786df561ff37dde7f982ec76 Mon Sep 17 00:00:00 2001
|
||||
From: Stefano Babic <sbabic@denx.de>
|
||||
Date: Fri, 28 Jul 2017 13:20:52 +0200
|
||||
Subject: [PATCH] Wrong CRC with ASCII CRC for large files
|
||||
|
||||
Due to signedness, the checksum is not computed when filesize is bigger
|
||||
a 2GB.
|
||||
|
||||
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-cpio/2017-07/msg00004.html]
|
||||
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
||||
---
|
||||
src/copyout.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/copyout.c b/src/copyout.c
|
||||
index 1f0987a..727aeca 100644
|
||||
--- a/src/copyout.c
|
||||
+++ b/src/copyout.c
|
||||
@@ -34,13 +34,13 @@
|
||||
compute and return a checksum for them. */
|
||||
|
||||
static uint32_t
|
||||
-read_for_checksum (int in_file_des, int file_size, char *file_name)
|
||||
+read_for_checksum (int in_file_des, unsigned int file_size, char *file_name)
|
||||
{
|
||||
uint32_t crc;
|
||||
char buf[BUFSIZ];
|
||||
- int bytes_left;
|
||||
- int bytes_read;
|
||||
- int i;
|
||||
+ unsigned int bytes_left;
|
||||
+ unsigned int bytes_read;
|
||||
+ unsigned int i;
|
||||
|
||||
crc = 0;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -10,6 +10,7 @@ SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
|
||||
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
|
||||
file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \
|
||||
file://CVE-2021-38185.patch \
|
||||
file://0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
|
||||
|
||||
@@ -15,6 +15,7 @@ SRC_URI = "https://github.com/OpenPrinting/cups/releases/download/v${PV}/cups-${
|
||||
file://0004-cups-fix-multilib-install-file-conflicts.patch \
|
||||
file://volatiles.99_cups \
|
||||
file://cups-volatiles.conf \
|
||||
file://CVE-2023-32324.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/OpenPrinting/cups/releases"
|
||||
|
||||
36
meta/recipes-extended/cups/cups/CVE-2023-32324.patch
Normal file
36
meta/recipes-extended/cups/cups/CVE-2023-32324.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 07cbffd11107eed3aaf1c64e35552aec20f792da Mon Sep 17 00:00:00 2001
|
||||
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||
Date: Thu, 1 Jun 2023 12:04:00 +0200
|
||||
Subject: [PATCH] cups/string.c: Return if `size` is 0 (fixes CVE-2023-32324)
|
||||
|
||||
CVE: CVE-2023-32324
|
||||
Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/fd8bc2d32589]
|
||||
|
||||
(cherry picked from commit fd8bc2d32589d1fd91fe1c0521be2a7c0462109e)
|
||||
Signed-off-by: Sanjay Chitroda <schitrod@cisco.com>
|
||||
---
|
||||
cups/string.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/cups/string.c b/cups/string.c
|
||||
index 93cdad19..6ef58515 100644
|
||||
--- a/cups/string.c
|
||||
+++ b/cups/string.c
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* String functions for CUPS.
|
||||
*
|
||||
+ * Copyright © 2023 by OpenPrinting.
|
||||
* Copyright © 2007-2019 by Apple Inc.
|
||||
* Copyright © 1997-2007 by Easy Software Products.
|
||||
*
|
||||
@@ -730,6 +731,9 @@ _cups_strlcpy(char *dst, /* O - Destination string */
|
||||
size_t srclen; /* Length of source string */
|
||||
|
||||
|
||||
+ if (size == 0)
|
||||
+ return (0);
|
||||
+
|
||||
/*
|
||||
* Figure out how much room is needed...
|
||||
*/
|
||||
80
meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch
Normal file
80
meta/recipes-extended/sysstat/sysstat/CVE-2023-33204.patch
Normal file
@@ -0,0 +1,80 @@
|
||||
From e806a902cc90a0b87da00854de8d5fd8222540fc Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Kopylov <pkopylov@>
|
||||
Date: Wed, 17 May 2023 11:33:45 +0200
|
||||
Subject: [PATCH] Fix an overflow which is still possible for some values.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/sysstat/sysstat/commit/954ff2e2673c]
|
||||
CVE: CVE-2023-33204
|
||||
|
||||
Signed-off-by: Xiangyu Chen <xiangyu.chen@...>
|
||||
Signed-off-by: Sanjay Chitroda <schitrod@...>
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
common.c | 18 ++++++++++--------
|
||||
common.h | 2 +-
|
||||
sa_common.c | 4 ++--
|
||||
3 files changed, 13 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/common.c b/common.c
|
||||
index db9b0ed..e05c5bb 100644
|
||||
--- a/common.c
|
||||
+++ b/common.c
|
||||
@@ -1640,17 +1640,19 @@ int parse_values(char *strargv, unsigned char bitmap[], int max_val, const char
|
||||
* @val3 Third value.
|
||||
***************************************************************************
|
||||
*/
|
||||
-void check_overflow(size_t val1, size_t val2, size_t val3)
|
||||
+void check_overflow(unsigned int val1, unsigned int val2,
|
||||
+ unsigned int val3)
|
||||
{
|
||||
- if ((unsigned long long) val1 *
|
||||
- (unsigned long long) val2 *
|
||||
- (unsigned long long) val3 > UINT_MAX) {
|
||||
+ if ((val1 != 0) && (val2 != 0) && (val3 != 0) &&
|
||||
+ (((unsigned long long) UINT_MAX / (unsigned long long) val1 <
|
||||
+ (unsigned long long) val2) ||
|
||||
+ ((unsigned long long) UINT_MAX / ((unsigned long long) val1 * (unsigned long long) val2) <
|
||||
+ (unsigned long long) val3))) {
|
||||
#ifdef DEBUG
|
||||
- fprintf(stderr, "%s: Overflow detected (%llu). Aborting...\n",
|
||||
- __FUNCTION__,
|
||||
- (unsigned long long) val1 * (unsigned long long) val2 * (unsigned long long) val3);
|
||||
+ fprintf(stderr, "%s: Overflow detected (%u,%u,%u). Aborting...\n",
|
||||
+ __FUNCTION__, val1, val2, val3);
|
||||
#endif
|
||||
- exit(4);
|
||||
+ exit(4);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/common.h b/common.h
|
||||
index 0ac5896..b2ffe9f 100644
|
||||
--- a/common.h
|
||||
+++ b/common.h
|
||||
@@ -256,7 +256,7 @@ int check_dir
|
||||
|
||||
#ifndef SOURCE_SADC
|
||||
void check_overflow
|
||||
- (size_t, size_t, size_t);
|
||||
+ (unsigned int, unsigned int, unsigned int);
|
||||
int count_bits
|
||||
(void *, int);
|
||||
int count_csvalues
|
||||
diff --git a/sa_common.c b/sa_common.c
|
||||
index 1b8fcaa..1144cfe 100644
|
||||
--- a/sa_common.c
|
||||
+++ b/sa_common.c
|
||||
@@ -452,8 +452,8 @@ void allocate_structures(struct activity *act[])
|
||||
if (act[i]->nr_ini > 0) {
|
||||
|
||||
/* Look for a possible overflow */
|
||||
- check_overflow((size_t) act[i]->msize, (size_t) act[i]->nr_ini,
|
||||
- (size_t) act[i]->nr2);
|
||||
+ check_overflow((unsigned int) act[i]->msize, (unsigned int) act[i]->nr_ini,
|
||||
+ (unsigned int) act[i]->nr2);
|
||||
|
||||
for (j = 0; j < 3; j++) {
|
||||
SREALLOC(act[i]->buf[j], void,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -3,6 +3,7 @@ require sysstat.inc
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
|
||||
|
||||
SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch \
|
||||
file://CVE-2022-39377.patch"
|
||||
|
||||
file://CVE-2022-39377.patch \
|
||||
file://CVE-2023-33204.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "ef445acea301bbb996e410842f6290a8d049e884d4868cfef7e85dc04b7eee5b"
|
||||
|
||||
@@ -6,7 +6,7 @@ OpenGL or OpenGL ES."
|
||||
HOMEPAGE = "https://cgit.freedesktop.org/mesa/kmscube/"
|
||||
LICENSE = "MIT"
|
||||
SECTION = "graphics"
|
||||
DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm"
|
||||
DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm virtual/libgbm"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
|
||||
|
||||
@@ -20,7 +20,6 @@ S = "${WORKDIR}/git"
|
||||
inherit meson pkgconfig features_check
|
||||
|
||||
REQUIRED_DISTRO_FEATURES = "opengl"
|
||||
DEPENDS = "virtual/libgbm"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[gstreamer] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 13ff43fe760ac343b33d8e8c84b89886aac07116 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Hochstein <tom.hochstein@nxp.com>
|
||||
Date: Fri, 3 Jun 2022 10:44:29 -0500
|
||||
Subject: [PATCH] cmake: Don't enable GLX if tests are disabled
|
||||
|
||||
Allow building for systems that don't support GLX.
|
||||
|
||||
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/720]
|
||||
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
|
||||
---
|
||||
CMakeLists.txt | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e1aeb5ddf..85e171aba 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -134,10 +134,7 @@ if(PIGLIT_BUILD_CL_TESTS)
|
||||
endif(PIGLIT_BUILD_CL_TESTS)
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
- if(X11_FOUND AND OPENGL_gl_LIBRARY)
|
||||
- # Assume the system has GLX. In the future, systems may exist
|
||||
- # with libGL and libX11 but no GLX, but that world hasn't
|
||||
- # arrived yet.
|
||||
+ if(X11_FOUND AND OPENGL_gl_LIBRARY AND PIGLIT_BUILD_GLX_TESTS)
|
||||
set(PIGLIT_HAS_GLX True)
|
||||
add_definitions(-DPIGLIT_HAS_GLX)
|
||||
endif()
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
|
||||
|
||||
SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=main \
|
||||
file://0001-cmake-install-bash-completions-in-the-right-place.patch \
|
||||
file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
|
||||
file://0001-Add-a-missing-include-for-htobe32-definition.patch \
|
||||
file://0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
|
||||
"
|
||||
file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
|
||||
file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
|
||||
file://0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch"
|
||||
|
||||
UPSTREAM_CHECK_COMMITS = "1"
|
||||
|
||||
SRCREV = "2f80c7cc9c02d37574dc8ba3140b7dd8eb3cbf82"
|
||||
@@ -36,10 +37,12 @@ REQUIRED_DISTRO_FEATURES += "opengl"
|
||||
export TEMP = "${B}/temp/"
|
||||
do_compile[dirs] =+ "${B}/temp/"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', d)}"
|
||||
PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
|
||||
PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF"
|
||||
PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,virtual/opencl-icd"
|
||||
PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
|
||||
PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader"
|
||||
PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang"
|
||||
|
||||
export PIGLIT_BUILD_DIR = "../../../../git"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2195cec1e5bc66128d72049c11ff381ca4516a4b Mon Sep 17 00:00:00 2001
|
||||
From 0961787d2bf0d359a3ead89e9cec642818b32dea Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Tue, 5 Jul 2022 11:51:39 +0200
|
||||
Subject: [PATCH] meson.build: request native wayland-scanner
|
||||
@@ -8,15 +8,16 @@ try to use a cross-binary, and fail.
|
||||
|
||||
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/waffle/-/merge_requests/110]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
|
||||
---
|
||||
meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 0bb6128..0b6da1f 100644
|
||||
index ca6a212..3177bde 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -108,7 +108,7 @@ else
|
||||
@@ -110,7 +110,7 @@ else
|
||||
'wayland-egl', version : '>= 9.1', required : get_option('wayland'),
|
||||
)
|
||||
dep_wayland_scanner = dependency(
|
||||
@@ -24,4 +25,4 @@ index 0bb6128..0b6da1f 100644
|
||||
+ 'wayland-scanner', version : '>= 1.15', required : get_option('wayland'), native: true,
|
||||
)
|
||||
if dep_wayland_scanner.found()
|
||||
prog_wayland_scanner = find_program(dep_wayland_scanner.get_pkgconfig_variable('wayland_scanner'))
|
||||
prog_wayland_scanner = find_program(dep_wayland_scanner.get_variable(pkgconfig: 'wayland_scanner'))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7610ec4b572d3a54d30fca6798f0c406f3fd8a46 Mon Sep 17 00:00:00 2001
|
||||
From 71f9399d6cea1e2e885a98b98d82eb628832a86e Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Tue, 26 Oct 2021 08:52:17 +0200
|
||||
Subject: [PATCH] waffle: do not make core protocol into the library
|
||||
@@ -9,28 +9,13 @@ wayland.xml from the host.
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
meson.build | 4 ----
|
||||
src/waffle/meson.build | 7 -------
|
||||
2 files changed, 11 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index ffc02ff..0bb6128 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -104,10 +104,6 @@ else
|
||||
dep_wayland_client = dependency(
|
||||
'wayland-client', version : '>= 1.10', required : get_option('wayland'),
|
||||
)
|
||||
- if dep_wayland_client.found()
|
||||
- wayland_core_xml = join_paths(dep_wayland_client.get_pkgconfig_variable('pkgdatadir'),
|
||||
- 'wayland.xml')
|
||||
- endif
|
||||
dep_wayland_egl = dependency(
|
||||
'wayland-egl', version : '>= 9.1', required : get_option('wayland'),
|
||||
)
|
||||
---
|
||||
src/waffle/meson.build | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/src/waffle/meson.build b/src/waffle/meson.build
|
||||
index 01898c8..6245868 100644
|
||||
index e2636c7..3ff5762 100644
|
||||
--- a/src/waffle/meson.build
|
||||
+++ b/src/waffle/meson.build
|
||||
@@ -88,12 +88,6 @@ if build_surfaceless
|
||||
|
||||
@@ -9,16 +9,16 @@ LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
|
||||
file://include/waffle-1/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
|
||||
|
||||
SRC_URI = "git://gitlab.freedesktop.org/mesa/waffle.git;protocol=https;branch=master \
|
||||
SRC_URI = "git://gitlab.freedesktop.org/mesa/waffle.git;protocol=https;branch=maint-1.7 \
|
||||
file://0001-waffle-do-not-make-core-protocol-into-the-library.patch \
|
||||
file://0001-meson.build-request-native-wayland-scanner.patch \
|
||||
"
|
||||
SRCREV = "905c6c10f2483adf0cbfa024e2d3c2ed541fb300"
|
||||
SRCREV = "f3b42a7216105498842bc6ba77d8481b90d6f5f9"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson features_check lib_package bash-completion pkgconfig
|
||||
|
||||
DEPENDS:append = " python3 cmake-native"
|
||||
DEPENDS:append = " python3"
|
||||
|
||||
# This should be overridden per-machine to reflect the capabilities of the GL
|
||||
# stack.
|
||||
@@ -47,5 +47,5 @@ PACKAGECONFIG[surfaceless-egl] = "-Dsurfaceless_egl=enabled,-Dsurfaceless_egl=di
|
||||
# TODO: optionally build manpages and examples
|
||||
|
||||
do_install:append() {
|
||||
sed -i -e "s,${WORKDIR},,g" ${D}/${libdir}/cmake/Waffle/WaffleConfig.cmake
|
||||
rm -rf ${D}${datadir}/zsh
|
||||
}
|
||||
@@ -74,7 +74,7 @@ PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
|
||||
# Weston with systemd-login support
|
||||
PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
|
||||
# Weston with Xwayland support (requires X11 and Wayland)
|
||||
PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
|
||||
PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,xwayland"
|
||||
# colord CMS support
|
||||
PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
|
||||
# Clients support
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "6462fa707bd003b62bee6042c20e8ab1f391df96"
|
||||
SRCREV_meta ?= "8ea689ac1980b5c09cd049a3403f72e75a8739da"
|
||||
SRCREV_machine ?= "8008621f28248a94b5f1154350a4fc9c71b130d5"
|
||||
SRCREV_meta ?= "4476e17760bea9d68c392368f2396a2e9efa86c3"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.10.175"
|
||||
LINUX_VERSION ?= "5.10.180"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "8e0611e36c848a07f9cdd778903c9e51bb90b319"
|
||||
SRCREV_meta ?= "e4b95ec17228274acb38bf10061448224df3a312"
|
||||
SRCREV_machine ?= "613a261b361c2f0d1e1428ad02dffe4e81d1a24b"
|
||||
SRCREV_meta ?= "957ddf5f9d4bf5791e88a46ce9ec4352a6d0a171"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.15.108"
|
||||
LINUX_VERSION ?= "5.15.113"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.10.175"
|
||||
LINUX_VERSION ?= "5.10.180"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
|
||||
KMETA = "kernel-meta"
|
||||
KCONF_BSP_AUDIT_LEVEL = "2"
|
||||
|
||||
SRCREV_machine:qemuarm ?= "d90caed79c490df9aab86920b33698bc29899d45"
|
||||
SRCREV_machine ?= "878a6b6459feacfa733cf27a14b9f70b9922ba65"
|
||||
SRCREV_meta ?= "8ea689ac1980b5c09cd049a3403f72e75a8739da"
|
||||
SRCREV_machine:qemuarm ?= "d0dc3a46c784849731fc25990679b676f4306cef"
|
||||
SRCREV_machine ?= "5ca66907abef1e8a0be5d3109fd3f0d50f77bc5f"
|
||||
SRCREV_meta ?= "4476e17760bea9d68c392368f2396a2e9efa86c3"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.15.108"
|
||||
LINUX_VERSION ?= "5.15.113"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
@@ -14,8 +14,8 @@ DEPENDS += "openssl-native util-linux-native"
|
||||
KMETA = "kernel-meta"
|
||||
KCONF_BSP_AUDIT_LEVEL = "2"
|
||||
|
||||
SRCREV_machine ?= "3d762b85647844790979dd1e17a762003aaa7476"
|
||||
SRCREV_meta ?= "e4b95ec17228274acb38bf10061448224df3a312"
|
||||
SRCREV_machine ?= "cad8d3fd06feec26840453ddfd483216b4cf5b51"
|
||||
SRCREV_meta ?= "957ddf5f9d4bf5791e88a46ce9ec4352a6d0a171"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -13,23 +13,23 @@ KBRANCH:qemux86 ?= "v5.10/standard/base"
|
||||
KBRANCH:qemux86-64 ?= "v5.10/standard/base"
|
||||
KBRANCH:qemumips64 ?= "v5.10/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine:qemuarm ?= "1784e127b2ebee50ade30dc697d9f2c9ccda64d6"
|
||||
SRCREV_machine:qemuarm64 ?= "3189034276f25e203dae9df3df5fd33849a63ddb"
|
||||
SRCREV_machine:qemumips ?= "ed305aee0a2d924dd532eea364036736a43b008e"
|
||||
SRCREV_machine:qemuppc ?= "43e2751f24c4c35341b877429f5c62f57cc23616"
|
||||
SRCREV_machine:qemuriscv64 ?= "96f3a7ef51f544080250e995b21e66004fdbb2bb"
|
||||
SRCREV_machine:qemuriscv32 ?= "96f3a7ef51f544080250e995b21e66004fdbb2bb"
|
||||
SRCREV_machine:qemux86 ?= "96f3a7ef51f544080250e995b21e66004fdbb2bb"
|
||||
SRCREV_machine:qemux86-64 ?= "96f3a7ef51f544080250e995b21e66004fdbb2bb"
|
||||
SRCREV_machine:qemumips64 ?= "82870b2da104e88b79174aece820f233e0c4bd72"
|
||||
SRCREV_machine ?= "96f3a7ef51f544080250e995b21e66004fdbb2bb"
|
||||
SRCREV_meta ?= "8ea689ac1980b5c09cd049a3403f72e75a8739da"
|
||||
SRCREV_machine:qemuarm ?= "1cf6a458134cbbe232467622d8e34d2e9d10e92b"
|
||||
SRCREV_machine:qemuarm64 ?= "5db230097771631366812f12c9b04c8379f53c24"
|
||||
SRCREV_machine:qemumips ?= "795276fa64f0874a4ee0dcfa9c78e572314bdfa1"
|
||||
SRCREV_machine:qemuppc ?= "6ccfcf5138703538662241bf8ed897a1ef2a3def"
|
||||
SRCREV_machine:qemuriscv64 ?= "c6515d2a698792220bed8fd39ccbcfec64d1130f"
|
||||
SRCREV_machine:qemuriscv32 ?= "c6515d2a698792220bed8fd39ccbcfec64d1130f"
|
||||
SRCREV_machine:qemux86 ?= "c6515d2a698792220bed8fd39ccbcfec64d1130f"
|
||||
SRCREV_machine:qemux86-64 ?= "c6515d2a698792220bed8fd39ccbcfec64d1130f"
|
||||
SRCREV_machine:qemumips64 ?= "4d6b146f00b8efc99e3d3d1d8a63220c29590c8d"
|
||||
SRCREV_machine ?= "c6515d2a698792220bed8fd39ccbcfec64d1130f"
|
||||
SRCREV_meta ?= "4476e17760bea9d68c392368f2396a2e9efa86c3"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
LINUX_VERSION ?= "5.10.175"
|
||||
LINUX_VERSION ?= "5.10.180"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -13,24 +13,24 @@ KBRANCH:qemux86 ?= "v5.15/standard/base"
|
||||
KBRANCH:qemux86-64 ?= "v5.15/standard/base"
|
||||
KBRANCH:qemumips64 ?= "v5.15/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine:qemuarm ?= "80421c525a12141d31bf1592b0d8c176defe3010"
|
||||
SRCREV_machine:qemuarm64 ?= "9d140dbc3171bf272f51b524edeeb2f22783aca5"
|
||||
SRCREV_machine:qemumips ?= "b29a8fa62d88db512f1fa5d60e430a851d7e3aaf"
|
||||
SRCREV_machine:qemuppc ?= "7ee6b7fc4b57933114376cf012218c2ae3d23558"
|
||||
SRCREV_machine:qemuriscv64 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
|
||||
SRCREV_machine:qemuriscv32 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
|
||||
SRCREV_machine:qemux86 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
|
||||
SRCREV_machine:qemux86-64 ?= "e8c818cce43dd720c366d831aeb102c20c237652"
|
||||
SRCREV_machine:qemumips64 ?= "5c900befc90365f6daa80989e8de0ccc546ff0f5"
|
||||
SRCREV_machine ?= "e8c818cce43dd720c366d831aeb102c20c237652"
|
||||
SRCREV_meta ?= "e4b95ec17228274acb38bf10061448224df3a312"
|
||||
SRCREV_machine:qemuarm ?= "8f55d1b405ec36812e15592bec1a471c4afa8dfa"
|
||||
SRCREV_machine:qemuarm64 ?= "6f43cd2bf083a3a6d77edd2ddd275b9c6c3adf63"
|
||||
SRCREV_machine:qemumips ?= "942912a383bbb5b1edb362c1da8f328c50e8e16a"
|
||||
SRCREV_machine:qemuppc ?= "9b2cc2b52ad546d07bcef0d6c76e657ff46140ce"
|
||||
SRCREV_machine:qemuriscv64 ?= "934b0d629afd6e3bf31fcaeada9828b1f13dbd91"
|
||||
SRCREV_machine:qemuriscv32 ?= "934b0d629afd6e3bf31fcaeada9828b1f13dbd91"
|
||||
SRCREV_machine:qemux86 ?= "934b0d629afd6e3bf31fcaeada9828b1f13dbd91"
|
||||
SRCREV_machine:qemux86-64 ?= "934b0d629afd6e3bf31fcaeada9828b1f13dbd91"
|
||||
SRCREV_machine:qemumips64 ?= "570b02954e1cf598ba8792aa6127ddde7f2af647"
|
||||
SRCREV_machine ?= "934b0d629afd6e3bf31fcaeada9828b1f13dbd91"
|
||||
SRCREV_meta ?= "957ddf5f9d4bf5791e88a46ce9ec4352a6d0a171"
|
||||
|
||||
# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll
|
||||
# get the <version>/base branch, which is pure upstream -stable, and the same
|
||||
# meta SRCREV as the linux-yocto-standard builds. Select your version using the
|
||||
# normal PREFERRED_VERSION settings.
|
||||
BBCLASSEXTEND = "devupstream:target"
|
||||
SRCREV_machine:class-devupstream ?= "3299fb36854fdc288bddc2c4d265f8a2e5105944"
|
||||
SRCREV_machine:class-devupstream ?= "1fe619a7d25218e9b9fdcce9fcac6a05cd62abed"
|
||||
PN:class-devupstream = "linux-yocto-upstream"
|
||||
KBRANCH:class-devupstream = "v5.15/base"
|
||||
|
||||
@@ -38,7 +38,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
LINUX_VERSION ?= "5.15.108"
|
||||
LINUX_VERSION ?= "5.15.113"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -12,7 +12,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV}
|
||||
file://0001-connect-has-a-different-signature-on-musl.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "5684436121b8bae07fd00b74395f95e44b5f26323dce4fa045fa665676807bba"
|
||||
SRC_URI[sha256sum] = "2c64037c823fb88751a47dacf3d4752a52b7951190d6e05fc44855e912e81d71"
|
||||
|
||||
DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
|
||||
RRECOMMENDS:${PN} = "git"
|
||||
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
|
||||
"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz"
|
||||
SRC_URI[sha256sum] = "b152e3cc49d014899f53c39d8a6224a44e1399b4cf76aa5f9a903fdf9793c3cc"
|
||||
SRC_URI[sha256sum] = "7d619a030542a4a5a11e0302742a3d9b05f8e5cfc453025683a0379bc50aa013"
|
||||
|
||||
S = "${WORKDIR}/gst-libav-${PV}"
|
||||
|
||||
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
|
||||
|
||||
SRC_URI[sha256sum] = "bcccbc02548cdc123fd49944dd44a4f1adc5d107e36f010d320eb526e2107806"
|
||||
SRC_URI[sha256sum] = "48e82008a2a0ad5f4b525aba8a6c49c4ca2d7d25c6b1b14d107dd747e26d5a8e"
|
||||
|
||||
S = "${WORKDIR}/gst-omx-${PV}"
|
||||
|
||||
@@ -11,7 +11,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad
|
||||
file://0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch \
|
||||
file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "f431214b0754d7037adcde93c3195106196588973e5b32dcb24938805f866363"
|
||||
SRC_URI[sha256sum] = "d98c73fa5cdddb372a91199464515cfc80c89bbe05e3d4387ea4381e4224483a"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-bad-${PV}"
|
||||
|
||||
@@ -11,7 +11,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba
|
||||
file://0003-viv-fb-Make-sure-config.h-is-included.patch \
|
||||
file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "11f911ef65f3095d7cf698a1ad1fc5242ac3ad6c9270465fb5c9e7f4f9c19b35"
|
||||
SRC_URI[sha256sum] = "54eac357d6cd66f183b94a26e493bf4d5781bc76bc60cad122742626caf8f1a3"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-base-${PV}"
|
||||
|
||||
@@ -8,7 +8,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-go
|
||||
file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "e83ab4d12ca24959489bbb0ec4fac9b90e32f741d49cda357cb554b2cb8b97f9"
|
||||
SRC_URI[sha256sum] = "e51365cfa9b19bd736dafe2c8828254a55d66996a3c60550bb0d50041c381a44"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-good-${PV}"
|
||||
|
||||
@@ -14,7 +14,7 @@ LICENSE_FLAGS = "commercial"
|
||||
SRC_URI = " \
|
||||
https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
|
||||
"
|
||||
SRC_URI[sha256sum] = "af67d8ba7cab230f64d0594352112c2c443e2aa36a87c35f9f98a43d11430b87"
|
||||
SRC_URI[sha256sum] = "ca3fb6abc9f6e981d204a736c254e50cc1786a2f5038d83023e42ea009b10246"
|
||||
|
||||
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
|
||||
|
||||
@@ -8,7 +8,7 @@ LICENSE = "LGPL-2.1-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
|
||||
SRC_URI[sha256sum] = "27487652318659cfd7dc42784b713c78d29cc7a7df4fb397134c8c125f65e3b2"
|
||||
SRC_URI[sha256sum] = "aa619e08ddd9f92755f4bd24ba9577e81ae4c86bff170c3e574153ec3cdc80cc"
|
||||
|
||||
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
|
||||
RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
|
||||
@@ -10,7 +10,7 @@ PNREAL = "gst-rtsp-server"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
|
||||
|
||||
SRC_URI[sha256sum] = "ba398a7ddd559cce56ef4b91f448d174e0dccad98a493563d2d59c41a2ef39c5"
|
||||
SRC_URI[sha256sum] = "800122a798387bd4b18b558737d30a010d94154f41bd210d4c4cc2d80ecae90f"
|
||||
|
||||
S = "${WORKDIR}/${PNREAL}-${PV}"
|
||||
|
||||
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
|
||||
|
||||
SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz"
|
||||
|
||||
SRC_URI[sha256sum] = "510c6fb4ff3f676d7946ce1800e04ccf5aabe5a586d4e164d1961808fab8c94b"
|
||||
SRC_URI[sha256sum] = "57028a2cdabb749eb38a53f45cfa36f02b4e5368fb6d8684ef31d9e73ddf653b"
|
||||
|
||||
S = "${WORKDIR}/${REALPN}-${PV}"
|
||||
DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
|
||||
@@ -1,300 +0,0 @@
|
||||
From e1e2d8d58c1e09e065849cdb1f6466c0537a7c51 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
|
||||
Date: Tue, 21 Jun 2022 11:51:35 +0300
|
||||
Subject: [PATCH] bin: Fix race conditions in tests
|
||||
|
||||
The latency messages are non-deterministic and can arrive before/after
|
||||
async-done or during state-changes as they are posted by e.g. sinks from
|
||||
their streaming thread but bins are finishing asynchronous state changes
|
||||
from a secondary helper thread.
|
||||
|
||||
To solve this, expect latency messages at any time and assert that we
|
||||
receive one at some point during the test.
|
||||
|
||||
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2643>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2643]
|
||||
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
|
||||
---
|
||||
.../gstreamer/tests/check/gst/gstbin.c | 132 ++++++++++++------
|
||||
1 file changed, 92 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/subprojects/gstreamer/tests/check/gst/gstbin.c b/subprojects/gstreamer/tests/check/gst/gstbin.c
|
||||
index e366d5fe20f..88ff44db0c3 100644
|
||||
--- a/subprojects/gstreamer/tests/check/gst/gstbin.c
|
||||
+++ b/subprojects/gstreamer/tests/check/gst/gstbin.c
|
||||
@@ -27,50 +27,95 @@
|
||||
#include <gst/base/gstbasesrc.h>
|
||||
|
||||
static void
|
||||
-pop_async_done (GstBus * bus)
|
||||
+pop_async_done (GstBus * bus, gboolean * had_latency)
|
||||
{
|
||||
GstMessage *message;
|
||||
+ GstMessageType types = GST_MESSAGE_ASYNC_DONE;
|
||||
+
|
||||
+ if (!*had_latency)
|
||||
+ types |= GST_MESSAGE_LATENCY;
|
||||
|
||||
GST_DEBUG ("popping async-done message");
|
||||
- message = gst_bus_poll (bus, GST_MESSAGE_ASYNC_DONE, -1);
|
||||
|
||||
- fail_unless (message && GST_MESSAGE_TYPE (message)
|
||||
- == GST_MESSAGE_ASYNC_DONE, "did not get GST_MESSAGE_ASYNC_DONE");
|
||||
+ do {
|
||||
+ message = gst_bus_poll (bus, types, -1);
|
||||
|
||||
- gst_message_unref (message);
|
||||
- GST_DEBUG ("popped message");
|
||||
+ fail_unless (message);
|
||||
+ GST_DEBUG ("popped message %s",
|
||||
+ gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
|
||||
+
|
||||
+ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_LATENCY) {
|
||||
+ fail_unless (*had_latency == FALSE);
|
||||
+ *had_latency = TRUE;
|
||||
+ gst_clear_message (&message);
|
||||
+ types &= ~GST_MESSAGE_LATENCY;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ fail_unless (GST_MESSAGE_TYPE (message)
|
||||
+ == GST_MESSAGE_ASYNC_DONE, "did not get GST_MESSAGE_ASYNC_DONE");
|
||||
+
|
||||
+ gst_clear_message (&message);
|
||||
+ break;
|
||||
+ } while (TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
-pop_latency (GstBus * bus)
|
||||
+pop_latency (GstBus * bus, gboolean * had_latency)
|
||||
{
|
||||
GstMessage *message;
|
||||
|
||||
- GST_DEBUG ("popping async-done message");
|
||||
+ if (*had_latency)
|
||||
+ return;
|
||||
+
|
||||
+ GST_DEBUG ("popping latency message");
|
||||
message = gst_bus_poll (bus, GST_MESSAGE_LATENCY, -1);
|
||||
|
||||
- fail_unless (message && GST_MESSAGE_TYPE (message)
|
||||
+ fail_unless (message);
|
||||
+ fail_unless (GST_MESSAGE_TYPE (message)
|
||||
== GST_MESSAGE_LATENCY, "did not get GST_MESSAGE_LATENCY");
|
||||
|
||||
- gst_message_unref (message);
|
||||
- GST_DEBUG ("popped message");
|
||||
+ GST_DEBUG ("popped message %s",
|
||||
+ gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
|
||||
+ gst_clear_message (&message);
|
||||
+
|
||||
+ *had_latency = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
-pop_state_changed (GstBus * bus, int count)
|
||||
+pop_state_changed (GstBus * bus, int count, gboolean * had_latency)
|
||||
{
|
||||
GstMessage *message;
|
||||
-
|
||||
+ GstMessageType types = GST_MESSAGE_STATE_CHANGED;
|
||||
int i;
|
||||
|
||||
+ if (!*had_latency)
|
||||
+ types |= GST_MESSAGE_LATENCY;
|
||||
+
|
||||
GST_DEBUG ("popping %d messages", count);
|
||||
for (i = 0; i < count; ++i) {
|
||||
- message = gst_bus_poll (bus, GST_MESSAGE_STATE_CHANGED, -1);
|
||||
-
|
||||
- fail_unless (message && GST_MESSAGE_TYPE (message)
|
||||
- == GST_MESSAGE_STATE_CHANGED, "did not get GST_MESSAGE_STATE_CHANGED");
|
||||
-
|
||||
- gst_message_unref (message);
|
||||
+ do {
|
||||
+ message = gst_bus_poll (bus, types, -1);
|
||||
+
|
||||
+ fail_unless (message);
|
||||
+ GST_DEBUG ("popped message %s",
|
||||
+ gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
|
||||
+
|
||||
+ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_LATENCY) {
|
||||
+ fail_unless (*had_latency == FALSE);
|
||||
+ *had_latency = TRUE;
|
||||
+ gst_clear_message (&message);
|
||||
+ types &= ~GST_MESSAGE_LATENCY;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ fail_unless (GST_MESSAGE_TYPE (message)
|
||||
+ == GST_MESSAGE_STATE_CHANGED,
|
||||
+ "did not get GST_MESSAGE_STATE_CHANGED");
|
||||
+
|
||||
+ gst_message_unref (message);
|
||||
+ break;
|
||||
+ } while (TRUE);
|
||||
}
|
||||
GST_DEBUG ("popped %d messages", count);
|
||||
}
|
||||
@@ -538,6 +583,7 @@ GST_START_TEST (test_message_state_changed_children)
|
||||
GstBus *bus;
|
||||
GstStateChangeReturn ret;
|
||||
GstState current, pending;
|
||||
+ gboolean had_latency = FALSE;
|
||||
|
||||
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
|
||||
fail_unless (pipeline != NULL, "Could not create pipeline");
|
||||
@@ -576,7 +622,7 @@ GST_START_TEST (test_message_state_changed_children)
|
||||
ASSERT_OBJECT_REFCOUNT (sink, "sink", 2);
|
||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 2);
|
||||
|
||||
- pop_state_changed (bus, 3);
|
||||
+ pop_state_changed (bus, 3, &had_latency);
|
||||
fail_if (gst_bus_have_pending (bus), "unexpected pending messages");
|
||||
|
||||
ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
|
||||
@@ -619,9 +665,9 @@ GST_START_TEST (test_message_state_changed_children)
|
||||
* its state_change message */
|
||||
ASSERT_OBJECT_REFCOUNT_BETWEEN (pipeline, "pipeline", 3, 4);
|
||||
|
||||
- pop_state_changed (bus, 3);
|
||||
- pop_async_done (bus);
|
||||
- pop_latency (bus);
|
||||
+ pop_state_changed (bus, 3, &had_latency);
|
||||
+ pop_async_done (bus, &had_latency);
|
||||
+ pop_latency (bus, &had_latency);
|
||||
fail_if ((gst_bus_pop (bus)) != NULL);
|
||||
|
||||
ASSERT_OBJECT_REFCOUNT_BETWEEN (bus, "bus", 2, 3);
|
||||
@@ -648,7 +694,7 @@ GST_START_TEST (test_message_state_changed_children)
|
||||
ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 2, 4);
|
||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3);
|
||||
|
||||
- pop_state_changed (bus, 3);
|
||||
+ pop_state_changed (bus, 3, &had_latency);
|
||||
fail_if ((gst_bus_pop (bus)) != NULL);
|
||||
|
||||
ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
|
||||
@@ -669,7 +715,7 @@ GST_START_TEST (test_message_state_changed_children)
|
||||
ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 3, 4);
|
||||
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3);
|
||||
|
||||
- pop_state_changed (bus, 6);
|
||||
+ pop_state_changed (bus, 6, &had_latency);
|
||||
fail_if ((gst_bus_pop (bus)) != NULL);
|
||||
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
||||
@@ -696,6 +742,7 @@ GST_START_TEST (test_watch_for_state_change)
|
||||
GstElement *src, *sink, *bin;
|
||||
GstBus *bus;
|
||||
GstStateChangeReturn ret;
|
||||
+ gboolean had_latency = FALSE;
|
||||
|
||||
bin = gst_element_factory_make ("bin", NULL);
|
||||
fail_unless (bin != NULL, "Could not create bin");
|
||||
@@ -722,9 +769,9 @@ GST_START_TEST (test_watch_for_state_change)
|
||||
GST_CLOCK_TIME_NONE);
|
||||
fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
|
||||
|
||||
- pop_state_changed (bus, 6);
|
||||
- pop_async_done (bus);
|
||||
- pop_latency (bus);
|
||||
+ pop_state_changed (bus, 6, &had_latency);
|
||||
+ pop_async_done (bus, &had_latency);
|
||||
+ pop_latency (bus, &had_latency);
|
||||
|
||||
fail_unless (gst_bus_have_pending (bus) == FALSE,
|
||||
"Unexpected messages on bus");
|
||||
@@ -732,16 +779,17 @@ GST_START_TEST (test_watch_for_state_change)
|
||||
ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
|
||||
fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
|
||||
|
||||
- pop_state_changed (bus, 3);
|
||||
+ pop_state_changed (bus, 3, &had_latency);
|
||||
|
||||
+ had_latency = FALSE;
|
||||
/* this one might return either SUCCESS or ASYNC, likely SUCCESS */
|
||||
ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
|
||||
gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE);
|
||||
|
||||
- pop_state_changed (bus, 3);
|
||||
+ pop_state_changed (bus, 3, &had_latency);
|
||||
if (ret == GST_STATE_CHANGE_ASYNC) {
|
||||
- pop_async_done (bus);
|
||||
- pop_latency (bus);
|
||||
+ pop_async_done (bus, &had_latency);
|
||||
+ pop_latency (bus, &had_latency);
|
||||
}
|
||||
|
||||
fail_unless (gst_bus_have_pending (bus) == FALSE,
|
||||
@@ -898,6 +946,7 @@ GST_START_TEST (test_children_state_change_order_flagged_sink)
|
||||
GstStateChangeReturn ret;
|
||||
GstState current, pending;
|
||||
GstBus *bus;
|
||||
+ gboolean had_latency = FALSE;
|
||||
|
||||
pipeline = gst_pipeline_new (NULL);
|
||||
fail_unless (pipeline != NULL, "Could not create pipeline");
|
||||
@@ -951,10 +1000,11 @@ GST_START_TEST (test_children_state_change_order_flagged_sink)
|
||||
ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 107);
|
||||
#else
|
||||
|
||||
- pop_state_changed (bus, 2); /* pop remaining ready => paused messages off the bus */
|
||||
+ pop_state_changed (bus, 2, &had_latency); /* pop remaining ready => paused messages off the bus */
|
||||
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
|
||||
108);
|
||||
- pop_async_done (bus);
|
||||
+ pop_async_done (bus, &had_latency);
|
||||
+ pop_latency (bus, &had_latency);
|
||||
#endif
|
||||
/* PAUSED => PLAYING */
|
||||
GST_DEBUG ("popping PAUSED -> PLAYING messages");
|
||||
@@ -972,8 +1022,8 @@ GST_START_TEST (test_children_state_change_order_flagged_sink)
|
||||
fail_if (ret != GST_STATE_CHANGE_SUCCESS, "State change to READY failed");
|
||||
|
||||
/* TODO: do we need to check downwards state change order as well? */
|
||||
- pop_state_changed (bus, 4); /* pop playing => paused messages off the bus */
|
||||
- pop_state_changed (bus, 4); /* pop paused => ready messages off the bus */
|
||||
+ pop_state_changed (bus, 4, &had_latency); /* pop playing => paused messages off the bus */
|
||||
+ pop_state_changed (bus, 4, &had_latency); /* pop paused => ready messages off the bus */
|
||||
|
||||
while (GST_OBJECT_REFCOUNT_VALUE (pipeline) > 1)
|
||||
THREAD_SWITCH ();
|
||||
@@ -1002,6 +1052,7 @@ GST_START_TEST (test_children_state_change_order_semi_sink)
|
||||
GstStateChangeReturn ret;
|
||||
GstState current, pending;
|
||||
GstBus *bus;
|
||||
+ gboolean had_latency = FALSE;
|
||||
|
||||
/* (2) Now again, but check other code path where we don't have
|
||||
* a proper sink correctly flagged as such, but a 'semi-sink' */
|
||||
@@ -1056,10 +1107,11 @@ GST_START_TEST (test_children_state_change_order_semi_sink)
|
||||
ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_READY, GST_STATE_PAUSED, 206);
|
||||
ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 207);
|
||||
#else
|
||||
- pop_state_changed (bus, 2); /* pop remaining ready => paused messages off the bus */
|
||||
+ pop_state_changed (bus, 2, &had_latency); /* pop remaining ready => paused messages off the bus */
|
||||
ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
|
||||
208);
|
||||
- pop_async_done (bus);
|
||||
+ pop_async_done (bus, &had_latency);
|
||||
+ pop_latency (bus, &had_latency);
|
||||
|
||||
/* PAUSED => PLAYING */
|
||||
GST_DEBUG ("popping PAUSED -> PLAYING messages");
|
||||
@@ -1076,8 +1128,8 @@ GST_START_TEST (test_children_state_change_order_semi_sink)
|
||||
fail_if (ret != GST_STATE_CHANGE_SUCCESS, "State change to READY failed");
|
||||
|
||||
/* TODO: do we need to check downwards state change order as well? */
|
||||
- pop_state_changed (bus, 4); /* pop playing => paused messages off the bus */
|
||||
- pop_state_changed (bus, 4); /* pop paused => ready messages off the bus */
|
||||
+ pop_state_changed (bus, 4, &had_latency); /* pop playing => paused messages off the bus */
|
||||
+ pop_state_changed (bus, 4, &had_latency); /* pop paused => ready messages off the bus */
|
||||
|
||||
GST_DEBUG ("waiting for pipeline to reach refcount 1");
|
||||
while (GST_OBJECT_REFCOUNT_VALUE (pipeline) > 1)
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -21,9 +21,8 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x
|
||||
file://0002-tests-add-support-for-install-the-tests.patch;striplevel=3 \
|
||||
file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \
|
||||
file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
|
||||
file://0005-bin-Fix-race-conditions-in-tests.patch;striplevel=3 \
|
||||
"
|
||||
SRC_URI[sha256sum] = "5a19083faaf361d21fc391124f78ba6d609be55845a82fa8f658230e5fa03dff"
|
||||
SRC_URI[sha256sum] = "0545b030960680f71a95f9d39c95daae54b4d317d335e8f239d81138773c9b90"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
|
||||
check \
|
||||
104
meta/recipes-sato/webkit/webkitgtk/CVE-2022-42867.patch
Normal file
104
meta/recipes-sato/webkit/webkitgtk/CVE-2022-42867.patch
Normal file
@@ -0,0 +1,104 @@
|
||||
From f67a882170609d15836204a689dc552322fbe653 Mon Sep 17 00:00:00 2001
|
||||
From: Yogita Urade <yogita.urade@windriver.com>
|
||||
Date: Wed, 7 Jun 2023 08:15:11 +0000
|
||||
Subject: [oe-core][kirkstone][PATCH 1/1] RenderElement::updateFillImages
|
||||
should take pointer arguments like other similar functions
|
||||
https://bugs.webkit.org/show_bug.cgi?id=247317 rdar://100273147
|
||||
|
||||
Reviewed by Alan Baradlay.
|
||||
|
||||
* Source/WebCore/rendering/RenderElement.cpp:
|
||||
(WebCore::RenderElement::updateFillImages):
|
||||
(WebCore::RenderElement::styleDidChange):
|
||||
* Source/WebCore/rendering/RenderElement.h:
|
||||
|
||||
Canonical link: https://commits.webkit.org/256215@main
|
||||
|
||||
CVE: CVE-2022-42867
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/WebKit/WebKit/commit/091a04e55c801ac6ba13f4b328fbee2eece853fc]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
Source/WebCore/rendering/RenderElement.cpp | 27 ++++++++++++++--------
|
||||
Source/WebCore/rendering/RenderElement.h | 2 +-
|
||||
2 files changed, 19 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/Source/WebCore/rendering/RenderElement.cpp b/Source/WebCore/rendering/RenderElement.cpp
|
||||
index da43bf3d..931686b8 100644
|
||||
--- a/Source/WebCore/rendering/RenderElement.cpp
|
||||
+++ b/Source/WebCore/rendering/RenderElement.cpp
|
||||
@@ -358,7 +358,7 @@ inline bool RenderElement::shouldRepaintForStyleDifference(StyleDifference diff)
|
||||
return diff == StyleDifference::Repaint || (diff == StyleDifference::RepaintIfTextOrBorderOrOutline && hasImmediateNonWhitespaceTextChildOrBorderOrOutline());
|
||||
}
|
||||
|
||||
-void RenderElement::updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers)
|
||||
+void RenderElement::updateFillImages(const FillLayer* oldLayers, const FillLayer* newLayers)
|
||||
{
|
||||
auto fillImagesAreIdentical = [](const FillLayer* layer1, const FillLayer* layer2) -> bool {
|
||||
if (layer1 == layer2)
|
||||
@@ -379,7 +379,7 @@ void RenderElement::updateFillImages(const FillLayer* oldLayers, const FillLayer
|
||||
};
|
||||
|
||||
auto isRegisteredWithNewFillImages = [&]() -> bool {
|
||||
- for (auto* layer = &newLayers; layer; layer = layer->next()) {
|
||||
+ for (auto* layer = newLayers; layer; layer = layer->next()) {
|
||||
if (layer->image() && !layer->image()->hasClient(*this))
|
||||
return false;
|
||||
}
|
||||
@@ -388,11 +388,11 @@ void RenderElement::updateFillImages(const FillLayer* oldLayers, const FillLayer
|
||||
|
||||
// If images have the same characteristics and this element is already registered as a
|
||||
// client to the new images, there is nothing to do.
|
||||
- if (fillImagesAreIdentical(oldLayers, &newLayers) && isRegisteredWithNewFillImages())
|
||||
+ if (fillImagesAreIdentical(oldLayers, newLayers) && isRegisteredWithNewFillImages())
|
||||
return;
|
||||
|
||||
// Add before removing, to avoid removing all clients of an image that is in both sets.
|
||||
- for (auto* layer = &newLayers; layer; layer = layer->next()) {
|
||||
+ for (auto* layer = newLayers; layer; layer = layer->next()) {
|
||||
if (layer->image())
|
||||
layer->image()->addClient(*this);
|
||||
}
|
||||
@@ -937,11 +937,20 @@ static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b)
|
||||
|
||||
void RenderElement::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
|
||||
{
|
||||
- updateFillImages(oldStyle ? &oldStyle->backgroundLayers() : nullptr, m_style.backgroundLayers());
|
||||
- updateFillImages(oldStyle ? &oldStyle->maskLayers() : nullptr, m_style.maskLayers());
|
||||
- updateImage(oldStyle ? oldStyle->borderImage().image() : nullptr, m_style.borderImage().image());
|
||||
- updateImage(oldStyle ? oldStyle->maskBoxImage().image() : nullptr, m_style.maskBoxImage().image());
|
||||
- updateShapeImage(oldStyle ? oldStyle->shapeOutside() : nullptr, m_style.shapeOutside());
|
||||
+ auto registerImages = [this](auto* style, auto* oldStyle) {
|
||||
+ if (!style && !oldStyle)
|
||||
+ return;
|
||||
+ updateFillImages(oldStyle ? &oldStyle->backgroundLayers() : nullptr, style ? &style->backgroundLayers() : nullptr);
|
||||
+ updateFillImages(oldStyle ? &oldStyle->maskLayers() : nullptr, style ? &style->maskLayers() : nullptr);
|
||||
+ updateImage(oldStyle ? oldStyle->borderImage().image() : nullptr, style ? style->borderImage().image() : nullptr);
|
||||
+ updateImage(oldStyle ? oldStyle->maskBoxImage().image() : nullptr, style ? style->maskBoxImage().image() : nullptr);
|
||||
+ updateShapeImage(oldStyle ? oldStyle->shapeOutside() : nullptr, style ? style->shapeOutside() : nullptr);
|
||||
+ };
|
||||
+
|
||||
+ registerImages(&style(), oldStyle);
|
||||
+
|
||||
+ // Are there other pseudo-elements that need the resources to be registered?
|
||||
+ registerImages(style().getCachedPseudoStyle(PseudoId::FirstLine), oldStyle ? oldStyle->getCachedPseudoStyle(PseudoId::FirstLine) : nullptr);
|
||||
|
||||
SVGRenderSupport::styleChanged(*this, oldStyle);
|
||||
|
||||
diff --git a/Source/WebCore/rendering/RenderElement.h b/Source/WebCore/rendering/RenderElement.h
|
||||
index f376cecb..d6ba2cdf 100644
|
||||
--- a/Source/WebCore/rendering/RenderElement.h
|
||||
+++ b/Source/WebCore/rendering/RenderElement.h
|
||||
@@ -349,7 +349,7 @@ private:
|
||||
bool shouldRepaintForStyleDifference(StyleDifference) const;
|
||||
bool hasImmediateNonWhitespaceTextChildOrBorderOrOutline() const;
|
||||
|
||||
- void updateFillImages(const FillLayer*, const FillLayer&);
|
||||
+ void updateFillImages(const FillLayer*, const FillLayer*);
|
||||
void updateImage(StyleImage*, StyleImage*);
|
||||
void updateShapeImage(const ShapeValue*, const ShapeValue*);
|
||||
|
||||
--
|
||||
2.35.5
|
||||
43
meta/recipes-sato/webkit/webkitgtk/CVE-2022-46691.patch
Normal file
43
meta/recipes-sato/webkit/webkitgtk/CVE-2022-46691.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From fd57a49d07c9c285780495344073350182fd7c7c Mon Sep 17 00:00:00 2001
|
||||
From: Yijia Huang <hyjorc1@gmail.com>
|
||||
Date: Mon, 10 Oct 2022 15:42:34 -0700
|
||||
Subject: [PATCH] [JSC] Should model BigInt with side effects
|
||||
https://bugs.webkit.org/show_bug.cgi?id=246291 rdar://100494823
|
||||
|
||||
Reviewed by Yusuke Suzuki.
|
||||
|
||||
Operations with two BigInt operands have side effects,
|
||||
which should not be hoisted from loops.
|
||||
|
||||
* Source/JavaScriptCore/dfg/DFGClobberize.cpp:
|
||||
(JSC::DFG::doesWrites):
|
||||
* Source/JavaScriptCore/dfg/DFGClobberize.h:
|
||||
(JSC::DFG::clobberize):
|
||||
|
||||
Canonical link: https://commits.webkit.org/255368@main
|
||||
|
||||
CVE: CVE-2022-46691
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/WebKit/WebKit/commit/fd57a49d07c9c285780495344073350182fd7c7c]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
Source/JavaScriptCore/dfg/DFGClobberize.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Source/JavaScriptCore/dfg/DFGClobberize.h b/Source/JavaScriptCore/dfg/DFGClobberize.h
|
||||
index 0363ab20dcd8..4b1bcfea1fd7 100644
|
||||
--- a/Source/JavaScriptCore/dfg/DFGClobberize.h
|
||||
+++ b/Source/JavaScriptCore/dfg/DFGClobberize.h
|
||||
@@ -811,6 +811,8 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
|
||||
case ValueBitRShift:
|
||||
// FIXME: this use of single-argument isBinaryUseKind would prevent us from specializing (for example) for a HeapBigInt left-operand and a BigInt32 right-operand.
|
||||
if (node->isBinaryUseKind(AnyBigIntUse) || node->isBinaryUseKind(BigInt32Use) || node->isBinaryUseKind(HeapBigIntUse)) {
|
||||
+ read(World);
|
||||
+ write(SideState);
|
||||
def(PureValue(node));
|
||||
return;
|
||||
}
|
||||
--
|
||||
2.40.0
|
||||
136
meta/recipes-sato/webkit/webkitgtk/CVE-2022-46699.patch
Normal file
136
meta/recipes-sato/webkit/webkitgtk/CVE-2022-46699.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
From 28686e63de0d3d7270a49b0d6b656467bc4fbf68 Mon Sep 17 00:00:00 2001
|
||||
From: Justin Michaud <justin_michaud@apple.com>
|
||||
Date: Wed, 9 Nov 2022 19:20:41 -0800
|
||||
Subject: [PATCH] Error() ICs should not cache special properties.
|
||||
https://bugs.webkit.org/show_bug.cgi?id=247699
|
||||
|
||||
Reviewed by Yusuke Suzuki.
|
||||
|
||||
HasOwnProperty/DeleteProperty are not always cacheable for special Error()
|
||||
properties like column. These special properties are materialized on-demand
|
||||
in materializeErrorInfoIfNeeded, but this function's behaviour can be changed
|
||||
by Error.stackTraceLimit without causing a structure transition or firing watchpoints.
|
||||
|
||||
That is, we cannot cache property misses, and we cannot assume HasOwnProperty is deterministic
|
||||
for a given structure if we are using one of these properties.
|
||||
|
||||
* Source/JavaScriptCore/runtime/ErrorInstance.cpp:
|
||||
(JSC::ErrorInstance::deleteProperty):
|
||||
* Source/JavaScriptCore/runtime/ErrorInstance.h:
|
||||
|
||||
Canonical link: https://commits.webkit.org/256519@main
|
||||
|
||||
CVE: CVE-2022-46699
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/WebKit/WebKit/commit/28686e63de0d3d7270a49b0d6b656467bc4fbf68]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
JSTests/stress/delete-cache-error.js | 19 ++++++++++++++++++
|
||||
.../get-own-property-slot-cache-error.js | 6 ++++++
|
||||
JSTests/stress/get-property-cache-error.js | 20 +++++++++++++++++++
|
||||
.../JavaScriptCore/runtime/ErrorInstance.cpp | 4 +++-
|
||||
Source/JavaScriptCore/runtime/ErrorInstance.h | 3 ++-
|
||||
5 files changed, 50 insertions(+), 2 deletions(-)
|
||||
create mode 100644 JSTests/stress/delete-cache-error.js
|
||||
create mode 100644 JSTests/stress/get-own-property-slot-cache-error.js
|
||||
create mode 100644 JSTests/stress/get-property-cache-error.js
|
||||
|
||||
diff --git a/JSTests/stress/delete-cache-error.js b/JSTests/stress/delete-cache-error.js
|
||||
new file mode 100644
|
||||
index 000000000000..d77c09185a13
|
||||
--- /dev/null
|
||||
+++ b/JSTests/stress/delete-cache-error.js
|
||||
@@ -0,0 +1,19 @@
|
||||
+delete Error.stackTraceLimit
|
||||
+
|
||||
+// sourceURL is not materialized
|
||||
+function cacheColumn(o) {
|
||||
+ delete o.sourceURL
|
||||
+}
|
||||
+noInline(cacheColumn)
|
||||
+
|
||||
+for (let i = 0; i < 200; ++i) {
|
||||
+ let e = Error()
|
||||
+ cacheColumn(e)
|
||||
+ if (e.sourceURL !== undefined)
|
||||
+ throw "Test failed on iteration " + i + " " + e.sourceURL
|
||||
+
|
||||
+ if (i == 197) {
|
||||
+ // now it is
|
||||
+ Error.stackTraceLimit = 10
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/JSTests/stress/get-own-property-slot-cache-error.js b/JSTests/stress/get-own-property-slot-cache-error.js
|
||||
new file mode 100644
|
||||
index 000000000000..f8202213bf79
|
||||
--- /dev/null
|
||||
+++ b/JSTests/stress/get-own-property-slot-cache-error.js
|
||||
@@ -0,0 +1,6 @@
|
||||
+delete Error.stackTraceLimit
|
||||
+// GetOwnPropertySlot does not materializeErrorInfoIfNeeded because stackString is null.
|
||||
+Object.hasOwn(Error(), "column")
|
||||
+Error.stackTraceLimit = 10
|
||||
+// Now it does
|
||||
+Object.hasOwn(Error(), "column")
|
||||
\ No newline at end of file
|
||||
diff --git a/JSTests/stress/get-property-cache-error.js b/JSTests/stress/get-property-cache-error.js
|
||||
new file mode 100644
|
||||
index 000000000000..b35272ea6fe2
|
||||
--- /dev/null
|
||||
+++ b/JSTests/stress/get-property-cache-error.js
|
||||
@@ -0,0 +1,20 @@
|
||||
+// GetOwnPropertySlot does not materializeErrorInfoIfNeeded because stackString is null.
|
||||
+delete Error.stackTraceLimit
|
||||
+expected = undefined
|
||||
+
|
||||
+function cacheColumn(o) {
|
||||
+ return o.column
|
||||
+}
|
||||
+noInline(cacheColumn)
|
||||
+
|
||||
+for (let i = 0; i < 1000; ++i) {
|
||||
+ let val = cacheColumn(Error())
|
||||
+ if (val !== expected)
|
||||
+ throw "Test failed on iteration " + i + ": " + val
|
||||
+
|
||||
+ if (i == 900) {
|
||||
+ // now it does
|
||||
+ Error.stackTraceLimit = 10
|
||||
+ expected = 32
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/Source/JavaScriptCore/runtime/ErrorInstance.cpp b/Source/JavaScriptCore/runtime/ErrorInstance.cpp
|
||||
index ddf96869e84a..8e5373257d34 100644
|
||||
--- a/Source/JavaScriptCore/runtime/ErrorInstance.cpp
|
||||
+++ b/Source/JavaScriptCore/runtime/ErrorInstance.cpp
|
||||
@@ -303,7 +303,9 @@ bool ErrorInstance::deleteProperty(JSCell* cell, JSGlobalObject* globalObject, P
|
||||
{
|
||||
VM& vm = globalObject->vm();
|
||||
ErrorInstance* thisObject = jsCast<ErrorInstance*>(cell);
|
||||
- thisObject->materializeErrorInfoIfNeeded(vm, propertyName);
|
||||
+ bool materializedProperties = thisObject->materializeErrorInfoIfNeeded(vm, propertyName);
|
||||
+ if (materializedProperties)
|
||||
+ slot.disableCaching();
|
||||
return Base::deleteProperty(thisObject, globalObject, propertyName, slot);
|
||||
}
|
||||
|
||||
diff --git a/Source/JavaScriptCore/runtime/ErrorInstance.h b/Source/JavaScriptCore/runtime/ErrorInstance.h
|
||||
index 28807b4ea33e..2afb153a7442 100644
|
||||
--- a/Source/JavaScriptCore/runtime/ErrorInstance.h
|
||||
+++ b/Source/JavaScriptCore/runtime/ErrorInstance.h
|
||||
@@ -30,7 +30,8 @@ namespace JSC {
|
||||
class ErrorInstance : public JSNonFinalObject {
|
||||
public:
|
||||
using Base = JSNonFinalObject;
|
||||
- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames | OverridesPut;
|
||||
+
|
||||
+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames | OverridesPut | GetOwnPropertySlotIsImpureForPropertyAbsence;
|
||||
static constexpr bool needsDestruction = true;
|
||||
|
||||
static void destroy(JSCell* cell)
|
||||
--
|
||||
2.40.0
|
||||
67
meta/recipes-sato/webkit/webkitgtk/CVE-2022-46700.patch
Normal file
67
meta/recipes-sato/webkit/webkitgtk/CVE-2022-46700.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
From 86fbeb6fcd638e2350b09a43dde355f9830e75da Mon Sep 17 00:00:00 2001
|
||||
From: David Degazio <d_degazio@apple.com>
|
||||
Date: Tue, 8 Nov 2022 19:54:33 -0800
|
||||
Subject: [PATCH] Intl.Locale.prototype.hourCycles leaks empty JSValue to
|
||||
script https://bugs.webkit.org/show_bug.cgi?id=247562 rdar://102031379
|
||||
|
||||
Reviewed by Mark Lam.
|
||||
|
||||
We currently don't check if IntlLocale::hourCycles returns a null JSArray, which allows it
|
||||
to be encoded as an empty JSValue and exposed to user code. This patch throws a TypeError
|
||||
when udatpg_open returns a failed status.
|
||||
|
||||
* JSTests/stress/intl-locale-invalid-hourCycles.js: Added.
|
||||
(main):
|
||||
* Source/JavaScriptCore/runtime/IntlLocale.cpp:
|
||||
(JSC::IntlLocale::hourCycles):
|
||||
|
||||
Canonical link: https://commits.webkit.org/256473@main
|
||||
|
||||
CVE:CVE-2022-46700
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/WebKit/WebKit/commit/86fbeb6fcd638e2350b09a43dde355f9830e75da]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
JSTests/stress/intl-locale-invalid-hourCycles.js | 12 ++++++++++++
|
||||
Source/JavaScriptCore/runtime/IntlLocale.cpp | 4 +++-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
create mode 100644 JSTests/stress/intl-locale-invalid-hourCycles.js
|
||||
|
||||
diff --git a/JSTests/stress/intl-locale-invalid-hourCycles.js b/JSTests/stress/intl-locale-invalid-hourCycles.js
|
||||
new file mode 100644
|
||||
index 000000000000..7b94eb844764
|
||||
--- /dev/null
|
||||
+++ b/JSTests/stress/intl-locale-invalid-hourCycles.js
|
||||
@@ -0,0 +1,12 @@
|
||||
+function main() {
|
||||
+ const v24 = new Intl.Locale("trimEnd", { 'numberingSystem': "foobar" });
|
||||
+ let empty = v24.hourCycles;
|
||||
+ print(empty);
|
||||
+}
|
||||
+
|
||||
+try {
|
||||
+ main();
|
||||
+} catch (e) {
|
||||
+ if (!(e instanceof TypeError))
|
||||
+ throw e;
|
||||
+}
|
||||
diff --git a/Source/JavaScriptCore/runtime/IntlLocale.cpp b/Source/JavaScriptCore/runtime/IntlLocale.cpp
|
||||
index c3c346163a18..bef424727a8a 100644
|
||||
--- a/Source/JavaScriptCore/runtime/IntlLocale.cpp
|
||||
+++ b/Source/JavaScriptCore/runtime/IntlLocale.cpp
|
||||
@@ -632,8 +632,10 @@ JSArray* IntlLocale::hourCycles(JSGlobalObject* globalObject)
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
auto generator = std::unique_ptr<UDateTimePatternGenerator, ICUDeleter<udatpg_close>>(udatpg_open(m_localeID.data(), &status));
|
||||
- if (U_FAILURE(status))
|
||||
+ if (U_FAILURE(status)) {
|
||||
+ throwTypeError(globalObject, scope, "invalid locale"_s);
|
||||
return nullptr;
|
||||
+ }
|
||||
|
||||
// Use "j" skeleton and parse pattern to retrieve the configured hour-cycle information.
|
||||
constexpr const UChar skeleton[] = { 'j', 0 };
|
||||
--
|
||||
2.40.0
|
||||
@@ -17,6 +17,10 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BP}.tar.xz \
|
||||
file://0001-When-building-introspection-files-do-not-quote-CFLAG.patch \
|
||||
file://CVE-2022-32888.patch \
|
||||
file://CVE-2022-32923.patch \
|
||||
file://CVE-2022-46691.patch \
|
||||
file://CVE-2022-46699.patch \
|
||||
file://CVE-2022-42867.patch \
|
||||
file://CVE-2022-46700.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "0ad9fb6bf28308fe3889faf184bd179d13ac1b46835d2136edbab2c133d00437"
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Fri, 10 Mar 2023 09:22:43 +0100
|
||||
Subject: [PATCH] url: only reuse connections with same GSS delegation
|
||||
|
||||
Upstream-Status: Backport from [https://github.com/curl/curl/commit/af369db4d3833272b8ed443f7fcc2e757a0872eb]
|
||||
Upstream-Status: Backport from [https://github.com/curl/curl/commit/cb49e67303dbafbab1cebf4086e3ec15b7d56ee5]
|
||||
CVE: CVE-2023-27536
|
||||
Signed-off-by: Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
Signed-off-by: Sourav Kumar Pramanik <pramanik.souravkumar@gmail.com>
|
||||
---
|
||||
lib/url.c | 6 ++++++
|
||||
lib/urldata.h | 1 +
|
||||
|
||||
33
meta/recipes-support/curl/curl/CVE-2023-28319.patch
Normal file
33
meta/recipes-support/curl/curl/CVE-2023-28319.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 8e21b1a05f3c0ee098dbcb6c3d84cb61f102a122 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Mon, 8 May 2023 14:33:54 +0200
|
||||
Subject: [PATCH] libssh2: free fingerprint better
|
||||
|
||||
Reported-by: Wei Chong Tan
|
||||
Closes #11088
|
||||
|
||||
CVE: CVE-2023-28319
|
||||
Upstream-Status: Backport [https://github.com/curl/curl/commit/8e21b1a05f3c0ee098dbcb6c]
|
||||
Comments: Hunks Refreshed
|
||||
Signed-off-by: Bhabu Bindu <bhabu.bindu@kpit.com>
|
||||
---
|
||||
lib/vssh/libssh2.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
|
||||
index bfcc94e160178..dd39a844c646b 100644
|
||||
--- a/lib/vssh/libssh2.c
|
||||
+++ b/lib/vssh/libssh2.c
|
||||
@@ -695,11 +695,10 @@
|
||||
*/
|
||||
if((pub_pos != b64_pos) ||
|
||||
Curl_strncasecompare(fingerprint_b64, pubkey_sha256, pub_pos) != 1) {
|
||||
- free(fingerprint_b64);
|
||||
-
|
||||
failf(data,
|
||||
"Denied establishing ssh session: mismatch sha256 fingerprint. "
|
||||
"Remote %s is not equal to %s", fingerprint_b64, pubkey_sha256);
|
||||
+ free(fingerprint_b64);
|
||||
state(data, SSH_SESSION_FREE);
|
||||
sshc->actualcode = CURLE_PEER_FAILED_VERIFICATION;
|
||||
return sshc->actualcode;
|
||||
83
meta/recipes-support/curl/curl/CVE-2023-28320.patch
Normal file
83
meta/recipes-support/curl/curl/CVE-2023-28320.patch
Normal file
@@ -0,0 +1,83 @@
|
||||
From 13718030ad4b3209a7583b4f27f683cd3a6fa5f2 Mon Sep 17 00:00:00 2001
|
||||
From: Harry Sintonen <sintonen@iki.fi>
|
||||
Date: Tue, 25 Apr 2023 09:22:26 +0200
|
||||
Subject: [PATCH] hostip: add locks around use of global buffer for alarm()
|
||||
|
||||
When building with the sync name resolver and timeout ability we now
|
||||
require thread-safety to be present to enable it.
|
||||
|
||||
Closes #11030
|
||||
|
||||
CVE: CVE-2023-28320
|
||||
Upstream-Status: Backport [https://github.com/curl/curl/commit/13718030ad4b3209a7583b]
|
||||
Signed-off-by: Bhabu Bindu <bhabu.bindu@kpit.com>
|
||||
---
|
||||
lib/hostip.c | 19 +++++++++++++++----
|
||||
1 file changed, 15 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/hostip.c b/lib/hostip.c
|
||||
index 2381290fdd43e..e410cda69ae6e 100644
|
||||
--- a/lib/hostip.c
|
||||
+++ b/lib/hostip.c
|
||||
@@ -70,12 +70,19 @@
|
||||
#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>
|
||||
#endif
|
||||
|
||||
-#if defined(CURLRES_SYNCH) && \
|
||||
- defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP)
|
||||
+#if defined(CURLRES_SYNCH) && \
|
||||
+ defined(HAVE_ALARM) && \
|
||||
+ defined(SIGALRM) && \
|
||||
+ defined(HAVE_SIGSETJMP) && \
|
||||
+ defined(GLOBAL_INIT_IS_THREADSAFE)
|
||||
/* alarm-based timeouts can only be used with all the dependencies satisfied */
|
||||
#define USE_ALARM_TIMEOUT
|
||||
#endif
|
||||
|
||||
+#ifdef USE_ALARM_TIMEOUT
|
||||
+#include "easy_lock.h"
|
||||
+#endif
|
||||
+
|
||||
#define MAX_HOSTCACHE_LEN (255 + 7) /* max FQDN + colon + port number + zero */
|
||||
|
||||
/*
|
||||
@@ -254,11 +261,12 @@ void Curl_hostcache_prune(struct Curl_easy *data)
|
||||
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
||||
}
|
||||
|
||||
-#ifdef HAVE_SIGSETJMP
|
||||
+#ifdef USE_ALARM_TIMEOUT
|
||||
/* Beware this is a global and unique instance. This is used to store the
|
||||
return address that we can jump back to from inside a signal handler. This
|
||||
is not thread-safe stuff. */
|
||||
sigjmp_buf curl_jmpenv;
|
||||
+curl_simple_lock curl_jmpenv_lock;
|
||||
#endif
|
||||
|
||||
/* lookup address, returns entry if found and not stale */
|
||||
@@ -832,7 +840,6 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
|
||||
static
|
||||
void alarmfunc(int sig)
|
||||
{
|
||||
- /* this is for "-ansi -Wall -pedantic" to stop complaining! (rabe) */
|
||||
(void)sig;
|
||||
siglongjmp(curl_jmpenv, 1);
|
||||
}
|
||||
@@ -912,6 +919,8 @@ enum resolve_t Curl_resolv_timeout(struct Curl_easy *data,
|
||||
This should be the last thing we do before calling Curl_resolv(),
|
||||
as otherwise we'd have to worry about variables that get modified
|
||||
before we invoke Curl_resolv() (and thus use "volatile"). */
|
||||
+ curl_simple_lock_lock(&curl_jmpenv_lock);
|
||||
+
|
||||
if(sigsetjmp(curl_jmpenv, 1)) {
|
||||
/* this is coming from a siglongjmp() after an alarm signal */
|
||||
failf(data, "name lookup timed out");
|
||||
@@ -980,6 +989,8 @@ enum resolve_t Curl_resolv_timeout(struct Curl_easy *data,
|
||||
#endif
|
||||
#endif /* HAVE_SIGACTION */
|
||||
|
||||
+ curl_simple_lock_unlock(&curl_jmpenv_lock);
|
||||
+
|
||||
/* switch back the alarm() to either zero or to what it was before minus
|
||||
the time we spent until now! */
|
||||
if(prev_alarm) {
|
||||
302
meta/recipes-support/curl/curl/CVE-2023-28321.patch
Normal file
302
meta/recipes-support/curl/curl/CVE-2023-28321.patch
Normal file
@@ -0,0 +1,302 @@
|
||||
From 199f2d440d8659b42670c1b796220792b01a97bf Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Mon, 24 Apr 2023 21:07:02 +0200
|
||||
Subject: [PATCH] hostcheck: fix host name wildcard checking
|
||||
|
||||
The leftmost "label" of the host name can now only match against single
|
||||
'*'. Like the browsers have worked for a long time.
|
||||
|
||||
- extended unit test 1397 for this
|
||||
- move some SOURCE variables from unit/Makefile.am to unit/Makefile.inc
|
||||
|
||||
Reported-by: Hiroki Kurosawa
|
||||
Closes #11018
|
||||
|
||||
CVE: CVE-2023-28321
|
||||
Upstream-Status: Backport [https://github.com/curl/curl/commit/199f2d440d8659b42]
|
||||
Comments: Hunks removed as changes already exist
|
||||
Removed hunks from files:
|
||||
tests/unit/Makefile.am
|
||||
tests/unit/Makefile.inc
|
||||
Signed-off-by: Bhabu Bindu <bhabu.bindu@kpit.com>
|
||||
---
|
||||
lib/vtls/hostcheck.c | 50 +++++++--------
|
||||
tests/data/test1397 | 10 ++-
|
||||
tests/unit/Makefile.am | 94 ----------------------------
|
||||
tests/unit/Makefile.inc | 94 ++++++++++++++++++++++++++++
|
||||
tests/unit/unit1397.c | 134 ++++++++++++++++++++++++----------------
|
||||
5 files changed, 202 insertions(+), 180 deletions(-)
|
||||
|
||||
diff --git a/lib/vtls/hostcheck.c b/lib/vtls/hostcheck.c
|
||||
index e827dc58f378c..d061c6356f97f 100644
|
||||
--- a/lib/vtls/hostcheck.c
|
||||
+++ b/lib/vtls/hostcheck.c
|
||||
@@ -71,7 +71,12 @@ static bool pmatch(const char *hostname, size_t hostlen,
|
||||
* apparent distinction between a name and an IP. We need to detect the use of
|
||||
* an IP address and not wildcard match on such names.
|
||||
*
|
||||
+ * Only match on "*" being used for the leftmost label, not "a*", "a*b" nor
|
||||
+ * "*b".
|
||||
+ *
|
||||
* Return TRUE on a match. FALSE if not.
|
||||
+ *
|
||||
+ * @unittest: 1397
|
||||
*/
|
||||
|
||||
static bool hostmatch(const char *hostname,
|
||||
@@ -79,53 +84,42 @@ static bool hostmatch(const char *hostname,
|
||||
const char *pattern,
|
||||
size_t patternlen)
|
||||
{
|
||||
- const char *pattern_label_end, *wildcard, *hostname_label_end;
|
||||
- size_t prefixlen, suffixlen;
|
||||
+ const char *pattern_label_end;
|
||||
|
||||
- /* normalize pattern and hostname by stripping off trailing dots */
|
||||
+ DEBUGASSERT(pattern);
|
||||
DEBUGASSERT(patternlen);
|
||||
+ DEBUGASSERT(hostname);
|
||||
+ DEBUGASSERT(hostlen);
|
||||
+
|
||||
+ /* normalize pattern and hostname by stripping off trailing dots */
|
||||
if(hostname[hostlen-1]=='.')
|
||||
hostlen--;
|
||||
if(pattern[patternlen-1]=='.')
|
||||
patternlen--;
|
||||
|
||||
- wildcard = memchr(pattern, '*', patternlen);
|
||||
- if(!wildcard)
|
||||
+ if(strncmp(pattern, "*.", 2))
|
||||
return pmatch(hostname, hostlen, pattern, patternlen);
|
||||
|
||||
/* detect IP address as hostname and fail the match if so */
|
||||
- if(Curl_host_is_ipnum(hostname))
|
||||
+ else if(Curl_host_is_ipnum(hostname))
|
||||
return FALSE;
|
||||
|
||||
/* We require at least 2 dots in the pattern to avoid too wide wildcard
|
||||
match. */
|
||||
pattern_label_end = memchr(pattern, '.', patternlen);
|
||||
if(!pattern_label_end ||
|
||||
- (memrchr(pattern, '.', patternlen) == pattern_label_end) ||
|
||||
- strncasecompare(pattern, "xn--", 4))
|
||||
+ (memrchr(pattern, '.', patternlen) == pattern_label_end))
|
||||
return pmatch(hostname, hostlen, pattern, patternlen);
|
||||
-
|
||||
- hostname_label_end = memchr(hostname, '.', hostlen);
|
||||
- if(!hostname_label_end)
|
||||
- return FALSE;
|
||||
else {
|
||||
- size_t skiphost = hostname_label_end - hostname;
|
||||
- size_t skiplen = pattern_label_end - pattern;
|
||||
- if(!pmatch(hostname_label_end, hostlen - skiphost,
|
||||
- pattern_label_end, patternlen - skiplen))
|
||||
- return FALSE;
|
||||
+ const char *hostname_label_end = memchr(hostname, '.', hostlen);
|
||||
+ if(hostname_label_end) {
|
||||
+ size_t skiphost = hostname_label_end - hostname;
|
||||
+ size_t skiplen = pattern_label_end - pattern;
|
||||
+ return pmatch(hostname_label_end, hostlen - skiphost,
|
||||
+ pattern_label_end, patternlen - skiplen);
|
||||
+ }
|
||||
}
|
||||
- /* The wildcard must match at least one character, so the left-most
|
||||
- label of the hostname is at least as large as the left-most label
|
||||
- of the pattern. */
|
||||
- if(hostname_label_end - hostname < pattern_label_end - pattern)
|
||||
- return FALSE;
|
||||
-
|
||||
- prefixlen = wildcard - pattern;
|
||||
- suffixlen = pattern_label_end - (wildcard + 1);
|
||||
- return strncasecompare(pattern, hostname, prefixlen) &&
|
||||
- strncasecompare(wildcard + 1, hostname_label_end - suffixlen,
|
||||
- suffixlen) ? TRUE : FALSE;
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/tests/data/test1397 b/tests/data/test1397
|
||||
index 84f962abebee3..f31b2c2a3f330 100644
|
||||
--- a/tests/data/test1397
|
||||
+++ b/tests/data/test1397
|
||||
@@ -2,8 +2,7 @@
|
||||
<info>
|
||||
<keywords>
|
||||
unittest
|
||||
-ssl
|
||||
-wildcard
|
||||
+Curl_cert_hostcheck
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
@@ -16,9 +15,8 @@ none
|
||||
<features>
|
||||
unittest
|
||||
</features>
|
||||
- <name>
|
||||
-Check wildcard certificate matching function Curl_cert_hostcheck
|
||||
- </name>
|
||||
+<name>
|
||||
+Curl_cert_hostcheck unit tests
|
||||
+</name>
|
||||
</client>
|
||||
-
|
||||
</testcase>
|
||||
diff --git a/tests/unit/unit1397.c b/tests/unit/unit1397.c
|
||||
index 2f3d3aa4d09e1..3ae75618d5d10 100644
|
||||
--- a/tests/unit/unit1397.c
|
||||
+++ b/tests/unit/unit1397.c
|
||||
@@ -23,7 +23,6 @@
|
||||
***************************************************************************/
|
||||
#include "curlcheck.h"
|
||||
|
||||
-#include "vtls/hostcheck.h" /* from the lib dir */
|
||||
|
||||
static CURLcode unit_setup(void)
|
||||
{
|
||||
@@ -32,63 +31,94 @@ static CURLcode unit_setup(void)
|
||||
|
||||
static void unit_stop(void)
|
||||
{
|
||||
- /* done before shutting down and exiting */
|
||||
}
|
||||
|
||||
-UNITTEST_START
|
||||
-
|
||||
/* only these backends define the tested functions */
|
||||
-#if defined(USE_OPENSSL) || defined(USE_GSKIT)
|
||||
-
|
||||
- /* here you start doing things and checking that the results are good */
|
||||
+#if defined(USE_OPENSSL) || defined(USE_GSKIT) || defined(USE_SCHANNEL)
|
||||
+#include "vtls/hostcheck.h"
|
||||
+struct testcase {
|
||||
+ const char *host;
|
||||
+ const char *pattern;
|
||||
+ bool match;
|
||||
+};
|
||||
|
||||
-fail_unless(Curl_cert_hostcheck(STRCONST("www.example.com"),
|
||||
- STRCONST("www.example.com")), "good 1");
|
||||
-fail_unless(Curl_cert_hostcheck(STRCONST("*.example.com"),
|
||||
- STRCONST("www.example.com")),
|
||||
- "good 2");
|
||||
-fail_unless(Curl_cert_hostcheck(STRCONST("xxx*.example.com"),
|
||||
- STRCONST("xxxwww.example.com")), "good 3");
|
||||
-fail_unless(Curl_cert_hostcheck(STRCONST("f*.example.com"),
|
||||
- STRCONST("foo.example.com")), "good 4");
|
||||
-fail_unless(Curl_cert_hostcheck(STRCONST("192.168.0.0"),
|
||||
- STRCONST("192.168.0.0")), "good 5");
|
||||
+static struct testcase tests[] = {
|
||||
+ {"", "", FALSE},
|
||||
+ {"a", "", FALSE},
|
||||
+ {"", "b", FALSE},
|
||||
+ {"a", "b", FALSE},
|
||||
+ {"aa", "bb", FALSE},
|
||||
+ {"\xff", "\xff", TRUE},
|
||||
+ {"aa.aa.aa", "aa.aa.bb", FALSE},
|
||||
+ {"aa.aa.aa", "aa.aa.aa", TRUE},
|
||||
+ {"aa.aa.aa", "*.aa.bb", FALSE},
|
||||
+ {"aa.aa.aa", "*.aa.aa", TRUE},
|
||||
+ {"192.168.0.1", "192.168.0.1", TRUE},
|
||||
+ {"192.168.0.1", "*.168.0.1", FALSE},
|
||||
+ {"192.168.0.1", "*.0.1", FALSE},
|
||||
+ {"h.ello", "*.ello", FALSE},
|
||||
+ {"h.ello.", "*.ello", FALSE},
|
||||
+ {"h.ello", "*.ello.", FALSE},
|
||||
+ {"h.e.llo", "*.e.llo", TRUE},
|
||||
+ {"h.e.llo", " *.e.llo", FALSE},
|
||||
+ {" h.e.llo", "*.e.llo", TRUE},
|
||||
+ {"h.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"*.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"************.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
+ "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
|
||||
+ "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
|
||||
+ "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
|
||||
+ "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
|
||||
+ ".e.llo.", "*.e.llo", TRUE},
|
||||
+ {"\xfe\xfe.e.llo.", "*.e.llo", TRUE},
|
||||
+ {"h.e.llo.", "*.e.llo.", TRUE},
|
||||
+ {"h.e.llo", "*.e.llo.", TRUE},
|
||||
+ {".h.e.llo", "*.e.llo.", FALSE},
|
||||
+ {"h.e.llo", "*.*.llo.", FALSE},
|
||||
+ {"h.e.llo", "h.*.llo", FALSE},
|
||||
+ {"h.e.llo", "h.e.*", FALSE},
|
||||
+ {"hello", "*.ello", FALSE},
|
||||
+ {"hello", "**llo", FALSE},
|
||||
+ {"bar.foo.example.com", "*.example.com", FALSE},
|
||||
+ {"foo.example.com", "*.example.com", TRUE},
|
||||
+ {"baz.example.net", "b*z.example.net", FALSE},
|
||||
+ {"foobaz.example.net", "*baz.example.net", FALSE},
|
||||
+ {"xn--l8j.example.local", "x*.example.local", FALSE},
|
||||
+ {"xn--l8j.example.net", "*.example.net", TRUE},
|
||||
+ {"xn--l8j.example.net", "*j.example.net", FALSE},
|
||||
+ {"xn--l8j.example.net", "xn--l8j.example.net", TRUE},
|
||||
+ {"xn--l8j.example.net", "xn--l8j.*.net", FALSE},
|
||||
+ {"xl8j.example.net", "*.example.net", TRUE},
|
||||
+ {"fe80::3285:a9ff:fe46:b619", "*::3285:a9ff:fe46:b619", FALSE},
|
||||
+ {"fe80::3285:a9ff:fe46:b619", "fe80::3285:a9ff:fe46:b619", TRUE},
|
||||
+ {NULL, NULL, FALSE}
|
||||
+};
|
||||
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("xxx.example.com"),
|
||||
- STRCONST("www.example.com")), "bad 1");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*"),
|
||||
- STRCONST("www.example.com")),"bad 2");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*.*.com"),
|
||||
- STRCONST("www.example.com")), "bad 3");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*.example.com"),
|
||||
- STRCONST("baa.foo.example.com")), "bad 4");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("f*.example.com"),
|
||||
- STRCONST("baa.example.com")), "bad 5");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*.com"),
|
||||
- STRCONST("example.com")), "bad 6");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*fail.com"),
|
||||
- STRCONST("example.com")), "bad 7");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*.example."),
|
||||
- STRCONST("www.example.")), "bad 8");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*.example."),
|
||||
- STRCONST("www.example")), "bad 9");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST(""), STRCONST("www")), "bad 10");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*"), STRCONST("www")), "bad 11");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*.168.0.0"),
|
||||
- STRCONST("192.168.0.0")), "bad 12");
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("www.example.com"),
|
||||
- STRCONST("192.168.0.0")), "bad 13");
|
||||
-
|
||||
-#ifdef ENABLE_IPV6
|
||||
-fail_if(Curl_cert_hostcheck(STRCONST("*::3285:a9ff:fe46:b619"),
|
||||
- STRCONST("fe80::3285:a9ff:fe46:b619")), "bad 14");
|
||||
-fail_unless(Curl_cert_hostcheck(STRCONST("fe80::3285:a9ff:fe46:b619"),
|
||||
- STRCONST("fe80::3285:a9ff:fe46:b619")),
|
||||
- "good 6");
|
||||
-#endif
|
||||
+UNITTEST_START
|
||||
+{
|
||||
+ int i;
|
||||
+ for(i = 0; tests[i].host; i++) {
|
||||
+ if(tests[i].match != Curl_cert_hostcheck(tests[i].pattern,
|
||||
+ strlen(tests[i].pattern),
|
||||
+ tests[i].host,
|
||||
+ strlen(tests[i].host))) {
|
||||
+ fprintf(stderr,
|
||||
+ "HOST: %s\n"
|
||||
+ "PTRN: %s\n"
|
||||
+ "did %sMATCH\n",
|
||||
+ tests[i].host,
|
||||
+ tests[i].pattern,
|
||||
+ tests[i].match ? "NOT ": "");
|
||||
+ unitfail++;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
-#endif
|
||||
+UNITTEST_STOP
|
||||
+#else
|
||||
|
||||
- /* you end the test code like this: */
|
||||
+UNITTEST_START
|
||||
|
||||
UNITTEST_STOP
|
||||
+#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user