mirror of
https://git.yoctoproject.org/poky
synced 2026-02-21 17:09:42 +01:00
Compare commits
71 Commits
kirkstone-
...
yocto-4.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
755632c2fc | ||
|
|
387d01b0a4 | ||
|
|
4761cbe1ee | ||
|
|
8a09f8472f | ||
|
|
82802901c6 | ||
|
|
f22a96e5cc | ||
|
|
3562768af7 | ||
|
|
6f84c60edf | ||
|
|
eadd5efcb3 | ||
|
|
e01044d629 | ||
|
|
079e50aba0 | ||
|
|
26ffdb7a30 | ||
|
|
1110f16718 | ||
|
|
8b75148d87 | ||
|
|
75b08b43a4 | ||
|
|
c4f28d9643 | ||
|
|
30be4f67cc | ||
|
|
75cd31f6d3 | ||
|
|
f5c3c374e8 | ||
|
|
93d2e547d1 | ||
|
|
31507dd07a | ||
|
|
82e76d21dc | ||
|
|
006b4b976c | ||
|
|
d6385a54cb | ||
|
|
acd993f24c | ||
|
|
98223b776a | ||
|
|
7057b7bb2b | ||
|
|
a76bc698c4 | ||
|
|
3e73216a32 | ||
|
|
239bf770b6 | ||
|
|
d1b9e2acaa | ||
|
|
51a2c26e29 | ||
|
|
f46bb8ad10 | ||
|
|
f007ad78dd | ||
|
|
24121f9699 | ||
|
|
f8a7dbd8fb | ||
|
|
8dc22248a8 | ||
|
|
b159ad2464 | ||
|
|
a2d67684cc | ||
|
|
fdd88b549f | ||
|
|
95795dff9b | ||
|
|
6c9f29507f | ||
|
|
942c66a9fb | ||
|
|
12643571ec | ||
|
|
9536f32528 | ||
|
|
e826f80436 | ||
|
|
f19d7f427e | ||
|
|
c8fa08b01c | ||
|
|
ecba5ff495 | ||
|
|
a7657ca5ff | ||
|
|
c771630e99 | ||
|
|
39aa7af59b | ||
|
|
2629c5fe89 | ||
|
|
517e513209 | ||
|
|
973020ce12 | ||
|
|
f2c0b5cef2 | ||
|
|
1867c0de35 | ||
|
|
24646e55b2 | ||
|
|
f9527fb2ac | ||
|
|
e447b4139f | ||
|
|
f60fb52055 | ||
|
|
2e3c89e255 | ||
|
|
9200c6b310 | ||
|
|
ae28221a40 | ||
|
|
4e227eaf1c | ||
|
|
9f0a8901d1 | ||
|
|
f9a95adda5 | ||
|
|
a171408008 | ||
|
|
8d57eddc82 | ||
|
|
2fc0a78176 | ||
|
|
0207478c7b |
@@ -36,9 +36,10 @@ if __name__ == "__main__":
|
||||
print("--flag only makes sense with --value")
|
||||
sys.exit(1)
|
||||
|
||||
with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not args.quiet) as tinfoil:
|
||||
quiet = args.quiet
|
||||
with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil:
|
||||
if args.recipe:
|
||||
tinfoil.prepare(quiet=2)
|
||||
tinfoil.prepare(quiet=3 if quiet else 2)
|
||||
d = tinfoil.parse_recipe(args.recipe)
|
||||
else:
|
||||
tinfoil.prepare(quiet=2, config_only=True)
|
||||
|
||||
@@ -234,9 +234,10 @@ class diskMonitor:
|
||||
freeInode = st.f_favail
|
||||
|
||||
if minInode and freeInode < minInode:
|
||||
# Some filesystems use dynamic inodes so can't run out
|
||||
# (e.g. btrfs). This is reported by the inode count being 0.
|
||||
if st.f_files == 0:
|
||||
# Some filesystems use dynamic inodes so can't run out.
|
||||
# This is reported by the inode count being 0 (btrfs) or the free
|
||||
# inode count being -1 (cephfs).
|
||||
if st.f_files == 0 or st.f_favail == -1:
|
||||
self.devDict[k][2] = None
|
||||
continue
|
||||
# Always show warning, the self.checked would always be False if the action is WARN
|
||||
|
||||
@@ -198,15 +198,27 @@ class RunQueueScheduler(object):
|
||||
curr_cpu_pressure = cpu_pressure_fds.readline().split()[4].split("=")[1]
|
||||
curr_io_pressure = io_pressure_fds.readline().split()[4].split("=")[1]
|
||||
curr_memory_pressure = memory_pressure_fds.readline().split()[4].split("=")[1]
|
||||
exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) > self.rq.max_cpu_pressure
|
||||
exceeds_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) > self.rq.max_io_pressure
|
||||
exceeds_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) > self.rq.max_memory_pressure
|
||||
now = time.time()
|
||||
if now - self.prev_pressure_time > 1.0:
|
||||
tdiff = now - self.prev_pressure_time
|
||||
psi_accumulation_interval = 1.0
|
||||
cpu_pressure = (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) / tdiff
|
||||
io_pressure = (float(curr_io_pressure) - float(self.prev_io_pressure)) / tdiff
|
||||
memory_pressure = (float(curr_memory_pressure) - float(self.prev_memory_pressure)) / tdiff
|
||||
exceeds_cpu_pressure = self.rq.max_cpu_pressure and cpu_pressure > self.rq.max_cpu_pressure
|
||||
exceeds_io_pressure = self.rq.max_io_pressure and io_pressure > self.rq.max_io_pressure
|
||||
exceeds_memory_pressure = self.rq.max_memory_pressure and memory_pressure > self.rq.max_memory_pressure
|
||||
|
||||
if tdiff > psi_accumulation_interval:
|
||||
self.prev_cpu_pressure = curr_cpu_pressure
|
||||
self.prev_io_pressure = curr_io_pressure
|
||||
self.prev_memory_pressure = curr_memory_pressure
|
||||
self.prev_pressure_time = now
|
||||
|
||||
pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure)
|
||||
pressure_values = (round(cpu_pressure,1), self.rq.max_cpu_pressure, round(io_pressure,1), self.rq.max_io_pressure, round(memory_pressure,1), self.rq.max_memory_pressure)
|
||||
if hasattr(self, "pressure_state") and pressure_state != self.pressure_state:
|
||||
bb.note("Pressure status changed to CPU: %s, IO: %s, Mem: %s (CPU: %s/%s, IO: %s/%s, Mem: %s/%s) - using %s/%s bitbake threads" % (pressure_state + pressure_values + (len(self.rq.runq_running.difference(self.rq.runq_complete)), self.rq.number_tasks)))
|
||||
self.pressure_state = pressure_state
|
||||
return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure)
|
||||
return False
|
||||
|
||||
@@ -1980,12 +1992,12 @@ class RunQueueExecute:
|
||||
# Allow the next deferred task to run. Any other deferred tasks should be deferred after that task.
|
||||
# We shouldn't allow all to run at once as it is prone to races.
|
||||
if not found:
|
||||
bb.note("Deferred task %s now buildable" % t)
|
||||
bb.debug(1, "Deferred task %s now buildable" % t)
|
||||
del self.sq_deferred[t]
|
||||
update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
|
||||
found = t
|
||||
else:
|
||||
bb.note("Deferring %s after %s" % (t, found))
|
||||
bb.debug(1, "Deferring %s after %s" % (t, found))
|
||||
self.sq_deferred[t] = found
|
||||
|
||||
def task_complete(self, task):
|
||||
@@ -2892,7 +2904,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
|
||||
sqdata.hashes[h] = tid
|
||||
else:
|
||||
sqrq.sq_deferred[tid] = sqdata.hashes[h]
|
||||
bb.note("Deferring %s after %s" % (tid, sqdata.hashes[h]))
|
||||
bb.debug(1, "Deferring %s after %s" % (tid, sqdata.hashes[h]))
|
||||
|
||||
update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
|
||||
|
||||
|
||||
@@ -324,11 +324,11 @@ class Tinfoil:
|
||||
self.recipes_parsed = False
|
||||
self.quiet = 0
|
||||
self.oldhandlers = self.logger.handlers[:]
|
||||
self.localhandlers = []
|
||||
if setup_logging:
|
||||
# This is the *client-side* logger, nothing to do with
|
||||
# logging messages from the server
|
||||
bb.msg.logger_create('BitBake', output)
|
||||
self.localhandlers = []
|
||||
for handler in self.logger.handlers:
|
||||
if handler not in self.oldhandlers:
|
||||
self.localhandlers.append(handler)
|
||||
|
||||
@@ -332,7 +332,7 @@ You can start the tests automatically or manually:
|
||||
bitbake core-image-sato
|
||||
|
||||
- *Manually running tests:* To manually run the tests, first globally
|
||||
inherit the :ref:`ref-classes-testimage*` class by editing your
|
||||
inherit the :ref:`ref-classes-testimage` class by editing your
|
||||
``local.conf`` file::
|
||||
|
||||
IMAGE_CLASSES += "testimage"
|
||||
|
||||
@@ -113,7 +113,7 @@ The following steps describe how to set up the AUH utility:
|
||||
``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in
|
||||
your :term:`Build Directory`.
|
||||
|
||||
- If you want to enable testing through the :ref:`ref-classes-testimage*`
|
||||
- If you want to enable testing through the :ref:`ref-classes-testimage`
|
||||
class, which is optional, you need to have the following set in
|
||||
your ``conf/local.conf`` file::
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ Automated Image Testing
|
||||
-----------------------
|
||||
|
||||
A new automated image testing framework has been added through the
|
||||
:ref:`ref-classes-testimage*` classes. This
|
||||
:ref:`ref-classes-testimage` classes. This
|
||||
framework replaces the older ``imagetest-qemu`` framework.
|
||||
|
||||
You can learn more about performing automated image tests in the
|
||||
|
||||
@@ -319,7 +319,7 @@ This section provides information about automatic testing changes:
|
||||
practices now dictate that you use the
|
||||
:term:`IMAGE_CLASSES` variable rather than the
|
||||
:term:`INHERIT` variable when you inherit the
|
||||
:ref:`testimage <ref-classes-testimage*>` and
|
||||
:ref:`testimage <ref-classes-testimage>` and
|
||||
:ref:`testsdk <ref-classes-testsdk>` classes used for automatic
|
||||
testing.
|
||||
|
||||
|
||||
@@ -20,3 +20,4 @@ Release 4.0 (kirkstone)
|
||||
release-notes-4.0.11
|
||||
release-notes-4.0.12
|
||||
release-notes-4.0.13
|
||||
release-notes-4.0.14
|
||||
|
||||
227
documentation/migration-guides/release-notes-4.0.14.rst
Normal file
227
documentation/migration-guides/release-notes-4.0.14.rst
Normal file
File diff suppressed because one or more lines are too long
@@ -1026,7 +1026,7 @@ processing includes creation of a manifest file and optimizations.
|
||||
The manifest file (``.manifest``) resides in the same directory as the
|
||||
root filesystem image. This file lists out, line-by-line, the installed
|
||||
packages. The manifest file is useful for the
|
||||
:ref:`testimage <ref-classes-testimage*>` class,
|
||||
:ref:`testimage <ref-classes-testimage>` class,
|
||||
for example, to determine whether or not to run specific tests. See the
|
||||
:term:`IMAGE_MANIFEST`
|
||||
variable for additional information.
|
||||
@@ -2230,3 +2230,173 @@ For more information, see the
|
||||
BitBake User Manual. You can also reference the "`Why Not
|
||||
Fakeroot? <https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot>`__"
|
||||
article for background information on Fakeroot and Pseudo.
|
||||
|
||||
BitBake Tasks Map
|
||||
=================
|
||||
|
||||
To understand how BitBake operates in the build directory and environment
|
||||
we can consider the following recipes and diagram, to have full picture
|
||||
about the tasks that BitBake runs to generate the final package file
|
||||
for the recipe.
|
||||
|
||||
We will have two recipes as an example:
|
||||
|
||||
- ``libhello``: A recipe that provides a shared library
|
||||
- ``sayhello``: A recipe that uses ``libhello`` library to do its job
|
||||
|
||||
.. note::
|
||||
|
||||
``sayhello`` depends on ``libhello`` at compile time as it needs the shared
|
||||
library to do the dynamic linking process. It also depends on it at runtime
|
||||
as the shared library loader needs to find the library.
|
||||
For more details about dependencies check :ref:`ref-varlocality-recipe-dependencies`.
|
||||
|
||||
``libhello`` sources are as follows:
|
||||
|
||||
- ``LICENSE``: This is the license associated with this library
|
||||
- ``Makefile``: The file used by ``make`` to build the library
|
||||
- ``hellolib.c``: The implementation of the library
|
||||
- ``hellolib.h``: The C header of the library
|
||||
|
||||
``sayhello`` sources are as follows:
|
||||
|
||||
- ``LICENSE``: This is the license associated with this project
|
||||
- ``Makefile``: The file used by ``make`` to build the project
|
||||
- ``sayhello.c``: The source file of the project
|
||||
|
||||
Before presenting the contents of each file, here are the steps
|
||||
that we need to follow to accomplish what we want in the first place,
|
||||
which is integrating ``sayhello`` in our root file system:
|
||||
|
||||
#. Create a Git repository for each project with the corresponding files
|
||||
|
||||
#. Create a recipe for each project
|
||||
|
||||
#. Make sure that ``sayhello`` recipe :term:`DEPENDS` on ``libhello``
|
||||
|
||||
#. Make sure that ``sayhello`` recipe :term:`RDEPENDS` on ``libhello``
|
||||
|
||||
#. Add ``sayhello`` to :term:`IMAGE_INSTALL` to integrate it into
|
||||
the root file system
|
||||
|
||||
The following are the contents of ``libhello/Makefile``::
|
||||
|
||||
LIB=libhello.so
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
$(LIB): hellolib.o
|
||||
$(CC) $< -Wl,-soname,$(LIB).1 -fPIC $(LDFLAGS) -shared -o $(LIB).1.0
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $<
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.so*
|
||||
|
||||
.. note::
|
||||
|
||||
When creating shared libraries, it is strongly recommended to follow the Linux
|
||||
conventions and guidelines (see `this article
|
||||
<https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html>`__
|
||||
for some background).
|
||||
|
||||
.. note::
|
||||
|
||||
When creating ``Makefile`` files, it is strongly recommended to use ``CC``, ``LDFLAGS``
|
||||
and ``CFLAGS`` as BitBake will set them as environment variables according
|
||||
to your build configuration.
|
||||
|
||||
The following are the contents of ``libhello/hellolib.h``::
|
||||
|
||||
#ifndef HELLOLIB_H
|
||||
#define HELLOLIB_H
|
||||
|
||||
void Hello();
|
||||
|
||||
#endif
|
||||
|
||||
The following are the contents of ``libhello/hellolib.c``::
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void Hello(){
|
||||
puts("Hello from a Yocto demo \n");
|
||||
}
|
||||
|
||||
The following are the contents of ``sayhello/Makefile``::
|
||||
|
||||
EXEC=sayhello
|
||||
LDFLAGS += -lhello
|
||||
|
||||
all: $(EXEC)
|
||||
|
||||
$(EXEC): sayhello.c
|
||||
$(CC) $< $(LDFLAGS) $(CFLAGS) -o $(EXEC)
|
||||
|
||||
clean:
|
||||
rm -rf $(EXEC) *.o
|
||||
|
||||
The following are the contents of ``sayhello/sayhello.c``::
|
||||
|
||||
#include <hellolib.h>
|
||||
|
||||
int main(){
|
||||
Hello();
|
||||
return 0;
|
||||
}
|
||||
|
||||
The following are the contents of ``libhello_0.1.bb``::
|
||||
|
||||
SUMMARY = "Hello demo library"
|
||||
DESCRIPTION = "Hello shared library used in Yocto demo"
|
||||
|
||||
# NOTE: Set the License according to the LICENSE file of your project
|
||||
# and then add LIC_FILES_CHKSUM accordingly
|
||||
LICENSE = "CLOSED"
|
||||
|
||||
# Assuming the branch is main
|
||||
# Change <username> accordingly
|
||||
SRC_URI = "git://github.com/<username>/libhello;branch=main;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_install(){
|
||||
install -d ${D}${includedir}
|
||||
install -d ${D}${libdir}
|
||||
|
||||
install hellolib.h ${D}${includedir}
|
||||
oe_soinstall ${PN}.so.${PV} ${D}${libdir}
|
||||
}
|
||||
|
||||
The following are the contents of ``sayhello_0.1.bb``::
|
||||
|
||||
SUMMARY = "SayHello demo"
|
||||
DESCRIPTION = "SayHello project used in Yocto demo"
|
||||
|
||||
# NOTE: Set the License according to the LICENSE file of your project
|
||||
# and then add LIC_FILES_CHKSUM accordingly
|
||||
LICENSE = "CLOSED"
|
||||
|
||||
# Assuming the branch is main
|
||||
# Change <username> accordingly
|
||||
SRC_URI = "git://github.com/<username>/sayhello;branch=main;protocol=https"
|
||||
|
||||
DEPENDS += "libhello"
|
||||
RDEPENDS:${PN} += "libhello"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_install(){
|
||||
install -d ${D}/usr/bin
|
||||
install -m 0700 sayhello ${D}/usr/bin
|
||||
}
|
||||
|
||||
After placing the recipes in a custom layer we can run ``bitbake sayhello``
|
||||
to build the recipe.
|
||||
|
||||
The following diagram shows the sequences of tasks that BitBake
|
||||
executes to accomplish that.
|
||||
|
||||
.. image:: svg/bitbake_tasks_map.*
|
||||
:width: 100%
|
||||
|
||||
4
documentation/overview-manual/svg/bitbake_tasks_map.svg
Normal file
4
documentation/overview-manual/svg/bitbake_tasks_map.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 197 KiB |
File diff suppressed because it is too large
Load Diff
@@ -163,7 +163,7 @@ consists of the following pieces:
|
||||
an ARM target, did the build produce ARM binaries. If, for example,
|
||||
the build produced PPC binaries then there is a problem.
|
||||
|
||||
- :ref:`ref-classes-testimage*`: This class
|
||||
- :ref:`ref-classes-testimage`: This class
|
||||
performs runtime testing of images after they are built. The tests
|
||||
are usually used with :doc:`QEMU </dev-manual/qemu>`
|
||||
to boot the images and check the combined runtime result boot
|
||||
|
||||
@@ -2101,6 +2101,18 @@ system and gives an overview of their function and contents.
|
||||
For information on policies and on how to use this variable, see the
|
||||
comments in the ``meta/classes/compress_doc.bbclass`` file.
|
||||
|
||||
:term:`DT_FILES_PATH`
|
||||
When compiling out-of-tree device tree sources using a recipe that
|
||||
inherits the :ref:`ref-classes-devicetree` class, this variable specifies
|
||||
the path to the directory containing dts files to build.
|
||||
|
||||
Defaults to the :term:`S` directory.
|
||||
|
||||
:term:`DT_PADDING_SIZE`
|
||||
When inheriting the :ref:`ref-classes-devicetree` class, this variable
|
||||
specifies the size of padding appended to the device tree blob, used as
|
||||
extra space typically for additional properties during boot.
|
||||
|
||||
:term:`EFI_PROVIDER`
|
||||
When building bootable images (i.e. where ``hddimg``, ``iso``, or
|
||||
``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
|
||||
@@ -2860,6 +2872,73 @@ system and gives an overview of their function and contents.
|
||||
|
||||
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
|
||||
|
||||
:term:`GO_IMPORT`
|
||||
When inheriting the :ref:`ref-classes-go` class, this mandatory variable
|
||||
sets the import path for the Go package that will be created for the code
|
||||
to build. If you have a ``go.mod`` file in the source directory, this
|
||||
typically matches the path in the ``module`` line in this file.
|
||||
|
||||
Other Go programs importing this package will use this path.
|
||||
|
||||
Here is an example setting from the
|
||||
:yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
|
||||
recipe::
|
||||
|
||||
GO_IMPORT = "golang.org/x/example"
|
||||
|
||||
:term:`GO_INSTALL`
|
||||
When inheriting the :ref:`ref-classes-go` class, this optional variable
|
||||
specifies which packages in the sources should be compiled and
|
||||
installed in the Go build space by the
|
||||
`go install <https://go.dev/ref/mod#go-install>`__ command.
|
||||
|
||||
Here is an example setting from the
|
||||
:oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>`
|
||||
recipe::
|
||||
|
||||
GO_INSTALL = "\
|
||||
${GO_IMPORT}/cmd/crucible \
|
||||
${GO_IMPORT}/cmd/habtool \
|
||||
"
|
||||
|
||||
By default, :term:`GO_INSTALL` is defined as::
|
||||
|
||||
GO_INSTALL ?= "${GO_IMPORT}/..."
|
||||
|
||||
The ``...`` wildcard means that it will catch all
|
||||
packages found in the sources.
|
||||
|
||||
See the :term:`GO_INSTALL_FILTEROUT` variable for
|
||||
filtering out unwanted packages from the ones
|
||||
found from the :term:`GO_INSTALL` value.
|
||||
|
||||
:term:`GO_INSTALL_FILTEROUT`
|
||||
When using the Go "vendor" mechanism to bring in dependencies for a Go
|
||||
package, the default :term:`GO_INSTALL` setting, which uses the ``...``
|
||||
wildcard, will include the vendored packages in the build, which produces
|
||||
incorrect results.
|
||||
|
||||
There are also some Go packages that are structured poorly, so that the
|
||||
``...`` wildcard results in building example or test code that should not
|
||||
be included in the build, or could fail to build.
|
||||
|
||||
This optional variable allows for filtering out a subset of the sources.
|
||||
It defaults to excluding everything under the ``vendor`` subdirectory
|
||||
under package's main directory. This is the normal location for vendored
|
||||
packages, but it can be overridden by a recipe to filter out other
|
||||
subdirectories if needed.
|
||||
|
||||
:term:`GO_WORKDIR`
|
||||
When using Go Modules, the current working directory must be the directory
|
||||
containing the ``go.mod`` file, or one of its subdirectories. When the
|
||||
``go`` tool is used, it will automatically look for the ``go.mod`` file
|
||||
in the Go working directory or in any parent directory, but not in
|
||||
subdirectories.
|
||||
|
||||
When using the :ref:`ref-classes-go-mod` class to use Go modules,
|
||||
the optional :term:`GO_WORKDIR` variable, defaulting to the value
|
||||
of :term:`GO_IMPORT`, allows to specify a different Go working directory.
|
||||
|
||||
:term:`GROUPADD_PARAM`
|
||||
When inheriting the :ref:`useradd <ref-classes-useradd>` class,
|
||||
this variable specifies for a package what parameters should be
|
||||
@@ -3128,17 +3207,23 @@ system and gives an overview of their function and contents.
|
||||
material for Wic is located in the
|
||||
":doc:`/ref-manual/kickstart`" chapter.
|
||||
|
||||
:term:`IMAGE_BUILDINFO_FILE`
|
||||
When using the :ref:`ref-classes-image-buildinfo` class,
|
||||
specifies the file in the image to write the build information into. The
|
||||
default value is "``${sysconfdir}/buildinfo``".
|
||||
|
||||
:term:`IMAGE_BUILDINFO_VARS`
|
||||
When using the :ref:`ref-classes-image-buildinfo` class,
|
||||
specifies the list of variables to include in the `Build Configuration`
|
||||
section of the output file (as a space-separated list). Defaults to
|
||||
":term:`DISTRO` :term:`DISTRO_VERSION`".
|
||||
|
||||
:term:`IMAGE_CLASSES`
|
||||
A list of classes that all images should inherit. You typically use
|
||||
this variable to specify the list of classes that register the
|
||||
different types of images the OpenEmbedded build system creates.
|
||||
A list of classes that all images should inherit. This is typically used
|
||||
to enable functionality across all image recipes.
|
||||
|
||||
The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
|
||||
set this variable in your ``local.conf`` or in a distribution
|
||||
configuration file.
|
||||
|
||||
For more information, see ``meta/classes/image_types.bbclass`` in the
|
||||
:term:`Source Directory`.
|
||||
Classes specified in :term:`IMAGE_CLASSES` must be located in the
|
||||
``classes-recipe/`` or ``classes/`` subdirectories.
|
||||
|
||||
:term:`IMAGE_CMD`
|
||||
Specifies the command to create the image file for a specific image
|
||||
@@ -4115,9 +4200,18 @@ system and gives an overview of their function and contents.
|
||||
There is legacy support for specifying the full path to the device
|
||||
tree. However, providing just the ``.dtb`` file is preferred.
|
||||
|
||||
In order to use this variable, the
|
||||
:ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
|
||||
be inherited.
|
||||
In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
|
||||
class must be inherited.
|
||||
|
||||
:term:`KERNEL_DEVICETREE_BUNDLE`
|
||||
When set to "1", this variable allows to bundle the Linux kernel
|
||||
and the Device Tree Binary together in a single file.
|
||||
|
||||
This feature is currently only supported on the "arm" (32 bit)
|
||||
architecture.
|
||||
|
||||
This variable is set to "0" by default by the
|
||||
:ref:`ref-classes-kernel-devicetree` class.
|
||||
|
||||
:term:`KERNEL_DTB_LINK_NAME`
|
||||
The link name of the kernel device tree binary (DTB). This variable
|
||||
@@ -4142,10 +4236,25 @@ system and gives an overview of their function and contents.
|
||||
|
||||
KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
||||
|
||||
The value of the :term:`KERNEL_ARTIFACT_NAME`
|
||||
variable, which is set in the same file, has the following value::
|
||||
See :term:`KERNEL_ARTIFACT_NAME` for additional information.
|
||||
|
||||
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
|
||||
|
||||
:term:`KERNEL_DTBDEST`
|
||||
This variable, used by the :ref:`ref-classes-kernel-devicetree`
|
||||
class, allows to change the installation directory of the DTB
|
||||
(Device Tree Binary) files.
|
||||
|
||||
It is set by default to "${KERNEL_IMAGEDEST}" by the
|
||||
:ref:`ref-classes-kernel` class.
|
||||
|
||||
:term:`KERNEL_DTBVENDORED`
|
||||
This variable, used by the :ref:`ref-classes-kernel-devicetree`,
|
||||
allows to ignore vendor subdirectories when installing DTB
|
||||
(Device Tree Binary) files, when it is set to "false".
|
||||
|
||||
To keep vendor subdirectories, set this variable to "true".
|
||||
|
||||
It is set by default to "false" by the :ref:`ref-classes-kernel` class.
|
||||
|
||||
:term:`KERNEL_DTC_FLAGS`
|
||||
Specifies the ``dtc`` flags that are passed to the Linux kernel build
|
||||
@@ -4260,9 +4369,12 @@ system and gives an overview of their function and contents.
|
||||
when building the kernel and is passed to ``make`` as the target to
|
||||
build.
|
||||
|
||||
If you want to build an alternate kernel image type in addition to that
|
||||
specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
|
||||
variable.
|
||||
To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
|
||||
|
||||
:term:`KERNEL_IMAGETYPES`
|
||||
Lists additional types of kernel images to build for a device in addition
|
||||
to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
|
||||
machine configuration files.
|
||||
|
||||
:term:`KERNEL_MODULE_AUTOLOAD`
|
||||
Lists kernel modules that need to be auto-loaded during boot.
|
||||
@@ -4300,6 +4412,14 @@ system and gives an overview of their function and contents.
|
||||
provide those module configurations, see the
|
||||
:term:`module_conf_* <module_conf>` variable.
|
||||
|
||||
:term:`KERNEL_PACKAGE_NAME`
|
||||
Specifies the base name of the kernel packages, such as "kernel"
|
||||
in the kernel packages such as "kernel-modules", "kernel-image" and
|
||||
"kernel-dbg".
|
||||
|
||||
The default value for this variable is set to "kernel" by the
|
||||
:ref:`ref-classes-kernel` class.
|
||||
|
||||
:term:`KERNEL_PATH`
|
||||
The location of the kernel sources. This variable is set to the value
|
||||
of the :term:`STAGING_KERNEL_DIR` within
|
||||
@@ -5142,6 +5262,16 @@ system and gives an overview of their function and contents.
|
||||
:term:`Source Directory` for details on how this class
|
||||
applies these additional sed command arguments.
|
||||
|
||||
:term:`OECMAKE_GENERATOR`
|
||||
A variable for the :ref:`ref-classes-cmake` class, allowing to choose
|
||||
which back-end will be generated by CMake to build an application.
|
||||
|
||||
By default, this variable is set to ``Ninja``, which is faster than GNU
|
||||
make, but if building is broken with Ninja, a recipe can use this
|
||||
variable to use GNU make instead::
|
||||
|
||||
OECMAKE_GENERATOR = "Unix Makefiles"
|
||||
|
||||
:term:`OE_IMPORTS`
|
||||
An internal variable used to tell the OpenEmbedded build system what
|
||||
Python modules to import for every Python function run by the system.
|
||||
@@ -5185,6 +5315,20 @@ system and gives an overview of their function and contents.
|
||||
For additional information on how this variable is used, see the
|
||||
initialization script.
|
||||
|
||||
:term:`OEQA_REPRODUCIBLE_TEST_PACKAGE`
|
||||
Set the package manager(s) for build reproducibility testing.
|
||||
See :yocto_git:`reproducible.py </poky/tree/meta/lib/oeqa/selftest/cases/reproducible.py>`
|
||||
and :doc:`/test-manual/reproducible-builds`.
|
||||
|
||||
:term:`OEQA_REPRODUCIBLE_TEST_TARGET`
|
||||
Set build target for build reproducibility testing. By default
|
||||
all available recipes are compiled with "bitbake world", see also :term:`EXCLUDE_FROM_WORLD`
|
||||
and :doc:`/test-manual/reproducible-builds`.
|
||||
|
||||
:term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS`
|
||||
Set build targets which can be rebuilt using :ref:`shared state <overview-manual/concepts:shared state cache>`
|
||||
when running build reproducibility tests. See :doc:`/test-manual/reproducible-builds`.
|
||||
|
||||
:term:`OLDEST_KERNEL`
|
||||
Declares the oldest version of the Linux kernel that the produced
|
||||
binaries must support. This variable is passed into the build of the
|
||||
@@ -6449,6 +6593,22 @@ system and gives an overview of their function and contents.
|
||||
BitBake User Manual for additional information on tasks and
|
||||
dependencies.
|
||||
|
||||
:term:`RECIPE_MAINTAINER`
|
||||
This variable defines the name and e-mail address of the maintainer of a
|
||||
recipe. Such information can be used by human users submitted changes,
|
||||
and by automated tools to send notifications, for example about
|
||||
vulnerabilities or source updates.
|
||||
|
||||
The variable can be defined in a global distribution :oe_git:`maintainers.inc
|
||||
</openembedded-core/tree/meta/conf/distro/include/maintainers.inc>` file::
|
||||
|
||||
meta/conf/distro/include/maintainers.inc:RECIPE_MAINTAINER:pn-sysvinit = "Ross Burton <ross.burton@arm.com>"
|
||||
|
||||
It can also be directly defined in a recipe,
|
||||
for example in the ``libgpiod`` one::
|
||||
|
||||
RECIPE_MAINTAINER = "Bartosz Golaszewski <brgl@bgdev.pl>"
|
||||
|
||||
:term:`RECIPE_NO_UPDATE_REASON`
|
||||
If a recipe should not be replaced by a more recent upstream version,
|
||||
putting the reason why in this variable in a recipe allows
|
||||
@@ -6850,13 +7010,16 @@ system and gives an overview of their function and contents.
|
||||
:term:`SDK_EXT_TYPE` is set to "full".
|
||||
|
||||
:term:`SDK_NAME`
|
||||
The base name for SDK output files. The name is derived from the
|
||||
:term:`DISTRO`, :term:`TCLIBC`,
|
||||
:term:`SDK_ARCH`,
|
||||
:term:`IMAGE_BASENAME`, and
|
||||
:term:`TUNE_PKGARCH` variables::
|
||||
The base name for SDK output files. The default value (as set in
|
||||
``meta-poky/conf/distro/poky.conf``) is derived from the
|
||||
:term:`DISTRO`,
|
||||
:term:`TCLIBC`,
|
||||
:term:`SDKMACHINE`,
|
||||
:term:`IMAGE_BASENAME`,
|
||||
:term:`TUNE_PKGARCH`, and
|
||||
:term:`MACHINE` variables::
|
||||
|
||||
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
|
||||
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
|
||||
|
||||
:term:`SDK_OS`
|
||||
Specifies the operating system for which the SDK will be built. The
|
||||
@@ -7387,6 +7550,38 @@ system and gives an overview of their function and contents.
|
||||
section in the Yocto Project Board Support Package Developer's Guide
|
||||
for additional information.
|
||||
|
||||
:term:`SPL_MKIMAGE_DTCOPTS`
|
||||
Options for the device tree compiler passed to ``mkimage -D`` feature
|
||||
while creating a FIT image with the :ref:`ref-classes-uboot-sign`
|
||||
class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the
|
||||
:ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option
|
||||
to ``mkimage``.
|
||||
|
||||
The default value is set to "" by the :ref:`ref-classes-uboot-config`
|
||||
class.
|
||||
|
||||
:term:`SPL_SIGN_ENABLE`
|
||||
Enable signing of the U-Boot FIT image. The default value is "0".
|
||||
This variable is used by the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`SPL_SIGN_KEYDIR`
|
||||
Location of the directory containing the RSA key and certificate used for
|
||||
signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign`
|
||||
class.
|
||||
|
||||
:term:`SPL_SIGN_KEYNAME`
|
||||
The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
|
||||
for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR`
|
||||
directory. If we have for example a ``dev.key`` key and a ``dev.crt``
|
||||
certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will
|
||||
have to set :term:`SPL_SIGN_KEYNAME` to ``dev``.
|
||||
|
||||
:term:`SPLASH`
|
||||
This variable, used by the :ref:`ref-classes-image` class, allows
|
||||
to choose splashscreen applications. Set it to the names of packages
|
||||
for such applications to use. This variable is set by default to
|
||||
``psplash``.
|
||||
|
||||
:term:`SPLASH_IMAGES`
|
||||
This variable, used by the ``psplash`` recipe, allows to customize
|
||||
the default splashscreen image.
|
||||
@@ -7605,6 +7800,16 @@ system and gives an overview of their function and contents.
|
||||
file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
|
||||
file://.* file:///some-local-dir/sstate/PATH"
|
||||
|
||||
The Yocto Project actually shares the cache data objects built by its
|
||||
autobuilder::
|
||||
|
||||
SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
|
||||
|
||||
As such binary artifacts are built for the generic QEMU machines
|
||||
supported by the various Poky releases, they are less likely to be
|
||||
reusable in real projects building binaries optimized for a specific
|
||||
CPU family.
|
||||
|
||||
:term:`SSTATE_SCAN_FILES`
|
||||
Controls the list of files the OpenEmbedded build system scans for
|
||||
hardcoded installation paths. The variable uses a space-separated
|
||||
@@ -8472,7 +8677,7 @@ system and gives an overview of their function and contents.
|
||||
on enabling, running, and writing these tests, see the
|
||||
":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
|
||||
section in the Yocto Project Development Tasks Manual and the
|
||||
":ref:`ref-classes-testimage*`" section.
|
||||
":ref:`ref-classes-testimage`" section.
|
||||
|
||||
:term:`THISDIR`
|
||||
The directory in which the file BitBake is currently parsing is
|
||||
@@ -8756,6 +8961,64 @@ system and gives an overview of their function and contents.
|
||||
creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
|
||||
command-line parameter to the ``uboot-mkimage`` utility.
|
||||
|
||||
:term:`UBOOT_FIT_DESC`
|
||||
Specifies the description string encoded into a U-Boot fitImage. The default
|
||||
value is set by the :ref:`ref-classes-uboot-sign` class as follows::
|
||||
|
||||
UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
|
||||
|
||||
:term:`UBOOT_FIT_GENERATE_KEYS`
|
||||
Decides whether to generate the keys for signing the U-Boot fitImage if
|
||||
they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`.
|
||||
The default value is "0".
|
||||
|
||||
Enable this as follows::
|
||||
|
||||
UBOOT_FIT_GENERATE_KEYS = "1"
|
||||
|
||||
This variable is used in the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_HASH_ALG`
|
||||
Specifies the hash algorithm used in creating the U-Boot FIT Image.
|
||||
It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign`
|
||||
class.
|
||||
|
||||
:term:`UBOOT_FIT_KEY_GENRSA_ARGS`
|
||||
Arguments to ``openssl genrsa`` for generating a RSA private key for
|
||||
signing the U-Boot FIT image. The default value of this variable
|
||||
is set to "-F4" by the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_KEY_REQ_ARGS`
|
||||
Arguments to ``openssl req`` for generating a certificate for signing
|
||||
the U-Boot FIT image. The default value is "-batch -new" by the
|
||||
:ref:`ref-classes-uboot-sign` class, "batch" for
|
||||
non interactive mode and "new" for generating new keys.
|
||||
|
||||
:term:`UBOOT_FIT_KEY_SIGN_PKCS`
|
||||
Format for the public key certificate used for signing the U-Boot FIT
|
||||
image. The default value is set to "x509" by the
|
||||
:ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_SIGN_ALG`
|
||||
Specifies the signature algorithm used in creating the U-Boot FIT Image.
|
||||
This variable is set by default to "rsa2048" by the
|
||||
:ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_SIGN_NUMBITS`
|
||||
Size of the private key used in signing the U-Boot FIT image, in number
|
||||
of bits. The default value for this variable is set to "2048"
|
||||
by the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FITIMAGE_ENABLE`
|
||||
This variable allows to generate a FIT image for U-Boot, which is one
|
||||
of the ways to implement a verified boot process.
|
||||
|
||||
Its default value is "0", so set it to "1" to enable this functionality::
|
||||
|
||||
UBOOT_FITIMAGE_ENABLE = "1"
|
||||
|
||||
See the :ref:`ref-classes-uboot-sign` class for details.
|
||||
|
||||
:term:`UBOOT_LOADADDRESS`
|
||||
Specifies the load address for the U-Boot image. During U-Boot image
|
||||
creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
|
||||
|
||||
@@ -41,44 +41,6 @@ functionality.
|
||||
Installing the Extensible SDK
|
||||
=============================
|
||||
|
||||
Two ways to install the Extensible SDK
|
||||
--------------------------------------
|
||||
|
||||
Extensible SDK can be installed in two different ways, and both have
|
||||
their own pros and cons:
|
||||
|
||||
#. *Setting up the Extensible SDK environment directly in a Yocto build*. This
|
||||
avoids having to produce, test, distribute and maintain separate SDK
|
||||
installer archives, which can get very large. There is only one environment
|
||||
for the regular Yocto build and the SDK and less code paths where things can
|
||||
go not according to plan. It's easier to update the SDK: it simply means
|
||||
updating the Yocto layers with git fetch or layer management tooling. The
|
||||
SDK extensibility is better than in the second option: just run ``bitbake``
|
||||
again to add more things to the sysroot, or add layers if even more things
|
||||
are required.
|
||||
|
||||
#. *Setting up the Extensible SDK from a standalone installer*. This has the
|
||||
benefit of having a single, self-contained archive that includes all the
|
||||
needed binary artifacts. So nothing needs to be rebuilt, and there is no
|
||||
need to provide a well-functioning binary artefact cache over the network
|
||||
for developers with underpowered laptops.
|
||||
|
||||
Setting up the Extensible SDK environment directly in a Yocto build
|
||||
-------------------------------------------------------------------
|
||||
|
||||
#. Set up all the needed layers and a Yocto :term:`Build Directory`, e.g. a regular Yocto
|
||||
build where ``bitbake`` can be executed.
|
||||
|
||||
#. Run::
|
||||
|
||||
$ bitbake meta-ide-support
|
||||
$ bitbake -c populate_sysroot gtk+3
|
||||
# or any other target or native item that the application developer would need
|
||||
$ bitbake build-sysroots
|
||||
|
||||
Setting up the Extensible SDK from a standalone installer
|
||||
---------------------------------------------------------
|
||||
|
||||
The first thing you need to do is install the SDK on your :term:`Build
|
||||
Host` by running the ``*.sh`` installation script.
|
||||
|
||||
@@ -172,12 +134,7 @@ Running the Extensible SDK Environment Setup Script
|
||||
===================================================
|
||||
|
||||
Once you have the SDK installed, you must run the SDK environment setup
|
||||
script before you can actually use the SDK.
|
||||
|
||||
When using a SDK directly in a Yocto build, you will find the script in
|
||||
``tmp/deploy/images/qemux86-64/`` in your :term:`Build Directory`.
|
||||
|
||||
When using a standalone SDK installer, this setup script resides in
|
||||
script before you can actually use the SDK. This setup script resides in
|
||||
the directory you chose when you installed the SDK, which is either the
|
||||
default ``poky_sdk`` directory or the directory you chose during
|
||||
installation.
|
||||
@@ -195,11 +152,6 @@ script is for an IA-based target machine using i586 tuning::
|
||||
SDK environment now set up; additionally you may now run devtool to perform development tasks.
|
||||
Run devtool --help for further details.
|
||||
|
||||
When using the environment script directly in a Yocto build, it can
|
||||
be run similarly::
|
||||
|
||||
$ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
|
||||
|
||||
Running the setup script defines many environment variables needed in order to
|
||||
use the SDK (e.g. ``PATH``, :term:`CC`, :term:`LD`, and so forth). If you want
|
||||
to see all the environment variables the script exports, examine the
|
||||
@@ -1219,19 +1171,6 @@ You can use the following command to find out::
|
||||
Once you know the recipe
|
||||
(i.e. ``mesa`` in this example), you can install it.
|
||||
|
||||
When using the extensible SDK directly in a Yocto build
|
||||
-------------------------------------------------------
|
||||
|
||||
In this scenario, the Yocto build tooling, e.g. ``bitbake``
|
||||
is directly accessible to build additional items, and it
|
||||
can simply be executed directly::
|
||||
|
||||
$ bitbake mesa
|
||||
$ bitbake build-sysroots
|
||||
|
||||
When using a standalone installer for the Extensible SDK
|
||||
--------------------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
$ devtool sdk-install mesa
|
||||
|
||||
@@ -131,7 +131,7 @@ the following types of tests:
|
||||
|
||||
$ bitbake image -c testimage
|
||||
|
||||
The tests utilize the :ref:`testimage* <ref-classes-testimage*>`
|
||||
The tests utilize the :ref:`testimage* <ref-classes-testimage>`
|
||||
classes and the :ref:`ref-tasks-testimage` task.
|
||||
|
||||
- *Layer Testing:* The Autobuilder has the possibility to test whether
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
||||
DISTRO_VERSION = "4.0.14"
|
||||
DISTRO_VERSION = "4.0.15"
|
||||
DISTRO_CODENAME = "kirkstone"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
|
||||
@@ -12,7 +12,7 @@ inherit logging
|
||||
|
||||
OE_EXTRA_IMPORTS ?= ""
|
||||
|
||||
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust ${OE_EXTRA_IMPORTS}"
|
||||
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust oe.go ${OE_EXTRA_IMPORTS}"
|
||||
OE_IMPORTS[type] = "list"
|
||||
|
||||
PACKAGECONFIG_CONFARGS ??= ""
|
||||
|
||||
@@ -98,6 +98,8 @@ def generate_json_report(d, out_path, link_path):
|
||||
cve_check_merge_jsons(summary, data)
|
||||
filename = f.readline()
|
||||
|
||||
summary["package"].sort(key=lambda d: d['name'])
|
||||
|
||||
with open(out_path, "w") as f:
|
||||
json.dump(summary, f, indent=2)
|
||||
|
||||
|
||||
@@ -61,31 +61,10 @@ SECURITY_NOPIE_CFLAGS ??= ""
|
||||
CCACHE_DISABLE ?= "1"
|
||||
|
||||
def go_map_arch(a, d):
|
||||
import re
|
||||
if re.match('i.86', a):
|
||||
return '386'
|
||||
elif a == 'x86_64':
|
||||
return 'amd64'
|
||||
elif re.match('arm.*', a):
|
||||
return 'arm'
|
||||
elif re.match('aarch64.*', a):
|
||||
return 'arm64'
|
||||
elif re.match('mips64el.*', a):
|
||||
return 'mips64le'
|
||||
elif re.match('mips64.*', a):
|
||||
return 'mips64'
|
||||
elif a == 'mips':
|
||||
return 'mips'
|
||||
elif a == 'mipsel':
|
||||
return 'mipsle'
|
||||
elif re.match('p(pc|owerpc)(64le)', a):
|
||||
return 'ppc64le'
|
||||
elif re.match('p(pc|owerpc)(64)', a):
|
||||
return 'ppc64'
|
||||
elif a == 'riscv64':
|
||||
return 'riscv64'
|
||||
else:
|
||||
arch = oe.go.map_arch(a)
|
||||
if not arch:
|
||||
raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
|
||||
return arch
|
||||
|
||||
def go_map_arm(a, d):
|
||||
if a.startswith("arm"):
|
||||
|
||||
@@ -23,6 +23,8 @@ TARGET_CFLAGS = "${BUILD_CFLAGS}"
|
||||
TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
||||
TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
|
||||
TARGET_FPU = ""
|
||||
TUNE_FEATURES = ""
|
||||
ABIEXTENSION = ""
|
||||
|
||||
HOST_ARCH = "${BUILD_ARCH}"
|
||||
HOST_OS = "${BUILD_OS}"
|
||||
|
||||
@@ -89,11 +89,6 @@ def get_patched_cves(d):
|
||||
for url in oe.patch.src_patches(d):
|
||||
patch_file = bb.fetch.decodeurl(url)[2]
|
||||
|
||||
# Remote compressed patches may not be unpacked, so silently ignore them
|
||||
if not os.path.isfile(patch_file):
|
||||
bb.warn("%s does not exist, cannot extract CVE list" % patch_file)
|
||||
continue
|
||||
|
||||
# Check patch file name for CVE ID
|
||||
fname_match = cve_file_name_match.search(patch_file)
|
||||
if fname_match:
|
||||
@@ -101,6 +96,12 @@ def get_patched_cves(d):
|
||||
patched_cves.add(cve)
|
||||
bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file))
|
||||
|
||||
# Remote patches won't be present and compressed patches won't be
|
||||
# unpacked, so say we're not scanning them
|
||||
if not os.path.isfile(patch_file):
|
||||
bb.note("%s is remote or compressed, not scanning content" % patch_file)
|
||||
continue
|
||||
|
||||
with open(patch_file, "r", encoding="utf-8") as f:
|
||||
try:
|
||||
patch_text = f.read()
|
||||
@@ -159,7 +160,7 @@ def cve_check_merge_jsons(output, data):
|
||||
|
||||
for product in output["package"]:
|
||||
if product["name"] == data["package"][0]["name"]:
|
||||
bb.error("Error adding the same package twice")
|
||||
bb.error("Error adding the same package %s twice" % product["name"])
|
||||
return
|
||||
|
||||
output["package"].append(data["package"][0])
|
||||
|
||||
32
meta/lib/oe/go.py
Normal file
32
meta/lib/oe/go.py
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright OpenEmbedded Contributors
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
import re
|
||||
|
||||
def map_arch(a):
|
||||
if re.match('i.86', a):
|
||||
return '386'
|
||||
elif a == 'x86_64':
|
||||
return 'amd64'
|
||||
elif re.match('arm.*', a):
|
||||
return 'arm'
|
||||
elif re.match('aarch64.*', a):
|
||||
return 'arm64'
|
||||
elif re.match('mips64el.*', a):
|
||||
return 'mips64le'
|
||||
elif re.match('mips64.*', a):
|
||||
return 'mips64'
|
||||
elif a == 'mips':
|
||||
return 'mips'
|
||||
elif a == 'mipsel':
|
||||
return 'mipsle'
|
||||
elif re.match('p(pc|owerpc)(64le)', a):
|
||||
return 'ppc64le'
|
||||
elif re.match('p(pc|owerpc)(64)', a):
|
||||
return 'ppc64'
|
||||
elif a == 'riscv64':
|
||||
return 'riscv64'
|
||||
return ''
|
||||
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
@@ -0,0 +1,97 @@
|
||||
From 43651027d24e62a7a463254165e1e46e42aecdea Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Date: Thu, 16 Nov 2023 07:21:50 +0000
|
||||
Subject: [PATCH] fs/ntfs: Fix an OOB write when parsing the $ATTRIBUTE_LIST
|
||||
attribute for the $MFT file
|
||||
|
||||
When parsing an extremely fragmented $MFT file, i.e., the file described
|
||||
using the $ATTRIBUTE_LIST attribute, current NTFS code will reuse a buffer
|
||||
containing bytes read from the underlying drive to store sector numbers,
|
||||
which are consumed later to read data from these sectors into another buffer.
|
||||
|
||||
These sectors numbers, two 32-bit integers, are always stored at predefined
|
||||
offsets, 0x10 and 0x14, relative to first byte of the selected entry within
|
||||
the $ATTRIBUTE_LIST attribute. Usually, this won't cause any problem.
|
||||
|
||||
However, when parsing a specially-crafted file system image, this may cause
|
||||
the NTFS code to write these integers beyond the buffer boundary, likely
|
||||
causing the GRUB memory allocator to misbehave or fail. These integers contain
|
||||
values which are controlled by on-disk structures of the NTFS file system.
|
||||
|
||||
Such modification and resulting misbehavior may touch a memory range not
|
||||
assigned to the GRUB and owned by firmware or another EFI application/driver.
|
||||
|
||||
This fix introduces checks to ensure that these sector numbers are never
|
||||
written beyond the boundary.
|
||||
|
||||
Fixes: CVE-2023-4692
|
||||
|
||||
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
CVE: CVE-2023-4692
|
||||
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=43651027d24e62a7a463254165e1e46e42aecdea]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
grub-core/fs/ntfs.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||
index 2f34f76..6009e49 100644
|
||||
--- a/grub-core/fs/ntfs.c
|
||||
+++ b/grub-core/fs/ntfs.c
|
||||
@@ -184,7 +184,7 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
}
|
||||
if (at->attr_end)
|
||||
{
|
||||
- grub_uint8_t *pa;
|
||||
+ grub_uint8_t *pa, *pa_end;
|
||||
|
||||
at->emft_buf = grub_malloc (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||
if (at->emft_buf == NULL)
|
||||
@@ -209,11 +209,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
}
|
||||
at->attr_nxt = at->edat_buf;
|
||||
at->attr_end = at->edat_buf + u32at (pa, 0x30);
|
||||
+ pa_end = at->edat_buf + n;
|
||||
}
|
||||
else
|
||||
{
|
||||
at->attr_nxt = at->attr_end + u16at (pa, 0x14);
|
||||
at->attr_end = at->attr_end + u32at (pa, 4);
|
||||
+ pa_end = at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||
}
|
||||
at->flags |= GRUB_NTFS_AF_ALST;
|
||||
while (at->attr_nxt < at->attr_end)
|
||||
@@ -230,6 +232,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
at->flags |= GRUB_NTFS_AF_GPOS;
|
||||
at->attr_cur = at->attr_nxt;
|
||||
pa = at->attr_cur;
|
||||
+
|
||||
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
grub_set_unaligned32 ((char *) pa + 0x10,
|
||||
grub_cpu_to_le32 (at->mft->data->mft_start));
|
||||
grub_set_unaligned32 ((char *) pa + 0x14,
|
||||
@@ -240,6 +249,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
{
|
||||
if (*pa != attr)
|
||||
break;
|
||||
+
|
||||
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
if (read_attr
|
||||
(at, pa + 0x10,
|
||||
u32at (pa, 0x10) * (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR),
|
||||
--
|
||||
2.40.0
|
||||
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From 0ed2458cc4eff6d9a9199527e2a0b6d445802f94 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Date: Mon, 28 Aug 2023 16:32:33 +0300
|
||||
Subject: [PATCH] fs/ntfs: Fix an OOB read when reading data from the resident
|
||||
$DATA attribute
|
||||
|
||||
When reading a file containing resident data, i.e., the file data is stored in
|
||||
the $DATA attribute within the NTFS file record, not in external clusters,
|
||||
there are no checks that this resident data actually fits the corresponding
|
||||
file record segment.
|
||||
|
||||
When parsing a specially-crafted file system image, the current NTFS code will
|
||||
read the file data from an arbitrary, attacker-chosen memory offset and of
|
||||
arbitrary, attacker-chosen length.
|
||||
|
||||
This allows an attacker to display arbitrary chunks of memory, which could
|
||||
contain sensitive information like password hashes or even plain-text,
|
||||
obfuscated passwords from BS EFI variables.
|
||||
|
||||
This fix implements a check to ensure that resident data is read from the
|
||||
corresponding file record segment only.
|
||||
|
||||
Fixes: CVE-2023-4693
|
||||
|
||||
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=0ed2458cc4eff6d9a9199527e2a0b6d445802f94]
|
||||
CVE: CVE-2023-4693
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
grub-core/fs/ntfs.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||
index 7e43fd6..8f63c83 100644
|
||||
--- a/grub-core/fs/ntfs.c
|
||||
+++ b/grub-core/fs/ntfs.c
|
||||
@@ -401,7 +401,18 @@ read_data (struct grub_ntfs_attr *at, grub_uint8_t *pa, grub_uint8_t *dest,
|
||||
{
|
||||
if (ofs + len > u32at (pa, 0x10))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "read out of range");
|
||||
- grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
|
||||
+
|
||||
+ if (u32at (pa, 0x10) > (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute too large");
|
||||
+
|
||||
+ if (pa >= at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||
+
|
||||
+ if (u16at (pa, 0x14) + u32at (pa, 0x10) >
|
||||
+ (grub_addr_t) at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR) - (grub_addr_t) pa)
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||
+
|
||||
+ grub_memcpy (dest, pa + u16at (pa, 0x14) + ofs, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -38,6 +38,8 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
|
||||
file://loader-efi-chainloader-Simplify-the-loader-state.patch \
|
||||
file://commands-boot-Add-API-to-pass-context-to-loader.patch \
|
||||
file://CVE-2022-28736-loader-efi-chainloader-Use-grub_loader_set_ex.patch \
|
||||
file://CVE-2023-4692.patch \
|
||||
file://CVE-2023-4693.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
|
||||
|
||||
@@ -26,6 +26,15 @@ SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}
|
||||
file://0001-Fix-opening-etc-resolv.conf-error.patch \
|
||||
file://handle-hup.patch \
|
||||
file://local-ping.patch \
|
||||
file://CVE-2023-1981.patch \
|
||||
file://CVE-2023-38469-1.patch \
|
||||
file://CVE-2023-38469-2.patch \
|
||||
file://CVE-2023-38470-1.patch \
|
||||
file://CVE-2023-38470-2.patch \
|
||||
file://CVE-2023-38471-1.patch \
|
||||
file://CVE-2023-38471-2.patch \
|
||||
file://CVE-2023-38472.patch \
|
||||
file://CVE-2023-38473.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
|
||||
|
||||
58
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
58
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Thu, 17 Nov 2022 01:51:53 +0100
|
||||
Subject: [PATCH] Emit error if requested service is not found
|
||||
|
||||
It currently just crashes instead of replying with error. Check return
|
||||
value and emit error instead of passing NULL pointer to reply.
|
||||
|
||||
Fixes #375
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f]
|
||||
CVE: CVE-2023-1981
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
|
||||
index 70d7687bc..406d0b441 100644
|
||||
--- a/avahi-daemon/dbus-protocol.c
|
||||
+++ b/avahi-daemon/dbus-protocol.c
|
||||
@@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM
|
||||
}
|
||||
|
||||
t = avahi_alternative_host_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
|
||||
+ }
|
||||
}
|
||||
|
||||
static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||
@@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB
|
||||
}
|
||||
|
||||
t = avahi_alternative_service_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
|
||||
+ }
|
||||
}
|
||||
|
||||
static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||
47
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
47
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
From a337a1ba7d15853fb56deef1f464529af6e3a1cf Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Mon, 23 Oct 2023 20:29:31 +0000
|
||||
Subject: [PATCH]core: reject overly long TXT resource records
|
||||
Closes https://github.com/lathiat/avahi/issues/455
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/pull/500/commits/a337a1ba7d15853fb56deef1f464529af6e3a1cf]
|
||||
CVE: CVE-2023-38469
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-core/rr.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-core/rr.c b/avahi-core/rr.c
|
||||
index 7fa0bee..b03a24c 100644
|
||||
--- a/avahi-core/rr.c
|
||||
+++ b/avahi-core/rr.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <avahi-common/malloc.h>
|
||||
#include <avahi-common/defs.h>
|
||||
|
||||
+#include "dns.h"
|
||||
#include "rr.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
@@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r) {
|
||||
case AVAHI_DNS_TYPE_TXT: {
|
||||
|
||||
AvahiStringList *strlst;
|
||||
+ size_t used = 0;
|
||||
|
||||
- for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
|
||||
+ for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) {
|
||||
if (strlst->size > 255 || strlst->size <= 0)
|
||||
return 0;
|
||||
|
||||
+ used += 1+strlst->size;
|
||||
+ if (used > AVAHI_DNS_RDATA_MAX)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.40.0
|
||||
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Wed, 25 Oct 2023 18:15:42 +0000
|
||||
Subject: [PATCH] tests: pass overly long TXT resource records
|
||||
|
||||
to make sure they don't crash avahi any more.
|
||||
It reproduces https://github.com/lathiat/avahi/issues/455
|
||||
|
||||
Canonical notes:
|
||||
nickgalanis> removed first hunk since there is no .github dir in this release
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-2.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/c6cab87df290448a63323c8ca759baa516166237]
|
||||
CVE: CVE-2023-38469
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-client/client-test.c | 14 ++++++++++++++
|
||||
1 files changed, 14 insertions(+)
|
||||
|
||||
Index: avahi-0.8/avahi-client/client-test.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-client/client-test.c
|
||||
+++ avahi-0.8/avahi-client/client-test.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <avahi-client/client.h>
|
||||
@@ -33,6 +34,8 @@
|
||||
#include <avahi-common/malloc.h>
|
||||
#include <avahi-common/timeval.h>
|
||||
|
||||
+#include <avahi-core/dns.h>
|
||||
+
|
||||
static const AvahiPoll *poll_api = NULL;
|
||||
static AvahiSimplePoll *simple_poll = NULL;
|
||||
|
||||
@@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
uint32_t cookie;
|
||||
struct timeval tv;
|
||||
AvahiAddress a;
|
||||
+ uint8_t rdata[AVAHI_DNS_RDATA_MAX+1];
|
||||
+ AvahiStringList *txt = NULL;
|
||||
+ int r;
|
||||
|
||||
simple_poll = avahi_simple_poll_new();
|
||||
poll_api = avahi_simple_poll_get(simple_poll);
|
||||
@@ -258,6 +264,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL)));
|
||||
printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6));
|
||||
|
||||
+ memset(rdata, 1, sizeof(rdata));
|
||||
+ r = avahi_string_list_parse(rdata, sizeof(rdata), &txt);
|
||||
+ assert(r >= 0);
|
||||
+ assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata));
|
||||
+ error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt);
|
||||
+ assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||
+ avahi_string_list_free(txt);
|
||||
+
|
||||
avahi_entry_group_commit (group);
|
||||
|
||||
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||
59
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
59
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From 26806dbde54c5b40a2bf108d334ba59ec9d242d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Tue, 11 Apr 2023 15:29:59 +0200
|
||||
Subject: [PATCH]Ensure each label is at least one byte long
|
||||
|
||||
The only allowed exception is single dot, where it should return empty
|
||||
string.
|
||||
|
||||
Fixes #454.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c]
|
||||
CVE: CVE-2023-38470
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-common/domain-test.c | 14 ++++++++++++++
|
||||
avahi-common/domain.c | 2 +-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c
|
||||
index cf763ec..3acc1c1 100644
|
||||
--- a/avahi-common/domain-test.c
|
||||
+++ b/avahi-common/domain-test.c
|
||||
@@ -45,6 +45,20 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
|
||||
printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo."));
|
||||
avahi_free(s);
|
||||
|
||||
+ printf("%s\n", s = avahi_normalize_name_strdup("."));
|
||||
+ avahi_free(s);
|
||||
+
|
||||
+ s = avahi_normalize_name_strdup(",.=.}.=.?-.}.=.?.?.}.}.?.?.?.z.?.?.}.}."
|
||||
+ "}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.}.}.}"
|
||||
+ ".?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.?.zM.?`"
|
||||
+ "?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}??.}.}.?.?."
|
||||
+ "?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.?`?.}.}.}."
|
||||
+ "??.?.zM.?`?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}?"
|
||||
+ "?.}.}.?.?.?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM."
|
||||
+ "?`?.}.}.}.?.?.?.r.=.=.?.?`.?.?}.}.}.?.?.?.r.=.?.}.=.?.?."
|
||||
+ "}.?.?.?.}.=.?.?.}");
|
||||
+ assert(s == NULL);
|
||||
+
|
||||
printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
|
||||
printf("%i\n", avahi_domain_equal("A", "a"));
|
||||
|
||||
diff --git a/avahi-common/domain.c b/avahi-common/domain.c
|
||||
index 3b1ab68..e66d241 100644
|
||||
--- a/avahi-common/domain.c
|
||||
+++ b/avahi-common/domain.c
|
||||
@@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s, char *ret_s, size_t size) {
|
||||
}
|
||||
|
||||
if (!empty) {
|
||||
- if (size < 1)
|
||||
+ if (size < 2)
|
||||
return NULL;
|
||||
|
||||
*(r++) = '.';
|
||||
--
|
||||
2.40.0
|
||||
52
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
52
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From 20dec84b2480821704258bc908e7b2bd2e883b24 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Tue, 19 Sep 2023 03:21:25 +0000
|
||||
Subject: [PATCH] [common] bail out when escaped labels can't fit into ret
|
||||
|
||||
Fixes:
|
||||
```
|
||||
==93410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9e76f14c16 at pc 0x00000047208d bp 0x7ffee90a6a00 sp 0x7ffee90a61c8
|
||||
READ of size 1110 at 0x7f9e76f14c16 thread T0
|
||||
#0 0x47208c in __interceptor_strlen (out/fuzz-domain+0x47208c) (BuildId: 731b20c1eef22c2104e75a6496a399b10cfc7cba)
|
||||
#1 0x534eb0 in avahi_strdup avahi/avahi-common/malloc.c:167:12
|
||||
#2 0x53862c in avahi_normalize_name_strdup avahi/avahi-common/domain.c:226:12
|
||||
```
|
||||
and
|
||||
```
|
||||
fuzz-domain: fuzz/fuzz-domain.c:38: int LLVMFuzzerTestOneInput(const uint8_t *, size_t): Assertion `avahi_domain_equal(s, t)' failed.
|
||||
==101571== ERROR: libFuzzer: deadly signal
|
||||
#0 0x501175 in __sanitizer_print_stack_trace (/home/vagrant/avahi/out/fuzz-domain+0x501175) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#1 0x45ad2c in fuzzer::PrintStackTrace() (/home/vagrant/avahi/out/fuzz-domain+0x45ad2c) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#2 0x43fc07 in fuzzer::Fuzzer::CrashCallback() (/home/vagrant/avahi/out/fuzz-domain+0x43fc07) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#3 0x7f1581d7ebaf (/lib64/libc.so.6+0x3dbaf) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#4 0x7f1581dcf883 in __pthread_kill_implementation (/lib64/libc.so.6+0x8e883) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#5 0x7f1581d7eafd in gsignal (/lib64/libc.so.6+0x3dafd) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#6 0x7f1581d6787e in abort (/lib64/libc.so.6+0x2687e) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#7 0x7f1581d6779a in __assert_fail_base.cold (/lib64/libc.so.6+0x2679a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#8 0x7f1581d77186 in __assert_fail (/lib64/libc.so.6+0x36186) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#9 0x5344a4 in LLVMFuzzerTestOneInput /home/vagrant/avahi/fuzz/fuzz-domain.c:38:9
|
||||
```
|
||||
|
||||
It's a follow-up to 94cb6489114636940ac683515417990b55b5d66c
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38470-2.patch?h=ubuntu/jammy-security
|
||||
CVE: CVE-2023-38470 #Follow-up patch
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-common/domain.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.8/avahi-common/domain.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-common/domain.c
|
||||
+++ avahi-0.8/avahi-common/domain.c
|
||||
@@ -210,7 +210,8 @@ char *avahi_normalize_name(const char *s
|
||||
} else
|
||||
empty = 0;
|
||||
|
||||
- avahi_escape_label(label, strlen(label), &r, &size);
|
||||
+ if (!(avahi_escape_label(label, strlen(label), &r, &size)))
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
return ret_s;
|
||||
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
From 9cd4ea89b3ac89b7bb0196fda1aa88cd51b106b6 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Mon, 23 Oct 2023 13:38:35 +0200
|
||||
Subject: [PATCH] core: extract host name using avahi_unescape_label()
|
||||
|
||||
Previously we could create invalid escape sequence when we split the
|
||||
string on dot. For example, from valid host name "foo\\.bar" we have
|
||||
created invalid name "foo\\" and tried to set that as the host name
|
||||
which crashed the daemon.
|
||||
|
||||
Fixes #453
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09]
|
||||
CVE: CVE-2023-38471
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-core/server.c | 27 +++++++++++++++++++++------
|
||||
1 file changed, 21 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/avahi-core/server.c b/avahi-core/server.c
|
||||
index e507750..40f1d68 100644
|
||||
--- a/avahi-core/server.c
|
||||
+++ b/avahi-core/server.c
|
||||
@@ -1295,7 +1295,11 @@ static void update_fqdn(AvahiServer *s) {
|
||||
}
|
||||
|
||||
int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
|
||||
- char *hn = NULL;
|
||||
+ char label_escaped[AVAHI_LABEL_MAX*4+1];
|
||||
+ char label[AVAHI_LABEL_MAX];
|
||||
+ char *hn = NULL, *h;
|
||||
+ size_t len;
|
||||
+
|
||||
assert(s);
|
||||
|
||||
AVAHI_CHECK_VALIDITY(s, !host_name || avahi_is_valid_host_name(host_name), AVAHI_ERR_INVALID_HOST_NAME);
|
||||
@@ -1305,17 +1309,28 @@ int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
|
||||
else
|
||||
hn = avahi_normalize_name_strdup(host_name);
|
||||
|
||||
- hn[strcspn(hn, ".")] = 0;
|
||||
+ h = hn;
|
||||
+ if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||
+ avahi_free(h);
|
||||
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ }
|
||||
+
|
||||
+ avahi_free(h);
|
||||
+
|
||||
+ h = label_escaped;
|
||||
+ len = sizeof(label_escaped);
|
||||
+ if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
|
||||
- if (avahi_domain_equal(s->host_name, hn) && s->state != AVAHI_SERVER_COLLISION) {
|
||||
- avahi_free(hn);
|
||||
+ if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||
- }
|
||||
|
||||
withdraw_host_rrs(s);
|
||||
|
||||
avahi_free(s->host_name);
|
||||
- s->host_name = hn;
|
||||
+ s->host_name = avahi_strdup(label_escaped);
|
||||
+ if (!s->host_name)
|
||||
+ return AVAHI_ERR_NO_MEMORY;
|
||||
|
||||
update_fqdn(s);
|
||||
|
||||
--
|
||||
2.40.0
|
||||
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From b675f70739f404342f7f78635d6e2dcd85a13460 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Tue, 24 Oct 2023 22:04:51 +0000
|
||||
Subject: [PATCH] core: return errors from avahi_server_set_host_name properly
|
||||
|
||||
It's a follow-up to 894f085f402e023a98cbb6f5a3d117bd88d93b09
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460]
|
||||
CVE: CVE-2023-38471 #Follow-up Patch
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-core/server.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: avahi-0.8/avahi-core/server.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-core/server.c
|
||||
+++ avahi-0.8/avahi-core/server.c
|
||||
@@ -1309,10 +1309,13 @@ int avahi_server_set_host_name(AvahiServ
|
||||
else
|
||||
hn = avahi_normalize_name_strdup(host_name);
|
||||
|
||||
+ if (!hn)
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||
+
|
||||
h = hn;
|
||||
if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||
avahi_free(h);
|
||||
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||
}
|
||||
|
||||
avahi_free(h);
|
||||
@@ -1320,7 +1323,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||
h = label_escaped;
|
||||
len = sizeof(label_escaped);
|
||||
if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||
|
||||
if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||
@@ -1330,7 +1333,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||
avahi_free(s->host_name);
|
||||
s->host_name = avahi_strdup(label_escaped);
|
||||
if (!s->host_name)
|
||||
- return AVAHI_ERR_NO_MEMORY;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||
|
||||
update_fqdn(s);
|
||||
|
||||
46
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
46
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From b024ae5749f4aeba03478e6391687c3c9c8dee40 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Thu, 19 Oct 2023 17:36:44 +0200
|
||||
Subject: [PATCH] core: make sure there is rdata to process before parsing it
|
||||
|
||||
Fixes #452
|
||||
|
||||
CVE-2023-38472
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38472.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40]
|
||||
CVE: CVE-2023-38472
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-client/client-test.c | 3 +++
|
||||
avahi-daemon/dbus-entry-group.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.8/avahi-client/client-test.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-client/client-test.c
|
||||
+++ avahi-0.8/avahi-client/client-test.c
|
||||
@@ -272,6 +272,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||
avahi_string_list_free(txt);
|
||||
|
||||
+ error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0);
|
||||
+ assert(error != AVAHI_OK);
|
||||
+
|
||||
avahi_entry_group_commit (group);
|
||||
|
||||
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||
Index: avahi-0.8/avahi-daemon/dbus-entry-group.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-daemon/dbus-entry-group.c
|
||||
+++ avahi-0.8/avahi-daemon/dbus-entry-group.c
|
||||
@@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_g
|
||||
if (!(r = avahi_record_new_full (name, clazz, type, ttl)))
|
||||
return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL);
|
||||
|
||||
- if (avahi_rdata_parse (r, rdata, size) < 0) {
|
||||
+ if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) {
|
||||
avahi_record_unref (r);
|
||||
return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL);
|
||||
}
|
||||
108
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
108
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
@@ -0,0 +1,108 @@
|
||||
From b448c9f771bada14ae8de175695a9729f8646797 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Wed, 11 Oct 2023 17:45:44 +0200
|
||||
Subject: [PATCH]common: derive alternative host name from its
|
||||
unescaped version
|
||||
|
||||
Normalization of input makes sure we don't have to deal with special
|
||||
cases like unescaped dot at the end of label.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797]
|
||||
CVE: CVE-2023-38473
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-common/alternative-test.c | 3 +++
|
||||
avahi-common/alternative.c | 27 +++++++++++++++++++--------
|
||||
2 files changed, 22 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/avahi-common/alternative-test.c b/avahi-common/alternative-test.c
|
||||
index 9255435..681fc15 100644
|
||||
--- a/avahi-common/alternative-test.c
|
||||
+++ b/avahi-common/alternative-test.c
|
||||
@@ -31,6 +31,9 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
|
||||
const char* const test_strings[] = {
|
||||
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXüüüüüüü",
|
||||
+ ").",
|
||||
+ "\\.",
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\",
|
||||
"gurke",
|
||||
"-",
|
||||
" #",
|
||||
diff --git a/avahi-common/alternative.c b/avahi-common/alternative.c
|
||||
index b3d39f0..a094e6d 100644
|
||||
--- a/avahi-common/alternative.c
|
||||
+++ b/avahi-common/alternative.c
|
||||
@@ -49,15 +49,20 @@ static void drop_incomplete_utf8(char *c) {
|
||||
}
|
||||
|
||||
char *avahi_alternative_host_name(const char *s) {
|
||||
+ char label[AVAHI_LABEL_MAX], alternative[AVAHI_LABEL_MAX*4+1];
|
||||
+ char *alt, *r, *ret;
|
||||
const char *e;
|
||||
- char *r;
|
||||
+ size_t len;
|
||||
|
||||
assert(s);
|
||||
|
||||
if (!avahi_is_valid_host_name(s))
|
||||
return NULL;
|
||||
|
||||
- if ((e = strrchr(s, '-'))) {
|
||||
+ if (!avahi_unescape_label(&s, label, sizeof(label)))
|
||||
+ return NULL;
|
||||
+
|
||||
+ if ((e = strrchr(label, '-'))) {
|
||||
const char *p;
|
||||
|
||||
e++;
|
||||
@@ -74,19 +79,18 @@ char *avahi_alternative_host_name(const char *s) {
|
||||
|
||||
if (e) {
|
||||
char *c, *m;
|
||||
- size_t l;
|
||||
int n;
|
||||
|
||||
n = atoi(e)+1;
|
||||
if (!(m = avahi_strdup_printf("%i", n)))
|
||||
return NULL;
|
||||
|
||||
- l = e-s-1;
|
||||
+ len = e-label-1;
|
||||
|
||||
- if (l >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||
- l = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||
+ if (len >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||
+ len = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||
|
||||
- if (!(c = avahi_strndup(s, l))) {
|
||||
+ if (!(c = avahi_strndup(label, len))) {
|
||||
avahi_free(m);
|
||||
return NULL;
|
||||
}
|
||||
@@ -100,7 +104,7 @@ char *avahi_alternative_host_name(const char *s) {
|
||||
} else {
|
||||
char *c;
|
||||
|
||||
- if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-2)))
|
||||
+ if (!(c = avahi_strndup(label, AVAHI_LABEL_MAX-1-2)))
|
||||
return NULL;
|
||||
|
||||
drop_incomplete_utf8(c);
|
||||
@@ -109,6 +113,13 @@ char *avahi_alternative_host_name(const char *s) {
|
||||
avahi_free(c);
|
||||
}
|
||||
|
||||
+ alt = alternative;
|
||||
+ len = sizeof(alternative);
|
||||
+ ret = avahi_escape_label(r, strlen(r), &alt, &len);
|
||||
+
|
||||
+ avahi_free(r);
|
||||
+ r = avahi_strdup(ret);
|
||||
+
|
||||
assert(avahi_is_valid_host_name(r));
|
||||
|
||||
return r;
|
||||
--
|
||||
2.40.0
|
||||
@@ -54,6 +54,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
|
||||
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
|
||||
file://0001-test-gatt-Fix-hung-issue.patch \
|
||||
file://CVE-2023-45866.patch \
|
||||
"
|
||||
S = "${WORKDIR}/bluez-${PV}"
|
||||
|
||||
|
||||
56
meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch
Normal file
56
meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
From 25a471a83e02e1effb15d5a488b3f0085eaeb675 Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
Date: Tue, 10 Oct 2023 13:03:12 -0700
|
||||
Subject: [PATCH] input.conf: Change default of ClassicBondedOnly
|
||||
|
||||
This changes the default of ClassicBondedOnly since defaulting to false
|
||||
is not inline with HID specification which mandates the of Security Mode
|
||||
4:
|
||||
|
||||
BLUETOOTH SPECIFICATION Page 84 of 123
|
||||
Human Interface Device (HID) Profile:
|
||||
|
||||
5.4.3.4.2 Security Modes
|
||||
Bluetooth HID Hosts shall use Security Mode 4 when interoperating with
|
||||
Bluetooth HID devices that are compliant to the Bluetooth Core
|
||||
Specification v2.1+EDR[6].
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675]
|
||||
|
||||
CVE: CVE-2023-45866
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
profiles/input/device.c | 2 +-
|
||||
profiles/input/input.conf | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/profiles/input/device.c b/profiles/input/device.c
|
||||
index 4a50ea9..4310dd1 100644
|
||||
--- a/profiles/input/device.c
|
||||
+++ b/profiles/input/device.c
|
||||
@@ -81,7 +81,7 @@ struct input_device {
|
||||
|
||||
static int idle_timeout = 0;
|
||||
static bool uhid_enabled = false;
|
||||
-static bool classic_bonded_only = false;
|
||||
+static bool classic_bonded_only = true;
|
||||
|
||||
void input_set_idle_timeout(int timeout)
|
||||
{
|
||||
diff --git a/profiles/input/input.conf b/profiles/input/input.conf
|
||||
index 4c70bc5..d8645f3 100644
|
||||
--- a/profiles/input/input.conf
|
||||
+++ b/profiles/input/input.conf
|
||||
@@ -17,7 +17,7 @@
|
||||
# platforms may want to make sure that input connections only come from bonded
|
||||
# device connections. Several older mice have been known for not supporting
|
||||
# pairing/encryption.
|
||||
-# Defaults to false to maximize device compatibility.
|
||||
+# Defaults to true for security.
|
||||
#ClassicBondedOnly=true
|
||||
|
||||
# LE upgrade security
|
||||
--
|
||||
2.40.0
|
||||
@@ -5,7 +5,7 @@ export SKIP_UNIT=1
|
||||
|
||||
cd regress
|
||||
sed -i "/\t\tagent-ptrace /d" Makefile
|
||||
make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
|
||||
make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="" tests \
|
||||
| sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
|
||||
|
||||
SSHAGENT=`which ssh-agent`
|
||||
|
||||
@@ -170,7 +170,7 @@ RDEPENDS:${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pa
|
||||
# conflict with each other
|
||||
RDEPENDS:${PN}-dev = ""
|
||||
# gdb would make attach-ptrace test pass rather than skip but not worth the build dependencies
|
||||
RDEPENDS:${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed sudo coreutils"
|
||||
RDEPENDS:${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed coreutils"
|
||||
|
||||
RPROVIDES:${PN}-ssh = "ssh"
|
||||
RPROVIDES:${PN}-sshd = "sshd"
|
||||
|
||||
180
meta/recipes-connectivity/openssl/openssl/CVE-2023-5678.patch
Normal file
180
meta/recipes-connectivity/openssl/openssl/CVE-2023-5678.patch
Normal file
@@ -0,0 +1,180 @@
|
||||
From db925ae2e65d0d925adef429afc37f75bd1c2017 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Levitte <levitte@openssl.org>
|
||||
Date: Fri, 20 Oct 2023 09:18:19 +0200
|
||||
Subject: [PATCH] Make DH_check_pub_key() and DH_generate_key() safer yet
|
||||
|
||||
We already check for an excessively large P in DH_generate_key(), but not in
|
||||
DH_check_pub_key(), and none of them check for an excessively large Q.
|
||||
|
||||
This change adds all the missing excessive size checks of P and Q.
|
||||
|
||||
It's to be noted that behaviours surrounding excessively sized P and Q
|
||||
differ. DH_check() raises an error on the excessively sized P, but only
|
||||
sets a flag for the excessively sized Q. This behaviour is mimicked in
|
||||
DH_check_pub_key().
|
||||
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
Reviewed-by: Matt Caswell <matt@openssl.org>
|
||||
Reviewed-by: Hugo Landau <hlandau@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/22518)
|
||||
|
||||
(cherry picked from commit ddeb4b6c6d527e54ce9a99cba785c0f7776e54b6)
|
||||
|
||||
Upstream-Status: Backport [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=db925ae2e65d0d925adef429afc37f75bd1c2017]
|
||||
CVE: CVE-2023-5678
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
crypto/dh/dh_check.c | 12 ++++++++++++
|
||||
crypto/dh/dh_err.c | 3 ++-
|
||||
crypto/dh/dh_key.c | 12 ++++++++++++
|
||||
crypto/err/openssl.txt | 1 +
|
||||
include/crypto/dherr.h | 2 +-
|
||||
include/openssl/dh.h | 6 +++---
|
||||
include/openssl/dherr.h | 3 ++-
|
||||
7 files changed, 33 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c
|
||||
index 7ba2bea..e20eb62 100644
|
||||
--- a/crypto/dh/dh_check.c
|
||||
+++ b/crypto/dh/dh_check.c
|
||||
@@ -249,6 +249,18 @@ int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key)
|
||||
*/
|
||||
int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
|
||||
{
|
||||
+ /* Don't do any checks at all with an excessively large modulus */
|
||||
+ if (BN_num_bits(dh->params.p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) {
|
||||
+ ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_LARGE);
|
||||
+ *ret = DH_MODULUS_TOO_LARGE | DH_CHECK_PUBKEY_INVALID;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (dh->params.q != NULL && BN_ucmp(dh->params.p, dh->params.q) < 0) {
|
||||
+ *ret |= DH_CHECK_INVALID_Q_VALUE | DH_CHECK_PUBKEY_INVALID;
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
return ossl_ffc_validate_public_key(&dh->params, pub_key, ret);
|
||||
}
|
||||
|
||||
diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c
|
||||
index 4152397..f76ac0d 100644
|
||||
--- a/crypto/dh/dh_err.c
|
||||
+++ b/crypto/dh/dh_err.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
+ * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -54,6 +54,7 @@ static const ERR_STRING_DATA DH_str_reasons[] = {
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_PARAMETER_ENCODING_ERROR),
|
||||
"parameter encoding error"},
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_PEER_KEY_ERROR), "peer key error"},
|
||||
+ {ERR_PACK(ERR_LIB_DH, 0, DH_R_Q_TOO_LARGE), "q too large"},
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_SHARED_INFO_ERROR), "shared info error"},
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_UNABLE_TO_CHECK_GENERATOR),
|
||||
"unable to check generator"},
|
||||
diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c
|
||||
index d84ea99..afc49f5 100644
|
||||
--- a/crypto/dh/dh_key.c
|
||||
+++ b/crypto/dh/dh_key.c
|
||||
@@ -49,6 +49,12 @@ int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
|
||||
goto err;
|
||||
}
|
||||
|
||||
+ if (dh->params.q != NULL
|
||||
+ && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) {
|
||||
+ ERR_raise(ERR_LIB_DH, DH_R_Q_TOO_LARGE);
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) {
|
||||
ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_SMALL);
|
||||
return 0;
|
||||
@@ -267,6 +273,12 @@ static int generate_key(DH *dh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ if (dh->params.q != NULL
|
||||
+ && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) {
|
||||
+ ERR_raise(ERR_LIB_DH, DH_R_Q_TOO_LARGE);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) {
|
||||
ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_SMALL);
|
||||
return 0;
|
||||
diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt
|
||||
index e51504b..36de321 100644
|
||||
--- a/crypto/err/openssl.txt
|
||||
+++ b/crypto/err/openssl.txt
|
||||
@@ -500,6 +500,7 @@ DH_R_NO_PARAMETERS_SET:107:no parameters set
|
||||
DH_R_NO_PRIVATE_VALUE:100:no private value
|
||||
DH_R_PARAMETER_ENCODING_ERROR:105:parameter encoding error
|
||||
DH_R_PEER_KEY_ERROR:111:peer key error
|
||||
+DH_R_Q_TOO_LARGE:130:q too large
|
||||
DH_R_SHARED_INFO_ERROR:113:shared info error
|
||||
DH_R_UNABLE_TO_CHECK_GENERATOR:121:unable to check generator
|
||||
DSA_R_BAD_FFC_PARAMETERS:114:bad ffc parameters
|
||||
diff --git a/include/crypto/dherr.h b/include/crypto/dherr.h
|
||||
index bb24d13..519327f 100644
|
||||
--- a/include/crypto/dherr.h
|
||||
+++ b/include/crypto/dherr.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
- * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
+ * Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
diff --git a/include/openssl/dh.h b/include/openssl/dh.h
|
||||
index 6533260..50e0cf5 100644
|
||||
--- a/include/openssl/dh.h
|
||||
+++ b/include/openssl/dh.h
|
||||
@@ -141,7 +141,7 @@ DECLARE_ASN1_ITEM(DHparams)
|
||||
# define DH_GENERATOR_3 3
|
||||
# define DH_GENERATOR_5 5
|
||||
|
||||
-/* DH_check error codes */
|
||||
+/* DH_check error codes, some of them shared with DH_check_pub_key */
|
||||
/*
|
||||
* NB: These values must align with the equivalently named macros in
|
||||
* internal/ffc.h.
|
||||
@@ -151,10 +151,10 @@ DECLARE_ASN1_ITEM(DHparams)
|
||||
# define DH_UNABLE_TO_CHECK_GENERATOR 0x04
|
||||
# define DH_NOT_SUITABLE_GENERATOR 0x08
|
||||
# define DH_CHECK_Q_NOT_PRIME 0x10
|
||||
-# define DH_CHECK_INVALID_Q_VALUE 0x20
|
||||
+# define DH_CHECK_INVALID_Q_VALUE 0x20 /* +DH_check_pub_key */
|
||||
# define DH_CHECK_INVALID_J_VALUE 0x40
|
||||
# define DH_MODULUS_TOO_SMALL 0x80
|
||||
-# define DH_MODULUS_TOO_LARGE 0x100
|
||||
+# define DH_MODULUS_TOO_LARGE 0x100 /* +DH_check_pub_key */
|
||||
|
||||
/* DH_check_pub_key error codes */
|
||||
# define DH_CHECK_PUBKEY_TOO_SMALL 0x01
|
||||
diff --git a/include/openssl/dherr.h b/include/openssl/dherr.h
|
||||
index 5d2a762..074a701 100644
|
||||
--- a/include/openssl/dherr.h
|
||||
+++ b/include/openssl/dherr.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
+ * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -50,6 +50,7 @@
|
||||
# define DH_R_NO_PRIVATE_VALUE 100
|
||||
# define DH_R_PARAMETER_ENCODING_ERROR 105
|
||||
# define DH_R_PEER_KEY_ERROR 111
|
||||
+# define DH_R_Q_TOO_LARGE 130
|
||||
# define DH_R_SHARED_INFO_ERROR 113
|
||||
# define DH_R_UNABLE_TO_CHECK_GENERATOR 121
|
||||
|
||||
--
|
||||
2.40.1
|
||||
@@ -12,6 +12,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
|
||||
file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
|
||||
file://afalg.patch \
|
||||
file://0001-Configure-do-not-tweak-mips-cflags.patch \
|
||||
file://CVE-2023-5678.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-nativesdk = " \
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "73e3b5481bc88b332a198a8ec51a3c43c5f08e7e"
|
||||
SRCREV ?= "387d01b0a46bf0adb3f4cb2188299f88ac58db2f"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=kirkstone \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -66,5 +66,8 @@ SRC_URI = "\
|
||||
file://0031-CVE-2022-45703-2.patch \
|
||||
file://0031-CVE-2022-47695.patch \
|
||||
file://CVE-2022-48063.patch \
|
||||
file://0032-CVE-2022-47010.patch \
|
||||
file://0033-CVE-2022-47007.patch \
|
||||
file://0034-CVE-2022-48064.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Mon, 20 Jun 2022 01:09:31 +0000 (+0930)
|
||||
Subject: PR29262, memory leak in pr_function_type
|
||||
X-Git-Tag: binutils-2_39~224
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0d02e70b197c786f26175b9a73f94e01d14abdab
|
||||
|
||||
PR29262, memory leak in pr_function_type
|
||||
|
||||
PR 29262
|
||||
* prdbg.c (pr_function_type): Free "s" on failure path.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0d02e70b197c786f26175b9a73f94e01d14abdab]
|
||||
|
||||
CVE: CVE-2022-47010
|
||||
|
||||
Signed-off-by: Sanjana Venkatesh <Sanjana.Venkatesh@windriver.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
|
||||
index c1e41628d26..bb42a5b6c2d 100644
|
||||
--- a/binutils/prdbg.c
|
||||
+++ b/binutils/prdbg.c
|
||||
@@ -742,12 +742,9 @@ pr_function_type (void *p, int argcount, bool varargs)
|
||||
|
||||
strcat (s, ")");
|
||||
|
||||
- if (! substitute_type (info, s))
|
||||
- return false;
|
||||
-
|
||||
+ bool ret = substitute_type (info, s);
|
||||
free (s);
|
||||
-
|
||||
- return true;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/* Turn the top type on the stack into a reference to that type. */
|
||||
@@ -0,0 +1,34 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 16 Jun 2022 23:30:41 +0000 (+0930)
|
||||
Subject: PR29254, memory leak in stab_demangle_v3_arg
|
||||
X-Git-Tag: binutils-2_39~237
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb
|
||||
|
||||
PR29254, memory leak in stab_demangle_v3_arg
|
||||
|
||||
PR 29254
|
||||
* stabs.c (stab_demangle_v3_arg): Free dt on failure path.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb]
|
||||
|
||||
CVE: CVE-2022-47007
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
---
|
||||
|
||||
diff --git a/binutils/stabs.c b/binutils/stabs.c
|
||||
index 2b5241637c1..796ff85b86a 100644
|
||||
--- a/binutils/stabs.c
|
||||
+++ b/binutils/stabs.c
|
||||
@@ -5467,7 +5467,10 @@ stab_demangle_v3_arg (void *dhandle, struct stab_handle *info,
|
||||
dc->u.s_binary.right,
|
||||
&varargs);
|
||||
if (pargs == NULL)
|
||||
- return NULL;
|
||||
+ {
|
||||
+ free (dt);
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
return debug_make_function_type (dhandle, dt, pargs, varargs);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Tue, 20 Dec 2022 13:17:03 +0000 (+1030)
|
||||
Subject: PR29922, SHT_NOBITS section avoids section size sanity check
|
||||
X-Git-Tag: binutils-2_40~202
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8f2c64de86bc3d7556121fe296dd679000283931
|
||||
|
||||
PR29922, SHT_NOBITS section avoids section size sanity check
|
||||
|
||||
PR 29922
|
||||
* dwarf2.c (find_debug_info): Ignore sections without
|
||||
SEC_HAS_CONTENTS.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8f2c64de86bc3d7556121fe296dd679000283931]
|
||||
|
||||
CVE: CVE-2022-48064
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
|
||||
index 95f45708e9d..0cd8152ee6e 100644
|
||||
--- a/bfd/dwarf2.c
|
||||
+++ b/bfd/dwarf2.c
|
||||
@@ -4831,16 +4831,19 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
|
||||
{
|
||||
look = debug_sections[debug_info].uncompressed_name;
|
||||
msec = bfd_get_section_by_name (abfd, look);
|
||||
- if (msec != NULL)
|
||||
+ /* Testing SEC_HAS_CONTENTS is an anti-fuzzer measure. Of
|
||||
+ course debug sections always have contents. */
|
||||
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
|
||||
return msec;
|
||||
|
||||
look = debug_sections[debug_info].compressed_name;
|
||||
msec = bfd_get_section_by_name (abfd, look);
|
||||
- if (msec != NULL)
|
||||
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
|
||||
return msec;
|
||||
|
||||
for (msec = abfd->sections; msec != NULL; msec = msec->next)
|
||||
- if (startswith (msec->name, GNU_LINKONCE_INFO))
|
||||
+ if ((msec->flags & SEC_HAS_CONTENTS) != 0
|
||||
+ && startswith (msec->name, GNU_LINKONCE_INFO))
|
||||
return msec;
|
||||
|
||||
return NULL;
|
||||
@@ -4848,6 +4851,9 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
|
||||
|
||||
for (msec = after_sec->next; msec != NULL; msec = msec->next)
|
||||
{
|
||||
+ if ((msec->flags & SEC_HAS_CONTENTS) == 0)
|
||||
+ continue;
|
||||
+
|
||||
look = debug_sections[debug_info].uncompressed_name;
|
||||
if (strcmp (msec->name, look) == 0)
|
||||
return msec;
|
||||
@@ -16,6 +16,7 @@ SRC_URI += "\
|
||||
file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \
|
||||
file://0001-exec.go-do-not-write-linker-flags-into-buildids.patch \
|
||||
file://0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
|
||||
file://0010-net-Fix-issue-with-DNS-not-being-updated.patch \
|
||||
file://CVE-2022-27664.patch \
|
||||
file://0001-net-http-httputil-avoid-query-parameter-smuggling.patch \
|
||||
file://CVE-2022-41715.patch \
|
||||
@@ -54,5 +55,5 @@ SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784
|
||||
# https://github.com/golang/go/issues/30999#issuecomment-910470358
|
||||
CVE_CHECK_IGNORE += "CVE-2021-29923"
|
||||
|
||||
# This is specific to Microsoft Windows
|
||||
CVE_CHECK_IGNORE += "CVE-2022-41716"
|
||||
# This are specific to Microsoft Windows
|
||||
CVE_CHECK_IGNORE += "CVE-2022-41716 CVE-2023-45283 CVE-2023-45284"
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 20176b390e28daa86b4552965cb7bd9181983c4d Mon Sep 17 00:00:00 2001
|
||||
From: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
|
||||
Date: Mon, 6 Nov 2023 20:11:19 -0600
|
||||
Subject: [PATCH] net: Fix issue with DNS not being updated
|
||||
|
||||
When dns requests are made, go's native DNS resolver only reads
|
||||
/etc/resolv.conf if the previous request is older than 5 seconds.
|
||||
|
||||
On first network call, an initialization code runs that is
|
||||
supposed to initialize DNS data and set lastChecked time. There is a bug
|
||||
in this code that causes /etc/resolv.conf to not be read during
|
||||
initialization and the DNS data from program startup ends up being used
|
||||
until the next 5 seconds. This means that if /etc/resolv.conf changed
|
||||
between program startup and the first network call, old DNS data is
|
||||
still used until the next 5 seconds.
|
||||
|
||||
This causes "docker pull" to fail the first time if docker daemon is
|
||||
started before networking is up.
|
||||
|
||||
Upstream commit d52883f443e1d564b0300acdd382af1769bf0477 made lot of
|
||||
improvements to DNS resolver to fix some issues which also fixes this
|
||||
issue.
|
||||
This patch picks the relevant changes from it to fix this particular
|
||||
issue.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/d52883f443e1d564b0300acdd382af1769bf0477]
|
||||
|
||||
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
|
||||
---
|
||||
src/net/dnsclient_unix.go | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go
|
||||
index 6dfd4af..520ffe6 100644
|
||||
--- a/src/net/dnsclient_unix.go
|
||||
+++ b/src/net/dnsclient_unix.go
|
||||
@@ -337,10 +337,7 @@ var resolvConf resolverConfig
|
||||
func (conf *resolverConfig) init() {
|
||||
// Set dnsConfig and lastChecked so we don't parse
|
||||
// resolv.conf twice the first time.
|
||||
- conf.dnsConfig = systemConf().resolv
|
||||
- if conf.dnsConfig == nil {
|
||||
- conf.dnsConfig = dnsReadConfig("/etc/resolv.conf")
|
||||
- }
|
||||
+ conf.dnsConfig = dnsReadConfig("/etc/resolv.conf")
|
||||
conf.lastChecked = time.Now()
|
||||
|
||||
// Prepare ch so that only one update of resolverConfig may
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 627ac5e314303acc00a19d58f09eb1eabd029fd1 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Gaynor <alex.gaynor@gmail.com>
|
||||
Date: Wed, 6 Dec 2023 08:04:53 +0000
|
||||
Subject: [PATCH] Fixed crash when loading a PKCS#7 bundle with no certificates
|
||||
(#9926)
|
||||
|
||||
CVE: CVE-2023-49083
|
||||
|
||||
Upstream-Status: Backport [https://github.com/pyca/cryptography/commit/1e7b4d074e14c4e694d3ce69ad6754a6039fd6ff]
|
||||
|
||||
Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
|
||||
---
|
||||
src/cryptography/hazmat/backends/openssl/backend.py | 5 ++++-
|
||||
tests/hazmat/primitives/test_pkcs7.py | 6 ++++++
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
|
||||
index 5606fe6..c43fea0 100644
|
||||
--- a/src/cryptography/hazmat/backends/openssl/backend.py
|
||||
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
|
||||
@@ -2189,9 +2189,12 @@ class Backend(BackendInterface):
|
||||
_Reasons.UNSUPPORTED_SERIALIZATION,
|
||||
)
|
||||
|
||||
+ certs: list[x509.Certificate] = []
|
||||
+ if p7.d.sign == self._ffi.NULL:
|
||||
+ return certs
|
||||
+
|
||||
sk_x509 = p7.d.sign.cert
|
||||
num = self._lib.sk_X509_num(sk_x509)
|
||||
- certs = []
|
||||
for i in range(num):
|
||||
x509 = self._lib.sk_X509_value(sk_x509, i)
|
||||
self.openssl_assert(x509 != self._ffi.NULL)
|
||||
diff --git a/tests/hazmat/primitives/test_pkcs7.py b/tests/hazmat/primitives/test_pkcs7.py
|
||||
index 91ac842..b98a9f1 100644
|
||||
--- a/tests/hazmat/primitives/test_pkcs7.py
|
||||
+++ b/tests/hazmat/primitives/test_pkcs7.py
|
||||
@@ -81,6 +81,12 @@ class TestPKCS7Loading(object):
|
||||
mode="rb",
|
||||
)
|
||||
|
||||
+ def test_load_pkcs7_empty_certificates(self):
|
||||
+ der = b"\x30\x0B\x06\x09\x2A\x86\x48\x86\xF7\x0D\x01\x07\x02"
|
||||
+
|
||||
+ certificates = pkcs7.load_der_pkcs7_certificates(der)
|
||||
+ assert certificates == []
|
||||
+
|
||||
|
||||
# We have no public verification API and won't be adding one until we get
|
||||
# some requirements from users so this function exists to give us basic
|
||||
--
|
||||
2.40.0
|
||||
@@ -18,6 +18,7 @@ SRC_URI += " \
|
||||
file://0002-Cargo.toml-edition-2018-2021.patch \
|
||||
file://fix-leak-metric.patch \
|
||||
file://CVE-2023-23931.patch \
|
||||
file://CVE-2023-49083.patch \
|
||||
"
|
||||
|
||||
inherit pypi python_setuptools3_rust
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'| sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s : %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
|
||||
pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'| sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
|
||||
|
||||
@@ -101,6 +101,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
|
||||
file://CVE-2023-3354.patch \
|
||||
file://CVE-2023-3180.patch \
|
||||
file://CVE-2021-3638.patch \
|
||||
file://CVE-2023-1544.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
|
||||
70
meta/recipes-devtools/qemu/qemu/CVE-2023-1544.patch
Normal file
70
meta/recipes-devtools/qemu/qemu/CVE-2023-1544.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
From e7d6e37675e422cfab2fe8c6bd411d2097228760 Mon Sep 17 00:00:00 2001
|
||||
From: Yuval Shaia <yuval.shaia.ml@gmail.com>
|
||||
Date: Wed, 1 Mar 2023 16:29:26 +0200
|
||||
Subject: [PATCH] hw/pvrdma: Protect against buggy or malicious guest driver
|
||||
|
||||
Guest driver allocates and initialize page tables to be used as a ring
|
||||
of descriptors for CQ and async events.
|
||||
The page table that represents the ring, along with the number of pages
|
||||
in the page table is passed to the device.
|
||||
Currently our device supports only one page table for a ring.
|
||||
|
||||
Let's make sure that the number of page table entries the driver
|
||||
reports, do not exceeds the one page table size.
|
||||
|
||||
CVE: CVE-2023-1544
|
||||
Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/85fc35afa93c]
|
||||
|
||||
Reported-by: Soul Chen <soulchen8650@gmail.com>
|
||||
Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
|
||||
Fixes: CVE-2023-1544
|
||||
Message-ID: <20230301142926.18686-1-yuval.shaia.ml@gmail.com>
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
(cherry picked from commit 85fc35afa93c7320d1641d344d0c5dfbe341d087)
|
||||
Signed-off-by: Niranjan Pradhan <nirpradh@cisco.com>
|
||||
---
|
||||
hw/rdma/vmw/pvrdma_main.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
|
||||
index 4fc6712025..55b338046e 100644
|
||||
--- a/hw/rdma/vmw/pvrdma_main.c
|
||||
+++ b/hw/rdma/vmw/pvrdma_main.c
|
||||
@@ -91,19 +91,33 @@ static int init_dev_ring(PvrdmaRing *ring, PvrdmaRingState **ring_state,
|
||||
dma_addr_t dir_addr, uint32_t num_pages)
|
||||
{
|
||||
uint64_t *dir, *tbl;
|
||||
- int rc = 0;
|
||||
+ int max_pages, rc = 0;
|
||||
|
||||
if (!num_pages) {
|
||||
rdma_error_report("Ring pages count must be strictly positive");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Make sure we can satisfy the requested number of pages in a single
|
||||
+ * TARGET_PAGE_SIZE sized page table (taking into account that first entry
|
||||
+ * is reserved for ring-state)
|
||||
+ */
|
||||
+ max_pages = TARGET_PAGE_SIZE / sizeof(dma_addr_t) - 1;
|
||||
+ if (num_pages > max_pages) {
|
||||
+ rdma_error_report("Maximum pages on a single directory must not exceed %d\n",
|
||||
+ max_pages);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
dir = rdma_pci_dma_map(pci_dev, dir_addr, TARGET_PAGE_SIZE);
|
||||
if (!dir) {
|
||||
rdma_error_report("Failed to map to page directory (ring %s)", name);
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
+
|
||||
+ /* We support only one page table for a ring */
|
||||
tbl = rdma_pci_dma_map(pci_dev, dir[0], TARGET_PAGE_SIZE);
|
||||
if (!tbl) {
|
||||
rdma_error_report("Failed to map to page table (ring %s)", name);
|
||||
--
|
||||
2.35.6
|
||||
|
||||
@@ -119,12 +119,12 @@ def llvm_features(d):
|
||||
|
||||
|
||||
## arm-unknown-linux-gnueabihf
|
||||
DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
TARGET_ENDIAN[arm] = "little"
|
||||
TARGET_POINTER_WIDTH[arm] = "32"
|
||||
TARGET_C_INT_WIDTH[arm] = "32"
|
||||
MAX_ATOMIC_WIDTH[arm] = "64"
|
||||
FEATURES[arm] = "+v6,+vfp2"
|
||||
DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
TARGET_ENDIAN[arm-eabi] = "little"
|
||||
TARGET_POINTER_WIDTH[arm-eabi] = "32"
|
||||
TARGET_C_INT_WIDTH[arm-eabi] = "32"
|
||||
MAX_ATOMIC_WIDTH[arm-eabi] = "64"
|
||||
FEATURES[arm-eabi] = "+v6,+vfp2"
|
||||
|
||||
## armv7-unknown-linux-gnueabihf
|
||||
DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
@@ -297,6 +297,12 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""):
|
||||
sys = sys_for(d, thing)
|
||||
prefix = prefix_for(d, thing)
|
||||
|
||||
if thing == "TARGET":
|
||||
abi = d.getVar('ABIEXTENSION')
|
||||
# arm and armv7 have different targets in llvm
|
||||
if arch == "arm" and target_is_armv7(d):
|
||||
arch = 'armv7'
|
||||
|
||||
rust_arch = oe.rust.arch_to_rust_arch(arch)
|
||||
|
||||
if abi:
|
||||
@@ -307,9 +313,13 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""):
|
||||
features = features or d.getVarFlag('FEATURES', arch_abi) or ""
|
||||
features = features.strip()
|
||||
|
||||
llvm_target = d.getVar('RUST_TARGET_SYS')
|
||||
if thing == "BUILD":
|
||||
llvm_target = d.getVar('RUST_HOST_SYS')
|
||||
|
||||
# build tspec
|
||||
tspec = {}
|
||||
tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi)
|
||||
tspec['llvm-target'] = llvm_target
|
||||
tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
|
||||
tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
|
||||
tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
|
||||
|
||||
@@ -27,9 +27,10 @@ DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDP
|
||||
|
||||
python do_rust_gen_targets () {
|
||||
wd = d.getVar('WORKDIR') + '/targets/'
|
||||
rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
|
||||
rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
|
||||
# Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
|
||||
rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
|
||||
rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
|
||||
rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
|
||||
}
|
||||
|
||||
INHIBIT_DEFAULT_RUST_DEPS = "1"
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
python do_rust_gen_targets () {
|
||||
wd = d.getVar('WORKDIR') + '/targets/'
|
||||
# It is important 'TARGET' is last here so that it overrides our less
|
||||
# informed choices for BUILD & HOST if TARGET happens to be the same as
|
||||
# either of them.
|
||||
for thing in ['BUILD', 'HOST', 'TARGET']:
|
||||
bb.debug(1, "rust_gen_target for " + thing)
|
||||
features = ""
|
||||
cpu = "generic"
|
||||
arch = d.getVar('{}_ARCH'.format(thing))
|
||||
abi = ""
|
||||
if thing is "TARGET":
|
||||
abi = d.getVar('ABIEXTENSION')
|
||||
# arm and armv7 have different targets in llvm
|
||||
if arch == "arm" and target_is_armv7(d):
|
||||
arch = 'armv7'
|
||||
features = d.getVar('TARGET_LLVM_FEATURES') or ""
|
||||
cpu = d.getVar('TARGET_LLVM_CPU')
|
||||
rust_gen_target(d, thing, wd, features, cpu, arch, abi)
|
||||
# Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last
|
||||
rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
|
||||
rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
|
||||
rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
|
||||
}
|
||||
|
||||
# Otherwise we'll depend on what we provide
|
||||
|
||||
@@ -25,9 +25,11 @@ CXXFLAGS:remove = "-g"
|
||||
|
||||
LLVM_DIR = "llvm${LLVM_RELEASE}"
|
||||
|
||||
RUST_LLVM_TARGETS ?= "ARM;AArch64;Mips;PowerPC;RISCV;X86"
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_TARGETS_TO_BUILD='ARM;AArch64;Mips;PowerPC;RISCV;X86' \
|
||||
-DLLVM_TARGETS_TO_BUILD='${RUST_LLVM_TARGETS}' \
|
||||
-DLLVM_BUILD_DOCS=OFF \
|
||||
-DLLVM_ENABLE_TERMINFO=OFF \
|
||||
-DLLVM_ENABLE_ZLIB=OFF \
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
From 7e84276e07c0835a8729d6fe1265e70eedb2a7f7 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Mon, 30 Oct 2023 12:16:07 -0400
|
||||
Subject: [PATCH] changes to SIGINT handler while waiting for a child; skip
|
||||
vertical whitespace after translating an integer
|
||||
|
||||
Upstream-Status: Backport
|
||||
https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=fe24a6a55e8850298b496c5b9d82f1866eba190e
|
||||
|
||||
[Adjust and drop some codes to be applicable the tree]
|
||||
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
|
||||
---
|
||||
general.c | 5 +++--
|
||||
jobs.c | 26 ++++++++++++++++----------
|
||||
tests/redir.right | 4 ++--
|
||||
tests/redir11.sub | 2 ++
|
||||
tests/type.right | 16 ++++++++--------
|
||||
tests/type.tests | 24 ++++++++++++------------
|
||||
6 files changed, 43 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/general.c b/general.c
|
||||
index 50d5216..68987e2 100644
|
||||
--- a/general.c
|
||||
+++ b/general.c
|
||||
@@ -262,8 +262,9 @@ legal_number (string, result)
|
||||
if (errno || ep == string)
|
||||
return 0; /* errno is set on overflow or underflow */
|
||||
|
||||
- /* Skip any trailing whitespace, since strtoimax does not. */
|
||||
- while (whitespace (*ep))
|
||||
+ /* Skip any trailing whitespace, since strtoimax does not, using the same
|
||||
+ test that strtoimax uses for leading whitespace. */
|
||||
+ while (isspace ((unsigned char) *ep))
|
||||
ep++;
|
||||
|
||||
/* If *string is not '\0' but *ep is '\0' on return, the entire string
|
||||
diff --git a/jobs.c b/jobs.c
|
||||
index 7c3b6e8..84dab4d 100644
|
||||
--- a/jobs.c
|
||||
+++ b/jobs.c
|
||||
@@ -2727,6 +2727,10 @@ wait_for_background_pids (ps)
|
||||
#define INVALID_SIGNAL_HANDLER (SigHandler *)wait_for_background_pids
|
||||
static SigHandler *old_sigint_handler = INVALID_SIGNAL_HANDLER;
|
||||
|
||||
+/* The current SIGINT handler as set by restore_sigint_handler. Only valid
|
||||
+ immediately after restore_sigint_handler, used for continuations. */
|
||||
+static SigHandler *cur_sigint_handler = INVALID_SIGNAL_HANDLER;
|
||||
+
|
||||
static int wait_sigint_received;
|
||||
static int child_caught_sigint;
|
||||
|
||||
@@ -2743,6 +2747,7 @@ wait_sigint_cleanup ()
|
||||
static void
|
||||
restore_sigint_handler ()
|
||||
{
|
||||
+ cur_sigint_handler = old_sigint_handler;
|
||||
if (old_sigint_handler != INVALID_SIGNAL_HANDLER)
|
||||
{
|
||||
set_signal_handler (SIGINT, old_sigint_handler);
|
||||
@@ -2766,8 +2771,7 @@ wait_sigint_handler (sig)
|
||||
restore_sigint_handler ();
|
||||
/* If we got a SIGINT while in `wait', and SIGINT is trapped, do
|
||||
what POSIX.2 says (see builtins/wait.def for more info). */
|
||||
- if (this_shell_builtin && this_shell_builtin == wait_builtin &&
|
||||
- signal_is_trapped (SIGINT) &&
|
||||
+ if (signal_is_trapped (SIGINT) &&
|
||||
((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler))
|
||||
{
|
||||
trap_handler (SIGINT); /* set pending_traps[SIGINT] */
|
||||
@@ -2792,6 +2796,8 @@ wait_sigint_handler (sig)
|
||||
{
|
||||
set_exit_status (128+SIGINT);
|
||||
restore_sigint_handler ();
|
||||
+ if (cur_sigint_handler == INVALID_SIGNAL_HANDLER)
|
||||
+ set_sigint_handler (); /* XXX - only do this in one place */
|
||||
kill (getpid (), SIGINT);
|
||||
}
|
||||
|
||||
@@ -2934,15 +2940,15 @@ wait_for (pid, flags)
|
||||
{
|
||||
SigHandler *temp_sigint_handler;
|
||||
|
||||
- temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
|
||||
- if (temp_sigint_handler == wait_sigint_handler)
|
||||
- {
|
||||
+ temp_sigint_handler = old_sigint_handler;
|
||||
+ old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
|
||||
+ if (old_sigint_handler == wait_sigint_handler)
|
||||
+ {
|
||||
#if defined (DEBUG)
|
||||
- internal_warning ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap);
|
||||
+ internal_debug ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap);
|
||||
#endif
|
||||
- }
|
||||
- else
|
||||
- old_sigint_handler = temp_sigint_handler;
|
||||
+ old_sigint_handler = temp_sigint_handler;
|
||||
+ }
|
||||
waiting_for_child = 0;
|
||||
if (old_sigint_handler == SIG_IGN)
|
||||
set_signal_handler (SIGINT, old_sigint_handler);
|
||||
@@ -4148,7 +4154,7 @@ set_job_status_and_cleanup (job)
|
||||
SIGINT (if we reset the sighandler to the default).
|
||||
In this case, we have to fix things up. What a crock. */
|
||||
if (temp_handler == trap_handler && signal_is_trapped (SIGINT) == 0)
|
||||
- temp_handler = trap_to_sighandler (SIGINT);
|
||||
+ temp_handler = trap_to_sighandler (SIGINT);
|
||||
restore_sigint_handler ();
|
||||
if (temp_handler == SIG_DFL)
|
||||
termsig_handler (SIGINT); /* XXX */
|
||||
diff --git a/tests/redir.right b/tests/redir.right
|
||||
index 8db1041..9e1403c 100644
|
||||
--- a/tests/redir.right
|
||||
+++ b/tests/redir.right
|
||||
@@ -154,10 +154,10 @@ foo
|
||||
1
|
||||
7
|
||||
after: 42
|
||||
-./redir11.sub: line 53: $(ss= declare -i ss): ambiguous redirect
|
||||
+./redir11.sub: line 55: $(ss= declare -i ss): ambiguous redirect
|
||||
after: 42
|
||||
a+=3
|
||||
foo
|
||||
foo
|
||||
-./redir11.sub: line 75: 42: No such file or directory
|
||||
+./redir11.sub: line 77: 42: No such file or directory
|
||||
42
|
||||
diff --git a/tests/redir11.sub b/tests/redir11.sub
|
||||
index d417cdb..2a9f2b8 100644
|
||||
--- a/tests/redir11.sub
|
||||
+++ b/tests/redir11.sub
|
||||
@@ -56,6 +56,8 @@ foo()
|
||||
a=4 b=7 foo
|
||||
echo after: $a
|
||||
|
||||
+exec 7>&- 4>&-
|
||||
+
|
||||
unset a
|
||||
typeset -i a
|
||||
a=4 eval echo $(echo a+=3)
|
||||
diff --git a/tests/type.right b/tests/type.right
|
||||
index f876715..c09ab73 100644
|
||||
--- a/tests/type.right
|
||||
+++ b/tests/type.right
|
||||
@@ -24,15 +24,15 @@ func ()
|
||||
}
|
||||
while
|
||||
while is a shell keyword
|
||||
-./type.tests: line 56: type: m: not found
|
||||
-alias m='more'
|
||||
-alias m='more'
|
||||
-m is aliased to `more'
|
||||
+./type.tests: line 56: type: morealias: not found
|
||||
+alias morealias='more'
|
||||
+alias morealias='more'
|
||||
+morealias is aliased to `more'
|
||||
alias
|
||||
-alias m='more'
|
||||
-alias m='more'
|
||||
-alias m='more'
|
||||
-m is aliased to `more'
|
||||
+alias morealias='more'
|
||||
+alias morealias='more'
|
||||
+alias morealias='more'
|
||||
+morealias is aliased to `more'
|
||||
builtin
|
||||
builtin is a shell builtin
|
||||
/bin/sh
|
||||
diff --git a/tests/type.tests b/tests/type.tests
|
||||
index fd39c18..ddc1540 100644
|
||||
--- a/tests/type.tests
|
||||
+++ b/tests/type.tests
|
||||
@@ -25,8 +25,6 @@ type -r ${THIS_SH}
|
||||
type notthere
|
||||
command -v notthere
|
||||
|
||||
-alias m=more
|
||||
-
|
||||
unset -f func 2>/dev/null
|
||||
func() { echo this is func; }
|
||||
|
||||
@@ -49,24 +47,26 @@ command -V func
|
||||
command -v while
|
||||
command -V while
|
||||
|
||||
+alias morealias=more
|
||||
+
|
||||
# the following two lines should produce the same output
|
||||
# post-3.0 patch makes command -v silent, as posix specifies
|
||||
# first test with alias expansion off (should all fail or produce no output)
|
||||
-type -t m
|
||||
-type m
|
||||
-command -v m
|
||||
+type -t morealias
|
||||
+type morealias
|
||||
+command -v morealias
|
||||
alias -p
|
||||
-alias m
|
||||
+alias morealias
|
||||
|
||||
# then test with alias expansion on
|
||||
shopt -s expand_aliases
|
||||
-type m
|
||||
-type -t m
|
||||
-command -v m
|
||||
+type morealias
|
||||
+type -t morealias
|
||||
+command -v morealias
|
||||
alias -p
|
||||
-alias m
|
||||
+alias morealias
|
||||
|
||||
-command -V m
|
||||
+command -V morealias
|
||||
shopt -u expand_aliases
|
||||
|
||||
command -v builtin
|
||||
@@ -76,7 +76,7 @@ command -V /bin/sh
|
||||
|
||||
unset -f func
|
||||
type func
|
||||
-unalias m
|
||||
+unalias morealias
|
||||
type m
|
||||
|
||||
hash -r
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -16,6 +16,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
|
||||
file://makerace.patch \
|
||||
file://makerace2.patch \
|
||||
file://CVE-2022-3715.patch \
|
||||
file://0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch \
|
||||
"
|
||||
|
||||
SRC_URI[tarball.sha256sum] = "5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558"
|
||||
|
||||
@@ -23,6 +23,9 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
# however we use an external jpeg which doesn't have the issue.
|
||||
CVE_CHECK_IGNORE += "CVE-2013-6629"
|
||||
|
||||
# Issue in the GhostPCL. GhostPCL not part of this GhostScript recipe.
|
||||
CVE_CHECK_IGNORE += "CVE-2023-38560"
|
||||
|
||||
def gs_verdir(v):
|
||||
return "".join(v.split("."))
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From f993c5c88faacc43971899aae2168ffb3e34dc80 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex@linutronix.de>
|
||||
Date: Fri, 24 Sep 2021 13:36:24 +0200
|
||||
Subject: [PATCH] lib/util/mksigname.c: correctly include header for out of
|
||||
tree builds
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/sudo-project/sudo/pull/123]
|
||||
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
|
||||
---
|
||||
lib/util/mksigname.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/util/mksigname.c b/lib/util/mksigname.c
|
||||
index de8b1ad..0a69e7e 100644
|
||||
--- a/lib/util/mksigname.c
|
||||
+++ b/lib/util/mksigname.c
|
||||
@@ -36,7 +36,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
-#include "mksigname.h"
|
||||
+#include "lib/util/mksigname.h"
|
||||
|
||||
printf("const char *const sudo_sys_signame[] = {\n");
|
||||
for (i = 0; i < nitems(sudo_sys_signame); i++) {
|
||||
@@ -8,7 +8,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5100e20d35f9015f9eef6bdb27ba194f \
|
||||
file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=03e35317699ba00b496251e0dfe9f109 \
|
||||
file://lib/util/reallocarray.c;beginline=3;endline=15;md5=397dd45c7683e90b9f8bf24638cf03bf \
|
||||
file://lib/util/fnmatch.c;beginline=3;endline=27;md5=004d7d2866ba1f5b41174906849d2e0f \
|
||||
file://lib/util/getcwd.c;beginline=2;endline=27;md5=50f8d9667750e18dea4e84a935c12009 \
|
||||
file://lib/util/glob.c;beginline=2;endline=31;md5=2852f68687544e3eb8a0a61665506f0e \
|
||||
file://lib/util/snprintf.c;beginline=3;endline=33;md5=b70df6179969e38fcf68da91b53b8029 \
|
||||
file://include/sudo_queue.h;beginline=2;endline=27;md5=ad578e9664d17a010b63e4bc0576ee8d \
|
||||
@@ -29,12 +28,12 @@ EXTRA_OECONF = "--with-editor=${base_bindir}/vi --with-env-editor"
|
||||
EXTRA_OECONF:append:libc-musl = " --disable-hardening "
|
||||
|
||||
do_compile:prepend () {
|
||||
# Remove build host references from sudo_usage.h
|
||||
# Remove build host references from config.h
|
||||
sed -i \
|
||||
-e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
|
||||
-e 's,--build=${BUILD_SYS},,g' \
|
||||
-e 's,--host=${HOST_SYS},,g' \
|
||||
${B}/src/sudo_usage.h
|
||||
${B}/config.h
|
||||
}
|
||||
|
||||
# Explicitly create ${localstatedir}/lib before do_install to ensure
|
||||
|
||||
@@ -3,12 +3,11 @@ require sudo.inc
|
||||
SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
|
||||
file://0001-sudo.conf.in-fix-conflict-with-multilib.patch \
|
||||
file://0001-lib-util-mksigname.c-correctly-include-header-for-ou.patch \
|
||||
"
|
||||
|
||||
PAM_SRC_URI = "file://sudo.pam"
|
||||
|
||||
SRC_URI[sha256sum] = "92334a12bb93e0c056b09f53e255ccb7d6f67c6350e2813cd9593ceeca78560b"
|
||||
SRC_URI[sha256sum] = "199c0cdbfa7efcfffa9c88684a8e2fb206a62b70a316507e4a91c89c873bbcc8"
|
||||
|
||||
DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
||||
RDEPENDS:${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
|
||||
@@ -0,0 +1,84 @@
|
||||
From 541ab2ecd41d4d8689e71855d93e492bc554719a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 3 Oct 2023 11:53:05 +1000
|
||||
Subject: [PATCH] Xi/randr: fix handling of PropModeAppend/Prepend
|
||||
|
||||
The handling of appending/prepending properties was incorrect, with at
|
||||
least two bugs: the property length was set to the length of the new
|
||||
part only, i.e. appending or prepending N elements to a property with P
|
||||
existing elements always resulted in the property having N elements
|
||||
instead of N + P.
|
||||
|
||||
Second, when pre-pending a value to a property, the offset for the old
|
||||
values was incorrect, leaving the new property with potentially
|
||||
uninitalized values and/or resulting in OOB memory writes.
|
||||
For example, prepending a 3 element value to a 5 element property would
|
||||
result in this 8 value array:
|
||||
[N, N, N, ?, ?, P, P, P ] P, P
|
||||
^OOB write
|
||||
|
||||
The XI2 code is a copy/paste of the RandR code, so the bug exists in
|
||||
both.
|
||||
|
||||
CVE-2023-5367, ZDI-CAN-22153
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/541ab2ecd41d4d8689e71855d93e492bc554719a]
|
||||
CVE: CVE-2023-5367
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
Xi/xiproperty.c | 4 ++--
|
||||
randr/rrproperty.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
|
||||
index 066ba21fba..d315f04d0e 100644
|
||||
--- a/Xi/xiproperty.c
|
||||
+++ b/Xi/xiproperty.c
|
||||
@@ -730,7 +730,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||
XIDestroyDeviceProperty(prop);
|
||||
return BadAlloc;
|
||||
}
|
||||
- new_value.size = len;
|
||||
+ new_value.size = total_len;
|
||||
new_value.type = type;
|
||||
new_value.format = format;
|
||||
|
||||
@@ -747,7 +747,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||
case PropModePrepend:
|
||||
new_data = new_value.data;
|
||||
old_data = (void *) (((char *) new_value.data) +
|
||||
- (prop_value->size * size_in_bytes));
|
||||
+ (len * size_in_bytes));
|
||||
break;
|
||||
}
|
||||
if (new_data)
|
||||
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
|
||||
index c2fb9585c6..25469f57b2 100644
|
||||
--- a/randr/rrproperty.c
|
||||
+++ b/randr/rrproperty.c
|
||||
@@ -209,7 +209,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
||||
RRDestroyOutputProperty(prop);
|
||||
return BadAlloc;
|
||||
}
|
||||
- new_value.size = len;
|
||||
+ new_value.size = total_len;
|
||||
new_value.type = type;
|
||||
new_value.format = format;
|
||||
|
||||
@@ -226,7 +226,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
||||
case PropModePrepend:
|
||||
new_data = new_value.data;
|
||||
old_data = (void *) (((char *) new_value.data) +
|
||||
- (prop_value->size * size_in_bytes));
|
||||
+ (len * size_in_bytes));
|
||||
break;
|
||||
}
|
||||
if (new_data)
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
From 564ccf2ce9616620456102727acb8b0256b7bbd7 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu, 5 Oct 2023 12:19:45 +1000
|
||||
Subject: [PATCH] mi: reset the PointerWindows reference on screen switch
|
||||
|
||||
PointerWindows[] keeps a reference to the last window our sprite
|
||||
entered - changes are usually handled by CheckMotion().
|
||||
|
||||
If we switch between screens via XWarpPointer our
|
||||
dev->spriteInfo->sprite->win is set to the new screen's root window.
|
||||
If there's another window at the cursor location CheckMotion() will
|
||||
trigger the right enter/leave events later. If there is not, it skips
|
||||
that process and we never trigger LeaveWindow() - PointerWindows[] for
|
||||
the device still refers to the previous window.
|
||||
|
||||
If that window is destroyed we have a dangling reference that will
|
||||
eventually cause a use-after-free bug when checking the window hierarchy
|
||||
later.
|
||||
|
||||
To trigger this, we require:
|
||||
- two protocol screens
|
||||
- XWarpPointer to the other screen's root window
|
||||
- XDestroyWindow before entering any other window
|
||||
|
||||
This is a niche bug so we hack around it by making sure we reset the
|
||||
PointerWindows[] entry so we cannot have a dangling pointer. This
|
||||
doesn't handle Enter/Leave events correctly but the previous code didn't
|
||||
either.
|
||||
|
||||
CVE-2023-5380, ZDI-CAN-21608
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Sri working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/564ccf2ce9616620456102727acb8b0256b7bbd7]
|
||||
CVE: CVE-2023-5380
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
dix/enterleave.h | 2 --
|
||||
include/eventstr.h | 3 +++
|
||||
mi/mipointer.c | 17 +++++++++++++++--
|
||||
3 files changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dix/enterleave.h b/dix/enterleave.h
|
||||
index 4b833d8a3b..e8af924c68 100644
|
||||
--- a/dix/enterleave.h
|
||||
+++ b/dix/enterleave.h
|
||||
@@ -58,8 +58,6 @@ extern void DeviceFocusEvent(DeviceIntPtr dev,
|
||||
|
||||
extern void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode);
|
||||
|
||||
-extern void LeaveWindow(DeviceIntPtr dev);
|
||||
-
|
||||
extern void CoreFocusEvent(DeviceIntPtr kbd,
|
||||
int type, int mode, int detail, WindowPtr pWin);
|
||||
|
||||
diff --git a/include/eventstr.h b/include/eventstr.h
|
||||
index 93308f9b24..a9926eaeef 100644
|
||||
--- a/include/eventstr.h
|
||||
+++ b/include/eventstr.h
|
||||
@@ -335,4 +335,7 @@ union _InternalEvent {
|
||||
GestureEvent gesture_event;
|
||||
};
|
||||
|
||||
+extern void
|
||||
+LeaveWindow(DeviceIntPtr dev);
|
||||
+
|
||||
#endif
|
||||
diff --git a/mi/mipointer.c b/mi/mipointer.c
|
||||
index a638f25d4a..8cf0035140 100644
|
||||
--- a/mi/mipointer.c
|
||||
+++ b/mi/mipointer.c
|
||||
@@ -397,8 +397,21 @@ miPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||
#ifdef PANORAMIX
|
||||
&& noPanoramiXExtension
|
||||
#endif
|
||||
- )
|
||||
- UpdateSpriteForScreen(pDev, pScreen);
|
||||
+ ) {
|
||||
+ DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
|
||||
+ /* Hack for CVE-2023-5380: if we're moving
|
||||
+ * screens PointerWindows[] keeps referring to the
|
||||
+ * old window. If that gets destroyed we have a UAF
|
||||
+ * bug later. Only happens when jumping from a window
|
||||
+ * to the root window on the other screen.
|
||||
+ * Enter/Leave events are incorrect for that case but
|
||||
+ * too niche to fix.
|
||||
+ */
|
||||
+ LeaveWindow(pDev);
|
||||
+ if (master)
|
||||
+ LeaveWindow(master);
|
||||
+ UpdateSpriteForScreen(pDev, pScreen);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -2,6 +2,8 @@ require xserver-xorg.inc
|
||||
|
||||
SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \
|
||||
file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \
|
||||
file://CVE-2023-5367.patch \
|
||||
file://CVE-2023-5380.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152"
|
||||
|
||||
|
||||
85
meta/recipes-graphics/xwayland/xwayland/CVE-2023-5367.patch
Normal file
85
meta/recipes-graphics/xwayland/xwayland/CVE-2023-5367.patch
Normal file
@@ -0,0 +1,85 @@
|
||||
CVE: CVE-2023-5367
|
||||
Upstream-Status: Backport [ https://gitlab.freedesktop.org/xorg/xserver/-/commit/541ab2ecd41d4d8689e71855d93e492bc554719a ]
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
|
||||
|
||||
From 541ab2ecd41d4d8689e71855d93e492bc554719a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue, 3 Oct 2023 11:53:05 +1000
|
||||
Subject: [PATCH] Xi/randr: fix handling of PropModeAppend/Prepend
|
||||
|
||||
The handling of appending/prepending properties was incorrect, with at
|
||||
least two bugs: the property length was set to the length of the new
|
||||
part only, i.e. appending or prepending N elements to a property with P
|
||||
existing elements always resulted in the property having N elements
|
||||
instead of N + P.
|
||||
|
||||
Second, when pre-pending a value to a property, the offset for the old
|
||||
values was incorrect, leaving the new property with potentially
|
||||
uninitalized values and/or resulting in OOB memory writes.
|
||||
For example, prepending a 3 element value to a 5 element property would
|
||||
result in this 8 value array:
|
||||
[N, N, N, ?, ?, P, P, P ] P, P
|
||||
^OOB write
|
||||
|
||||
The XI2 code is a copy/paste of the RandR code, so the bug exists in
|
||||
both.
|
||||
|
||||
CVE-2023-5367, ZDI-CAN-22153
|
||||
|
||||
This vulnerability was discovered by:
|
||||
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
Xi/xiproperty.c | 4 ++--
|
||||
randr/rrproperty.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
|
||||
index 066ba21fba..d315f04d0e 100644
|
||||
--- a/Xi/xiproperty.c
|
||||
+++ b/Xi/xiproperty.c
|
||||
@@ -730,7 +730,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||
XIDestroyDeviceProperty(prop);
|
||||
return BadAlloc;
|
||||
}
|
||||
- new_value.size = len;
|
||||
+ new_value.size = total_len;
|
||||
new_value.type = type;
|
||||
new_value.format = format;
|
||||
|
||||
@@ -747,7 +747,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||
case PropModePrepend:
|
||||
new_data = new_value.data;
|
||||
old_data = (void *) (((char *) new_value.data) +
|
||||
- (prop_value->size * size_in_bytes));
|
||||
+ (len * size_in_bytes));
|
||||
break;
|
||||
}
|
||||
if (new_data)
|
||||
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
|
||||
index c2fb9585c6..25469f57b2 100644
|
||||
--- a/randr/rrproperty.c
|
||||
+++ b/randr/rrproperty.c
|
||||
@@ -209,7 +209,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
||||
RRDestroyOutputProperty(prop);
|
||||
return BadAlloc;
|
||||
}
|
||||
- new_value.size = len;
|
||||
+ new_value.size = total_len;
|
||||
new_value.type = type;
|
||||
new_value.format = format;
|
||||
|
||||
@@ -226,7 +226,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
||||
case PropModePrepend:
|
||||
new_data = new_value.data;
|
||||
old_data = (void *) (((char *) new_value.data) +
|
||||
- (prop_value->size * size_in_bytes));
|
||||
+ (len * size_in_bytes));
|
||||
break;
|
||||
}
|
||||
if (new_data)
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -9,7 +9,9 @@ HOMEPAGE = "https://fedoraproject.org/wiki/Changes/XwaylandStandalone"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880"
|
||||
|
||||
SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz"
|
||||
SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz \
|
||||
file://CVE-2023-5367.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "d11eeee73290b88ea8da42a7d9350dedfaba856ce4ae44e58c045ad9ecaa2f73"
|
||||
|
||||
UPSTREAM_CHECK_REGEX = "xwayland-(?P<pver>\d+(\.(?!90\d)\d+)+)\.tar"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
# Auto-generated CVE metadata, DO NOT EDIT BY HAND.
|
||||
# Generated at 2023-10-24 06:17:08.900468 for version 5.10.197
|
||||
# Generated at 2023-12-05 05:25:07.507188 for version 5.10.202
|
||||
|
||||
python check_kernel_cve_status_version() {
|
||||
this_version = "5.10.197"
|
||||
this_version = "5.10.202"
|
||||
kernel_version = d.getVar("LINUX_VERSION")
|
||||
if kernel_version != this_version:
|
||||
bb.warn("Kernel CVE status needs updating: generated for %s but kernel is %s" % (this_version, kernel_version))
|
||||
@@ -5651,7 +5651,8 @@ CVE_CHECK_IGNORE += "CVE-2021-43976"
|
||||
# cpe-stable-backport: Backported in 5.10.89
|
||||
CVE_CHECK_IGNORE += "CVE-2021-44733"
|
||||
|
||||
# CVE-2021-44879 needs backporting (fixed from 5.17rc1)
|
||||
# cpe-stable-backport: Backported in 5.10.200
|
||||
CVE_CHECK_IGNORE += "CVE-2021-44879"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.91
|
||||
CVE_CHECK_IGNORE += "CVE-2021-45095"
|
||||
@@ -6515,7 +6516,7 @@ CVE_CHECK_IGNORE += "CVE-2022-43945"
|
||||
|
||||
# CVE-2022-44033 needs backporting (fixed from 6.4rc1)
|
||||
|
||||
# CVE-2022-44034 has no known resolution
|
||||
# CVE-2022-44034 needs backporting (fixed from 6.4rc1)
|
||||
|
||||
# CVE-2022-4543 has no known resolution
|
||||
|
||||
@@ -6686,7 +6687,8 @@ CVE_CHECK_IGNORE += "CVE-2023-1118"
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-1192"
|
||||
|
||||
# CVE-2023-1193 has no known resolution
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-1193"
|
||||
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-1194"
|
||||
@@ -6982,7 +6984,8 @@ CVE_CHECK_IGNORE += "CVE-2023-3106"
|
||||
|
||||
# CVE-2023-31084 needs backporting (fixed from 6.4rc3)
|
||||
|
||||
# CVE-2023-31085 needs backporting (fixed from 5.10.198)
|
||||
# cpe-stable-backport: Backported in 5.10.198
|
||||
CVE_CHECK_IGNORE += "CVE-2023-31085"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.184
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3111"
|
||||
@@ -7098,7 +7101,8 @@ CVE_CHECK_IGNORE += "CVE-2023-34256"
|
||||
# fixed-version: only affects 6.1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-34319"
|
||||
|
||||
# CVE-2023-34324 needs backporting (fixed from 5.10.198)
|
||||
# cpe-stable-backport: Backported in 5.10.198
|
||||
CVE_CHECK_IGNORE += "CVE-2023-34324"
|
||||
|
||||
# fixed-version: only affects 5.15rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3439"
|
||||
@@ -7123,7 +7127,8 @@ CVE_CHECK_IGNORE += "CVE-2023-35824"
|
||||
# fixed-version: only affects 5.18rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-35826"
|
||||
|
||||
# CVE-2023-35827 has no known resolution
|
||||
# cpe-stable-backport: Backported in 5.10.199
|
||||
CVE_CHECK_IGNORE += "CVE-2023-35827"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.180
|
||||
CVE_CHECK_IGNORE += "CVE-2023-35828"
|
||||
@@ -7201,7 +7206,8 @@ CVE_CHECK_IGNORE += "CVE-2023-3867"
|
||||
# cpe-stable-backport: Backported in 5.10.195
|
||||
CVE_CHECK_IGNORE += "CVE-2023-39189"
|
||||
|
||||
# CVE-2023-39191 needs backporting (fixed from 6.3rc1)
|
||||
# fixed-version: only affects 5.19rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-39191"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.195
|
||||
CVE_CHECK_IGNORE += "CVE-2023-39192"
|
||||
@@ -7212,6 +7218,11 @@ CVE_CHECK_IGNORE += "CVE-2023-39193"
|
||||
# cpe-stable-backport: Backported in 5.10.192
|
||||
CVE_CHECK_IGNORE += "CVE-2023-39194"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.188
|
||||
CVE_CHECK_IGNORE += "CVE-2023-39197"
|
||||
|
||||
# CVE-2023-39198 needs backporting (fixed from 6.5rc7)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.188
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4004"
|
||||
|
||||
@@ -7223,7 +7234,8 @@ CVE_CHECK_IGNORE += "CVE-2023-4015"
|
||||
# cpe-stable-backport: Backported in 5.10.190
|
||||
CVE_CHECK_IGNORE += "CVE-2023-40283"
|
||||
|
||||
# CVE-2023-40791 needs backporting (fixed from 6.5rc6)
|
||||
# fixed-version: only affects 6.3rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-40791"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.190
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4128"
|
||||
@@ -7253,7 +7265,8 @@ CVE_CHECK_IGNORE += "CVE-2023-4207"
|
||||
# cpe-stable-backport: Backported in 5.10.190
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4208"
|
||||
|
||||
# CVE-2023-4244 needs backporting (fixed from 5.10.198)
|
||||
# cpe-stable-backport: Backported in 5.10.198
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4244"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.190
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4273"
|
||||
@@ -7264,7 +7277,8 @@ CVE_CHECK_IGNORE += "CVE-2023-42752"
|
||||
# cpe-stable-backport: Backported in 5.10.195
|
||||
CVE_CHECK_IGNORE += "CVE-2023-42753"
|
||||
|
||||
# CVE-2023-42754 needs backporting (fixed from 5.10.198)
|
||||
# cpe-stable-backport: Backported in 5.10.198
|
||||
CVE_CHECK_IGNORE += "CVE-2023-42754"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.197
|
||||
CVE_CHECK_IGNORE += "CVE-2023-42755"
|
||||
@@ -7290,7 +7304,8 @@ CVE_CHECK_IGNORE += "CVE-2023-44466"
|
||||
# cpe-stable-backport: Backported in 5.10.118
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4459"
|
||||
|
||||
# CVE-2023-4563 needs backporting (fixed from 5.10.198)
|
||||
# cpe-stable-backport: Backported in 5.10.198
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4563"
|
||||
|
||||
# fixed-version: only affects 5.13rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4569"
|
||||
@@ -7298,14 +7313,16 @@ CVE_CHECK_IGNORE += "CVE-2023-4569"
|
||||
# cpe-stable-backport: Backported in 5.10.173
|
||||
CVE_CHECK_IGNORE += "CVE-2023-45862"
|
||||
|
||||
# CVE-2023-45863 needs backporting (fixed from 6.3rc1)
|
||||
# cpe-stable-backport: Backported in 5.10.200
|
||||
CVE_CHECK_IGNORE += "CVE-2023-45863"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.195
|
||||
CVE_CHECK_IGNORE += "CVE-2023-45871"
|
||||
|
||||
# CVE-2023-45898 needs backporting (fixed from 6.6rc1)
|
||||
# fixed-version: only affects 6.5rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-45898"
|
||||
|
||||
# CVE-2023-4610 has no known resolution
|
||||
# CVE-2023-4610 needs backporting (fixed from 6.4)
|
||||
|
||||
# fixed-version: only affects 6.4rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4611"
|
||||
@@ -7315,18 +7332,55 @@ CVE_CHECK_IGNORE += "CVE-2023-4611"
|
||||
# cpe-stable-backport: Backported in 5.10.195
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4623"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.199
|
||||
CVE_CHECK_IGNORE += "CVE-2023-46813"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.202
|
||||
CVE_CHECK_IGNORE += "CVE-2023-46862"
|
||||
|
||||
# CVE-2023-47233 has no known resolution
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.53
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4732"
|
||||
|
||||
# CVE-2023-4881 needs backporting (fixed from 5.10.198)
|
||||
# cpe-stable-backport: Backported in 5.10.198
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4881"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.195
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4921"
|
||||
|
||||
# CVE-2023-5158 has no known resolution
|
||||
# fixed-version: only affects 6.0rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-5090"
|
||||
|
||||
# CVE-2023-5197 needs backporting (fixed from 5.10.198)
|
||||
# fixed-version: only affects 5.13rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-5158"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.199
|
||||
CVE_CHECK_IGNORE += "CVE-2023-5178"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.198
|
||||
CVE_CHECK_IGNORE += "CVE-2023-5197"
|
||||
|
||||
# fixed-version: only affects 6.1rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-5345"
|
||||
|
||||
# fixed-version: only affects 6.2 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-5633"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.199
|
||||
CVE_CHECK_IGNORE += "CVE-2023-5717"
|
||||
|
||||
# CVE-2023-5972 needs backporting (fixed from 6.6rc7)
|
||||
|
||||
# CVE-2023-6039 needs backporting (fixed from 6.5rc5)
|
||||
|
||||
# fixed-version: only affects 6.6rc3 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-6111"
|
||||
|
||||
# CVE-2023-6121 needs backporting (fixed from 6.7rc3)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.10.195
|
||||
CVE_CHECK_IGNORE += "CVE-2023-6176"
|
||||
|
||||
# CVE-2023-6238 has no known resolution
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "361bd6dc8f750afb690d28fd9aab33d116b38f68"
|
||||
SRCREV_meta ?= "080adc96faafd98d2370b009338fcad42cf8e5fd"
|
||||
SRCREV_machine ?= "4c84fd48919bf3fa759cd02947899e90b5f13be1"
|
||||
SRCREV_meta ?= "0ac177cb2df1cff8799d72b9224ed69423a22eef"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
|
||||
|
||||
LINUX_VERSION ?= "5.10.197"
|
||||
LINUX_VERSION ?= "5.10.202"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
|
||||
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
LINUX_VERSION ?= "5.10.197"
|
||||
LINUX_VERSION ?= "5.10.202"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
|
||||
KMETA = "kernel-meta"
|
||||
KCONF_BSP_AUDIT_LEVEL = "2"
|
||||
|
||||
SRCREV_machine:qemuarm ?= "c27508f48245090385d55b192f866b6ad60a79f7"
|
||||
SRCREV_machine ?= "3050ddb1d59017a62d3d7d589a11d168be86b6a3"
|
||||
SRCREV_meta ?= "080adc96faafd98d2370b009338fcad42cf8e5fd"
|
||||
SRCREV_machine:qemuarm ?= "b010aecb876ae2adf4548989459cc4878035d1ad"
|
||||
SRCREV_machine ?= "69bfe10cd8d98c45a361d2efdddfc1bb940f5601"
|
||||
SRCREV_meta ?= "0ac177cb2df1cff8799d72b9224ed69423a22eef"
|
||||
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -14,23 +14,23 @@ KBRANCH:qemux86 ?= "v5.10/standard/base"
|
||||
KBRANCH:qemux86-64 ?= "v5.10/standard/base"
|
||||
KBRANCH:qemumips64 ?= "v5.10/standard/mti-malta64"
|
||||
|
||||
SRCREV_machine:qemuarm ?= "28db2d5b2451e2c6b055dcd65bbe2fa581fa1538"
|
||||
SRCREV_machine:qemuarm64 ?= "3f6544c8ee1330484b5c341dcac662ef73836a0e"
|
||||
SRCREV_machine:qemumips ?= "7643ee350375086f23ddffbe1613150ce988dce5"
|
||||
SRCREV_machine:qemuppc ?= "9320f948b72a073ab0c27f0ca884842bb8eed036"
|
||||
SRCREV_machine:qemuriscv64 ?= "4eedb5d32121ace6ad137e7d01b22f94c592923e"
|
||||
SRCREV_machine:qemuriscv32 ?= "4eedb5d32121ace6ad137e7d01b22f94c592923e"
|
||||
SRCREV_machine:qemux86 ?= "4eedb5d32121ace6ad137e7d01b22f94c592923e"
|
||||
SRCREV_machine:qemux86-64 ?= "4eedb5d32121ace6ad137e7d01b22f94c592923e"
|
||||
SRCREV_machine:qemumips64 ?= "a3f4193c0ed91cbcfaed2e6cc984eb4906e511e0"
|
||||
SRCREV_machine ?= "4eedb5d32121ace6ad137e7d01b22f94c592923e"
|
||||
SRCREV_meta ?= "080adc96faafd98d2370b009338fcad42cf8e5fd"
|
||||
SRCREV_machine:qemuarm ?= "cf28b49bd6d196edf71e532b95675b683f24adca"
|
||||
SRCREV_machine:qemuarm64 ?= "255936309d9ae21a5b5b76bbf4c4392b997eafdf"
|
||||
SRCREV_machine:qemumips ?= "fa8423d3d00a45d8ee4b64684fd2111d10e48b67"
|
||||
SRCREV_machine:qemuppc ?= "3c348c832ffb927a3f580e40d8190f385dfdce12"
|
||||
SRCREV_machine:qemuriscv64 ?= "d05c0de69c0091d4ec418a225cfd942bd666630c"
|
||||
SRCREV_machine:qemuriscv32 ?= "d05c0de69c0091d4ec418a225cfd942bd666630c"
|
||||
SRCREV_machine:qemux86 ?= "d05c0de69c0091d4ec418a225cfd942bd666630c"
|
||||
SRCREV_machine:qemux86-64 ?= "d05c0de69c0091d4ec418a225cfd942bd666630c"
|
||||
SRCREV_machine:qemumips64 ?= "d38df4bfa230e568606fda66ec7ae697ed41e9ca"
|
||||
SRCREV_machine ?= "d05c0de69c0091d4ec418a225cfd942bd666630c"
|
||||
SRCREV_meta ?= "0ac177cb2df1cff8799d72b9224ed69423a22eef"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
|
||||
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
LINUX_VERSION ?= "5.10.197"
|
||||
LINUX_VERSION ?= "5.10.202"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
|
||||
DEPENDS += "openssl-native util-linux-native"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From df3425f51a512f65522522daf1f78c7fab0a63fd Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Merey <amerey@redhat.com>
|
||||
Date: Fri, 25 Feb 2022 19:18:29 -0500
|
||||
Subject: [PATCH] bpf-translate.cxx: Prevent -Werror=maybe-uninitialized
|
||||
|
||||
Two variables in bpf-translate.cxx can trigger -Werror=maybe-uninitialized.
|
||||
The code is designed so that uninitialized uses are not actually possible,
|
||||
but to convince gcc of this we move a throw statement and initialize one
|
||||
of the variables with a value.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=df3425f51a512f65522522daf1f78c7fab0a63fd]
|
||||
|
||||
Signed-off-by: Li Wang <li.wang@windriver.com>
|
||||
---
|
||||
bpf-translate.cxx | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/bpf-translate.cxx b/bpf-translate.cxx
|
||||
index 3f45c721f..1b63d6078 100644
|
||||
--- a/bpf-translate.cxx
|
||||
+++ b/bpf-translate.cxx
|
||||
@@ -1203,7 +1203,7 @@ bpf_unparser::emit_asm_arg (const asm_stmt &stmt, const std::string &arg,
|
||||
{
|
||||
/* arg is a register number */
|
||||
std::string reg = arg[0] == 'r' ? arg.substr(1) : arg;
|
||||
- unsigned long num;
|
||||
+ unsigned long num = ULONG_MAX;
|
||||
bool parsed = false;
|
||||
try {
|
||||
num = stoul(reg, 0, 0);
|
||||
@@ -1941,8 +1941,6 @@ bpf_unparser::visit_foreach_loop(foreach_loop* s)
|
||||
for (unsigned k = 0; k < arraydecl->index_types.size(); k++)
|
||||
{
|
||||
auto type = arraydecl->index_types[k];
|
||||
- if (type != pe_long && type != pe_string)
|
||||
- throw SEMANTIC_ERROR(_("unhandled foreach index type"), s->tok);
|
||||
int this_column_size;
|
||||
// PR23875: foreach should handle string keys
|
||||
if (type == pe_long)
|
||||
@@ -1953,6 +1951,10 @@ bpf_unparser::visit_foreach_loop(foreach_loop* s)
|
||||
{
|
||||
this_column_size = BPF_MAXSTRINGLEN;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ throw SEMANTIC_ERROR(_("unhandled foreach index type"), s->tok);
|
||||
+ }
|
||||
if (info.sort_column == k + 1) // record sort column
|
||||
{
|
||||
info.sort_column_size = this_column_size;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -9,6 +9,7 @@ require systemtap_git.inc
|
||||
SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch \
|
||||
file://0001-staprun-address-ncurses-6.3-failures.patch \
|
||||
file://0001-gcc12-c-compatibility-re-tweak-for-rhel6-use-functio.patch \
|
||||
file://0001-bpf-translate.cxx-Prevent-Werror-maybe-uninitialized.patch \
|
||||
"
|
||||
|
||||
DEPENDS = "elfutils"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 1db83d3f745332cbda6adf954b2c53a10caa205e Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
|
||||
Date: Wed, 4 Oct 2023 11:14:38 +0200
|
||||
Subject: [PATCH] codecparsers: av1: Clip max tile rows and cols values
|
||||
|
||||
Clip tile rows and cols to 64 as describe in AV1 specification.
|
||||
|
||||
Fixes ZDI-CAN-22226 / CVE-2023-44429
|
||||
|
||||
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3015
|
||||
|
||||
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5634>
|
||||
|
||||
CVE: CVE-2023-44429
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/1db83d3f745332cbda6adf954b2c53a10caa205e]
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
gst-libs/gst/codecparsers/gstav1parser.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gst-libs/gst/codecparsers/gstav1parser.c b/gst-libs/gst/codecparsers/gstav1parser.c
|
||||
index 7b9378c..68f8a76 100644
|
||||
--- a/gst-libs/gst/codecparsers/gstav1parser.c
|
||||
+++ b/gst-libs/gst/codecparsers/gstav1parser.c
|
||||
@@ -2219,6 +2219,8 @@ gst_av1_parse_tile_info (GstAV1Parser * parser, GstBitReader * br,
|
||||
((parser->state.mi_cols + 31) >> 5) : ((parser->state.mi_cols + 15) >> 4);
|
||||
sb_rows = seq_header->use_128x128_superblock ? ((parser->state.mi_rows +
|
||||
31) >> 5) : ((parser->state.mi_rows + 15) >> 4);
|
||||
+ sb_cols = MIN (GST_AV1_MAX_TILE_COLS, sb_cols);
|
||||
+ sb_rows = MIN (GST_AV1_MAX_TILE_ROWS, sb_rows);
|
||||
sb_shift = seq_header->use_128x128_superblock ? 5 : 4;
|
||||
sb_size = sb_shift + 2;
|
||||
max_tile_width_sb = GST_AV1_MAX_TILE_WIDTH >> sb_size;
|
||||
--
|
||||
2.40.0
|
||||
@@ -13,6 +13,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad
|
||||
file://CVE-2023-40474.patch \
|
||||
file://CVE-2023-40475.patch \
|
||||
file://CVE-2023-40476.patch \
|
||||
file://CVE-2023-44429.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "87251beebfd1325e5118cc67774061f6e8971761ca65a9e5957919610080d195"
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ inherit gobject-introspection
|
||||
|
||||
# opengl packageconfig factored out to make it easy for distros
|
||||
# and BSP layers to choose OpenGL APIs/platforms/window systems
|
||||
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
|
||||
PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}"
|
||||
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}"
|
||||
|
||||
PACKAGECONFIG ??= " \
|
||||
${GSTREAMER_ORC} \
|
||||
@@ -32,7 +33,7 @@ PACKAGECONFIG ??= " \
|
||||
"
|
||||
|
||||
OPENGL_APIS = 'opengl gles2'
|
||||
OPENGL_PLATFORMS = 'egl'
|
||||
OPENGL_PLATFORMS = 'egl glx'
|
||||
|
||||
X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
|
||||
X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
|
||||
@@ -61,6 +62,7 @@ PACKAGECONFIG[gles2] = ",,virtual/libgles2"
|
||||
|
||||
# OpenGL platform packageconfigs
|
||||
PACKAGECONFIG[egl] = ",,virtual/egl"
|
||||
PACKAGECONFIG[glx] = ",,virtual/libgl"
|
||||
|
||||
# OpenGL window systems (except for X11)
|
||||
PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 0754562e13d2e63a248a1c82f90b30bc0ffe307c Mon Sep 17 00:00:00 2001
|
||||
From: Alex Stewart <alex.stewart@ni.com>
|
||||
Date: Tue, 10 Oct 2023 16:10:34 -0400
|
||||
Subject: [PATCH] mat4/mat5: fix int overflow in dataend calculation
|
||||
|
||||
The clang sanitizer warns of a possible signed integer overflow when
|
||||
calculating the `dataend` value in `mat4_read_header()`.
|
||||
|
||||
```
|
||||
src/mat4.c:323:41: runtime error: signed integer overflow: 205 * -100663296 cannot be represented in type 'int'
|
||||
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:41 in
|
||||
src/mat4.c:323:48: runtime error: signed integer overflow: 838860800 * 4 cannot be represented in type 'int'
|
||||
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mat4.c:323:48 in
|
||||
```
|
||||
|
||||
Cast the offending `rows` and `cols` ints to `sf_count_t` (the type of
|
||||
`dataend` before performing the calculation, to avoid the issue.
|
||||
|
||||
CVE: CVE-2022-33065
|
||||
Fixes: https://github.com/libsndfile/libsndfile/issues/789
|
||||
Fixes: https://github.com/libsndfile/libsndfile/issues/833
|
||||
|
||||
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/libsndfile/libsndfile/commit/0754562e13d2e63a248a1c82f90b30bc0ffe307c]
|
||||
CVE: CVE-2022-33065
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
src/mat4.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/mat4.c b/src/mat4.c
|
||||
index 0b1b414..575683b 100644
|
||||
--- a/src/mat4.c
|
||||
+++ b/src/mat4.c
|
||||
@@ -320,7 +320,7 @@ mat4_read_header (SF_PRIVATE *psf)
|
||||
psf->filelength - psf->dataoffset, psf->sf.channels * psf->sf.frames * psf->bytewidth) ;
|
||||
}
|
||||
else if ((psf->filelength - psf->dataoffset) > psf->sf.channels * psf->sf.frames * psf->bytewidth)
|
||||
- psf->dataend = psf->dataoffset + rows * cols * psf->bytewidth ;
|
||||
+ psf->dataend = psf->dataoffset + (sf_count_t) rows * (sf_count_t) cols * psf->bytewidth ;
|
||||
|
||||
psf->datalength = psf->filelength - psf->dataoffset - psf->dataend ;
|
||||
|
||||
--
|
||||
2.40.1
|
||||
@@ -11,6 +11,7 @@ LICENSE = "LGPL-2.1-only"
|
||||
SRC_URI = "https://github.com/libsndfile/libsndfile/releases/download/${PV}/libsndfile-${PV}.tar.bz2 \
|
||||
file://noopus.patch \
|
||||
file://0001-flac-Fix-improper-buffer-reusing-732.patch \
|
||||
file://CVE-2022-33065.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_URI = "https://github.com/libsndfile/libsndfile/releases/"
|
||||
|
||||
|
||||
69
meta/recipes-multimedia/libtiff/tiff/CVE-2023-41175.patch
Normal file
69
meta/recipes-multimedia/libtiff/tiff/CVE-2023-41175.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
From 6e2dac5f904496d127c92ddc4e56eccfca25c2ee Mon Sep 17 00:00:00 2001
|
||||
From: Arie Haenel <arie.haenel@jct.ac.il>
|
||||
Date: Wed, 19 Jul 2023 19:40:01 +0000
|
||||
Subject: [PATCH] raw2tiff: fix integer overflow and bypass of the check (fixes #592)
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/6e2dac5f904496d127c92ddc4e56eccfca25c2ee]
|
||||
CVE: CVE-2023-41175
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
tools/raw2tiff.c | 29 +++++++++++++++++++++++++++++
|
||||
1 file changed, 29 insertions(+)
|
||||
|
||||
diff --git a/tools/raw2tiff.c b/tools/raw2tiff.c
|
||||
index dfee715..253c023 100644
|
||||
--- a/tools/raw2tiff.c
|
||||
+++ b/tools/raw2tiff.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
@@ -101,6 +102,7 @@ main(int argc, char* argv[])
|
||||
int fd;
|
||||
char *outfilename = NULL;
|
||||
TIFF *out;
|
||||
+ uint32_t temp_limit_check = 0; /* temp for integer overflow checking*/
|
||||
|
||||
uint32_t row, col, band;
|
||||
int c;
|
||||
@@ -212,6 +214,33 @@ main(int argc, char* argv[])
|
||||
if (guessSize(fd, dtype, hdr_size, nbands, swab, &width, &length) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
+ /* check for integer overflow in */
|
||||
+ /* hdr_size + (*width) * (*length) * nbands * depth */
|
||||
+
|
||||
+ if ((width == 0) || (length == 0) ){
|
||||
+ fprintf(stderr, "Too large nbands value specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ temp_limit_check = nbands * depth;
|
||||
+
|
||||
+ if ( !temp_limit_check || length > ( UINT_MAX / temp_limit_check ) ) {
|
||||
+ fprintf(stderr, "Too large length size specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+ temp_limit_check = temp_limit_check * length;
|
||||
+
|
||||
+ if ( !temp_limit_check || width > ( UINT_MAX / temp_limit_check ) ) {
|
||||
+ fprintf(stderr, "Too large width size specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+ temp_limit_check = temp_limit_check * width;
|
||||
+
|
||||
+ if ( !temp_limit_check || hdr_size > ( UINT_MAX - temp_limit_check ) ) {
|
||||
+ fprintf(stderr, "Too large header size specified.\n");
|
||||
+ return (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
if (outfilename == NULL)
|
||||
outfilename = argv[optind+1];
|
||||
out = TIFFOpen(outfilename, "w");
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -46,6 +46,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
|
||||
file://CVE-2022-40090.patch \
|
||||
file://CVE-2023-1916.patch \
|
||||
file://CVE-2023-40745.patch \
|
||||
file://CVE-2023-41175.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 383b8b4eb6780d855e8a8177fbce96ab39dba6a5 Mon Sep 17 00:00:00 2001
|
||||
From 902bc9190331343b2017211debcec8d2ab87e17a Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Rabaud <vrabaud@google.com>
|
||||
Date: Thu, 7 Sep 2023 21:16:03 +0200
|
||||
Subject: [PATCH 1/1] Fix OOB write in BuildHuffmanTable.
|
||||
Subject: [PATCH 1/2] Fix OOB write in BuildHuffmanTable.
|
||||
|
||||
First, BuildHuffmanTable is called to check if the data is valid.
|
||||
If it is and the table is not big enough, more memory is allocated.
|
||||
@@ -12,9 +12,11 @@ codes) streams are still decodable.
|
||||
Bug: chromium:1479274
|
||||
Change-Id: I31c36dbf3aa78d35ecf38706b50464fd3d375741
|
||||
|
||||
CVE: CVE-2023-5129
|
||||
CVE: CVE-2023-4863
|
||||
|
||||
Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/902bc9190331343b2017211debcec8d2ab87e17a]
|
||||
Signed-off-by: Colin McAllister <colinmca242@gmail.com>
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/dec/vp8l_dec.c | 46 ++++++++++---------
|
||||
src/dec/vp8li_dec.h | 2 +-
|
||||
@@ -23,7 +25,7 @@ Signed-off-by: Colin McAllister <colinmca242@gmail.com>
|
||||
4 files changed, 129 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/src/dec/vp8l_dec.c b/src/dec/vp8l_dec.c
|
||||
index 13480551..186b0b2f 100644
|
||||
index 1348055..186b0b2 100644
|
||||
--- a/src/dec/vp8l_dec.c
|
||||
+++ b/src/dec/vp8l_dec.c
|
||||
@@ -253,11 +253,11 @@ static int ReadHuffmanCodeLengths(
|
||||
@@ -171,7 +173,7 @@ index 13480551..186b0b2f 100644
|
||||
assert(dec->hdr_.num_htree_groups_ > 0);
|
||||
|
||||
diff --git a/src/dec/vp8li_dec.h b/src/dec/vp8li_dec.h
|
||||
index 72b2e861..32540a4b 100644
|
||||
index 72b2e86..32540a4 100644
|
||||
--- a/src/dec/vp8li_dec.h
|
||||
+++ b/src/dec/vp8li_dec.h
|
||||
@@ -51,7 +51,7 @@ typedef struct {
|
||||
@@ -184,7 +186,7 @@ index 72b2e861..32540a4b 100644
|
||||
|
||||
typedef struct VP8LDecoder VP8LDecoder;
|
||||
diff --git a/src/utils/huffman_utils.c b/src/utils/huffman_utils.c
|
||||
index 0cba0fbb..9efd6283 100644
|
||||
index 0cba0fb..9efd628 100644
|
||||
--- a/src/utils/huffman_utils.c
|
||||
+++ b/src/utils/huffman_utils.c
|
||||
@@ -177,21 +177,24 @@ static int BuildHuffmanTable(HuffmanCode* const root_table, int root_bits,
|
||||
@@ -315,7 +317,7 @@ index 0cba0fbb..9efd6283 100644
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/utils/huffman_utils.h b/src/utils/huffman_utils.h
|
||||
index 13b7ad1a..98415c53 100644
|
||||
index 13b7ad1..98415c5 100644
|
||||
--- a/src/utils/huffman_utils.h
|
||||
+++ b/src/utils/huffman_utils.h
|
||||
@@ -43,6 +43,29 @@ typedef struct {
|
||||
@@ -360,5 +362,5 @@ index 13b7ad1a..98415c53 100644
|
||||
|
||||
#ifdef __cplusplus
|
||||
--
|
||||
2.34.1
|
||||
2.40.0
|
||||
|
||||
53
meta/recipes-multimedia/webp/files/CVE-2023-4863-0002.patch
Normal file
53
meta/recipes-multimedia/webp/files/CVE-2023-4863-0002.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From 95ea5226c870449522240ccff26f0b006037c520 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Rabaud <vrabaud@google.com>
|
||||
Date: Mon, 11 Sep 2023 16:06:08 +0200
|
||||
Subject: [PATCH 2/2] Fix invalid incremental decoding check.
|
||||
|
||||
The first condition is only necessary if we have not read enough
|
||||
(enough being defined by src_last, not src_end which is the end
|
||||
of the image).
|
||||
The second condition now fits the comment below: "if not
|
||||
incremental, and we are past the end of buffer".
|
||||
|
||||
BUG=oss-fuzz:62136
|
||||
|
||||
Change-Id: I0700f67c62db8e1c02c2e429a069a71e606a5e4f
|
||||
|
||||
CVE: CVE-2023-4863
|
||||
|
||||
Upstream-Status: Backport [https://github.com/webmproject/libwebp/commit/95ea5226c870449522240ccff26f0b006037c520]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/dec/vp8l_dec.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/dec/vp8l_dec.c b/src/dec/vp8l_dec.c
|
||||
index 186b0b2..59a9e64 100644
|
||||
--- a/src/dec/vp8l_dec.c
|
||||
+++ b/src/dec/vp8l_dec.c
|
||||
@@ -1241,9 +1241,20 @@ static int DecodeImageData(VP8LDecoder* const dec, uint32_t* const data,
|
||||
}
|
||||
|
||||
br->eos_ = VP8LIsEndOfStream(br);
|
||||
- if (dec->incremental_ && br->eos_ && src < src_end) {
|
||||
+ // In incremental decoding:
|
||||
+ // br->eos_ && src < src_last: if 'br' reached the end of the buffer and
|
||||
+ // 'src_last' has not been reached yet, there is not enough data. 'dec' has to
|
||||
+ // be reset until there is more data.
|
||||
+ // !br->eos_ && src < src_last: this cannot happen as either the buffer is
|
||||
+ // fully read, either enough has been read to reach 'src_last'.
|
||||
+ // src >= src_last: 'src_last' is reached, all is fine. 'src' can actually go
|
||||
+ // beyond 'src_last' in case the image is cropped and an LZ77 goes further.
|
||||
+ // The buffer might have been enough or there is some left. 'br->eos_' does
|
||||
+ // not matter.
|
||||
+ assert(!dec->incremental_ || (br->eos_ && src < src_last) || src >= src_last);
|
||||
+ if (dec->incremental_ && br->eos_ && src < src_last) {
|
||||
RestoreState(dec);
|
||||
- } else if (!br->eos_) {
|
||||
+ } else if ((dec->incremental_ && src >= src_last) || !br->eos_) {
|
||||
// Process the remaining rows corresponding to last row-block.
|
||||
if (process_func != NULL) {
|
||||
process_func(dec, row > last_row ? last_row : row);
|
||||
--
|
||||
2.40.0
|
||||
@@ -15,7 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
|
||||
|
||||
SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz \
|
||||
file://CVE-2023-1999.patch \
|
||||
file://CVE-2023-5129.patch \
|
||||
file://CVE-2023-4863-0001.patch \
|
||||
file://CVE-2023-4863-0002.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "7bf5a8a28cc69bcfa8cb214f2c3095703c6b73ac5fba4d5480c205331d9494df"
|
||||
|
||||
|
||||
206
meta/recipes-support/gnutls/gnutls/CVE-2023-5981.patch
Normal file
206
meta/recipes-support/gnutls/gnutls/CVE-2023-5981.patch
Normal file
@@ -0,0 +1,206 @@
|
||||
Backport of:
|
||||
|
||||
From 29d6298d0b04cfff970b993915db71ba3f580b6d Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@gnu.org>
|
||||
Date: Mon, 23 Oct 2023 09:26:57 +0900
|
||||
Subject: [PATCH] auth/rsa_psk: side-step potential side-channel
|
||||
|
||||
This removes branching that depends on secret data, porting changes
|
||||
for regular RSA key exchange from
|
||||
4804febddc2ed958e5ae774de2a8f85edeeff538 and
|
||||
80a6ce8ddb02477cd724cd5b2944791aaddb702a. This also removes the
|
||||
allow_wrong_pms as it was used sorely to control debug output
|
||||
depending on the branching.
|
||||
|
||||
Signed-off-by: Daiki Ueno <ueno@gnu.org>
|
||||
|
||||
Upstream-Status: Backport [import from debian https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gnutls28/3.7.3-4ubuntu1.3/gnutls28_3.7.3-4ubuntu1.3.debian.tar.xz
|
||||
Upstream-Commit: https://gitlab.com/gnutls/gnutls/-/commit/29d6298d0b04cfff970b993915db71ba3f580b6d]
|
||||
CVE: CVE-2023-5981
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
lib/auth/rsa.c | 2 +-
|
||||
lib/auth/rsa_psk.c | 90 ++++++++++++++++++----------------------------
|
||||
lib/gnutls_int.h | 4 ---
|
||||
lib/priority.c | 1 -
|
||||
4 files changed, 35 insertions(+), 62 deletions(-)
|
||||
|
||||
--- a/lib/auth/rsa.c
|
||||
+++ b/lib/auth/rsa.c
|
||||
@@ -207,7 +207,7 @@ proc_rsa_client_kx(gnutls_session_t sess
|
||||
session->key.key.size);
|
||||
/* After this point, any conditional on failure that cause differences
|
||||
* in execution may create a timing or cache access pattern side
|
||||
- * channel that can be used as an oracle, so treat very carefully */
|
||||
+ * channel that can be used as an oracle, so tread carefully */
|
||||
|
||||
/* Error handling logic:
|
||||
* In case decryption fails then don't inform the peer. Just use the
|
||||
--- a/lib/auth/rsa_psk.c
|
||||
+++ b/lib/auth/rsa_psk.c
|
||||
@@ -264,14 +264,13 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_se
|
||||
{
|
||||
gnutls_datum_t username;
|
||||
psk_auth_info_t info;
|
||||
- gnutls_datum_t plaintext;
|
||||
gnutls_datum_t ciphertext;
|
||||
gnutls_datum_t pwd_psk = { NULL, 0 };
|
||||
int ret, dsize;
|
||||
- int randomize_key = 0;
|
||||
ssize_t data_size = _data_size;
|
||||
gnutls_psk_server_credentials_t cred;
|
||||
gnutls_datum_t premaster_secret = { NULL, 0 };
|
||||
+ volatile uint8_t ver_maj, ver_min;
|
||||
|
||||
cred = (gnutls_psk_server_credentials_t)
|
||||
_gnutls_get_cred(session, GNUTLS_CRD_PSK);
|
||||
@@ -327,71 +326,47 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_se
|
||||
}
|
||||
ciphertext.size = dsize;
|
||||
|
||||
- ret =
|
||||
- gnutls_privkey_decrypt_data(session->internals.selected_key, 0,
|
||||
- &ciphertext, &plaintext);
|
||||
- if (ret < 0 || plaintext.size != GNUTLS_MASTER_SIZE) {
|
||||
- /* In case decryption fails then don't inform
|
||||
- * the peer. Just use a random key. (in order to avoid
|
||||
- * attack against pkcs-1 formatting).
|
||||
- */
|
||||
- gnutls_assert();
|
||||
- _gnutls_debug_log
|
||||
- ("auth_rsa_psk: Possible PKCS #1 format attack\n");
|
||||
- if (ret >= 0) {
|
||||
- gnutls_free(plaintext.data);
|
||||
- }
|
||||
- randomize_key = 1;
|
||||
- } else {
|
||||
- /* If the secret was properly formatted, then
|
||||
- * check the version number.
|
||||
- */
|
||||
- if (_gnutls_get_adv_version_major(session) !=
|
||||
- plaintext.data[0]
|
||||
- || (session->internals.allow_wrong_pms == 0
|
||||
- && _gnutls_get_adv_version_minor(session) !=
|
||||
- plaintext.data[1])) {
|
||||
- /* No error is returned here, if the version number check
|
||||
- * fails. We proceed normally.
|
||||
- * That is to defend against the attack described in the paper
|
||||
- * "Attacking RSA-based sessions in SSL/TLS" by Vlastimil Klima,
|
||||
- * Ondej Pokorny and Tomas Rosa.
|
||||
- */
|
||||
- gnutls_assert();
|
||||
- _gnutls_debug_log
|
||||
- ("auth_rsa: Possible PKCS #1 version check format attack\n");
|
||||
- }
|
||||
- }
|
||||
+ ver_maj = _gnutls_get_adv_version_major(session);
|
||||
+ ver_min = _gnutls_get_adv_version_minor(session);
|
||||
|
||||
+ premaster_secret.data = gnutls_malloc(GNUTLS_MASTER_SIZE);
|
||||
+ if (premaster_secret.data == NULL) {
|
||||
+ gnutls_assert();
|
||||
+ return GNUTLS_E_MEMORY_ERROR;
|
||||
+ }
|
||||
+ premaster_secret.size = GNUTLS_MASTER_SIZE;
|
||||
|
||||
- if (randomize_key != 0) {
|
||||
- premaster_secret.size = GNUTLS_MASTER_SIZE;
|
||||
- premaster_secret.data =
|
||||
- gnutls_malloc(premaster_secret.size);
|
||||
- if (premaster_secret.data == NULL) {
|
||||
- gnutls_assert();
|
||||
- return GNUTLS_E_MEMORY_ERROR;
|
||||
- }
|
||||
-
|
||||
- /* we do not need strong random numbers here.
|
||||
- */
|
||||
- ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
|
||||
- premaster_secret.size);
|
||||
- if (ret < 0) {
|
||||
- gnutls_assert();
|
||||
- goto cleanup;
|
||||
- }
|
||||
- } else {
|
||||
- premaster_secret.data = plaintext.data;
|
||||
- premaster_secret.size = plaintext.size;
|
||||
+ /* Fallback value when decryption fails. Needs to be unpredictable. */
|
||||
+ ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
|
||||
+ premaster_secret.size);
|
||||
+ if (ret < 0) {
|
||||
+ gnutls_assert();
|
||||
+ goto cleanup;
|
||||
}
|
||||
|
||||
+ gnutls_privkey_decrypt_data2(session->internals.selected_key, 0,
|
||||
+ &ciphertext, premaster_secret.data,
|
||||
+ premaster_secret.size);
|
||||
+ /* After this point, any conditional on failure that cause differences
|
||||
+ * in execution may create a timing or cache access pattern side
|
||||
+ * channel that can be used as an oracle, so tread carefully */
|
||||
+
|
||||
+ /* Error handling logic:
|
||||
+ * In case decryption fails then don't inform the peer. Just use the
|
||||
+ * random key previously generated. (in order to avoid attack against
|
||||
+ * pkcs-1 formatting).
|
||||
+ *
|
||||
+ * If we get version mismatches no error is returned either. We
|
||||
+ * proceed normally. This is to defend against the attack described
|
||||
+ * in the paper "Attacking RSA-based sessions in SSL/TLS" by
|
||||
+ * Vlastimil Klima, Ondej Pokorny and Tomas Rosa.
|
||||
+ */
|
||||
+
|
||||
/* This is here to avoid the version check attack
|
||||
* discussed above.
|
||||
*/
|
||||
-
|
||||
- premaster_secret.data[0] = _gnutls_get_adv_version_major(session);
|
||||
- premaster_secret.data[1] = _gnutls_get_adv_version_minor(session);
|
||||
+ premaster_secret.data[0] = ver_maj;
|
||||
+ premaster_secret.data[1] = ver_min;
|
||||
|
||||
/* find the key of this username
|
||||
*/
|
||||
--- a/lib/gnutls_int.h
|
||||
+++ b/lib/gnutls_int.h
|
||||
@@ -974,7 +974,6 @@ struct gnutls_priority_st {
|
||||
bool _no_etm;
|
||||
bool _no_ext_master_secret;
|
||||
bool _allow_key_usage_violation;
|
||||
- bool _allow_wrong_pms;
|
||||
bool _dumbfw;
|
||||
unsigned int _dh_prime_bits; /* old (deprecated) variable */
|
||||
|
||||
@@ -992,7 +991,6 @@ struct gnutls_priority_st {
|
||||
(x)->no_etm = 1; \
|
||||
(x)->no_ext_master_secret = 1; \
|
||||
(x)->allow_key_usage_violation = 1; \
|
||||
- (x)->allow_wrong_pms = 1; \
|
||||
(x)->dumbfw = 1
|
||||
|
||||
#define ENABLE_PRIO_COMPAT(x) \
|
||||
@@ -1001,7 +999,6 @@ struct gnutls_priority_st {
|
||||
(x)->_no_etm = 1; \
|
||||
(x)->_no_ext_master_secret = 1; \
|
||||
(x)->_allow_key_usage_violation = 1; \
|
||||
- (x)->_allow_wrong_pms = 1; \
|
||||
(x)->_dumbfw = 1
|
||||
|
||||
/* DH and RSA parameters types.
|
||||
@@ -1126,7 +1123,6 @@ typedef struct {
|
||||
bool no_etm;
|
||||
bool no_ext_master_secret;
|
||||
bool allow_key_usage_violation;
|
||||
- bool allow_wrong_pms;
|
||||
bool dumbfw;
|
||||
|
||||
/* old (deprecated) variable. This is used for both srp_prime_bits
|
||||
--- a/lib/priority.c
|
||||
+++ b/lib/priority.c
|
||||
@@ -690,7 +690,6 @@ gnutls_priority_set(gnutls_session_t ses
|
||||
COPY_TO_INTERNALS(no_etm);
|
||||
COPY_TO_INTERNALS(no_ext_master_secret);
|
||||
COPY_TO_INTERNALS(allow_key_usage_violation);
|
||||
- COPY_TO_INTERNALS(allow_wrong_pms);
|
||||
COPY_TO_INTERNALS(dumbfw);
|
||||
COPY_TO_INTERNALS(dh_prime_bits);
|
||||
|
||||
@@ -23,6 +23,7 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar
|
||||
file://arm_eabi.patch \
|
||||
file://CVE-2022-2509.patch \
|
||||
file://CVE-2023-0361.patch \
|
||||
file://CVE-2023-5981.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "e6adbebcfbc95867de01060d93c789938cf89cc1d1f6ef9ef661890f6217451f"
|
||||
|
||||
@@ -19,8 +19,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
|
||||
file://no-path-adjust.patch \
|
||||
"
|
||||
|
||||
PV .= ".2048"
|
||||
SRCREV = "982ef16059bd163a77271107020defde0740bbd6"
|
||||
PV .= ".2130"
|
||||
SRCREV = "075ad7047457debfeef13442c01e74088b461092"
|
||||
|
||||
# Do not consider .z in x.y.z, as that is updated with every commit
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"
|
||||
@@ -40,22 +40,18 @@ do_configure () {
|
||||
cd src
|
||||
rm -f auto/*
|
||||
touch auto/config.mk
|
||||
# git timestamps aren't reliable, so touch the shipped .po files so they aren't regenerated
|
||||
touch -c po/cs.cp1250.po po/ja.euc-jp.po po/ja.sjis.po po/ko.po po/pl.UTF-8.po po/pl.cp1250.po po/ru.cp1251.po po/sk.cp1250.po po/uk.cp1251.po po/zh_CN.po po/zh_CN.cp936.po po/zh_TW.po
|
||||
# ru.cp1251.po uses CP1251 rather than cp1251, fix that
|
||||
sed -i -e s/CP1251/cp1251/ po/ru.cp1251.po
|
||||
aclocal
|
||||
autoconf
|
||||
cd ..
|
||||
oe_runconf
|
||||
touch src/auto/configure
|
||||
touch src/auto/config.mk src/auto/config.h
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
# We do not support fully / correctly the following locales. Attempting
|
||||
# to use these with msgfmt in order to update the ".desktop" files exposes
|
||||
# this problem and leads to the compile failing.
|
||||
for LOCALE in cs fr ko pl sk zh_CN zh_TW;do
|
||||
echo -n > src/po/${LOCALE}.po
|
||||
done
|
||||
autotools_do_compile
|
||||
# need a native tool, not a target one
|
||||
${BUILD_CC} src/po/sjiscorr.c -o src/po/sjiscorr
|
||||
}
|
||||
|
||||
PACKAGECONFIG ??= "\
|
||||
|
||||
Reference in New Issue
Block a user