mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
Compare commits
53 Commits
kirkstone-
...
kirkstone-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cdc553814 | ||
|
|
940c885c23 | ||
|
|
3dd7b3edae | ||
|
|
62de516d0e | ||
|
|
630e7d6000 | ||
|
|
dd123d8eda | ||
|
|
bf6aca4b29 | ||
|
|
a952dec3e4 | ||
|
|
0ae3b2bd49 | ||
|
|
e9d17c4dee | ||
|
|
e318cce49c | ||
|
|
cada1f30e8 | ||
|
|
92cb089717 | ||
|
|
1f5be803ee | ||
|
|
da07e6ee34 | ||
|
|
2b5ca6638e | ||
|
|
2640cecd2f | ||
|
|
1c798dccd1 | ||
|
|
da71261344 | ||
|
|
784646063b | ||
|
|
0d356a401d | ||
|
|
48ef389f91 | ||
|
|
fbba5a616d | ||
|
|
54d061affe | ||
|
|
7db7a86fbc | ||
|
|
13707e4b1a | ||
|
|
cc7068b99a | ||
|
|
5bdf0b4c3a | ||
|
|
3be2b60b66 | ||
|
|
5c036f07cc | ||
|
|
52cfc78696 | ||
|
|
204b28c419 | ||
|
|
6313a595f9 | ||
|
|
25a9b7b70c | ||
|
|
bba60774f7 | ||
|
|
e932b53647 | ||
|
|
0dfb53c328 | ||
|
|
dd6669d720 | ||
|
|
7397fefc2f | ||
|
|
2ccf694440 | ||
|
|
7506cbff40 | ||
|
|
ae4a66db4b | ||
|
|
93ef091fb2 | ||
|
|
0405a3b4f3 | ||
|
|
2a6c675b9a | ||
|
|
e135227779 | ||
|
|
e781bf1095 | ||
|
|
322d4df8cb | ||
|
|
b1b94b434d | ||
|
|
67e1f5404c | ||
|
|
3242d8234d | ||
|
|
6d58d0c4a2 | ||
|
|
4bad38de6e |
@@ -261,12 +261,9 @@ class VariableHistory(object):
|
||||
return
|
||||
if 'op' not in loginfo or not loginfo['op']:
|
||||
loginfo['op'] = 'set'
|
||||
if 'detail' in loginfo:
|
||||
loginfo['detail'] = str(loginfo['detail'])
|
||||
if 'variable' not in loginfo or 'file' not in loginfo:
|
||||
raise ValueError("record() missing variable or file.")
|
||||
var = loginfo['variable']
|
||||
|
||||
if var not in self.variables:
|
||||
self.variables[var] = []
|
||||
if not isinstance(self.variables[var], list):
|
||||
@@ -325,7 +322,8 @@ class VariableHistory(object):
|
||||
flag = '[%s] ' % (event['flag'])
|
||||
else:
|
||||
flag = ''
|
||||
o.write("# %s %s:%s%s\n# %s\"%s\"\n" % (event['op'], event['file'], event['line'], display_func, flag, re.sub('\n', '\n# ', event['detail'])))
|
||||
o.write("# %s %s:%s%s\n# %s\"%s\"\n" % \
|
||||
(event['op'], event['file'], event['line'], display_func, flag, re.sub('\n', '\n# ', str(event['detail']))))
|
||||
if len(history) > 1:
|
||||
o.write("# pre-expansion value:\n")
|
||||
o.write('# "%s"\n' % (commentVal))
|
||||
@@ -379,7 +377,7 @@ class VariableHistory(object):
|
||||
if isset and event['op'] == 'set?':
|
||||
continue
|
||||
isset = True
|
||||
items = d.expand(event['detail']).split()
|
||||
items = d.expand(str(event['detail'])).split()
|
||||
for item in items:
|
||||
# This is a little crude but is belt-and-braces to avoid us
|
||||
# having to handle every possible operation type specifically
|
||||
|
||||
@@ -26,3 +26,5 @@ Release 4.0 (kirkstone)
|
||||
release-notes-4.0.17
|
||||
release-notes-4.0.18
|
||||
release-notes-4.0.19
|
||||
release-notes-4.0.20
|
||||
|
||||
|
||||
130
documentation/migration-guides/release-notes-4.0.20.rst
Normal file
130
documentation/migration-guides/release-notes-4.0.20.rst
Normal file
@@ -0,0 +1,130 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Release notes for Yocto-4.0.20 (Kirkstone)
|
||||
------------------------------------------
|
||||
|
||||
Security Fixes in Yocto-4.0.20
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- acpica: Fix :cve:`2024-24856`
|
||||
- glib-2.0: Fix :cve:`2024-34397`
|
||||
- gstreamer1.0-plugins-base: Fix :cve:`2024-4453`
|
||||
- libxml2: Fix :cve:`2024-34459`
|
||||
- openssh: fix :cve:`2024-6387`
|
||||
- openssl: Fix :cve_mitre:`2024-4741` and :cve:`2024-5535`
|
||||
- ruby: fix :cve:`2024-27280`
|
||||
- wget: Fix for :cve:`2024-38428`
|
||||
|
||||
|
||||
Fixes in Yocto-4.0.20
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- bitbake: tests/fetch: Tweak test to match upstream repo url change Upstream changed their urls, update our test to match.
|
||||
- build-appliance-image: Update to kirkstone head revision
|
||||
- glibc-tests: Add missing bash ptest dependency
|
||||
- glibc-tests: correctly pull in the actual tests when installing -ptest package
|
||||
- glibc: stable 2.35 branch updates
|
||||
- gobject-introspection: Do not hardcode objdump name
|
||||
- linuxloader: add -armhf on arm only for :term:`TARGET_FPU` 'hard'
|
||||
- man-pages: add an alternative link name for crypt_r.3
|
||||
- man-pages: remove conflict pages
|
||||
- migration-guides: add release notes for 4.0.19
|
||||
- openssl: Upgrade 3.0.13 -> 3.0.14
|
||||
- poky.conf: bump version for 4.0.20
|
||||
|
||||
|
||||
Known Issues in Yocto-4.0.20
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- N/A
|
||||
|
||||
|
||||
Contributors to Yocto-4.0.20
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Archana Polampalli
|
||||
- Changqing Li
|
||||
- Deepthi Hemraj
|
||||
- Jonas Gorski
|
||||
- Jose Quaresma
|
||||
- Khem Raj
|
||||
- Lee Chee Yang
|
||||
- Peter Marko
|
||||
- Poonam Jadhav
|
||||
- Siddharth Doshi
|
||||
- Steve Sakoman
|
||||
- Thomas Perrot
|
||||
- Vijay Anusuri
|
||||
- Yogita Urade
|
||||
|
||||
|
||||
Repositories / Downloads for Yocto-4.0.20
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
poky
|
||||
|
||||
- Repository Location: :yocto_git:`/poky`
|
||||
- Branch: :yocto_git:`kirkstone </poky/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.20 </poky/log/?h=yocto-4.0.20>`
|
||||
- Git Revision: :yocto_git:`6bd3969d32730538608e680653e032e66958fe84 </poky/commit/?id=6bd3969d32730538608e680653e032e66958fe84>`
|
||||
- Release Artefact: poky-6bd3969d32730538608e680653e032e66958fe84
|
||||
- sha: b7ef1bd5ba1af257c4eb07a59b51d69e147723aea010eb2da99ea30dcbbbe2d9
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.20/poky-6bd3969d32730538608e680653e032e66958fe84.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.20/poky-6bd3969d32730538608e680653e032e66958fe84.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.20 </openembedded-core/log/?h=yocto-4.0.20>`
|
||||
- Git Revision: :oe_git:`5d97b0576e98a2cf402abab1a1edcab223545d87 </openembedded-core/commit/?id=5d97b0576e98a2cf402abab1a1edcab223545d87>`
|
||||
- Release Artefact: oecore-5d97b0576e98a2cf402abab1a1edcab223545d87
|
||||
- sha: 4064a32b8ff1ad8a98aa15e75b27585d2b27236c8cdfa4a28af6d6fef99b93c0
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.20/oecore-5d97b0576e98a2cf402abab1a1edcab223545d87.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.20/oecore-5d97b0576e98a2cf402abab1a1edcab223545d87.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.20 </meta-mingw/log/?h=yocto-4.0.20>`
|
||||
- Git Revision: :yocto_git:`f6b38ce3c90e1600d41c2ebb41e152936a0357d7 </meta-mingw/commit/?id=f6b38ce3c90e1600d41c2ebb41e152936a0357d7>`
|
||||
- Release Artefact: meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7
|
||||
- sha: 7d57167c19077f4ab95623d55a24c2267a3a3fb5ed83688659b4c03586373b25
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.20/meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.20/meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7.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.20 </meta-gplv2/log/?h=yocto-4.0.20>`
|
||||
- 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.20/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.20/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.20 </bitbake/log/?h=yocto-4.0.20>`
|
||||
- Git Revision: :oe_git:`734b0ea3dfe45eb16ee60f0c2c388e22af4040e0 </bitbake/commit/?id=734b0ea3dfe45eb16ee60f0c2c388e22af4040e0>`
|
||||
- Release Artefact: bitbake-734b0ea3dfe45eb16ee60f0c2c388e22af4040e0
|
||||
- sha: 99f4c6786fec790fd6c4577b5dea3c97c580cc4815bd409ce554a68ee99b0180
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.20/bitbake-734b0ea3dfe45eb16ee60f0c2c388e22af4040e0.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.20/bitbake-734b0ea3dfe45eb16ee60f0c2c388e22af4040e0.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.20 </yocto-docs/log/?h=yocto-4.0.20>`
|
||||
- Git Revision: :yocto_git:`b15b1d369edf33cd91232fefa0278e7e89653a01 </yocto-docs/commit/?id=b15b1d369edf33cd91232fefa0278e7e89653a01>`
|
||||
|
||||
@@ -8123,6 +8123,35 @@ system and gives an overview of their function and contents.
|
||||
/sysroot-only \
|
||||
"
|
||||
|
||||
Consider the following example in which you need to manipulate this variable.
|
||||
Assume you have a recipe ``A`` that provides a shared library ``.so.*`` that is
|
||||
installed into a custom folder other than "``${libdir}``"
|
||||
or "``${base_libdir}``", let's say "``/opt/lib``".
|
||||
|
||||
.. note::
|
||||
|
||||
This is not a recommended way to deal with shared libraries, but this
|
||||
is just to show the usefulness of setting :term:`SYSROOT_DIRS`.
|
||||
|
||||
When a recipe ``B`` :term:`DEPENDS` on ``A``, it means what is in
|
||||
:term:`SYSROOT_DIRS` will be copied from :term:`D` of the recipe ``A``
|
||||
into ``B``'s :term:`SYSROOT_DESTDIR` that is "``${WORKDIR}/sysroot-destdir``".
|
||||
|
||||
Now, since ``/opt/lib`` is not in :term:`SYSROOT_DIRS`, it will never be copied to
|
||||
``A``'s :term:`RECIPE_SYSROOT`, which is "``${WORKDIR}/recipe-sysroot``". So,
|
||||
the linking process will fail.
|
||||
|
||||
To fix this, you need to add ``/opt/lib`` to :term:`SYSROOT_DIRS`::
|
||||
|
||||
SYSROOT_DIRS:append = " /opt/lib"
|
||||
|
||||
.. note::
|
||||
Even after setting ``/opt/lib`` to :term:`SYSROOT_DIRS`, the linking process will still fail
|
||||
because the linker does not know that location, since :term:`TARGET_LDFLAGS`
|
||||
doesn't contain it (if your recipe is for the target). Therefore, so you should add::
|
||||
|
||||
TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib"
|
||||
|
||||
:term:`SYSROOT_DIRS_IGNORE`
|
||||
Directories that are not staged into the sysroot by the
|
||||
:ref:`ref-tasks-populate_sysroot` task. You
|
||||
@@ -8146,35 +8175,6 @@ system and gives an overview of their function and contents.
|
||||
${libdir}/${BPN}/ptest \
|
||||
"
|
||||
|
||||
Consider the following example in which you need to manipulate this variable.
|
||||
Assume you have a recipe ``A`` that provides a shared library ``.so.*`` that is
|
||||
installed into a custom folder other than "``${libdir}``"
|
||||
or "``${base_libdir}``", let's say "``/opt/lib``".
|
||||
|
||||
.. note::
|
||||
|
||||
This is not a recommended way to deal with shared libraries, but this
|
||||
is just to show the usefulness of setting :term:`SYSROOT_DIRS`.
|
||||
|
||||
When a recipe ``B`` :term:`DEPENDS` on ``A``, it means what is in
|
||||
:term:`SYSROOT_DIRS` will be copied from :term:`D` of the recipe ``B``
|
||||
into ``B``'s :term:`SYSROOT_DESTDIR` that is "``${WORKDIR}/sysroot-destdir``".
|
||||
|
||||
Now, since ``/opt/lib`` is not in :term:`SYSROOT_DIRS`, it will never be copied to
|
||||
``A``'s :term:`RECIPE_SYSROOT`, which is "``${WORKDIR}/recipe-sysroot``". So,
|
||||
the linking process will fail.
|
||||
|
||||
To fix this, you need to add ``/opt/lib`` to :term:`SYSROOT_DIRS`::
|
||||
|
||||
SYSROOT_DIRS:append = " /opt/lib"
|
||||
|
||||
.. note::
|
||||
Even after setting ``/opt/lib`` to :term:`SYSROOT_DIRS`, the linking process will still fail
|
||||
because the linker does not know that location, since :term:`TARGET_LDFLAGS`
|
||||
doesn't contain it (if your recipe is for the target). Therefore, so you should add::
|
||||
|
||||
TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib"
|
||||
|
||||
:term:`SYSROOT_DIRS_NATIVE`
|
||||
Extra directories staged into the sysroot by the
|
||||
:ref:`ref-tasks-populate_sysroot` task for
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
||||
DISTRO_VERSION = "4.0.20"
|
||||
DISTRO_VERSION = "4.0.21"
|
||||
DISTRO_CODENAME = "kirkstone"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
|
||||
@@ -292,8 +292,8 @@ CONVERSION_CMD:lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
|
||||
CONVERSION_CMD:gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
|
||||
CONVERSION_CMD:bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
|
||||
CONVERSION_CMD:xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_DEFAULTS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
|
||||
CONVERSION_CMD:lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
|
||||
CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
|
||||
CONVERSION_CMD:lz4 = "lz4 -f -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
|
||||
CONVERSION_CMD:lzo = "lzop -f -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
|
||||
CONVERSION_CMD:zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
|
||||
CONVERSION_CMD:zst = "zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zst"
|
||||
CONVERSION_CMD:sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
|
||||
|
||||
@@ -137,8 +137,7 @@ concat_dtb_helper() {
|
||||
|
||||
if [ -n "${UBOOT_CONFIG}" ]
|
||||
then
|
||||
i=0
|
||||
j=0
|
||||
unset i j
|
||||
for config in ${UBOOT_MACHINE}; do
|
||||
i=$(expr $i + 1);
|
||||
for type in ${UBOOT_CONFIG}; do
|
||||
@@ -146,9 +145,12 @@ concat_dtb_helper() {
|
||||
if [ $j -eq $i ]
|
||||
then
|
||||
cp ${UBOOT_IMAGE} ${B}/${CONFIG_B_PATH}/u-boot-$type.${UBOOT_SUFFIX}
|
||||
break
|
||||
fi
|
||||
done
|
||||
unset j
|
||||
done
|
||||
unset i
|
||||
fi
|
||||
else
|
||||
bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
From e43f3d93b28cce852c110c7a8e40d8311bcd8bb1 Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Fri, 15 Jul 2022 16:13:02 -0400
|
||||
Subject: [PATCH] fs/fat: Don't error when mtime is 0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In the wild, we occasionally see valid ESPs where some file modification
|
||||
times are 0. For instance:
|
||||
|
||||
├── [Dec 31 1979] EFI
|
||||
│ ├── [Dec 31 1979] BOOT
|
||||
│ │ ├── [Dec 31 1979] BOOTX64.EFI
|
||||
│ │ └── [Dec 31 1979] fbx64.efi
|
||||
│ └── [Jun 27 02:41] fedora
|
||||
│ ├── [Dec 31 1979] BOOTX64.CSV
|
||||
│ ├── [Dec 31 1979] fonts
|
||||
│ ├── [Mar 14 03:35] fw
|
||||
│ │ ├── [Mar 14 03:35] fwupd-359c1169-abd6-4a0d-8bce-e4d4713335c1.cap
|
||||
│ │ ├── [Mar 14 03:34] fwupd-9d255c4b-2d88-4861-860d-7ee52ade9463.cap
|
||||
│ │ └── [Mar 14 03:34] fwupd-b36438d8-9128-49d2-b280-487be02d948b.cap
|
||||
│ ├── [Dec 31 1979] fwupdx64.efi
|
||||
│ ├── [May 10 10:47] grub.cfg
|
||||
│ ├── [Jun 3 12:38] grub.cfg.new.new
|
||||
│ ├── [May 10 10:41] grub.cfg.old
|
||||
│ ├── [Jun 27 02:41] grubenv
|
||||
│ ├── [Dec 31 1979] grubx64.efi
|
||||
│ ├── [Dec 31 1979] mmx64.efi
|
||||
│ ├── [Dec 31 1979] shim.efi
|
||||
│ ├── [Dec 31 1979] shimx64.efi
|
||||
│ └── [Dec 31 1979] shimx64-fedora.efi
|
||||
└── [Dec 31 1979] FSCK0000.REC
|
||||
|
||||
5 directories, 17 files
|
||||
|
||||
This causes grub-probe failure, which in turn causes grub-mkconfig
|
||||
failure. They are valid filesystems that appear intact, and the Linux
|
||||
FAT stack is able to mount and manipulate them without complaint.
|
||||
|
||||
The check for mtime of 0 has been present since
|
||||
20def1a3c3952982395cd7c3ea7e78638527962b (fat: support file
|
||||
modification times).
|
||||
|
||||
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=e43f3d93b28cce852c110c7a8e40d8311bcd8bb1]
|
||||
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
||||
---
|
||||
grub-core/fs/fat.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/fat.c b/grub-core/fs/fat.c
|
||||
index 0951b2e63..c5efed724 100644
|
||||
--- a/grub-core/fs/fat.c
|
||||
+++ b/grub-core/fs/fat.c
|
||||
@@ -1027,9 +1027,6 @@ grub_fat_dir (grub_device_t device, const char *path, grub_fs_dir_hook_t hook,
|
||||
grub_le_to_cpu16 (ctxt.dir.w_date),
|
||||
&info.mtime);
|
||||
#endif
|
||||
- if (info.mtimeset == 0)
|
||||
- grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
- "invalid modification timestamp for %s", path);
|
||||
|
||||
if (hook (ctxt.filename, &info, hook_data))
|
||||
break;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -40,6 +40,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
|
||||
file://CVE-2022-28736-loader-efi-chainloader-Use-grub_loader_set_ex.patch \
|
||||
file://CVE-2023-4692.patch \
|
||||
file://CVE-2023-4693.patch \
|
||||
file://0001-fs-fat-Don-t-error-when-mtime-is-0.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
|
||||
|
||||
@@ -20,7 +20,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
|
||||
file://0001-avoid-start-failure-with-bind-user.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "709d73023c9115ddad3bab65b6c8c79a590196d0d114f5d0ca2533dbd52ddf66"
|
||||
SRC_URI[sha256sum] = "e7cce9a165f7b619eefc4832f0a8dc16b005d29e3890aed6008c506ea286a5e7"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
|
||||
# follow the ESV versions divisible by 2
|
||||
@@ -0,0 +1,37 @@
|
||||
From a90421d8e45d63b304dc010baba24633e7869682 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Kenzior <denkenz@gmail.com>
|
||||
Date: Mon, 5 Aug 2024 19:50:04 +0800
|
||||
Subject: [PATCH] smsutil: ensure the address length in bytes <= 10
|
||||
|
||||
If a specially formatted SMS is received, it is conceivable that the
|
||||
address length might overflow the structure it is being parsed into.
|
||||
Ensure that the length in bytes of the address never exceeds 10.
|
||||
|
||||
CVE: CVE-2023-2794
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=a90421d8e45d63b304dc010baba24633e7869682]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
src/smsutil.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/smsutil.c b/src/smsutil.c
|
||||
index 8dd2126..d8170d1 100644
|
||||
--- a/src/smsutil.c
|
||||
+++ b/src/smsutil.c
|
||||
@@ -643,7 +643,12 @@ gboolean sms_decode_address_field(const unsigned char *pdu, int len,
|
||||
else
|
||||
byte_len = (addr_len + 1) / 2;
|
||||
|
||||
- if ((len - *offset) < byte_len)
|
||||
+ /*
|
||||
+ * 23.040:
|
||||
+ * The maximum length of the full address field
|
||||
+ * (AddressLength, TypeofAddress and AddressValue) is 12 octets.
|
||||
+ */
|
||||
+ if ((len - *offset) < byte_len || byte_len > 10)
|
||||
return FALSE;
|
||||
|
||||
out->number_type = bit_field(addr_type, 4, 3);
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,32 @@
|
||||
From 7f2adfa22fbae824f8e2c3ae86a3f51da31ee400 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Kenzior <denkenz@gmail.com>
|
||||
Date: Mon, 5 Aug 2024 20:06:09 +0800
|
||||
Subject: [PATCH] smsutil: Check cbs_dcs_decode return value
|
||||
|
||||
It is better to explicitly check the return value of cbs_dcs_decode
|
||||
instead of relying on udhi not being changed due to side-effects.
|
||||
|
||||
CVE: CVE-2023-2794
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=7f2adfa22fbae824f8e2c3ae86a3f51da31ee400]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
src/smsutil.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/smsutil.c b/src/smsutil.c
|
||||
index d8170d1..7746a71 100644
|
||||
--- a/src/smsutil.c
|
||||
+++ b/src/smsutil.c
|
||||
@@ -1765,7 +1765,8 @@ gboolean sms_udh_iter_init_from_cbs(const struct cbs *cbs,
|
||||
const guint8 *hdr;
|
||||
guint8 max_ud_len;
|
||||
|
||||
- cbs_dcs_decode(cbs->dcs, &udhi, NULL, NULL, NULL, NULL, NULL);
|
||||
+ if (!cbs_dcs_decode(cbs->dcs, &udhi, NULL, NULL, NULL, NULL, NULL))
|
||||
+ return FALSE;
|
||||
|
||||
if (!udhi)
|
||||
return FALSE;
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,44 @@
|
||||
From 07f48b23e3877ef7d15a7b0b8b79d32ad0a3607e Mon Sep 17 00:00:00 2001
|
||||
From: Denis Kenzior <denkenz@gmail.com>
|
||||
Date: Mon, 5 Aug 2024 20:23:38 +0800
|
||||
Subject: [PATCH] simutil: Make sure set_length on the parent succeeds
|
||||
|
||||
CVE: CVE-2023-2794
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=07f48b23e3877ef7d15a7b0b8b79d32ad0a3607e]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
src/simutil.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/simutil.c b/src/simutil.c
|
||||
index 59d8d5d..0e131e8 100644
|
||||
--- a/src/simutil.c
|
||||
+++ b/src/simutil.c
|
||||
@@ -588,8 +588,9 @@ gboolean ber_tlv_builder_set_length(struct ber_tlv_builder *builder,
|
||||
if (new_pos > builder->max)
|
||||
return FALSE;
|
||||
|
||||
- if (builder->parent)
|
||||
- ber_tlv_builder_set_length(builder->parent, new_pos);
|
||||
+ if (builder->parent &&
|
||||
+ !ber_tlv_builder_set_length(builder->parent, new_pos))
|
||||
+ return FALSE;
|
||||
|
||||
builder->len = new_len;
|
||||
|
||||
@@ -730,9 +731,9 @@ gboolean comprehension_tlv_builder_set_length(
|
||||
if (builder->pos + new_ctlv_len > builder->max)
|
||||
return FALSE;
|
||||
|
||||
- if (builder->parent)
|
||||
- ber_tlv_builder_set_length(builder->parent,
|
||||
- builder->pos + new_ctlv_len);
|
||||
+ if (builder->parent && !ber_tlv_builder_set_length(builder->parent,
|
||||
+ builder->pos + new_ctlv_len))
|
||||
+ return FALSE;
|
||||
|
||||
len = MIN(builder->len, new_len);
|
||||
if (len > 0 && new_len_size != len_size)
|
||||
--
|
||||
2.25.1
|
||||
127
meta/recipes-connectivity/ofono/ofono/CVE-2023-2794-0004.patch
Normal file
127
meta/recipes-connectivity/ofono/ofono/CVE-2023-2794-0004.patch
Normal file
@@ -0,0 +1,127 @@
|
||||
From 8fa1fdfcb54e1edb588c6a5e2688880b065a39c9 Mon Sep 17 00:00:00 2001
|
||||
From: Denis Kenzior <denkenz@gmail.com>
|
||||
Date: Mon, 5 Aug 2024 20:38:20 +0800
|
||||
Subject: [PATCH] smsutil: Use a safer strlcpy
|
||||
|
||||
sms_address_from_string is meant as private API, to be used with string
|
||||
form addresses that have already been sanitized. However, to be safe,
|
||||
use a safe version of strcpy to avoid overflowing the buffer in case the
|
||||
input was not sanitized properly. While here, add a '__' prefix to the
|
||||
function name to help make it clearer that this API is private and
|
||||
should be used with more care.
|
||||
|
||||
CVE: CVE-2023-2794
|
||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=8fa1fdfcb54e1edb588c6a5e2688880b065a39c9]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
src/smsutil.c | 14 +++++++-------
|
||||
src/smsutil.h | 2 +-
|
||||
unit/test-sms.c | 6 +++---
|
||||
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/smsutil.c b/src/smsutil.c
|
||||
index 7746a71..e073a06 100644
|
||||
--- a/src/smsutil.c
|
||||
+++ b/src/smsutil.c
|
||||
@@ -1887,15 +1887,15 @@ time_t sms_scts_to_time(const struct sms_scts *scts, struct tm *remote)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-void sms_address_from_string(struct sms_address *addr, const char *str)
|
||||
+void __sms_address_from_string(struct sms_address *addr, const char *str)
|
||||
{
|
||||
addr->numbering_plan = SMS_NUMBERING_PLAN_ISDN;
|
||||
if (str[0] == '+') {
|
||||
addr->number_type = SMS_NUMBER_TYPE_INTERNATIONAL;
|
||||
- strcpy(addr->address, str + 1);
|
||||
+ l_strlcpy(addr->address, str + 1, sizeof(addr->address));
|
||||
} else {
|
||||
addr->number_type = SMS_NUMBER_TYPE_UNKNOWN;
|
||||
- strcpy(addr->address, str);
|
||||
+ l_strlcpy(addr->address, str, sizeof(addr->address));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3087,7 +3087,7 @@ gboolean status_report_assembly_report(struct status_report_assembly *assembly,
|
||||
}
|
||||
}
|
||||
|
||||
- sms_address_from_string(&addr, straddr);
|
||||
+ __sms_address_from_string(&addr, straddr);
|
||||
|
||||
if (pending == TRUE && node->deliverable == TRUE) {
|
||||
/*
|
||||
@@ -3180,7 +3180,7 @@ void status_report_assembly_expire(struct status_report_assembly *assembly,
|
||||
while (g_hash_table_iter_next(&iter_addr, (gpointer) &straddr,
|
||||
(gpointer) &id_table)) {
|
||||
|
||||
- sms_address_from_string(&addr, straddr);
|
||||
+ __sms_address_from_string(&addr, straddr);
|
||||
g_hash_table_iter_init(&iter_node, id_table);
|
||||
|
||||
/* Go through different messages. */
|
||||
@@ -3474,7 +3474,7 @@ GSList *sms_datagram_prepare(const char *to,
|
||||
template.submit.vp.relative = 0xA7; /* 24 Hours */
|
||||
template.submit.dcs = 0x04; /* Class Unspecified, 8 Bit */
|
||||
template.submit.udhi = TRUE;
|
||||
- sms_address_from_string(&template.submit.daddr, to);
|
||||
+ __sms_address_from_string(&template.submit.daddr, to);
|
||||
|
||||
offset = 1;
|
||||
|
||||
@@ -3601,7 +3601,7 @@ GSList *sms_text_prepare_with_alphabet(const char *to, const char *utf8,
|
||||
template.submit.srr = use_delivery_reports;
|
||||
template.submit.mr = 0;
|
||||
template.submit.vp.relative = 0xA7; /* 24 Hours */
|
||||
- sms_address_from_string(&template.submit.daddr, to);
|
||||
+ __sms_address_from_string(&template.submit.daddr, to);
|
||||
|
||||
/* There are two enums for the same thing */
|
||||
dialect = (enum gsm_dialect)alphabet;
|
||||
diff --git a/src/smsutil.h b/src/smsutil.h
|
||||
index 01487de..bc21504 100644
|
||||
--- a/src/smsutil.h
|
||||
+++ b/src/smsutil.h
|
||||
@@ -487,7 +487,7 @@ int sms_udl_in_bytes(guint8 ud_len, guint8 dcs);
|
||||
time_t sms_scts_to_time(const struct sms_scts *scts, struct tm *remote);
|
||||
|
||||
const char *sms_address_to_string(const struct sms_address *addr);
|
||||
-void sms_address_from_string(struct sms_address *addr, const char *str);
|
||||
+void __sms_address_from_string(struct sms_address *addr, const char *str);
|
||||
|
||||
const guint8 *sms_extract_common(const struct sms *sms, gboolean *out_udhi,
|
||||
guint8 *out_dcs, guint8 *out_udl,
|
||||
diff --git a/unit/test-sms.c b/unit/test-sms.c
|
||||
index 3bc099b..88293d5 100644
|
||||
--- a/unit/test-sms.c
|
||||
+++ b/unit/test-sms.c
|
||||
@@ -1603,7 +1603,7 @@ static void test_sr_assembly(void)
|
||||
sr3.status_report.mr);
|
||||
}
|
||||
|
||||
- sms_address_from_string(&addr, "+4915259911630");
|
||||
+ __sms_address_from_string(&addr, "+4915259911630");
|
||||
|
||||
sra = status_report_assembly_new(NULL);
|
||||
|
||||
@@ -1626,7 +1626,7 @@ static void test_sr_assembly(void)
|
||||
* Send sms-message in the national address-format,
|
||||
* but receive in the international address-format.
|
||||
*/
|
||||
- sms_address_from_string(&addr, "9911630");
|
||||
+ __sms_address_from_string(&addr, "9911630");
|
||||
status_report_assembly_add_fragment(sra, sha1, &addr, 4, time(NULL), 2);
|
||||
status_report_assembly_add_fragment(sra, sha1, &addr, 5, time(NULL), 2);
|
||||
|
||||
@@ -1641,7 +1641,7 @@ static void test_sr_assembly(void)
|
||||
* Send sms-message in the international address-format,
|
||||
* but receive in the national address-format.
|
||||
*/
|
||||
- sms_address_from_string(&addr, "+358123456789");
|
||||
+ __sms_address_from_string(&addr, "+358123456789");
|
||||
status_report_assembly_add_fragment(sra, sha1, &addr, 6, time(NULL), 1);
|
||||
|
||||
g_assert(status_report_assembly_report(sra, &sr3, id, &delivered));
|
||||
--
|
||||
2.25.1
|
||||
@@ -14,6 +14,10 @@ SRC_URI = "\
|
||||
file://0002-mbim-Fix-build-with-ell-0.39-by-restoring-unlikely-m.patch \
|
||||
file://CVE-2023-4234.patch \
|
||||
file://CVE-2023-4233.patch \
|
||||
file://CVE-2023-2794-0001.patch \
|
||||
file://CVE-2023-2794-0002.patch \
|
||||
file://CVE-2023-2794-0003.patch \
|
||||
file://CVE-2023-2794-0004.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7"
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
From f6f7cead3661ceeef54b21f7e799c0afc98537ec Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 8 Jul 2023 19:55:32 +0300
|
||||
Subject: [PATCH] PEAP client: Update Phase 2 authentication requirements
|
||||
|
||||
The previous PEAP client behavior allowed the server to skip Phase 2
|
||||
authentication with the expectation that the server was authenticated
|
||||
during Phase 1 through TLS server certificate validation. Various PEAP
|
||||
specifications are not exactly clear on what the behavior on this front
|
||||
is supposed to be and as such, this ended up being more flexible than
|
||||
the TTLS/FAST/TEAP cases. However, this is not really ideal when
|
||||
unfortunately common misconfiguration of PEAP is used in deployed
|
||||
devices where the server trust root (ca_cert) is not configured or the
|
||||
user has an easy option for allowing this validation step to be skipped.
|
||||
|
||||
Change the default PEAP client behavior to be to require Phase 2
|
||||
authentication to be successfully completed for cases where TLS session
|
||||
resumption is not used and the client certificate has not been
|
||||
configured. Those two exceptions are the main cases where a deployed
|
||||
authentication server might skip Phase 2 and as such, where a more
|
||||
strict default behavior could result in undesired interoperability
|
||||
issues. Requiring Phase 2 authentication will end up disabling TLS
|
||||
session resumption automatically to avoid interoperability issues.
|
||||
|
||||
Allow Phase 2 authentication behavior to be configured with a new phase1
|
||||
configuration parameter option:
|
||||
'phase2_auth' option can be used to control Phase 2 (i.e., within TLS
|
||||
tunnel) behavior for PEAP:
|
||||
* 0 = do not require Phase 2 authentication
|
||||
* 1 = require Phase 2 authentication when client certificate
|
||||
(private_key/client_cert) is no used and TLS session resumption was
|
||||
not used (default)
|
||||
* 2 = require Phase 2 authentication in all cases
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
|
||||
CVE: CVE-2023-52160
|
||||
Upstream-Status: Backport [https://w1.fi/cgit/hostap/commit/?id=8e6485a1bcb0baffdea9e55255a81270b768439c]
|
||||
|
||||
Signed-off-by: Claus Stovgaard <claus.stovgaard@gmail.com>
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
src/eap_peer/eap_config.h | 8 ++++++
|
||||
src/eap_peer/eap_peap.c | 40 +++++++++++++++++++++++++++---
|
||||
src/eap_peer/eap_tls_common.c | 6 +++++
|
||||
src/eap_peer/eap_tls_common.h | 5 ++++
|
||||
wpa_supplicant/wpa_supplicant.conf | 7 ++++++
|
||||
5 files changed, 63 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/eap_peer/eap_config.h b/src/eap_peer/eap_config.h
|
||||
index 3238f74..047eec2 100644
|
||||
--- a/src/eap_peer/eap_config.h
|
||||
+++ b/src/eap_peer/eap_config.h
|
||||
@@ -469,6 +469,14 @@ struct eap_peer_config {
|
||||
* 1 = use cryptobinding if server supports it
|
||||
* 2 = require cryptobinding
|
||||
*
|
||||
+ * phase2_auth option can be used to control Phase 2 (i.e., within TLS
|
||||
+ * tunnel) behavior for PEAP:
|
||||
+ * 0 = do not require Phase 2 authentication
|
||||
+ * 1 = require Phase 2 authentication when client certificate
|
||||
+ * (private_key/client_cert) is no used and TLS session resumption was
|
||||
+ * not used (default)
|
||||
+ * 2 = require Phase 2 authentication in all cases
|
||||
+ *
|
||||
* EAP-WSC (WPS) uses following options: pin=Device_Password and
|
||||
* uuid=Device_UUID
|
||||
*
|
||||
diff --git a/src/eap_peer/eap_peap.c b/src/eap_peer/eap_peap.c
|
||||
index 12e30df..6080697 100644
|
||||
--- a/src/eap_peer/eap_peap.c
|
||||
+++ b/src/eap_peer/eap_peap.c
|
||||
@@ -67,6 +67,7 @@ struct eap_peap_data {
|
||||
u8 cmk[20];
|
||||
int soh; /* Whether IF-TNCCS-SOH (Statement of Health; Microsoft NAP)
|
||||
* is enabled. */
|
||||
+ enum { NO_AUTH, FOR_INITIAL, ALWAYS } phase2_auth;
|
||||
};
|
||||
|
||||
|
||||
@@ -114,6 +115,19 @@ static void eap_peap_parse_phase1(struct eap_peap_data *data,
|
||||
wpa_printf(MSG_DEBUG, "EAP-PEAP: Require cryptobinding");
|
||||
}
|
||||
|
||||
+ if (os_strstr(phase1, "phase2_auth=0")) {
|
||||
+ data->phase2_auth = NO_AUTH;
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "EAP-PEAP: Do not require Phase 2 authentication");
|
||||
+ } else if (os_strstr(phase1, "phase2_auth=1")) {
|
||||
+ data->phase2_auth = FOR_INITIAL;
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "EAP-PEAP: Require Phase 2 authentication for initial connection");
|
||||
+ } else if (os_strstr(phase1, "phase2_auth=2")) {
|
||||
+ data->phase2_auth = ALWAYS;
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "EAP-PEAP: Require Phase 2 authentication for all cases");
|
||||
+ }
|
||||
#ifdef EAP_TNC
|
||||
if (os_strstr(phase1, "tnc=soh2")) {
|
||||
data->soh = 2;
|
||||
@@ -142,6 +156,7 @@ static void * eap_peap_init(struct eap_sm *sm)
|
||||
data->force_peap_version = -1;
|
||||
data->peap_outer_success = 2;
|
||||
data->crypto_binding = OPTIONAL_BINDING;
|
||||
+ data->phase2_auth = FOR_INITIAL;
|
||||
|
||||
if (config && config->phase1)
|
||||
eap_peap_parse_phase1(data, config->phase1);
|
||||
@@ -454,6 +469,20 @@ static int eap_tlv_validate_cryptobinding(struct eap_sm *sm,
|
||||
}
|
||||
|
||||
|
||||
+static bool peap_phase2_sufficient(struct eap_sm *sm,
|
||||
+ struct eap_peap_data *data)
|
||||
+{
|
||||
+ if ((data->phase2_auth == ALWAYS ||
|
||||
+ (data->phase2_auth == FOR_INITIAL &&
|
||||
+ !tls_connection_resumed(sm->ssl_ctx, data->ssl.conn) &&
|
||||
+ !data->ssl.client_cert_conf) ||
|
||||
+ data->phase2_eap_started) &&
|
||||
+ !data->phase2_eap_success)
|
||||
+ return false;
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**
|
||||
* eap_tlv_process - Process a received EAP-TLV message and generate a response
|
||||
* @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
|
||||
@@ -568,6 +597,11 @@ static int eap_tlv_process(struct eap_sm *sm, struct eap_peap_data *data,
|
||||
" - force failed Phase 2");
|
||||
resp_status = EAP_TLV_RESULT_FAILURE;
|
||||
ret->decision = DECISION_FAIL;
|
||||
+ } else if (!peap_phase2_sufficient(sm, data)) {
|
||||
+ wpa_printf(MSG_INFO,
|
||||
+ "EAP-PEAP: Server indicated Phase 2 success, but sufficient Phase 2 authentication has not been completed");
|
||||
+ resp_status = EAP_TLV_RESULT_FAILURE;
|
||||
+ ret->decision = DECISION_FAIL;
|
||||
} else {
|
||||
resp_status = EAP_TLV_RESULT_SUCCESS;
|
||||
ret->decision = DECISION_UNCOND_SUCC;
|
||||
@@ -887,8 +921,7 @@ continue_req:
|
||||
/* EAP-Success within TLS tunnel is used to indicate
|
||||
* shutdown of the TLS channel. The authentication has
|
||||
* been completed. */
|
||||
- if (data->phase2_eap_started &&
|
||||
- !data->phase2_eap_success) {
|
||||
+ if (!peap_phase2_sufficient(sm, data)) {
|
||||
wpa_printf(MSG_DEBUG, "EAP-PEAP: Phase 2 "
|
||||
"Success used to indicate success, "
|
||||
"but Phase 2 EAP was not yet "
|
||||
@@ -1199,8 +1232,9 @@ static struct wpabuf * eap_peap_process(struct eap_sm *sm, void *priv,
|
||||
static bool eap_peap_has_reauth_data(struct eap_sm *sm, void *priv)
|
||||
{
|
||||
struct eap_peap_data *data = priv;
|
||||
+
|
||||
return tls_connection_established(sm->ssl_ctx, data->ssl.conn) &&
|
||||
- data->phase2_success;
|
||||
+ data->phase2_success && data->phase2_auth != ALWAYS;
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/eap_peer/eap_tls_common.c b/src/eap_peer/eap_tls_common.c
|
||||
index c1837db..a53eeb1 100644
|
||||
--- a/src/eap_peer/eap_tls_common.c
|
||||
+++ b/src/eap_peer/eap_tls_common.c
|
||||
@@ -239,6 +239,12 @@ static int eap_tls_params_from_conf(struct eap_sm *sm,
|
||||
|
||||
sm->ext_cert_check = !!(params->flags & TLS_CONN_EXT_CERT_CHECK);
|
||||
|
||||
+ if (!phase2)
|
||||
+ data->client_cert_conf = params->client_cert ||
|
||||
+ params->client_cert_blob ||
|
||||
+ params->private_key ||
|
||||
+ params->private_key_blob;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/src/eap_peer/eap_tls_common.h b/src/eap_peer/eap_tls_common.h
|
||||
index 9ac0012..3348634 100644
|
||||
--- a/src/eap_peer/eap_tls_common.h
|
||||
+++ b/src/eap_peer/eap_tls_common.h
|
||||
@@ -79,6 +79,11 @@ struct eap_ssl_data {
|
||||
* tls_v13 - Whether TLS v1.3 or newer is used
|
||||
*/
|
||||
int tls_v13;
|
||||
+
|
||||
+ /**
|
||||
+ * client_cert_conf: Whether client certificate has been configured
|
||||
+ */
|
||||
+ bool client_cert_conf;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
|
||||
index 6619d6b..d63f73c 100644
|
||||
--- a/wpa_supplicant/wpa_supplicant.conf
|
||||
+++ b/wpa_supplicant/wpa_supplicant.conf
|
||||
@@ -1321,6 +1321,13 @@ fast_reauth=1
|
||||
# * 0 = do not use cryptobinding (default)
|
||||
# * 1 = use cryptobinding if server supports it
|
||||
# * 2 = require cryptobinding
|
||||
+# 'phase2_auth' option can be used to control Phase 2 (i.e., within TLS
|
||||
+# tunnel) behavior for PEAP:
|
||||
+# * 0 = do not require Phase 2 authentication
|
||||
+# * 1 = require Phase 2 authentication when client certificate
|
||||
+# (private_key/client_cert) is no used and TLS session resumption was
|
||||
+# not used (default)
|
||||
+# * 2 = require Phase 2 authentication in all cases
|
||||
# EAP-WSC (WPS) uses following options: pin=<Device Password> or
|
||||
# pbc=1.
|
||||
#
|
||||
@@ -25,6 +25,7 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
|
||||
file://wpa_supplicant.conf \
|
||||
file://wpa_supplicant.conf-sane \
|
||||
file://99_wpa_supplicant \
|
||||
file://0001-PEAP-client-Update-Phase-2-authentication-requiremen.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "20df7ae5154b3830355f8ab4269123a87affdea59fe74fe9292a91d0d7e17b2f"
|
||||
|
||||
|
||||
151
meta/recipes-core/busybox/busybox/CVE-2021-42380.patch
Normal file
151
meta/recipes-core/busybox/busybox/CVE-2021-42380.patch
Normal file
@@ -0,0 +1,151 @@
|
||||
From 5dcc443dba039b305a510c01883e9f34e42656ae Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Fri, 26 May 2023 19:36:58 +0200
|
||||
Subject: [PATCH] awk: fix use-after-realloc (CVE-2021-42380), closes 15601
|
||||
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
|
||||
CVE: CVE-2021-42380
|
||||
Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=5dcc443dba039b305a510c01883e9f34e42656ae]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
editors/awk.c | 26 ++++++++++++++++-----
|
||||
testsuite/awk.tests | 55 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 75 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/editors/awk.c b/editors/awk.c
|
||||
index 728ee8685..2af823808 100644
|
||||
--- a/editors/awk.c
|
||||
+++ b/editors/awk.c
|
||||
@@ -555,7 +555,7 @@ struct globals {
|
||||
const char *g_progname;
|
||||
int g_lineno;
|
||||
int nfields;
|
||||
- int maxfields; /* used in fsrealloc() only */
|
||||
+ unsigned maxfields;
|
||||
var *Fields;
|
||||
char *g_pos;
|
||||
char g_saved_ch;
|
||||
@@ -1917,9 +1917,9 @@ static void fsrealloc(int size)
|
||||
{
|
||||
int i, newsize;
|
||||
|
||||
- if (size >= maxfields) {
|
||||
- /* Sanity cap, easier than catering for overflows */
|
||||
- if (size > 0xffffff)
|
||||
+ if ((unsigned)size >= maxfields) {
|
||||
+ /* Sanity cap, easier than catering for over/underflows */
|
||||
+ if ((unsigned)size > 0xffffff)
|
||||
bb_die_memory_exhausted();
|
||||
|
||||
i = maxfields;
|
||||
@@ -2877,6 +2877,7 @@ static var *evaluate(node *op, var *res)
|
||||
uint32_t opinfo;
|
||||
int opn;
|
||||
node *op1;
|
||||
+ var *old_Fields_ptr;
|
||||
|
||||
opinfo = op->info;
|
||||
opn = (opinfo & OPNMASK);
|
||||
@@ -2885,10 +2886,16 @@ static var *evaluate(node *op, var *res)
|
||||
debug_printf_eval("opinfo:%08x opn:%08x\n", opinfo, opn);
|
||||
|
||||
/* execute inevitable things */
|
||||
+ old_Fields_ptr = NULL;
|
||||
if (opinfo & OF_RES1) {
|
||||
if ((opinfo & OF_REQUIRED) && !op1)
|
||||
syntax_error(EMSG_TOO_FEW_ARGS);
|
||||
L.v = evaluate(op1, TMPVAR0);
|
||||
+ /* Does L.v point to $n variable? */
|
||||
+ if ((size_t)(L.v - Fields) < maxfields) {
|
||||
+ /* yes, remember where Fields[] is */
|
||||
+ old_Fields_ptr = Fields;
|
||||
+ }
|
||||
if (opinfo & OF_STR1) {
|
||||
L.s = getvar_s(L.v);
|
||||
debug_printf_eval("L.s:'%s'\n", L.s);
|
||||
@@ -2907,8 +2914,15 @@ static var *evaluate(node *op, var *res)
|
||||
*/
|
||||
if (opinfo & OF_RES2) {
|
||||
R.v = evaluate(op->r.n, TMPVAR1);
|
||||
- //TODO: L.v may be invalid now, set L.v to NULL to catch bugs?
|
||||
- //L.v = NULL;
|
||||
+ /* Seen in $5=$$5=$0:
|
||||
+ * Evaluation of R.v ($$5=$0 expression)
|
||||
+ * made L.v ($5) invalid. It's detected here.
|
||||
+ */
|
||||
+ if (old_Fields_ptr) {
|
||||
+ //if (old_Fields_ptr != Fields)
|
||||
+ // debug_printf_eval("L.v moved\n");
|
||||
+ L.v += Fields - old_Fields_ptr;
|
||||
+ }
|
||||
if (opinfo & OF_STR2) {
|
||||
R.s = getvar_s(R.v);
|
||||
debug_printf_eval("R.s:'%s'\n", R.s);
|
||||
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
|
||||
index bcaafe8..08afdb2 100755
|
||||
--- a/testsuite/awk.tests
|
||||
+++ b/testsuite/awk.tests
|
||||
@@ -469,4 +469,59 @@ testing 'awk printf %% prints one %' \
|
||||
"%\n" \
|
||||
'' ''
|
||||
|
||||
+# User-supplied bug (SEGV) example, was causing use-after-realloc
|
||||
+testing 'awk assign while assign' \
|
||||
+ "awk '\$5=\$\$5=\$0'; echo \$?" \
|
||||
+ "\
|
||||
+─ process timing ────────────────────────────────────┬─ ─ process timing ────────────────────────────────────┬─ overall results ────┐ results ────┐
|
||||
+│ run time : │ run time : 0 days, 0 hrs, 0 min, 56 sec │ cycles done : 0 │ days, 0 hrs, 0 min, 56 sec │ cycles done : 0 │
|
||||
+│ last new find │ last new find : 0 days, 0 hrs, 0 min, 1 sec │ corpus count : 208 │ 0 days, 0 hrs, 0 min, 1 sec │ corpus count : 208 │
|
||||
+│last saved crash : │last saved crash : none seen yet │saved crashes : 0 │ seen yet │saved crashes : 0 │
|
||||
+│ last saved hang │ last saved hang : none seen yet │ saved hangs : 0 │ none seen yet │ saved hangs : 0 │
|
||||
+├─ cycle progress ─────────────────────┬─ ├─ cycle progress ─────────────────────┬─ map coverage┴──────────────────────┤ coverage┴──────────────────────┤
|
||||
+│ now processing : │ now processing : 184.1 (88.5%) │ map density : 0.30% / 0.52% │ (88.5%) │ map density : 0.30% / 0.52% │ │ now processing : 184.1 (88.5%) │ map density : 0.30% / 0.52% │
|
||||
+│ runs timed out │ runs timed out : 0 (0.00%) │ count coverage : 2.18 bits/tuple │ 0 (0.00%) │ count coverage : 2.18 bits/tuple │
|
||||
+├─ stage progress ─────────────────────┼─ ├─ stage progress ─────────────────────┼─ findings in depth ─────────────────┤ in depth ─────────────────┤
|
||||
+│ now trying : │ now trying : havoc │ favored items : 43 (20.67%) │ │ favored items : 43 (20.67%) │
|
||||
+│ stage execs : │ stage execs : 11.2k/131k (8.51%) │ new edges on : 52 (25.00%) │ (8.51%) │ new edges on │ stage execs : 11.2k/131k (8.51%) │ new edges on : 52 (25.00%) │ 52 (25.00%) │
|
||||
+│ total execs : │ total execs : 179k │ total crashes : 0 (0 saved) │ │ total crashes : 0 (0 saved) │ │ total execs : 179k │ total crashes : 0 (0 saved) │
|
||||
+│ exec speed : │ exec speed : 3143/sec │ total tmouts : 0 (0 saved) │ │ total tmouts : 0 (0 saved) │ │ exec speed : 3143/sec │ total tmouts : 0 (0 saved) │
|
||||
+├─ fuzzing strategy yields ├─ fuzzing strategy yields ────────────┴─────────────┬─ item geometry ───────┤ item geometry ───────┤
|
||||
+│ bit flips : │ bit flips : 11/648, 4/638, 5/618 │ levels : 4 │ 4/638, 5/618 │ levels : │ bit flips : 11/648, 4/638, 5/618 │ levels : 4 │ │
|
||||
+│ byte flips : │ byte flips : 0/81, 0/71, 0/52 │ pending : 199 │ 0/71, 0/52 │ pending : 199 │
|
||||
+│ arithmetics : 11/4494, │ arithmetics : 11/4494, 0/1153, 0/0 │ pend fav : 35 │ 0/0 │ pend fav : 35 │
|
||||
+│ known ints : 1/448, 0/1986, 0/2288 │ own finds : 207 │ known ints : │ known ints : 1/448, 0/1986, 0/2288 │ own finds : 207 │ 0/1986, 0/2288 │ own finds : 207 │
|
||||
+│ dictionary : 0/0, │ dictionary : 0/0, 0/0, 0/0, 0/0 │ imported : 0 │ 0/0, 0/0 │ imported : 0 │
|
||||
+│havoc/splice : 142/146k, 23/7616 │havoc/splice : 142/146k, 23/7616 │ stability : 100.00% │ stability : 100.00% │
|
||||
+│py/custom/rq : unused, unused, │py/custom/rq : unused, unused, unused, unused ├───────────────────────┘ unused ├───────────────────────┘
|
||||
+│ trim/eff : 57.02%/26, │ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%] │ [cpu000:100%]
|
||||
+└────────────────────────────────────────────────────┘^C └────────────────────────────────────────────────────┘^C
|
||||
+0
|
||||
+" \
|
||||
+ "" \
|
||||
+ "\
|
||||
+─ process timing ────────────────────────────────────┬─ overall results ────┐
|
||||
+│ run time : 0 days, 0 hrs, 0 min, 56 sec │ cycles done : 0 │
|
||||
+│ last new find : 0 days, 0 hrs, 0 min, 1 sec │ corpus count : 208 │
|
||||
+│last saved crash : none seen yet │saved crashes : 0 │
|
||||
+│ last saved hang : none seen yet │ saved hangs : 0 │
|
||||
+├─ cycle progress ─────────────────────┬─ map coverage┴──────────────────────┤
|
||||
+│ now processing : 184.1 (88.5%) │ map density : 0.30% / 0.52% │
|
||||
+│ runs timed out : 0 (0.00%) │ count coverage : 2.18 bits/tuple │
|
||||
+├─ stage progress ─────────────────────┼─ findings in depth ─────────────────┤
|
||||
+│ now trying : havoc │ favored items : 43 (20.67%) │
|
||||
+│ stage execs : 11.2k/131k (8.51%) │ new edges on : 52 (25.00%) │
|
||||
+│ total execs : 179k │ total crashes : 0 (0 saved) │
|
||||
+│ exec speed : 3143/sec │ total tmouts : 0 (0 saved) │
|
||||
+├─ fuzzing strategy yields ────────────┴─────────────┬─ item geometry ───────┤
|
||||
+│ bit flips : 11/648, 4/638, 5/618 │ levels : 4 │
|
||||
+│ byte flips : 0/81, 0/71, 0/52 │ pending : 199 │
|
||||
+│ arithmetics : 11/4494, 0/1153, 0/0 │ pend fav : 35 │
|
||||
+│ known ints : 1/448, 0/1986, 0/2288 │ own finds : 207 │
|
||||
+│ dictionary : 0/0, 0/0, 0/0, 0/0 │ imported : 0 │
|
||||
+│havoc/splice : 142/146k, 23/7616 │ stability : 100.00% │
|
||||
+│py/custom/rq : unused, unused, unused, unused ├───────────────────────┘
|
||||
+│ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%]
|
||||
+└────────────────────────────────────────────────────┘^C"
|
||||
+
|
||||
exit $FAILCOUNT
|
||||
--
|
||||
2.30.2
|
||||
|
||||
68
meta/recipes-core/busybox/busybox/CVE-2023-42363.patch
Normal file
68
meta/recipes-core/busybox/busybox/CVE-2023-42363.patch
Normal file
@@ -0,0 +1,68 @@
|
||||
From fb08d43d44d1fea1f741fafb9aa7e1958a5f69aa Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Mon, 20 May 2024 17:55:28 +0200
|
||||
Subject: awk: fix use after free (CVE-2023-42363)
|
||||
|
||||
function old new delta
|
||||
evaluate 3377 3385 +8
|
||||
|
||||
Fixes https://bugs.busybox.net/show_bug.cgi?id=15865
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
|
||||
Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=fb08d43d44d1fea1f741fafb9aa7e1958a5f69aa]
|
||||
CVE: CVE-2023-42363
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
editors/awk.c | 21 +++++++++++++--------
|
||||
1 file changed, 13 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/editors/awk.c b/editors/awk.c
|
||||
index 654cbac..4fbc11d 100644
|
||||
--- a/editors/awk.c
|
||||
+++ b/editors/awk.c
|
||||
@@ -2896,19 +2896,14 @@ static var *evaluate(node *op, var *res)
|
||||
/* yes, remember where Fields[] is */
|
||||
old_Fields_ptr = Fields;
|
||||
}
|
||||
- if (opinfo & OF_STR1) {
|
||||
- L.s = getvar_s(L.v);
|
||||
- debug_printf_eval("L.s:'%s'\n", L.s);
|
||||
- }
|
||||
if (opinfo & OF_NUM1) {
|
||||
L_d = getvar_i(L.v);
|
||||
debug_printf_eval("L_d:%f\n", L_d);
|
||||
}
|
||||
}
|
||||
- /* NB: Must get string/numeric values of L (done above)
|
||||
- * _before_ evaluate()'ing R.v: if both L and R are $NNNs,
|
||||
- * and right one is large, then L.v points to Fields[NNN1],
|
||||
- * second evaluate() reallocates and moves (!) Fields[],
|
||||
+ /* NB: if both L and R are $NNNs, and right one is large,
|
||||
+ * then at this pint L.v points to Fields[NNN1], second
|
||||
+ * evaluate() below reallocates and moves (!) Fields[],
|
||||
* R.v points to Fields[NNN2] but L.v now points to freed mem!
|
||||
* (Seen trying to evaluate "$444 $44444")
|
||||
*/
|
||||
@@ -2928,6 +2923,16 @@ static var *evaluate(node *op, var *res)
|
||||
debug_printf_eval("R.s:'%s'\n", R.s);
|
||||
}
|
||||
}
|
||||
+ /* Get L.s _after_ R.v is evaluated: it may have realloc'd L.v
|
||||
+ * so we must get the string after "old_Fields_ptr" correction
|
||||
+ * above. Testcase: x = (v = "abc", gsub("b", "X", v));
|
||||
+ */
|
||||
+ if (opinfo & OF_RES1) {
|
||||
+ if (opinfo & OF_STR1) {
|
||||
+ L.s = getvar_s(L.v);
|
||||
+ debug_printf_eval("L.s:'%s'\n", L.s);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
debug_printf_eval("switch(0x%x)\n", XC(opinfo & OPCLSMASK));
|
||||
switch (XC(opinfo & OPCLSMASK)) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
197
meta/recipes-core/busybox/busybox/CVE-2023-42364_42365-1.patch
Normal file
197
meta/recipes-core/busybox/busybox/CVE-2023-42364_42365-1.patch
Normal file
@@ -0,0 +1,197 @@
|
||||
From dedc9380c76834ba64c8b526aef6f461ea4e7f2e Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Tue, 30 May 2023 16:42:18 +0200
|
||||
Subject: [PATCH 1/2] awk: fix precedence of = relative to ==
|
||||
|
||||
Discovered while adding code to disallow assignments to non-lvalues
|
||||
|
||||
function old new delta
|
||||
parse_expr 936 991 +55
|
||||
.rodata 105243 105247 +4
|
||||
------------------------------------------------------------------------------
|
||||
(add/remove: 0/0 grow/shrink: 2/0 up/down: 59/0) Total: 59 bytes
|
||||
|
||||
Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=0256e00a9d077588bd3a39f5a1ef7e2eaa2911e4]
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
(cherry picked from commit 0256e00a9d077588bd3a39f5a1ef7e2eaa2911e4)
|
||||
|
||||
CVE: CVE-2023-42364 CVE-2023-42365
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
editors/awk.c | 66 ++++++++++++++++++++++++++++++---------------
|
||||
testsuite/awk.tests | 5 ++++
|
||||
2 files changed, 50 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/editors/awk.c b/editors/awk.c
|
||||
index ec9301e..aff86fe 100644
|
||||
--- a/editors/awk.c
|
||||
+++ b/editors/awk.c
|
||||
@@ -337,7 +337,9 @@ static void debug_parse_print_tc(uint32_t n)
|
||||
#undef P
|
||||
#undef PRIMASK
|
||||
#undef PRIMASK2
|
||||
-#define P(x) (x << 24)
|
||||
+/* Smaller 'x' means _higher_ operator precedence */
|
||||
+#define PRECEDENCE(x) (x << 24)
|
||||
+#define P(x) PRECEDENCE(x)
|
||||
#define PRIMASK 0x7F000000
|
||||
#define PRIMASK2 0x7E000000
|
||||
|
||||
@@ -360,7 +362,7 @@ enum {
|
||||
OC_MOVE = 0x1f00, OC_PGETLINE = 0x2000, OC_REGEXP = 0x2100,
|
||||
OC_REPLACE = 0x2200, OC_RETURN = 0x2300, OC_SPRINTF = 0x2400,
|
||||
OC_TERNARY = 0x2500, OC_UNARY = 0x2600, OC_VAR = 0x2700,
|
||||
- OC_DONE = 0x2800,
|
||||
+ OC_CONST = 0x2800, OC_DONE = 0x2900,
|
||||
|
||||
ST_IF = 0x3000, ST_DO = 0x3100, ST_FOR = 0x3200,
|
||||
ST_WHILE = 0x3300
|
||||
@@ -440,9 +442,9 @@ static const uint32_t tokeninfo[] ALIGN4 = {
|
||||
#define TI_PREINC (OC_UNARY|xV|P(9)|'P')
|
||||
#define TI_PREDEC (OC_UNARY|xV|P(9)|'M')
|
||||
TI_PREINC, TI_PREDEC, OC_FIELD|xV|P(5),
|
||||
- OC_COMPARE|VV|P(39)|5, OC_MOVE|VV|P(74), OC_REPLACE|NV|P(74)|'+', OC_REPLACE|NV|P(74)|'-',
|
||||
- OC_REPLACE|NV|P(74)|'*', OC_REPLACE|NV|P(74)|'/', OC_REPLACE|NV|P(74)|'%', OC_REPLACE|NV|P(74)|'&',
|
||||
- OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(74)|'&', OC_BINARY|NV|P(15)|'&',
|
||||
+ OC_COMPARE|VV|P(39)|5, OC_MOVE|VV|P(38), OC_REPLACE|NV|P(38)|'+', OC_REPLACE|NV|P(38)|'-',
|
||||
+ OC_REPLACE|NV|P(38)|'*', OC_REPLACE|NV|P(38)|'/', OC_REPLACE|NV|P(38)|'%', OC_REPLACE|NV|P(38)|'&',
|
||||
+ OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(38)|'&', OC_BINARY|NV|P(15)|'&',
|
||||
OC_BINARY|NV|P(25)|'/', OC_BINARY|NV|P(25)|'%', OC_BINARY|NV|P(15)|'&', OC_BINARY|NV|P(25)|'*',
|
||||
OC_COMPARE|VV|P(39)|4, OC_COMPARE|VV|P(39)|3, OC_COMPARE|VV|P(39)|0, OC_COMPARE|VV|P(39)|1,
|
||||
#define TI_LESS (OC_COMPARE|VV|P(39)|2)
|
||||
@@ -1290,7 +1292,7 @@ static uint32_t next_token(uint32_t expected)
|
||||
save_tclass = tc;
|
||||
save_info = t_info;
|
||||
tc = TC_BINOPX;
|
||||
- t_info = OC_CONCAT | SS | P(35);
|
||||
+ t_info = OC_CONCAT | SS | PRECEDENCE(35);
|
||||
}
|
||||
|
||||
t_tclass = tc;
|
||||
@@ -1350,9 +1352,8 @@ static node *parse_expr(uint32_t term_tc)
|
||||
{
|
||||
node sn;
|
||||
node *cn = &sn;
|
||||
- node *vn, *glptr;
|
||||
+ node *glptr;
|
||||
uint32_t tc, expected_tc;
|
||||
- var *v;
|
||||
|
||||
debug_printf_parse("%s() term_tc(%x):", __func__, term_tc);
|
||||
debug_parse_print_tc(term_tc);
|
||||
@@ -1363,11 +1364,12 @@ static node *parse_expr(uint32_t term_tc)
|
||||
expected_tc = TS_OPERAND | TS_UOPPRE | TC_REGEXP | term_tc;
|
||||
|
||||
while (!((tc = next_token(expected_tc)) & term_tc)) {
|
||||
+ node *vn;
|
||||
|
||||
if (glptr && (t_info == TI_LESS)) {
|
||||
/* input redirection (<) attached to glptr node */
|
||||
debug_printf_parse("%s: input redir\n", __func__);
|
||||
- cn = glptr->l.n = new_node(OC_CONCAT | SS | P(37));
|
||||
+ cn = glptr->l.n = new_node(OC_CONCAT | SS | PRECEDENCE(37));
|
||||
cn->a.n = glptr;
|
||||
expected_tc = TS_OPERAND | TS_UOPPRE;
|
||||
glptr = NULL;
|
||||
@@ -1379,24 +1381,42 @@ static node *parse_expr(uint32_t term_tc)
|
||||
* previous operators with higher priority */
|
||||
vn = cn;
|
||||
while (((t_info & PRIMASK) > (vn->a.n->info & PRIMASK2))
|
||||
- || ((t_info == vn->info) && t_info == TI_COLON)
|
||||
+ || (t_info == vn->info && t_info == TI_COLON)
|
||||
) {
|
||||
vn = vn->a.n;
|
||||
if (!vn->a.n) syntax_error(EMSG_UNEXP_TOKEN);
|
||||
}
|
||||
if (t_info == TI_TERNARY)
|
||||
//TODO: why?
|
||||
- t_info += P(6);
|
||||
+ t_info += PRECEDENCE(6);
|
||||
cn = vn->a.n->r.n = new_node(t_info);
|
||||
cn->a.n = vn->a.n;
|
||||
if (tc & TS_BINOP) {
|
||||
cn->l.n = vn;
|
||||
-//FIXME: this is the place to detect and reject assignments to non-lvalues.
|
||||
-//Currently we allow "assignments" to consts and temporaries, nonsense like this:
|
||||
-// awk 'BEGIN { "qwe" = 1 }'
|
||||
-// awk 'BEGIN { 7 *= 7 }'
|
||||
-// awk 'BEGIN { length("qwe") = 1 }'
|
||||
-// awk 'BEGIN { (1+1) += 3 }'
|
||||
+
|
||||
+ /* Prevent:
|
||||
+ * awk 'BEGIN { "qwe" = 1 }'
|
||||
+ * awk 'BEGIN { 7 *= 7 }'
|
||||
+ * awk 'BEGIN { length("qwe") = 1 }'
|
||||
+ * awk 'BEGIN { (1+1) += 3 }'
|
||||
+ */
|
||||
+ /* Assignment? (including *= and friends) */
|
||||
+ if (((t_info & OPCLSMASK) == OC_MOVE)
|
||||
+ || ((t_info & OPCLSMASK) == OC_REPLACE)
|
||||
+ ) {
|
||||
+ debug_printf_parse("%s: MOVE/REPLACE vn->info:%08x\n", __func__, vn->info);
|
||||
+ /* Left side is a (variable or array element)
|
||||
+ * or function argument
|
||||
+ * or $FIELD ?
|
||||
+ */
|
||||
+ if ((vn->info & OPCLSMASK) != OC_VAR
|
||||
+ && (vn->info & OPCLSMASK) != OC_FNARG
|
||||
+ && (vn->info & OPCLSMASK) != OC_FIELD
|
||||
+ ) {
|
||||
+ syntax_error(EMSG_UNEXP_TOKEN); /* no. bad */
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
expected_tc = TS_OPERAND | TS_UOPPRE | TC_REGEXP;
|
||||
if (t_info == TI_PGETLINE) {
|
||||
/* it's a pipe */
|
||||
@@ -1432,6 +1452,8 @@ static node *parse_expr(uint32_t term_tc)
|
||||
/* one should be very careful with switch on tclass -
|
||||
* only simple tclasses should be used (TC_xyz, not TS_xyz) */
|
||||
switch (tc) {
|
||||
+ var *v;
|
||||
+
|
||||
case TC_VARIABLE:
|
||||
case TC_ARRAY:
|
||||
debug_printf_parse("%s: TC_VARIABLE | TC_ARRAY\n", __func__);
|
||||
@@ -1452,14 +1474,14 @@ static node *parse_expr(uint32_t term_tc)
|
||||
case TC_NUMBER:
|
||||
case TC_STRING:
|
||||
debug_printf_parse("%s: TC_NUMBER | TC_STRING\n", __func__);
|
||||
- cn->info = OC_VAR;
|
||||
+ cn->info = OC_CONST;
|
||||
v = cn->l.v = xzalloc(sizeof(var));
|
||||
- if (tc & TC_NUMBER)
|
||||
+ if (tc & TC_NUMBER) {
|
||||
setvar_i(v, t_double);
|
||||
- else {
|
||||
+ } else {
|
||||
setvar_s(v, t_string);
|
||||
- expected_tc &= ~TC_UOPPOST; /* "str"++ is not allowed */
|
||||
}
|
||||
+ expected_tc &= ~TC_UOPPOST; /* NUM++, "str"++ not allowed */
|
||||
break;
|
||||
|
||||
case TC_REGEXP:
|
||||
@@ -3107,6 +3129,8 @@ static var *evaluate(node *op, var *res)
|
||||
|
||||
/* -- recursive node type -- */
|
||||
|
||||
+ case XC( OC_CONST ):
|
||||
+ debug_printf_eval("CONST ");
|
||||
case XC( OC_VAR ):
|
||||
debug_printf_eval("VAR\n");
|
||||
L.v = op->l.v;
|
||||
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
|
||||
index ddc5104..a78fdcd 100755
|
||||
--- a/testsuite/awk.tests
|
||||
+++ b/testsuite/awk.tests
|
||||
@@ -540,4 +540,9 @@ testing 'awk assign while assign' \
|
||||
│ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%]
|
||||
└────────────────────────────────────────────────────┘^C"
|
||||
|
||||
+testing "awk = has higher precedence than == (despite what gawk manpage claims)" \
|
||||
+ "awk 'BEGIN { v=1; print 2==v; print 2==v=2; print v; print v=3==3; print v}'" \
|
||||
+ '0\n1\n2\n1\n3\n' \
|
||||
+ '' ''
|
||||
+
|
||||
exit $FAILCOUNT
|
||||
@@ -0,0 +1,96 @@
|
||||
From c3bfdac8e0e9a21d524ad72036953f68d2193e52 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Tue, 21 May 2024 14:46:08 +0200
|
||||
Subject: [PATCH 2/2] awk: fix ternary operator and precedence of =
|
||||
|
||||
Adjust the = precedence test to match behavior of gawk, mawk and
|
||||
FreeBSD. awk 'BEGIN {print v=3==3; print v}' should print two '1'.
|
||||
|
||||
To fix this, and to unbreak the ternary conditional operator, we restore
|
||||
the precedence of = in the token list, but override this with a lower
|
||||
priority when the assignment is on the right side of a compare.
|
||||
|
||||
This fixes commit 0256e00a9d07 (awk: fix precedence of = relative to ==) [1]
|
||||
|
||||
Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2024-May/090766.html]
|
||||
|
||||
[1] https://bugs.busybox.net/show_bug.cgi?id=15871#c6
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
(cherry picked from commit 1714301c405ef03b39605c85c23f22a190cddd95)
|
||||
|
||||
CVE: CVE-2023-42364 CVE-2023-42365
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
editors/awk.c | 18 ++++++++++++++----
|
||||
testsuite/awk.tests | 9 +++++++--
|
||||
2 files changed, 21 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/editors/awk.c b/editors/awk.c
|
||||
index aff86fe..f320d8c 100644
|
||||
--- a/editors/awk.c
|
||||
+++ b/editors/awk.c
|
||||
@@ -442,9 +442,10 @@ static const uint32_t tokeninfo[] ALIGN4 = {
|
||||
#define TI_PREINC (OC_UNARY|xV|P(9)|'P')
|
||||
#define TI_PREDEC (OC_UNARY|xV|P(9)|'M')
|
||||
TI_PREINC, TI_PREDEC, OC_FIELD|xV|P(5),
|
||||
- OC_COMPARE|VV|P(39)|5, OC_MOVE|VV|P(38), OC_REPLACE|NV|P(38)|'+', OC_REPLACE|NV|P(38)|'-',
|
||||
- OC_REPLACE|NV|P(38)|'*', OC_REPLACE|NV|P(38)|'/', OC_REPLACE|NV|P(38)|'%', OC_REPLACE|NV|P(38)|'&',
|
||||
- OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(38)|'&', OC_BINARY|NV|P(15)|'&',
|
||||
+#define TI_ASSIGN (OC_MOVE|VV|P(74))
|
||||
+ OC_COMPARE|VV|P(39)|5, TI_ASSIGN, OC_REPLACE|NV|P(74)|'+', OC_REPLACE|NV|P(74)|'-',
|
||||
+ OC_REPLACE|NV|P(74)|'*', OC_REPLACE|NV|P(74)|'/', OC_REPLACE|NV|P(74)|'%', OC_REPLACE|NV|P(74)|'&',
|
||||
+ OC_BINARY|NV|P(29)|'+', OC_BINARY|NV|P(29)|'-', OC_REPLACE|NV|P(74)|'&', OC_BINARY|NV|P(15)|'&',
|
||||
OC_BINARY|NV|P(25)|'/', OC_BINARY|NV|P(25)|'%', OC_BINARY|NV|P(15)|'&', OC_BINARY|NV|P(25)|'*',
|
||||
OC_COMPARE|VV|P(39)|4, OC_COMPARE|VV|P(39)|3, OC_COMPARE|VV|P(39)|0, OC_COMPARE|VV|P(39)|1,
|
||||
#define TI_LESS (OC_COMPARE|VV|P(39)|2)
|
||||
@@ -1376,11 +1377,19 @@ static node *parse_expr(uint32_t term_tc)
|
||||
continue;
|
||||
}
|
||||
if (tc & (TS_BINOP | TC_UOPPOST)) {
|
||||
+ int prio;
|
||||
debug_printf_parse("%s: TS_BINOP | TC_UOPPOST tc:%x\n", __func__, tc);
|
||||
/* for binary and postfix-unary operators, jump back over
|
||||
* previous operators with higher priority */
|
||||
vn = cn;
|
||||
- while (((t_info & PRIMASK) > (vn->a.n->info & PRIMASK2))
|
||||
+ /* Let assignment get higher priority when used on right
|
||||
+ * side in compare. i.e: 2==v=3 */
|
||||
+ if (t_info == TI_ASSIGN && (vn->a.n->info & OPCLSMASK) == OC_COMPARE) {
|
||||
+ prio = PRECEDENCE(38);
|
||||
+ } else {
|
||||
+ prio = (t_info & PRIMASK);
|
||||
+ }
|
||||
+ while ((prio > (vn->a.n->info & PRIMASK2))
|
||||
|| (t_info == vn->info && t_info == TI_COLON)
|
||||
) {
|
||||
vn = vn->a.n;
|
||||
@@ -1412,6 +1421,7 @@ static node *parse_expr(uint32_t term_tc)
|
||||
if ((vn->info & OPCLSMASK) != OC_VAR
|
||||
&& (vn->info & OPCLSMASK) != OC_FNARG
|
||||
&& (vn->info & OPCLSMASK) != OC_FIELD
|
||||
+ && (vn->info & OPCLSMASK) != OC_COMPARE
|
||||
) {
|
||||
syntax_error(EMSG_UNEXP_TOKEN); /* no. bad */
|
||||
}
|
||||
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
|
||||
index a78fdcd..d2706de 100755
|
||||
--- a/testsuite/awk.tests
|
||||
+++ b/testsuite/awk.tests
|
||||
@@ -540,9 +540,14 @@ testing 'awk assign while assign' \
|
||||
│ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%]
|
||||
└────────────────────────────────────────────────────┘^C"
|
||||
|
||||
-testing "awk = has higher precedence than == (despite what gawk manpage claims)" \
|
||||
+testing "awk = has higher precedence than == on right side" \
|
||||
"awk 'BEGIN { v=1; print 2==v; print 2==v=2; print v; print v=3==3; print v}'" \
|
||||
- '0\n1\n2\n1\n3\n' \
|
||||
+ '0\n1\n2\n1\n1\n' \
|
||||
+ '' ''
|
||||
+
|
||||
+testing 'awk ternary precedence' \
|
||||
+ "awk 'BEGIN { a = 0 ? \"yes\": \"no\"; print a }'" \
|
||||
+ 'no\n' \
|
||||
'' ''
|
||||
|
||||
exit $FAILCOUNT
|
||||
36
meta/recipes-core/busybox/busybox/CVE-2023-42366.patch
Normal file
36
meta/recipes-core/busybox/busybox/CVE-2023-42366.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 8542236894a8d5f7393327117bc7f64787444efc Mon Sep 17 00:00:00 2001
|
||||
From: Valery Ushakov <uwe@stderr.spb.ru>
|
||||
Date: Wed, 24 Jan 2024 22:24:41 +0300
|
||||
Subject: [PATCH] awk.c: fix CVE-2023-42366 (bug #15874)
|
||||
|
||||
Make sure we don't read past the end of the string in next_token()
|
||||
when backslash is the last character in an (invalid) regexp.
|
||||
a fix and issue reported in bugzilla
|
||||
|
||||
https://bugs.busybox.net/show_bug.cgi?id=15874
|
||||
|
||||
Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2024-May/090766.html]
|
||||
CVE: CVE-2023-42366
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
editors/awk.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/editors/awk.c b/editors/awk.c
|
||||
index f320d8c..a53b193 100644
|
||||
--- a/editors/awk.c
|
||||
+++ b/editors/awk.c
|
||||
@@ -1168,9 +1168,11 @@ static uint32_t next_token(uint32_t expected)
|
||||
s[-1] = bb_process_escape_sequence((const char **)&pp);
|
||||
if (*p == '\\')
|
||||
*s++ = '\\';
|
||||
- if (pp == p)
|
||||
+ if (pp == p) {
|
||||
+ if (*p == '\0')
|
||||
+ syntax_error(EMSG_UNEXP_EOS);
|
||||
*s++ = *p++;
|
||||
- else
|
||||
+ } else
|
||||
p = pp;
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,11 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
|
||||
file://CVE-2022-30065.patch \
|
||||
file://0001-devmem-add-128-bit-width.patch \
|
||||
file://CVE-2022-48174.patch \
|
||||
file://CVE-2021-42380.patch \
|
||||
file://CVE-2023-42363.patch \
|
||||
file://CVE-2023-42364_42365-1.patch \
|
||||
file://CVE-2023-42364_42365-2.patch \
|
||||
file://CVE-2023-42366.patch \
|
||||
"
|
||||
SRC_URI:append:libc-musl = " file://musl.cfg "
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "75ff26ce9921dd4cb579274bb30f97bad502ba34"
|
||||
SRCREV ?= "940c885c239be4139908c1c322cd335e02d27a92"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=kirkstone \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -145,7 +145,7 @@ do_install:append:class-target () {
|
||||
ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext
|
||||
fi
|
||||
|
||||
if [ "${TARGET_ARCH}" == "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then
|
||||
if [ "${TARGET_ARCH}" = "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then
|
||||
ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32
|
||||
fi
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ SRC_URI += "\
|
||||
file://CVE-2024-24784.patch \
|
||||
file://CVE-2024-24785.patch \
|
||||
file://CVE-2023-45288.patch \
|
||||
file://CVE-2024-24789.patch \
|
||||
file://CVE-2024-24791.patch \
|
||||
"
|
||||
SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
|
||||
|
||||
|
||||
78
meta/recipes-devtools/go/go-1.21/CVE-2024-24789.patch
Normal file
78
meta/recipes-devtools/go/go-1.21/CVE-2024-24789.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
From c8e40338cf00f3c1d86c8fb23863ad67a4c72bcc Mon Sep 17 00:00:00 2001
|
||||
From: Damien Neil <dneil@google.com>
|
||||
Date: Tue, 14 May 2024 14:39:10 -0700
|
||||
Subject: [PATCH] [release-branch.go1.21] archive/zip: treat truncated EOCDR
|
||||
comment as an error
|
||||
|
||||
When scanning for an end of central directory record,
|
||||
treat an EOCDR signature with a record containing a truncated
|
||||
comment as an error. Previously, we would skip over the invalid
|
||||
record and look for another one. Other implementations do not
|
||||
do this (they either consider this a hard error, or just ignore
|
||||
the truncated comment). This parser misalignment allowed
|
||||
presenting entirely different archive contents to Go programs
|
||||
and other zip decoders.
|
||||
|
||||
For #66869
|
||||
Fixes #67553
|
||||
|
||||
Change-Id: I94e5cb028534bb5704588b8af27f1e22ea49c7c6
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/585397
|
||||
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
||||
(cherry picked from commit 33d725e5758bf1fea62e6c77fc70b57a828a49f5)
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/588795
|
||||
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
|
||||
|
||||
CVE: CVE-2024-24789
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/c8e40338cf00f3c1d86c8fb23863ad67a4c72bcc]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/archive/zip/reader.go | 8 ++++++--
|
||||
src/archive/zip/reader_test.go | 8 ++++++++
|
||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/archive/zip/reader.go b/src/archive/zip/reader.go
|
||||
index e40a2c6..987f543 100644
|
||||
--- a/src/archive/zip/reader.go
|
||||
+++ b/src/archive/zip/reader.go
|
||||
@@ -644,9 +644,13 @@ func findSignatureInBlock(b []byte) int {
|
||||
if b[i] == 'P' && b[i+1] == 'K' && b[i+2] == 0x05 && b[i+3] == 0x06 {
|
||||
// n is length of comment
|
||||
n := int(b[i+directoryEndLen-2]) | int(b[i+directoryEndLen-1])<<8
|
||||
- if n+directoryEndLen+i <= len(b) {
|
||||
- return i
|
||||
+ if n+directoryEndLen+i > len(b) {
|
||||
+ // Truncated comment.
|
||||
+ // Some parsers (such as Info-ZIP) ignore the truncated comment
|
||||
+ // rather than treating it as a hard error.
|
||||
+ return -1
|
||||
}
|
||||
+ return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
diff --git a/src/archive/zip/reader_test.go b/src/archive/zip/reader_test.go
|
||||
index a549153..7ac394d 100644
|
||||
--- a/src/archive/zip/reader_test.go
|
||||
+++ b/src/archive/zip/reader_test.go
|
||||
@@ -487,6 +487,14 @@ var tests = []ZipTest{
|
||||
},
|
||||
},
|
||||
},
|
||||
+ // Issue 66869: Don't skip over an EOCDR with a truncated comment.
|
||||
+ // The test file sneakily hides a second EOCDR before the first one;
|
||||
+ // previously we would extract one file ("file") from this archive,
|
||||
+ // while most other tools would reject the file or extract a different one ("FILE").
|
||||
+ {
|
||||
+ Name: "comment-truncated.zip",
|
||||
+ Error: ErrFormat,
|
||||
+ },
|
||||
}
|
||||
|
||||
func TestReader(t *testing.T) {
|
||||
--
|
||||
2.40.0
|
||||
359
meta/recipes-devtools/go/go-1.21/CVE-2024-24791.patch
Normal file
359
meta/recipes-devtools/go/go-1.21/CVE-2024-24791.patch
Normal file
@@ -0,0 +1,359 @@
|
||||
From c9be6ae748b7679b644a38182d456cb5a6ac06ee Mon Sep 17 00:00:00 2001
|
||||
From: Damien Neil <dneil@google.com>
|
||||
Date: Thu, 6 Jun 2024 12:50:46 -0700
|
||||
Subject: [PATCH] [release-branch.go1.21] net/http: send body or close
|
||||
connection on expect-100-continue requests
|
||||
|
||||
When sending a request with an "Expect: 100-continue" header,
|
||||
we must send the request body before sending any further requests
|
||||
on the connection.
|
||||
|
||||
When receiving a non-1xx response to an "Expect: 100-continue" request,
|
||||
send the request body if the connection isn't being closed after
|
||||
processing the response. In other words, if either the request
|
||||
or response contains a "Connection: close" header, then skip sending
|
||||
the request body (because the connection will not be used for
|
||||
further requests), but otherwise send it.
|
||||
|
||||
Correct a comment on the server-side Expect: 100-continue handling
|
||||
that implied sending the request body is optional. It isn't.
|
||||
|
||||
For #67555
|
||||
Fixes #68199
|
||||
|
||||
Change-Id: Ia2f12091bee697771087f32ac347509ec5922d54
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/591255
|
||||
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
||||
Reviewed-by: Jonathan Amsterdam <jba@google.com>
|
||||
(cherry picked from commit cf501e05e138e6911f759a5db786e90b295499b9)
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/595096
|
||||
Reviewed-by: Joedian Reid <joedian@google.com>
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
|
||||
CVE: CVE-2024-24791
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/c9be6ae748b7679b644a38182d456cb5a6ac06ee ]
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
src/net/http/server.go | 25 ++--
|
||||
src/net/http/transport.go | 34 ++++--
|
||||
src/net/http/transport_test.go | 203 ++++++++++++++++++++-------------
|
||||
3 files changed, 164 insertions(+), 98 deletions(-)
|
||||
|
||||
diff --git a/src/net/http/server.go b/src/net/http/server.go
|
||||
index 4fc8fed..1648f1c 100644
|
||||
--- a/src/net/http/server.go
|
||||
+++ b/src/net/http/server.go
|
||||
@@ -1297,16 +1297,21 @@ func (cw *chunkWriter) writeHeader(p []byte) {
|
||||
|
||||
// If the client wanted a 100-continue but we never sent it to
|
||||
// them (or, more strictly: we never finished reading their
|
||||
- // request body), don't reuse this connection because it's now
|
||||
- // in an unknown state: we might be sending this response at
|
||||
- // the same time the client is now sending its request body
|
||||
- // after a timeout. (Some HTTP clients send Expect:
|
||||
- // 100-continue but knowing that some servers don't support
|
||||
- // it, the clients set a timer and send the body later anyway)
|
||||
- // If we haven't seen EOF, we can't skip over the unread body
|
||||
- // because we don't know if the next bytes on the wire will be
|
||||
- // the body-following-the-timer or the subsequent request.
|
||||
- // See Issue 11549.
|
||||
+ // request body), don't reuse this connection.
|
||||
+ //
|
||||
+ // This behavior was first added on the theory that we don't know
|
||||
+ // if the next bytes on the wire are going to be the remainder of
|
||||
+ // the request body or the subsequent request (see issue 11549),
|
||||
+ // but that's not correct: If we keep using the connection,
|
||||
+ // the client is required to send the request body whether we
|
||||
+ // asked for it or not.
|
||||
+ //
|
||||
+ // We probably do want to skip reusing the connection in most cases,
|
||||
+ // however. If the client is offering a large request body that we
|
||||
+ // don't intend to use, then it's better to close the connection
|
||||
+ // than to read the body. For now, assume that if we're sending
|
||||
+ // headers, the handler is done reading the body and we should
|
||||
+ // drop the connection if we haven't seen EOF.
|
||||
if ecr, ok := w.req.Body.(*expectContinueReader); ok && !ecr.sawEOF.isSet() {
|
||||
w.closeAfterReply = true
|
||||
}
|
||||
diff --git a/src/net/http/transport.go b/src/net/http/transport.go
|
||||
index 309194e..e46ddef 100644
|
||||
--- a/src/net/http/transport.go
|
||||
+++ b/src/net/http/transport.go
|
||||
@@ -2282,17 +2282,12 @@ func (pc *persistConn) readResponse(rc requestAndChan, trace *httptrace.ClientTr
|
||||
return
|
||||
}
|
||||
resCode := resp.StatusCode
|
||||
- if continueCh != nil {
|
||||
- if resCode == 100 {
|
||||
- if trace != nil && trace.Got100Continue != nil {
|
||||
- trace.Got100Continue()
|
||||
- }
|
||||
- continueCh <- struct{}{}
|
||||
- continueCh = nil
|
||||
- } else if resCode >= 200 {
|
||||
- close(continueCh)
|
||||
- continueCh = nil
|
||||
+ if continueCh != nil && resCode == StatusContinue {
|
||||
+ if trace != nil && trace.Got100Continue != nil {
|
||||
+ trace.Got100Continue()
|
||||
}
|
||||
+ continueCh <- struct{}{}
|
||||
+ continueCh = nil
|
||||
}
|
||||
is1xx := 100 <= resCode && resCode <= 199
|
||||
// treat 101 as a terminal status, see issue 26161
|
||||
@@ -2315,6 +2310,25 @@ func (pc *persistConn) readResponse(rc requestAndChan, trace *httptrace.ClientTr
|
||||
if resp.isProtocolSwitch() {
|
||||
resp.Body = newReadWriteCloserBody(pc.br, pc.conn)
|
||||
}
|
||||
+ if continueCh != nil {
|
||||
+ // We send an "Expect: 100-continue" header, but the server
|
||||
+ // responded with a terminal status and no 100 Continue.
|
||||
+ //
|
||||
+ // If we're going to keep using the connection, we need to send the request body.
|
||||
+ // Tell writeLoop to skip sending the body if we're going to close the connection,
|
||||
+ // or to send it otherwise.
|
||||
+ //
|
||||
+ // The case where we receive a 101 Switching Protocols response is a bit
|
||||
+ // ambiguous, since we don't know what protocol we're switching to.
|
||||
+ // Conceivably, it's one that doesn't need us to send the body.
|
||||
+ // Given that we'll send the body if ExpectContinueTimeout expires,
|
||||
+ // be consistent and always send it if we aren't closing the connection.
|
||||
+ if resp.Close || rc.req.Close {
|
||||
+ close(continueCh) // don't send the body; the connection will close
|
||||
+ } else {
|
||||
+ continueCh <- struct{}{} // send the body
|
||||
+ }
|
||||
+ }
|
||||
|
||||
resp.TLS = pc.tlsState
|
||||
return
|
||||
diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go
|
||||
index 58f12af..8000ecc 100644
|
||||
--- a/src/net/http/transport_test.go
|
||||
+++ b/src/net/http/transport_test.go
|
||||
@@ -1130,95 +1130,142 @@ func TestTransportGzip(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
-// If a request has Expect:100-continue header, the request blocks sending body until the first response.
|
||||
-// Premature consumption of the request body should not be occurred.
|
||||
-func TestTransportExpect100Continue(t *testing.T) {
|
||||
- setParallel(t)
|
||||
- defer afterTest(t)
|
||||
+// A transport100Continue test exercises Transport behaviors when sending a
|
||||
+// request with an Expect: 100-continue header.
|
||||
+type transport100ContinueTest struct {
|
||||
+ t *testing.T
|
||||
|
||||
- ts := httptest.NewServer(HandlerFunc(func(rw ResponseWriter, req *Request) {
|
||||
- switch req.URL.Path {
|
||||
- case "/100":
|
||||
- // This endpoint implicitly responds 100 Continue and reads body.
|
||||
- if _, err := io.Copy(io.Discard, req.Body); err != nil {
|
||||
- t.Error("Failed to read Body", err)
|
||||
- }
|
||||
- rw.WriteHeader(StatusOK)
|
||||
- case "/200":
|
||||
- // Go 1.5 adds Connection: close header if the client expect
|
||||
- // continue but not entire request body is consumed.
|
||||
- rw.WriteHeader(StatusOK)
|
||||
- case "/500":
|
||||
- rw.WriteHeader(StatusInternalServerError)
|
||||
- case "/keepalive":
|
||||
- // This hijacked endpoint responds error without Connection:close.
|
||||
- _, bufrw, err := rw.(Hijacker).Hijack()
|
||||
- if err != nil {
|
||||
- log.Fatal(err)
|
||||
- }
|
||||
- bufrw.WriteString("HTTP/1.1 500 Internal Server Error\r\n")
|
||||
- bufrw.WriteString("Content-Length: 0\r\n\r\n")
|
||||
- bufrw.Flush()
|
||||
- case "/timeout":
|
||||
- // This endpoint tries to read body without 100 (Continue) response.
|
||||
- // After ExpectContinueTimeout, the reading will be started.
|
||||
- conn, bufrw, err := rw.(Hijacker).Hijack()
|
||||
- if err != nil {
|
||||
- log.Fatal(err)
|
||||
- }
|
||||
- if _, err := io.CopyN(io.Discard, bufrw, req.ContentLength); err != nil {
|
||||
- t.Error("Failed to read Body", err)
|
||||
- }
|
||||
- bufrw.WriteString("HTTP/1.1 200 OK\r\n\r\n")
|
||||
- bufrw.Flush()
|
||||
- conn.Close()
|
||||
- }
|
||||
+ reqdone chan struct{}
|
||||
+ resp *Response
|
||||
+ respErr error
|
||||
|
||||
- }))
|
||||
- defer ts.Close()
|
||||
+ conn net.Conn
|
||||
+ reader *bufio.Reader
|
||||
+}
|
||||
|
||||
- tests := []struct {
|
||||
- path string
|
||||
- body []byte
|
||||
- sent int
|
||||
- status int
|
||||
- }{
|
||||
- {path: "/100", body: []byte("hello"), sent: 5, status: 200}, // Got 100 followed by 200, entire body is sent.
|
||||
- {path: "/200", body: []byte("hello"), sent: 0, status: 200}, // Got 200 without 100. body isn't sent.
|
||||
- {path: "/500", body: []byte("hello"), sent: 0, status: 500}, // Got 500 without 100. body isn't sent.
|
||||
- {path: "/keepalive", body: []byte("hello"), sent: 0, status: 500}, // Although without Connection:close, body isn't sent.
|
||||
- {path: "/timeout", body: []byte("hello"), sent: 5, status: 200}, // Timeout exceeded and entire body is sent.
|
||||
+const transport100ContinueTestBody = "request body"
|
||||
+
|
||||
+// newTransport100ContinueTest creates a Transport and sends an Expect: 100-continue
|
||||
+// request on it.
|
||||
+func newTransport100ContinueTest(t *testing.T, timeout time.Duration) *transport100ContinueTest {
|
||||
+ ln := newLocalListener(t)
|
||||
+ defer ln.Close()
|
||||
+
|
||||
+ test := &transport100ContinueTest{
|
||||
+ t: t,
|
||||
+ reqdone: make(chan struct{}),
|
||||
}
|
||||
|
||||
- c := ts.Client()
|
||||
- for i, v := range tests {
|
||||
- tr := &Transport{
|
||||
- ExpectContinueTimeout: 2 * time.Second,
|
||||
- }
|
||||
- defer tr.CloseIdleConnections()
|
||||
- c.Transport = tr
|
||||
- body := bytes.NewReader(v.body)
|
||||
- req, err := NewRequest("PUT", ts.URL+v.path, body)
|
||||
- if err != nil {
|
||||
- t.Fatal(err)
|
||||
- }
|
||||
+ tr := &Transport{
|
||||
+ ExpectContinueTimeout: timeout,
|
||||
+ }
|
||||
+ go func() {
|
||||
+ defer close(test.reqdone)
|
||||
+ body := strings.NewReader(transport100ContinueTestBody)
|
||||
+ req, _ := NewRequest("PUT", "http://"+ln.Addr().String(), body)
|
||||
req.Header.Set("Expect", "100-continue")
|
||||
- req.ContentLength = int64(len(v.body))
|
||||
+ req.ContentLength = int64(len(transport100ContinueTestBody))
|
||||
+ test.resp, test.respErr = tr.RoundTrip(req)
|
||||
+ test.resp.Body.Close()
|
||||
+ }()
|
||||
|
||||
- resp, err := c.Do(req)
|
||||
- if err != nil {
|
||||
- t.Fatal(err)
|
||||
+ c, err := ln.Accept()
|
||||
+ if err != nil {
|
||||
+ t.Fatalf("Accept: %v", err)
|
||||
+ }
|
||||
+ t.Cleanup(func() {
|
||||
+ c.Close()
|
||||
+ })
|
||||
+ br := bufio.NewReader(c)
|
||||
+ _, err = ReadRequest(br)
|
||||
+ if err != nil {
|
||||
+ t.Fatalf("ReadRequest: %v", err)
|
||||
+ }
|
||||
+ test.conn = c
|
||||
+ test.reader = br
|
||||
+ t.Cleanup(func() {
|
||||
+ <-test.reqdone
|
||||
+ tr.CloseIdleConnections()
|
||||
+ got, _ := io.ReadAll(test.reader)
|
||||
+ if len(got) > 0 {
|
||||
+ t.Fatalf("Transport sent unexpected bytes: %q", got)
|
||||
}
|
||||
- resp.Body.Close()
|
||||
+ })
|
||||
|
||||
- sent := len(v.body) - body.Len()
|
||||
- if v.status != resp.StatusCode {
|
||||
- t.Errorf("test %d: status code should be %d but got %d. (%s)", i, v.status, resp.StatusCode, v.path)
|
||||
- }
|
||||
- if v.sent != sent {
|
||||
- t.Errorf("test %d: sent body should be %d but sent %d. (%s)", i, v.sent, sent, v.path)
|
||||
+ return test
|
||||
+}
|
||||
+
|
||||
+// respond sends response lines from the server to the transport.
|
||||
+func (test *transport100ContinueTest) respond(lines ...string) {
|
||||
+ for _, line := range lines {
|
||||
+ if _, err := test.conn.Write([]byte(line + "\r\n")); err != nil {
|
||||
+ test.t.Fatalf("Write: %v", err)
|
||||
}
|
||||
}
|
||||
+ if _, err := test.conn.Write([]byte("\r\n")); err != nil {
|
||||
+ test.t.Fatalf("Write: %v", err)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// wantBodySent ensures the transport has sent the request body to the server.
|
||||
+func (test *transport100ContinueTest) wantBodySent() {
|
||||
+ got, err := io.ReadAll(io.LimitReader(test.reader, int64(len(transport100ContinueTestBody))))
|
||||
+ if err != nil {
|
||||
+ test.t.Fatalf("unexpected error reading body: %v", err)
|
||||
+ }
|
||||
+ if got, want := string(got), transport100ContinueTestBody; got != want {
|
||||
+ test.t.Fatalf("unexpected body: got %q, want %q", got, want)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// wantRequestDone ensures the Transport.RoundTrip has completed with the expected status.
|
||||
+func (test *transport100ContinueTest) wantRequestDone(want int) {
|
||||
+ <-test.reqdone
|
||||
+ if test.respErr != nil {
|
||||
+ test.t.Fatalf("unexpected RoundTrip error: %v", test.respErr)
|
||||
+ }
|
||||
+ if got := test.resp.StatusCode; got != want {
|
||||
+ test.t.Fatalf("unexpected response code: got %v, want %v", got, want)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func TestTransportExpect100ContinueSent(t *testing.T) {
|
||||
+ test := newTransport100ContinueTest(t, 1*time.Hour)
|
||||
+ // Server sends a 100 Continue response, and the client sends the request body.
|
||||
+ test.respond("HTTP/1.1 100 Continue")
|
||||
+ test.wantBodySent()
|
||||
+ test.respond("HTTP/1.1 200", "Content-Length: 0")
|
||||
+ test.wantRequestDone(200)
|
||||
+}
|
||||
+
|
||||
+func TestTransportExpect100Continue200ResponseNoConnClose(t *testing.T) {
|
||||
+ test := newTransport100ContinueTest(t, 1*time.Hour)
|
||||
+ // No 100 Continue response, no Connection: close header.
|
||||
+ test.respond("HTTP/1.1 200", "Content-Length: 0")
|
||||
+ test.wantBodySent()
|
||||
+ test.wantRequestDone(200)
|
||||
+}
|
||||
+
|
||||
+func TestTransportExpect100Continue200ResponseWithConnClose(t *testing.T) {
|
||||
+ test := newTransport100ContinueTest(t, 1*time.Hour)
|
||||
+ // No 100 Continue response, Connection: close header set.
|
||||
+ test.respond("HTTP/1.1 200", "Connection: close", "Content-Length: 0")
|
||||
+ test.wantRequestDone(200)
|
||||
+}
|
||||
+
|
||||
+func TestTransportExpect100Continue500ResponseNoConnClose(t *testing.T) {
|
||||
+ test := newTransport100ContinueTest(t, 1*time.Hour)
|
||||
+ // No 100 Continue response, no Connection: close header.
|
||||
+ test.respond("HTTP/1.1 500", "Content-Length: 0")
|
||||
+ test.wantBodySent()
|
||||
+ test.wantRequestDone(500)
|
||||
+}
|
||||
+
|
||||
+func TestTransportExpect100Continue500ResponseTimeout(t *testing.T) {
|
||||
+ test := newTransport100ContinueTest(t, 5*time.Millisecond) // short timeout
|
||||
+ test.wantBodySent() // after timeout
|
||||
+ test.respond("HTTP/1.1 200", "Content-Length: 0")
|
||||
+ test.wantRequestDone(200)
|
||||
}
|
||||
|
||||
func TestSOCKS5Proxy(t *testing.T) {
|
||||
--
|
||||
2.40.0
|
||||
34
meta/recipes-devtools/llvm/llvm/CVE-2023-46049.patch
Normal file
34
meta/recipes-devtools/llvm/llvm/CVE-2023-46049.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
commit c2515a8f2be5dd23354c9891f41ad104000f88c4
|
||||
Author: Nikita Popov <npopov@redhat.com>
|
||||
Date: Tue Sep 26 16:51:40 2023 +0200
|
||||
|
||||
[Bitcode] Add some missing GetTypeByID failure checks
|
||||
|
||||
Print an error instead of crashing.
|
||||
|
||||
Fixes https://github.com/llvm/llvm-project/issues/67388.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/c2515a8f2be5dd23354c9891f41ad104000f88c4]
|
||||
CVE: CVE-2023-46049
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
|
||||
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp 2022-01-20 13:31:59.000000000 -0800
|
||||
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp 2024-07-28 21:35:31.062992219 -0700
|
||||
@@ -1235,7 +1235,7 @@
|
||||
}
|
||||
|
||||
Type *Ty = getTypeByID(Record[0]);
|
||||
- if (Ty->isMetadataTy() || Ty->isVoidTy()) {
|
||||
+ if (!Ty || Ty->isMetadataTy() || Ty->isVoidTy()) {
|
||||
dropRecord();
|
||||
break;
|
||||
}
|
||||
@@ -1277,7 +1277,7 @@
|
||||
return error("Invalid record");
|
||||
|
||||
Type *Ty = getTypeByID(Record[0]);
|
||||
- if (Ty->isMetadataTy() || Ty->isVoidTy())
|
||||
+ if (!Ty || Ty->isMetadataTy() || Ty->isVoidTy())
|
||||
return error("Invalid record");
|
||||
|
||||
MetadataList.assignValue(
|
||||
85
meta/recipes-devtools/llvm/llvm/CVE-2024-31852-1.patch
Normal file
85
meta/recipes-devtools/llvm/llvm/CVE-2024-31852-1.patch
Normal file
@@ -0,0 +1,85 @@
|
||||
commit b1a5ee1febd8a903cec3dfdad61d57900dc3823e
|
||||
Author: Florian Hahn <flo@fhahn.com>
|
||||
Date: Wed Dec 20 16:56:15 2023 +0100
|
||||
|
||||
[ARM] Check all terms in emitPopInst when clearing Restored for LR. (#75527)
|
||||
|
||||
emitPopInst checks a single function exit MBB. If other paths also exit
|
||||
the function and any of there terminators uses LR implicitly, it is not
|
||||
save to clear the Restored bit.
|
||||
|
||||
Check all terminators for the function before clearing Restored.
|
||||
|
||||
This fixes a mis-compile in outlined-fn-may-clobber-lr-in-caller.ll
|
||||
where the machine-outliner previously introduced BLs that clobbered LR
|
||||
which in turn is used by the tail call return.
|
||||
|
||||
Alternative to #73553
|
||||
|
||||
Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/b1a5ee1febd8a903cec3dfdad61d57900dc3823e]
|
||||
CVE: CVE-2024-31852
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
---
|
||||
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
|
||||
index 025e43444f9c..a9acf338ebf5 100644
|
||||
--- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp
|
||||
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
|
||||
@@ -1236,9 +1236,6 @@ void ARMFrameLowering::emitPopInst(MachineBasicBlock &MBB,
|
||||
// Fold the return instruction into the LDM.
|
||||
DeleteRet = true;
|
||||
LdmOpc = AFI->isThumbFunction() ? ARM::t2LDMIA_RET : ARM::LDMIA_RET;
|
||||
- // We 'restore' LR into PC so it is not live out of the return block:
|
||||
- // Clear Restored bit.
|
||||
- Info.setRestored(false);
|
||||
}
|
||||
|
||||
// If NoGap is true, pop consecutive registers and then leave the rest
|
||||
@@ -2292,6 +2289,33 @@ void ARMFrameLowering::determineCalleeSaves(MachineFunction &MF,
|
||||
AFI->setLRIsSpilled(SavedRegs.test(ARM::LR));
|
||||
}
|
||||
|
||||
+void ARMFrameLowering::processFunctionBeforeFrameFinalized(
|
||||
+ MachineFunction &MF, RegScavenger *RS) const {
|
||||
+ TargetFrameLowering::processFunctionBeforeFrameFinalized(MF, RS);
|
||||
+
|
||||
+ MachineFrameInfo &MFI = MF.getFrameInfo();
|
||||
+ if (!MFI.isCalleeSavedInfoValid())
|
||||
+ return;
|
||||
+
|
||||
+ // Check if all terminators do not implicitly use LR. Then we can 'restore' LR
|
||||
+ // into PC so it is not live out of the return block: Clear the Restored bit
|
||||
+ // in that case.
|
||||
+ for (CalleeSavedInfo &Info : MFI.getCalleeSavedInfo()) {
|
||||
+ if (Info.getReg() != ARM::LR)
|
||||
+ continue;
|
||||
+ if (all_of(MF, [](const MachineBasicBlock &MBB) {
|
||||
+ return all_of(MBB.terminators(), [](const MachineInstr &Term) {
|
||||
+ return !Term.isReturn() || Term.getOpcode() == ARM::LDMIA_RET ||
|
||||
+ Term.getOpcode() == ARM::t2LDMIA_RET ||
|
||||
+ Term.getOpcode() == ARM::tPOP_RET;
|
||||
+ });
|
||||
+ })) {
|
||||
+ Info.setRestored(false);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void ARMFrameLowering::getCalleeSaves(const MachineFunction &MF,
|
||||
BitVector &SavedRegs) const {
|
||||
TargetFrameLowering::getCalleeSaves(MF, SavedRegs);
|
||||
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.h b/llvm/lib/Target/ARM/ARMFrameLowering.h
|
||||
index 9822e2321bb4..266d642bb97b 100644
|
||||
--- a/llvm/lib/Target/ARM/ARMFrameLowering.h
|
||||
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.h
|
||||
@@ -58,6 +58,9 @@ public:
|
||||
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
|
||||
RegScavenger *RS) const override;
|
||||
|
||||
+ void processFunctionBeforeFrameFinalized(
|
||||
+ MachineFunction &MF, RegScavenger *RS = nullptr) const override;
|
||||
+
|
||||
void adjustForSegmentedStacks(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB) const override;
|
||||
|
||||
|
||||
117
meta/recipes-devtools/llvm/llvm/CVE-2024-31852-2.patch
Normal file
117
meta/recipes-devtools/llvm/llvm/CVE-2024-31852-2.patch
Normal file
@@ -0,0 +1,117 @@
|
||||
commit 0e16af8e4cf3a66ad5d078d52744ae2776f9c4b2
|
||||
Author: ostannard <oliver.stannard@arm.com>
|
||||
Date: Mon Feb 26 12:23:25 2024 +0000
|
||||
|
||||
[ARM] Update IsRestored for LR based on all returns (#82745)
|
||||
|
||||
PR #75527 fixed ARMFrameLowering to set the IsRestored flag for LR based
|
||||
on all of the return instructions in the function, not just one.
|
||||
However, there is also code in ARMLoadStoreOptimizer which changes
|
||||
return instructions, but it set IsRestored based on the one instruction
|
||||
it changed, not the whole function.
|
||||
|
||||
The fix is to factor out the code added in #75527, and also call it from
|
||||
ARMLoadStoreOptimizer if it made a change to return instructions.
|
||||
|
||||
Fixes #80287.
|
||||
|
||||
(cherry picked from commit 749384c08e042739342c88b521c8ba5dac1b9276)
|
||||
|
||||
Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/0e16af8e4cf3a66ad5d078d52744ae2776f9c4b2]
|
||||
CVE: CVE-2024-31852
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
---
|
||||
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
|
||||
index a9acf338ebf5..13d3cbf650ed 100644
|
||||
--- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp
|
||||
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
|
||||
@@ -2289,10 +2289,7 @@ void ARMFrameLowering::determineCalleeSaves(MachineFunction &MF,
|
||||
AFI->setLRIsSpilled(SavedRegs.test(ARM::LR));
|
||||
}
|
||||
|
||||
-void ARMFrameLowering::processFunctionBeforeFrameFinalized(
|
||||
- MachineFunction &MF, RegScavenger *RS) const {
|
||||
- TargetFrameLowering::processFunctionBeforeFrameFinalized(MF, RS);
|
||||
-
|
||||
+void ARMFrameLowering::updateLRRestored(MachineFunction &MF) {
|
||||
MachineFrameInfo &MFI = MF.getFrameInfo();
|
||||
if (!MFI.isCalleeSavedInfoValid())
|
||||
return;
|
||||
@@ -2316,6 +2313,12 @@ void ARMFrameLowering::processFunctionBeforeFrameFinalized(
|
||||
}
|
||||
}
|
||||
|
||||
+void ARMFrameLowering::processFunctionBeforeFrameFinalized(
|
||||
+ MachineFunction &MF, RegScavenger *RS) const {
|
||||
+ TargetFrameLowering::processFunctionBeforeFrameFinalized(MF, RS);
|
||||
+ updateLRRestored(MF);
|
||||
+}
|
||||
+
|
||||
void ARMFrameLowering::getCalleeSaves(const MachineFunction &MF,
|
||||
BitVector &SavedRegs) const {
|
||||
TargetFrameLowering::getCalleeSaves(MF, SavedRegs);
|
||||
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.h b/llvm/lib/Target/ARM/ARMFrameLowering.h
|
||||
index 67505b61a5e1..b13b76d7086c 100644
|
||||
--- a/llvm/lib/Target/ARM/ARMFrameLowering.h
|
||||
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.h
|
||||
@@ -58,6 +58,10 @@ public:
|
||||
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
|
||||
RegScavenger *RS) const override;
|
||||
|
||||
+ /// Update the IsRestored flag on LR if it is spilled, based on the return
|
||||
+ /// instructions.
|
||||
+ static void updateLRRestored(MachineFunction &MF);
|
||||
+
|
||||
void processFunctionBeforeFrameFinalized(
|
||||
MachineFunction &MF, RegScavenger *RS = nullptr) const override;
|
||||
|
||||
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
|
||||
index fd06bfdf352c..561c1396190d 100644
|
||||
--- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
|
||||
+++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
|
||||
@@ -2060,17 +2060,6 @@ bool ARMLoadStoreOpt::MergeReturnIntoLDM(MachineBasicBlock &MBB) {
|
||||
MO.setReg(ARM::PC);
|
||||
PrevMI.copyImplicitOps(*MBB.getParent(), *MBBI);
|
||||
MBB.erase(MBBI);
|
||||
- // We now restore LR into PC so it is not live-out of the return block
|
||||
- // anymore: Clear the CSI Restored bit.
|
||||
- MachineFrameInfo &MFI = MBB.getParent()->getFrameInfo();
|
||||
- // CSI should be fixed after PrologEpilog Insertion
|
||||
- assert(MFI.isCalleeSavedInfoValid() && "CSI should be valid");
|
||||
- for (CalleeSavedInfo &Info : MFI.getCalleeSavedInfo()) {
|
||||
- if (Info.getReg() == ARM::LR) {
|
||||
- Info.setRestored(false);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2118,16 +2107,24 @@ bool ARMLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
|
||||
isThumb2 = AFI->isThumb2Function();
|
||||
isThumb1 = AFI->isThumbFunction() && !isThumb2;
|
||||
|
||||
- bool Modified = false;
|
||||
+ bool Modified = false, ModifiedLDMReturn = false;
|
||||
for (MachineFunction::iterator MFI = Fn.begin(), E = Fn.end(); MFI != E;
|
||||
++MFI) {
|
||||
MachineBasicBlock &MBB = *MFI;
|
||||
Modified |= LoadStoreMultipleOpti(MBB);
|
||||
if (STI->hasV5TOps())
|
||||
- Modified |= MergeReturnIntoLDM(MBB);
|
||||
+ ModifiedLDMReturn |= MergeReturnIntoLDM(MBB);
|
||||
if (isThumb1)
|
||||
Modified |= CombineMovBx(MBB);
|
||||
}
|
||||
+ Modified |= ModifiedLDMReturn;
|
||||
+
|
||||
+ // If we merged a BX instruction into an LDM, we need to re-calculate whether
|
||||
+ // LR is restored. This check needs to consider the whole function, not just
|
||||
+ // the instruction(s) we changed, because there may be other BX returns which
|
||||
+ // still need LR to be restored.
|
||||
+ if (ModifiedLDMReturn)
|
||||
+ ARMFrameLowering::updateLRRestored(Fn);
|
||||
|
||||
Allocator.DestroyAll();
|
||||
return Modified;
|
||||
|
||||
@@ -33,6 +33,9 @@ SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=http
|
||||
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 \
|
||||
file://CVE-2023-46049.patch;striplevel=2 \
|
||||
file://CVE-2024-31852-1.patch;striplevel=2 \
|
||||
file://CVE-2024-31852-2.patch;striplevel=2 \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)"
|
||||
|
||||
@@ -5,7 +5,7 @@ LICENSE = "BSD-2-Clause & BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
|
||||
|
||||
SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
|
||||
SRC_URI[sha256sum] = "a66e3d8f2b7e65178d786a01ef61f2a0a0b4d0b8370de7ce134ba73da4af18f0"
|
||||
SRC_URI[sha256sum] = "33ed2387f49b825fa1b9c3b0072e05f259141b895474ad085ae51143d3040cc0"
|
||||
|
||||
inherit meson pkgconfig gtk-doc
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
From bd8153872e9c6fc98f4023df9c2deaffea2fa463 Mon Sep 17 00:00:00 2001
|
||||
From: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
Date: Wed, 3 Jul 2024 21:34:29 -0400
|
||||
Subject: [PATCH] 2024.07.04 (#295)
|
||||
|
||||
Co-authored-by: alex <772+alex@users.noreply.github.com>
|
||||
|
||||
CVE: CVE-2024-39689
|
||||
|
||||
Upstream-Status: Backport [https://github.com/certifi/python-certifi/commit/bd8153872e9c6fc98f4023df9c2deaffea2fa463]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
certifi/cacert.pem | 40 ----------------------------------------
|
||||
1 file changed, 40 deletions(-)
|
||||
|
||||
diff --git a/certifi/cacert.pem b/certifi/cacert.pem
|
||||
index 1bec256..6bb8cf8 100644
|
||||
--- a/certifi/cacert.pem
|
||||
+++ b/certifi/cacert.pem
|
||||
@@ -3857,46 +3857,6 @@ DgQWBBQxCpCPtsad0kRLgLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ
|
||||
+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+CAezNIm8BZ/3Hobui3A=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
-# Issuer: CN=GLOBALTRUST 2020 O=e-commerce monitoring GmbH
|
||||
-# Subject: CN=GLOBALTRUST 2020 O=e-commerce monitoring GmbH
|
||||
-# Label: "GLOBALTRUST 2020"
|
||||
-# Serial: 109160994242082918454945253
|
||||
-# MD5 Fingerprint: 8a:c7:6f:cb:6d:e3:cc:a2:f1:7c:83:fa:0e:78:d7:e8
|
||||
-# SHA1 Fingerprint: d0:67:c1:13:51:01:0c:aa:d0:c7:6a:65:37:31:16:26:4f:53:71:a2
|
||||
-# SHA256 Fingerprint: 9a:29:6a:51:82:d1:d4:51:a2:e3:7f:43:9b:74:da:af:a2:67:52:33:29:f9:0f:9a:0d:20:07:c3:34:e2:3c:9a
|
||||
------BEGIN CERTIFICATE-----
|
||||
-MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkG
|
||||
-A1UEBhMCQVQxIzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkw
|
||||
-FwYDVQQDExBHTE9CQUxUUlVTVCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYx
|
||||
-MDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAhBgNVBAoTGmUtY29tbWVyY2UgbW9u
|
||||
-aXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAyMDIwMIICIjANBgkq
|
||||
-hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWiD59b
|
||||
-RatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9Z
|
||||
-YybNpyrOVPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3
|
||||
-QWPKzv9pj2gOlTblzLmMCcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPw
|
||||
-yJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCmfecqQjuCgGOlYx8ZzHyyZqjC0203b+J+
|
||||
-BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKAA1GqtH6qRNdDYfOiaxaJ
|
||||
-SaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9ORJitHHmkH
|
||||
-r96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj0
|
||||
-4KlGDfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9Me
|
||||
-dKZssCz3AwyIDMvUclOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIw
|
||||
-q7ejMZdnrY8XD2zHc+0klGvIg5rQmjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2
|
||||
-nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
|
||||
-AQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1UdIwQYMBaAFNwu
|
||||
-H9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA
|
||||
-VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJC
|
||||
-XtzoRlgHNQIw4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd
|
||||
-6IwPS3BD0IL/qMy/pJTAvoe9iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf
|
||||
-+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS8cE54+X1+NZK3TTN+2/BT+MAi1bi
|
||||
-kvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2HcqtbepBEX4tdJP7
|
||||
-wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxSvTOB
|
||||
-TI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6C
|
||||
-MUO+1918oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn
|
||||
-4rnvyOL2NSl6dPrFf4IFYqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+I
|
||||
-aFvowdlxfv1k7/9nR4hYJS8+hge9+6jlgqispdNpQ80xiEmEU5LAsTkbOYMBMMTy
|
||||
-qfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==
|
||||
------END CERTIFICATE-----
|
||||
-
|
||||
# Issuer: CN=ANF Secure Server Root CA O=ANF Autoridad de Certificacion OU=ANF CA Raiz
|
||||
# Subject: CN=ANF Secure Server Root CA O=ANF Autoridad de Certificacion OU=ANF CA Raiz
|
||||
# Label: "ANF Secure Server Root CA"
|
||||
--
|
||||
2.40.0
|
||||
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=67da0714c3f9471067b729eca6c9fbe8"
|
||||
|
||||
SRC_URI += "file://CVE-2022-23491.patch \
|
||||
file://CVE-2023-37920.patch \
|
||||
file://CVE-2024-39689.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"
|
||||
|
||||
@@ -2,17 +2,17 @@ DESCRIPTION = "Python Jinja2: A small but fast and easy to use stand-alone templ
|
||||
HOMEPAGE = "https://pypi.org/project/Jinja2/"
|
||||
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=5dc88300786f1c214c1e9827a5229462"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5dc88300786f1c214c1e9827a5229462"
|
||||
|
||||
SRC_URI[sha256sum] = "ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"
|
||||
SRC_URI[sha256sum] = "4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"
|
||||
|
||||
PYPI_PACKAGE = "Jinja2"
|
||||
PYPI_PACKAGE = "jinja2"
|
||||
|
||||
CVE_PRODUCT = "jinja2 jinja"
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
inherit pypi setuptools3
|
||||
inherit pypi python_flit_core
|
||||
inherit ${@bb.utils.filter('DISTRO_FEATURES', 'ptest', d)}
|
||||
|
||||
SRC_URI += " \
|
||||
@@ -1,5 +1,5 @@
|
||||
require python-pycryptodome.inc
|
||||
inherit setuptools3
|
||||
inherit python_setuptools_build_meta
|
||||
|
||||
SRC_URI[sha256sum] = "e04e40a7f8c1669195536a37979dd87da2c32dbdc73d6fe35f0077b0c17c803b"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
require python-pycryptodome.inc
|
||||
inherit setuptools3
|
||||
inherit python_setuptools_build_meta
|
||||
|
||||
SRC_URI[sha256sum] = "2ce76ed0081fd6ac8c74edc75b9d14eca2064173af79843c24fa62573263c1f2"
|
||||
|
||||
|
||||
124
meta/recipes-devtools/python/python3/CVE-2024-8088.patch
Normal file
124
meta/recipes-devtools/python/python3/CVE-2024-8088.patch
Normal file
@@ -0,0 +1,124 @@
|
||||
From e0264a61119d551658d9445af38323ba94fc16db Mon Sep 17 00:00:00 2001
|
||||
From: "Jason R. Coombs" <jaraco@jaraco.com>
|
||||
Date: Thu, 22 Aug 2024 19:24:33 -0400
|
||||
Subject: [PATCH] CVE-2024-8088: Sanitize names in zipfile.Path. (GH-122906)
|
||||
|
||||
Upstream-Status: Backport from https://github.com/python/cpython/commit/e0264a61119d551658d9445af38323ba94fc16db
|
||||
CVE: CVE-2024-8088
|
||||
|
||||
Signed-off-by: Rohini Sangam <rsangam@mvista.com>
|
||||
---
|
||||
Lib/test/test_zipfile.py | 17 ++++++
|
||||
Lib/zipfile.py | 61 ++++++++++++++++++-
|
||||
2 files changed, 77 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
|
||||
index 32c0170..a60dc11 100644
|
||||
--- a/Lib/test/test_zipfile.py
|
||||
+++ b/Lib/test/test_zipfile.py
|
||||
@@ -3280,6 +3280,23 @@ with zipfile.ZipFile(io.BytesIO(), "w") as zf:
|
||||
zipfile.Path(zf)
|
||||
zf.extractall(source_path.parent)
|
||||
|
||||
+ def test_malformed_paths(self):
|
||||
+ """
|
||||
+ Path should handle malformed paths.
|
||||
+ """
|
||||
+ data = io.BytesIO()
|
||||
+ zf = zipfile.ZipFile(data, "w")
|
||||
+ zf.writestr("/one-slash.txt", b"content")
|
||||
+ zf.writestr("//two-slash.txt", b"content")
|
||||
+ zf.writestr("../parent.txt", b"content")
|
||||
+ zf.filename = ''
|
||||
+ root = zipfile.Path(zf)
|
||||
+ assert list(map(str, root.iterdir())) == [
|
||||
+ 'one-slash.txt',
|
||||
+ 'two-slash.txt',
|
||||
+ 'parent.txt',
|
||||
+ ]
|
||||
+
|
||||
|
||||
class StripExtraTests(unittest.TestCase):
|
||||
# Note: all of the "z" characters are technically invalid, but up
|
||||
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
|
||||
index 7d18bc2..cbac8d9 100644
|
||||
--- a/Lib/zipfile.py
|
||||
+++ b/Lib/zipfile.py
|
||||
@@ -9,6 +9,7 @@ import io
|
||||
import itertools
|
||||
import os
|
||||
import posixpath
|
||||
+import re
|
||||
import shutil
|
||||
import stat
|
||||
import struct
|
||||
@@ -2182,7 +2183,65 @@ def _difference(minuend, subtrahend):
|
||||
return itertools.filterfalse(set(subtrahend).__contains__, minuend)
|
||||
|
||||
|
||||
-class CompleteDirs(ZipFile):
|
||||
+class SanitizedNames:
|
||||
+ """
|
||||
+ ZipFile mix-in to ensure names are sanitized.
|
||||
+ """
|
||||
+
|
||||
+ def namelist(self):
|
||||
+ return list(map(self._sanitize, super().namelist()))
|
||||
+
|
||||
+ @staticmethod
|
||||
+ def _sanitize(name):
|
||||
+ r"""
|
||||
+ Ensure a relative path with posix separators and no dot names.
|
||||
+ Modeled after
|
||||
+ https://github.com/python/cpython/blob/bcc1be39cb1d04ad9fc0bd1b9193d3972835a57c/Lib/zipfile/__init__.py#L1799-L1813
|
||||
+ but provides consistent cross-platform behavior.
|
||||
+ >>> san = SanitizedNames._sanitize
|
||||
+ >>> san('/foo/bar')
|
||||
+ 'foo/bar'
|
||||
+ >>> san('//foo.txt')
|
||||
+ 'foo.txt'
|
||||
+ >>> san('foo/.././bar.txt')
|
||||
+ 'foo/bar.txt'
|
||||
+ >>> san('foo../.bar.txt')
|
||||
+ 'foo../.bar.txt'
|
||||
+ >>> san('\\foo\\bar.txt')
|
||||
+ 'foo/bar.txt'
|
||||
+ >>> san('D:\\foo.txt')
|
||||
+ 'D/foo.txt'
|
||||
+ >>> san('\\\\server\\share\\file.txt')
|
||||
+ 'server/share/file.txt'
|
||||
+ >>> san('\\\\?\\GLOBALROOT\\Volume3')
|
||||
+ '?/GLOBALROOT/Volume3'
|
||||
+ >>> san('\\\\.\\PhysicalDrive1\\root')
|
||||
+ 'PhysicalDrive1/root'
|
||||
+ Retain any trailing slash.
|
||||
+ >>> san('abc/')
|
||||
+ 'abc/'
|
||||
+ Raises a ValueError if the result is empty.
|
||||
+ >>> san('../..')
|
||||
+ Traceback (most recent call last):
|
||||
+ ...
|
||||
+ ValueError: Empty filename
|
||||
+ """
|
||||
+
|
||||
+ def allowed(part):
|
||||
+ return part and part not in {'..', '.'}
|
||||
+
|
||||
+ # Remove the drive letter.
|
||||
+ # Don't use ntpath.splitdrive, because that also strips UNC paths
|
||||
+ bare = re.sub('^([A-Z]):', r'\1', name, flags=re.IGNORECASE)
|
||||
+ clean = bare.replace('\\', '/')
|
||||
+ parts = clean.split('/')
|
||||
+ joined = '/'.join(filter(allowed, parts))
|
||||
+ if not joined:
|
||||
+ raise ValueError("Empty filename")
|
||||
+ return joined + '/' * name.endswith('/')
|
||||
+
|
||||
+
|
||||
+class CompleteDirs(SanitizedNames, ZipFile):
|
||||
"""
|
||||
A ZipFile subclass that ensures that implied directories
|
||||
are always included in the namelist.
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -36,6 +36,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||
file://deterministic_imports.patch \
|
||||
file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
|
||||
file://0001-test_storlines-skip-due-to-load-variability.patch \
|
||||
file://CVE-2024-8088.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-native = " \
|
||||
@@ -106,7 +107,8 @@ CACHED_CONFIGUREVARS = " \
|
||||
PACKAGECONFIG:class-target ??= "readline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}"
|
||||
PACKAGECONFIG:class-native ??= "readline gdbm"
|
||||
PACKAGECONFIG:class-nativesdk ??= "readline gdbm"
|
||||
PACKAGECONFIG[readline] = ",,readline"
|
||||
PACKAGECONFIG[readline] = "--with-readline=readline,,readline,,,editline"
|
||||
PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline"
|
||||
# Use profile guided optimisation by running PyBench inside qemu-user
|
||||
PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native"
|
||||
PACKAGECONFIG[tk] = ",,tk"
|
||||
@@ -118,7 +120,7 @@ do_configure:prepend () {
|
||||
cat > ${B}/Modules/Setup.local << EOF
|
||||
*disabled*
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)}
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'readline', '', 'readline', d)}
|
||||
${@bb.utils.contains_any('PACKAGECONFIG', 'readline editline', '', 'readline', d)}
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +109,10 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
|
||||
file://scsi-disk-ensure-block-size-is-non-zero-and-changes-limited-to-bits-8-15.patch \
|
||||
file://CVE-2023-42467.patch \
|
||||
file://CVE-2023-6683.patch \
|
||||
file://CVE-2024-7409-0001.patch \
|
||||
file://CVE-2024-7409-0002.patch \
|
||||
file://CVE-2024-7409-0003.patch \
|
||||
file://CVE-2024-7409-0004.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
|
||||
162
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0001.patch
Normal file
162
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0001.patch
Normal file
@@ -0,0 +1,162 @@
|
||||
From fb1c2aaa981e0a2fa6362c9985f1296b74f055ac Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Wed, 7 Aug 2024 08:50:01 -0500
|
||||
Subject: [PATCH] nbd/server: Plumb in new args to nbd_client_add()
|
||||
|
||||
Upcoming patches to fix a CVE need to track an opaque pointer passed
|
||||
in by the owner of a client object, as well as request for a time
|
||||
limit on how fast negotiation must complete. Prepare for that by
|
||||
changing the signature of nbd_client_new() and adding an accessor to
|
||||
get at the opaque pointer, although for now the two servers
|
||||
(qemu-nbd.c and blockdev-nbd.c) do not change behavior even though
|
||||
they pass in a new default timeout value.
|
||||
|
||||
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
Message-ID: <20240807174943.771624-11-eblake@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
[eblake: s/LIMIT/MAX_SECS/ as suggested by Dan]
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
|
||||
CVE: CVE-2024-7409
|
||||
Upstream-Status: Backport [https://github.com/qemu/qemu/commit/fb1c2aaa981e0a2fa6362c9985f1296b74f055ac]
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
blockdev-nbd.c | 6 ++++--
|
||||
include/block/nbd.h | 11 ++++++++++-
|
||||
nbd/server.c | 20 +++++++++++++++++---
|
||||
qemu-nbd.c | 4 +++-
|
||||
4 files changed, 34 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
|
||||
index bdfa7ed3a..b9e8dc78f 100644
|
||||
--- a/blockdev-nbd.c
|
||||
+++ b/blockdev-nbd.c
|
||||
@@ -59,8 +59,10 @@ static void nbd_accept(QIONetListener *listener, QIOChannelSocket *cioc,
|
||||
nbd_update_server_watch(nbd_server);
|
||||
|
||||
qio_channel_set_name(QIO_CHANNEL(cioc), "nbd-server");
|
||||
- nbd_client_new(cioc, nbd_server->tlscreds, nbd_server->tlsauthz,
|
||||
- nbd_blockdev_client_closed);
|
||||
+ /* TODO - expose handshake timeout as QMP option */
|
||||
+ nbd_client_new(cioc, NBD_DEFAULT_HANDSHAKE_MAX_SECS,
|
||||
+ nbd_server->tlscreds, nbd_server->tlsauthz,
|
||||
+ nbd_blockdev_client_closed, NULL);
|
||||
}
|
||||
|
||||
static void nbd_update_server_watch(NBDServerData *s)
|
||||
diff --git a/include/block/nbd.h b/include/block/nbd.h
|
||||
index 78d101b77..b71a29724 100644
|
||||
--- a/include/block/nbd.h
|
||||
+++ b/include/block/nbd.h
|
||||
@@ -27,6 +27,12 @@
|
||||
|
||||
extern const BlockExportDriver blk_exp_nbd;
|
||||
|
||||
+/*
|
||||
+ * NBD_DEFAULT_HANDSHAKE_MAX_SECS: Number of seconds in which client must
|
||||
+ * succeed at NBD_OPT_GO before being forcefully dropped as too slow.
|
||||
+ */
|
||||
+#define NBD_DEFAULT_HANDSHAKE_MAX_SECS 10
|
||||
+
|
||||
/* Handshake phase structs - this struct is passed on the wire */
|
||||
|
||||
struct NBDOption {
|
||||
@@ -338,9 +344,12 @@ AioContext *nbd_export_aio_context(NBDExport *exp);
|
||||
NBDExport *nbd_export_find(const char *name);
|
||||
|
||||
void nbd_client_new(QIOChannelSocket *sioc,
|
||||
+ uint32_t handshake_max_secs,
|
||||
QCryptoTLSCreds *tlscreds,
|
||||
const char *tlsauthz,
|
||||
- void (*close_fn)(NBDClient *, bool));
|
||||
+ void (*close_fn)(NBDClient *, bool),
|
||||
+ void *owner);
|
||||
+void *nbd_client_owner(NBDClient *client);
|
||||
void nbd_client_get(NBDClient *client);
|
||||
void nbd_client_put(NBDClient *client);
|
||||
|
||||
diff --git a/nbd/server.c b/nbd/server.c
|
||||
index 4630dd732..12680c8dc 100644
|
||||
--- a/nbd/server.c
|
||||
+++ b/nbd/server.c
|
||||
@@ -121,9 +121,11 @@ struct NBDClient {
|
||||
int refcount;
|
||||
void (*close_fn)(NBDClient *client, bool negotiated);
|
||||
|
||||
+ void *owner;
|
||||
NBDExport *exp;
|
||||
QCryptoTLSCreds *tlscreds;
|
||||
char *tlsauthz;
|
||||
+ uint32_t handshake_max_secs;
|
||||
QIOChannelSocket *sioc; /* The underlying data channel */
|
||||
QIOChannel *ioc; /* The current I/O channel which may differ (eg TLS) */
|
||||
|
||||
@@ -2703,6 +2705,7 @@ static coroutine_fn void nbd_co_client_start(void *opaque)
|
||||
|
||||
qemu_co_mutex_init(&client->send_lock);
|
||||
|
||||
+ /* TODO - utilize client->handshake_max_secs */
|
||||
if (nbd_negotiate(client, &local_err)) {
|
||||
if (local_err) {
|
||||
error_report_err(local_err);
|
||||
@@ -2715,14 +2718,17 @@ static coroutine_fn void nbd_co_client_start(void *opaque)
|
||||
}
|
||||
|
||||
/*
|
||||
- * Create a new client listener using the given channel @sioc.
|
||||
+ * Create a new client listener using the given channel @sioc and @owner.
|
||||
* Begin servicing it in a coroutine. When the connection closes, call
|
||||
- * @close_fn with an indication of whether the client completed negotiation.
|
||||
+ * @close_fn with an indication of whether the client completed negotiation
|
||||
+ * within @handshake_max_secs seconds (0 for unbounded).
|
||||
*/
|
||||
void nbd_client_new(QIOChannelSocket *sioc,
|
||||
+ uint32_t handshake_max_secs,
|
||||
QCryptoTLSCreds *tlscreds,
|
||||
const char *tlsauthz,
|
||||
- void (*close_fn)(NBDClient *, bool))
|
||||
+ void (*close_fn)(NBDClient *, bool),
|
||||
+ void *owner)
|
||||
{
|
||||
NBDClient *client;
|
||||
Coroutine *co;
|
||||
@@ -2734,12 +2740,20 @@ void nbd_client_new(QIOChannelSocket *sioc,
|
||||
object_ref(OBJECT(client->tlscreds));
|
||||
}
|
||||
client->tlsauthz = g_strdup(tlsauthz);
|
||||
+ client->handshake_max_secs = handshake_max_secs;
|
||||
client->sioc = sioc;
|
||||
object_ref(OBJECT(client->sioc));
|
||||
client->ioc = QIO_CHANNEL(sioc);
|
||||
object_ref(OBJECT(client->ioc));
|
||||
client->close_fn = close_fn;
|
||||
+ client->owner = owner;
|
||||
|
||||
co = qemu_coroutine_create(nbd_co_client_start, client);
|
||||
qemu_coroutine_enter(co);
|
||||
}
|
||||
+
|
||||
+void *
|
||||
+nbd_client_owner(NBDClient *client)
|
||||
+{
|
||||
+ return client->owner;
|
||||
+}
|
||||
diff --git a/qemu-nbd.c b/qemu-nbd.c
|
||||
index c6c20df68..f48abf379 100644
|
||||
--- a/qemu-nbd.c
|
||||
+++ b/qemu-nbd.c
|
||||
@@ -363,7 +363,9 @@ static void nbd_accept(QIONetListener *listener, QIOChannelSocket *cioc,
|
||||
|
||||
nb_fds++;
|
||||
nbd_update_server_watch();
|
||||
- nbd_client_new(cioc, tlscreds, tlsauthz, nbd_client_closed);
|
||||
+ /* TODO - expose handshake timeout as command line option */
|
||||
+ nbd_client_new(cioc, NBD_DEFAULT_HANDSHAKE_MAX_SECS,
|
||||
+ tlscreds, tlsauthz, nbd_client_closed, NULL);
|
||||
}
|
||||
|
||||
static void nbd_update_server_watch(void)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
174
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0002.patch
Normal file
174
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0002.patch
Normal file
@@ -0,0 +1,174 @@
|
||||
From c8a76dbd90c2f48df89b75bef74917f90a59b623 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Tue, 6 Aug 2024 13:53:00 -0500
|
||||
Subject: [PATCH] nbd/server: CVE-2024-7409: Cap default max-connections to 100
|
||||
|
||||
Allowing an unlimited number of clients to any web service is a recipe
|
||||
for a rudimentary denial of service attack: the client merely needs to
|
||||
open lots of sockets without closing them, until qemu no longer has
|
||||
any more fds available to allocate.
|
||||
|
||||
For qemu-nbd, we default to allowing only 1 connection unless more are
|
||||
explicitly asked for (-e or --shared); this was historically picked as
|
||||
a nice default (without an explicit -t, a non-persistent qemu-nbd goes
|
||||
away after a client disconnects, without needing any additional
|
||||
follow-up commands), and we are not going to change that interface now
|
||||
(besides, someday we want to point people towards qemu-storage-daemon
|
||||
instead of qemu-nbd).
|
||||
|
||||
But for qemu proper, and the newer qemu-storage-daemon, the QMP
|
||||
nbd-server-start command has historically had a default of unlimited
|
||||
number of connections, in part because unlike qemu-nbd it is
|
||||
inherently persistent until nbd-server-stop. Allowing multiple client
|
||||
sockets is particularly useful for clients that can take advantage of
|
||||
MULTI_CONN (creating parallel sockets to increase throughput),
|
||||
although known clients that do so (such as libnbd's nbdcopy) typically
|
||||
use only 8 or 16 connections (the benefits of scaling diminish once
|
||||
more sockets are competing for kernel attention). Picking a number
|
||||
large enough for typical use cases, but not unlimited, makes it
|
||||
slightly harder for a malicious client to perform a denial of service
|
||||
merely by opening lots of connections withot progressing through the
|
||||
handshake.
|
||||
|
||||
This change does not eliminate CVE-2024-7409 on its own, but reduces
|
||||
the chance for fd exhaustion or unlimited memory usage as an attack
|
||||
surface. On the other hand, by itself, it makes it more obvious that
|
||||
with a finite limit, we have the problem of an unauthenticated client
|
||||
holding 100 fds opened as a way to block out a legitimate client from
|
||||
being able to connect; thus, later patches will further add timeouts
|
||||
to reject clients that are not making progress.
|
||||
|
||||
This is an INTENTIONAL change in behavior, and will break any client
|
||||
of nbd-server-start that was not passing an explicit max-connections
|
||||
parameter, yet expects more than 100 simultaneous connections. We are
|
||||
not aware of any such client (as stated above, most clients aware of
|
||||
MULTI_CONN get by just fine on 8 or 16 connections, and probably cope
|
||||
with later connections failing by relying on the earlier connections;
|
||||
libvirt has not yet been passing max-connections, but generally
|
||||
creates NBD servers with the intent for a single client for the sake
|
||||
of live storage migration; meanwhile, the KubeSAN project anticipates
|
||||
a large cluster sharing multiple clients [up to 8 per node, and up to
|
||||
100 nodes in a cluster], but it currently uses qemu-nbd with an
|
||||
explicit --shared=0 rather than qemu-storage-daemon with
|
||||
nbd-server-start).
|
||||
|
||||
We considered using a deprecation period (declare that omitting
|
||||
max-parameters is deprecated, and make it mandatory in 3 releases -
|
||||
then we don't need to pick an arbitrary default); that has zero risk
|
||||
of breaking any apps that accidentally depended on more than 100
|
||||
connections, and where such breakage might not be noticed under unit
|
||||
testing but only under the larger loads of production usage. But it
|
||||
does not close the denial-of-service hole until far into the future,
|
||||
and requires all apps to change to add the parameter even if 100 was
|
||||
good enough. It also has a drawback that any app (like libvirt) that
|
||||
is accidentally relying on an unlimited default should seriously
|
||||
consider their own CVE now, at which point they are going to change to
|
||||
pass explicit max-connections sooner than waiting for 3 qemu releases.
|
||||
Finally, if our changed default breaks an app, that app can always
|
||||
pass in an explicit max-parameters with a larger value.
|
||||
|
||||
It is also intentional that the HMP interface to nbd-server-start is
|
||||
not changed to expose max-connections (any client needing to fine-tune
|
||||
things should be using QMP).
|
||||
|
||||
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
Message-ID: <20240807174943.771624-12-eblake@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
[ericb: Expand commit message to summarize Dan's argument for why we
|
||||
break corner-case back-compat behavior without a deprecation period]
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
|
||||
CVE: CVE-2024-7409
|
||||
Upstream-Status: Backport [https://github.com/qemu/qemu/commit/c8a76dbd90c2f48df89b75bef74917f90a59b623]
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
block/monitor/block-hmp-cmds.c | 3 ++-
|
||||
blockdev-nbd.c | 8 ++++++++
|
||||
include/block/nbd.h | 7 +++++++
|
||||
qapi/block-export.json | 4 ++--
|
||||
4 files changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c
|
||||
index 2ac4aedff..32a666b5d 100644
|
||||
--- a/block/monitor/block-hmp-cmds.c
|
||||
+++ b/block/monitor/block-hmp-cmds.c
|
||||
@@ -411,7 +411,8 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
- nbd_server_start(addr, NULL, NULL, 0, &local_err);
|
||||
+ nbd_server_start(addr, NULL, NULL, NBD_DEFAULT_MAX_CONNECTIONS,
|
||||
+ &local_err);
|
||||
qapi_free_SocketAddress(addr);
|
||||
if (local_err != NULL) {
|
||||
goto exit;
|
||||
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
|
||||
index b9e8dc78f..4bd90bac1 100644
|
||||
--- a/blockdev-nbd.c
|
||||
+++ b/blockdev-nbd.c
|
||||
@@ -171,6 +171,10 @@ void nbd_server_start(SocketAddress *addr, const char *tls_creds,
|
||||
|
||||
void nbd_server_start_options(NbdServerOptions *arg, Error **errp)
|
||||
{
|
||||
+ if (!arg->has_max_connections) {
|
||||
+ arg->max_connections = NBD_DEFAULT_MAX_CONNECTIONS;
|
||||
+ }
|
||||
+
|
||||
nbd_server_start(arg->addr, arg->tls_creds, arg->tls_authz,
|
||||
arg->max_connections, errp);
|
||||
}
|
||||
@@ -183,6 +187,10 @@ void qmp_nbd_server_start(SocketAddressLegacy *addr,
|
||||
{
|
||||
SocketAddress *addr_flat = socket_address_flatten(addr);
|
||||
|
||||
+ if (!has_max_connections) {
|
||||
+ max_connections = NBD_DEFAULT_MAX_CONNECTIONS;
|
||||
+ }
|
||||
+
|
||||
nbd_server_start(addr_flat, tls_creds, tls_authz, max_connections, errp);
|
||||
qapi_free_SocketAddress(addr_flat);
|
||||
}
|
||||
diff --git a/include/block/nbd.h b/include/block/nbd.h
|
||||
index b71a29724..a31c34a8a 100644
|
||||
--- a/include/block/nbd.h
|
||||
+++ b/include/block/nbd.h
|
||||
@@ -33,6 +33,13 @@ extern const BlockExportDriver blk_exp_nbd;
|
||||
*/
|
||||
#define NBD_DEFAULT_HANDSHAKE_MAX_SECS 10
|
||||
|
||||
+/*
|
||||
+ * NBD_DEFAULT_MAX_CONNECTIONS: Number of client sockets to allow at
|
||||
+ * once; must be large enough to allow a MULTI_CONN-aware client like
|
||||
+ * nbdcopy to create its typical number of 8-16 sockets.
|
||||
+ */
|
||||
+#define NBD_DEFAULT_MAX_CONNECTIONS 100
|
||||
+
|
||||
/* Handshake phase structs - this struct is passed on the wire */
|
||||
|
||||
struct NBDOption {
|
||||
diff --git a/qapi/block-export.json b/qapi/block-export.json
|
||||
index c1b92ce1c..181d7238f 100644
|
||||
--- a/qapi/block-export.json
|
||||
+++ b/qapi/block-export.json
|
||||
@@ -21,7 +21,7 @@
|
||||
# recreated on the fly while the NBD server is active.
|
||||
# If missing, it will default to denying access (since 4.0).
|
||||
# @max-connections: The maximum number of connections to allow at the same
|
||||
-# time, 0 for unlimited. (since 5.2; default: 0)
|
||||
+# time, 0 for unlimited. (since 5.2; default: 100)
|
||||
#
|
||||
# Since: 4.2
|
||||
##
|
||||
@@ -50,7 +50,7 @@
|
||||
# recreated on the fly while the NBD server is active.
|
||||
# If missing, it will default to denying access (since 4.0).
|
||||
# @max-connections: The maximum number of connections to allow at the same
|
||||
-# time, 0 for unlimited. (since 5.2; default: 0)
|
||||
+# time, 0 for unlimited. (since 5.2; default: 100)
|
||||
#
|
||||
# Returns: error if the server is already running.
|
||||
#
|
||||
--
|
||||
2.25.1
|
||||
|
||||
122
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0003.patch
Normal file
122
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0003.patch
Normal file
@@ -0,0 +1,122 @@
|
||||
From b9b72cb3ce15b693148bd09cef7e50110566d8a0 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Thu, 8 Aug 2024 16:05:08 -0500
|
||||
Subject: [PATCH] nbd/server: CVE-2024-7409: Drop non-negotiating clients
|
||||
|
||||
A client that opens a socket but does not negotiate is merely hogging
|
||||
qemu's resources (an open fd and a small amount of memory); and a
|
||||
malicious client that can access the port where NBD is listening can
|
||||
attempt a denial of service attack by intentionally opening and
|
||||
abandoning lots of unfinished connections. The previous patch put a
|
||||
default bound on the number of such ongoing connections, but once that
|
||||
limit is hit, no more clients can connect (including legitimate ones).
|
||||
The solution is to insist that clients complete handshake within a
|
||||
reasonable time limit, defaulting to 10 seconds. A client that has
|
||||
not successfully completed NBD_OPT_GO by then (including the case of
|
||||
where the client didn't know TLS credentials to even reach the point
|
||||
of NBD_OPT_GO) is wasting our time and does not deserve to stay
|
||||
connected. Later patches will allow fine-tuning the limit away from
|
||||
the default value (including disabling it for doing integration
|
||||
testing of the handshake process itself).
|
||||
|
||||
Note that this patch in isolation actually makes it more likely to see
|
||||
qemu SEGV after nbd-server-stop, as any client socket still connected
|
||||
when the server shuts down will now be closed after 10 seconds rather
|
||||
than at the client's whims. That will be addressed in the next patch.
|
||||
|
||||
For a demo of this patch in action:
|
||||
$ qemu-nbd -f raw -r -t -e 10 file &
|
||||
$ nbdsh --opt-mode -c '
|
||||
H = list()
|
||||
for i in range(20):
|
||||
print(i)
|
||||
H.insert(i, nbd.NBD())
|
||||
H[i].set_opt_mode(True)
|
||||
H[i].connect_uri("nbd://localhost")
|
||||
'
|
||||
$ kill $!
|
||||
|
||||
where later connections get to start progressing once earlier ones are
|
||||
forcefully dropped for taking too long, rather than hanging.
|
||||
|
||||
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
Message-ID: <20240807174943.771624-13-eblake@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
[eblake: rebase to changes earlier in series, reduce scope of timer]
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
|
||||
CVE: CVE-2024-7409
|
||||
Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/b9b72cb3ce15b693148bd09cef7e50110566d8a0]
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
nbd/server.c | 28 +++++++++++++++++++++++++++-
|
||||
nbd/trace-events | 1 +
|
||||
2 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/nbd/server.c b/nbd/server.c
|
||||
index 12680c8dc..1bb253726 100644
|
||||
--- a/nbd/server.c
|
||||
+++ b/nbd/server.c
|
||||
@@ -2698,22 +2698,48 @@ static void nbd_client_receive_next_request(NBDClient *client)
|
||||
}
|
||||
}
|
||||
|
||||
+static void nbd_handshake_timer_cb(void *opaque)
|
||||
+{
|
||||
+ QIOChannel *ioc = opaque;
|
||||
+
|
||||
+ trace_nbd_handshake_timer_cb();
|
||||
+ qio_channel_shutdown(ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL);
|
||||
+}
|
||||
+
|
||||
static coroutine_fn void nbd_co_client_start(void *opaque)
|
||||
{
|
||||
NBDClient *client = opaque;
|
||||
Error *local_err = NULL;
|
||||
+ QEMUTimer *handshake_timer = NULL;
|
||||
|
||||
qemu_co_mutex_init(&client->send_lock);
|
||||
|
||||
- /* TODO - utilize client->handshake_max_secs */
|
||||
+ /*
|
||||
+ * Create a timer to bound the time spent in negotiation. If the
|
||||
+ * timer expires, it is likely nbd_negotiate will fail because the
|
||||
+ * socket was shutdown.
|
||||
+ */
|
||||
+ if (client->handshake_max_secs > 0) {
|
||||
+ handshake_timer = aio_timer_new(qemu_get_aio_context(),
|
||||
+ QEMU_CLOCK_REALTIME,
|
||||
+ SCALE_NS,
|
||||
+ nbd_handshake_timer_cb,
|
||||
+ client->sioc);
|
||||
+ timer_mod(handshake_timer,
|
||||
+ qemu_clock_get_ns(QEMU_CLOCK_REALTIME) +
|
||||
+ client->handshake_max_secs * NANOSECONDS_PER_SECOND);
|
||||
+ }
|
||||
+
|
||||
if (nbd_negotiate(client, &local_err)) {
|
||||
if (local_err) {
|
||||
error_report_err(local_err);
|
||||
}
|
||||
+ timer_free(handshake_timer);
|
||||
client_close(client, false);
|
||||
return;
|
||||
}
|
||||
|
||||
+ timer_free(handshake_timer);
|
||||
nbd_client_receive_next_request(client);
|
||||
}
|
||||
|
||||
diff --git a/nbd/trace-events b/nbd/trace-events
|
||||
index c4919a2dd..553546f1f 100644
|
||||
--- a/nbd/trace-events
|
||||
+++ b/nbd/trace-events
|
||||
@@ -73,3 +73,4 @@ nbd_co_receive_request_decode_type(uint64_t handle, uint16_t type, const char *n
|
||||
nbd_co_receive_request_payload_received(uint64_t handle, uint32_t len) "Payload received: handle = %" PRIu64 ", len = %" PRIu32
|
||||
nbd_co_receive_align_compliance(const char *op, uint64_t from, uint32_t len, uint32_t align) "client sent non-compliant unaligned %s request: from=0x%" PRIx64 ", len=0x%" PRIx32 ", align=0x%" PRIx32
|
||||
nbd_trip(void) "Reading request"
|
||||
+nbd_handshake_timer_cb(void) "client took too long to negotiate"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
163
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0004.patch
Normal file
163
meta/recipes-devtools/qemu/qemu/CVE-2024-7409-0004.patch
Normal file
@@ -0,0 +1,163 @@
|
||||
From 3e7ef738c8462c45043a1d39f702a0990406a3b3 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Wed, 7 Aug 2024 12:23:13 -0500
|
||||
Subject: [PATCH] nbd/server: CVE-2024-7409: Close stray clients at server-stop
|
||||
|
||||
A malicious client can attempt to connect to an NBD server, and then
|
||||
intentionally delay progress in the handshake, including if it does
|
||||
not know the TLS secrets. Although the previous two patches reduce
|
||||
this behavior by capping the default max-connections parameter and
|
||||
killing slow clients, they did not eliminate the possibility of a
|
||||
client waiting to close the socket until after the QMP nbd-server-stop
|
||||
command is executed, at which point qemu would SEGV when trying to
|
||||
dereference the NULL nbd_server global which is no longer present.
|
||||
This amounts to a denial of service attack. Worse, if another NBD
|
||||
server is started before the malicious client disconnects, I cannot
|
||||
rule out additional adverse effects when the old client interferes
|
||||
with the connection count of the new server (although the most likely
|
||||
is a crash due to an assertion failure when checking
|
||||
nbd_server->connections > 0).
|
||||
|
||||
For environments without this patch, the CVE can be mitigated by
|
||||
ensuring (such as via a firewall) that only trusted clients can
|
||||
connect to an NBD server. Note that using frameworks like libvirt
|
||||
that ensure that TLS is used and that nbd-server-stop is not executed
|
||||
while any trusted clients are still connected will only help if there
|
||||
is also no possibility for an untrusted client to open a connection
|
||||
but then stall on the NBD handshake.
|
||||
|
||||
Given the previous patches, it would be possible to guarantee that no
|
||||
clients remain connected by having nbd-server-stop sleep for longer
|
||||
than the default handshake deadline before finally freeing the global
|
||||
nbd_server object, but that could make QMP non-responsive for a long
|
||||
time. So intead, this patch fixes the problem by tracking all client
|
||||
sockets opened while the server is running, and forcefully closing any
|
||||
such sockets remaining without a completed handshake at the time of
|
||||
nbd-server-stop, then waiting until the coroutines servicing those
|
||||
sockets notice the state change. nbd-server-stop now has a second
|
||||
AIO_WAIT_WHILE_UNLOCKED (the first is indirectly through the
|
||||
blk_exp_close_all_type() that disconnects all clients that completed
|
||||
handshakes), but forced socket shutdown is enough to progress the
|
||||
coroutines and quickly tear down all clients before the server is
|
||||
freed, thus finally fixing the CVE.
|
||||
|
||||
This patch relies heavily on the fact that nbd/server.c guarantees
|
||||
that it only calls nbd_blockdev_client_closed() from the main loop
|
||||
(see the assertion in nbd_client_put() and the hoops used in
|
||||
nbd_client_put_nonzero() to achieve that); if we did not have that
|
||||
guarantee, we would also need a mutex protecting our accesses of the
|
||||
list of connections to survive re-entrancy from independent iothreads.
|
||||
|
||||
Although I did not actually try to test old builds, it looks like this
|
||||
problem has existed since at least commit 862172f45c (v2.12.0, 2017) -
|
||||
even back when that patch started using a QIONetListener to handle
|
||||
listening on multiple sockets, nbd_server_free() was already unaware
|
||||
that the nbd_blockdev_client_closed callback can be reached later by a
|
||||
client thread that has not completed handshakes (and therefore the
|
||||
client's socket never got added to the list closed in
|
||||
nbd_export_close_all), despite that patch intentionally tearing down
|
||||
the QIONetListener to prevent new clients.
|
||||
|
||||
Reported-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
|
||||
Fixes: CVE-2024-7409
|
||||
CC: qemu-stable@nongnu.org
|
||||
Signed-off-by: Eric Blake <eblake@redhat.com>
|
||||
Message-ID: <20240807174943.771624-14-eblake@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
|
||||
CVE: CVE-2024-7409
|
||||
Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/3e7ef738c8462c45043a1d39f702a0990406a3b3]
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
blockdev-nbd.c | 35 ++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 34 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
|
||||
index 4bd90bac1..c71ca38d2 100644
|
||||
--- a/blockdev-nbd.c
|
||||
+++ b/blockdev-nbd.c
|
||||
@@ -21,12 +21,18 @@
|
||||
#include "io/channel-socket.h"
|
||||
#include "io/net-listener.h"
|
||||
|
||||
+typedef struct NBDConn {
|
||||
+ QIOChannelSocket *cioc;
|
||||
+ QLIST_ENTRY(NBDConn) next;
|
||||
+} NBDConn;
|
||||
+
|
||||
typedef struct NBDServerData {
|
||||
QIONetListener *listener;
|
||||
QCryptoTLSCreds *tlscreds;
|
||||
char *tlsauthz;
|
||||
uint32_t max_connections;
|
||||
uint32_t connections;
|
||||
+ QLIST_HEAD(, NBDConn) conns;
|
||||
} NBDServerData;
|
||||
|
||||
static NBDServerData *nbd_server;
|
||||
@@ -46,6 +52,14 @@ bool nbd_server_is_running(void)
|
||||
|
||||
static void nbd_blockdev_client_closed(NBDClient *client, bool ignored)
|
||||
{
|
||||
+ NBDConn *conn = nbd_client_owner(client);
|
||||
+
|
||||
+ assert(qemu_mutex_iothread_locked() && nbd_server);
|
||||
+
|
||||
+ object_unref(OBJECT(conn->cioc));
|
||||
+ QLIST_REMOVE(conn, next);
|
||||
+ g_free(conn);
|
||||
+
|
||||
nbd_client_put(client);
|
||||
assert(nbd_server->connections > 0);
|
||||
nbd_server->connections--;
|
||||
@@ -55,14 +69,20 @@ static void nbd_blockdev_client_closed(NBDClient *client, bool ignored)
|
||||
static void nbd_accept(QIONetListener *listener, QIOChannelSocket *cioc,
|
||||
gpointer opaque)
|
||||
{
|
||||
+ NBDConn *conn = g_new0(NBDConn, 1);
|
||||
+
|
||||
+ assert(qemu_mutex_iothread_locked() && nbd_server);
|
||||
nbd_server->connections++;
|
||||
+ object_ref(OBJECT(cioc));
|
||||
+ conn->cioc = cioc;
|
||||
+ QLIST_INSERT_HEAD(&nbd_server->conns, conn, next);
|
||||
nbd_update_server_watch(nbd_server);
|
||||
|
||||
qio_channel_set_name(QIO_CHANNEL(cioc), "nbd-server");
|
||||
/* TODO - expose handshake timeout as QMP option */
|
||||
nbd_client_new(cioc, NBD_DEFAULT_HANDSHAKE_MAX_SECS,
|
||||
nbd_server->tlscreds, nbd_server->tlsauthz,
|
||||
- nbd_blockdev_client_closed, NULL);
|
||||
+ nbd_blockdev_client_closed, conn);
|
||||
}
|
||||
|
||||
static void nbd_update_server_watch(NBDServerData *s)
|
||||
@@ -76,12 +96,25 @@ static void nbd_update_server_watch(NBDServerData *s)
|
||||
|
||||
static void nbd_server_free(NBDServerData *server)
|
||||
{
|
||||
+ NBDConn *conn, *tmp;
|
||||
+
|
||||
if (!server) {
|
||||
return;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Forcefully close the listener socket, and any clients that have
|
||||
+ * not yet disconnected on their own.
|
||||
+ */
|
||||
qio_net_listener_disconnect(server->listener);
|
||||
object_unref(OBJECT(server->listener));
|
||||
+ QLIST_FOREACH_SAFE(conn, &server->conns, next, tmp) {
|
||||
+ qio_channel_shutdown(QIO_CHANNEL(conn->cioc), QIO_CHANNEL_SHUTDOWN_BOTH,
|
||||
+ NULL);
|
||||
+ }
|
||||
+
|
||||
+ AIO_WAIT_WHILE(NULL, server->connections > 0);
|
||||
+
|
||||
if (server->tlscreds) {
|
||||
object_unref(OBJECT(server->tlscreds));
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
29
meta/recipes-devtools/ruby/ruby/CVE-2024-27282.patch
Normal file
29
meta/recipes-devtools/ruby/ruby/CVE-2024-27282.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 989a2355808a63fc45367785c82ffd46d18c900a Mon Sep 17 00:00:00 2001
|
||||
From: Hiroshi SHIBATA <hsbt@ruby-lang.org>
|
||||
Date: Fri, 12 Apr 2024 15:01:47 +1000
|
||||
Subject: [PATCH] Fix Use-After-Free issue for Regexp
|
||||
|
||||
Co-authored-by: Isaac Peka <7493006+isaac-peka@users.noreply.github.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/ruby/ruby/commit/989a2355808a63fc45367785c82ffd46d18c900a]
|
||||
CVE: CVE-2024-27282
|
||||
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||
|
||||
|
||||
regexec.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/regexec.c b/regexec.c
|
||||
index 73694ab14a0b0a..140691ad42489f 100644
|
||||
--- a/regexec.c
|
||||
+++ b/regexec.c
|
||||
@@ -3449,8 +3449,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
CASE(OP_MEMORY_END_PUSH_REC) MOP_IN(OP_MEMORY_END_PUSH_REC);
|
||||
GET_MEMNUM_INC(mem, p);
|
||||
STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */
|
||||
- STACK_PUSH_MEM_END(mem, s);
|
||||
mem_start_stk[mem] = GET_STACK_INDEX(stkp);
|
||||
+ STACK_PUSH_MEM_END(mem, s);
|
||||
MOP_OUT;
|
||||
JUMP;
|
||||
|
||||
@@ -35,6 +35,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
|
||||
file://CVE-2023-36617_2.patch \
|
||||
file://CVE-2024-27281.patch \
|
||||
file://CVE-2024-27280.patch \
|
||||
file://CVE-2024-27282.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 77dc7f699beba606937b7ea23b50cf5974fa64b1 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Sharp <Ken.Sharp@artifex.com>
|
||||
Date: Thu, 25 Jan 2024 11:55:49 +0000
|
||||
Subject: [PATCH] Bug 707510 - don't allow PDF files with bad Filters to
|
||||
overflow the debug buffer
|
||||
|
||||
Item #2 of the report.
|
||||
|
||||
Allocate a buffer to hold the filter name, instead of assuming it will
|
||||
fit in a fixed buffer.
|
||||
|
||||
Reviewed all the other PDFDEBUG cases, no others use a fixed buffer like
|
||||
this.
|
||||
|
||||
CVE: CVE-2024-29506
|
||||
|
||||
Upstream-Status: Backport [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=77dc7f699beba606937b7ea23b50cf5974fa64b1]
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
pdf/pdf_file.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pdf/pdf_file.c b/pdf/pdf_file.c
|
||||
index 214d448..93c2402 100644
|
||||
--- a/pdf/pdf_file.c
|
||||
+++ b/pdf/pdf_file.c
|
||||
@@ -767,10 +767,14 @@ static int pdfi_apply_filter(pdf_context *ctx, pdf_dict *dict, pdf_name *n, pdf_
|
||||
|
||||
if (ctx->args.pdfdebug)
|
||||
{
|
||||
- char str[100];
|
||||
+ char *str;
|
||||
+ str = gs_alloc_bytes(ctx->memory, n->length + 1, "temp string for debug");
|
||||
+ if (str == NULL)
|
||||
+ return_error(gs_error_VMerror);
|
||||
memcpy(str, (const char *)n->data, n->length);
|
||||
str[n->length] = '\0';
|
||||
dmprintf1(ctx->memory, "FILTER NAME:%s\n", str);
|
||||
+ gs_free_object(ctx->memory, str, "temp string for debug");
|
||||
}
|
||||
|
||||
if (pdfi_name_is(n, "RunLengthDecode")) {
|
||||
--
|
||||
2.40.0
|
||||
@@ -0,0 +1,45 @@
|
||||
From 917b3a71fb20748965254631199ad98210d6c2fb Mon Sep 17 00:00:00 2001
|
||||
From: Ken Sharp <Ken.Sharp@artifex.com>
|
||||
Date: Thu, 25 Jan 2024 11:58:22 +0000
|
||||
Subject: [PATCH] Bug 707510 - don't use strlen on passwords
|
||||
|
||||
Item #1 of the report. This looks like an oversight when first coding
|
||||
the routine. We should use the PostScript string length, because
|
||||
PostScript strings may not be NULL terminated (and as here may contain
|
||||
internal NULL characters).
|
||||
|
||||
Fix the R6 handler which has the same problem too.
|
||||
|
||||
CVE: CVE-2024-29509
|
||||
|
||||
Upstream-Status: Backport [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=917b3a71fb20748965254631199ad98210d6c2fb]
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
pdf/pdf_sec.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pdf/pdf_sec.c b/pdf/pdf_sec.c
|
||||
index ff60805..2bb59e1 100644
|
||||
--- a/pdf/pdf_sec.c
|
||||
+++ b/pdf/pdf_sec.c
|
||||
@@ -1250,7 +1250,7 @@ static int check_password_R5(pdf_context *ctx, char *Password, int PasswordLen,
|
||||
if (code < 0) {
|
||||
pdf_string *P = NULL, *P_UTF8 = NULL;
|
||||
|
||||
- code = pdfi_object_alloc(ctx, PDF_STRING, strlen(ctx->encryption.Password), (pdf_obj **)&P);
|
||||
+ code = pdfi_object_alloc(ctx, PDF_STRING, PasswordLen, (pdf_obj **)&P);
|
||||
if (code < 0) {
|
||||
return code;
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ static int check_password_R6(pdf_context *ctx, char *Password, int PasswordLen,
|
||||
if (code < 0) {
|
||||
pdf_string *P = NULL, *P_UTF8 = NULL;
|
||||
|
||||
- code = pdfi_object_alloc(ctx, PDF_STRING, strlen(ctx->encryption.Password), (pdf_obj **)&P);
|
||||
+ code = pdfi_object_alloc(ctx, PDF_STRING, PasswordLen, (pdf_obj **)&P);
|
||||
if (code < 0)
|
||||
return code;
|
||||
memcpy(P->data, Password, PasswordLen);
|
||||
--
|
||||
2.40.0
|
||||
@@ -0,0 +1,100 @@
|
||||
From 638159c43dbb48425a187d244ec288d252d0ecf4 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Liddell <chris.liddell@artifex.com>
|
||||
Date: Wed, 31 Jan 2024 14:08:18 +0000
|
||||
Subject: [PATCH 1/2] Bug 707510(5): Reject OCRLanguage changes after SAFER
|
||||
enabled
|
||||
|
||||
In the devices that support OCR, OCRLanguage really ought never to be set from
|
||||
PostScript, so reject attempts to change it if path_control_active is true.
|
||||
|
||||
CVE: CVE-2024-29511
|
||||
|
||||
Upstream-Status: Backport [https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=3d4cfdc1a44b1969a0f14c86673a372654d443c4]
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
devices/gdevocr.c | 15 ++++++++++-----
|
||||
devices/gdevpdfocr.c | 15 ++++++++++-----
|
||||
devices/vector/gdevpdfp.c | 15 ++++++++++-----
|
||||
3 files changed, 30 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/devices/gdevocr.c b/devices/gdevocr.c
|
||||
index 88c759c..287b74b 100644
|
||||
--- a/devices/gdevocr.c
|
||||
+++ b/devices/gdevocr.c
|
||||
@@ -187,11 +187,16 @@ ocr_put_params(gx_device *dev, gs_param_list *plist)
|
||||
|
||||
switch (code = param_read_string(plist, (param_name = "OCRLanguage"), &langstr)) {
|
||||
case 0:
|
||||
- len = langstr.size;
|
||||
- if (len >= sizeof(pdev->language))
|
||||
- len = sizeof(pdev->language)-1;
|
||||
- memcpy(pdev->language, langstr.data, len);
|
||||
- pdev->language[len] = 0;
|
||||
+ if (pdev->memory->gs_lib_ctx->core->path_control_active) {
|
||||
+ return_error(gs_error_invalidaccess);
|
||||
+ }
|
||||
+ else {
|
||||
+ len = langstr.size;
|
||||
+ if (len >= sizeof(pdev->language))
|
||||
+ len = sizeof(pdev->language)-1;
|
||||
+ memcpy(pdev->language, langstr.data, len);
|
||||
+ pdev->language[len] = 0;
|
||||
+ }
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
diff --git a/devices/gdevpdfocr.c b/devices/gdevpdfocr.c
|
||||
index 8dd5a59..4c694e3 100644
|
||||
--- a/devices/gdevpdfocr.c
|
||||
+++ b/devices/gdevpdfocr.c
|
||||
@@ -50,11 +50,16 @@ pdfocr_put_some_params(gx_device * dev, gs_param_list * plist)
|
||||
|
||||
switch (code = param_read_string(plist, (param_name = "OCRLanguage"), &langstr)) {
|
||||
case 0:
|
||||
- len = langstr.size;
|
||||
- if (len >= sizeof(pdf_dev->ocr.language))
|
||||
- len = sizeof(pdf_dev->ocr.language)-1;
|
||||
- memcpy(pdf_dev->ocr.language, langstr.data, len);
|
||||
- pdf_dev->ocr.language[len] = 0;
|
||||
+ if (pdf_dev->memory->gs_lib_ctx->core->path_control_active) {
|
||||
+ return_error(gs_error_invalidaccess);
|
||||
+ }
|
||||
+ else {
|
||||
+ len = langstr.size;
|
||||
+ if (len >= sizeof(pdf_dev->ocr.language))
|
||||
+ len = sizeof(pdf_dev->ocr.language)-1;
|
||||
+ memcpy(pdf_dev->ocr.language, langstr.data, len);
|
||||
+ pdf_dev->ocr.language[len] = 0;
|
||||
+ }
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
diff --git a/devices/vector/gdevpdfp.c b/devices/vector/gdevpdfp.c
|
||||
index 42fa1c5..23e9bc8 100644
|
||||
--- a/devices/vector/gdevpdfp.c
|
||||
+++ b/devices/vector/gdevpdfp.c
|
||||
@@ -458,11 +458,16 @@ gdev_pdf_put_params_impl(gx_device * dev, const gx_device_pdf * save_dev, gs_par
|
||||
gs_param_string langstr;
|
||||
switch (code = param_read_string(plist, (param_name = "OCRLanguage"), &langstr)) {
|
||||
case 0:
|
||||
- len = langstr.size;
|
||||
- if (len >= sizeof(pdev->ocr_language))
|
||||
- len = sizeof(pdev->ocr_language)-1;
|
||||
- memcpy(pdev->ocr_language, langstr.data, len);
|
||||
- pdev->ocr_language[len] = 0;
|
||||
+ if (pdev->memory->gs_lib_ctx->core->path_control_active) {
|
||||
+ return_error(gs_error_invalidaccess);
|
||||
+ }
|
||||
+ else {
|
||||
+ len = langstr.size;
|
||||
+ if (len >= sizeof(pdev->ocr_language))
|
||||
+ len = sizeof(pdev->ocr_language)-1;
|
||||
+ memcpy(pdev->ocr_language, langstr.data, len);
|
||||
+ pdev->ocr_language[len] = 0;
|
||||
+ }
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
--
|
||||
2.40.0
|
||||
@@ -0,0 +1,219 @@
|
||||
From 360153f3aa63c8fef0d507eccde75f46342c5264 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Liddell <chris.liddell@artifex.com>
|
||||
Date: Wed, 31 Jan 2024 14:08:18 +0000
|
||||
Subject: [PATCH 2/2] Bug 707510(5)2: The original fix was overly aggressive
|
||||
|
||||
The way the default OCRLanguage value was set was for the relevant get_params
|
||||
methods to check if the value had been set, and if not return a default value.
|
||||
This could result in the first time the put_params seeing that value being after
|
||||
path control has been enabled, meaning it would throw an invalidaccess error.
|
||||
|
||||
This changes how we set the default: they now uses an init_device method, so
|
||||
the string is populated from the device's creation. This works correctly for
|
||||
both the default value, and for values set on the command line.
|
||||
|
||||
CVE: CVE-2024-29511
|
||||
|
||||
Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=638159c43dbb48425a187d244ec288d252d0ecf4]
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
devices/gdevocr.c | 17 ++++++++++++++++-
|
||||
devices/gdevpdfocr.c | 28 ++++++++++++++++++++++------
|
||||
devices/vector/gdevpdf.c | 15 +++++++++++++++
|
||||
devices/vector/gdevpdfp.c | 3 ++-
|
||||
4 files changed, 55 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/devices/gdevocr.c b/devices/gdevocr.c
|
||||
index 287b74b..a616ef4 100644
|
||||
--- a/devices/gdevocr.c
|
||||
+++ b/devices/gdevocr.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#define X_DPI 72
|
||||
#define Y_DPI 72
|
||||
|
||||
+static dev_proc_initialize_device(ocr_initialize_device);
|
||||
static dev_proc_print_page(ocr_print_page);
|
||||
static dev_proc_print_page(hocr_print_page);
|
||||
static dev_proc_get_params(ocr_get_params);
|
||||
@@ -55,6 +56,7 @@ ocr_initialize_device_procs(gx_device *dev)
|
||||
{
|
||||
gdev_prn_initialize_device_procs_gray_bg(dev);
|
||||
|
||||
+ set_dev_proc(dev, initialize_device, ocr_initialize_device);
|
||||
set_dev_proc(dev, open_device, ocr_open);
|
||||
set_dev_proc(dev, close_device, ocr_close);
|
||||
set_dev_proc(dev, get_params, ocr_get_params);
|
||||
@@ -79,6 +81,7 @@ hocr_initialize_device_procs(gx_device *dev)
|
||||
{
|
||||
gdev_prn_initialize_device_procs_gray_bg(dev);
|
||||
|
||||
+ set_dev_proc(dev, initialize_device, ocr_initialize_device);
|
||||
set_dev_proc(dev, open_device, ocr_open);
|
||||
set_dev_proc(dev, close_device, hocr_close);
|
||||
set_dev_proc(dev, get_params, ocr_get_params);
|
||||
@@ -102,6 +105,17 @@ const gx_device_ocr gs_hocr_device =
|
||||
#define HOCR_HEADER "<html>\n <body>\n"
|
||||
#define HOCR_TRAILER " </body>\n</html>\n"
|
||||
|
||||
+static int
|
||||
+ocr_initialize_device(gx_device *dev)
|
||||
+{
|
||||
+ gx_device_ocr *odev = (gx_device_ocr *)dev;
|
||||
+ const char *default_ocr_lang = "eng";
|
||||
+
|
||||
+ odev->language[0] = '\0';
|
||||
+ strcpy(odev->language, default_ocr_lang);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
ocr_open(gx_device *pdev)
|
||||
{
|
||||
@@ -187,7 +201,8 @@ ocr_put_params(gx_device *dev, gs_param_list *plist)
|
||||
|
||||
switch (code = param_read_string(plist, (param_name = "OCRLanguage"), &langstr)) {
|
||||
case 0:
|
||||
- if (pdev->memory->gs_lib_ctx->core->path_control_active) {
|
||||
+ if (pdev->memory->gs_lib_ctx->core->path_control_active
|
||||
+ && (strlen(pdev->language) != langstr.size || memcmp(pdev->language, langstr.data, langstr.size) != 0)) {
|
||||
return_error(gs_error_invalidaccess);
|
||||
}
|
||||
else {
|
||||
diff --git a/devices/gdevpdfocr.c b/devices/gdevpdfocr.c
|
||||
index 4c694e3..e4f9862 100644
|
||||
--- a/devices/gdevpdfocr.c
|
||||
+++ b/devices/gdevpdfocr.c
|
||||
@@ -33,9 +33,9 @@
|
||||
#include "gdevpdfimg.h"
|
||||
#include "tessocr.h"
|
||||
|
||||
-int pdf_ocr_open(gx_device *pdev);
|
||||
-int pdf_ocr_close(gx_device *pdev);
|
||||
-
|
||||
+static dev_proc_initialize_device(pdf_ocr_initialize_device);
|
||||
+static dev_proc_open_device(pdf_ocr_open);
|
||||
+static dev_proc_close_device(pdf_ocr_close);
|
||||
|
||||
static int
|
||||
pdfocr_put_some_params(gx_device * dev, gs_param_list * plist)
|
||||
@@ -50,7 +50,8 @@ pdfocr_put_some_params(gx_device * dev, gs_param_list * plist)
|
||||
|
||||
switch (code = param_read_string(plist, (param_name = "OCRLanguage"), &langstr)) {
|
||||
case 0:
|
||||
- if (pdf_dev->memory->gs_lib_ctx->core->path_control_active) {
|
||||
+ if (pdf_dev->memory->gs_lib_ctx->core->path_control_active
|
||||
+ && (strlen(pdf_dev->ocr.language) != langstr.size || memcmp(pdf_dev->ocr.language, langstr.data, langstr.size) != 0)) {
|
||||
return_error(gs_error_invalidaccess);
|
||||
}
|
||||
else {
|
||||
@@ -152,6 +153,8 @@ pdfocr8_initialize_device_procs(gx_device *dev)
|
||||
{
|
||||
gdev_prn_initialize_device_procs_gray(dev);
|
||||
|
||||
+ set_dev_proc(dev, initialize_device, pdf_ocr_initialize_device);
|
||||
+ set_dev_proc(dev, initialize_device, pdf_ocr_initialize_device);
|
||||
set_dev_proc(dev, open_device, pdf_ocr_open);
|
||||
set_dev_proc(dev, output_page, gdev_prn_output_page_seekable);
|
||||
set_dev_proc(dev, close_device, pdf_ocr_close);
|
||||
@@ -185,6 +188,7 @@ pdfocr24_initialize_device_procs(gx_device *dev)
|
||||
{
|
||||
gdev_prn_initialize_device_procs_rgb(dev);
|
||||
|
||||
+ set_dev_proc(dev, initialize_device, pdf_ocr_initialize_device);
|
||||
set_dev_proc(dev, open_device, pdf_ocr_open);
|
||||
set_dev_proc(dev, output_page, gdev_prn_output_page_seekable);
|
||||
set_dev_proc(dev, close_device, pdf_ocr_close);
|
||||
@@ -216,6 +220,7 @@ pdfocr32_initialize_device_procs(gx_device *dev)
|
||||
{
|
||||
gdev_prn_initialize_device_procs_cmyk8(dev);
|
||||
|
||||
+ set_dev_proc(dev, initialize_device, pdf_ocr_initialize_device);
|
||||
set_dev_proc(dev, open_device, pdf_ocr_open);
|
||||
set_dev_proc(dev, output_page, gdev_prn_output_page_seekable);
|
||||
set_dev_proc(dev, close_device, pdf_ocr_close);
|
||||
@@ -703,7 +708,18 @@ ocr_end_page(gx_device_pdf_image *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int
|
||||
+static int
|
||||
+pdf_ocr_initialize_device(gx_device *dev)
|
||||
+{
|
||||
+ gx_device_pdf_image *ppdev = (gx_device_pdf_image *)dev;
|
||||
+ const char *default_ocr_lang = "eng";
|
||||
+
|
||||
+ ppdev->ocr.language[0] = '\0';
|
||||
+ strcpy(ppdev->ocr.language, default_ocr_lang);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
pdf_ocr_open(gx_device *pdev)
|
||||
{
|
||||
gx_device_pdf_image *ppdev;
|
||||
@@ -726,7 +742,7 @@ pdf_ocr_open(gx_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int
|
||||
+static int
|
||||
pdf_ocr_close(gx_device *pdev)
|
||||
{
|
||||
gx_device_pdf_image *pdf_dev;
|
||||
diff --git a/devices/vector/gdevpdf.c b/devices/vector/gdevpdf.c
|
||||
index 9ab562c..5caabb8 100644
|
||||
--- a/devices/vector/gdevpdf.c
|
||||
+++ b/devices/vector/gdevpdf.c
|
||||
@@ -206,6 +206,7 @@ device_pdfwrite_finalize(const gs_memory_t *cmem, void *vpdev)
|
||||
}
|
||||
|
||||
/* Driver procedures */
|
||||
+static dev_proc_initialize_device(pdfwrite_initialize_device);
|
||||
static dev_proc_open_device(pdf_open);
|
||||
static dev_proc_output_page(pdf_output_page);
|
||||
static dev_proc_close_device(pdf_close);
|
||||
@@ -223,6 +224,7 @@ static dev_proc_close_device(pdf_close);
|
||||
static void
|
||||
pdfwrite_initialize_device_procs(gx_device *dev)
|
||||
{
|
||||
+ set_dev_proc(dev, initialize_device, pdfwrite_initialize_device);
|
||||
set_dev_proc(dev, open_device, pdf_open);
|
||||
set_dev_proc(dev, get_initial_matrix, gx_upright_get_initial_matrix);
|
||||
set_dev_proc(dev, output_page, pdf_output_page);
|
||||
@@ -766,6 +768,19 @@ pdf_reset_text(gx_device_pdf * pdev)
|
||||
pdf_reset_text_state(pdev->text);
|
||||
}
|
||||
|
||||
+static int
|
||||
+pdfwrite_initialize_device(gx_device *dev)
|
||||
+{
|
||||
+#if OCR_VERSION > 0
|
||||
+ gx_device_pdf *pdev = (gx_device_pdf *) dev;
|
||||
+ const char *default_ocr_lang = "eng";
|
||||
+ pdev->ocr_language[0] = '\0';
|
||||
+ strcpy(pdev->ocr_language, default_ocr_lang);
|
||||
+#endif
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Open the device. */
|
||||
static int
|
||||
pdf_open(gx_device * dev)
|
||||
diff --git a/devices/vector/gdevpdfp.c b/devices/vector/gdevpdfp.c
|
||||
index 23e9bc8..42a1794 100644
|
||||
--- a/devices/vector/gdevpdfp.c
|
||||
+++ b/devices/vector/gdevpdfp.c
|
||||
@@ -458,7 +458,8 @@ gdev_pdf_put_params_impl(gx_device * dev, const gx_device_pdf * save_dev, gs_par
|
||||
gs_param_string langstr;
|
||||
switch (code = param_read_string(plist, (param_name = "OCRLanguage"), &langstr)) {
|
||||
case 0:
|
||||
- if (pdev->memory->gs_lib_ctx->core->path_control_active) {
|
||||
+ if (pdev->memory->gs_lib_ctx->core->path_control_active
|
||||
+ && (strlen(pdev->ocr_language) != langstr.size || memcmp(pdev->ocr_language, langstr.data, langstr.size) != 0)) {
|
||||
return_error(gs_error_invalidaccess);
|
||||
}
|
||||
else {
|
||||
--
|
||||
2.40.0
|
||||
@@ -50,6 +50,10 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
|
||||
file://CVE-2024-33871-0002.patch \
|
||||
file://CVE-2024-29510.patch \
|
||||
file://CVE-2023-52722.patch \
|
||||
file://CVE-2024-29511-0001.patch \
|
||||
file://CVE-2024-29511-0002.patch \
|
||||
file://CVE-2024-29509.patch \
|
||||
file://CVE-2024-29506.patch \
|
||||
"
|
||||
|
||||
SRC_URI = "${SRC_URI_BASE} \
|
||||
|
||||
@@ -38,6 +38,8 @@ SRC_URI[sha256sum] = "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f
|
||||
|
||||
# upstream-wontfix: upstream has documented that reported function is not thread-safe
|
||||
CVE_CHECK_IGNORE += "CVE-2023-30571"
|
||||
# cpe-incorrect: this vulnerability was not in any release; introduced in v3.7.3-14-g91f27004; fixed in b6a97948
|
||||
CVE_CHECK_IGNORE += "CVE-2024-37407"
|
||||
|
||||
inherit autotools update-alternatives pkgconfig
|
||||
|
||||
|
||||
39
meta/recipes-gnome/gtk+/gtk+3/CVE-2024-6655.patch
Normal file
39
meta/recipes-gnome/gtk+/gtk+3/CVE-2024-6655.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From 3bbf0b6176d42836d23c36a6ac410e807ec0a7a7 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Sat, 15 Jun 2024 14:18:01 -0400
|
||||
Subject: [PATCH] Stop looking for modules in cwd
|
||||
|
||||
This is just not a good idea. It is surprising, and can be misused.
|
||||
|
||||
Fixes: #6786
|
||||
|
||||
CVE: CVE-2024-6655
|
||||
Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/gtk+3.0/3.24.33-1ubuntu2.2]
|
||||
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||
|
||||
gtk/gtkmodules.c | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
|
||||
index 704e412aeb5..f93101c272e 100644
|
||||
--- a/gtk/gtkmodules.c
|
||||
+++ b/gtk/gtkmodules.c
|
||||
@@ -214,13 +214,8 @@ find_module (const gchar *name)
|
||||
gchar *module_name;
|
||||
|
||||
module_name = _gtk_find_module (name, "modules");
|
||||
- if (!module_name)
|
||||
- {
|
||||
- /* As last resort, try loading without an absolute path (using system
|
||||
- * library path)
|
||||
- */
|
||||
- module_name = g_module_build_path (NULL, name);
|
||||
- }
|
||||
+ if (module_name == NULL)
|
||||
+ return NULL;
|
||||
|
||||
module = g_module_open (module_name, G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY);
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -6,6 +6,7 @@ SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar
|
||||
file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
|
||||
file://0003-Add-disable-opengl-configure-option.patch \
|
||||
file://link_fribidi.patch \
|
||||
file://CVE-2024-6655.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "dbc69f90ddc821b8d1441f00374dc1da4323a2eafa9078e61edbe5eeefa852ec"
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ inherit module
|
||||
DEPENDS += "cryptodev-linux"
|
||||
|
||||
SRC_URI += "file://0001-Disable-installing-header-file-provided-by-another-p.patch \
|
||||
file://0001-Fix-build-for-linux-5.10.220.patch \
|
||||
"
|
||||
|
||||
EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 47f9d88ca5107d1814ecfc7faf6d02d1140978a8 Mon Sep 17 00:00:00 2001
|
||||
From: Alexandre Bard <alexandre.bard@netmodule.com>
|
||||
Date: Wed, 3 Jul 2024 15:01:22 +0200
|
||||
Subject: [PATCH] Fix build for linux 5.10.220
|
||||
|
||||
The commit previously integrated is 5.11 has now been backported to
|
||||
5.10.y branch.
|
||||
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=1aecdaa7e2c6619a7d2c0a81c8f5c06e52f870f3
|
||||
|
||||
Upstream-Status: Backport [https://github.com/cryptodev-linux/cryptodev-linux/commit/157a624d7a892ea5fb2df4bbd4e71c008adbecb7]
|
||||
Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
|
||||
---
|
||||
ioctl.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ioctl.c b/ioctl.c
|
||||
index 95481d4..11fa27a 100644
|
||||
--- a/ioctl.c
|
||||
+++ b/ioctl.c
|
||||
@@ -871,7 +871,7 @@ cryptodev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg_)
|
||||
if (unlikely(ret)) {
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0))
|
||||
sys_close(fd);
|
||||
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
|
||||
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 220))
|
||||
ksys_close(fd);
|
||||
#else
|
||||
close_fd(fd);
|
||||
--
|
||||
2.46.0
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "f8d4297d452f7c832d90bfb992d90db2e30ffc23"
|
||||
SRCREV_meta ?= "7cdb56640a7854c921c292100445334745d5d534"
|
||||
SRCREV_machine ?= "ac5e398055e97136165efed6894a43ed8653f889"
|
||||
SRCREV_meta ?= "6975e512fd99bccf35a7e257532b9c0eb134519b"
|
||||
|
||||
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.157"
|
||||
LINUX_VERSION ?= "5.15.164"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.15.157"
|
||||
LINUX_VERSION ?= "5.15.164"
|
||||
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 ?= "7a8fce8cbd9a8a7d68a0c2537141c85d63f6eda3"
|
||||
SRCREV_meta ?= "7cdb56640a7854c921c292100445334745d5d534"
|
||||
SRCREV_machine ?= "eadae004a94c5d0493b1f8a468fba0be26992a06"
|
||||
SRCREV_meta ?= "6975e512fd99bccf35a7e257532b9c0eb134519b"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -14,24 +14,24 @@ KBRANCH:qemux86 ?= "v5.15/standard/base"
|
||||
KBRANCH:qemux86-64 ?= "v5.15/standard/base"
|
||||
KBRANCH:qemumips64 ?= "v5.15/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine:qemuarm ?= "b844615e2b799c40eac746cd24e009b620114230"
|
||||
SRCREV_machine:qemuarm64 ?= "aeb63de10514b28d35049f285ae9a371d6d5ccd2"
|
||||
SRCREV_machine:qemumips ?= "3740052e902e15416c22ce7f2544de7afe83a845"
|
||||
SRCREV_machine:qemuppc ?= "167c9e8d0e760cfb299408647efe46214fd06ac0"
|
||||
SRCREV_machine:qemuriscv64 ?= "f0d16a142e32a7934da39a12bd983a00e629bb48"
|
||||
SRCREV_machine:qemuriscv32 ?= "f0d16a142e32a7934da39a12bd983a00e629bb48"
|
||||
SRCREV_machine:qemux86 ?= "f0d16a142e32a7934da39a12bd983a00e629bb48"
|
||||
SRCREV_machine:qemux86-64 ?= "f0d16a142e32a7934da39a12bd983a00e629bb48"
|
||||
SRCREV_machine:qemumips64 ?= "d34e0789d8d5e0d7ab521889e80967edcac38dc6"
|
||||
SRCREV_machine ?= "f0d16a142e32a7934da39a12bd983a00e629bb48"
|
||||
SRCREV_meta ?= "7cdb56640a7854c921c292100445334745d5d534"
|
||||
SRCREV_machine:qemuarm ?= "8b286046b21b66a29e230ad7351b860b6aa2c550"
|
||||
SRCREV_machine:qemuarm64 ?= "fff468175b7b8245d6fc879838c5aa18ee14b4ed"
|
||||
SRCREV_machine:qemumips ?= "62db590dcb8639442872980bc2d25c0b671b52cf"
|
||||
SRCREV_machine:qemuppc ?= "c07fd78bfccea5b38cdeda707b3501b5b477175a"
|
||||
SRCREV_machine:qemuriscv64 ?= "62668d7a159c070de488aa68681641f59389b4cd"
|
||||
SRCREV_machine:qemuriscv32 ?= "62668d7a159c070de488aa68681641f59389b4cd"
|
||||
SRCREV_machine:qemux86 ?= "62668d7a159c070de488aa68681641f59389b4cd"
|
||||
SRCREV_machine:qemux86-64 ?= "62668d7a159c070de488aa68681641f59389b4cd"
|
||||
SRCREV_machine:qemumips64 ?= "519192c1b0ece4ee37c31977e62031aa8de75cfb"
|
||||
SRCREV_machine ?= "62668d7a159c070de488aa68681641f59389b4cd"
|
||||
SRCREV_meta ?= "6975e512fd99bccf35a7e257532b9c0eb134519b"
|
||||
|
||||
# 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 ?= "b925f60c6ee7ec871d2d48575d0fde3872129c20"
|
||||
SRCREV_machine:class-devupstream ?= "7e89efd3ae1cfa05fe918588a92628b9bbeda4b2"
|
||||
PN:class-devupstream = "linux-yocto-upstream"
|
||||
KBRANCH:class-devupstream = "v5.15/base"
|
||||
|
||||
@@ -39,7 +39,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
LINUX_VERSION ?= "5.15.157"
|
||||
LINUX_VERSION ?= "5.15.164"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -8,9 +8,12 @@ to follow upstream.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Note: Updated patch to cleanly apply to 2.13.14
|
||||
|
||||
Change-Id: I4ec94fb94d11712dd20f0680aea1de77fbfa9d17
|
||||
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
include/wrapper/{genhd.h => blkdev.h} | 10 +++++-----
|
||||
src/lttng-statedump-impl.c | 2 +-
|
||||
@@ -21,7 +24,7 @@ diff --git a/include/wrapper/genhd.h b/include/wrapper/blkdev.h
|
||||
similarity index 93%
|
||||
rename from include/wrapper/genhd.h
|
||||
rename to include/wrapper/blkdev.h
|
||||
index 4a59b68e..0d5ad90f 100644
|
||||
index e32c7b6..76397f6 100644
|
||||
--- a/include/wrapper/genhd.h
|
||||
+++ b/include/wrapper/blkdev.h
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -41,9 +44,9 @@ index 4a59b68e..0d5ad90f 100644
|
||||
+#ifndef _LTTNG_WRAPPER_BLKDEV_H
|
||||
+#define _LTTNG_WRAPPER_BLKDEV_H
|
||||
|
||||
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
|
||||
#include <linux/blkdev.h>
|
||||
@@ -45,7 +45,7 @@ struct class *wrapper_get_block_class(void)
|
||||
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) \
|
||||
|| LTTNG_RHEL_KERNEL_RANGE(5,14,0,162,0,0, 5,15,0,0,0,0))
|
||||
@@ -47,7 +47,7 @@ struct class *wrapper_get_block_class(void)
|
||||
/*
|
||||
* Canary function to check for 'block_class' at compile time.
|
||||
*
|
||||
@@ -52,17 +55,17 @@ index 4a59b68e..0d5ad90f 100644
|
||||
*
|
||||
* extern struct class block_class;
|
||||
*/
|
||||
@@ -104,4 +104,4 @@ struct device_type *wrapper_get_disk_type(void)
|
||||
@@ -106,4 +106,4 @@ struct device_type *wrapper_get_disk_type(void)
|
||||
|
||||
#endif
|
||||
|
||||
-#endif /* _LTTNG_WRAPPER_GENHD_H */
|
||||
+#endif /* _LTTNG_WRAPPER_BLKDEV_H */
|
||||
diff --git a/src/lttng-statedump-impl.c b/src/lttng-statedump-impl.c
|
||||
index 4d7b2921..0e753090 100644
|
||||
index 9d197ce..229517e 100644
|
||||
--- a/src/lttng-statedump-impl.c
|
||||
+++ b/src/lttng-statedump-impl.c
|
||||
@@ -41,7 +41,7 @@
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <wrapper/namespace.h>
|
||||
#include <wrapper/irq.h>
|
||||
#include <wrapper/tracepoint.h>
|
||||
@@ -72,5 +75,5 @@ index 4d7b2921..0e753090 100644
|
||||
#include <wrapper/fdtable.h>
|
||||
#include <wrapper/sched.h>
|
||||
--
|
||||
2.19.1
|
||||
2.35.7
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
|
||||
DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
|
||||
HOMEPAGE = "https://lttng.org/"
|
||||
LICENSE = "LGPL-2.1-only & GPL-2.0-only & MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=8d0d9f08888046474772a5d745d89d6a"
|
||||
|
||||
inherit module
|
||||
|
||||
@@ -16,7 +16,7 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
|
||||
# Use :append here so that the patch is applied also when using devupstream
|
||||
SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
|
||||
|
||||
SRC_URI[sha256sum] = "bf808b113544287cfe837a6382887fa66354ef5cc8216460cebbef3d27dc3581"
|
||||
SRC_URI[sha256sum] = "c6449f7ff12ab644a630692a556304e51525ca37d98aebf826796918be0f5da6"
|
||||
|
||||
export INSTALL_MOD_DIR="kernel/lttng-modules"
|
||||
|
||||
@@ -5,7 +5,7 @@ LICENSE = "ISC"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
|
||||
|
||||
SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
|
||||
SRC_URI[sha256sum] = "c8a61c9acf76fa7eb4239e89f640dee3e87098d9f69b4d3518c9c60fc6d20c55"
|
||||
SRC_URI[sha256sum] = "9832a14e1be24abff7be30dee3c9a1afb5fdfcf475a0d91aafef039f8d85f5eb"
|
||||
|
||||
inherit bin_package allarch
|
||||
|
||||
64
meta/recipes-multimedia/libtiff/tiff/CVE-2024-7006.patch
Normal file
64
meta/recipes-multimedia/libtiff/tiff/CVE-2024-7006.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
From 818fb8ce881cf839fbc710f6690aadb992aa0f9e Mon Sep 17 00:00:00 2001
|
||||
From: Su_Laus <sulau@freenet.de>
|
||||
Date: Fri, 1 Dec 2023 20:12:25 +0100
|
||||
Subject: [PATCH] Check return value of _TIFFCreateAnonField().
|
||||
|
||||
Fixes #624
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/818fb8ce881cf839fbc710f6690aadb992aa0f9e]
|
||||
CVE: CVE-2024-7006
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
libtiff/tif_dirinfo.c | 2 +-
|
||||
libtiff/tif_dirread.c | 15 ++++++---------
|
||||
2 files changed, 7 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
|
||||
index a212d01..95226a8 100644
|
||||
--- a/libtiff/tif_dirinfo.c
|
||||
+++ b/libtiff/tif_dirinfo.c
|
||||
@@ -797,7 +797,7 @@ _TIFFFindOrRegisterField(TIFF *tif, uint32_t tag, TIFFDataType dt)
|
||||
fld = TIFFFindField(tif, tag, dt);
|
||||
if (fld == NULL) {
|
||||
fld = _TIFFCreateAnonField(tif, tag, dt);
|
||||
- if (!_TIFFMergeFields(tif, fld, 1))
|
||||
+ if (fld == NULL || !_TIFFMergeFields(tif, fld, 1))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c
|
||||
index 0e283fc..1781166 100644
|
||||
--- a/libtiff/tif_dirread.c
|
||||
+++ b/libtiff/tif_dirread.c
|
||||
@@ -3735,11 +3735,9 @@ TIFFReadDirectory(TIFF* tif)
|
||||
dp->tdir_tag,dp->tdir_tag);
|
||||
/* the following knowingly leaks the
|
||||
anonymous field structure */
|
||||
- if (!_TIFFMergeFields(tif,
|
||||
- _TIFFCreateAnonField(tif,
|
||||
- dp->tdir_tag,
|
||||
- (TIFFDataType) dp->tdir_type),
|
||||
- 1)) {
|
||||
+ const TIFFField *fld = _TIFFCreateAnonField(
|
||||
+ tif, dp->tdir_tag, (TIFFDataType)dp->tdir_type);
|
||||
+ if (fld == NULL || !_TIFFMergeFields(tif, fld, 1)) {
|
||||
TIFFWarningExt(tif->tif_clientdata,
|
||||
module,
|
||||
"Registering anonymous field with tag %"PRIu16" (0x%"PRIx16") failed",
|
||||
@@ -4502,10 +4500,9 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff,
|
||||
TIFFWarningExt(tif->tif_clientdata, module,
|
||||
"Unknown field with tag %"PRIu16" (0x%"PRIx16") encountered",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
- if (!_TIFFMergeFields(tif, _TIFFCreateAnonField(tif,
|
||||
- dp->tdir_tag,
|
||||
- (TIFFDataType) dp->tdir_type),
|
||||
- 1)) {
|
||||
+ const TIFFField *fld = _TIFFCreateAnonField(
|
||||
+ tif, dp->tdir_tag, (TIFFDataType)dp->tdir_type);
|
||||
+ if (fld == NULL || !_TIFFMergeFields(tif, fld, 1)) {
|
||||
TIFFWarningExt(tif->tif_clientdata, module,
|
||||
"Registering anonymous field with tag %"PRIu16" (0x%"PRIx16") failed",
|
||||
dp->tdir_tag, dp->tdir_tag);
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -53,6 +53,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
|
||||
file://CVE-2023-6277-2.patch \
|
||||
file://CVE-2023-6277-3.patch \
|
||||
file://CVE-2023-6277-4.patch \
|
||||
file://CVE-2024-7006.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8"
|
||||
|
||||
@@ -34,7 +34,7 @@ index 3663220..dce9789 100644
|
||||
-#ifdef HAVE_SYS_MMAN_H
|
||||
-#include <sys/mman.h>
|
||||
-#endif
|
||||
- int main()
|
||||
- int main(int argc, const char *argv[])
|
||||
- {
|
||||
- int fd;
|
||||
- void *m;
|
||||
|
||||
@@ -24,7 +24,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
|
||||
file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "75e77cc86776c030c0a5c408dfbd0bf2a0b75eed5351e52d5439fa1e5509a43e"
|
||||
SRC_URI[sha256sum] = "cd0f5d52b9ab1704c72160c5ee3ed5d3d4ca2df4a7f8ab564e3cb352b67232f2"
|
||||
|
||||
inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script
|
||||
|
||||
66
meta/recipes-support/curl/curl/CVE-2024-7264_1.patch
Normal file
66
meta/recipes-support/curl/curl/CVE-2024-7264_1.patch
Normal file
@@ -0,0 +1,66 @@
|
||||
From 3c914bc680155b32178f1f15ca8d47c7f4640afe Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stenberg <daniel@haxx.se>
|
||||
Date: Tue, 30 Jul 2024 10:05:17 +0200
|
||||
Subject: [PATCH] x509asn1: clean up GTime2str
|
||||
|
||||
Co-authored-by: Stefan Eissing
|
||||
Reported-by: Dov Murik
|
||||
|
||||
Closes #14307
|
||||
|
||||
Note: This patch is needed by the main patch to be backported.
|
||||
|
||||
Upstream-Status: Backport from [https://github.com/curl/curl/commit/3c914bc680155b32178f1f15ca8d47c7f4640afe]
|
||||
CVE: CVE-2024-7264
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
lib/vtls/x509asn1.c | 23 ++++++++++++++---------
|
||||
1 file changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c
|
||||
index f64acb8..b538bd9 100644
|
||||
--- a/lib/vtls/x509asn1.c
|
||||
+++ b/lib/vtls/x509asn1.c
|
||||
@@ -539,7 +539,7 @@ static const char *GTime2str(const char *beg, const char *end)
|
||||
/* Convert an ASN.1 Generalized time to a printable string.
|
||||
Return the dynamically allocated string, or NULL if an error occurs. */
|
||||
|
||||
- for(fracp = beg; fracp < end && *fracp >= '0' && *fracp <= '9'; fracp++)
|
||||
+ for(fracp = beg; fracp < end && ISDIGIT(*fracp); fracp++)
|
||||
;
|
||||
|
||||
/* Get seconds digits. */
|
||||
@@ -558,17 +558,22 @@ static const char *GTime2str(const char *beg, const char *end)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- /* Scan for timezone, measure fractional seconds. */
|
||||
+ /* timezone follows optional fractional seconds. */
|
||||
tzp = fracp;
|
||||
- fracl = 0;
|
||||
+ fracl = 0; /* no fractional seconds detected so far */
|
||||
if(fracp < end && (*fracp == '.' || *fracp == ',')) {
|
||||
- fracp++;
|
||||
- do
|
||||
+ /* Have fractional seconds, e.g. "[.,]\d+". How many? */
|
||||
+ tzp = fracp++; /* should be a digit char or BAD ARGUMENT */
|
||||
+ while(tzp < end && ISDIGIT(*tzp))
|
||||
tzp++;
|
||||
- while(tzp < end && *tzp >= '0' && *tzp <= '9');
|
||||
- /* Strip leading zeroes in fractional seconds. */
|
||||
- for(fracl = tzp - fracp - 1; fracl && fracp[fracl - 1] == '0'; fracl--)
|
||||
- ;
|
||||
+ if(tzp == fracp) /* never looped, no digit after [.,] */
|
||||
+ return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
+ fracl = tzp - fracp - 1; /* number of fractional sec digits */
|
||||
+ DEBUGASSERT(fracl > 0);
|
||||
+ /* Strip trailing zeroes in fractional seconds.
|
||||
+ * May reduce fracl to 0 if only '0's are present. */
|
||||
+ while(fracl && fracp[fracl - 1] == '0')
|
||||
+ fracl--;
|
||||
}
|
||||
|
||||
/* Process timezone. */
|
||||
--
|
||||
2.35.7
|
||||
|
||||
320
meta/recipes-support/curl/curl/CVE-2024-7264_2.patch
Normal file
320
meta/recipes-support/curl/curl/CVE-2024-7264_2.patch
Normal file
@@ -0,0 +1,320 @@
|
||||
From 27959ecce75cdb2809c0bdb3286e60e08fadb519 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Eissing <stefan@eissing.org>
|
||||
Date: Tue, 30 Jul 2024 16:40:48 +0200
|
||||
Subject: [PATCH] x509asn1: unittests and fixes for gtime2str
|
||||
|
||||
Fix issues in GTime2str() and add unit test cases to verify correct
|
||||
behaviour.
|
||||
|
||||
Follow-up to 3c914bc6801
|
||||
|
||||
Closes #14316
|
||||
|
||||
Upstream-Status: Backport from [https://github.com/curl/curl/commit/27959ecce75cdb2809c0bdb3286e60e08fadb519]
|
||||
CVE: CVE-2024-7264
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
lib/vtls/x509asn1.c | 32 +++++++---
|
||||
lib/vtls/x509asn1.h | 11 ++++
|
||||
tests/data/Makefile.inc | 2 +-
|
||||
tests/data/test1656 | 22 +++++++
|
||||
tests/unit/Makefile.inc | 4 +-
|
||||
tests/unit/unit1656.c | 133 ++++++++++++++++++++++++++++++++++++++++
|
||||
6 files changed, 194 insertions(+), 10 deletions(-)
|
||||
create mode 100644 tests/data/test1656
|
||||
create mode 100644 tests/unit/unit1656.c
|
||||
|
||||
diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c
|
||||
index b538bd9..a25a6e6 100644
|
||||
--- a/lib/vtls/x509asn1.c
|
||||
+++ b/lib/vtls/x509asn1.c
|
||||
@@ -563,12 +563,13 @@ static const char *GTime2str(const char *beg, const char *end)
|
||||
fracl = 0; /* no fractional seconds detected so far */
|
||||
if(fracp < end && (*fracp == '.' || *fracp == ',')) {
|
||||
/* Have fractional seconds, e.g. "[.,]\d+". How many? */
|
||||
- tzp = fracp++; /* should be a digit char or BAD ARGUMENT */
|
||||
+ fracp++; /* should be a digit char or BAD ARGUMENT */
|
||||
+ tzp = fracp;
|
||||
while(tzp < end && ISDIGIT(*tzp))
|
||||
tzp++;
|
||||
if(tzp == fracp) /* never looped, no digit after [.,] */
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
- fracl = tzp - fracp - 1; /* number of fractional sec digits */
|
||||
+ fracl = tzp - fracp; /* number of fractional sec digits */
|
||||
DEBUGASSERT(fracl > 0);
|
||||
/* Strip trailing zeroes in fractional seconds.
|
||||
* May reduce fracl to 0 if only '0's are present. */
|
||||
@@ -577,18 +578,24 @@ static const char *GTime2str(const char *beg, const char *end)
|
||||
}
|
||||
|
||||
/* Process timezone. */
|
||||
- if(tzp >= end)
|
||||
- ; /* Nothing to do. */
|
||||
+ if(tzp >= end) {
|
||||
+ tzp = "";
|
||||
+ tzl = 0;
|
||||
+ }
|
||||
else if(*tzp == 'Z') {
|
||||
- tzp = " GMT";
|
||||
- end = tzp + 4;
|
||||
+ sep = " ";
|
||||
+ tzp = "GMT";
|
||||
+ tzl = 3;
|
||||
+ }
|
||||
+ else if((*tzp == '+') || (*tzp == '-')) {
|
||||
+ sep = " UTC";
|
||||
+ tzl = end - tzp;
|
||||
}
|
||||
else {
|
||||
sep = " ";
|
||||
- tzp++;
|
||||
+ tzl = end - tzp;
|
||||
}
|
||||
|
||||
- tzl = end - tzp;
|
||||
return curl_maprintf("%.4s-%.2s-%.2s %.2s:%.2s:%c%c%s%.*s%s%.*s",
|
||||
beg, beg + 4, beg + 6,
|
||||
beg + 8, beg + 10, sec1, sec2,
|
||||
@@ -596,6 +603,15 @@ static const char *GTime2str(const char *beg, const char *end)
|
||||
sep, (int)tzl, tzp);
|
||||
}
|
||||
|
||||
+#ifdef UNITTESTS
|
||||
+/* used by unit1656.c */
|
||||
+CURLcode Curl_x509_GTime2str(struct dynbuf *store,
|
||||
+ const char *beg, const char *end)
|
||||
+{
|
||||
+ return GTime2str(store, beg, end);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Convert an ASN.1 UTC time to a printable string.
|
||||
* Return the dynamically allocated string, or NULL if an error occurs.
|
||||
diff --git a/lib/vtls/x509asn1.h b/lib/vtls/x509asn1.h
|
||||
index db7df0e..515cb7e 100644
|
||||
--- a/lib/vtls/x509asn1.h
|
||||
+++ b/lib/vtls/x509asn1.h
|
||||
@@ -73,6 +73,17 @@ CURLcode Curl_extract_certinfo(struct Curl_easy *data, int certnum,
|
||||
const char *beg, const char *end);
|
||||
CURLcode Curl_verifyhost(struct Curl_easy *data, struct connectdata *conn,
|
||||
const char *beg, const char *end);
|
||||
+
|
||||
+#ifdef UNITTESTS
|
||||
+#if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \
|
||||
+ defined(USE_MBEDTLS)
|
||||
+
|
||||
+/* used by unit1656.c */
|
||||
+CURLcode Curl_x509_GTime2str(struct dynbuf *store,
|
||||
+ const char *beg, const char *end);
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
#endif /* USE_GSKIT or USE_NSS or USE_GNUTLS or USE_WOLFSSL or USE_SCHANNEL
|
||||
* or USE_SECTRANSP */
|
||||
#endif /* HEADER_CURL_X509ASN1_H */
|
||||
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
|
||||
index 47117b6..5415f37 100644
|
||||
--- a/tests/data/Makefile.inc
|
||||
+++ b/tests/data/Makefile.inc
|
||||
@@ -208,7 +208,7 @@ test1620 test1621 \
|
||||
\
|
||||
test1630 test1631 test1632 test1633 test1634 \
|
||||
\
|
||||
-test1650 test1651 test1652 test1653 test1654 test1655 \
|
||||
+test1650 test1651 test1652 test1653 test1654 test1655 test1656 \
|
||||
test1660 test1661 \
|
||||
\
|
||||
test1700 test1701 test1702 test1703 \
|
||||
diff --git a/tests/data/test1656 b/tests/data/test1656
|
||||
new file mode 100644
|
||||
index 0000000..2fab21b
|
||||
--- /dev/null
|
||||
+++ b/tests/data/test1656
|
||||
@@ -0,0 +1,22 @@
|
||||
+<testcase>
|
||||
+<info>
|
||||
+<keywords>
|
||||
+unittest
|
||||
+Curl_x509_GTime2str
|
||||
+</keywords>
|
||||
+</info>
|
||||
+
|
||||
+#
|
||||
+# Client-side
|
||||
+<client>
|
||||
+<server>
|
||||
+none
|
||||
+</server>
|
||||
+<features>
|
||||
+unittest
|
||||
+</features>
|
||||
+<name>
|
||||
+Curl_x509_GTime2str unit tests
|
||||
+</name>
|
||||
+</client>
|
||||
+</testcase>
|
||||
diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
|
||||
index 7e7844e..b5650b2 100644
|
||||
--- a/tests/unit/Makefile.inc
|
||||
+++ b/tests/unit/Makefile.inc
|
||||
@@ -34,7 +34,7 @@ UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
|
||||
unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607 \
|
||||
unit1608 unit1609 unit1610 unit1611 unit1612 \
|
||||
unit1620 unit1621 \
|
||||
- unit1650 unit1651 unit1652 unit1653 unit1654 unit1655 \
|
||||
+ unit1650 unit1651 unit1652 unit1653 unit1654 unit1655 unit1656 \
|
||||
unit1660 unit1661
|
||||
|
||||
unit1300_SOURCES = unit1300.c $(UNITFILES)
|
||||
@@ -155,6 +155,8 @@ unit1654_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
unit1655_SOURCES = unit1655.c $(UNITFILES)
|
||||
unit1655_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
|
||||
+unit1656_SOURCES = unit1656.c $(UNITFILES)
|
||||
+
|
||||
unit1660_SOURCES = unit1660.c $(UNITFILES)
|
||||
unit1660_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
|
||||
diff --git a/tests/unit/unit1656.c b/tests/unit/unit1656.c
|
||||
new file mode 100644
|
||||
index 0000000..644e72f
|
||||
--- /dev/null
|
||||
+++ b/tests/unit/unit1656.c
|
||||
@@ -0,0 +1,133 @@
|
||||
+/***************************************************************************
|
||||
+ * _ _ ____ _
|
||||
+ * Project ___| | | | _ \| |
|
||||
+ * / __| | | | |_) | |
|
||||
+ * | (__| |_| | _ <| |___
|
||||
+ * \___|\___/|_| \_\_____|
|
||||
+ *
|
||||
+ * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
+ *
|
||||
+ * This software is licensed as described in the file COPYING, which
|
||||
+ * you should have received as part of this distribution. The terms
|
||||
+ * are also available at https://curl.se/docs/copyright.html.
|
||||
+ *
|
||||
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
+ * copies of the Software, and permit persons to whom the Software is
|
||||
+ * furnished to do so, under the terms of the COPYING file.
|
||||
+ *
|
||||
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
+ * KIND, either express or implied.
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: curl
|
||||
+ *
|
||||
+ ***************************************************************************/
|
||||
+#include "curlcheck.h"
|
||||
+
|
||||
+#include "vtls/x509asn1.h"
|
||||
+
|
||||
+static CURLcode unit_setup(void)
|
||||
+{
|
||||
+ return CURLE_OK;
|
||||
+}
|
||||
+
|
||||
+static void unit_stop(void)
|
||||
+{
|
||||
+
|
||||
+}
|
||||
+
|
||||
+#if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \
|
||||
+ defined(USE_MBEDTLS)
|
||||
+
|
||||
+#ifndef ARRAYSIZE
|
||||
+#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
|
||||
+#endif
|
||||
+
|
||||
+struct test_spec {
|
||||
+ const char *input;
|
||||
+ const char *exp_output;
|
||||
+ CURLcode exp_result;
|
||||
+};
|
||||
+
|
||||
+static struct test_spec test_specs[] = {
|
||||
+ { "190321134340", "1903-21-13 43:40:00", CURLE_OK },
|
||||
+ { "", NULL, CURLE_BAD_FUNCTION_ARGUMENT },
|
||||
+ { "WTF", NULL, CURLE_BAD_FUNCTION_ARGUMENT },
|
||||
+ { "0WTF", NULL, CURLE_BAD_FUNCTION_ARGUMENT },
|
||||
+ { "19032113434", NULL, CURLE_BAD_FUNCTION_ARGUMENT },
|
||||
+ { "19032113434WTF", NULL, CURLE_BAD_FUNCTION_ARGUMENT },
|
||||
+ { "190321134340.", NULL, CURLE_BAD_FUNCTION_ARGUMENT },
|
||||
+ { "190321134340.1", "1903-21-13 43:40:00.1", CURLE_OK },
|
||||
+ { "19032113434017.0", "1903-21-13 43:40:17", CURLE_OK },
|
||||
+ { "19032113434017.01", "1903-21-13 43:40:17.01", CURLE_OK },
|
||||
+ { "19032113434003.001", "1903-21-13 43:40:03.001", CURLE_OK },
|
||||
+ { "19032113434003.090", "1903-21-13 43:40:03.09", CURLE_OK },
|
||||
+ { "190321134340Z", "1903-21-13 43:40:00 GMT", CURLE_OK },
|
||||
+ { "19032113434017.0Z", "1903-21-13 43:40:17 GMT", CURLE_OK },
|
||||
+ { "19032113434017.01Z", "1903-21-13 43:40:17.01 GMT", CURLE_OK },
|
||||
+ { "19032113434003.001Z", "1903-21-13 43:40:03.001 GMT", CURLE_OK },
|
||||
+ { "19032113434003.090Z", "1903-21-13 43:40:03.09 GMT", CURLE_OK },
|
||||
+ { "190321134340CET", "1903-21-13 43:40:00 CET", CURLE_OK },
|
||||
+ { "19032113434017.0CET", "1903-21-13 43:40:17 CET", CURLE_OK },
|
||||
+ { "19032113434017.01CET", "1903-21-13 43:40:17.01 CET", CURLE_OK },
|
||||
+ { "190321134340+02:30", "1903-21-13 43:40:00 UTC+02:30", CURLE_OK },
|
||||
+ { "19032113434017.0+02:30", "1903-21-13 43:40:17 UTC+02:30", CURLE_OK },
|
||||
+ { "19032113434017.01+02:30", "1903-21-13 43:40:17.01 UTC+02:30", CURLE_OK },
|
||||
+ { "190321134340-3", "1903-21-13 43:40:00 UTC-3", CURLE_OK },
|
||||
+ { "19032113434017.0-04", "1903-21-13 43:40:17 UTC-04", CURLE_OK },
|
||||
+ { "19032113434017.01-01:10", "1903-21-13 43:40:17.01 UTC-01:10", CURLE_OK },
|
||||
+};
|
||||
+
|
||||
+static bool do_test(struct test_spec *spec, size_t i, struct dynbuf *dbuf)
|
||||
+{
|
||||
+ CURLcode result;
|
||||
+ const char *in = spec->input;
|
||||
+
|
||||
+ Curl_dyn_reset(dbuf);
|
||||
+ result = Curl_x509_GTime2str(dbuf, in, in + strlen(in));
|
||||
+ if(result != spec->exp_result) {
|
||||
+ fprintf(stderr, "test %zu: expect result %d, got %d\n",
|
||||
+ i, spec->exp_result, result);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ else if(!result && strcmp(spec->exp_output, Curl_dyn_ptr(dbuf))) {
|
||||
+ fprintf(stderr, "test %zu: input '%s', expected output '%s', got '%s'\n",
|
||||
+ i, in, spec->exp_output, Curl_dyn_ptr(dbuf));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+UNITTEST_START
|
||||
+{
|
||||
+ size_t i;
|
||||
+ struct dynbuf dbuf;
|
||||
+ bool all_ok = TRUE;
|
||||
+
|
||||
+ Curl_dyn_init(&dbuf, 32*1024);
|
||||
+
|
||||
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
|
||||
+ fprintf(stderr, "curl_global_init() failed\n");
|
||||
+ return TEST_ERR_MAJOR_BAD;
|
||||
+ }
|
||||
+
|
||||
+ for(i = 0; i < ARRAYSIZE(test_specs); ++i) {
|
||||
+ if(!do_test(&test_specs[i], i, &dbuf))
|
||||
+ all_ok = FALSE;
|
||||
+ }
|
||||
+ fail_unless(all_ok, "some tests of Curl_x509_GTime2str() fails");
|
||||
+
|
||||
+ Curl_dyn_free(&dbuf);
|
||||
+ curl_global_cleanup();
|
||||
+}
|
||||
+UNITTEST_STOP
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+UNITTEST_START
|
||||
+{
|
||||
+ puts("not tested since Curl_x509_GTime2str() is not built-in");
|
||||
+}
|
||||
+UNITTEST_STOP
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -58,6 +58,8 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \
|
||||
file://CVE-2023-46219-0002.patch \
|
||||
file://CVE-2023-46219-0003.patch \
|
||||
file://CVE-2024-2398.patch \
|
||||
file://CVE-2024-7264_1.patch \
|
||||
file://CVE-2024-7264_2.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c"
|
||||
|
||||
@@ -66,6 +68,8 @@ CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl dan
|
||||
|
||||
# This CVE reports that apple had to upgrade curl because of other already reported CVEs
|
||||
CVE_CHECK_IGNORE += "CVE-2023-42915"
|
||||
# ignored: CURLOPT_SSL_VERIFYPEER was disabled on google cloud services causing a potential man in the middle attack
|
||||
CVE_CHECK_IGNORE += "CVE-2024-32928"
|
||||
|
||||
inherit autotools pkgconfig binconfig multilib_header
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From c41784deb1d4a923007ffe14cfa676f785808f45 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Wed, 21 Aug 2024 06:48:32 +0000
|
||||
Subject: [PATCH] meson.build: set c_std to gnu99
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Set c_std to gnu99 to avoid the following build failure with gcc 4.8:
|
||||
|
||||
In file included from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/resolv.h:65:0,
|
||||
from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/glib-2.0/gio/gnetworking.h:40,
|
||||
from ../libsoup/soup-address.c:14:
|
||||
/tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/arpa/nameser.h:115:2: error: unknown type name 'u_char'
|
||||
const u_char *_msg, *_eom;
|
||||
^
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/56b9cb987e25b99d6fed16c537552f47c3376f21
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/5c3d431bdb094c59997f2a23e31e83f815ab667c]
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Signed-off-by: guocai <guocai.he.cn@windriver.com>
|
||||
---
|
||||
meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 3cc56fb..506c5a4 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -2,7 +2,7 @@ project('libsoup', 'c',
|
||||
version: '2.74.2',
|
||||
meson_version : '>=0.50',
|
||||
license : 'LGPL2',
|
||||
- default_options : 'c_std=c99')
|
||||
+ default_options : 'c_std=gnu99')
|
||||
|
||||
gnome = import('gnome')
|
||||
|
||||
--
|
||||
2.35.5
|
||||
|
||||
@@ -11,7 +11,9 @@ DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl"
|
||||
|
||||
SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
|
||||
|
||||
SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
|
||||
SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
|
||||
file://0001-meson.build-set-c_std-to-gnu99.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159"
|
||||
|
||||
CVE_PRODUCT = "libsoup"
|
||||
|
||||
@@ -18,4 +18,9 @@ inherit autotools
|
||||
DISABLE_STATIC:class-nativesdk = ""
|
||||
DISABLE_STATIC:class-native = ""
|
||||
|
||||
# upstream-wontfix: Upstream thinks there is no working code that is exploitable - https://github.com/yaml/libyaml/issues/302
|
||||
CVE_CHECK_IGNORE += "CVE-2024-35326 CVE-2024-35328"
|
||||
# upstream-wontfix: Upstream thinks this is a misuse (or wrong use) of the libyaml API - https://github.com/yaml/libyaml/issues/303
|
||||
CVE_CHECK_IGNORE += "CVE-2024-35325"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
From 09f1652f36c5c4e8a6a640ce887f9ea0f48a7958 Mon Sep 17 00:00:00 2001
|
||||
From f388a0c44d2abdbd582686e511fef36c1b96ae43 Mon Sep 17 00:00:00 2001
|
||||
From: dan <Dan Kennedy>
|
||||
Date: Thu, 7 Sep 2023 13:53:09 +0000
|
||||
Subject: [PATCH] Fix a buffer overread in the sessions extension that could
|
||||
occur when processing a corrupt changeset.
|
||||
|
||||
Upstream-Status: Backport [https://sqlite.org/src/info/0e4e7a05c4204b47]
|
||||
CVE: CVE-2022-46908
|
||||
CVE: CVE-2023-7104
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
Signed-off-by: Vrushti Dabhi <vrushti.dabhi@einfochips.com>
|
||||
---
|
||||
sqlite3.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c
|
||||
index 9f862f2465..0491549231 100644
|
||||
diff --git a/sqlite3.c b/sqlite3.c
|
||||
index a16db27..0b979f7 100644
|
||||
--- a/sqlite3.c
|
||||
+++ b/sqlite3.c
|
||||
@@ -213482,15 +213482,19 @@ static int sessionReadRecord(
|
||||
|
||||
@@ -4,11 +4,11 @@ LICENSE = "PD"
|
||||
LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
|
||||
|
||||
SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz \
|
||||
file://0001-sqlite-Increased-the-size-of-loop-variables-in-the-printf-implementation.patch \
|
||||
file://CVE-2022-35737.patch \
|
||||
file://CVE-2022-46908.patch \
|
||||
file://CVE-2023-36191.patch \
|
||||
file://CVE-2023-7104.patch \
|
||||
"
|
||||
"
|
||||
SRC_URI[sha256sum] = "5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c"
|
||||
|
||||
# -19242 is only an issue in specific development branch commits
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 38de4bccdb8a861ffdd447f12fdab19d6d852c02 Mon Sep 17 00:00:00 2001
|
||||
From: Chong Lu <Chong.Lu@windriver.com>
|
||||
Date: Tue, 26 Jun 2018 17:34:15 +0800
|
||||
Subject: [PATCH] vim: add knob whether elf.h are checked
|
||||
|
||||
Previously, it still was checked when there was no elf library in sysroots directory.
|
||||
Add knob to decide whether elf.h are checked or not.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
src/configure.ac | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
Index: git/src/configure.ac
|
||||
===================================================================
|
||||
--- git.orig/src/configure.ac
|
||||
+++ git/src/configure.ac
|
||||
@@ -3264,11 +3264,18 @@ AC_TRY_COMPILE([#include <stdio.h>], [in
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
dnl Checks for header files.
|
||||
+AC_MSG_CHECKING(whether or not to look for elf.h)
|
||||
+AC_ARG_ENABLE(elf-check,
|
||||
+ [ --enable-elf-check If elfutils, check for elf.h [default=no]],
|
||||
+ , enable_elf_check="no")
|
||||
+AC_MSG_RESULT($enable_elf_check)
|
||||
+if test "x$enable_elf_check" != "xno"; then
|
||||
AC_CHECK_HEADER(elf.h, HAS_ELF=1)
|
||||
dnl AC_CHECK_HEADER(dwarf.h, SVR4=1)
|
||||
if test "$HAS_ELF" = 1; then
|
||||
AC_CHECK_LIB(elf, main)
|
||||
fi
|
||||
+fi
|
||||
|
||||
AC_HEADER_DIRENT
|
||||
|
||||
@@ -14,13 +14,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d1a651ab770b45d41c0f8cb5a8ca930e"
|
||||
|
||||
SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://disable_acl_header_check.patch \
|
||||
file://vim-add-knob-whether-elf.h-are-checked.patch \
|
||||
file://0001-src-Makefile-improve-reproducibility.patch \
|
||||
file://no-path-adjust.patch \
|
||||
"
|
||||
|
||||
PV .= ".2190"
|
||||
SRCREV = "6a950da86d7a6eb09d5ebeab17657986420d07ac"
|
||||
PV .= ".0682"
|
||||
SRCREV = "cb90ea9cba6f033fe141db0e466fb4117f28402b"
|
||||
|
||||
# Do not consider .z in x.y.z, as that is updated with every commit
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
|
||||
|
||||
Reference in New Issue
Block a user