mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
Compare commits
106 Commits
kirkstone-
...
kirkstone-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8d6d921fa | ||
|
|
73e3b5481b | ||
|
|
df56d7c525 | ||
|
|
5f21fa7de9 | ||
|
|
b971ffa75e | ||
|
|
f966e16c3b | ||
|
|
83d53dc031 | ||
|
|
f948c66f75 | ||
|
|
b1ddd4178d | ||
|
|
95b430be16 | ||
|
|
e46e74cd90 | ||
|
|
f35f1aaf22 | ||
|
|
715fc203c2 | ||
|
|
e9a7427077 | ||
|
|
6f022adb5c | ||
|
|
59077aa77b | ||
|
|
bdea205855 | ||
|
|
bf5e50a353 | ||
|
|
3fd3ed3b11 | ||
|
|
b5b18d155e | ||
|
|
c3032cebe7 | ||
|
|
955796ad7e | ||
|
|
650980791e | ||
|
|
0f23056836 | ||
|
|
6fd2902f05 | ||
|
|
720324bd18 | ||
|
|
6a3b428c7c | ||
|
|
c969a2456c | ||
|
|
734069e81b | ||
|
|
aaf748b95f | ||
|
|
811cf0320c | ||
|
|
a6f551f516 | ||
|
|
fb38c59633 | ||
|
|
386672ff8c | ||
|
|
e06868eff3 | ||
|
|
024fa046fc | ||
|
|
7725c28871 | ||
|
|
b1c1d6d048 | ||
|
|
70f4bd1b3c | ||
|
|
72ddfbc89a | ||
|
|
36a2a0129a | ||
|
|
6da1e21e9a | ||
|
|
24e9fed15a | ||
|
|
f550a63161 | ||
|
|
8391218990 | ||
|
|
bdcc4c9909 | ||
|
|
4b721dc5c8 | ||
|
|
455b08d0a9 | ||
|
|
4537f28311 | ||
|
|
47d212a57f | ||
|
|
a721e0f85b | ||
|
|
fbf88236e3 | ||
|
|
7b43af7ad4 | ||
|
|
f989613808 | ||
|
|
3f174130d3 | ||
|
|
43e36aec34 | ||
|
|
c0b54da555 | ||
|
|
cc936073a4 | ||
|
|
36e8271ca0 | ||
|
|
49ebeb4b0d | ||
|
|
73d81d2908 | ||
|
|
9d5d4218ec | ||
|
|
e77b551dbf | ||
|
|
600b508c37 | ||
|
|
2a2ea5ac75 | ||
|
|
de59761cbb | ||
|
|
3a3afebf41 | ||
|
|
222be3e3b9 | ||
|
|
ef5214f584 | ||
|
|
bf72cdd748 | ||
|
|
fbbe0f86ba | ||
|
|
f06b171bee | ||
|
|
96d8a62454 | ||
|
|
6b0501fef3 | ||
|
|
6191449343 | ||
|
|
7ffedb40a1 | ||
|
|
1c8f2d8cad | ||
|
|
fcb2375417 | ||
|
|
91c3fc996e | ||
|
|
c58c63d48f | ||
|
|
3ba8fdef70 | ||
|
|
ee2bf45810 | ||
|
|
c156968a90 | ||
|
|
ad12417f38 | ||
|
|
7eefa6dfb6 | ||
|
|
0b624c308c | ||
|
|
22caf0ce33 | ||
|
|
74b22a5e91 | ||
|
|
25073f9c0e | ||
|
|
0e4966eb77 | ||
|
|
6b6a161273 | ||
|
|
eea8e56bed | ||
|
|
eae16020a2 | ||
|
|
81cad46d69 | ||
|
|
8b4655300d | ||
|
|
425ed15bde | ||
|
|
6cbbd132d3 | ||
|
|
e67e90c557 | ||
|
|
a54b91946c | ||
|
|
a1b812eefa | ||
|
|
7435f15930 | ||
|
|
fe7e47368e | ||
|
|
200596b5ad | ||
|
|
226bc34085 | ||
|
|
df7a37d54f | ||
|
|
dc1a3be255 |
24
SECURITY.md
Normal file
24
SECURITY.md
Normal file
@@ -0,0 +1,24 @@
|
||||
How to Report a Potential Vulnerability?
|
||||
========================================
|
||||
|
||||
If you would like to report a public issue (for example, one with a released
|
||||
CVE number), please report it using the
|
||||
[https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla].
|
||||
If you have a patch ready, submit it following the same procedure as any other
|
||||
patch as described in README.md.
|
||||
|
||||
If you are dealing with a not-yet released or urgent issue, please send a
|
||||
message to security AT yoctoproject DOT org, including as many details as
|
||||
possible: the layer or software module affected, the recipe and its version,
|
||||
and any example code, if available.
|
||||
|
||||
Branches maintained with security fixes
|
||||
---------------------------------------
|
||||
|
||||
See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS]
|
||||
for detailed info regarding the policies and maintenance of Stable branches.
|
||||
|
||||
The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all
|
||||
releases of the Yocto Project. Versions in grey are no longer actively maintained with
|
||||
security patches, but well-tested patches may still be accepted for them for
|
||||
significant issues.
|
||||
24
bitbake/SECURITY.md
Normal file
24
bitbake/SECURITY.md
Normal file
@@ -0,0 +1,24 @@
|
||||
How to Report a Potential Vulnerability?
|
||||
========================================
|
||||
|
||||
If you would like to report a public issue (for example, one with a released
|
||||
CVE number), please report it using the
|
||||
[https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla].
|
||||
If you have a patch ready, submit it following the same procedure as any other
|
||||
patch as described in README.md.
|
||||
|
||||
If you are dealing with a not-yet released or urgent issue, please send a
|
||||
message to security AT yoctoproject DOT org, including as many details as
|
||||
possible: the layer or software module affected, the recipe and its version,
|
||||
and any example code, if available.
|
||||
|
||||
Branches maintained with security fixes
|
||||
---------------------------------------
|
||||
|
||||
See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS]
|
||||
for detailed info regarding the policies and maintenance of Stable branches.
|
||||
|
||||
The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all
|
||||
releases of the Yocto Project. Versions in grey are no longer actively maintained with
|
||||
security patches, but well-tested patches may still be accepted for them for
|
||||
significant issues.
|
||||
@@ -25,6 +25,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument('-u', '--unexpand', help='Do not expand the value (with --value)', action="store_true")
|
||||
parser.add_argument('-f', '--flag', help='Specify a variable flag to query (with --value)', default=None)
|
||||
parser.add_argument('--value', help='Only report the value, no history and no variable name', action="store_true")
|
||||
parser.add_argument('-q', '--quiet', help='Silence bitbake server logging', action="store_true")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.unexpand and not args.value:
|
||||
@@ -35,7 +36,7 @@ if __name__ == "__main__":
|
||||
print("--flag only makes sense with --value")
|
||||
sys.exit(1)
|
||||
|
||||
with bb.tinfoil.Tinfoil(tracking=True) as tinfoil:
|
||||
with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not args.quiet) as tinfoil:
|
||||
if args.recipe:
|
||||
tinfoil.prepare(quiet=2)
|
||||
d = tinfoil.parse_recipe(args.recipe)
|
||||
|
||||
@@ -91,19 +91,19 @@ def worker_fire_prepickled(event):
|
||||
worker_thread_exit = False
|
||||
|
||||
def worker_flush(worker_queue):
|
||||
worker_queue_int = b""
|
||||
worker_queue_int = bytearray()
|
||||
global worker_pipe, worker_thread_exit
|
||||
|
||||
while True:
|
||||
try:
|
||||
worker_queue_int = worker_queue_int + worker_queue.get(True, 1)
|
||||
worker_queue_int.extend(worker_queue.get(True, 1))
|
||||
except queue.Empty:
|
||||
pass
|
||||
while (worker_queue_int or not worker_queue.empty()):
|
||||
try:
|
||||
(_, ready, _) = select.select([], [worker_pipe], [], 1)
|
||||
if not worker_queue.empty():
|
||||
worker_queue_int = worker_queue_int + worker_queue.get()
|
||||
worker_queue_int.extend(worker_queue.get())
|
||||
written = os.write(worker_pipe, worker_queue_int)
|
||||
worker_queue_int = worker_queue_int[written:]
|
||||
except (IOError, OSError) as e:
|
||||
@@ -338,12 +338,12 @@ class runQueueWorkerPipe():
|
||||
if pipeout:
|
||||
pipeout.close()
|
||||
bb.utils.nonblockingfd(self.input)
|
||||
self.queue = b""
|
||||
self.queue = bytearray()
|
||||
|
||||
def read(self):
|
||||
start = len(self.queue)
|
||||
try:
|
||||
self.queue = self.queue + (self.input.read(102400) or b"")
|
||||
self.queue.extend(self.input.read(102400) or b"")
|
||||
except (OSError, IOError) as e:
|
||||
if e.errno != errno.EAGAIN:
|
||||
raise
|
||||
@@ -371,7 +371,7 @@ class BitbakeWorker(object):
|
||||
def __init__(self, din):
|
||||
self.input = din
|
||||
bb.utils.nonblockingfd(self.input)
|
||||
self.queue = b""
|
||||
self.queue = bytearray()
|
||||
self.cookercfg = None
|
||||
self.databuilder = None
|
||||
self.data = None
|
||||
@@ -405,7 +405,7 @@ class BitbakeWorker(object):
|
||||
if len(r) == 0:
|
||||
# EOF on pipe, server must have terminated
|
||||
self.sigterm_exception(signal.SIGTERM, None)
|
||||
self.queue = self.queue + r
|
||||
self.queue.extend(r)
|
||||
except (OSError, IOError):
|
||||
pass
|
||||
if len(self.queue):
|
||||
|
||||
@@ -3101,7 +3101,7 @@ class runQueuePipe():
|
||||
if pipeout:
|
||||
pipeout.close()
|
||||
bb.utils.nonblockingfd(self.input)
|
||||
self.queue = b""
|
||||
self.queue = bytearray()
|
||||
self.d = d
|
||||
self.rq = rq
|
||||
self.rqexec = rqexec
|
||||
@@ -3120,7 +3120,7 @@ class runQueuePipe():
|
||||
|
||||
start = len(self.queue)
|
||||
try:
|
||||
self.queue = self.queue + (self.input.read(102400) or b"")
|
||||
self.queue.extend(self.input.read(102400) or b"")
|
||||
except (OSError, IOError) as e:
|
||||
if e.errno != errno.EAGAIN:
|
||||
raise
|
||||
|
||||
@@ -257,7 +257,7 @@ an entire Linux distribution, including the toolchain, from source.
|
||||
BB_SIGNATURE_HANDLER = "OEEquivHash"
|
||||
BB_HASHSERVE = "auto"
|
||||
BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"
|
||||
SSTATE_MIRRORS ?= "file://.* https://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
|
||||
SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
|
||||
|
||||
#. **Start the Build:** Continue with the following command to build an OS
|
||||
image for the target, which is ``core-image-sato`` in this example:
|
||||
|
||||
@@ -774,20 +774,6 @@ workflow.
|
||||
|
||||
- Two general IA platforms (``genericx86`` and ``genericx86-64``)
|
||||
|
||||
- There are three core Intel BSPs in the Yocto Project
|
||||
release, in the ``meta-intel`` layer:
|
||||
|
||||
- ``intel-core2-32``, which is a BSP optimized for the Core2
|
||||
family of CPUs as well as all CPUs prior to the Silvermont
|
||||
core.
|
||||
|
||||
- ``intel-corei7-64``, which is a BSP optimized for Nehalem
|
||||
and later Core and Xeon CPUs as well as Silvermont and later
|
||||
Atom CPUs, such as the Baytrail SoCs.
|
||||
|
||||
- ``intel-quark``, which is a BSP optimized for the Intel
|
||||
Galileo gen1 & gen2 development boards.
|
||||
|
||||
When you set up a layer for a new BSP, you should follow a standard
|
||||
layout. This layout is described in the ":ref:`bsp-guide/bsp:example filesystem layout`"
|
||||
section. In the standard layout, notice
|
||||
@@ -893,8 +879,8 @@ Yocto Project:
|
||||
``recipes-*`` subdirectories specific to the recipe's function, or
|
||||
within a subdirectory containing a set of closely-related recipes.
|
||||
The recipes themselves should follow the general guidelines for
|
||||
recipes used in the Yocto Project found in the ":oe_wiki:`OpenEmbedded
|
||||
Style Guide </Styleguide>`".
|
||||
recipes found in the ":doc:`../contributor-guide/recipe-style-guide`"
|
||||
in the Yocto Project and OpenEmbedded Contributor Guide.
|
||||
|
||||
- *License File:* You must include a license file in the
|
||||
``meta-bsp_root_name`` directory. This license covers the BSP
|
||||
@@ -1194,7 +1180,7 @@ Use these steps to create a BSP layer:
|
||||
|
||||
- *Create a Kernel Recipe:* Create a kernel recipe in
|
||||
``recipes-kernel/linux`` by either using a kernel append file or a
|
||||
new custom kernel recipe file (e.g. ``yocto-linux_4.12.bb``). The BSP
|
||||
new custom kernel recipe file (e.g. ``linux-yocto_4.12.bb``). The BSP
|
||||
layers mentioned in the previous step also contain different kernel
|
||||
examples. See the ":ref:`kernel-dev/common:modifying an existing recipe`"
|
||||
section in the Yocto Project Linux Kernel Development Manual for
|
||||
@@ -1449,39 +1435,39 @@ The kernel recipe used to build the kernel image for the BeagleBone
|
||||
device was established in the machine configuration::
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
|
||||
PREFERRED_VERSION_linux-yocto ?= "5.0%"
|
||||
PREFERRED_VERSION_linux-yocto ?= "5.15%"
|
||||
|
||||
The ``meta-yocto-bsp/recipes-kernel/linux`` directory in the layer contains
|
||||
metadata used to build the kernel. In this case, a kernel append file
|
||||
(i.e. ``linux-yocto_5.0.bbappend``) is used to override an established
|
||||
kernel recipe (i.e. ``linux-yocto_5.0.bb``), which is located in
|
||||
:yocto_git:`/poky/tree/meta/recipes-kernel/linux`.
|
||||
(i.e. ``linux-yocto_5.15.bbappend``) is used to override an established
|
||||
kernel recipe (i.e. ``linux-yocto_5.15.bb``), which is located in
|
||||
:yocto_git:`/poky/tree/meta-yocto-bsp/recipes-kernel/linux`.
|
||||
|
||||
Following is the contents of the append file::
|
||||
|
||||
KBRANCH:genericx86 = "v5.0/standard/base"
|
||||
KBRANCH:genericx86-64 = "v5.0/standard/base"
|
||||
KBRANCH:edgerouter = "v5.0/standard/edgerouter"
|
||||
KBRANCH:beaglebone-yocto = "v5.0/standard/beaglebone"
|
||||
KBRANCH:genericx86 = "v5.15/standard/base"
|
||||
KBRANCH:genericx86-64 = "v5.15/standard/base"
|
||||
KBRANCH:edgerouter = "v5.15/standard/edgerouter"
|
||||
KBRANCH:beaglebone-yocto = "v5.15/standard/beaglebone"
|
||||
|
||||
KMACHINE:genericx86 ?= "common-pc"
|
||||
KMACHINE:genericx86-64 ?= "common-pc-64"
|
||||
KMACHINE:beaglebone-yocto ?= "beaglebone"
|
||||
|
||||
SRCREV_machine:genericx86 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
||||
SRCREV_machine:genericx86-64 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
||||
SRCREV_machine:edgerouter ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
||||
SRCREV_machine:beaglebone-yocto ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
|
||||
SRCREV_machine:genericx86 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||
SRCREV_machine:genericx86-64 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||
SRCREV_machine:edgerouter ?= "90f1ee6589264545f548d731c2480b08a007230f"
|
||||
SRCREV_machine:beaglebone-yocto ?= "9aabbaa89fcb21af7028e814c1f5b61171314d5a"
|
||||
|
||||
COMPATIBLE_MACHINE:genericx86 = "genericx86"
|
||||
COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64"
|
||||
COMPATIBLE_MACHINE:edgerouter = "edgerouter"
|
||||
COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto"
|
||||
|
||||
LINUX_VERSION:genericx86 = "5.0.3"
|
||||
LINUX_VERSION:genericx86-64 = "5.0.3"
|
||||
LINUX_VERSION:edgerouter = "5.0.3"
|
||||
LINUX_VERSION:beaglebone-yocto = "5.0.3"
|
||||
LINUX_VERSION:genericx86 = "5.15.72"
|
||||
LINUX_VERSION:genericx86-64 = "5.15.72"
|
||||
LINUX_VERSION:edgerouter = "5.15.54"
|
||||
LINUX_VERSION:beaglebone-yocto = "5.15.54"
|
||||
|
||||
This particular append file works for all the machines that are
|
||||
part of the ``meta-yocto-bsp`` layer. The relevant statements are
|
||||
|
||||
@@ -7,17 +7,18 @@ Recipe Naming Conventions
|
||||
=========================
|
||||
|
||||
In general, most recipes should follow the naming convention
|
||||
``recipes-category/package/packagename_version.bb``. Recipes for related
|
||||
projects may share the same package directory. ``packagename``, ``category``,
|
||||
and ``package`` may contain hyphens, but hyphens are not allowed in ``version``.
|
||||
``recipes-category/recipename/recipename_version.bb``. Recipes for related
|
||||
projects may share the same recipe directory. ``recipename`` and ``category``
|
||||
may contain hyphens, but hyphens are not allowed in ``version``.
|
||||
|
||||
If the recipe is tracking a Git revision that does not correspond to a released
|
||||
version of the software, ``version`` may be ``git`` (e.g. ``packagename_git.bb``)
|
||||
version of the software, ``version`` may be ``git`` (e.g. ``recipename_git.bb``)
|
||||
and the recipe would set :term:`PV`.
|
||||
|
||||
Version Policy
|
||||
==============
|
||||
|
||||
Our versions follow the form ``<package epoch>:<package version>-<package revision>``
|
||||
Our versions follow the form ``<epoch>:<version>-<revision>``
|
||||
or in BitBake variable terms ${:term:`PE`}:${:term:`PV`}-${:term:`PR`}. We
|
||||
generally follow the `Debian <https://www.debian.org/doc/debian-policy/ch-controlfields.html#version>`__
|
||||
version policy which defines these terms.
|
||||
@@ -26,7 +27,7 @@ In most cases the version :term:`PV` will be set automatically from the recipe
|
||||
file name. It is recommended to use released versions of software as these are
|
||||
revisions that upstream are expecting people to use.
|
||||
|
||||
Package versions should always compare and sort correctly so that upgrades work
|
||||
Recipe versions should always compare and sort correctly so that upgrades work
|
||||
as expected. With conventional versions such as ``1.4`` upgrading ``to 1.5``
|
||||
this happens naturally, but some versions don't sort. For example,
|
||||
``1.5 Release Candidate 2`` could be written as ``1.5rc2`` but this sorts after
|
||||
@@ -62,7 +63,7 @@ Version Number Changes
|
||||
|
||||
The :term:`PR` variable is used to indicate different revisions of a recipe
|
||||
that reference the same upstream source version. It can be used to force a
|
||||
new version of a package to be installed onto a device from a package feed.
|
||||
new version of a recipe to be installed onto a device from a package feed.
|
||||
These once had to be set manually but in most cases these can now be set and
|
||||
incremented automatically by a PR Server connected with a package feed.
|
||||
|
||||
@@ -256,6 +257,20 @@ Tips and Guidelines for Writing Recipes
|
||||
and ``-nativesdk`` ones, whenever possible. This avoids having to maintain multiple
|
||||
recipe files at the same time.
|
||||
|
||||
- Recipes should have tasks which are idempotent, i.e. that executing a given task
|
||||
multiple times shouldn't change the end result. The build environment is built upon
|
||||
this assumption and breaking it can cause obscure build failures.
|
||||
|
||||
- For idempotence when modifying files in tasks, it is usually best to:
|
||||
|
||||
- copy a file ``X`` to ``X.orig`` (only if it doesn't exist already)
|
||||
- then, copy ``X.orig`` back to ``X``,
|
||||
- and, finally, modify ``X``.
|
||||
|
||||
This ensures if rerun the task always has the same end result and the
|
||||
original file can be preserved to reuse. It also guards against an
|
||||
interrupted build corrupting the file.
|
||||
|
||||
Patch Upstream Status
|
||||
=====================
|
||||
|
||||
@@ -271,19 +286,23 @@ Then, you should also add an ``Upstream-Status:`` tag containing one of the
|
||||
following status strings:
|
||||
|
||||
``Pending``
|
||||
No determination has been made yet or not yet submitted to upstream.
|
||||
No determination has been made yet, or patch has not yet been submitted to
|
||||
upstream.
|
||||
|
||||
Keep in mind that every patch submitted upstream reduces the maintainance
|
||||
burden in OpenEmbedded and Yocto Project in the long run, so this patch
|
||||
status should only be used in exceptional cases if there are genuine
|
||||
obstacles to submitting a patch upstream; the reason for that should be
|
||||
included in the patch.
|
||||
|
||||
``Submitted [where]``
|
||||
Submitted to upstream, waiting for approval. Optionally include where
|
||||
it was submitted, such as the author, mailing list, etc.
|
||||
|
||||
``Accepted``
|
||||
Accepted in upstream, expect it to be removed at next update, include
|
||||
expected version info.
|
||||
|
||||
``Backport``
|
||||
Backported from new upstream version, because we are at a fixed version,
|
||||
include upstream version info.
|
||||
``Backport [version]``
|
||||
Accepted upstream and included in the next release, or backported from newer
|
||||
upstream version, because we are at a fixed version.
|
||||
Include upstream version info (e.g. commit ID or next expected version).
|
||||
|
||||
``Denied``
|
||||
Not accepted by upstream, include reason in patch.
|
||||
@@ -299,29 +318,30 @@ following status strings:
|
||||
|
||||
``Inappropriate [reason]``
|
||||
The patch is not appropriate for upstream, include a brief reason on the
|
||||
same line enclosed with ``[]``. The reason can be:
|
||||
same line enclosed with ``[]``. In the past, there were several different
|
||||
reasons not to submit patches upstream, but we have to consider that every
|
||||
non-upstreamed patch means a maintainance burden for recipe maintainers.
|
||||
Currently, the only reasons to mark patches as inappropriate for upstream
|
||||
submission are:
|
||||
|
||||
- ``not author`` (you are not the author and do not intend to upstream this,
|
||||
the source must be listed in the comments)
|
||||
- ``native``
|
||||
- ``licensing``
|
||||
- ``configuration``
|
||||
- ``enable feature``
|
||||
- ``disable feature``
|
||||
- ``bugfix`` (add bug URL here)
|
||||
- ``embedded specific``
|
||||
- ``other`` (give details in comments)
|
||||
|
||||
The various ``Inappropriate [reason]`` status items are meant to indicate that
|
||||
the person responsible for adding this patch to the system does not intend to
|
||||
upstream the patch for a specific reason.
|
||||
- ``oe specific``: the issue is specific to how OpenEmbedded performs builds
|
||||
or sets things up at runtime, and can be resolved only with a patch that
|
||||
is not however relevant or appropriate for general upstream submission.
|
||||
- ``upstream ticket <link>``: the issue is not specific to Open-Embedded
|
||||
and should be fixed upstream, but the patch in its current form is not
|
||||
suitable for merging upstream, and the author lacks sufficient expertise
|
||||
to develop a proper patch. Instead the issue is handled via a bug report
|
||||
(include link).
|
||||
|
||||
Of course, if another person later takes care of submitting this patch upstream,
|
||||
the status should be changed to ``Submitted [where]``, and an additional
|
||||
``Signed-off-by:`` line should be added to the patch by the person claiming
|
||||
responsibility for upstreaming.
|
||||
|
||||
For example, if the patch has been submitted upstream::
|
||||
Examples
|
||||
--------
|
||||
|
||||
Here's an example of a patch that has been submitted upstream::
|
||||
|
||||
rpm: Adjusted the foo setting in bar
|
||||
|
||||
@@ -334,5 +354,46 @@ For example, if the patch has been submitted upstream::
|
||||
|
||||
Signed-off-by: Joe Developer <joe.developer@example.com>
|
||||
|
||||
A future update can change the value to ``Accepted`` or ``Denied`` as
|
||||
A future update can change the value to ``Backport`` or ``Denied`` as
|
||||
appropriate.
|
||||
|
||||
Another example of a patch that is specific to OpenEmbedded::
|
||||
|
||||
Do not treat warnings as errors
|
||||
|
||||
There are additional warnings found with musl which are
|
||||
treated as errors and fails the build, we have more combinations
|
||||
than upstream supports to handle.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Here's a patch that has been backported from an upstream commit::
|
||||
|
||||
include missing sys/file.h for LOCK_EX
|
||||
|
||||
Upstream-Status: Backport [https://github.com/systemd/systemd/commit/ac8db36cbc26694ee94beecc8dca208ec4b5fd45]
|
||||
|
||||
CVE patches
|
||||
===========
|
||||
|
||||
In order to have a better control of vulnerabilities, patches that fix CVEs must
|
||||
contain a ``CVE:`` tag. This tag list all CVEs fixed by the patch. If more than
|
||||
one CVE is fixed, separate them using spaces.
|
||||
|
||||
CVE Examples
|
||||
------------
|
||||
|
||||
This should be the header of patch that fixes :cve:`2015-8370` in GRUB2::
|
||||
|
||||
grub2: Fix CVE-2015-8370
|
||||
|
||||
[No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1286966
|
||||
|
||||
Back to 28; Grub2 Authentication
|
||||
|
||||
Two functions suffer from integer underflow fault; the grub_username_get() and grub_password_get()located in
|
||||
grub-core/normal/auth.c and lib/crypto.c respectively. This can be exploited to obtain a Grub rescue shell.
|
||||
|
||||
Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2]
|
||||
CVE: CVE-2015-8370
|
||||
Signed-off-by: Joe Developer <joe.developer@example.com>
|
||||
|
||||
@@ -42,6 +42,7 @@ Yocto Project Development Tasks Manual
|
||||
runtime-testing
|
||||
debugging
|
||||
licenses
|
||||
security-subjects
|
||||
vulnerabilities
|
||||
sbom
|
||||
error-reporting-tool
|
||||
|
||||
@@ -128,6 +128,20 @@ Follow these general steps to create your layer without using tools:
|
||||
variable is a good way to indicate if your particular layer is
|
||||
current.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
A layer does not have to contain only recipes ``.bb`` or append files
|
||||
``.bbappend``. Generally, developers create layers using
|
||||
``bitbake-layers create-layer``.
|
||||
See ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`",
|
||||
explaining how the ``layer.conf`` file is created from a template located in
|
||||
``meta/lib/bblayers/templates/layer.conf``.
|
||||
In fact, none of the variables set in ``layer.conf`` are mandatory,
|
||||
except when :term:`BBFILE_COLLECTIONS` is present. In this case
|
||||
:term:`LAYERSERIES_COMPAT` and :term:`BBFILE_PATTERN` have to be
|
||||
defined too.
|
||||
|
||||
#. *Add Content:* Depending on the type of layer, add the content. If
|
||||
the layer adds support for a machine, add the machine configuration
|
||||
in a ``conf/machine/`` file within the layer. If the layer adds
|
||||
|
||||
@@ -409,8 +409,8 @@ Patching Code
|
||||
|
||||
Sometimes it is necessary to patch code after it has been fetched. Any
|
||||
files mentioned in :term:`SRC_URI` whose names end in ``.patch`` or
|
||||
``.diff`` or compressed versions of these suffixes (e.g. ``diff.gz`` are
|
||||
treated as patches. The
|
||||
``.diff`` or compressed versions of these suffixes (e.g. ``diff.gz``,
|
||||
``patch.bz2``, etc.) are treated as patches. The
|
||||
:ref:`ref-tasks-patch` task
|
||||
automatically applies these patches.
|
||||
|
||||
@@ -1396,9 +1396,9 @@ doing the following:
|
||||
Following Recipe Style Guidelines
|
||||
=================================
|
||||
|
||||
When writing recipes, it is good to conform to existing style
|
||||
guidelines. The :oe_wiki:`OpenEmbedded Styleguide </Styleguide>` wiki page
|
||||
provides rough guidelines for preferred recipe style.
|
||||
When writing recipes, it is good to conform to existing style guidelines.
|
||||
See the ":doc:`../contributor-guide/recipe-style-guide`" in the Yocto Project
|
||||
and OpenEmbedded Contributor Guide for reference.
|
||||
|
||||
It is common for existing recipes to deviate a bit from this style.
|
||||
However, aiming for at least a consistent style is a good idea. Some
|
||||
|
||||
@@ -229,7 +229,7 @@ The final thing you need to do when setting :term:`TEST_TARGET` to
|
||||
statements in your ``local.conf`` file::
|
||||
|
||||
IMAGE_FSTYPES += "tar.gz"
|
||||
INHERIT += "testimage"
|
||||
IMAGE_CLASSES += "testimage"
|
||||
TEST_TARGET = "SystemdbootTarget"
|
||||
TEST_TARGET_IP = "192.168.2.3"
|
||||
|
||||
@@ -335,7 +335,7 @@ You can start the tests automatically or manually:
|
||||
inherit the :ref:`ref-classes-testimage*` class by editing your
|
||||
``local.conf`` file::
|
||||
|
||||
INHERIT += "testimage"
|
||||
IMAGE_CLASSES += "testimage"
|
||||
|
||||
Next, use BitBake to run the tests::
|
||||
|
||||
|
||||
189
documentation/dev-manual/security-subjects.rst
Normal file
189
documentation/dev-manual/security-subjects.rst
Normal file
@@ -0,0 +1,189 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Dealing with Vulnerability Reports
|
||||
**********************************
|
||||
|
||||
The Yocto Project and OpenEmbedded are open-source, community-based projects
|
||||
used in numerous products. They assemble multiple other open-source projects,
|
||||
and need to handle security issues and practices both internal (in the code
|
||||
maintained by both projects), and external (maintained by other projects and
|
||||
organizations).
|
||||
|
||||
This manual assembles security-related information concerning the whole
|
||||
ecosystem. It includes information on reporting a potential security issue,
|
||||
the operation of the YP Security team and how to contribute in the
|
||||
related code. It is written to be useful for both security researchers and
|
||||
YP developers.
|
||||
|
||||
How to report a potential security vulnerability?
|
||||
=================================================
|
||||
|
||||
If you would like to report a public issue (for example, one with a released
|
||||
CVE number), please report it using the
|
||||
:yocto_bugs:`Security Bugzilla </enter_bug.cgi?product=Security>`.
|
||||
|
||||
If you are dealing with a not-yet-released issue, or an urgent one, please send
|
||||
a message to security AT yoctoproject DOT org, including as many details as
|
||||
possible: the layer or software module affected, the recipe and its version,
|
||||
and any example code, if available. This mailing list is monitored by the
|
||||
Yocto Project Security team.
|
||||
|
||||
For each layer, you might also look for specific instructions (if any) for
|
||||
reporting potential security issues in the specific ``SECURITY.md`` file at the
|
||||
root of the repository. Instructions on how and where submit a patch are
|
||||
usually available in ``README.md``. If this is your first patch to the
|
||||
Yocto Project/OpenEmbedded, you might want to have a look into the
|
||||
Contributor's Manual section
|
||||
":ref:`contributor-guide/submit-changes:preparing changes for submission`".
|
||||
|
||||
Branches maintained with security fixes
|
||||
---------------------------------------
|
||||
|
||||
See the
|
||||
:ref:`Release process <ref-manual/release-process:Stable Release Process>`
|
||||
documentation for details regarding the policies and maintenance of stable
|
||||
branches.
|
||||
|
||||
The :yocto_wiki:`Releases page </Releases>` contains a list
|
||||
of all releases of the Yocto Project. Versions in gray are no longer actively
|
||||
maintained with security patches, but well-tested patches may still be accepted
|
||||
for them for significant issues.
|
||||
|
||||
Security-related discussions at the Yocto Project
|
||||
-------------------------------------------------
|
||||
|
||||
We have set up two security-related mailing lists:
|
||||
|
||||
- Public List: yocto [dash] security [at] yoctoproject[dot] org
|
||||
|
||||
This is a public mailing list for anyone to subscribe to. This list is an
|
||||
open list to discuss public security issues/patches and security-related
|
||||
initiatives. For more information, including subscription information,
|
||||
please see the :yocto_lists:`yocto-security mailing list info page </g/yocto-security>`.
|
||||
|
||||
- Private List: security [at] yoctoproject [dot] org
|
||||
|
||||
This is a private mailing list for reporting non-published potential
|
||||
vulnerabilities. The list is monitored by the Yocto Project Security team.
|
||||
|
||||
|
||||
What you should do if you find a security vulnerability
|
||||
-------------------------------------------------------
|
||||
|
||||
If you find a security flaw: a crash, an information leakage, or anything that
|
||||
can have a security impact if exploited in any Open Source software built or
|
||||
used by the Yocto Project, please report this to the Yocto Project Security
|
||||
Team. If you prefer to contact the upstream project directly, please send a
|
||||
copy to the security team at the Yocto Project as well. If you believe this is
|
||||
highly sensitive information, please report the vulnerability in a secure way,
|
||||
i.e. encrypt the email and send it to the private list. This ensures that
|
||||
the exploit is not leaked and exploited before a response/fix has been generated.
|
||||
|
||||
Security team
|
||||
=============
|
||||
|
||||
The Yocto Project/OpenEmbedded security team coordinates the work on security
|
||||
subjects in the project. All general discussion takes place publicly. The
|
||||
Security Team only uses confidential communication tools to deal with private
|
||||
vulnerability reports before they are released.
|
||||
|
||||
Security team appointment
|
||||
-------------------------
|
||||
|
||||
The Yocto Project Security Team consists of at least three members. When new
|
||||
members are needed, the Yocto Project Technical Steering Committee (YP TSC)
|
||||
asks for nominations by public channels including a nomination deadline.
|
||||
Self-nominations are possible. When the limit time is
|
||||
reached, the YP TSC posts the list of candidates for the comments of project
|
||||
participants and developers. Comments may be sent publicly or privately to the
|
||||
YP and OE TSCs. The candidates are approved by both YP TSC and OpenEmbedded
|
||||
Technical Steering Committee (OE TSC) and the final list of the team members
|
||||
is announced publicly. The aim is to have people representing technical
|
||||
leadership, security knowledge and infrastructure present with enough people
|
||||
to provide backup/coverage but keep the notification list small enough to
|
||||
minimize information risk and maintain trust.
|
||||
|
||||
YP Security Team members may resign at any time.
|
||||
|
||||
Security Team Operations
|
||||
------------------------
|
||||
|
||||
The work of the Security Team might require high confidentiality. Team members
|
||||
are individuals selected by merit and do not represent the companies they work
|
||||
for. They do not share information about confidential issues outside of the team
|
||||
and do not hint about ongoing embargoes.
|
||||
|
||||
Team members can bring in domain experts as needed. Those people should be
|
||||
added to individual issues only and adhere to the same standards as the YP
|
||||
Security Team.
|
||||
|
||||
The YP security team organizes its meetings and communication as needed.
|
||||
|
||||
When the YP Security team receives a report about a potential security
|
||||
vulnerability, they quickly analyze and notify the reporter of the result.
|
||||
They might also request more information.
|
||||
|
||||
If the issue is confirmed and affects the code maintained by the YP, they
|
||||
confidentially notify maintainers of that code and work with them to prepare
|
||||
a fix.
|
||||
|
||||
If the issue is confirmed and affects an upstream project, the YP security team
|
||||
notifies the project. Usually, the upstream project analyzes the problem again.
|
||||
If they deem it a real security problem in their software, they develop and
|
||||
release a fix following their security policy. They may want to include the
|
||||
original reporter in the loop. There is also sometimes some coordination for
|
||||
handling patches, backporting patches etc, or just understanding the problem
|
||||
or what caused it.
|
||||
|
||||
When the fix is publicly available, the YP security team member or the
|
||||
package maintainer sends patches against the YP code base, following usual
|
||||
procedures, including public code review.
|
||||
|
||||
What Yocto Security Team does when it receives a security vulnerability
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
The YP Security Team team performs a quick analysis and would usually report
|
||||
the flaw to the upstream project. Normally the upstream project analyzes the
|
||||
problem. If they deem it a real security problem in their software, they
|
||||
develop and release a fix following their own security policy. They may want
|
||||
to include the original reporter in the loop. There is also sometimes some
|
||||
coordination for handling patches, backporting patches etc, or just
|
||||
understanding the problem or what caused it.
|
||||
|
||||
The security policy of the upstream project might include a notification to
|
||||
Linux distributions or other important downstream projects in advance to
|
||||
discuss coordinated disclosure. These mailing lists are normally non-public.
|
||||
|
||||
When the upstream project releases a version with the fix, they are responsible
|
||||
for contacting `Mitre <https://www.cve.org/>`__ to get a CVE number assigned and
|
||||
the CVE record published.
|
||||
|
||||
If an upstream project does not respond quickly
|
||||
-----------------------------------------------
|
||||
|
||||
If an upstream project does not fix the problem in a reasonable time,
|
||||
the Yocto's Security Team will contact other interested parties (usually
|
||||
other distributions) in the community and together try to solve the
|
||||
vulnerability as quickly as possible.
|
||||
|
||||
The Yocto Project Security team adheres to the 90 days disclosure policy
|
||||
by default. An increase of the embargo time is possible when necessary.
|
||||
|
||||
Current Security Team members
|
||||
-----------------------------
|
||||
|
||||
For secure communications, please send your messages encrypted using the GPG
|
||||
keys. Remember, message headers are not encrypted so do not include sensitive
|
||||
information in the subject line.
|
||||
|
||||
- Ross Burton: <ross@burtonini.com> `Public key <https://keys.openpgp.org/search?q=ross%40burtonini.com>`__
|
||||
|
||||
- Michael Halstead: <mhalstead [at] linuxfoundation [dot] org>
|
||||
`Public key <https://pgp.mit.edu/pks/lookup?op=vindex&search=0x3373170601861969>`__
|
||||
or `Public key <https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xd1f2407285e571ed12a407a73373170601861969>`__
|
||||
|
||||
- Richard Purdie: <richard.purdie@linuxfoundation.org> `Public key <https://keys.openpgp.org/search?q=richard.purdie%40linuxfoundation.org>`__
|
||||
|
||||
- Marta Rybczynska: <marta DOT rybczynska [at] syslinbit [dot] com> `Public key <https://keys.openpgp.org/search?q=marta.rybczynska@syslinbit.com>`__
|
||||
|
||||
- Steve Sakoman: <steve [at] sakoman [dot] com> `Public key <https://keys.openpgp.org/search?q=steve%40sakoman.com>`__
|
||||
@@ -88,27 +88,15 @@ particular working environment and set of practices.
|
||||
For information about BitBake, see the
|
||||
:doc:`bitbake:index`.
|
||||
|
||||
It is relatively easy to set up Git services and create
|
||||
infrastructure like :yocto_git:`/`, which is based on
|
||||
server software called ``gitolite`` with ``cgit`` being used to
|
||||
generate the web interface that lets you view the repositories. The
|
||||
``gitolite`` software identifies users using SSH keys and allows
|
||||
It is relatively easy to set up Git services and create infrastructure like
|
||||
:yocto_git:`/`, which is based on server software called
|
||||
`Gitolite <https://gitolite.com>`__
|
||||
with `cgit <https://git.zx2c4.com/cgit/about/>`__ being used to
|
||||
generate the web interface that lets you view the repositories.
|
||||
``gitolite`` identifies users using SSH keys and allows
|
||||
branch-based access controls to repositories that you can control as
|
||||
little or as much as necessary.
|
||||
|
||||
.. note::
|
||||
|
||||
The setup of these services is beyond the scope of this manual.
|
||||
However, here are sites describing how to perform setup:
|
||||
|
||||
- `Gitolite <https://gitolite.com>`__: Information for
|
||||
``gitolite``.
|
||||
|
||||
- `Interfaces, frontends, and
|
||||
tools <https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>`__:
|
||||
Documentation on how to create interfaces and frontends for
|
||||
Git.
|
||||
|
||||
5. *Set up the Application Development Machines:* As mentioned earlier,
|
||||
application developers are creating applications on top of existing
|
||||
software stacks. Following are some best practices for setting up
|
||||
|
||||
@@ -117,7 +117,7 @@ The following steps describe how to set up the AUH utility:
|
||||
class, which is optional, you need to have the following set in
|
||||
your ``conf/local.conf`` file::
|
||||
|
||||
INHERIT += "testimage"
|
||||
IMAGE_CLASSES += "testimage"
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -142,17 +142,18 @@ command to return the available Wic images as follows::
|
||||
genericx86 Create an EFI disk image for genericx86*
|
||||
edgerouter Create SD card image for Edgerouter
|
||||
beaglebone-yocto Create SD card image for Beaglebone
|
||||
qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
|
||||
systemd-bootdisk Create an EFI disk image with systemd-boot
|
||||
mkhybridiso Create a hybrid ISO image
|
||||
qemuriscv Create qcow2 image for RISC-V QEMU machines
|
||||
mkefidisk Create an EFI disk image
|
||||
sdimage-bootpart Create SD card image with a boot partition
|
||||
directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
|
||||
directdisk Create a 'pcbios' direct disk image
|
||||
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
|
||||
qemuriscv Create qcow2 image for RISC-V QEMU machines
|
||||
efi-bootdisk
|
||||
mkhybridiso Create a hybrid ISO image
|
||||
directdisk-gpt Create a 'pcbios' direct disk image
|
||||
efi-bootdisk
|
||||
systemd-bootdisk Create an EFI disk image with systemd-boot
|
||||
sdimage-bootpart Create SD card image with a boot partition
|
||||
qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
|
||||
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
|
||||
|
||||
|
||||
Once you know the list of available
|
||||
Wic images, you can use ``help`` with the command to get help on a
|
||||
@@ -283,16 +284,18 @@ Use the following command to list the available kickstart files::
|
||||
|
||||
$ wic list images
|
||||
genericx86 Create an EFI disk image for genericx86*
|
||||
beaglebone-yocto Create SD card image for Beaglebone
|
||||
edgerouter Create SD card image for Edgerouter
|
||||
qemux86-directdisk Create a QEMU machine 'pcbios' direct disk image
|
||||
directdisk-gpt Create a 'pcbios' direct disk image
|
||||
beaglebone-yocto Create SD card image for Beaglebone
|
||||
qemuriscv Create qcow2 image for RISC-V QEMU machines
|
||||
mkefidisk Create an EFI disk image
|
||||
directdisk Create a 'pcbios' direct disk image
|
||||
systemd-bootdisk Create an EFI disk image with systemd-boot
|
||||
mkhybridiso Create a hybrid ISO image
|
||||
sdimage-bootpart Create SD card image with a boot partition
|
||||
directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
|
||||
directdisk Create a 'pcbios' direct disk image
|
||||
efi-bootdisk
|
||||
mkhybridiso Create a hybrid ISO image
|
||||
directdisk-gpt Create a 'pcbios' direct disk image
|
||||
systemd-bootdisk Create an EFI disk image with systemd-boot
|
||||
sdimage-bootpart Create SD card image with a boot partition
|
||||
qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
|
||||
directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
|
||||
|
||||
When you use an existing file, you
|
||||
|
||||
@@ -69,8 +69,7 @@ to indicate the branch.
|
||||
You can use the :term:`KBRANCH` value to define an alternate branch typically
|
||||
with a machine override as shown here from the ``meta-yocto-bsp`` layer::
|
||||
|
||||
KBRANCH:edgerouter = "standard/edgerouter"
|
||||
|
||||
KBRANCH:beaglebone-yocto = "standard/beaglebone"
|
||||
|
||||
The linux-yocto style recipes can optionally define the following
|
||||
variables:
|
||||
|
||||
@@ -455,13 +455,13 @@ Creating the Append File
|
||||
|
||||
You create this file in your custom layer. You also name it accordingly
|
||||
based on the linux-yocto recipe you are using. For example, if you are
|
||||
modifying the ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` recipe,
|
||||
modifying the ``meta/recipes-kernel/linux/linux-yocto_5.15.bb`` recipe,
|
||||
the append file will typically be located as follows within your custom
|
||||
layer:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
your-layer/recipes-kernel/linux/linux-yocto_4.12.bbappend
|
||||
your-layer/recipes-kernel/linux/linux-yocto_5.15.bbappend
|
||||
|
||||
The append file should initially extend the
|
||||
:term:`FILESPATH` search path by
|
||||
@@ -489,36 +489,36 @@ As an example, consider the following append file used by the BSPs in
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend
|
||||
meta-yocto-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend
|
||||
|
||||
Here are the contents of this file. Be aware that the actual commit ID
|
||||
strings in this example listing might be different than the actual
|
||||
strings in the file from the ``meta-yocto-bsp`` layer upstream.
|
||||
::
|
||||
|
||||
KBRANCH:genericx86 = "standard/base"
|
||||
KBRANCH:genericx86-64 = "standard/base"
|
||||
KBRANCH:genericx86 = "v5.15/standard/base"
|
||||
KBRANCH:genericx86-64 = "v5.15/standard/base"
|
||||
KBRANCH:edgerouter = "v5.15/standard/edgerouter"
|
||||
KBRANCH:beaglebone-yocto = "v5.15/standard/beaglebone"
|
||||
|
||||
KMACHINE:genericx86 ?= "common-pc"
|
||||
KMACHINE:genericx86-64 ?= "common-pc-64"
|
||||
KBRANCH:edgerouter = "standard/edgerouter"
|
||||
KBRANCH:beaglebone = "standard/beaglebone"
|
||||
|
||||
SRCREV_machine:genericx86 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
|
||||
SRCREV_machine:genericx86-64 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
|
||||
SRCREV_machine:edgerouter ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
|
||||
SRCREV_machine:beaglebone ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
|
||||
KMACHINE:beaglebone-yocto ?= "beaglebone"
|
||||
|
||||
SRCREV_machine:genericx86 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||
SRCREV_machine:genericx86-64 ?= "0b628306d1f9ea28c0e86369ce9bb87a47893c9c"
|
||||
SRCREV_machine:edgerouter ?= "90f1ee6589264545f548d731c2480b08a007230f"
|
||||
SRCREV_machine:beaglebone-yocto ?= "9aabbaa89fcb21af7028e814c1f5b61171314d5a"
|
||||
|
||||
COMPATIBLE_MACHINE:genericx86 = "genericx86"
|
||||
COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64"
|
||||
COMPATIBLE_MACHINE:edgerouter = "edgerouter"
|
||||
COMPATIBLE_MACHINE:beaglebone = "beaglebone"
|
||||
COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto"
|
||||
|
||||
LINUX_VERSION:genericx86 = "4.12.7"
|
||||
LINUX_VERSION:genericx86-64 = "4.12.7"
|
||||
LINUX_VERSION:edgerouter = "4.12.10"
|
||||
LINUX_VERSION:beaglebone = "4.12.10"
|
||||
LINUX_VERSION:genericx86 = "5.15.72"
|
||||
LINUX_VERSION:genericx86-64 = "5.15.72"
|
||||
LINUX_VERSION:edgerouter = "5.15.54"
|
||||
LINUX_VERSION:beaglebone-yocto = "5.15.54"
|
||||
|
||||
This append file
|
||||
contains statements used to support several BSPs that ship with the
|
||||
@@ -1081,7 +1081,7 @@ Section.
|
||||
the following sequence of commands::
|
||||
|
||||
$ cd poky/build
|
||||
$ bitbake -c cleanall yocto-linux
|
||||
$ bitbake -c cleanall linux-yocto
|
||||
$ bitbake core-image-minimal -c cleanall
|
||||
$ bitbake core-image-minimal
|
||||
$ runqemu qemux86
|
||||
|
||||
@@ -19,3 +19,4 @@ Release 4.0 (kirkstone)
|
||||
release-notes-4.0.10
|
||||
release-notes-4.0.11
|
||||
release-notes-4.0.12
|
||||
release-notes-4.0.13
|
||||
|
||||
271
documentation/migration-guides/release-notes-4.0.13.rst
Normal file
271
documentation/migration-guides/release-notes-4.0.13.rst
Normal file
File diff suppressed because one or more lines are too long
@@ -2004,6 +2004,15 @@ task output from the Shared State cache.
|
||||
the stability of the task's output hash. Therefore, the effectiveness
|
||||
of Hash Equivalence strongly depends on it.
|
||||
|
||||
Recipes that are not reproducible may have undesired behavior if hash
|
||||
equivalence is enabled, since the non-reproducible diverging output maybe be
|
||||
remapped to an older sstate object in the cache by the server. If a recipe
|
||||
is non-reproducible in trivial ways, such as different timestamps, this is
|
||||
likely not a problem. However recipes that have more dramatic changes (such
|
||||
as completely different file names) will likely outright fail since the
|
||||
downstream sstate objects are not actually equivalent to what was just
|
||||
built.
|
||||
|
||||
This applies to multiple scenarios:
|
||||
|
||||
- A "trivial" change to a recipe that doesn't impact its generated output,
|
||||
|
||||
@@ -7,43 +7,45 @@ Yocto Project Profiling and Tracing Manual
|
||||
Introduction
|
||||
============
|
||||
|
||||
Yocto bundles a number of tracing and profiling tools - this 'HOWTO'
|
||||
Yocto Project bundles a number of tracing and profiling tools --- this manual
|
||||
describes their basic usage and shows by example how to make use of them
|
||||
to examine application and system behavior.
|
||||
to analyze application and system behavior.
|
||||
|
||||
The tools presented are for the most part completely open-ended and have
|
||||
The tools presented are, for the most part, completely open-ended and have
|
||||
quite good and/or extensive documentation of their own which can be used
|
||||
to solve just about any problem you might come across in Linux. Each
|
||||
section that describes a particular tool has links to that tool's
|
||||
documentation and website.
|
||||
|
||||
The purpose of this 'HOWTO' is to present a set of common and generally
|
||||
The purpose of this manual is to present a set of common and generally
|
||||
useful tracing and profiling idioms along with their application (as
|
||||
appropriate) to each tool, in the context of a general-purpose
|
||||
'drill-down' methodology that can be applied to solving a large number
|
||||
(90%?) of problems. For help with more advanced usages and problems,
|
||||
please see the documentation and/or websites listed for each tool.
|
||||
of problems. For help with more advanced usages and problems,
|
||||
refer to the documentation and/or websites provided for each tool.
|
||||
|
||||
The final section of this 'HOWTO' is a collection of real-world examples
|
||||
which we'll be continually adding to as we solve more problems using the
|
||||
tools - feel free to add your own examples to the list!
|
||||
The final section of this manual is a collection of real-world examples
|
||||
which we'll be continually updating as we solve more problems using the
|
||||
tools --- feel free to suggest additions to what you read here.
|
||||
|
||||
General Setup
|
||||
=============
|
||||
|
||||
Most of the tools are available only in 'sdk' images or in images built
|
||||
after adding 'tools-profile' to your local.conf. So, in order to be able
|
||||
to access all of the tools described here, please first build and boot
|
||||
an 'sdk' image e.g. ::
|
||||
Most of the tools are available only in ``sdk`` images or in images built
|
||||
after adding ``tools-profile`` to your ``local.conf`` file. So, in order to be able
|
||||
to access all of the tools described here, you can build and boot
|
||||
an ``sdk`` image, perhaps one of::
|
||||
|
||||
$ bitbake core-image-sato-sdk
|
||||
$ bitbake core-image-weston-sdk
|
||||
$ bitbake core-image-rt-sdk
|
||||
|
||||
or alternatively by adding 'tools-profile' to the EXTRA_IMAGE_FEATURES line in
|
||||
your local.conf::
|
||||
Alternatively, you can add ``tools-profile`` to the :term:`EXTRA_IMAGE_FEATURES` line in
|
||||
your ``local.conf`` file::
|
||||
|
||||
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
|
||||
|
||||
If you use the 'tools-profile' method, you don't need to build an sdk image -
|
||||
If you use the ``tools-profile`` method, you don't need to build an sdk image ---
|
||||
the tracing and profiling tools will be included in non-sdk images as well e.g.::
|
||||
|
||||
$ bitbake core-image-sato
|
||||
@@ -64,12 +66,12 @@ the tracing and profiling tools will be included in non-sdk images as well e.g.:
|
||||
If you've already built a stripped image, you can generate debug
|
||||
packages (xxx-dbg) which you can manually install as needed.
|
||||
|
||||
To generate debug info for packages, you can add dbg-pkgs to
|
||||
EXTRA_IMAGE_FEATURES in local.conf. For example::
|
||||
To generate debug info for packages, you can add ``dbg-pkgs`` to
|
||||
:term:`EXTRA_IMAGE_FEATURES` in ``local.conf``. For example::
|
||||
|
||||
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
|
||||
|
||||
Additionally, in order to generate the right type of debuginfo, we also need to
|
||||
Additionally, in order to generate the right type of debug info, we also need to
|
||||
set :term:`PACKAGE_DEBUG_SPLIT_STYLE` in the ``local.conf`` file::
|
||||
|
||||
PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
|
||||
|
||||
@@ -718,7 +718,7 @@
|
||||
x="1373.233"
|
||||
y="-247.33261"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:13.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#fffefe;fill-opacity:1;stroke:none"
|
||||
id="tspan10317-2-9-1-4-6-5">4.4</tspan></text>
|
||||
id="tspan10317-2-9-1-4-6-5">5.0</tspan></text>
|
||||
<rect
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
id="rect917-0-0-4-4-9-9"
|
||||
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
@@ -1202,6 +1202,32 @@ system and gives an overview of their function and contents.
|
||||
speed since the build system skips parsing recipes not compatible
|
||||
with the current machine.
|
||||
|
||||
If one wants to have a recipe only available for some architectures
|
||||
(here ``aarch64`` and ``mips64``), the following can be used::
|
||||
|
||||
COMPATIBLE_MACHINE = "^$"
|
||||
COMPATIBLE_MACHINE:arch64 = "^(aarch64)$"
|
||||
COMPATIBLE_MACHINE:mips64 = "^(mips64)$"
|
||||
|
||||
The first line means "match all machines whose :term:`MACHINEOVERRIDES`
|
||||
contains the empty string", which will always be none.
|
||||
|
||||
The second is for matching all machines whose :term:`MACHINEOVERRIDES`
|
||||
contains one override which is exactly ``aarch64``.
|
||||
|
||||
The third is for matching all machines whose :term:`MACHINEOVERRIDES`
|
||||
contains one override which is exactly ``mips64``.
|
||||
|
||||
The same could be achieved with::
|
||||
|
||||
COMPATIBLE_MACHINE = "^(aarch64|mips64)$"
|
||||
|
||||
.. note::
|
||||
|
||||
When :term:`COMPATIBLE_MACHINE` is set in a recipe inherits from
|
||||
native, the recipe is always skipped. All native recipes must be
|
||||
entirely target independent and should not rely on :term:`MACHINE`.
|
||||
|
||||
:term:`COMPLEMENTARY_GLOB`
|
||||
Defines wildcards to match when installing a list of complementary
|
||||
packages for all the packages explicitly (or implicitly) installed in
|
||||
@@ -3694,6 +3720,21 @@ system and gives an overview of their function and contents.
|
||||
even if the toolchain's binaries are strippable, there are other files
|
||||
needed for the build that are not strippable.
|
||||
|
||||
:term:`INIT_MANAGER`
|
||||
Specifies the system init manager to use. Available options are:
|
||||
|
||||
- ``sysvinit`` - System V init (default for poky)
|
||||
- ``systemd`` - systemd
|
||||
- ``mdev-busybox`` - mdev provided by busybox
|
||||
- ``none`` - no init manager
|
||||
|
||||
More concretely, this is used to include
|
||||
``conf/distro/include/init-manager-${INIT_MANAGER}.inc`` into the global
|
||||
configuration. You can have a look at the ``conf/distro/include/init-manager-*.inc``
|
||||
files for more information, and also the
|
||||
":ref:`dev-manual/init-manager:selecting an initialization manager`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
:term:`INITRAMFS_DEPLOY_DIR_IMAGE`
|
||||
Indicates the deploy directory used by ``do_bundle_initramfs`` where the
|
||||
:term:`INITRAMFS_IMAGE` will be fetched from.
|
||||
@@ -3936,7 +3977,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
Values for this variable are set in the kernel's recipe file and the
|
||||
kernel's append file. For example, if you are using the
|
||||
``linux-yocto_4.12`` kernel, the kernel recipe file is the
|
||||
``linux-yocto_5.15`` kernel, the kernel recipe file is the
|
||||
``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
|
||||
is set as follows in that kernel recipe file::
|
||||
|
||||
@@ -3949,13 +3990,13 @@ system and gives an overview of their function and contents.
|
||||
BSP layer for a given machine. For example, the append file for the
|
||||
Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
|
||||
machines (``meta-yocto-bsp``) is named
|
||||
``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
|
||||
``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend``.
|
||||
Here are the related statements from that append file::
|
||||
|
||||
KBRANCH:genericx86 = "standard/base"
|
||||
KBRANCH:genericx86-64 = "standard/base"
|
||||
KBRANCH:edgerouter = "standard/edgerouter"
|
||||
KBRANCH:beaglebone = "standard/beaglebone"
|
||||
KBRANCH:genericx86 = "v5.15/standard/base"
|
||||
KBRANCH:genericx86-64 = "v5.15/standard/base"
|
||||
KBRANCH:edgerouter = "v5.15/standard/edgerouter"
|
||||
KBRANCH:beaglebone-yocto = "v5.15/standard/beaglebone"
|
||||
|
||||
The :term:`KBRANCH` statements
|
||||
identify the kernel branch to use when building for each supported
|
||||
@@ -5526,25 +5567,23 @@ system and gives an overview of their function and contents.
|
||||
omit any argument you like but must retain the separating commas. The
|
||||
order is important and specifies the following:
|
||||
|
||||
1. Extra arguments that should be added to the configure script
|
||||
argument list (:term:`EXTRA_OECONF` or
|
||||
:term:`PACKAGECONFIG_CONFARGS`) if
|
||||
the feature is enabled.
|
||||
#. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
|
||||
if the feature is enabled.
|
||||
|
||||
2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
|
||||
:term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
|
||||
#. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
|
||||
if the feature is disabled.
|
||||
|
||||
3. Additional build dependencies (:term:`DEPENDS`)
|
||||
#. Additional build dependencies (:term:`DEPENDS`)
|
||||
that should be added if the feature is enabled.
|
||||
|
||||
4. Additional runtime dependencies (:term:`RDEPENDS`)
|
||||
#. Additional runtime dependencies (:term:`RDEPENDS`)
|
||||
that should be added if the feature is enabled.
|
||||
|
||||
5. Additional runtime recommendations
|
||||
#. Additional runtime recommendations
|
||||
(:term:`RRECOMMENDS`) that should be added if
|
||||
the feature is enabled.
|
||||
|
||||
6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
|
||||
#. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
|
||||
settings for this feature.
|
||||
|
||||
Consider the following :term:`PACKAGECONFIG` block taken from the
|
||||
@@ -5591,6 +5630,38 @@ system and gives an overview of their function and contents.
|
||||
|
||||
PACKAGECONFIG:append:pn-recipename = " f4"
|
||||
|
||||
Consider the following example of a :ref:`ref-classes-cmake` recipe with a systemd service
|
||||
in which :term:`PACKAGECONFIG` is used to transform the systemd service
|
||||
into a feature that can be easily enabled or disabled via :term:`PACKAGECONFIG`::
|
||||
|
||||
example.c
|
||||
example.service
|
||||
CMakeLists.txt
|
||||
|
||||
The ``CMakeLists.txt`` file contains::
|
||||
|
||||
if(WITH_SYSTEMD)
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/example.service DESTINATION /etc/systemd/systemd)
|
||||
endif(WITH_SYSTEMD)
|
||||
|
||||
In order to enable the installation of ``example.service`` we need to
|
||||
ensure that ``-DWITH_SYSTEMD=ON`` is passed to the ``cmake`` command
|
||||
execution. Recipes that have ``CMakeLists.txt`` generally inherit the
|
||||
:ref:`ref-classes-cmake` class, that runs ``cmake`` with
|
||||
:term:`EXTRA_OECMAKE`, which :term:`PACKAGECONFIG_CONFARGS` will be
|
||||
appended to. Now, knowing that :term:`PACKAGECONFIG_CONFARGS` is
|
||||
automatically filled with either the first or second element of
|
||||
:term:`PACKAGECONFIG` flag value, the recipe would be like::
|
||||
|
||||
inherit cmake
|
||||
PACKAGECONFIG = "systemd"
|
||||
PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF"
|
||||
|
||||
A side note to this recipe is to check if ``systemd`` is in fact the used :term:`INIT_MANAGER`
|
||||
or not::
|
||||
|
||||
PACKAGECONFIG = "${@'systemd' if d.getVar('INIT_MANAGER') == 'systemd' else ''}"
|
||||
|
||||
:term:`PACKAGECONFIG_CONFARGS`
|
||||
A space-separated list of configuration options generated from the
|
||||
:term:`PACKAGECONFIG` setting.
|
||||
@@ -6385,6 +6456,39 @@ system and gives an overview of their function and contents.
|
||||
in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
|
||||
section.
|
||||
|
||||
:term:`RECIPE_SYSROOT`
|
||||
This variable points to the directory that holds all files populated from
|
||||
recipes specified in :term:`DEPENDS`. As the name indicates,
|
||||
think of this variable as a custom root (``/``) for the recipe that will be
|
||||
used by the compiler in order to find headers and other files needed to complete
|
||||
its job.
|
||||
|
||||
This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET`
|
||||
according to the type of the recipe and the build target.
|
||||
|
||||
To better understand this variable, consider the following examples:
|
||||
|
||||
- For ``#include <header.h>``, ``header.h`` should be in ``"${RECIPE_SYSROOT}/usr/include"``
|
||||
|
||||
- For ``-lexample``, ``libexample.so`` should be in ``"${RECIPE_SYSROOT}/lib"``
|
||||
or other library sysroot directories.
|
||||
|
||||
The default value is ``"${WORKDIR}/recipe-sysroot"``.
|
||||
Do not modify it.
|
||||
|
||||
:term:`RECIPE_SYSROOT_NATIVE`
|
||||
This is similar to :term:`RECIPE_SYSROOT` but the populated files are from
|
||||
``-native`` recipes. This allows a recipe built for the target machine to
|
||||
use ``native`` tools.
|
||||
|
||||
This variable is related to :term:`STAGING_DIR_NATIVE`.
|
||||
|
||||
The default value is ``"${WORKDIR}/recipe-sysroot-native"``.
|
||||
Do not modify it.
|
||||
|
||||
:term:`REPODIR`
|
||||
See :term:`bitbake:REPODIR` in the BitBake manual.
|
||||
|
||||
:term:`REQUIRED_DISTRO_FEATURES`
|
||||
When inheriting the
|
||||
:ref:`features_check <ref-classes-features_check>`
|
||||
@@ -7619,10 +7723,15 @@ system and gives an overview of their function and contents.
|
||||
for ``-native`` recipes, as they make use of host headers and
|
||||
libraries.
|
||||
|
||||
Check :term:`RECIPE_SYSROOT` and :term:`RECIPE_SYSROOT_NATIVE`.
|
||||
|
||||
:term:`STAGING_DIR_NATIVE`
|
||||
Specifies the path to the sysroot directory used when building
|
||||
components that run on the build host itself.
|
||||
|
||||
The default value is ``"${RECIPE_SYSROOT_NATIVE}"``,
|
||||
check :term:`RECIPE_SYSROOT_NATIVE`.
|
||||
|
||||
:term:`STAGING_DIR_TARGET`
|
||||
Specifies the path to the sysroot used for the system for which the
|
||||
component generates code. For components that do not generate code,
|
||||
@@ -7804,6 +7913,35 @@ system and gives an overview of their function and contents.
|
||||
${libdir}/${BPN}/ptest \
|
||||
"
|
||||
|
||||
Consider the following example in which you need to manipulate this variable.
|
||||
Assume you have a recipe ``A`` that provides a shared library ``.so.*`` that is
|
||||
installed into a custom folder other than "``${libdir}``"
|
||||
or "``${base_libdir}``", let's say "``/opt/lib``".
|
||||
|
||||
.. note::
|
||||
|
||||
This is not a recommended way to deal with shared libraries, but this
|
||||
is just to show the usefulness of setting :term:`SYSROOT_DIRS`.
|
||||
|
||||
When a recipe ``B`` :term:`DEPENDS` on ``A``, it means what is in
|
||||
:term:`SYSROOT_DIRS` will be copied from :term:`D` of the recipe ``B``
|
||||
into ``B``'s :term:`SYSROOT_DESTDIR` that is "``${WORKDIR}/sysroot-destdir``".
|
||||
|
||||
Now, since ``/opt/lib`` is not in :term:`SYSROOT_DIRS`, it will never be copied to
|
||||
``A``'s :term:`RECIPE_SYSROOT`, which is "``${WORKDIR}/recipe-sysroot``". So,
|
||||
the linking process will fail.
|
||||
|
||||
To fix this, you need to add ``/opt/lib`` to :term:`SYSROOT_DIRS`::
|
||||
|
||||
SYSROOT_DIRS:append = " /opt/lib"
|
||||
|
||||
.. note::
|
||||
Even after setting ``/opt/lib`` to :term:`SYSROOT_DIRS`, the linking process will still fail
|
||||
because the linker does not know that location, since :term:`TARGET_LDFLAGS`
|
||||
doesn't contain it (if your recipe is for the target). Therefore, so you should add::
|
||||
|
||||
TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib"
|
||||
|
||||
:term:`SYSROOT_DIRS_NATIVE`
|
||||
Extra directories staged into the sysroot by the
|
||||
:ref:`ref-tasks-populate_sysroot` task for
|
||||
@@ -8399,6 +8537,16 @@ system and gives an overview of their function and contents.
|
||||
portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
|
||||
applying to SDKs.
|
||||
|
||||
:term:`TOOLCHAIN_OPTIONS`
|
||||
This variable holds extra options passed to the compiler and the linker
|
||||
for non ``-native`` recipes as they have to point to their custom
|
||||
``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`::
|
||||
|
||||
TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
|
||||
|
||||
Native recipes don't need this variable to be set, as they are
|
||||
built for the host machine with the native compiler.
|
||||
|
||||
:term:`TOOLCHAIN_OUTPUTNAME`
|
||||
This variable defines the name used for the toolchain output. The
|
||||
:ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
|
||||
|
||||
@@ -25,27 +25,20 @@ Follow these steps to locate and hand-install the toolchain:
|
||||
download the installer appropriate for your build host, target
|
||||
hardware, and image type.
|
||||
|
||||
The installer files (``*.sh``) follow this naming convention::
|
||||
The installer files (``*.sh``) follow this naming convention:
|
||||
``poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh``:
|
||||
|
||||
poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh
|
||||
- ``host_system``: string representing your development system: ``i686`` or ``x86_64``
|
||||
|
||||
Where:
|
||||
host_system is a string representing your development system:
|
||||
"i686" or "x86_64"
|
||||
- ``type``: string representing the image: ``sato`` or ``minimal``
|
||||
|
||||
type is a string representing the image:
|
||||
"sato" or "minimal"
|
||||
- ``arch``: string representing the target architecture such as ``cortexa57-qemuarm64``
|
||||
|
||||
arch is a string representing the target architecture:
|
||||
"aarch64", "armv5e", "core2-64", "cortexa8hf-neon", "i586", "mips32r2",
|
||||
"mips64", or "ppc7400"
|
||||
|
||||
release is the version of Yocto Project.
|
||||
|
||||
NOTE:
|
||||
The standard SDK installer does not have the "-ext" string as
|
||||
part of the filename.
|
||||
- ``release``: version of the Yocto Project.
|
||||
|
||||
.. note::
|
||||
The standard SDK installer does not have the ``-ext`` string as
|
||||
part of the filename.
|
||||
|
||||
The toolchains provided by the Yocto
|
||||
Project are based off of the ``core-image-sato`` and
|
||||
@@ -53,16 +46,16 @@ Follow these steps to locate and hand-install the toolchain:
|
||||
developing against those images.
|
||||
|
||||
For example, if your build host is a 64-bit x86 system and you need
|
||||
an extended SDK for a 64-bit core2 target, go into the ``x86_64``
|
||||
an extended SDK for a 64-bit core2 QEMU target, go into the ``x86_64``
|
||||
folder and download the following installer::
|
||||
|
||||
poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
|
||||
poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
|
||||
|
||||
4. *Run the Installer:* Be sure you have execution privileges and run
|
||||
the installer. Following is an example from the ``Downloads``
|
||||
directory::
|
||||
|
||||
$ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
|
||||
$ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
|
||||
|
||||
During execution of the script, you choose the root location for the
|
||||
toolchain. See the
|
||||
@@ -206,21 +199,14 @@ Follow these steps to extract the root filesystem:
|
||||
also contain flattened root filesystem image files (``*.ext4``),
|
||||
which you can use with QEMU directly.
|
||||
|
||||
The pre-built root filesystem image files follow these naming
|
||||
conventions::
|
||||
The pre-built root filesystem image files follow the
|
||||
``core-image-profile-machine.tar.bz2`` naming convention:
|
||||
|
||||
core-image-profile-arch.tar.bz2
|
||||
- ``profile``: filesystem image's profile, such as ``minimal``,
|
||||
``minimal-dev`` or ``sato``. For information on these types of image
|
||||
profiles, see the "Images" chapter in the Yocto Project Reference Manual.
|
||||
|
||||
Where:
|
||||
profile is the filesystem image's profile:
|
||||
lsb, lsb-dev, lsb-sdk, minimal, minimal-dev, minimal-initramfs,
|
||||
sato, sato-dev, sato-sdk, sato-sdk-ptest. For information on
|
||||
these types of image profiles, see the "Images" chapter in
|
||||
the Yocto Project Reference Manual.
|
||||
|
||||
arch is a string representing the target architecture:
|
||||
beaglebone-yocto, beaglebone-yocto-lsb, edgerouter, edgerouter-lsb,
|
||||
genericx86, genericx86-64, genericx86-64-lsb, genericx86-lsb and qemu*.
|
||||
- ``machine``: same string as the name of the parent download directory.
|
||||
|
||||
The root filesystems
|
||||
provided by the Yocto Project are based off of the
|
||||
|
||||
@@ -68,17 +68,6 @@ things we do within the build system to ensure reproducibility include:
|
||||
- Filtering the tools available from the host's ``PATH`` to only a specific set
|
||||
of tools, set using the :term:`HOSTTOOLS` variable.
|
||||
|
||||
.. note::
|
||||
|
||||
Because of an open bug in GCC, using ``DISTRO_FEATURES:append = " lto"`` or
|
||||
adding ``-flto`` (Link Time Optimization) to ``CFLAGS`` makes the resulting
|
||||
binary non-reproducible, in that it depends on the full absolute build path
|
||||
to ``recipe-sysroot-native``, so installing the Yocto Project in a different
|
||||
directory results in a different binary.
|
||||
|
||||
This issue is addressed by
|
||||
:yocto_bugs:`bug 14481 - Programs built with -flto are not reproducible</show_bug.cgi?id=14481>`.
|
||||
|
||||
=========================================
|
||||
Can we prove the project is reproducible?
|
||||
=========================================
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
||||
DISTRO_VERSION = "4.0.13"
|
||||
DISTRO_VERSION = "4.0.14"
|
||||
DISTRO_CODENAME = "kirkstone"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
|
||||
@@ -48,7 +48,7 @@ python do_menuconfig() {
|
||||
# ensure that environment variables are overwritten with this tasks 'd' values
|
||||
d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
|
||||
|
||||
oe_terminal("sh -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
|
||||
oe_terminal("sh -c 'make %s; if [ \\$? -ne 0 ]; then echo \"Command failed.\"; printf \"Press any key to continue... \"; read r; fi'" % d.getVar('KCONFIG_CONFIG_COMMAND'),
|
||||
d.getVar('PN') + ' Configuration', d)
|
||||
|
||||
# FIXME this check can be removed when the minimum bitbake version has been bumped
|
||||
|
||||
@@ -7,6 +7,7 @@ PACKAGE_WRITE_DEPS += "qemu-native"
|
||||
inherit qemu
|
||||
|
||||
FONT_PACKAGES ??= "${PN}"
|
||||
FONT_PACKAGES:class-native = ""
|
||||
FONT_EXTRA_RDEPENDS ?= "${MLPREFIX}fontconfig-utils"
|
||||
FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
|
||||
FONTCONFIG_CACHE_PARAMS ?= "-v"
|
||||
|
||||
@@ -442,8 +442,8 @@ kernel_do_install() {
|
||||
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
|
||||
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
|
||||
oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
|
||||
rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
|
||||
rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
|
||||
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
|
||||
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
|
||||
# Remove empty module directories to prevent QA issues
|
||||
find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete
|
||||
else
|
||||
|
||||
@@ -4,6 +4,7 @@ IMAGE_PKGTYPE ?= "rpm"
|
||||
|
||||
RPM="rpm"
|
||||
RPMBUILD="rpmbuild"
|
||||
RPMBUILD_COMPMODE ?= "${@'w19T%d.zstdio' % int(d.getVar('ZSTD_THREADS'))}"
|
||||
|
||||
PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
|
||||
|
||||
@@ -652,6 +653,7 @@ python do_package_rpm () {
|
||||
|
||||
# Setup the rpmbuild arguments...
|
||||
rpmbuild = d.getVar('RPMBUILD')
|
||||
rpmbuild_compmode = d.getVar('RPMBUILD_COMPMODE')
|
||||
targetsys = d.getVar('TARGET_SYS')
|
||||
targetvendor = d.getVar('HOST_VENDOR')
|
||||
|
||||
@@ -678,8 +680,8 @@ python do_package_rpm () {
|
||||
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
|
||||
cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
|
||||
cmd = cmd + " --define '_build_id_links none'"
|
||||
cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
|
||||
cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
|
||||
cmd = cmd + " --define '_source_payload %s'" % rpmbuild_compmode
|
||||
cmd = cmd + " --define '_binary_payload %s'" % rpmbuild_compmode
|
||||
cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
|
||||
cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
|
||||
cmd = cmd + " --define '_buildhost reproducible'"
|
||||
|
||||
@@ -152,7 +152,7 @@ python do_create_extlinux_config() {
|
||||
bb.fatal('Unable to open %s' % (cfile))
|
||||
}
|
||||
UBOOT_EXTLINUX_VARS = "CONSOLE MENU_DESCRIPTION ROOT KERNEL_IMAGE FDTDIR FDT KERNEL_ARGS INITRD"
|
||||
do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s_%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}"
|
||||
do_create_extlinux_config[vardeps] += "${@' '.join(['UBOOT_EXTLINUX_%s:%s' % (v, l) for v in d.getVar('UBOOT_EXTLINUX_VARS').split() for l in d.getVar('UBOOT_EXTLINUX_LABELS').split()])}"
|
||||
do_create_extlinux_config[vardepsexclude] += "OVERRIDES"
|
||||
|
||||
addtask create_extlinux_config before do_install do_deploy after do_compile
|
||||
|
||||
@@ -20,7 +20,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
|
||||
file://0001-avoid-start-failure-with-bind-user.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "bde1c5017b81d1d79c69eb8f537f2e5032fd3623acdd5ee830d4f74bc2483458"
|
||||
SRC_URI[sha256sum] = "115e09c05439bebade1d272eda08fa88eb3b60129edef690588c87a4d27612cc"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
|
||||
# follow the ESV versions divisible by 2
|
||||
@@ -18,7 +18,7 @@ SRC_URI:append:class-nativesdk = " \
|
||||
file://environment.d-openssl.sh \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323"
|
||||
SRC_URI[sha256sum] = "f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61"
|
||||
|
||||
inherit lib_package multilib_header multilib_script ptest perlnative
|
||||
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
|
||||
@@ -1,6 +1,6 @@
|
||||
SRCBRANCH ?= "release/2.35/master"
|
||||
PV = "2.35"
|
||||
SRCREV_glibc ?= "561e9dadc02f46a7ba2190c0a04259583479f6c9"
|
||||
SRCREV_glibc ?= "c84018a05aec80f5ee6f682db0da1130b0196aef"
|
||||
SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87"
|
||||
|
||||
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
|
||||
|
||||
@@ -16,6 +16,16 @@ CVE_CHECK_IGNORE += "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024"
|
||||
# Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853
|
||||
CVE_CHECK_IGNORE += "CVE-2019-1010025"
|
||||
|
||||
# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-4527
|
||||
# This vulnerability was introduced in 2.36 by commit
|
||||
# f282cdbe7f436c75864e5640a409a10485e9abb2 resolv: Implement no-aaaa stub resolver option
|
||||
# so our version is not yet vulnerable
|
||||
# See https://sourceware.org/bugzilla/show_bug.cgi?id=30842
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4527"
|
||||
|
||||
# To avoid these in cve-check reports since the recipe version did not change
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4813 CVE-2023-4806 CVE-2023-4911 CVE-2023-5156"
|
||||
|
||||
DEPENDS += "gperf-native bison-native"
|
||||
|
||||
NATIVESDKFIXES ?= ""
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "989cd671cba392b07e48057f02e0b4dd090b48d2"
|
||||
SRCREV ?= "73e3b5481bc88b332a198a8ec51a3c43c5f08e7e"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=kirkstone \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
49
meta/recipes-core/libxml/libxml2/CVE-2023-45322-1.patch
Normal file
49
meta/recipes-core/libxml/libxml2/CVE-2023-45322-1.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From a22bd982bf10291deea8ba0c61bf75b898c604ce Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Wed, 2 Nov 2022 15:44:42 +0100
|
||||
Subject: [PATCH] malloc-fail: Fix memory leak in xmlStaticCopyNodeList
|
||||
|
||||
Found with libFuzzer, see #344.
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/a22bd982bf10291deea8ba0c61bf75b898c604ce]
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
tree.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tree.c b/tree.c
|
||||
index 507869efe..647288ce3 100644
|
||||
--- a/tree.c
|
||||
+++ b/tree.c
|
||||
@@ -4461,7 +4461,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
}
|
||||
if (doc->intSubset == NULL) {
|
||||
q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
|
||||
- if (q == NULL) return(NULL);
|
||||
+ if (q == NULL) goto error;
|
||||
q->doc = doc;
|
||||
q->parent = parent;
|
||||
doc->intSubset = (xmlDtdPtr) q;
|
||||
@@ -4473,7 +4473,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
} else
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
q = xmlStaticCopyNode(node, doc, parent, 1);
|
||||
- if (q == NULL) return(NULL);
|
||||
+ if (q == NULL) goto error;
|
||||
if (ret == NULL) {
|
||||
q->prev = NULL;
|
||||
ret = p = q;
|
||||
@@ -4486,6 +4486,9 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
node = node->next;
|
||||
}
|
||||
return(ret);
|
||||
+error:
|
||||
+ xmlFreeNodeList(ret);
|
||||
+ return(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
GitLab
|
||||
|
||||
79
meta/recipes-core/libxml/libxml2/CVE-2023-45322-2.patch
Normal file
79
meta/recipes-core/libxml/libxml2/CVE-2023-45322-2.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
From d39f78069dff496ec865c73aa44d7110e429bce9 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Wed, 23 Aug 2023 20:24:24 +0200
|
||||
Subject: [PATCH] tree: Fix copying of DTDs
|
||||
|
||||
- Don't create multiple DTD nodes.
|
||||
- Fix UAF if malloc fails.
|
||||
- Skip DTD nodes if tree module is disabled.
|
||||
|
||||
Fixes #583.
|
||||
|
||||
CVE: CVE-2023-45322
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/d39f78069dff496ec865c73aa44d7110e429bce9]
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
tree.c | 31 ++++++++++++++++---------------
|
||||
1 file changed, 16 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/tree.c b/tree.c
|
||||
index 6c8a875b9..02c1b5791 100644
|
||||
--- a/tree.c
|
||||
+++ b/tree.c
|
||||
@@ -4471,29 +4471,28 @@ xmlNodePtr
|
||||
xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
xmlNodePtr ret = NULL;
|
||||
xmlNodePtr p = NULL,q;
|
||||
+ xmlDtdPtr newSubset = NULL;
|
||||
|
||||
while (node != NULL) {
|
||||
-#ifdef LIBXML_TREE_ENABLED
|
||||
if (node->type == XML_DTD_NODE ) {
|
||||
- if (doc == NULL) {
|
||||
+#ifdef LIBXML_TREE_ENABLED
|
||||
+ if ((doc == NULL) || (doc->intSubset != NULL)) {
|
||||
node = node->next;
|
||||
continue;
|
||||
}
|
||||
- if (doc->intSubset == NULL) {
|
||||
- q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
|
||||
- if (q == NULL) goto error;
|
||||
- q->doc = doc;
|
||||
- q->parent = parent;
|
||||
- doc->intSubset = (xmlDtdPtr) q;
|
||||
- xmlAddChild(parent, q);
|
||||
- } else {
|
||||
- q = (xmlNodePtr) doc->intSubset;
|
||||
- xmlAddChild(parent, q);
|
||||
- }
|
||||
- } else
|
||||
+ q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
|
||||
+ if (q == NULL) goto error;
|
||||
+ q->doc = doc;
|
||||
+ q->parent = parent;
|
||||
+ newSubset = (xmlDtdPtr) q;
|
||||
+#else
|
||||
+ node = node->next;
|
||||
+ continue;
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
+ } else {
|
||||
q = xmlStaticCopyNode(node, doc, parent, 1);
|
||||
- if (q == NULL) goto error;
|
||||
+ if (q == NULL) goto error;
|
||||
+ }
|
||||
if (ret == NULL) {
|
||||
q->prev = NULL;
|
||||
ret = p = q;
|
||||
@@ -4505,6 +4504,8 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
+ if (newSubset != NULL)
|
||||
+ doc->intSubset = newSubset;
|
||||
return(ret);
|
||||
error:
|
||||
xmlFreeNodeList(ret);
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -29,6 +29,8 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar;subdir=${BP};name=testt
|
||||
file://CVE-2023-29469.patch \
|
||||
file://CVE-2023-39615-0001.patch \
|
||||
file://CVE-2023-39615-0002.patch \
|
||||
file://CVE-2023-45322-1.patch \
|
||||
file://CVE-2023-45322-2.patch \
|
||||
"
|
||||
|
||||
SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee"
|
||||
|
||||
42
meta/recipes-core/zlib/zlib/CVE-2023-45853.patch
Normal file
42
meta/recipes-core/zlib/zlib/CVE-2023-45853.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 73331a6a0481067628f065ffe87bb1d8f787d10c Mon Sep 17 00:00:00 2001
|
||||
From: Hans Wennborg <hans@chromium.org>
|
||||
Date: Fri, 18 Aug 2023 11:05:33 +0200
|
||||
Subject: [PATCH] Reject overflows of zip header fields in minizip.
|
||||
|
||||
This checks the lengths of the file name, extra field, and comment
|
||||
that would be put in the zip headers, and rejects them if they are
|
||||
too long. They are each limited to 65535 bytes in length by the zip
|
||||
format. This also avoids possible buffer overflows if the provided
|
||||
fields are too long.
|
||||
|
||||
CVE: CVE-2023-45853
|
||||
Upstream-Status: Backport [https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c]
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
|
||||
---
|
||||
contrib/minizip/zip.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
|
||||
index 3d3d4cadd..0446109b2 100644
|
||||
--- a/contrib/minizip/zip.c
|
||||
+++ b/contrib/minizip/zip.c
|
||||
@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
|
||||
return ZIP_PARAMERROR;
|
||||
#endif
|
||||
|
||||
+ // The filename and comment length must fit in 16 bits.
|
||||
+ if ((filename!=NULL) && (strlen(filename)>0xffff))
|
||||
+ return ZIP_PARAMERROR;
|
||||
+ if ((comment!=NULL) && (strlen(comment)>0xffff))
|
||||
+ return ZIP_PARAMERROR;
|
||||
+ // The extra field length must fit in 16 bits. If the member also requires
|
||||
+ // a Zip64 extra block, that will also need to fit within that 16-bit
|
||||
+ // length, but that will be checked for later.
|
||||
+ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff))
|
||||
+ return ZIP_PARAMERROR;
|
||||
+
|
||||
zi = (zip64_internal*)file;
|
||||
|
||||
if (zi->in_opened_file_inzip == 1)
|
||||
@@ -12,6 +12,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
|
||||
file://CVE-2018-25032.patch \
|
||||
file://run-ptest \
|
||||
file://CVE-2022-37434.patch \
|
||||
file://CVE-2023-45853.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_URI = "http://zlib.net/"
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 960d10e89cf60d39998dae6fdcd4f0866b753a79 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 23 Jan 2023 12:31:35 -0800
|
||||
Subject: [PATCH] add missing <cstdint> for uint16_t
|
||||
|
||||
This fixes build problems with gcc 13 snapshot [1]
|
||||
|
||||
Fixes
|
||||
| include/apt-pkg/pkgcache.h:257:23: warning: cast from 'char*' to 'const uint16_t*' {aka 'const short unsigned int*'} increases required alignment of target type [-Wcast-align]
|
||||
| 257 | uint16_t len = *reinterpret_cast<const uint16_t*>(name - sizeof(uint16_t));
|
||||
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
|
||||
|
||||
Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/276]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
apt-pkg/contrib/mmap.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
|
||||
index 642e20473..0568e1cd0 100644
|
||||
--- a/apt-pkg/contrib/mmap.cc
|
||||
+++ b/apt-pkg/contrib/mmap.cc
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <apt-pkg/macros.h>
|
||||
#include <apt-pkg/mmap.h>
|
||||
|
||||
+#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <errno.h>
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@@ -13,6 +13,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \
|
||||
file://0001-cmake-Do-not-build-po-files.patch \
|
||||
file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \
|
||||
file://0001-aptwebserver.cc-Include-array.patch \
|
||||
file://0001-add-missing-cstdint-for-uint16_t.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-native = " \
|
||||
|
||||
@@ -56,8 +56,15 @@ SRC_URI = "\
|
||||
file://0023-CVE-2023-25585.patch \
|
||||
file://0026-CVE-2023-1972.patch \
|
||||
file://0025-CVE-2023-25588.patch \
|
||||
file://0027-CVE-2022-47008.patch \
|
||||
file://0028-CVE-2022-47011.patch \
|
||||
file://0029-CVE-2022-48065-1.patch \
|
||||
file://0029-CVE-2022-48065-2.patch \
|
||||
file://0029-CVE-2022-48065-3.patch \
|
||||
file://0030-CVE-2022-44840.patch \
|
||||
file://0031-CVE-2022-45703-1.patch \
|
||||
file://0031-CVE-2022-45703-2.patch \
|
||||
file://0031-CVE-2022-47695.patch \
|
||||
file://CVE-2022-48063.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -35,8 +35,10 @@ Lack of bounds checking in vms-alpha.c parse_module
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=77c225bdeb410cf60da804879ad41622f5f1aa44]
|
||||
|
||||
CVE: CVE-2023-25584
|
||||
CVE: CVE-2022-47673
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@ anyway, so get rid of them. Also, simplify and correct sanity checks.
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=d12f8998d2d086f0a6606589e5aedb7147e6f2f1]
|
||||
|
||||
CVE: CVE-2023-25588
|
||||
CVE: CVE-2022-47696
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 16 Jun 2022 23:43:38 +0000 (+0930)
|
||||
Subject: PR29255, memory leak in make_tempdir
|
||||
X-Git-Tag: binutils-2_39~236
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=d6e1d48c83b165c129cb0aa78905f7ca80a1f682
|
||||
|
||||
PR29255, memory leak in make_tempdir
|
||||
|
||||
PR 29255
|
||||
* bucomm.c (make_tempdir, make_tempname): Free template on all
|
||||
failure paths.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=d6e1d48c83b165c129cb0aa78905f7ca80a1f682]
|
||||
|
||||
CVE: CVE-2022-47008
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
|
||||
index fdc2209df9c..4395cb9f7f5 100644
|
||||
--- a/binutils/bucomm.c
|
||||
+++ b/binutils/bucomm.c
|
||||
@@ -537,8 +537,9 @@ make_tempname (const char *filename, int *ofd)
|
||||
#else
|
||||
tmpname = mktemp (tmpname);
|
||||
if (tmpname == NULL)
|
||||
- return NULL;
|
||||
- fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
+ fd = -1;
|
||||
+ else
|
||||
+ fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
#endif
|
||||
if (fd == -1)
|
||||
{
|
||||
@@ -556,22 +557,23 @@ char *
|
||||
make_tempdir (const char *filename)
|
||||
{
|
||||
char *tmpname = template_in_dir (filename);
|
||||
+ char *ret;
|
||||
|
||||
#ifdef HAVE_MKDTEMP
|
||||
- return mkdtemp (tmpname);
|
||||
+ ret = mkdtemp (tmpname);
|
||||
#else
|
||||
- tmpname = mktemp (tmpname);
|
||||
- if (tmpname == NULL)
|
||||
- return NULL;
|
||||
+ ret = mktemp (tmpname);
|
||||
#if defined (_WIN32) && !defined (__CYGWIN32__)
|
||||
if (mkdir (tmpname) != 0)
|
||||
- return NULL;
|
||||
+ ret = NULL;
|
||||
#else
|
||||
if (mkdir (tmpname, 0700) != 0)
|
||||
- return NULL;
|
||||
+ ret = NULL;
|
||||
#endif
|
||||
- return tmpname;
|
||||
#endif
|
||||
+ if (ret == NULL)
|
||||
+ free (tmpname);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/* Parse a string into a VMA, with a fatal error if it can't be
|
||||
@@ -0,0 +1,35 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Mon, 20 Jun 2022 01:09:13 +0000 (+0930)
|
||||
Subject: PR29261, memory leak in parse_stab_struct_fields
|
||||
X-Git-Tag: binutils-2_39~225
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8a24927bc8dbf6beac2000593b21235c3796dc35
|
||||
|
||||
PR29261, memory leak in parse_stab_struct_fields
|
||||
|
||||
PR 29261
|
||||
* stabs.c (parse_stab_struct_fields): Free "fields" on failure path.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8a24927bc8dbf6beac2000593b21235c3796dc35]
|
||||
|
||||
CVE: CVE-2022-47011
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/binutils/stabs.c b/binutils/stabs.c
|
||||
index 796ff85b86a..bf3f578cbcc 100644
|
||||
--- a/binutils/stabs.c
|
||||
+++ b/binutils/stabs.c
|
||||
@@ -2367,7 +2367,10 @@ parse_stab_struct_fields (void *dhandle,
|
||||
|
||||
if (! parse_stab_one_struct_field (dhandle, info, pp, p, fields + c,
|
||||
staticsp, p_end))
|
||||
- return false;
|
||||
+ {
|
||||
+ free (fields);
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
++c;
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Sun, 30 Oct 2022 08:38:51 +0000 (+1030)
|
||||
Subject: Pool section entries for DWP version 1
|
||||
X-Git-Tag: gdb-13-branchpoint~664
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=28750e3b967da2207d51cbce9fc8be262817ee59
|
||||
|
||||
Pool section entries for DWP version 1
|
||||
|
||||
Ref: https://gcc.gnu.org/wiki/DebugFissionDWP?action=recall&rev=3
|
||||
|
||||
Fuzzers have found a weakness in the code stashing pool section
|
||||
entries. With random nonsensical values in the index entries (rather
|
||||
than each index pointing to its own set distinct from other sets),
|
||||
it's possible to overflow the space allocated, losing the NULL
|
||||
terminator. Without a terminator, find_section_in_set can run off the
|
||||
end of the shndx_pool buffer. Fix this by scanning the pool directly.
|
||||
|
||||
binutils/
|
||||
* dwarf.c (add_shndx_to_cu_tu_entry): Delete range check.
|
||||
(end_cu_tu_entry): Likewise.
|
||||
(process_cu_tu_index): Fill shndx_pool by directly scanning
|
||||
pool, rather than indirectly from index entries.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=binutils/dwarf.c;h=7730293326ac1049451eb4a037ac86d827030700;hp=c6340a28906114e9df29d7401472c7dc0a98c2b1;hb=28750e3b967da2207d51cbce9fc8be262817ee59;hpb=60095ba3b8f8ba26a6389dded732fa446422c98f]
|
||||
|
||||
CVE: CVE-2022-44840
|
||||
|
||||
Signed-off-by: yash shinde <yash.shinde@windriver.com>
|
||||
|
||||
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
|
||||
index c6340a28906..7730293326a 100644
|
||||
--- a/binutils/dwarf.c
|
||||
+++ b/binutils/dwarf.c
|
||||
@@ -10652,22 +10652,12 @@ prealloc_cu_tu_list (unsigned int nshndx)
|
||||
static void
|
||||
add_shndx_to_cu_tu_entry (unsigned int shndx)
|
||||
{
|
||||
- if (shndx_pool_used >= shndx_pool_size)
|
||||
- {
|
||||
- error (_("Internal error: out of space in the shndx pool.\n"));
|
||||
- return;
|
||||
- }
|
||||
shndx_pool [shndx_pool_used++] = shndx;
|
||||
}
|
||||
|
||||
static void
|
||||
end_cu_tu_entry (void)
|
||||
{
|
||||
- if (shndx_pool_used >= shndx_pool_size)
|
||||
- {
|
||||
- error (_("Internal error: out of space in the shndx pool.\n"));
|
||||
- return;
|
||||
- }
|
||||
shndx_pool [shndx_pool_used++] = 0;
|
||||
}
|
||||
|
||||
@@ -10773,53 +10763,55 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
|
||||
|
||||
if (version == 1)
|
||||
{
|
||||
+ unsigned char *shndx_list;
|
||||
+ unsigned int shndx;
|
||||
+
|
||||
if (!do_display)
|
||||
- prealloc_cu_tu_list ((limit - ppool) / 4);
|
||||
- for (i = 0; i < nslots; i++)
|
||||
{
|
||||
- unsigned char *shndx_list;
|
||||
- unsigned int shndx;
|
||||
-
|
||||
- SAFE_BYTE_GET (signature, phash, 8, limit);
|
||||
- if (signature != 0)
|
||||
+ prealloc_cu_tu_list ((limit - ppool) / 4);
|
||||
+ for (shndx_list = ppool + 4; shndx_list <= limit - 4; shndx_list += 4)
|
||||
{
|
||||
- SAFE_BYTE_GET (j, pindex, 4, limit);
|
||||
- shndx_list = ppool + j * 4;
|
||||
- /* PR 17531: file: 705e010d. */
|
||||
- if (shndx_list < ppool)
|
||||
- {
|
||||
- warn (_("Section index pool located before start of section\n"));
|
||||
- return 0;
|
||||
- }
|
||||
+ shndx = byte_get (shndx_list, 4);
|
||||
+ add_shndx_to_cu_tu_entry (shndx);
|
||||
+ }
|
||||
+ end_cu_tu_entry ();
|
||||
+ }
|
||||
+ else
|
||||
+ for (i = 0; i < nslots; i++)
|
||||
+ {
|
||||
+ SAFE_BYTE_GET (signature, phash, 8, limit);
|
||||
+ if (signature != 0)
|
||||
+ {
|
||||
+ SAFE_BYTE_GET (j, pindex, 4, limit);
|
||||
+ shndx_list = ppool + j * 4;
|
||||
+ /* PR 17531: file: 705e010d. */
|
||||
+ if (shndx_list < ppool)
|
||||
+ {
|
||||
+ warn (_("Section index pool located before start of section\n"));
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
- if (do_display)
|
||||
printf (_(" [%3d] Signature: 0x%s Sections: "),
|
||||
i, dwarf_vmatoa ("x", signature));
|
||||
- for (;;)
|
||||
- {
|
||||
- if (shndx_list >= limit)
|
||||
- {
|
||||
- warn (_("Section %s too small for shndx pool\n"),
|
||||
- section->name);
|
||||
- return 0;
|
||||
- }
|
||||
- SAFE_BYTE_GET (shndx, shndx_list, 4, limit);
|
||||
- if (shndx == 0)
|
||||
- break;
|
||||
- if (do_display)
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ if (shndx_list >= limit)
|
||||
+ {
|
||||
+ warn (_("Section %s too small for shndx pool\n"),
|
||||
+ section->name);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ SAFE_BYTE_GET (shndx, shndx_list, 4, limit);
|
||||
+ if (shndx == 0)
|
||||
+ break;
|
||||
printf (" %d", shndx);
|
||||
- else
|
||||
- add_shndx_to_cu_tu_entry (shndx);
|
||||
- shndx_list += 4;
|
||||
- }
|
||||
- if (do_display)
|
||||
+ shndx_list += 4;
|
||||
+ }
|
||||
printf ("\n");
|
||||
- else
|
||||
- end_cu_tu_entry ();
|
||||
- }
|
||||
- phash += 8;
|
||||
- pindex += 4;
|
||||
- }
|
||||
+ }
|
||||
+ phash += 8;
|
||||
+ pindex += 4;
|
||||
+ }
|
||||
}
|
||||
else if (version == 2)
|
||||
{
|
||||
@@ -0,0 +1,147 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Tue, 24 May 2022 00:02:14 +0000 (+0930)
|
||||
Subject: PR29169, invalid read displaying fuzzed .gdb_index
|
||||
X-Git-Tag: binutils-2_39~530
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=244e19c79111eed017ee38ab1d44fb2a6cd1b636
|
||||
|
||||
PR29169, invalid read displaying fuzzed .gdb_index
|
||||
|
||||
PR 29169
|
||||
* dwarf.c (display_gdb_index): Combine sanity checks. Calculate
|
||||
element counts, not word counts.
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=244e19c79111eed017ee38ab1d44fb2a6cd1b636]
|
||||
|
||||
CVE: CVE-2022-45703
|
||||
|
||||
Signed-off-by: yash shinde <yash.shinde@windriver.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
|
||||
index 7de6f28161f..c855972a12f 100644
|
||||
--- a/binutils/dwarf.c
|
||||
+++ b/binutils/dwarf.c
|
||||
@@ -10406,7 +10406,7 @@ display_gdb_index (struct dwarf_section *section,
|
||||
uint32_t cu_list_offset, tu_list_offset;
|
||||
uint32_t address_table_offset, symbol_table_offset, constant_pool_offset;
|
||||
unsigned int cu_list_elements, tu_list_elements;
|
||||
- unsigned int address_table_size, symbol_table_slots;
|
||||
+ unsigned int address_table_elements, symbol_table_slots;
|
||||
unsigned char *cu_list, *tu_list;
|
||||
unsigned char *address_table, *symbol_table, *constant_pool;
|
||||
unsigned int i;
|
||||
@@ -10454,48 +10454,19 @@ display_gdb_index (struct dwarf_section *section,
|
||||
|| tu_list_offset > section->size
|
||||
|| address_table_offset > section->size
|
||||
|| symbol_table_offset > section->size
|
||||
- || constant_pool_offset > section->size)
|
||||
+ || constant_pool_offset > section->size
|
||||
+ || tu_list_offset < cu_list_offset
|
||||
+ || address_table_offset < tu_list_offset
|
||||
+ || symbol_table_offset < address_table_offset
|
||||
+ || constant_pool_offset < symbol_table_offset)
|
||||
{
|
||||
warn (_("Corrupt header in the %s section.\n"), section->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
- /* PR 17531: file: 418d0a8a. */
|
||||
- if (tu_list_offset < cu_list_offset)
|
||||
- {
|
||||
- warn (_("TU offset (%x) is less than CU offset (%x)\n"),
|
||||
- tu_list_offset, cu_list_offset);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- cu_list_elements = (tu_list_offset - cu_list_offset) / 8;
|
||||
-
|
||||
- if (address_table_offset < tu_list_offset)
|
||||
- {
|
||||
- warn (_("Address table offset (%x) is less than TU offset (%x)\n"),
|
||||
- address_table_offset, tu_list_offset);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- tu_list_elements = (address_table_offset - tu_list_offset) / 8;
|
||||
-
|
||||
- /* PR 17531: file: 18a47d3d. */
|
||||
- if (symbol_table_offset < address_table_offset)
|
||||
- {
|
||||
- warn (_("Symbol table offset (%x) is less then Address table offset (%x)\n"),
|
||||
- symbol_table_offset, address_table_offset);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- address_table_size = symbol_table_offset - address_table_offset;
|
||||
-
|
||||
- if (constant_pool_offset < symbol_table_offset)
|
||||
- {
|
||||
- warn (_("Constant pool offset (%x) is less than symbol table offset (%x)\n"),
|
||||
- constant_pool_offset, symbol_table_offset);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
+ cu_list_elements = (tu_list_offset - cu_list_offset) / 16;
|
||||
+ tu_list_elements = (address_table_offset - tu_list_offset) / 24;
|
||||
+ address_table_elements = (symbol_table_offset - address_table_offset) / 20;
|
||||
symbol_table_slots = (constant_pool_offset - symbol_table_offset) / 8;
|
||||
|
||||
cu_list = start + cu_list_offset;
|
||||
@@ -10504,31 +10475,25 @@ display_gdb_index (struct dwarf_section *section,
|
||||
symbol_table = start + symbol_table_offset;
|
||||
constant_pool = start + constant_pool_offset;
|
||||
|
||||
- if (address_table_offset + address_table_size > section->size)
|
||||
- {
|
||||
- warn (_("Address table extends beyond end of section.\n"));
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
printf (_("\nCU table:\n"));
|
||||
- for (i = 0; i < cu_list_elements; i += 2)
|
||||
+ for (i = 0; i < cu_list_elements; i++)
|
||||
{
|
||||
- uint64_t cu_offset = byte_get_little_endian (cu_list + i * 8, 8);
|
||||
- uint64_t cu_length = byte_get_little_endian (cu_list + i * 8 + 8, 8);
|
||||
+ uint64_t cu_offset = byte_get_little_endian (cu_list + i * 16, 8);
|
||||
+ uint64_t cu_length = byte_get_little_endian (cu_list + i * 16 + 8, 8);
|
||||
|
||||
- printf (_("[%3u] 0x%lx - 0x%lx\n"), i / 2,
|
||||
+ printf (_("[%3u] 0x%lx - 0x%lx\n"), i,
|
||||
(unsigned long) cu_offset,
|
||||
(unsigned long) (cu_offset + cu_length - 1));
|
||||
}
|
||||
|
||||
printf (_("\nTU table:\n"));
|
||||
- for (i = 0; i < tu_list_elements; i += 3)
|
||||
+ for (i = 0; i < tu_list_elements; i++)
|
||||
{
|
||||
- uint64_t tu_offset = byte_get_little_endian (tu_list + i * 8, 8);
|
||||
- uint64_t type_offset = byte_get_little_endian (tu_list + i * 8 + 8, 8);
|
||||
- uint64_t signature = byte_get_little_endian (tu_list + i * 8 + 16, 8);
|
||||
+ uint64_t tu_offset = byte_get_little_endian (tu_list + i * 24, 8);
|
||||
+ uint64_t type_offset = byte_get_little_endian (tu_list + i * 24 + 8, 8);
|
||||
+ uint64_t signature = byte_get_little_endian (tu_list + i * 24 + 16, 8);
|
||||
|
||||
- printf (_("[%3u] 0x%lx 0x%lx "), i / 3,
|
||||
+ printf (_("[%3u] 0x%lx 0x%lx "), i,
|
||||
(unsigned long) tu_offset,
|
||||
(unsigned long) type_offset);
|
||||
print_dwarf_vma (signature, 8);
|
||||
@@ -10536,12 +10501,11 @@ display_gdb_index (struct dwarf_section *section,
|
||||
}
|
||||
|
||||
printf (_("\nAddress table:\n"));
|
||||
- for (i = 0; i < address_table_size && i <= address_table_size - (2 * 8 + 4);
|
||||
- i += 2 * 8 + 4)
|
||||
+ for (i = 0; i < address_table_elements; i++)
|
||||
{
|
||||
- uint64_t low = byte_get_little_endian (address_table + i, 8);
|
||||
- uint64_t high = byte_get_little_endian (address_table + i + 8, 8);
|
||||
- uint32_t cu_index = byte_get_little_endian (address_table + i + 16, 4);
|
||||
+ uint64_t low = byte_get_little_endian (address_table + i * 20, 8);
|
||||
+ uint64_t high = byte_get_little_endian (address_table + i * 20 + 8, 8);
|
||||
+ uint32_t cu_index = byte_get_little_endian (address_table + i + 20 + 16, 4);
|
||||
|
||||
print_dwarf_vma (low, 8);
|
||||
print_dwarf_vma (high, 8);
|
||||
@@ -0,0 +1,31 @@
|
||||
From 69bfd1759db41c8d369f9dcc98a135c5a5d97299 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Fri, 18 Nov 2022 11:29:13 +1030
|
||||
Subject: [PATCH] PR29799 heap buffer overflow in display_gdb_index
|
||||
dwarf.c:10548
|
||||
|
||||
PR 29799
|
||||
* dwarf.c (display_gdb_index): Typo fix.
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=binutils/dwarf.c;h=4bba8dfb81a6df49f5e61b3fae99dd545cc5c7dd;hp=7730293326ac1049451eb4a037ac86d827030700;hb=69bfd1759db41c8d369f9dcc98a135c5a5d97299;hpb=7828dfa93b210b6bbc6596e6e096cc150a9f8aa4]
|
||||
|
||||
CVE: CVE-2022-45703
|
||||
|
||||
Signed-off-by: yash shinde <yash.shinde@windriver.com>
|
||||
|
||||
---
|
||||
binutils/dwarf.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
|
||||
index 7730293326a..4bba8dfb81a 100644
|
||||
--- a/binutils/dwarf.c
|
||||
+++ b/binutils/dwarf.c
|
||||
@@ -10562,7 +10562,7 @@ display_gdb_index (struct dwarf_section
|
||||
{
|
||||
uint64_t low = byte_get_little_endian (address_table + i * 20, 8);
|
||||
uint64_t high = byte_get_little_endian (address_table + i * 20 + 8, 8);
|
||||
- uint32_t cu_index = byte_get_little_endian (address_table + i + 20 + 16, 4);
|
||||
+ uint32_t cu_index = byte_get_little_endian (address_table + i * 20 + 16, 4);
|
||||
|
||||
print_dwarf_vma (low, 8);
|
||||
print_dwarf_vma (high, 8);
|
||||
@@ -0,0 +1,58 @@
|
||||
From 2f7426b9bb2d2450b32cad3d79fab9abe3ec42bb Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Sun, 4 Dec 2022 22:15:40 +1030
|
||||
Subject: [PATCH] PR29846, segmentation fault in objdump.c compare_symbols
|
||||
|
||||
Fixes a fuzzed object file problem where plt relocs were manipulated
|
||||
in such a way that two synthetic symbols were generated at the same
|
||||
plt location. Won't occur in real object files.
|
||||
|
||||
PR 29846
|
||||
PR 20337
|
||||
* objdump.c (compare_symbols): Test symbol flags to exclude
|
||||
section and synthetic symbols before attempting to check flavour.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=3d3af4ba39e892b1c544d667ca241846bc3df386]
|
||||
|
||||
CVE: CVE-2022-47695
|
||||
|
||||
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
|
||||
---
|
||||
binutils/objdump.c | 23 ++++++++++-------------
|
||||
1 file changed, 10 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/binutils/objdump.c b/binutils/objdump.c
|
||||
index 08a0fe521d8..21f75f4db40 100644
|
||||
--- a/binutils/objdump.c
|
||||
+++ b/binutils/objdump.c
|
||||
@@ -1165,20 +1165,17 @@ compare_symbols (const void *ap, const void *bp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
- if (bfd_get_flavour (bfd_asymbol_bfd (a)) == bfd_target_elf_flavour
|
||||
+ /* Sort larger size ELF symbols before smaller. See PR20337. */
|
||||
+ bfd_vma asz = 0;
|
||||
+ if ((a->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0
|
||||
+ && bfd_get_flavour (bfd_asymbol_bfd (a)) == bfd_target_elf_flavour)
|
||||
+ asz = ((elf_symbol_type *) a)->internal_elf_sym.st_size;
|
||||
+ bfd_vma bsz = 0;
|
||||
+ if ((b->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0
|
||||
&& bfd_get_flavour (bfd_asymbol_bfd (b)) == bfd_target_elf_flavour)
|
||||
- {
|
||||
- bfd_vma asz, bsz;
|
||||
-
|
||||
- asz = 0;
|
||||
- if ((a->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0)
|
||||
- asz = ((elf_symbol_type *) a)->internal_elf_sym.st_size;
|
||||
- bsz = 0;
|
||||
- if ((b->flags & (BSF_SECTION_SYM | BSF_SYNTHETIC)) == 0)
|
||||
- bsz = ((elf_symbol_type *) b)->internal_elf_sym.st_size;
|
||||
- if (asz != bsz)
|
||||
- return asz > bsz ? -1 : 1;
|
||||
- }
|
||||
+ bsz = ((elf_symbol_type *) b)->internal_elf_sym.st_size;
|
||||
+ if (asz != bsz)
|
||||
+ return asz > bsz ? -1 : 1;
|
||||
|
||||
/* Symbols that start with '.' might be section names, so sort them
|
||||
after symbols that don't start with '.'. */
|
||||
48
meta/recipes-devtools/binutils/binutils/CVE-2022-48063.patch
Normal file
48
meta/recipes-devtools/binutils/binutils/CVE-2022-48063.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From 75393a2d54bcc40053e5262a3de9d70c5ebfbbfd Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Wed, 21 Dec 2022 11:51:23 +0000
|
||||
Subject: [PATCH] Fix an attempt to allocate an unreasonably large amount of
|
||||
memory when parsing a corrupt ELF file.
|
||||
|
||||
PR 29924
|
||||
* objdump.c (load_specific_debug_section): Check for excessively
|
||||
large sections.
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2022-48063
|
||||
Signed-off-by: Armin Kuster <akuster@mvista.com>
|
||||
|
||||
---
|
||||
binutils/ChangeLog | 6 ++++++
|
||||
binutils/objdump.c | 4 +++-
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: git/binutils/objdump.c
|
||||
===================================================================
|
||||
--- git.orig/binutils/objdump.c
|
||||
+++ git/binutils/objdump.c
|
||||
@@ -3768,7 +3768,9 @@ load_specific_debug_section (enum dwarf_
|
||||
section->size = bfd_section_size (sec);
|
||||
/* PR 24360: On 32-bit hosts sizeof (size_t) < sizeof (bfd_size_type). */
|
||||
alloced = amt = section->size + 1;
|
||||
- if (alloced != amt || alloced == 0)
|
||||
+ if (alloced != amt
|
||||
+ || alloced == 0
|
||||
+ || (bfd_get_size (abfd) != 0 && alloced >= bfd_get_size (abfd)))
|
||||
{
|
||||
section->start = NULL;
|
||||
free_debug_section (debug);
|
||||
Index: git/binutils/ChangeLog
|
||||
===================================================================
|
||||
--- git.orig/binutils/ChangeLog
|
||||
+++ git/binutils/ChangeLog
|
||||
@@ -1,3 +1,9 @@
|
||||
+2022-12-21 Nick Clifton <nickc@redhat.com>
|
||||
+
|
||||
+ PR 29924
|
||||
+ * objdump.c (load_specific_debug_section): Check for excessively
|
||||
+ large sections.
|
||||
+
|
||||
2022-03-23 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
Import patch from mainline:
|
||||
@@ -0,0 +1,92 @@
|
||||
From 1523eaeff4669e421b3f60618b43c878e4860fe6 Mon Sep 17 00:00:00 2001
|
||||
From: Joel Rosdahl <joel@rosdahl.net>
|
||||
Date: Tue, 5 Jul 2022 21:42:58 +0200
|
||||
Subject: [PATCH] build: Fix FTBFS with not yet released GCC 13
|
||||
|
||||
Reference: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
|
||||
|
||||
Fixes #1105.
|
||||
|
||||
Upstream-Status: Backport [v4.7 https://github.com/ccache/ccache/commit/19ef6e267d38d4d8b3e11c915213472d5662d593]
|
||||
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||
---
|
||||
src/Stat.hpp | 1 +
|
||||
src/core/CacheEntryHeader.hpp | 2 ++
|
||||
src/core/Sloppiness.hpp | 1 +
|
||||
src/core/Statistics.hpp | 3 ++-
|
||||
src/util/TextTable.hpp | 3 ++-
|
||||
5 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/Stat.hpp b/src/Stat.hpp
|
||||
index 2f56214a..074cdeeb 100644
|
||||
--- a/src/Stat.hpp
|
||||
+++ b/src/Stat.hpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+#include <cstdint>
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
diff --git a/src/core/CacheEntryHeader.hpp b/src/core/CacheEntryHeader.hpp
|
||||
index 4c3e04c7..dcc32e1c 100644
|
||||
--- a/src/core/CacheEntryHeader.hpp
|
||||
+++ b/src/core/CacheEntryHeader.hpp
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <compression/types.hpp>
|
||||
#include <core/types.hpp>
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
// Cache entry format
|
||||
// ==================
|
||||
//
|
||||
diff --git a/src/core/Sloppiness.hpp b/src/core/Sloppiness.hpp
|
||||
index 917526bf..1ab31d71 100644
|
||||
--- a/src/core/Sloppiness.hpp
|
||||
+++ b/src/core/Sloppiness.hpp
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace core {
|
||||
diff --git a/src/core/Statistics.hpp b/src/core/Statistics.hpp
|
||||
index 3e9ed816..54f32e9c 100644
|
||||
--- a/src/core/Statistics.hpp
|
||||
+++ b/src/core/Statistics.hpp
|
||||
@@ -1,4 +1,4 @@
|
||||
-// Copyright (C) 2020-2021 Joel Rosdahl and other contributors
|
||||
+// Copyright (C) 2020-2022 Joel Rosdahl and other contributors
|
||||
//
|
||||
// See doc/AUTHORS.adoc for a complete list of contributors.
|
||||
//
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <core/StatisticsCounters.hpp>
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
diff --git a/src/util/TextTable.hpp b/src/util/TextTable.hpp
|
||||
index 05c0e0e5..60edee75 100644
|
||||
--- a/src/util/TextTable.hpp
|
||||
+++ b/src/util/TextTable.hpp
|
||||
@@ -1,4 +1,4 @@
|
||||
-// Copyright (C) 2021 Joel Rosdahl and other contributors
|
||||
+// Copyright (C) 2021-2022 Joel Rosdahl and other contributors
|
||||
//
|
||||
// See doc/AUTHORS.adoc for a complete list of contributors.
|
||||
//
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=ff5327dc93e2b286c931dda3d6079da9"
|
||||
|
||||
DEPENDS = "zstd"
|
||||
|
||||
SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
|
||||
SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz \
|
||||
file://0001-build-Fix-FTBFS-with-not-yet-released-GCC-13.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "73a1767ac6b7c0404a1a55f761a746d338e702883c7137fbf587023062258625"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
|
||||
|
||||
@@ -29,7 +29,8 @@ SRC_URI += "\
|
||||
file://CVE-2022-41722.patch \
|
||||
file://CVE-2023-24537.patch \
|
||||
file://CVE-2023-24534.patch \
|
||||
file://CVE-2023-24538.patch \
|
||||
file://CVE-2023-24538_1.patch \
|
||||
file://CVE-2023-24538_2.patch \
|
||||
file://CVE-2023-24540.patch \
|
||||
file://CVE-2023-24539.patch \
|
||||
file://CVE-2023-29404.patch \
|
||||
@@ -44,6 +45,7 @@ SRC_URI += "\
|
||||
file://CVE-2023-24531_2.patch \
|
||||
file://CVE-2023-29409.patch \
|
||||
file://CVE-2023-39319.patch \
|
||||
file://CVE-2023-39318.patch \
|
||||
"
|
||||
SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
|
||||
|
||||
|
||||
597
meta/recipes-devtools/go/go-1.18/CVE-2023-24538_1.patch
Normal file
597
meta/recipes-devtools/go/go-1.18/CVE-2023-24538_1.patch
Normal file
@@ -0,0 +1,597 @@
|
||||
From b1e4e8ec7e946ff2d3bb37ac99c5468ceb49c362 Mon Sep 17 00:00:00 2001
|
||||
From: Russ Cox <rsc@golang.org>
|
||||
Date: Thu, 20 May 2021 12:46:33 -0400
|
||||
Subject: [PATCH 1/2] html/template, text/template: implement break and
|
||||
continue for range loops
|
||||
|
||||
Break and continue for range loops was accepted as a proposal in June 2017.
|
||||
It was implemented in CL 66410 (Oct 2017)
|
||||
but then rolled back in CL 92155 (Feb 2018)
|
||||
because html/template changes had not been implemented.
|
||||
|
||||
This CL reimplements break and continue in text/template
|
||||
and then adds support for them in html/template as well.
|
||||
|
||||
Fixes #20531.
|
||||
|
||||
Change-Id: I05330482a976f1c078b4b49c2287bd9031bb7616
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/321491
|
||||
Trust: Russ Cox <rsc@golang.org>
|
||||
Run-TryBot: Russ Cox <rsc@golang.org>
|
||||
TryBot-Result: Go Bot <gobot@golang.org>
|
||||
Reviewed-by: Rob Pike <r@golang.org>
|
||||
|
||||
Upstream-Status: Backport from https://github.com/golang/go/commit/d0dd26a88c019d54f22463daae81e785f5867565
|
||||
CVE: CVE-2023-24538
|
||||
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
|
||||
---
|
||||
src/html/template/context.go | 4 ++
|
||||
src/html/template/escape.go | 71 ++++++++++++++++++++++++++++++++++-
|
||||
src/html/template/escape_test.go | 24 ++++++++++++
|
||||
src/html/template/exec_test.go | 2 +
|
||||
src/text/template/doc.go | 8 ++++
|
||||
src/text/template/exec.go | 24 +++++++++++-
|
||||
src/text/template/exec_test.go | 2 +
|
||||
src/text/template/parse/lex.go | 13 ++++++-
|
||||
src/text/template/parse/lex_test.go | 2 +
|
||||
src/text/template/parse/node.go | 36 ++++++++++++++++++
|
||||
src/text/template/parse/parse.go | 42 ++++++++++++++++++++-
|
||||
src/text/template/parse/parse_test.go | 8 ++++
|
||||
12 files changed, 232 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/html/template/context.go b/src/html/template/context.go
|
||||
index f7d4849..aaa7d08 100644
|
||||
--- a/src/html/template/context.go
|
||||
+++ b/src/html/template/context.go
|
||||
@@ -6,6 +6,7 @@ package template
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
+ "text/template/parse"
|
||||
)
|
||||
|
||||
// context describes the state an HTML parser must be in when it reaches the
|
||||
@@ -22,6 +23,7 @@ type context struct {
|
||||
jsCtx jsCtx
|
||||
attr attr
|
||||
element element
|
||||
+ n parse.Node // for range break/continue
|
||||
err *Error
|
||||
}
|
||||
|
||||
@@ -141,6 +143,8 @@ const (
|
||||
// stateError is an infectious error state outside any valid
|
||||
// HTML/CSS/JS construct.
|
||||
stateError
|
||||
+ // stateDead marks unreachable code after a {{break}} or {{continue}}.
|
||||
+ stateDead
|
||||
)
|
||||
|
||||
// isComment is true for any state that contains content meant for template
|
||||
diff --git a/src/html/template/escape.go b/src/html/template/escape.go
|
||||
index 8739735..6dea79c 100644
|
||||
--- a/src/html/template/escape.go
|
||||
+++ b/src/html/template/escape.go
|
||||
@@ -97,6 +97,15 @@ type escaper struct {
|
||||
actionNodeEdits map[*parse.ActionNode][]string
|
||||
templateNodeEdits map[*parse.TemplateNode]string
|
||||
textNodeEdits map[*parse.TextNode][]byte
|
||||
+ // rangeContext holds context about the current range loop.
|
||||
+ rangeContext *rangeContext
|
||||
+}
|
||||
+
|
||||
+// rangeContext holds information about the current range loop.
|
||||
+type rangeContext struct {
|
||||
+ outer *rangeContext // outer loop
|
||||
+ breaks []context // context at each break action
|
||||
+ continues []context // context at each continue action
|
||||
}
|
||||
|
||||
// makeEscaper creates a blank escaper for the given set.
|
||||
@@ -109,6 +118,7 @@ func makeEscaper(n *nameSpace) escaper {
|
||||
map[*parse.ActionNode][]string{},
|
||||
map[*parse.TemplateNode]string{},
|
||||
map[*parse.TextNode][]byte{},
|
||||
+ nil,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,8 +134,16 @@ func (e *escaper) escape(c context, n parse.Node) context {
|
||||
switch n := n.(type) {
|
||||
case *parse.ActionNode:
|
||||
return e.escapeAction(c, n)
|
||||
+ case *parse.BreakNode:
|
||||
+ c.n = n
|
||||
+ e.rangeContext.breaks = append(e.rangeContext.breaks, c)
|
||||
+ return context{state: stateDead}
|
||||
case *parse.CommentNode:
|
||||
return c
|
||||
+ case *parse.ContinueNode:
|
||||
+ c.n = n
|
||||
+ e.rangeContext.continues = append(e.rangeContext.breaks, c)
|
||||
+ return context{state: stateDead}
|
||||
case *parse.IfNode:
|
||||
return e.escapeBranch(c, &n.BranchNode, "if")
|
||||
case *parse.ListNode:
|
||||
@@ -427,6 +445,12 @@ func join(a, b context, node parse.Node, nodeName string) context {
|
||||
if b.state == stateError {
|
||||
return b
|
||||
}
|
||||
+ if a.state == stateDead {
|
||||
+ return b
|
||||
+ }
|
||||
+ if b.state == stateDead {
|
||||
+ return a
|
||||
+ }
|
||||
if a.eq(b) {
|
||||
return a
|
||||
}
|
||||
@@ -466,14 +490,27 @@ func join(a, b context, node parse.Node, nodeName string) context {
|
||||
|
||||
// escapeBranch escapes a branch template node: "if", "range" and "with".
|
||||
func (e *escaper) escapeBranch(c context, n *parse.BranchNode, nodeName string) context {
|
||||
+ if nodeName == "range" {
|
||||
+ e.rangeContext = &rangeContext{outer: e.rangeContext}
|
||||
+ }
|
||||
c0 := e.escapeList(c, n.List)
|
||||
- if nodeName == "range" && c0.state != stateError {
|
||||
+ if nodeName == "range" {
|
||||
+ if c0.state != stateError {
|
||||
+ c0 = joinRange(c0, e.rangeContext)
|
||||
+ }
|
||||
+ e.rangeContext = e.rangeContext.outer
|
||||
+ if c0.state == stateError {
|
||||
+ return c0
|
||||
+ }
|
||||
+
|
||||
// The "true" branch of a "range" node can execute multiple times.
|
||||
// We check that executing n.List once results in the same context
|
||||
// as executing n.List twice.
|
||||
+ e.rangeContext = &rangeContext{outer: e.rangeContext}
|
||||
c1, _ := e.escapeListConditionally(c0, n.List, nil)
|
||||
c0 = join(c0, c1, n, nodeName)
|
||||
if c0.state == stateError {
|
||||
+ e.rangeContext = e.rangeContext.outer
|
||||
// Make clear that this is a problem on loop re-entry
|
||||
// since developers tend to overlook that branch when
|
||||
// debugging templates.
|
||||
@@ -481,11 +518,39 @@ func (e *escaper) escapeBranch(c context, n *parse.BranchNode, nodeName string)
|
||||
c0.err.Description = "on range loop re-entry: " + c0.err.Description
|
||||
return c0
|
||||
}
|
||||
+ c0 = joinRange(c0, e.rangeContext)
|
||||
+ e.rangeContext = e.rangeContext.outer
|
||||
+ if c0.state == stateError {
|
||||
+ return c0
|
||||
+ }
|
||||
}
|
||||
c1 := e.escapeList(c, n.ElseList)
|
||||
return join(c0, c1, n, nodeName)
|
||||
}
|
||||
|
||||
+func joinRange(c0 context, rc *rangeContext) context {
|
||||
+ // Merge contexts at break and continue statements into overall body context.
|
||||
+ // In theory we could treat breaks differently from continues, but for now it is
|
||||
+ // enough to treat them both as going back to the start of the loop (which may then stop).
|
||||
+ for _, c := range rc.breaks {
|
||||
+ c0 = join(c0, c, c.n, "range")
|
||||
+ if c0.state == stateError {
|
||||
+ c0.err.Line = c.n.(*parse.BreakNode).Line
|
||||
+ c0.err.Description = "at range loop break: " + c0.err.Description
|
||||
+ return c0
|
||||
+ }
|
||||
+ }
|
||||
+ for _, c := range rc.continues {
|
||||
+ c0 = join(c0, c, c.n, "range")
|
||||
+ if c0.state == stateError {
|
||||
+ c0.err.Line = c.n.(*parse.ContinueNode).Line
|
||||
+ c0.err.Description = "at range loop continue: " + c0.err.Description
|
||||
+ return c0
|
||||
+ }
|
||||
+ }
|
||||
+ return c0
|
||||
+}
|
||||
+
|
||||
// escapeList escapes a list template node.
|
||||
func (e *escaper) escapeList(c context, n *parse.ListNode) context {
|
||||
if n == nil {
|
||||
@@ -493,6 +558,9 @@ func (e *escaper) escapeList(c context, n *parse.ListNode) context {
|
||||
}
|
||||
for _, m := range n.Nodes {
|
||||
c = e.escape(c, m)
|
||||
+ if c.state == stateDead {
|
||||
+ break
|
||||
+ }
|
||||
}
|
||||
return c
|
||||
}
|
||||
@@ -503,6 +571,7 @@ func (e *escaper) escapeList(c context, n *parse.ListNode) context {
|
||||
// which is the same as whether e was updated.
|
||||
func (e *escaper) escapeListConditionally(c context, n *parse.ListNode, filter func(*escaper, context) bool) (context, bool) {
|
||||
e1 := makeEscaper(e.ns)
|
||||
+ e1.rangeContext = e.rangeContext
|
||||
// Make type inferences available to f.
|
||||
for k, v := range e.output {
|
||||
e1.output[k] = v
|
||||
diff --git a/src/html/template/escape_test.go b/src/html/template/escape_test.go
|
||||
index fbc84a7..3b0aa8c 100644
|
||||
--- a/src/html/template/escape_test.go
|
||||
+++ b/src/html/template/escape_test.go
|
||||
@@ -920,6 +920,22 @@ func TestErrors(t *testing.T) {
|
||||
"<a href='/foo?{{range .Items}}&{{.K}}={{.V}}{{end}}'>",
|
||||
"",
|
||||
},
|
||||
+ {
|
||||
+ "{{range .Items}}<a{{if .X}}{{end}}>{{end}}",
|
||||
+ "",
|
||||
+ },
|
||||
+ {
|
||||
+ "{{range .Items}}<a{{if .X}}{{end}}>{{continue}}{{end}}",
|
||||
+ "",
|
||||
+ },
|
||||
+ {
|
||||
+ "{{range .Items}}<a{{if .X}}{{end}}>{{break}}{{end}}",
|
||||
+ "",
|
||||
+ },
|
||||
+ {
|
||||
+ "{{range .Items}}<a{{if .X}}{{end}}>{{if .X}}{{break}}{{end}}{{end}}",
|
||||
+ "",
|
||||
+ },
|
||||
// Error cases.
|
||||
{
|
||||
"{{if .Cond}}<a{{end}}",
|
||||
@@ -956,6 +972,14 @@ func TestErrors(t *testing.T) {
|
||||
"z:2:8: on range loop re-entry: {{range}} branches",
|
||||
},
|
||||
{
|
||||
+ "{{range .Items}}<a{{if .X}}{{break}}{{end}}>{{end}}",
|
||||
+ "z:1:29: at range loop break: {{range}} branches end in different contexts",
|
||||
+ },
|
||||
+ {
|
||||
+ "{{range .Items}}<a{{if .X}}{{continue}}{{end}}>{{end}}",
|
||||
+ "z:1:29: at range loop continue: {{range}} branches end in different contexts",
|
||||
+ },
|
||||
+ {
|
||||
"<a b=1 c={{.H}}",
|
||||
"z: ends in a non-text context: {stateAttr delimSpaceOrTagEnd",
|
||||
},
|
||||
diff --git a/src/html/template/exec_test.go b/src/html/template/exec_test.go
|
||||
index 8885873..523340b 100644
|
||||
--- a/src/html/template/exec_test.go
|
||||
+++ b/src/html/template/exec_test.go
|
||||
@@ -567,6 +567,8 @@ var execTests = []execTest{
|
||||
{"range empty no else", "{{range .SIEmpty}}-{{.}}-{{end}}", "", tVal, true},
|
||||
{"range []int else", "{{range .SI}}-{{.}}-{{else}}EMPTY{{end}}", "-3--4--5-", tVal, true},
|
||||
{"range empty else", "{{range .SIEmpty}}-{{.}}-{{else}}EMPTY{{end}}", "EMPTY", tVal, true},
|
||||
+ {"range []int break else", "{{range .SI}}-{{.}}-{{break}}NOTREACHED{{else}}EMPTY{{end}}", "-3-", tVal, true},
|
||||
+ {"range []int continue else", "{{range .SI}}-{{.}}-{{continue}}NOTREACHED{{else}}EMPTY{{end}}", "-3--4--5-", tVal, true},
|
||||
{"range []bool", "{{range .SB}}-{{.}}-{{end}}", "-true--false-", tVal, true},
|
||||
{"range []int method", "{{range .SI | .MAdd .I}}-{{.}}-{{end}}", "-20--21--22-", tVal, true},
|
||||
{"range map", "{{range .MSI}}-{{.}}-{{end}}", "-1--3--2-", tVal, true},
|
||||
diff --git a/src/text/template/doc.go b/src/text/template/doc.go
|
||||
index 7b30294..0228b15 100644
|
||||
--- a/src/text/template/doc.go
|
||||
+++ b/src/text/template/doc.go
|
||||
@@ -112,6 +112,14 @@ data, defined in detail in the corresponding sections that follow.
|
||||
T0 is executed; otherwise, dot is set to the successive elements
|
||||
of the array, slice, or map and T1 is executed.
|
||||
|
||||
+ {{break}}
|
||||
+ The innermost {{range pipeline}} loop is ended early, stopping the
|
||||
+ current iteration and bypassing all remaining iterations.
|
||||
+
|
||||
+ {{continue}}
|
||||
+ The current iteration of the innermost {{range pipeline}} loop is
|
||||
+ stopped, and the loop starts the next iteration.
|
||||
+
|
||||
{{template "name"}}
|
||||
The template with the specified name is executed with nil data.
|
||||
|
||||
diff --git a/src/text/template/exec.go b/src/text/template/exec.go
|
||||
index 5ad3b4e..92fa9d9 100644
|
||||
--- a/src/text/template/exec.go
|
||||
+++ b/src/text/template/exec.go
|
||||
@@ -5,6 +5,7 @@
|
||||
package template
|
||||
|
||||
import (
|
||||
+ "errors"
|
||||
"fmt"
|
||||
"internal/fmtsort"
|
||||
"io"
|
||||
@@ -243,6 +244,12 @@ func (t *Template) DefinedTemplates() string {
|
||||
return b.String()
|
||||
}
|
||||
|
||||
+// Sentinel errors for use with panic to signal early exits from range loops.
|
||||
+var (
|
||||
+ walkBreak = errors.New("break")
|
||||
+ walkContinue = errors.New("continue")
|
||||
+)
|
||||
+
|
||||
// Walk functions step through the major pieces of the template structure,
|
||||
// generating output as they go.
|
||||
func (s *state) walk(dot reflect.Value, node parse.Node) {
|
||||
@@ -255,7 +262,11 @@ func (s *state) walk(dot reflect.Value, node parse.Node) {
|
||||
if len(node.Pipe.Decl) == 0 {
|
||||
s.printValue(node, val)
|
||||
}
|
||||
+ case *parse.BreakNode:
|
||||
+ panic(walkBreak)
|
||||
case *parse.CommentNode:
|
||||
+ case *parse.ContinueNode:
|
||||
+ panic(walkContinue)
|
||||
case *parse.IfNode:
|
||||
s.walkIfOrWith(parse.NodeIf, dot, node.Pipe, node.List, node.ElseList)
|
||||
case *parse.ListNode:
|
||||
@@ -334,6 +345,11 @@ func isTrue(val reflect.Value) (truth, ok bool) {
|
||||
|
||||
func (s *state) walkRange(dot reflect.Value, r *parse.RangeNode) {
|
||||
s.at(r)
|
||||
+ defer func() {
|
||||
+ if r := recover(); r != nil && r != walkBreak {
|
||||
+ panic(r)
|
||||
+ }
|
||||
+ }()
|
||||
defer s.pop(s.mark())
|
||||
val, _ := indirect(s.evalPipeline(dot, r.Pipe))
|
||||
// mark top of stack before any variables in the body are pushed.
|
||||
@@ -347,8 +363,14 @@ func (s *state) walkRange(dot reflect.Value, r *parse.RangeNode) {
|
||||
if len(r.Pipe.Decl) > 1 {
|
||||
s.setTopVar(2, index)
|
||||
}
|
||||
+ defer s.pop(mark)
|
||||
+ defer func() {
|
||||
+ // Consume panic(walkContinue)
|
||||
+ if r := recover(); r != nil && r != walkContinue {
|
||||
+ panic(r)
|
||||
+ }
|
||||
+ }()
|
||||
s.walk(elem, r.List)
|
||||
- s.pop(mark)
|
||||
}
|
||||
switch val.Kind() {
|
||||
case reflect.Array, reflect.Slice:
|
||||
diff --git a/src/text/template/exec_test.go b/src/text/template/exec_test.go
|
||||
index ef52164..586af55 100644
|
||||
--- a/src/text/template/exec_test.go
|
||||
+++ b/src/text/template/exec_test.go
|
||||
@@ -564,6 +564,8 @@ var execTests = []execTest{
|
||||
{"range empty no else", "{{range .SIEmpty}}-{{.}}-{{end}}", "", tVal, true},
|
||||
{"range []int else", "{{range .SI}}-{{.}}-{{else}}EMPTY{{end}}", "-3--4--5-", tVal, true},
|
||||
{"range empty else", "{{range .SIEmpty}}-{{.}}-{{else}}EMPTY{{end}}", "EMPTY", tVal, true},
|
||||
+ {"range []int break else", "{{range .SI}}-{{.}}-{{break}}NOTREACHED{{else}}EMPTY{{end}}", "-3-", tVal, true},
|
||||
+ {"range []int continue else", "{{range .SI}}-{{.}}-{{continue}}NOTREACHED{{else}}EMPTY{{end}}", "-3--4--5-", tVal, true},
|
||||
{"range []bool", "{{range .SB}}-{{.}}-{{end}}", "-true--false-", tVal, true},
|
||||
{"range []int method", "{{range .SI | .MAdd .I}}-{{.}}-{{end}}", "-20--21--22-", tVal, true},
|
||||
{"range map", "{{range .MSI}}-{{.}}-{{end}}", "-1--3--2-", tVal, true},
|
||||
diff --git a/src/text/template/parse/lex.go b/src/text/template/parse/lex.go
|
||||
index 6784071..95e3377 100644
|
||||
--- a/src/text/template/parse/lex.go
|
||||
+++ b/src/text/template/parse/lex.go
|
||||
@@ -62,6 +62,8 @@ const (
|
||||
// Keywords appear after all the rest.
|
||||
itemKeyword // used only to delimit the keywords
|
||||
itemBlock // block keyword
|
||||
+ itemBreak // break keyword
|
||||
+ itemContinue // continue keyword
|
||||
itemDot // the cursor, spelled '.'
|
||||
itemDefine // define keyword
|
||||
itemElse // else keyword
|
||||
@@ -76,6 +78,8 @@ const (
|
||||
var key = map[string]itemType{
|
||||
".": itemDot,
|
||||
"block": itemBlock,
|
||||
+ "break": itemBreak,
|
||||
+ "continue": itemContinue,
|
||||
"define": itemDefine,
|
||||
"else": itemElse,
|
||||
"end": itemEnd,
|
||||
@@ -119,6 +123,8 @@ type lexer struct {
|
||||
parenDepth int // nesting depth of ( ) exprs
|
||||
line int // 1+number of newlines seen
|
||||
startLine int // start line of this item
|
||||
+ breakOK bool // break keyword allowed
|
||||
+ continueOK bool // continue keyword allowed
|
||||
}
|
||||
|
||||
// next returns the next rune in the input.
|
||||
@@ -461,7 +467,12 @@ Loop:
|
||||
}
|
||||
switch {
|
||||
case key[word] > itemKeyword:
|
||||
- l.emit(key[word])
|
||||
+ item := key[word]
|
||||
+ if item == itemBreak && !l.breakOK || item == itemContinue && !l.continueOK {
|
||||
+ l.emit(itemIdentifier)
|
||||
+ } else {
|
||||
+ l.emit(item)
|
||||
+ }
|
||||
case word[0] == '.':
|
||||
l.emit(itemField)
|
||||
case word == "true", word == "false":
|
||||
diff --git a/src/text/template/parse/lex_test.go b/src/text/template/parse/lex_test.go
|
||||
index 6510eed..df6aabf 100644
|
||||
--- a/src/text/template/parse/lex_test.go
|
||||
+++ b/src/text/template/parse/lex_test.go
|
||||
@@ -35,6 +35,8 @@ var itemName = map[itemType]string{
|
||||
// keywords
|
||||
itemDot: ".",
|
||||
itemBlock: "block",
|
||||
+ itemBreak: "break",
|
||||
+ itemContinue: "continue",
|
||||
itemDefine: "define",
|
||||
itemElse: "else",
|
||||
itemIf: "if",
|
||||
diff --git a/src/text/template/parse/node.go b/src/text/template/parse/node.go
|
||||
index 177482f..4726822 100644
|
||||
--- a/src/text/template/parse/node.go
|
||||
+++ b/src/text/template/parse/node.go
|
||||
@@ -71,6 +71,8 @@ const (
|
||||
NodeVariable // A $ variable.
|
||||
NodeWith // A with action.
|
||||
NodeComment // A comment.
|
||||
+ NodeBreak // A break action.
|
||||
+ NodeContinue // A continue action.
|
||||
)
|
||||
|
||||
// Nodes.
|
||||
@@ -907,6 +909,40 @@ func (i *IfNode) Copy() Node {
|
||||
return i.tr.newIf(i.Pos, i.Line, i.Pipe.CopyPipe(), i.List.CopyList(), i.ElseList.CopyList())
|
||||
}
|
||||
|
||||
+// BreakNode represents a {{break}} action.
|
||||
+type BreakNode struct {
|
||||
+ tr *Tree
|
||||
+ NodeType
|
||||
+ Pos
|
||||
+ Line int
|
||||
+}
|
||||
+
|
||||
+func (t *Tree) newBreak(pos Pos, line int) *BreakNode {
|
||||
+ return &BreakNode{tr: t, NodeType: NodeBreak, Pos: pos, Line: line}
|
||||
+}
|
||||
+
|
||||
+func (b *BreakNode) Copy() Node { return b.tr.newBreak(b.Pos, b.Line) }
|
||||
+func (b *BreakNode) String() string { return "{{break}}" }
|
||||
+func (b *BreakNode) tree() *Tree { return b.tr }
|
||||
+func (b *BreakNode) writeTo(sb *strings.Builder) { sb.WriteString("{{break}}") }
|
||||
+
|
||||
+// ContinueNode represents a {{continue}} action.
|
||||
+type ContinueNode struct {
|
||||
+ tr *Tree
|
||||
+ NodeType
|
||||
+ Pos
|
||||
+ Line int
|
||||
+}
|
||||
+
|
||||
+func (t *Tree) newContinue(pos Pos, line int) *ContinueNode {
|
||||
+ return &ContinueNode{tr: t, NodeType: NodeContinue, Pos: pos, Line: line}
|
||||
+}
|
||||
+
|
||||
+func (c *ContinueNode) Copy() Node { return c.tr.newContinue(c.Pos, c.Line) }
|
||||
+func (c *ContinueNode) String() string { return "{{continue}}" }
|
||||
+func (c *ContinueNode) tree() *Tree { return c.tr }
|
||||
+func (c *ContinueNode) writeTo(sb *strings.Builder) { sb.WriteString("{{continue}}") }
|
||||
+
|
||||
// RangeNode represents a {{range}} action and its commands.
|
||||
type RangeNode struct {
|
||||
BranchNode
|
||||
diff --git a/src/text/template/parse/parse.go b/src/text/template/parse/parse.go
|
||||
index 1a63961..d92bed5 100644
|
||||
--- a/src/text/template/parse/parse.go
|
||||
+++ b/src/text/template/parse/parse.go
|
||||
@@ -31,6 +31,7 @@ type Tree struct {
|
||||
vars []string // variables defined at the moment.
|
||||
treeSet map[string]*Tree
|
||||
actionLine int // line of left delim starting action
|
||||
+ rangeDepth int
|
||||
mode Mode
|
||||
}
|
||||
|
||||
@@ -224,6 +225,8 @@ func (t *Tree) startParse(funcs []map[string]interface{}, lex *lexer, treeSet ma
|
||||
t.vars = []string{"$"}
|
||||
t.funcs = funcs
|
||||
t.treeSet = treeSet
|
||||
+ lex.breakOK = !t.hasFunction("break")
|
||||
+ lex.continueOK = !t.hasFunction("continue")
|
||||
}
|
||||
|
||||
// stopParse terminates parsing.
|
||||
@@ -386,6 +389,10 @@ func (t *Tree) action() (n Node) {
|
||||
switch token := t.nextNonSpace(); token.typ {
|
||||
case itemBlock:
|
||||
return t.blockControl()
|
||||
+ case itemBreak:
|
||||
+ return t.breakControl(token.pos, token.line)
|
||||
+ case itemContinue:
|
||||
+ return t.continueControl(token.pos, token.line)
|
||||
case itemElse:
|
||||
return t.elseControl()
|
||||
case itemEnd:
|
||||
@@ -405,6 +412,32 @@ func (t *Tree) action() (n Node) {
|
||||
return t.newAction(token.pos, token.line, t.pipeline("command", itemRightDelim))
|
||||
}
|
||||
|
||||
+// Break:
|
||||
+// {{break}}
|
||||
+// Break keyword is past.
|
||||
+func (t *Tree) breakControl(pos Pos, line int) Node {
|
||||
+ if token := t.next(); token.typ != itemRightDelim {
|
||||
+ t.unexpected(token, "in {{break}}")
|
||||
+ }
|
||||
+ if t.rangeDepth == 0 {
|
||||
+ t.errorf("{{break}} outside {{range}}")
|
||||
+ }
|
||||
+ return t.newBreak(pos, line)
|
||||
+}
|
||||
+
|
||||
+// Continue:
|
||||
+// {{continue}}
|
||||
+// Continue keyword is past.
|
||||
+func (t *Tree) continueControl(pos Pos, line int) Node {
|
||||
+ if token := t.next(); token.typ != itemRightDelim {
|
||||
+ t.unexpected(token, "in {{continue}}")
|
||||
+ }
|
||||
+ if t.rangeDepth == 0 {
|
||||
+ t.errorf("{{continue}} outside {{range}}")
|
||||
+ }
|
||||
+ return t.newContinue(pos, line)
|
||||
+}
|
||||
+
|
||||
// Pipeline:
|
||||
// declarations? command ('|' command)*
|
||||
func (t *Tree) pipeline(context string, end itemType) (pipe *PipeNode) {
|
||||
@@ -480,8 +513,14 @@ func (t *Tree) checkPipeline(pipe *PipeNode, context string) {
|
||||
func (t *Tree) parseControl(allowElseIf bool, context string) (pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) {
|
||||
defer t.popVars(len(t.vars))
|
||||
pipe = t.pipeline(context, itemRightDelim)
|
||||
+ if context == "range" {
|
||||
+ t.rangeDepth++
|
||||
+ }
|
||||
var next Node
|
||||
list, next = t.itemList()
|
||||
+ if context == "range" {
|
||||
+ t.rangeDepth--
|
||||
+ }
|
||||
switch next.Type() {
|
||||
case nodeEnd: //done
|
||||
case nodeElse:
|
||||
@@ -523,7 +562,8 @@ func (t *Tree) ifControl() Node {
|
||||
// {{range pipeline}} itemList {{else}} itemList {{end}}
|
||||
// Range keyword is past.
|
||||
func (t *Tree) rangeControl() Node {
|
||||
- return t.newRange(t.parseControl(false, "range"))
|
||||
+ r := t.newRange(t.parseControl(false, "range"))
|
||||
+ return r
|
||||
}
|
||||
|
||||
// With:
|
||||
diff --git a/src/text/template/parse/parse_test.go b/src/text/template/parse/parse_test.go
|
||||
index 9b1be27..c3679a0 100644
|
||||
--- a/src/text/template/parse/parse_test.go
|
||||
+++ b/src/text/template/parse/parse_test.go
|
||||
@@ -230,6 +230,10 @@ var parseTests = []parseTest{
|
||||
`{{range $x := .SI}}{{.}}{{end}}`},
|
||||
{"range 2 vars", "{{range $x, $y := .SI}}{{.}}{{end}}", noError,
|
||||
`{{range $x, $y := .SI}}{{.}}{{end}}`},
|
||||
+ {"range with break", "{{range .SI}}{{.}}{{break}}{{end}}", noError,
|
||||
+ `{{range .SI}}{{.}}{{break}}{{end}}`},
|
||||
+ {"range with continue", "{{range .SI}}{{.}}{{continue}}{{end}}", noError,
|
||||
+ `{{range .SI}}{{.}}{{continue}}{{end}}`},
|
||||
{"constants", "{{range .SI 1 -3.2i true false 'a' nil}}{{end}}", noError,
|
||||
`{{range .SI 1 -3.2i true false 'a' nil}}{{end}}`},
|
||||
{"template", "{{template `x`}}", noError,
|
||||
@@ -279,6 +283,10 @@ var parseTests = []parseTest{
|
||||
{"adjacent args", "{{printf 3`x`}}", hasError, ""},
|
||||
{"adjacent args with .", "{{printf `x`.}}", hasError, ""},
|
||||
{"extra end after if", "{{if .X}}a{{else if .Y}}b{{end}}{{end}}", hasError, ""},
|
||||
+ {"break outside range", "{{range .}}{{end}} {{break}}", hasError, ""},
|
||||
+ {"continue outside range", "{{range .}}{{end}} {{continue}}", hasError, ""},
|
||||
+ {"break in range else", "{{range .}}{{else}}{{break}}{{end}}", hasError, ""},
|
||||
+ {"continue in range else", "{{range .}}{{else}}{{continue}}{{end}}", hasError, ""},
|
||||
// Other kinds of assignments and operators aren't available yet.
|
||||
{"bug0a", "{{$x := 0}}{{$x}}", noError, "{{$x := 0}}{{$x}}"},
|
||||
{"bug0b", "{{$x += 1}}{{$x}}", hasError, ""},
|
||||
--
|
||||
2.7.4
|
||||
@@ -1,7 +1,7 @@
|
||||
From 07cc3b8711a8efbb5885f56dd90d854049ad2f7d Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Mon, 20 Mar 2023 11:01:13 -0700
|
||||
Subject: [PATCH] html/template: disallow actions in JS template literals
|
||||
Subject: [PATCH 2/2] html/template: disallow actions in JS template literals
|
||||
|
||||
ECMAScript 6 introduced template literals[0][1] which are delimited with
|
||||
backticks. These need to be escaped in a similar fashion to the
|
||||
@@ -52,12 +52,15 @@ CVE: CVE-2023-24538
|
||||
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
|
||||
---
|
||||
src/html/template/context.go | 2 ++
|
||||
src/html/template/error.go | 13 +++++++++++++
|
||||
src/html/template/escape.go | 11 +++++++++++
|
||||
src/html/template/error.go | 13 ++++++++
|
||||
src/html/template/escape.go | 11 +++++++
|
||||
src/html/template/escape_test.go | 66 ++++++++++++++++++++++-----------------
|
||||
src/html/template/js.go | 2 ++
|
||||
src/html/template/jsctx_string.go | 9 +++++++++
|
||||
src/html/template/transition.go | 7 ++++++-
|
||||
6 files changed, 43 insertions(+), 1 deletion(-)
|
||||
src/html/template/js_test.go | 2 +-
|
||||
src/html/template/jsctx_string.go | 9 ++++++
|
||||
src/html/template/state_string.go | 37 ++++++++++++++++++++--
|
||||
src/html/template/transition.go | 7 ++++-
|
||||
9 files changed, 116 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/src/html/template/context.go b/src/html/template/context.go
|
||||
index f7d4849..0b65313 100644
|
||||
@@ -125,6 +128,104 @@ index 8739735..ca078f4 100644
|
||||
case stateJSRegexp:
|
||||
s = append(s, "_html_template_jsregexpescaper")
|
||||
case stateCSS:
|
||||
diff --git a/src/html/template/escape_test.go b/src/html/template/escape_test.go
|
||||
index 3b0aa8c..a695b17 100644
|
||||
--- a/src/html/template/escape_test.go
|
||||
+++ b/src/html/template/escape_test.go
|
||||
@@ -681,35 +681,31 @@ func TestEscape(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
- tmpl := New(test.name)
|
||||
- tmpl = Must(tmpl.Parse(test.input))
|
||||
- // Check for bug 6459: Tree field was not set in Parse.
|
||||
- if tmpl.Tree != tmpl.text.Tree {
|
||||
- t.Errorf("%s: tree not set properly", test.name)
|
||||
- continue
|
||||
- }
|
||||
- b := new(bytes.Buffer)
|
||||
- if err := tmpl.Execute(b, data); err != nil {
|
||||
- t.Errorf("%s: template execution failed: %s", test.name, err)
|
||||
- continue
|
||||
- }
|
||||
- if w, g := test.output, b.String(); w != g {
|
||||
- t.Errorf("%s: escaped output: want\n\t%q\ngot\n\t%q", test.name, w, g)
|
||||
- continue
|
||||
- }
|
||||
- b.Reset()
|
||||
- if err := tmpl.Execute(b, pdata); err != nil {
|
||||
- t.Errorf("%s: template execution failed for pointer: %s", test.name, err)
|
||||
- continue
|
||||
- }
|
||||
- if w, g := test.output, b.String(); w != g {
|
||||
- t.Errorf("%s: escaped output for pointer: want\n\t%q\ngot\n\t%q", test.name, w, g)
|
||||
- continue
|
||||
- }
|
||||
- if tmpl.Tree != tmpl.text.Tree {
|
||||
- t.Errorf("%s: tree mismatch", test.name)
|
||||
- continue
|
||||
- }
|
||||
+ t.Run(test.name, func(t *testing.T) {
|
||||
+ tmpl := New(test.name)
|
||||
+ tmpl = Must(tmpl.Parse(test.input))
|
||||
+ // Check for bug 6459: Tree field was not set in Parse.
|
||||
+ if tmpl.Tree != tmpl.text.Tree {
|
||||
+ t.Fatalf("%s: tree not set properly", test.name)
|
||||
+ }
|
||||
+ b := new(strings.Builder)
|
||||
+ if err := tmpl.Execute(b, data); err != nil {
|
||||
+ t.Fatalf("%s: template execution failed: %s", test.name, err)
|
||||
+ }
|
||||
+ if w, g := test.output, b.String(); w != g {
|
||||
+ t.Fatalf("%s: escaped output: want\n\t%q\ngot\n\t%q", test.name, w, g)
|
||||
+ }
|
||||
+ b.Reset()
|
||||
+ if err := tmpl.Execute(b, pdata); err != nil {
|
||||
+ t.Fatalf("%s: template execution failed for pointer: %s", test.name, err)
|
||||
+ }
|
||||
+ if w, g := test.output, b.String(); w != g {
|
||||
+ t.Fatalf("%s: escaped output for pointer: want\n\t%q\ngot\n\t%q", test.name, w, g)
|
||||
+ }
|
||||
+ if tmpl.Tree != tmpl.text.Tree {
|
||||
+ t.Fatalf("%s: tree mismatch", test.name)
|
||||
+ }
|
||||
+ })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -936,6 +932,10 @@ func TestErrors(t *testing.T) {
|
||||
"{{range .Items}}<a{{if .X}}{{end}}>{{if .X}}{{break}}{{end}}{{end}}",
|
||||
"",
|
||||
},
|
||||
+ {
|
||||
+ "<script>var a = `${a+b}`</script>`",
|
||||
+ "",
|
||||
+ },
|
||||
// Error cases.
|
||||
{
|
||||
"{{if .Cond}}<a{{end}}",
|
||||
@@ -1082,6 +1082,10 @@ func TestErrors(t *testing.T) {
|
||||
// html is allowed since it is the last command in the pipeline, but urlquery is not.
|
||||
`predefined escaper "urlquery" disallowed in template`,
|
||||
},
|
||||
+ {
|
||||
+ "<script>var tmpl = `asd {{.}}`;</script>",
|
||||
+ `{{.}} appears in a JS template literal`,
|
||||
+ },
|
||||
}
|
||||
for _, test := range tests {
|
||||
buf := new(bytes.Buffer)
|
||||
@@ -1304,6 +1308,10 @@ func TestEscapeText(t *testing.T) {
|
||||
context{state: stateJSSqStr, delim: delimDoubleQuote, attr: attrScript},
|
||||
},
|
||||
{
|
||||
+ "<a onclick=\"`foo",
|
||||
+ context{state: stateJSBqStr, delim: delimDoubleQuote, attr: attrScript},
|
||||
+ },
|
||||
+ {
|
||||
`<A ONCLICK="'`,
|
||||
context{state: stateJSSqStr, delim: delimDoubleQuote, attr: attrScript},
|
||||
},
|
||||
diff --git a/src/html/template/js.go b/src/html/template/js.go
|
||||
index ea9c183..b888eaf 100644
|
||||
--- a/src/html/template/js.go
|
||||
@@ -145,6 +246,19 @@ index ea9c183..b888eaf 100644
|
||||
'+': `\u002b`,
|
||||
'/': `\/`,
|
||||
'<': `\u003c`,
|
||||
diff --git a/src/html/template/js_test.go b/src/html/template/js_test.go
|
||||
index d7ee47b..7d963ae 100644
|
||||
--- a/src/html/template/js_test.go
|
||||
+++ b/src/html/template/js_test.go
|
||||
@@ -292,7 +292,7 @@ func TestEscapersOnLower7AndSelectHighCodepoints(t *testing.T) {
|
||||
`0123456789:;\u003c=\u003e?` +
|
||||
`@ABCDEFGHIJKLMNO` +
|
||||
`PQRSTUVWXYZ[\\]^_` +
|
||||
- "`abcdefghijklmno" +
|
||||
+ "\\u0060abcdefghijklmno" +
|
||||
"pqrstuvwxyz{|}~\u007f" +
|
||||
"\u00A0\u0100\\u2028\\u2029\ufeff\U0001D11E",
|
||||
},
|
||||
diff --git a/src/html/template/jsctx_string.go b/src/html/template/jsctx_string.go
|
||||
index dd1d87e..2394893 100644
|
||||
--- a/src/html/template/jsctx_string.go
|
||||
@@ -165,6 +279,55 @@ index dd1d87e..2394893 100644
|
||||
const _jsCtx_name = "jsCtxRegexpjsCtxDivOpjsCtxUnknown"
|
||||
|
||||
var _jsCtx_index = [...]uint8{0, 11, 21, 33}
|
||||
diff --git a/src/html/template/state_string.go b/src/html/template/state_string.go
|
||||
index 05104be..6fb1a6e 100644
|
||||
--- a/src/html/template/state_string.go
|
||||
+++ b/src/html/template/state_string.go
|
||||
@@ -4,9 +4,42 @@ package template
|
||||
|
||||
import "strconv"
|
||||
|
||||
-const _state_name = "stateTextstateTagstateAttrNamestateAfterNamestateBeforeValuestateHTMLCmtstateRCDATAstateAttrstateURLstateSrcsetstateJSstateJSDqStrstateJSSqStrstateJSRegexpstateJSBlockCmtstateJSLineCmtstateCSSstateCSSDqStrstateCSSSqStrstateCSSDqURLstateCSSSqURLstateCSSURLstateCSSBlockCmtstateCSSLineCmtstateError"
|
||||
+func _() {
|
||||
+ // An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
+ // Re-run the stringer command to generate them again.
|
||||
+ var x [1]struct{}
|
||||
+ _ = x[stateText-0]
|
||||
+ _ = x[stateTag-1]
|
||||
+ _ = x[stateAttrName-2]
|
||||
+ _ = x[stateAfterName-3]
|
||||
+ _ = x[stateBeforeValue-4]
|
||||
+ _ = x[stateHTMLCmt-5]
|
||||
+ _ = x[stateRCDATA-6]
|
||||
+ _ = x[stateAttr-7]
|
||||
+ _ = x[stateURL-8]
|
||||
+ _ = x[stateSrcset-9]
|
||||
+ _ = x[stateJS-10]
|
||||
+ _ = x[stateJSDqStr-11]
|
||||
+ _ = x[stateJSSqStr-12]
|
||||
+ _ = x[stateJSBqStr-13]
|
||||
+ _ = x[stateJSRegexp-14]
|
||||
+ _ = x[stateJSBlockCmt-15]
|
||||
+ _ = x[stateJSLineCmt-16]
|
||||
+ _ = x[stateCSS-17]
|
||||
+ _ = x[stateCSSDqStr-18]
|
||||
+ _ = x[stateCSSSqStr-19]
|
||||
+ _ = x[stateCSSDqURL-20]
|
||||
+ _ = x[stateCSSSqURL-21]
|
||||
+ _ = x[stateCSSURL-22]
|
||||
+ _ = x[stateCSSBlockCmt-23]
|
||||
+ _ = x[stateCSSLineCmt-24]
|
||||
+ _ = x[stateError-25]
|
||||
+ _ = x[stateDead-26]
|
||||
+}
|
||||
+
|
||||
+const _state_name = "stateTextstateTagstateAttrNamestateAfterNamestateBeforeValuestateHTMLCmtstateRCDATAstateAttrstateURLstateSrcsetstateJSstateJSDqStrstateJSSqStrstateJSBqStrstateJSRegexpstateJSBlockCmtstateJSLineCmtstateCSSstateCSSDqStrstateCSSSqStrstateCSSDqURLstateCSSSqURLstateCSSURLstateCSSBlockCmtstateCSSLineCmtstateErrorstateDead"
|
||||
|
||||
-var _state_index = [...]uint16{0, 9, 17, 30, 44, 60, 72, 83, 92, 100, 111, 118, 130, 142, 155, 170, 184, 192, 205, 218, 231, 244, 255, 271, 286, 296}
|
||||
+var _state_index = [...]uint16{0, 9, 17, 30, 44, 60, 72, 83, 92, 100, 111, 118, 130, 142, 154, 167, 182, 196, 204, 217, 230, 243, 256, 267, 283, 298, 308, 317}
|
||||
|
||||
func (i state) String() string {
|
||||
if i >= state(len(_state_index)-1) {
|
||||
diff --git a/src/html/template/transition.go b/src/html/template/transition.go
|
||||
index 06df679..92eb351 100644
|
||||
--- a/src/html/template/transition.go
|
||||
262
meta/recipes-devtools/go/go-1.21/CVE-2023-39318.patch
Normal file
262
meta/recipes-devtools/go/go-1.21/CVE-2023-39318.patch
Normal file
@@ -0,0 +1,262 @@
|
||||
From 023b542edf38e2a1f87fcefb9f75ff2f99401b4c Mon Sep 17 00:00:00 2001
|
||||
From: Roland Shoemaker <bracewell@google.com>
|
||||
Date: Thu, 3 Aug 2023 12:24:13 -0700
|
||||
Subject: [PATCH] [release-branch.go1.20] html/template: support HTML-like
|
||||
comments in script contexts
|
||||
|
||||
Per Appendix B.1.1 of the ECMAScript specification, support HTML-like
|
||||
comments in script contexts. Also per section 12.5, support hashbang
|
||||
comments. This brings our parsing in-line with how browsers treat these
|
||||
comment types.
|
||||
|
||||
Thanks to Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.) for
|
||||
reporting this issue.
|
||||
|
||||
Fixes #62196
|
||||
Fixes #62395
|
||||
Fixes CVE-2023-39318
|
||||
|
||||
Change-Id: Id512702c5de3ae46cf648e268cb10e1eb392a181
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1976593
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2014620
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/526098
|
||||
Run-TryBot: Cherry Mui <cherryyz@google.com>
|
||||
TryBot-Result: Gopher Robot <gobot@golang.org>
|
||||
|
||||
Upstream-Status: Backport from [https://github.com/golang/go/commit/023b542edf38e2a1f87fcefb9f75ff2f99401b4c]
|
||||
CVE: CVE-2023-39318
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
src/html/template/context.go | 6 ++-
|
||||
src/html/template/escape.go | 5 ++-
|
||||
src/html/template/escape_test.go | 10 +++++
|
||||
src/html/template/state_string.go | 26 +++++++------
|
||||
src/html/template/transition.go | 80 +++++++++++++++++++++++++--------------
|
||||
5 files changed, 84 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/src/html/template/context.go b/src/html/template/context.go
|
||||
index f5f44a1..feb6517 100644
|
||||
--- a/src/html/template/context.go
|
||||
+++ b/src/html/template/context.go
|
||||
@@ -124,6 +124,10 @@ const (
|
||||
stateJSBlockCmt
|
||||
// stateJSLineCmt occurs inside a JavaScript // line comment.
|
||||
stateJSLineCmt
|
||||
+ // stateJSHTMLOpenCmt occurs inside a JavaScript <!-- HTML-like comment.
|
||||
+ stateJSHTMLOpenCmt
|
||||
+ // stateJSHTMLCloseCmt occurs inside a JavaScript --> HTML-like comment.
|
||||
+ stateJSHTMLCloseCmt
|
||||
// stateCSS occurs inside a <style> element or style attribute.
|
||||
stateCSS
|
||||
// stateCSSDqStr occurs inside a CSS double quoted string.
|
||||
@@ -149,7 +153,7 @@ const (
|
||||
// authors & maintainers, not for end-users or machines.
|
||||
func isComment(s state) bool {
|
||||
switch s {
|
||||
- case stateHTMLCmt, stateJSBlockCmt, stateJSLineCmt, stateCSSBlockCmt, stateCSSLineCmt:
|
||||
+ case stateHTMLCmt, stateJSBlockCmt, stateJSLineCmt, stateJSHTMLOpenCmt, stateJSHTMLCloseCmt, stateCSSBlockCmt, stateCSSLineCmt:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
diff --git a/src/html/template/escape.go b/src/html/template/escape.go
|
||||
index 1747ec9..b0085ce 100644
|
||||
--- a/src/html/template/escape.go
|
||||
+++ b/src/html/template/escape.go
|
||||
@@ -721,9 +721,12 @@ func (e *escaper) escapeText(c context, n *parse.TextNode) context {
|
||||
if c.state != c1.state && isComment(c1.state) && c1.delim == delimNone {
|
||||
// Preserve the portion between written and the comment start.
|
||||
cs := i1 - 2
|
||||
- if c1.state == stateHTMLCmt {
|
||||
+ if c1.state == stateHTMLCmt || c1.state == stateJSHTMLOpenCmt {
|
||||
// "<!--" instead of "/*" or "//"
|
||||
cs -= 2
|
||||
+ } else if c1.state == stateJSHTMLCloseCmt {
|
||||
+ // "-->" instead of "/*" or "//"
|
||||
+ cs -= 1
|
||||
}
|
||||
b.Write(s[written:cs])
|
||||
written = i1
|
||||
diff --git a/src/html/template/escape_test.go b/src/html/template/escape_test.go
|
||||
index 7853daa..bff38c6 100644
|
||||
--- a/src/html/template/escape_test.go
|
||||
+++ b/src/html/template/escape_test.go
|
||||
@@ -503,6 +503,16 @@ func TestEscape(t *testing.T) {
|
||||
"<script>var a/*b*///c\nd</script>",
|
||||
"<script>var a \nd</script>",
|
||||
},
|
||||
+ {
|
||||
+ "JS HTML-like comments",
|
||||
+ "<script>before <!-- beep\nbetween\nbefore-->boop\n</script>",
|
||||
+ "<script>before \nbetween\nbefore\n</script>",
|
||||
+ },
|
||||
+ {
|
||||
+ "JS hashbang comment",
|
||||
+ "<script>#! beep\n</script>",
|
||||
+ "<script>\n</script>",
|
||||
+ },
|
||||
{
|
||||
"Special tags in <script> string literals",
|
||||
`<script>var a = "asd < 123 <!-- 456 < fgh <script jkl < 789 </script"</script>`,
|
||||
diff --git a/src/html/template/state_string.go b/src/html/template/state_string.go
|
||||
index 05104be..b5cfe70 100644
|
||||
--- a/src/html/template/state_string.go
|
||||
+++ b/src/html/template/state_string.go
|
||||
@@ -25,21 +25,23 @@ func _() {
|
||||
_ = x[stateJSRegexp-14]
|
||||
_ = x[stateJSBlockCmt-15]
|
||||
_ = x[stateJSLineCmt-16]
|
||||
- _ = x[stateCSS-17]
|
||||
- _ = x[stateCSSDqStr-18]
|
||||
- _ = x[stateCSSSqStr-19]
|
||||
- _ = x[stateCSSDqURL-20]
|
||||
- _ = x[stateCSSSqURL-21]
|
||||
- _ = x[stateCSSURL-22]
|
||||
- _ = x[stateCSSBlockCmt-23]
|
||||
- _ = x[stateCSSLineCmt-24]
|
||||
- _ = x[stateError-25]
|
||||
- _ = x[stateDead-26]
|
||||
+ _ = x[stateJSHTMLOpenCmt-17]
|
||||
+ _ = x[stateJSHTMLCloseCmt-18]
|
||||
+ _ = x[stateCSS-19]
|
||||
+ _ = x[stateCSSDqStr-20]
|
||||
+ _ = x[stateCSSSqStr-21]
|
||||
+ _ = x[stateCSSDqURL-22]
|
||||
+ _ = x[stateCSSSqURL-23]
|
||||
+ _ = x[stateCSSURL-24]
|
||||
+ _ = x[stateCSSBlockCmt-25]
|
||||
+ _ = x[stateCSSLineCmt-26]
|
||||
+ _ = x[stateError-27]
|
||||
+ _ = x[stateDead-28]
|
||||
}
|
||||
|
||||
-const _state_name = "stateTextstateTagstateAttrNamestateAfterNamestateBeforeValuestateHTMLCmtstateRCDATAstateAttrstateURLstateSrcsetstateJSstateJSDqStrstateJSSqStrstateJSBqStrstateJSRegexpstateJSBlockCmtstateJSLineCmtstateCSSstateCSSDqStrstateCSSSqStrstateCSSDqURLstateCSSSqURLstateCSSURLstateCSSBlockCmtstateCSSLineCmtstateErrorstateDead"
|
||||
+const _state_name = "stateTextstateTagstateAttrNamestateAfterNamestateBeforeValuestateHTMLCmtstateRCDATAstateAttrstateURLstateSrcsetstateJSstateJSDqStrstateJSSqStrstateJSBqStrstateJSRegexpstateJSBlockCmtstateJSLineCmtstateJSHTMLOpenCmtstateJSHTMLCloseCmtstateCSSstateCSSDqStrstateCSSSqStrstateCSSDqURLstateCSSSqURLstateCSSURLstateCSSBlockCmtstateCSSLineCmtstateErrorstateDead"
|
||||
|
||||
-var _state_index = [...]uint16{0, 9, 17, 30, 44, 60, 72, 83, 92, 100, 111, 118, 130, 142, 154, 167, 182, 196, 204, 217, 230, 243, 256, 267, 283, 298, 308, 317}
|
||||
+var _state_index = [...]uint16{0, 9, 17, 30, 44, 60, 72, 83, 92, 100, 111, 118, 130, 142, 154, 167, 182, 196, 214, 233, 241, 254, 267, 280, 293, 304, 320, 335, 345, 354}
|
||||
|
||||
func (i state) String() string {
|
||||
if i >= state(len(_state_index)-1) {
|
||||
diff --git a/src/html/template/transition.go b/src/html/template/transition.go
|
||||
index e2660cc..3d2a37c 100644
|
||||
--- a/src/html/template/transition.go
|
||||
+++ b/src/html/template/transition.go
|
||||
@@ -14,32 +14,34 @@ import (
|
||||
// the updated context and the number of bytes consumed from the front of the
|
||||
// input.
|
||||
var transitionFunc = [...]func(context, []byte) (context, int){
|
||||
- stateText: tText,
|
||||
- stateTag: tTag,
|
||||
- stateAttrName: tAttrName,
|
||||
- stateAfterName: tAfterName,
|
||||
- stateBeforeValue: tBeforeValue,
|
||||
- stateHTMLCmt: tHTMLCmt,
|
||||
- stateRCDATA: tSpecialTagEnd,
|
||||
- stateAttr: tAttr,
|
||||
- stateURL: tURL,
|
||||
- stateSrcset: tURL,
|
||||
- stateJS: tJS,
|
||||
- stateJSDqStr: tJSDelimited,
|
||||
- stateJSSqStr: tJSDelimited,
|
||||
- stateJSBqStr: tJSDelimited,
|
||||
- stateJSRegexp: tJSDelimited,
|
||||
- stateJSBlockCmt: tBlockCmt,
|
||||
- stateJSLineCmt: tLineCmt,
|
||||
- stateCSS: tCSS,
|
||||
- stateCSSDqStr: tCSSStr,
|
||||
- stateCSSSqStr: tCSSStr,
|
||||
- stateCSSDqURL: tCSSStr,
|
||||
- stateCSSSqURL: tCSSStr,
|
||||
- stateCSSURL: tCSSStr,
|
||||
- stateCSSBlockCmt: tBlockCmt,
|
||||
- stateCSSLineCmt: tLineCmt,
|
||||
- stateError: tError,
|
||||
+ stateText: tText,
|
||||
+ stateTag: tTag,
|
||||
+ stateAttrName: tAttrName,
|
||||
+ stateAfterName: tAfterName,
|
||||
+ stateBeforeValue: tBeforeValue,
|
||||
+ stateHTMLCmt: tHTMLCmt,
|
||||
+ stateRCDATA: tSpecialTagEnd,
|
||||
+ stateAttr: tAttr,
|
||||
+ stateURL: tURL,
|
||||
+ stateSrcset: tURL,
|
||||
+ stateJS: tJS,
|
||||
+ stateJSDqStr: tJSDelimited,
|
||||
+ stateJSSqStr: tJSDelimited,
|
||||
+ stateJSBqStr: tJSDelimited,
|
||||
+ stateJSRegexp: tJSDelimited,
|
||||
+ stateJSBlockCmt: tBlockCmt,
|
||||
+ stateJSLineCmt: tLineCmt,
|
||||
+ stateJSHTMLOpenCmt: tLineCmt,
|
||||
+ stateJSHTMLCloseCmt: tLineCmt,
|
||||
+ stateCSS: tCSS,
|
||||
+ stateCSSDqStr: tCSSStr,
|
||||
+ stateCSSSqStr: tCSSStr,
|
||||
+ stateCSSDqURL: tCSSStr,
|
||||
+ stateCSSSqURL: tCSSStr,
|
||||
+ stateCSSURL: tCSSStr,
|
||||
+ stateCSSBlockCmt: tBlockCmt,
|
||||
+ stateCSSLineCmt: tLineCmt,
|
||||
+ stateError: tError,
|
||||
}
|
||||
|
||||
var commentStart = []byte("<!--")
|
||||
@@ -268,7 +270,7 @@ func tURL(c context, s []byte) (context, int) {
|
||||
|
||||
// tJS is the context transition function for the JS state.
|
||||
func tJS(c context, s []byte) (context, int) {
|
||||
- i := bytes.IndexAny(s, "\"`'/")
|
||||
+ i := bytes.IndexAny(s, "\"`'/<-#")
|
||||
if i == -1 {
|
||||
// Entire input is non string, comment, regexp tokens.
|
||||
c.jsCtx = nextJSCtx(s, c.jsCtx)
|
||||
@@ -298,6 +300,26 @@ func tJS(c context, s []byte) (context, int) {
|
||||
err: errorf(ErrSlashAmbig, nil, 0, "'/' could start a division or regexp: %.32q", s[i:]),
|
||||
}, len(s)
|
||||
}
|
||||
+ // ECMAScript supports HTML style comments for legacy reasons, see Appendix
|
||||
+ // B.1.1 "HTML-like Comments". The handling of these comments is somewhat
|
||||
+ // confusing. Multi-line comments are not supported, i.e. anything on lines
|
||||
+ // between the opening and closing tokens is not considered a comment, but
|
||||
+ // anything following the opening or closing token, on the same line, is
|
||||
+ // ignored. As such we simply treat any line prefixed with "<!--" or "-->"
|
||||
+ // as if it were actually prefixed with "//" and move on.
|
||||
+ case '<':
|
||||
+ if i+3 < len(s) && bytes.Equal(commentStart, s[i:i+4]) {
|
||||
+ c.state, i = stateJSHTMLOpenCmt, i+3
|
||||
+ }
|
||||
+ case '-':
|
||||
+ if i+2 < len(s) && bytes.Equal(commentEnd, s[i:i+3]) {
|
||||
+ c.state, i = stateJSHTMLCloseCmt, i+2
|
||||
+ }
|
||||
+ // ECMAScript also supports "hashbang" comment lines, see Section 12.5.
|
||||
+ case '#':
|
||||
+ if i+1 < len(s) && s[i+1] == '!' {
|
||||
+ c.state, i = stateJSLineCmt, i+1
|
||||
+ }
|
||||
default:
|
||||
panic("unreachable")
|
||||
}
|
||||
@@ -387,12 +409,12 @@ func tBlockCmt(c context, s []byte) (context, int) {
|
||||
return c, i + 2
|
||||
}
|
||||
|
||||
-// tLineCmt is the context transition function for //comment states.
|
||||
+// tLineCmt is the context transition function for //comment states, and the JS HTML-like comment state.
|
||||
func tLineCmt(c context, s []byte) (context, int) {
|
||||
var lineTerminators string
|
||||
var endState state
|
||||
switch c.state {
|
||||
- case stateJSLineCmt:
|
||||
+ case stateJSLineCmt, stateJSHTMLOpenCmt, stateJSHTMLCloseCmt:
|
||||
lineTerminators, endState = "\n\r\u2028\u2029", stateJS
|
||||
case stateCSSLineCmt:
|
||||
lineTerminators, endState = "\n\f\r", stateCSS
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -12,6 +12,9 @@ SRC_URI = " \
|
||||
|
||||
SRC_URI[sha256sum] = "b8d80a1ddb718b3ba7492916237bbf86609e9709fb007e7f7d4322f02341a4c6"
|
||||
|
||||
# NVD uses full tag name including date
|
||||
CVE_VERSION = "0.15-20200726"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags"
|
||||
UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ access with big-files support."
|
||||
HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=5279a7ab369ba336989dcf2a107e5c8e"
|
||||
|
||||
PYPI_PACKAGE = "GitPython"
|
||||
|
||||
inherit pypi python_setuptools_build_meta
|
||||
|
||||
SRC_URI[sha256sum] = "8d9b8cb1e80b9735e8717c9362079d3ce4c6e5ddeebedd0361b228c3a67a62f6"
|
||||
SRC_URI[sha256sum] = "f9b9ddc0761c125d5780eab2d64be4873fc6817c2899cbcb34b02344bdc7bc54"
|
||||
|
||||
DEPENDS += " ${PYTHON_PN}-gitdb"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
pytest
|
||||
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}}'
|
||||
|
||||
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/shazow/urllib3"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c2823cb995439c984fd62a973d79815c"
|
||||
|
||||
SRC_URI[sha256sum] = "aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e"
|
||||
SRC_URI[sha256sum] = "24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21"
|
||||
|
||||
inherit pypi setuptools3
|
||||
|
||||
@@ -15,6 +15,7 @@ RDEPENDS:${PN} += "\
|
||||
${PYTHON_PN}-netclient \
|
||||
${PYTHON_PN}-pyopenssl \
|
||||
${PYTHON_PN}-threading \
|
||||
${PYTHON_PN}-logging \
|
||||
"
|
||||
|
||||
CVE_PRODUCT = "urllib3"
|
||||
@@ -125,6 +125,10 @@ CVE_CHECK_IGNORE += "CVE-2018-18438"
|
||||
# this bug related to windows specific.
|
||||
CVE_CHECK_IGNORE += "CVE-2023-0664"
|
||||
|
||||
# As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387
|
||||
# RHEL specific issue
|
||||
CVE_CHECK_IGNORE += "CVE-2023-2680"
|
||||
|
||||
COMPATIBLE_HOST:mipsarchn32 = "null"
|
||||
COMPATIBLE_HOST:mipsarchn64 = "null"
|
||||
COMPATIBLE_HOST:riscv32 = "null"
|
||||
|
||||
52
meta/recipes-devtools/ruby/ruby/CVE-2023-36617_1.patch
Normal file
52
meta/recipes-devtools/ruby/ruby/CVE-2023-36617_1.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From 9c2eb12776c1b5df2517a7e618e5fe818cc3395e Mon Sep 17 00:00:00 2001
|
||||
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Date: Thu, 27 Jul 2023 15:53:01 +0800
|
||||
Subject: [PATCH] ruby: Fix quadratic backtracking on invalid relative URI
|
||||
|
||||
Upstream-Status: Backport [https://github.com/ruby/uri/commit/9010ee2536adda10a0555ae1ed6fe2f5808e6bf1]
|
||||
CVE: CVE-2023-36617
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
lib/uri/rfc2396_parser.rb | 4 ++--
|
||||
test/uri/test_parser.rb | 12 ++++++++++++
|
||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/uri/rfc2396_parser.rb b/lib/uri/rfc2396_parser.rb
|
||||
index 76a8f99..00c66cf 100644
|
||||
--- a/lib/uri/rfc2396_parser.rb
|
||||
+++ b/lib/uri/rfc2396_parser.rb
|
||||
@@ -497,8 +497,8 @@ module URI
|
||||
ret = {}
|
||||
|
||||
# for URI::split
|
||||
- ret[:ABS_URI] = Regexp.new('\A\s*' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED)
|
||||
- ret[:REL_URI] = Regexp.new('\A\s*' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED)
|
||||
+ ret[:ABS_URI] = Regexp.new('\A\s*+' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED)
|
||||
+ ret[:REL_URI] = Regexp.new('\A\s*+' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED)
|
||||
|
||||
# for URI::extract
|
||||
ret[:URI_REF] = Regexp.new(pattern[:URI_REF])
|
||||
diff --git a/test/uri/test_parser.rb b/test/uri/test_parser.rb
|
||||
index 03de137..01ed32a 100644
|
||||
--- a/test/uri/test_parser.rb
|
||||
+++ b/test/uri/test_parser.rb
|
||||
@@ -63,4 +63,16 @@ class URI::TestParser < Test::Unit::TestCase
|
||||
assert_equal("\u3042", p1.unescape('%e3%81%82'.force_encoding(Encoding::US_ASCII)))
|
||||
assert_equal("\xe3\x83\x90\xe3\x83\x90", p1.unescape("\xe3\x83\x90%e3%83%90"))
|
||||
end
|
||||
+
|
||||
+ def test_rfc2822_parse_relative_uri
|
||||
+ pre = ->(length) {
|
||||
+ " " * length + "\0"
|
||||
+ }
|
||||
+ parser = URI::RFC2396_Parser.new
|
||||
+ assert_linear_performance((1..5).map {|i| 10**i}, pre: pre) do |uri|
|
||||
+ assert_raise(URI::InvalidURIError) do
|
||||
+ parser.split(uri)
|
||||
+ end
|
||||
+ end
|
||||
+ end
|
||||
end
|
||||
--
|
||||
2.40.0
|
||||
47
meta/recipes-devtools/ruby/ruby/CVE-2023-36617_2.patch
Normal file
47
meta/recipes-devtools/ruby/ruby/CVE-2023-36617_2.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
From eea5868120509c245216c4b5c2d4b5db1c593d0e Mon Sep 17 00:00:00 2001
|
||||
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Date: Thu, 27 Jul 2023 16:16:30 +0800
|
||||
Subject: [PATCH] ruby: Fix quadratic backtracking on invalid port number
|
||||
|
||||
Upstream-Status: Backport [https://github.com/ruby/uri/commit/9d7bcef1e6ad23c9c6e4932f297fb737888144c8]
|
||||
CVE: CVE-2023-36617
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
lib/uri/rfc3986_parser.rb | 2 +-
|
||||
test/uri/test_parser.rb | 10 ++++++++++
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb
|
||||
index 3c89311..cde3ea7 100644
|
||||
--- a/lib/uri/rfc3986_parser.rb
|
||||
+++ b/lib/uri/rfc3986_parser.rb
|
||||
@@ -101,7 +101,7 @@ module URI
|
||||
QUERY: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
|
||||
FRAGMENT: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
|
||||
OPAQUE: /\A(?:[^\/].*)?\z/,
|
||||
- PORT: /\A[\x09\x0a\x0c\x0d ]*\d*[\x09\x0a\x0c\x0d ]*\z/,
|
||||
+ PORT: /\A[\x09\x0a\x0c\x0d ]*+\d*[\x09\x0a\x0c\x0d ]*\z/,
|
||||
}
|
||||
end
|
||||
|
||||
diff --git a/test/uri/test_parser.rb b/test/uri/test_parser.rb
|
||||
index 01ed32a..81c2210 100644
|
||||
--- a/test/uri/test_parser.rb
|
||||
+++ b/test/uri/test_parser.rb
|
||||
@@ -75,4 +75,14 @@ class URI::TestParser < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
end
|
||||
+
|
||||
+ def test_rfc3986_port_check
|
||||
+ pre = ->(length) {"\t" * length + "a"}
|
||||
+ uri = URI.parse("http://my.example.com")
|
||||
+ assert_linear_performance((1..5).map {|i| 10**i}, pre: pre) do |port|
|
||||
+ assert_raise(URI::InvalidComponentError) do
|
||||
+ uri.port = port
|
||||
+ end
|
||||
+ end
|
||||
+ end
|
||||
end
|
||||
--
|
||||
2.40.0
|
||||
@@ -31,6 +31,8 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
|
||||
file://0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch \
|
||||
file://CVE-2023-28756.patch \
|
||||
file://CVE-2023-28755.patch \
|
||||
file://CVE-2023-36617_1.patch \
|
||||
file://CVE-2023-36617_2.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ SRC_URI = "https://github.com/OpenPrinting/cups/releases/download/v${PV}/cups-${
|
||||
file://CVE-2023-32324.patch \
|
||||
file://CVE-2023-34241.patch \
|
||||
file://CVE-2023-32360.patch \
|
||||
file://CVE-2023-4504.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/OpenPrinting/cups/releases"
|
||||
|
||||
42
meta/recipes-extended/cups/cups/CVE-2023-4504.patch
Normal file
42
meta/recipes-extended/cups/cups/CVE-2023-4504.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
CVE: CVE-2023-4504
|
||||
Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/2431caddb7e6a87f04ac90b5c6366ad268b6ff31 ]
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
|
||||
From 2431caddb7e6a87f04ac90b5c6366ad268b6ff31 Mon Sep 17 00:00:00 2001
|
||||
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||
Date: Wed, 20 Sep 2023 14:45:17 +0200
|
||||
Subject: [PATCH] raster-interpret.c: Fix CVE-2023-4504
|
||||
|
||||
We didn't check for end of buffer if it looks there is an escaped
|
||||
character - check for NULL terminator there and if found, return NULL
|
||||
as return value and in `ptr`, because a lone backslash is not
|
||||
a valid PostScript character.
|
||||
---
|
||||
cups/raster-interpret.c | 14 +++++++++++++-
|
||||
1 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cups/raster-interpret.c b/cups/raster-interpret.c
|
||||
index 6fcf731b5..b8655c8c6 100644
|
||||
--- a/cups/raster-interpret.c
|
||||
+++ b/cups/raster-interpret.c
|
||||
@@ -1116,7 +1116,19 @@ scan_ps(_cups_ps_stack_t *st, /* I - Stack */
|
||||
|
||||
cur ++;
|
||||
|
||||
- if (*cur == 'b')
|
||||
+ /*
|
||||
+ * Return NULL if we reached NULL terminator, a lone backslash
|
||||
+ * is not a valid character in PostScript.
|
||||
+ */
|
||||
+
|
||||
+ if (!*cur)
|
||||
+ {
|
||||
+ *ptr = NULL;
|
||||
+
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+
|
||||
+ if (*cur == 'b')
|
||||
*valptr++ = '\b';
|
||||
else if (*cur == 'f')
|
||||
*valptr++ = '\f';
|
||||
28
meta/recipes-extended/gawk/gawk/CVE-2023-4156.patch
Normal file
28
meta/recipes-extended/gawk/gawk/CVE-2023-4156.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From e709eb829448ce040087a3fc5481db6bfcaae212 Mon Sep 17 00:00:00 2001
|
||||
From: "Arnold D. Robbins" <arnold@skeeve.com>
|
||||
Date: Wed, 3 Aug 2022 13:00:54 +0300
|
||||
Subject: [PATCH] Smal bug fix in builtin.c.
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/gawk/tree/debian/patches/CVE-2023-4156.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://git.savannah.gnu.org/gitweb/?p=gawk.git;a=commitdiff;h=e709eb829448ce040087a3fc5481db6bfcaae212]
|
||||
CVE: CVE-2023-4156
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
ChangeLog | 6 ++++++
|
||||
builtin.c | 5 ++++-
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
--- gawk-5.1.0.orig/builtin.c
|
||||
+++ gawk-5.1.0/builtin.c
|
||||
@@ -957,7 +957,10 @@ check_pos:
|
||||
s1++;
|
||||
n0--;
|
||||
}
|
||||
- if (val >= num_args) {
|
||||
+ // val could be less than zero if someone provides a field width
|
||||
+ // so large that it causes integer overflow. Mainly fuzzers do this,
|
||||
+ // but let's try to be good anyway.
|
||||
+ if (val < 0 || val >= num_args) {
|
||||
toofew = true;
|
||||
break;
|
||||
}
|
||||
@@ -18,6 +18,7 @@ PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
|
||||
SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
|
||||
file://remove-sensitive-tests.patch \
|
||||
file://run-ptest \
|
||||
file://CVE-2023-4156.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "6168d8d1dc8f74bd17d9dc22fa9634c49070f232343b744901da15fb4f06bffd"
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From 8b0f20002536867bd73ff4552408a72597190cbe Mon Sep 17 00:00:00 2001
|
||||
From: Ken Sharp <ken.sharp@artifex.com>
|
||||
Date: Thu, 24 Aug 2023 15:24:35 +0100
|
||||
Subject: [PATCH] IJS device - try and secure the IJS server startup
|
||||
|
||||
Bug #707051 ""ijs" device can execute arbitrary commands"
|
||||
|
||||
The problem is that the 'IJS' device needs to start the IJS server, and
|
||||
that is indeed an arbitrary command line. There is (apparently) no way
|
||||
to validate it. Indeed, this is covered quite clearly in the comments
|
||||
at the start of the source:
|
||||
|
||||
* WARNING: The ijs server can be selected on the gs command line
|
||||
* which is a security risk, since any program can be run.
|
||||
|
||||
Previously this used the awful LockSafetyParams hackery, which we
|
||||
abandoned some time ago because it simply couldn't be made secure (it
|
||||
was implemented in PostScript and was therefore vulnerable to PostScript
|
||||
programs).
|
||||
|
||||
This commit prevents PostScript programs switching to the IJS device
|
||||
after SAFER has been activated, and prevents changes to the IjsServer
|
||||
parameter after SAFER has been activated.
|
||||
|
||||
SAFER is activated, unless explicitly disabled, before any user
|
||||
PostScript is executed which means that the device and the server
|
||||
invocation can only be configured on the command line. This does at
|
||||
least provide minimal security against malicious PostScript programs.
|
||||
|
||||
Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=8b0f20002536867bd73ff4552408a72597190cbe]
|
||||
|
||||
CVE: CVE-2023-43115
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
devices/gdevijs.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/devices/gdevijs.c b/devices/gdevijs.c
|
||||
index 8cbd84b97..16f5a1752 100644
|
||||
--- a/devices/gdevijs.c
|
||||
+++ b/devices/gdevijs.c
|
||||
@@ -888,6 +888,8 @@ gsijs_initialize_device(gx_device *dev)
|
||||
static const char rgb[] = "DeviceRGB";
|
||||
gx_device_ijs *ijsdev = (gx_device_ijs *)dev;
|
||||
|
||||
+ if (ijsdev->memory->gs_lib_ctx->core->path_control_active)
|
||||
+ return_error(gs_error_invalidaccess);
|
||||
if (!ijsdev->ColorSpace) {
|
||||
ijsdev->ColorSpace = gs_malloc(ijsdev->memory, sizeof(rgb), 1,
|
||||
"gsijs_initialize");
|
||||
@@ -1326,7 +1328,7 @@ gsijs_put_params(gx_device *dev, gs_param_list *plist)
|
||||
if (code >= 0)
|
||||
code = gsijs_read_string(plist, "IjsServer",
|
||||
ijsdev->IjsServer, sizeof(ijsdev->IjsServer),
|
||||
- dev->LockSafetyParams, is_open);
|
||||
+ ijsdev->memory->gs_lib_ctx->core->path_control_active, is_open);
|
||||
|
||||
if (code >= 0)
|
||||
code = gsijs_read_string_malloc(plist, "DeviceManufacturer",
|
||||
--
|
||||
2.40.0
|
||||
@@ -38,6 +38,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
|
||||
file://CVE-2023-36664-0001.patch \
|
||||
file://CVE-2023-36664-0002.patch \
|
||||
file://CVE-2023-38559.patch \
|
||||
file://CVE-2023-43115.patch \
|
||||
"
|
||||
|
||||
SRC_URI = "${SRC_URI_BASE} \
|
||||
|
||||
36
meta/recipes-extended/shadow/files/CVE-2023-4641-0001.patch
Normal file
36
meta/recipes-extended/shadow/files/CVE-2023-4641-0001.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 58b6e97a9eef866e9e479fb781aaaf59fb11ef36 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Göttsche <cgzones@googlemail.com>
|
||||
Date: Mon Apr 25 12:17:40 2022 +0200
|
||||
Subject: [PATCH 1/2] passwd: erase password copy on all error branches
|
||||
|
||||
CVE: CVE-2023-4641
|
||||
|
||||
Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/58b6e97a9eef866e9e479fb781aaaf59fb11ef36]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/passwd.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/passwd.c b/src/passwd.c
|
||||
index 80531ec..8c6f81a 100644
|
||||
--- a/src/passwd.c
|
||||
+++ b/src/passwd.c
|
||||
@@ -289,6 +289,7 @@ static int new_password (const struct passwd *pw)
|
||||
cp = getpass (_("New password: "));
|
||||
if (NULL == cp) {
|
||||
memzero (orig, sizeof orig);
|
||||
+ memzero (pass, sizeof pass);
|
||||
return -1;
|
||||
}
|
||||
if (warned && (strcmp (pass, cp) != 0)) {
|
||||
@@ -316,6 +317,7 @@ static int new_password (const struct passwd *pw)
|
||||
cp = getpass (_("Re-enter new password: "));
|
||||
if (NULL == cp) {
|
||||
memzero (orig, sizeof orig);
|
||||
+ memzero (pass, sizeof pass);
|
||||
return -1;
|
||||
}
|
||||
if (strcmp (cp, pass) != 0) {
|
||||
--
|
||||
2.40.0
|
||||
147
meta/recipes-extended/shadow/files/CVE-2023-4641-0002.patch
Normal file
147
meta/recipes-extended/shadow/files/CVE-2023-4641-0002.patch
Normal file
@@ -0,0 +1,147 @@
|
||||
From 65c88a43a23c2391dcc90c0abda3e839e9c57904 Mon Sep 17 00:00:00 2001
|
||||
From: Alejandro Colomar <alx@kernel.org>
|
||||
Date: Sat, 10 Jun 2023 16:20:05 +0200
|
||||
Subject: [PATCH 2/2] gpasswd(1): Fix password leak
|
||||
|
||||
How to trigger this password leak?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When gpasswd(1) asks for the new password, it asks twice (as is usual
|
||||
for confirming the new password). Each of those 2 password prompts
|
||||
uses agetpass() to get the password. If the second agetpass() fails,
|
||||
the first password, which has been copied into the 'static' buffer
|
||||
'pass' via STRFCPY(), wasn't being zeroed.
|
||||
|
||||
agetpass() is defined in <./libmisc/agetpass.c> (around line 91), and
|
||||
can fail for any of the following reasons:
|
||||
|
||||
- malloc(3) or readpassphrase(3) failure.
|
||||
|
||||
These are going to be difficult to trigger. Maybe getting the system
|
||||
to the limits of memory utilization at that exact point, so that the
|
||||
next malloc(3) gets ENOMEM, and possibly even the OOM is triggered.
|
||||
About readpassphrase(3), ENFILE and EINTR seem the only plausible
|
||||
ones, and EINTR probably requires privilege or being the same user;
|
||||
but I wouldn't discard ENFILE so easily, if a process starts opening
|
||||
files.
|
||||
|
||||
- The password is longer than PASS_MAX.
|
||||
|
||||
The is plausible with physical access. However, at that point, a
|
||||
keylogger will be a much simpler attack.
|
||||
|
||||
And, the attacker must be able to know when the second password is being
|
||||
introduced, which is not going to be easy.
|
||||
|
||||
How to read the password after the leak?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Provoking the leak yourself at the right point by entering a very long
|
||||
password is easy, and inspecting the process stack at that point should
|
||||
be doable. Try to find some consistent patterns.
|
||||
|
||||
Then, search for those patterns in free memory, right after the victim
|
||||
leaks their password.
|
||||
|
||||
Once you get the leak, a program should read all the free memory
|
||||
searching for patterns that gpasswd(1) leaves nearby the leaked
|
||||
password.
|
||||
|
||||
On 6/10/23 03:14, Seth Arnold wrote:
|
||||
> An attacker process wouldn't be able to use malloc(3) for this task.
|
||||
> There's a handful of tools available for userspace to allocate memory:
|
||||
>
|
||||
> - brk / sbrk
|
||||
> - mmap MAP_ANONYMOUS
|
||||
> - mmap /dev/zero
|
||||
> - mmap some other file
|
||||
> - shm_open
|
||||
> - shmget
|
||||
>
|
||||
> Most of these return only pages of zeros to a process. Using mmap of an
|
||||
> existing file, you can get some of the contents of the file demand-loaded
|
||||
> into the memory space on the first use.
|
||||
>
|
||||
> The MAP_UNINITIALIZED flag only works if the kernel was compiled with
|
||||
> CONFIG_MMAP_ALLOW_UNINITIALIZED. This is rare.
|
||||
>
|
||||
> malloc(3) doesn't zero memory, to our collective frustration, but all the
|
||||
> garbage in the allocations is from previous allocations in the current
|
||||
> process. It isn't leftover from other processes.
|
||||
>
|
||||
> The avenues available for reading the memory:
|
||||
> - /dev/mem and /dev/kmem (requires root, not available with Secure Boot)
|
||||
> - /proc/pid/mem (requires ptrace privileges, mediated by YAMA)
|
||||
> - ptrace (requires ptrace privileges, mediated by YAMA)
|
||||
> - causing memory to be swapped to disk, and then inspecting the swap
|
||||
>
|
||||
> These all require a certain amount of privileges.
|
||||
|
||||
How to fix it?
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
memzero(), which internally calls explicit_bzero(3), or whatever
|
||||
alternative the system provides with a slightly different name, will
|
||||
make sure that the buffer is zeroed in memory, and optimizations are not
|
||||
allowed to impede this zeroing.
|
||||
|
||||
This is not really 100% effective, since compilers may place copies of
|
||||
the string somewhere hidden in the stack. Those copies won't get zeroed
|
||||
by explicit_bzero(3). However, that's arguably a compiler bug, since
|
||||
compilers should make everything possible to avoid optimizing strings
|
||||
that are later passed to explicit_bzero(3). But we all know that
|
||||
sometimes it's impossible to have perfect knowledge in the compiler, so
|
||||
this is plausible. Nevertheless, there's nothing we can do against such
|
||||
issues, except minimizing the time such passwords are stored in plain
|
||||
text.
|
||||
|
||||
Security concerns
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
We believe this isn't easy to exploit. Nevertheless, and since the fix
|
||||
is trivial, this fix should probably be applied soon, and backported to
|
||||
all supported distributions, to prevent someone else having more
|
||||
imagination than us to find a way.
|
||||
|
||||
Affected versions
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
All. Bug introduced in shadow 19990709. That's the second commit in
|
||||
the git history.
|
||||
|
||||
Fixes: 45c6603cc86c ("[svn-upgrade] Integrating new upstream version, shadow (19990709)")
|
||||
Reported-by: Alejandro Colomar <alx@kernel.org>
|
||||
Cc: Serge Hallyn <serge@hallyn.com>
|
||||
Cc: Iker Pedrosa <ipedrosa@redhat.com>
|
||||
Cc: Seth Arnold <seth.arnold@canonical.com>
|
||||
Cc: Christian Brauner <christian@brauner.io>
|
||||
Cc: Balint Reczey <rbalint@debian.org>
|
||||
Cc: Sam James <sam@gentoo.org>
|
||||
Cc: David Runge <dvzrv@archlinux.org>
|
||||
Cc: Andreas Jaeger <aj@suse.de>
|
||||
Cc: <~hallyn/shadow@lists.sr.ht>
|
||||
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
||||
|
||||
CVE: CVE-2023-4641
|
||||
|
||||
Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/65c88a43a23c2391dcc90c0abda3e839e9c57904]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/gpasswd.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/gpasswd.c b/src/gpasswd.c
|
||||
index c7c9477..00ca569 100644
|
||||
--- a/src/gpasswd.c
|
||||
+++ b/src/gpasswd.c
|
||||
@@ -896,6 +896,7 @@ static void change_passwd (struct group *gr)
|
||||
strzero (cp);
|
||||
cp = getpass (_("Re-enter new password: "));
|
||||
if (NULL == cp) {
|
||||
+ memzero (pass, sizeof pass);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
--
|
||||
2.40.0
|
||||
@@ -18,6 +18,8 @@ SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/v${PV}/${BP}
|
||||
file://useradd \
|
||||
file://CVE-2023-29383.patch \
|
||||
file://0001-Overhaul-valid_field.patch \
|
||||
file://CVE-2023-4641-0001.patch \
|
||||
file://CVE-2023-4641-0002.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-target = " \
|
||||
|
||||
165
meta/recipes-extended/xdg-utils/xdg-utils/CVE-2022-4055.patch
Normal file
165
meta/recipes-extended/xdg-utils/xdg-utils/CVE-2022-4055.patch
Normal file
@@ -0,0 +1,165 @@
|
||||
From f67c4d1f8bd2e3cbcb9eb49f5e897075e7426780 Mon Sep 17 00:00:00 2001
|
||||
From: Gabriel Corona <gabriel.corona@enst-bretagne.fr>
|
||||
Date: Thu, 25 Aug 2022 23:51:45 +0200
|
||||
Subject: [PATCH] Disable special support for Thunderbird in xdg-email (fixes
|
||||
CVE-2020-27748, CVE-2022-4055)
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/xdg/xdg-utils/-/commit/f67c4d1f8bd2e3cbcb9eb49f5e897075e7426780]
|
||||
CVE: CVE-2022-4055
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
scripts/xdg-email.in | 108 -------------------------------------------
|
||||
1 file changed, 108 deletions(-)
|
||||
|
||||
diff --git a/scripts/xdg-email.in b/scripts/xdg-email.in
|
||||
index 13ba2d5..b700679 100644
|
||||
--- a/scripts/xdg-email.in
|
||||
+++ b/scripts/xdg-email.in
|
||||
@@ -30,76 +30,8 @@ _USAGE
|
||||
|
||||
#@xdg-utils-common@
|
||||
|
||||
-run_thunderbird()
|
||||
-{
|
||||
- local THUNDERBIRD MAILTO NEWMAILTO TO CC BCC SUBJECT BODY
|
||||
- THUNDERBIRD="$1"
|
||||
- MAILTO=$(echo "$2" | sed 's/^mailto://')
|
||||
- echo "$MAILTO" | grep -qs "^?"
|
||||
- if [ "$?" = "0" ] ; then
|
||||
- MAILTO=$(echo "$MAILTO" | sed 's/^?//')
|
||||
- else
|
||||
- MAILTO=$(echo "$MAILTO" | sed 's/^/to=/' | sed 's/?/\&/')
|
||||
- fi
|
||||
-
|
||||
- MAILTO=$(echo "$MAILTO" | sed 's/&/\n/g')
|
||||
- TO=$(/bin/echo -e $(echo "$MAILTO" | grep '^to=' | sed 's/^to=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
|
||||
- CC=$(/bin/echo -e $(echo "$MAILTO" | grep '^cc=' | sed 's/^cc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
|
||||
- BCC=$(/bin/echo -e $(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }'))
|
||||
- SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
|
||||
- BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
|
||||
-
|
||||
- if [ -z "$TO" ] ; then
|
||||
- NEWMAILTO=
|
||||
- else
|
||||
- NEWMAILTO="to='$TO'"
|
||||
- fi
|
||||
- if [ -n "$CC" ] ; then
|
||||
- NEWMAILTO="${NEWMAILTO},cc='$CC'"
|
||||
- fi
|
||||
- if [ -n "$BCC" ] ; then
|
||||
- NEWMAILTO="${NEWMAILTO},bcc='$BCC'"
|
||||
- fi
|
||||
- if [ -n "$SUBJECT" ] ; then
|
||||
- NEWMAILTO="${NEWMAILTO},$SUBJECT"
|
||||
- fi
|
||||
- if [ -n "$BODY" ] ; then
|
||||
- NEWMAILTO="${NEWMAILTO},$BODY"
|
||||
- fi
|
||||
-
|
||||
- NEWMAILTO=$(echo "$NEWMAILTO" | sed 's/^,//')
|
||||
- DEBUG 1 "Running $THUNDERBIRD -compose \"$NEWMAILTO\""
|
||||
- "$THUNDERBIRD" -compose "$NEWMAILTO"
|
||||
- if [ $? -eq 0 ]; then
|
||||
- exit_success
|
||||
- else
|
||||
- exit_failure_operation_failed
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
open_kde()
|
||||
{
|
||||
- if [ -n "$KDE_SESSION_VERSION" ] && [ "$KDE_SESSION_VERSION" -ge 5 ]; then
|
||||
- local kreadconfig=kreadconfig$KDE_SESSION_VERSION
|
||||
- else
|
||||
- local kreadconfig=kreadconfig
|
||||
- fi
|
||||
-
|
||||
- if which $kreadconfig >/dev/null 2>&1; then
|
||||
- local profile=$($kreadconfig --file emaildefaults \
|
||||
- --group Defaults --key Profile)
|
||||
- if [ -n "$profile" ]; then
|
||||
- local client=$($kreadconfig --file emaildefaults \
|
||||
- --group "PROFILE_$profile" \
|
||||
- --key EmailClient \
|
||||
- | cut -d ' ' -f 1)
|
||||
-
|
||||
- if echo "$client" | grep -Eq 'thunderbird|icedove'; then
|
||||
- run_thunderbird "$client" "$1"
|
||||
- fi
|
||||
- fi
|
||||
- fi
|
||||
-
|
||||
local command
|
||||
case "$KDE_SESSION_VERSION" in
|
||||
'') command=kmailservice ;;
|
||||
@@ -130,15 +62,6 @@ open_kde()
|
||||
|
||||
open_gnome3()
|
||||
{
|
||||
- local client
|
||||
- local desktop
|
||||
- desktop=`xdg-mime query default "x-scheme-handler/mailto"`
|
||||
- client=`desktop_file_to_binary "$desktop"`
|
||||
- echo $client | grep -E 'thunderbird|icedove' > /dev/null 2>&1
|
||||
- if [ $? -eq 0 ] ; then
|
||||
- run_thunderbird "$client" "$1"
|
||||
- fi
|
||||
-
|
||||
if gio help open 2>/dev/null 1>&2; then
|
||||
DEBUG 1 "Running gio open \"$1\""
|
||||
gio open "$1"
|
||||
@@ -159,13 +82,6 @@ open_gnome3()
|
||||
|
||||
open_gnome()
|
||||
{
|
||||
- local client
|
||||
- client=`gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1` || ""
|
||||
- echo $client | grep -E 'thunderbird|icedove' > /dev/null 2>&1
|
||||
- if [ $? -eq 0 ] ; then
|
||||
- run_thunderbird "$client" "$1"
|
||||
- fi
|
||||
-
|
||||
if gio help open 2>/dev/null 1>&2; then
|
||||
DEBUG 1 "Running gio open \"$1\""
|
||||
gio open "$1"
|
||||
@@ -231,15 +147,6 @@ open_flatpak()
|
||||
|
||||
open_generic()
|
||||
{
|
||||
- local client
|
||||
- local desktop
|
||||
- desktop=`xdg-mime query default "x-scheme-handler/mailto"`
|
||||
- client=`desktop_file_to_binary "$desktop"`
|
||||
- echo $client | grep -E 'thunderbird|icedove' > /dev/null 2>&1
|
||||
- if [ $? -eq 0 ] ; then
|
||||
- run_thunderbird "$client" "$1"
|
||||
- fi
|
||||
-
|
||||
xdg-open "$1"
|
||||
local ret=$?
|
||||
|
||||
@@ -364,21 +271,6 @@ while [ $# -gt 0 ] ; do
|
||||
shift
|
||||
;;
|
||||
|
||||
- --attach)
|
||||
- if [ -z "$1" ] ; then
|
||||
- exit_failure_syntax "file argument missing for --attach option"
|
||||
- fi
|
||||
- check_input_file "$1"
|
||||
- file=`readlink -f "$1"` # Normalize path
|
||||
- if [ -z "$file" ] || [ ! -f "$file" ] ; then
|
||||
- exit_failure_file_missing "file '$1' does not exist"
|
||||
- fi
|
||||
-
|
||||
- url_encode "$file"
|
||||
- options="${options}attach=${result}&"
|
||||
- shift
|
||||
- ;;
|
||||
-
|
||||
-*)
|
||||
exit_failure_syntax "unexpected option '$parm'"
|
||||
;;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -21,6 +21,7 @@ SRC_URI = "https://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
|
||||
file://0001-Reinstate-xdg-terminal.patch \
|
||||
file://0001-Don-t-build-the-in-script-manual.patch \
|
||||
file://1f199813e0eb0246f63b54e9e154970e609575af.patch \
|
||||
file://CVE-2022-4055.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "902042508b626027a3709d105f0b63ff"
|
||||
|
||||
62
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43785.patch
Normal file
62
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43785.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From 6858d468d9ca55fb4c5fd70b223dbc78a3358a7f Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun, 17 Sep 2023 14:19:40 -0700
|
||||
Subject: [PATCH] CVE-2023-43785: out-of-bounds memory access in
|
||||
_XkbReadKeySyms()
|
||||
|
||||
Make sure we allocate enough memory in the first place, and
|
||||
also handle error returns from _XkbReadBufferCopyKeySyms() when
|
||||
it detects out-of-bounds issues.
|
||||
|
||||
Reported-by: Gregory James DUCK <gjduck@gmail.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport from [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/6858d468d9ca55fb4c5fd70b223dbc78a3358a7f]
|
||||
CVE: CVE-2023-43785
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
src/xkb/XKBGetMap.c | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
|
||||
index 2891d21..31199e4 100644
|
||||
--- a/src/xkb/XKBGetMap.c
|
||||
+++ b/src/xkb/XKBGetMap.c
|
||||
@@ -182,7 +182,8 @@ _XkbReadKeySyms(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
|
||||
if (offset + newMap->nSyms >= map->size_syms) {
|
||||
register int sz;
|
||||
|
||||
- sz = map->size_syms + 128;
|
||||
+ sz = offset + newMap->nSyms;
|
||||
+ sz = ((sz + (unsigned) 128) / 128) * 128;
|
||||
_XkbResizeArray(map->syms, map->size_syms, sz, KeySym);
|
||||
if (map->syms == NULL) {
|
||||
map->size_syms = 0;
|
||||
@@ -191,8 +192,9 @@ _XkbReadKeySyms(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
|
||||
map->size_syms = sz;
|
||||
}
|
||||
if (newMap->nSyms > 0) {
|
||||
- _XkbReadBufferCopyKeySyms(buf, (KeySym *) &map->syms[offset],
|
||||
- newMap->nSyms);
|
||||
+ if (_XkbReadBufferCopyKeySyms(buf, (KeySym *) &map->syms[offset],
|
||||
+ newMap->nSyms) == 0)
|
||||
+ return BadLength;
|
||||
offset += newMap->nSyms;
|
||||
}
|
||||
else {
|
||||
@@ -222,8 +224,10 @@ _XkbReadKeySyms(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
|
||||
newSyms = XkbResizeKeySyms(xkb, i + rep->firstKeySym, tmp);
|
||||
if (newSyms == NULL)
|
||||
return BadAlloc;
|
||||
- if (newMap->nSyms > 0)
|
||||
- _XkbReadBufferCopyKeySyms(buf, newSyms, newMap->nSyms);
|
||||
+ if (newMap->nSyms > 0) {
|
||||
+ if (_XkbReadBufferCopyKeySyms(buf, newSyms, newMap->nSyms) == 0)
|
||||
+ return BadLength;
|
||||
+ }
|
||||
else
|
||||
newSyms[0] = NoSymbol;
|
||||
oldMap->kt_index[0] = newMap->ktIndex[0];
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 204c3393c4c90a29ed6bef64e43849536e863a86 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu, 7 Sep 2023 15:54:30 -0700
|
||||
Subject: [PATCH] CVE-2023-43786: stack exhaustion from infinite recursion in
|
||||
PutSubImage()
|
||||
|
||||
When splitting a single line of pixels into chunks to send to the
|
||||
X server, be sure to take into account the number of bits per pixel,
|
||||
so we don't just loop forever trying to send more pixels than fit in
|
||||
the given request size and not breaking them down into a small enough
|
||||
chunk to fix.
|
||||
|
||||
Fixes: "almost complete rewrite" (Dec. 12, 1987) from X11R2
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport from [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/204c3393c4c90a29ed6bef64e43849536e863a86]
|
||||
CVE: CVE-2023-43786
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
src/PutImage.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/PutImage.c b/src/PutImage.c
|
||||
index 857ee91..a6db7b4 100644
|
||||
--- a/src/PutImage.c
|
||||
+++ b/src/PutImage.c
|
||||
@@ -914,8 +914,9 @@ PutSubImage (
|
||||
req_width, req_height - SubImageHeight,
|
||||
dest_bits_per_pixel, dest_scanline_pad);
|
||||
} else {
|
||||
- int SubImageWidth = (((Available << 3) / dest_scanline_pad)
|
||||
- * dest_scanline_pad) - left_pad;
|
||||
+ int SubImageWidth = ((((Available << 3) / dest_scanline_pad)
|
||||
+ * dest_scanline_pad) - left_pad)
|
||||
+ / dest_bits_per_pixel;
|
||||
|
||||
PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
|
||||
(unsigned int) SubImageWidth, 1,
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 73a37d5f2fcadd6540159b432a70d80f442ddf4a Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu, 7 Sep 2023 15:55:04 -0700
|
||||
Subject: [PATCH] XPutImage: clip images to maximum height & width allowed by
|
||||
protocol
|
||||
|
||||
The PutImage request specifies height & width of the image as CARD16
|
||||
(unsigned 16-bit integer), same as the maximum dimensions of an X11
|
||||
Drawable, which the image is being copied to.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport from [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/73a37d5f2fcadd6540159b432a70d80f442ddf4a]
|
||||
CVE: CVE-2023-43786
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
src/PutImage.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/PutImage.c b/src/PutImage.c
|
||||
index a6db7b4..ba411e3 100644
|
||||
--- a/src/PutImage.c
|
||||
+++ b/src/PutImage.c
|
||||
@@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include "Xlibint.h"
|
||||
#include "Xutil.h"
|
||||
#include <stdio.h>
|
||||
+#include <limits.h>
|
||||
#include "Cr.h"
|
||||
#include "ImUtil.h"
|
||||
#include "reallocarray.h"
|
||||
@@ -962,6 +963,10 @@ XPutImage (
|
||||
height = image->height - req_yoffset;
|
||||
if ((width <= 0) || (height <= 0))
|
||||
return 0;
|
||||
+ if (width > USHRT_MAX)
|
||||
+ width = USHRT_MAX;
|
||||
+ if (height > USHRT_MAX)
|
||||
+ height = USHRT_MAX;
|
||||
|
||||
if ((image->bits_per_pixel == 1) || (image->format != ZPixmap)) {
|
||||
dest_bits_per_pixel = 1;
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From b4031fc023816aca07fbd592ed97010b9b48784b Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu, 7 Sep 2023 16:12:27 -0700
|
||||
Subject: [PATCH] XCreatePixmap: trigger BadValue error for out-of-range
|
||||
dimensions
|
||||
|
||||
The CreatePixmap request specifies height & width of the image as CARD16
|
||||
(unsigned 16-bit integer), so if either is larger than that, set it to 0
|
||||
so the X server returns a BadValue error as the protocol requires.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport from [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/b4031fc023816aca07fbd592ed97010b9b48784b]
|
||||
CVE: CVE-2023-43786
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
src/CrPixmap.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/src/CrPixmap.c b/src/CrPixmap.c
|
||||
index cdf3120..3cb2ca6 100644
|
||||
--- a/src/CrPixmap.c
|
||||
+++ b/src/CrPixmap.c
|
||||
@@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "Xlibint.h"
|
||||
+#include <limits.h>
|
||||
|
||||
#ifdef USE_DYNAMIC_XCURSOR
|
||||
void
|
||||
@@ -47,6 +48,16 @@ Pixmap XCreatePixmap (
|
||||
Pixmap pid;
|
||||
register xCreatePixmapReq *req;
|
||||
|
||||
+ /*
|
||||
+ * Force a BadValue X Error if the requested dimensions are larger
|
||||
+ * than the X11 protocol has room for, since that's how callers expect
|
||||
+ * to get notified of errors.
|
||||
+ */
|
||||
+ if (width > USHRT_MAX)
|
||||
+ width = 0;
|
||||
+ if (height > USHRT_MAX)
|
||||
+ height = 0;
|
||||
+
|
||||
LockDisplay(dpy);
|
||||
GetReq(CreatePixmap, req);
|
||||
req->drawable = d;
|
||||
--
|
||||
2.35.7
|
||||
|
||||
63
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43787.patch
Normal file
63
meta/recipes-graphics/xorg-lib/libx11/CVE-2023-43787.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
From 7916869d16bdd115ac5be30a67c3749907aea6a0 Mon Sep 17 00:00:00 2001
|
||||
From: Yair Mizrahi <yairm@jfrog.com>
|
||||
Date: Thu, 7 Sep 2023 16:15:32 -0700
|
||||
Subject: [PATCH] CVE-2023-43787: Integer overflow in XCreateImage() leading to
|
||||
a heap overflow
|
||||
|
||||
When the format is `Pixmap` it calculates the size of the image data as:
|
||||
ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
|
||||
There is no validation on the `width` of the image, and so this
|
||||
calculation exceeds the capacity of a 4-byte integer, causing an overflow.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
Upstream-Status: Backport from [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/7916869d16bdd115ac5be30a67c3749907aea6a0]
|
||||
CVE: CVE-2023-43787
|
||||
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
|
||||
---
|
||||
src/ImUtil.c | 20 +++++++++++++++-----
|
||||
1 file changed, 15 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/ImUtil.c b/src/ImUtil.c
|
||||
index 36f08a0..fbfad33 100644
|
||||
--- a/src/ImUtil.c
|
||||
+++ b/src/ImUtil.c
|
||||
@@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <stdio.h>
|
||||
+#include <limits.h>
|
||||
#include "ImUtil.h"
|
||||
|
||||
static int _XDestroyImage(XImage *);
|
||||
@@ -361,13 +362,22 @@ XImage *XCreateImage (
|
||||
/*
|
||||
* compute per line accelerator.
|
||||
*/
|
||||
- {
|
||||
- if (format == ZPixmap)
|
||||
+ if (format == ZPixmap) {
|
||||
+ if ((INT_MAX / bits_per_pixel) < width) {
|
||||
+ Xfree(image);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
min_bytes_per_line =
|
||||
- ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
|
||||
- else
|
||||
+ ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
|
||||
+ } else {
|
||||
+ if ((INT_MAX - offset) < width) {
|
||||
+ Xfree(image);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
min_bytes_per_line =
|
||||
- ROUNDUP((width + offset), image->bitmap_pad);
|
||||
+ ROUNDUP((width + offset), image->bitmap_pad);
|
||||
}
|
||||
if (image_bytes_per_line == 0) {
|
||||
image->bytes_per_line = min_bytes_per_line;
|
||||
--
|
||||
2.35.7
|
||||
|
||||
@@ -18,6 +18,11 @@ SRC_URI += "file://disable_tests.patch \
|
||||
file://CVE-2022-3554.patch \
|
||||
file://CVE-2022-3555.patch \
|
||||
file://CVE-2023-3138.patch \
|
||||
file://CVE-2023-43785.patch \
|
||||
file://CVE-2023-43786-0001.patch \
|
||||
file://CVE-2023-43786-0002.patch \
|
||||
file://CVE-2023-43786-0003.patch \
|
||||
file://CVE-2023-43787.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "2ffd417266fb875028fdc0ef349694f63dbcd76d0b0cfacfb52e6151f4b60989"
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ PACKAGES =+ "sxpm cxpm"
|
||||
FILES:cxpm = "${bindir}/cxpm"
|
||||
FILES:sxpm = "${bindir}/sxpm"
|
||||
|
||||
SRC_URI[sha256sum] = "e6bc5da7a69dbd9bcc67e87c93d4904fe2f5177a0711c56e71fa2f6eff649f51"
|
||||
SRC_URI[sha256sum] = "64b31f81019e7d388c822b0b28af8d51c4622b83f1f0cb6fa3fc95e271226e43"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -28,6 +28,8 @@ CVE_CHECK_IGNORE += "CVE-2011-4613"
|
||||
# impossible or difficult to exploit. There is currently no upstream patch
|
||||
# available for this flaw.
|
||||
CVE_CHECK_IGNORE += "CVE-2020-25697"
|
||||
# This is specific to XQuartz, which is the macOS X server port
|
||||
CVE_CHECK_IGNORE += "CVE-2022-3553"
|
||||
|
||||
S = "${WORKDIR}/${XORG_PN}-${PV}"
|
||||
|
||||
|
||||
@@ -12,12 +12,15 @@ LICENSE = "\
|
||||
& Firmware-amdgpu \
|
||||
& Firmware-amd-ucode \
|
||||
& Firmware-amlogic_vdec \
|
||||
& Firmware-amphion_vpu \
|
||||
& Firmware-atheros_firmware \
|
||||
& Firmware-atmel \
|
||||
& Firmware-broadcom_bcm43xx \
|
||||
& Firmware-ca0132 \
|
||||
& Firmware-cavium \
|
||||
& Firmware-chelsio_firmware \
|
||||
& Firmware-cirrus \
|
||||
& Firmware-cnm \
|
||||
& Firmware-cw1200 \
|
||||
& Firmware-cypress \
|
||||
& Firmware-dib0700 \
|
||||
@@ -30,16 +33,20 @@ LICENSE = "\
|
||||
& Firmware-i915 \
|
||||
& Firmware-ibt_firmware \
|
||||
& Firmware-ice \
|
||||
& Firmware-ice_enhanced \
|
||||
& Firmware-it913x \
|
||||
& Firmware-iwlwifi_firmware \
|
||||
& Firmware-IntcSST2 \
|
||||
& Firmware-kaweth \
|
||||
& Firmware-Lontium \
|
||||
& Firmware-Marvell \
|
||||
& Firmware-mediatek \
|
||||
& Firmware-microchip \
|
||||
& Firmware-moxa \
|
||||
& Firmware-myri10ge_firmware \
|
||||
& Firmware-netronome \
|
||||
& Firmware-nvidia \
|
||||
& Firmware-nxp_mc_firmware \
|
||||
& Firmware-OLPC \
|
||||
& Firmware-ath9k-htc \
|
||||
& Firmware-phanfw \
|
||||
@@ -74,6 +81,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENSE.amdgpu;md5=a2589a05ea5b6bd2b7f4f623c7e7a649 \
|
||||
file://LICENSE.amd-ucode;md5=6ca90c57f7b248de1e25c7f68ffc4698 \
|
||||
file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \
|
||||
file://LICENSE.amphion_vpu;md5=2bcdc00527b2d0542bd92b52aaec2b60 \
|
||||
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
|
||||
file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \
|
||||
file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
|
||||
@@ -81,6 +89,8 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENCE.cadence;md5=009f46816f6956cfb75ede13d3e1cee0 \
|
||||
file://LICENCE.cavium;md5=c37aaffb1ebe5939b2580d073a95daea \
|
||||
file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \
|
||||
file://LICENSE.cirrus;md5=bb18d943382abf8e8232a9407bfdafe0 \
|
||||
file://LICENCE.cnm;md5=93b67e6bac7f8fec22b96b8ad0a1a9d0 \
|
||||
file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed \
|
||||
file://LICENCE.cypress;md5=48cd9436c763bf873961f9ed7b5c147b \
|
||||
file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \
|
||||
@@ -93,6 +103,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENSE.i915;md5=2b0b2e0d20984affd4490ba2cba02570 \
|
||||
file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \
|
||||
file://LICENSE.ice;md5=742ab4850f2670792940e6d15c974b2f \
|
||||
file://LICENSE.ice_enhanced;md5=f305cfc31b64f95f774f9edd9df0224d \
|
||||
file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
|
||||
file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \
|
||||
file://LICENCE.iwlwifi_firmware;md5=2ce6786e0fc11ac6e36b54bb9b799f1b \
|
||||
@@ -100,11 +111,13 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
file://LICENSE.Lontium;md5=4ec8dc582ff7295f39e2ca6a7b0be2b6 \
|
||||
file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \
|
||||
file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \
|
||||
file://LICENCE.microchip;md5=db753b00305675dfbf120e3f24a47277 \
|
||||
file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
|
||||
file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
|
||||
file://LICENCE.Netronome;md5=4add08f2577086d44447996503cddf5f \
|
||||
file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \
|
||||
file://LICENCE.NXP;md5=58bb8ba632cd729b9ba6183bc6aed36f \
|
||||
file://LICENSE.nxp_mc_firmware;md5=9dc97e4b279b3858cae8879ae2fe5dd7 \
|
||||
file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
|
||||
file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
|
||||
file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
|
||||
@@ -134,7 +147,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
|
||||
"
|
||||
# WHENCE checksum is defined separately to ease overriding it if
|
||||
# class-devupstream is selected.
|
||||
WHENCE_CHKSUM = "57bf874056926f12aec2405d3fc390d9"
|
||||
WHENCE_CHKSUM = "41f9a48bf27971b126a36f9344594dcd"
|
||||
|
||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
||||
# so that the license files will be copied from fetched source
|
||||
@@ -144,6 +157,7 @@ NO_GENERIC_LICENSE[Firmware-agere] = "LICENCE.agere"
|
||||
NO_GENERIC_LICENSE[Firmware-amdgpu] = "LICENSE.amdgpu"
|
||||
NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode"
|
||||
NO_GENERIC_LICENSE[Firmware-amlogic_vdec] = "LICENSE.amlogic_vdec"
|
||||
NO_GENERIC_LICENSE[Firmware-amphion_vpu] = "LICENSE.amphion_vpu"
|
||||
NO_GENERIC_LICENSE[Firmware-atheros_firmware] = "LICENCE.atheros_firmware"
|
||||
NO_GENERIC_LICENSE[Firmware-atmel] = "LICENSE.atmel"
|
||||
NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx] = "LICENCE.broadcom_bcm43xx"
|
||||
@@ -151,6 +165,8 @@ NO_GENERIC_LICENSE[Firmware-ca0132] = "LICENCE.ca0132"
|
||||
NO_GENERIC_LICENSE[Firmware-cadence] = "LICENCE.cadence"
|
||||
NO_GENERIC_LICENSE[Firmware-cavium] = "LICENCE.cavium"
|
||||
NO_GENERIC_LICENSE[Firmware-chelsio_firmware] = "LICENCE.chelsio_firmware"
|
||||
NO_GENERIC_LICENSE[Firmware-cirrus] = "LICENSE.cirrus"
|
||||
NO_GENERIC_LICENSE[Firmware-cnm] = "LICENCE.cnm"
|
||||
NO_GENERIC_LICENSE[Firmware-cw1200] = "LICENCE.cw1200"
|
||||
NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress"
|
||||
NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700"
|
||||
@@ -163,6 +179,7 @@ NO_GENERIC_LICENSE[Firmware-hfi1_firmware] = "LICENSE.hfi1_firmware"
|
||||
NO_GENERIC_LICENSE[Firmware-i915] = "LICENSE.i915"
|
||||
NO_GENERIC_LICENSE[Firmware-ibt_firmware] = "LICENCE.ibt_firmware"
|
||||
NO_GENERIC_LICENSE[Firmware-ice] = "LICENSE.ice"
|
||||
NO_GENERIC_LICENSE[Firmware-ice_enhanced] = "LICENSE.ice_enhanced"
|
||||
NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2"
|
||||
NO_GENERIC_LICENSE[Firmware-it913x] = "LICENCE.it913x"
|
||||
NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware"
|
||||
@@ -170,10 +187,12 @@ NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth"
|
||||
NO_GENERIC_LICENSE[Firmware-Lontium] = "LICENSE.Lontium"
|
||||
NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell"
|
||||
NO_GENERIC_LICENSE[Firmware-mediatek] = "LICENCE.mediatek"
|
||||
NO_GENERIC_LICENSE[Firmware-microchip] = "LICENCE.microchip"
|
||||
NO_GENERIC_LICENSE[Firmware-moxa] = "LICENCE.moxa"
|
||||
NO_GENERIC_LICENSE[Firmware-myri10ge_firmware] = "LICENCE.myri10ge_firmware"
|
||||
NO_GENERIC_LICENSE[Firmware-netronome] = "LICENCE.Netronome"
|
||||
NO_GENERIC_LICENSE[Firmware-nvidia] = "LICENCE.nvidia"
|
||||
NO_GENERIC_LICENSE[Firmware-nxp_mc_firmware] = "LICENSE.nxp_mc_firmware"
|
||||
NO_GENERIC_LICENSE[Firmware-OLPC] = "LICENCE.OLPC"
|
||||
NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware"
|
||||
NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw"
|
||||
@@ -212,7 +231,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
|
||||
# Pin this to the 20220509 release, override this in local.conf
|
||||
SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
|
||||
|
||||
SRC_URI[sha256sum] = "87597111c0d4b71b31e53cb85a92c386921b84c825a402db8c82e0e86015500d"
|
||||
SRC_URI[sha256sum] = "88d46c543847ee3b03404d4941d91c92974690ee1f6fdcbee9cef3e5f97db688"
|
||||
|
||||
inherit allarch
|
||||
|
||||
@@ -228,14 +247,22 @@ do_install() {
|
||||
}
|
||||
|
||||
|
||||
PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
|
||||
PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \
|
||||
${PN}-cw1200-license ${PN}-cw1200 \
|
||||
${PN}-ralink-license ${PN}-ralink \
|
||||
${PN}-mt7601u-license ${PN}-mt7601u \
|
||||
${PN}-mt7650-license ${PN}-mt7650 \
|
||||
${PN}-mt76x2-license ${PN}-mt76x2 \
|
||||
${PN}-radeon-license ${PN}-radeon \
|
||||
${PN}-amdgpu-license ${PN}-amdgpu \
|
||||
${PN}-marvell-license ${PN}-pcie8897 ${PN}-pcie8997 \
|
||||
${PN}-mediatek-license ${PN}-mediatek \
|
||||
${PN}-microchip-license ${PN}-microchip \
|
||||
${PN}-moxa-license ${PN}-moxa \
|
||||
${PN}-sd8686 ${PN}-sd8688 ${PN}-sd8787 ${PN}-sd8797 ${PN}-sd8801 \
|
||||
${PN}-sd8887 ${PN}-sd8897 ${PN}-sd8997 ${PN}-usb8997 \
|
||||
${PN}-ti-connectivity-license ${PN}-wlcommon ${PN}-wl12xx ${PN}-wl18xx \
|
||||
${PN}-ti-keystone-license ${PN}-ti-keystone \
|
||||
${PN}-vt6656-license ${PN}-vt6656 \
|
||||
${PN}-rs9113 ${PN}-rs9116 \
|
||||
${PN}-rtl-license ${PN}-rtl8188 ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su ${PN}-rtl8723 ${PN}-rtl8821 \
|
||||
@@ -277,7 +304,9 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
|
||||
${PN}-bcm4373 \
|
||||
${PN}-bcm43xx \
|
||||
${PN}-bcm43xx-hdr \
|
||||
${PN}-atheros-license ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k ${PN}-ath3k \
|
||||
${PN}-cirrus-license ${PN}-cirrus \
|
||||
${PN}-cnm-license ${PN}-cnm \
|
||||
${PN}-atheros-license ${PN}-ar5523 ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k ${PN}-ath3k \
|
||||
${PN}-gplv2-license ${PN}-carl9170 \
|
||||
${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k ${PN}-ath11k ${PN}-qca \
|
||||
\
|
||||
@@ -303,13 +332,17 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
|
||||
${PN}-ibt-misc \
|
||||
${PN}-i915-license ${PN}-i915 \
|
||||
${PN}-ice-license ${PN}-ice \
|
||||
${PN}-ice-enhanced-license ${PN}-ice-enhanced \
|
||||
${PN}-adsp-sst-license ${PN}-adsp-sst \
|
||||
${PN}-bnx2-mips \
|
||||
${PN}-liquidio \
|
||||
${PN}-nvidia-license \
|
||||
${PN}-nvidia-tegra-k1 ${PN}-nvidia-tegra \
|
||||
${PN}-nvidia-gpu \
|
||||
${PN}-nxp-mc-license ${PN}-nxp-mc \
|
||||
${PN}-netronome-license ${PN}-netronome \
|
||||
${PN}-olpc-license ${PN}-olpc \
|
||||
${PN}-phanfw-license ${PN}-phanfw \
|
||||
${PN}-qat ${PN}-qat-license \
|
||||
${PN}-qcom-license ${PN}-qcom-yamato-license \
|
||||
${PN}-qcom-venus-1.8 ${PN}-qcom-venus-4.2 ${PN}-qcom-venus-5.2 ${PN}-qcom-venus-5.4 \
|
||||
@@ -325,13 +358,38 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
|
||||
${PN}-qcom-sc8280xp-lenovo-x13s-sensors \
|
||||
${PN}-qcom-sdm845-adreno ${PN}-qcom-sdm845-audio ${PN}-qcom-sdm845-compute ${PN}-qcom-sdm845-modem \
|
||||
${PN}-qcom-sm8250-adreno ${PN}-qcom-sm8250-audio ${PN}-qcom-sm8250-compute \
|
||||
${PN}-qla2xxx ${PN}-qla2xxx-license \
|
||||
${PN}-amlogic-vdec-license ${PN}-amlogic-vdec \
|
||||
${PN}-lt9611uxc ${PN}-lontium-license \
|
||||
${PN}-whence-license \
|
||||
${PN}-wl1251-license ${PN}-wl1251 \
|
||||
${PN}-xc4000-license ${PN}-xc4000 \
|
||||
${PN}-xc5000-license ${PN}-xc5000 \
|
||||
${PN}-xc5000c-license ${PN}-xc5000c \
|
||||
${PN}-license \
|
||||
"
|
||||
|
||||
# For Amphion VPU
|
||||
LICENSE:${PN}-amphion-vpu = "Firmware-amphion_vpu"
|
||||
LICENSE:${PN}-amphion-vpu-license = "Firmware-amphion_vpu"
|
||||
|
||||
FILES:${PN}-amphion-vpu = "${nonarch_base_libdir}/firmware/amphion/*"
|
||||
FILES:${PN}-amphion-vpu-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENSE.amphion_vpu \
|
||||
"
|
||||
RDEPENDS:${PN}-amphion-vpu += "${PN}-amphion-vpu-license"
|
||||
|
||||
# For cw1200
|
||||
LICENSE:${PN}-cw1200 = "Firmware-cw1200"
|
||||
LICENSE:${PN}-cw1200-license = "Firmware-cw1200"
|
||||
|
||||
FILES:${PN}-cw1200 = "${nonarch_base_libdir}/firmware/wsm_22.bin"
|
||||
FILES:${PN}-cw1200-license = "${nonarch_base_libdir}/firmware/LICENCE.cw1200"
|
||||
|
||||
RDEPENDS:${PN}-cw1200 += "${PN}-cw1200-license"
|
||||
|
||||
# For atheros
|
||||
LICENSE:${PN}-ar5523 = "Firmware-atheros_firmware"
|
||||
LICENSE:${PN}-ar9170 = "Firmware-atheros_firmware"
|
||||
LICENSE:${PN}-ath3k = "Firmware-atheros_firmware"
|
||||
LICENSE:${PN}-ath6k = "Firmware-atheros_firmware"
|
||||
@@ -339,6 +397,9 @@ LICENSE:${PN}-ath9k = "Firmware-atheros_firmware"
|
||||
LICENSE:${PN}-atheros-license = "Firmware-atheros_firmware"
|
||||
|
||||
FILES:${PN}-atheros-license = "${nonarch_base_libdir}/firmware/LICENCE.atheros_firmware"
|
||||
FILES:${PN}-ar5523 = " \
|
||||
${nonarch_base_libdir}/firmware/ar5523.bin \
|
||||
"
|
||||
FILES:${PN}-ar9170 = " \
|
||||
${nonarch_base_libdir}/firmware/ar9170*.fw \
|
||||
"
|
||||
@@ -357,6 +418,7 @@ FILES:${PN}-ath9k = " \
|
||||
${nonarch_base_libdir}/firmware/ath9k_htc/htc_9271-1.4.0.fw \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN}-ar5523 += "${PN}-atheros-license"
|
||||
RDEPENDS:${PN}-ar9170 += "${PN}-atheros-license"
|
||||
RDEPENDS:${PN}-ath6k += "${PN}-atheros-license"
|
||||
RDEPENDS:${PN}-ath9k += "${PN}-atheros-license"
|
||||
@@ -420,11 +482,73 @@ LICENSE:${PN}-mt7601u-license = "Firmware-ralink_a_mediatek_company_firmware"
|
||||
FILES:${PN}-mt7601u-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware"
|
||||
FILES:${PN}-mt7601u = " \
|
||||
${nonarch_base_libdir}/firmware/mediatek/mt7601u.bin \
|
||||
${nonarch_base_libdir}/firmware/mt7601u.bin \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN}-mt7601u += "${PN}-mt7601u-license"
|
||||
|
||||
# For MediaTek Bluetooth USB driver 7650
|
||||
LICENSE:${PN}-mt7650 = "Firmware-ralink_a_mediatek_company_firmware"
|
||||
LICENSE:${PN}-mt7650-license = "Firmware-ralink_a_mediatek_company_firmware"
|
||||
|
||||
FILES:${PN}-mt7650-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware \
|
||||
"
|
||||
FILES:${PN}-mt7650 = " \
|
||||
${nonarch_base_libdir}/firmware/mediatek/mt7650.bin \
|
||||
${nonarch_base_libdir}/firmware/mt7650.bin \
|
||||
"
|
||||
RDEPENDS:${PN}-mt7650 += "${PN}-mt7650-license"
|
||||
|
||||
# For MediaTek MT76x2 Wireless MACs
|
||||
LICENSE:${PN}-mt76x2 = "Firmware-ralink_a_mediatek_company_firmware"
|
||||
LICENSE:${PN}-mt76x2-license = "Firmware-ralink_a_mediatek_company_firmware"
|
||||
|
||||
FILES:${PN}-mt76x2-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware \
|
||||
"
|
||||
FILES:${PN}-mt76x2 = " \
|
||||
${nonarch_base_libdir}/firmware/mediatek/mt7662.bin \
|
||||
${nonarch_base_libdir}/firmware/mt7662.bin \
|
||||
${nonarch_base_libdir}/firmware/mediatek/mt7662_rom_patch.bin \
|
||||
${nonarch_base_libdir}/firmware/mt7662_rom_patch.bin \
|
||||
"
|
||||
RDEPENDS:${PN}-mt76x2 += "${PN}-mt76x2-license"
|
||||
|
||||
# For MediaTek
|
||||
LICENSE:${PN}-mediatek = "Firmware-mediatek"
|
||||
LICENSE:${PN}-mediatek-license = "Firmware-mediatek"
|
||||
|
||||
FILES:${PN}-mediatek = " \
|
||||
${nonarch_base_libdir}/firmware/mediatek/* \
|
||||
${nonarch_base_libdir}/firmware/vpu_d.bin \
|
||||
${nonarch_base_libdir}/firmware/vpu_p.bin \
|
||||
"
|
||||
FILES:${PN}-mediatek-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENCE.mediatek \
|
||||
"
|
||||
RDEPENDS:${PN}-mediatek += "${PN}-mediatek-license"
|
||||
|
||||
# For Microchip
|
||||
LICENSE:${PN}-microchip = "Firmware-microchip"
|
||||
LICENSE:${PN}-microchip-license = "Firmware-microchip"
|
||||
|
||||
FILES:${PN}-microchip = "${nonarch_base_libdir}/firmware/microchip/*"
|
||||
FILES:${PN}-microchip-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENCE.microchip \
|
||||
"
|
||||
RDEPENDS:${PN}-microchip += "${PN}-microchip-license"
|
||||
|
||||
# For MOXA
|
||||
LICENSE:${PN}-moxa = "Firmware-moxa"
|
||||
LICENSE:${PN}-moxa-license = "Firmware-moxa"
|
||||
|
||||
FILES:${PN}-moxa = "${nonarch_base_libdir}/firmware/moxa"
|
||||
FILES:${PN}-moxa-license = "${nonarch_base_libdir}/firmware/LICENCE.moxa"
|
||||
|
||||
RDEPENDS:${PN}-moxa += "${PN}-moxa-license"
|
||||
|
||||
# For radeon
|
||||
|
||||
LICENSE:${PN}-radeon = "Firmware-radeon"
|
||||
LICENSE:${PN}-radeon-license = "Firmware-radeon"
|
||||
|
||||
@@ -543,6 +667,16 @@ FILES:${PN}-netronome = " \
|
||||
|
||||
RDEPENDS:${PN}-netronome += "${PN}-netronome-license"
|
||||
|
||||
# For nxp-mc
|
||||
LICENSE:${PN}-nxp-mc = "Firmware-nxp_mc_firmware"
|
||||
LICENSE:${PN}-nxp-mc-license = "Firmware-nxp_mc_firmware"
|
||||
|
||||
FILES:${PN}-nxp-mc= "${nonarch_base_libdir}/firmware/dpaa2/mc/*"
|
||||
FILES:${PN}-nxp-mc-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENSE.nxp_mc_firmware \
|
||||
"
|
||||
RDEPENDS:${PN}-nxp-mc += "${PN}-nxp-mc-license"
|
||||
|
||||
# For Nvidia
|
||||
LICENSE:${PN}-nvidia-gpu = "Firmware-nvidia"
|
||||
LICENSE:${PN}-nvidia-tegra = "Firmware-nvidia"
|
||||
@@ -565,6 +699,37 @@ RDEPENDS:${PN}-nvidia-gpu += "${PN}-nvidia-license"
|
||||
RDEPENDS:${PN}-nvidia-tegra += "${PN}-nvidia-license"
|
||||
RDEPENDS:${PN}-nvidia-tegra-k1 += "${PN}-nvidia-license"
|
||||
|
||||
# For OLPC
|
||||
LICENSE:${PN}-olpc = "Firmware-OLPC"
|
||||
LICENSE:${PN}-olpc-license = "Firmware-OLPC"
|
||||
|
||||
FILES:${PN}-olpc = " \
|
||||
${nonarch_base_libdir}/firmware/libertas/lbtf_sdio.bin \
|
||||
${nonarch_base_libdir}/firmware/lbtf_usb.bin \
|
||||
${nonarch_base_libdir}/firmware/libertas/usb8388_olpc.bin \
|
||||
"
|
||||
FILES:${PN}-olpc-license = "${nonarch_base_libdir}/firmware/LICENCE.OLPC"
|
||||
|
||||
RDEPENDS:${PN}-olpc += "${PN}-olpc-license"
|
||||
|
||||
# For phanfw
|
||||
LICENSE:${PN}-phanfw = "Firmware-phanfw"
|
||||
LICENSE:${PN}-phanfw-license = "Firmware-phanfw"
|
||||
|
||||
FILES:${PN}-phanfw = "${nonarch_base_libdir}/firmware/phanfw.bin"
|
||||
FILES:${PN}-phanfw-license = "${nonarch_base_libdir}/firmware/LICENCE.phanfw"
|
||||
|
||||
RDEPENDS:${PN}-phanfw += "${PN}-phanfw-license"
|
||||
|
||||
# For qla2xxx
|
||||
LICENSE:${PN}-qla2xxx = "Firmware-qla2xxx"
|
||||
LICENSE:${PN}-qla2xxx-license = "Firmware-qla2xxx"
|
||||
|
||||
FILES:${PN}-qla2xxx = "${nonarch_base_libdir}/firmware/ql2*"
|
||||
FILES:${PN}-qla2xxx-license = "${nonarch_base_libdir}/firmware/LICENCE.qla2xxx"
|
||||
|
||||
RDEPENDS:${PN}-qla2xxx += "${PN}-qla2xxx-license"
|
||||
|
||||
# For RSI RS911x WiFi
|
||||
LICENSE:${PN}-rs9113 = "WHENCE"
|
||||
LICENSE:${PN}-rs9116 = "WHENCE"
|
||||
@@ -630,6 +795,18 @@ RDEPENDS:${PN}-rtl8761 += "${PN}-rtl-license"
|
||||
RDEPENDS:${PN}-rtl8822 += "${PN}-rtl-license"
|
||||
RDEPENDS:${PN}-rtl8168 += "${PN}-whence-license"
|
||||
|
||||
# For TI wl1251
|
||||
LICENSE:${PN}-wl1251 = "Firmware-wl1251"
|
||||
LICENSE:${PN}-wl1251-license = "Firmware-wl1251"
|
||||
|
||||
FILES:${PN}-wl1251 = " \
|
||||
${nonarch_base_libdir}/firmware/ti-connectivity/wl1251-fw.bin \
|
||||
${nonarch_base_libdir}/firmware/ti-connectivity/wl1251-nvs.bin \
|
||||
"
|
||||
FILES:${PN}-wl1251-license = "${nonarch_base_libdir}/firmware/LICENCE.wl1251"
|
||||
|
||||
RDEPENDS:${PN}-wl1251 += "${PN}-wl1251-license"
|
||||
|
||||
# For ti-connectivity
|
||||
LICENSE:${PN}-wlcommon = "Firmware-ti-connectivity"
|
||||
LICENSE:${PN}-wl12xx = "Firmware-ti-connectivity"
|
||||
@@ -659,6 +836,16 @@ FILES:${PN}-wl18xx = " \
|
||||
RDEPENDS:${PN}-wl12xx = "${PN}-ti-connectivity-license ${PN}-wlcommon"
|
||||
RDEPENDS:${PN}-wl18xx = "${PN}-ti-connectivity-license ${PN}-wlcommon"
|
||||
|
||||
# For ti-keystone
|
||||
LICENSE:${PN}-ti-keystone = "Firmware-ti-keystone"
|
||||
LICENSE:${PN}-ti-keystone-license = "Firmware-ti-keystone"
|
||||
|
||||
FILES:${PN}-ti-keystone = "${nonarch_base_libdir}/firmware/ti-keystone/*"
|
||||
FILES:${PN}-ti-keystone-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENCE.ti-keystone \
|
||||
"
|
||||
RDEPENDS:${PN}-ti-keystone += "${PN}-ti-keystone-license"
|
||||
|
||||
# For vt6656
|
||||
LICENSE:${PN}-vt6656 = "Firmware-via_vt6656"
|
||||
LICENSE:${PN}-vt6656-license = "Firmware-via_vt6656"
|
||||
@@ -670,6 +857,35 @@ FILES:${PN}-vt6656 = " \
|
||||
|
||||
RDEPENDS:${PN}-vt6656 = "${PN}-vt6656-license"
|
||||
|
||||
# For xc4000
|
||||
LICENSE:${PN}-xc4000 = "Firmware-xc4000"
|
||||
LICENSE:${PN}-xc4000-license = "Firmware-xc4000"
|
||||
|
||||
FILES:${PN}-xc4000 = "${nonarch_base_libdir}/firmware/dvb-fe-xc4000-1.4.1.fw"
|
||||
FILES:${PN}-xc4000-license = "${nonarch_base_libdir}/firmware/LICENCE.xc4000"
|
||||
|
||||
RDEPENDS:${PN}-xc4000 += "${PN}-xc4000-license"
|
||||
|
||||
# For xc5000
|
||||
LICENSE:${PN}-xc5000 = "Firmware-xc5000"
|
||||
LICENSE:${PN}-xc5000-license = "Firmware-xc5000"
|
||||
|
||||
FILES:${PN}-xc5000 = "${nonarch_base_libdir}/firmware/dvb-fe-xc5000-1.6.114.fw"
|
||||
FILES:${PN}-xc5000-license = "${nonarch_base_libdir}/firmware/LICENCE.xc5000"
|
||||
|
||||
RDEPENDS:${PN}-xc5000 += "${PN}-xc5000-license"
|
||||
|
||||
# For xc5000c
|
||||
LICENSE:${PN}-xc5000c = "Firmware-xc5000c"
|
||||
LICENSE:${PN}-xc5000c-license = "Firmware-xc5000c"
|
||||
|
||||
FILES:${PN}-xc5000c = " \
|
||||
${nonarch_base_libdir}/firmware/dvb-fe-xc5000c-4.1.30.7.fw \
|
||||
"
|
||||
FILES:${PN}-xc5000c-license = "${nonarch_base_libdir}/firmware/LICENCE.xc5000c"
|
||||
|
||||
RDEPENDS:${PN}-xc5000c += "${PN}-xc5000c-license"
|
||||
|
||||
# For broadcom
|
||||
|
||||
# for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e " \${PN}-$pkg \\"; done | sort -u
|
||||
@@ -826,6 +1042,24 @@ FILES:${PN}-whence-license = "${nonarch_base_libdir}/firmware/WHENCE"
|
||||
|
||||
RDEPENDS:${PN}-bnx2-mips += "${PN}-whence-license"
|
||||
|
||||
# For cirrus
|
||||
LICENSE:${PN}-cirrus = "Firmware-cirrus"
|
||||
LICENSE:${PN}-cirrus-license = "Firmware-cirrus"
|
||||
|
||||
FILES:${PN}-cirrus = "${nonarch_base_libdir}/firmware/cirrus/*"
|
||||
FILES:${PN}-cirrus-license = "${nonarch_base_libdir}/firmware/LICENSE.cirrus"
|
||||
|
||||
RDEPENDS:${PN}-cirrus += "${PN}-cirrus-license"
|
||||
|
||||
# For cnm
|
||||
LICENSE:${PN}-cnm = "Firmware-cnm"
|
||||
LICENSE:${PN}-cnm-license = "Firmware-cnm"
|
||||
|
||||
FILES:${PN}-cnm = "${nonarch_base_libdir}/firmware/cnm/wave521c_k3_codec_fw.bin"
|
||||
FILES:${PN}-cnm-license = "${nonarch_base_libdir}/firmware/LICENCE.cnm"
|
||||
|
||||
RDEPENDS:${PN}-cnm += "${PN}-cnm-license"
|
||||
|
||||
# For imx-sdma
|
||||
LICENSE:${PN}-imx-sdma-imx6q = "Firmware-imx-sdma_firmware"
|
||||
LICENSE:${PN}-imx-sdma-imx7d = "Firmware-imx-sdma_firmware"
|
||||
@@ -974,10 +1208,26 @@ FILES:${PN}-i915-license = "${nonarch_base_libdir}/firmware/LICENSE.i915"
|
||||
FILES:${PN}-i915 = "${nonarch_base_libdir}/firmware/i915"
|
||||
RDEPENDS:${PN}-i915 = "${PN}-i915-license"
|
||||
|
||||
# For ice-enhanced
|
||||
LICENSE:${PN}-ice-enhanced = "Firmware-ice_enhanced"
|
||||
LICENSE:${PN}-ice-enhanced-license = "Firmware-ice_enhanced"
|
||||
|
||||
FILES:${PN}-ice-enhanced = " \
|
||||
${nonarch_base_libdir}/firmware/intel/ice/ddp-comms/* \
|
||||
${nonarch_base_libdir}/firmware/intel/ice/ddp-wireless_edge/* \
|
||||
"
|
||||
FILES:${PN}-ice-enhanced-license = " \
|
||||
${nonarch_base_libdir}/firmware/LICENSE.ice_enhanced \
|
||||
"
|
||||
RDEPENDS:${PN}-ice-enhanced = "${PN}-ice-enhanced-license"
|
||||
|
||||
LICENSE:${PN}-ice = "Firmware-ice"
|
||||
LICENSE:${PN}-ice-license = "Firmware-ice"
|
||||
FILES:${PN}-ice-license = "${nonarch_base_libdir}/firmware/LICENSE.ice"
|
||||
FILES:${PN}-ice = "${nonarch_base_libdir}/firmware/intel/ice"
|
||||
FILES:${PN}-ice = " \
|
||||
${nonarch_base_libdir}/firmware/intel/ice/ddp/* \
|
||||
${nonarch_base_libdir}/firmware/intel/ice/ddp-lag/* \
|
||||
"
|
||||
RDEPENDS:${PN}-ice = "${PN}-ice-license"
|
||||
|
||||
FILES:${PN}-adsp-sst-license = "${nonarch_base_libdir}/firmware/LICENCE.adsp_sst"
|
||||
@@ -1111,6 +1361,8 @@ LICENSE:${PN} = "\
|
||||
& Firmware-ca0132 \
|
||||
& Firmware-cavium \
|
||||
& Firmware-chelsio_firmware \
|
||||
& Firmware-cirrus \
|
||||
& Firmware-cnm \
|
||||
& Firmware-cw1200 \
|
||||
& Firmware-dib0700 \
|
||||
& Firmware-e100 \
|
||||
7332
meta/recipes-kernel/linux/cve-exclusion_5.10.inc
Normal file
7332
meta/recipes-kernel/linux/cve-exclusion_5.10.inc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
|
||||
# Auto-generated CVE metadata, DO NOT EDIT BY HAND.
|
||||
# Generated at 2023-08-25 17:27:32.846303 for version 5.15.120
|
||||
# Generated at 2023-09-23 10:40:51.641475 for version 5.15.124
|
||||
|
||||
python check_kernel_cve_status_version() {
|
||||
this_version = "5.15.120"
|
||||
this_version = "5.15.124"
|
||||
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))
|
||||
@@ -4839,6 +4839,8 @@ CVE_CHECK_IGNORE += "CVE-2020-27194"
|
||||
# fixed-version: Fixed after version 5.6rc4
|
||||
CVE_CHECK_IGNORE += "CVE-2020-2732"
|
||||
|
||||
# CVE-2020-27418 has no known resolution
|
||||
|
||||
# fixed-version: Fixed after version 5.10rc1
|
||||
CVE_CHECK_IGNORE += "CVE-2020-27673"
|
||||
|
||||
@@ -6448,7 +6450,7 @@ CVE_CHECK_IGNORE += "CVE-2022-40768"
|
||||
# cpe-stable-backport: Backported in 5.15.66
|
||||
CVE_CHECK_IGNORE += "CVE-2022-4095"
|
||||
|
||||
# CVE-2022-40982 has no known resolution
|
||||
# CVE-2022-40982 needs backporting (fixed from 5.15.125)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.87
|
||||
CVE_CHECK_IGNORE += "CVE-2022-41218"
|
||||
@@ -6530,9 +6532,9 @@ CVE_CHECK_IGNORE += "CVE-2022-4382"
|
||||
# cpe-stable-backport: Backported in 5.15.75
|
||||
CVE_CHECK_IGNORE += "CVE-2022-43945"
|
||||
|
||||
# CVE-2022-44032 has no known resolution
|
||||
# CVE-2022-44032 needs backporting (fixed from 6.4rc1)
|
||||
|
||||
# CVE-2022-44033 has no known resolution
|
||||
# CVE-2022-44033 needs backporting (fixed from 6.4rc1)
|
||||
|
||||
# CVE-2022-44034 has no known resolution
|
||||
|
||||
@@ -6545,13 +6547,16 @@ CVE_CHECK_IGNORE += "CVE-2022-45869"
|
||||
|
||||
# CVE-2022-45885 has no known resolution
|
||||
|
||||
# CVE-2022-45886 has no known resolution
|
||||
# cpe-stable-backport: Backported in 5.15.116
|
||||
CVE_CHECK_IGNORE += "CVE-2022-45886"
|
||||
|
||||
# CVE-2022-45887 has no known resolution
|
||||
# cpe-stable-backport: Backported in 5.15.116
|
||||
CVE_CHECK_IGNORE += "CVE-2022-45887"
|
||||
|
||||
# CVE-2022-45888 needs backporting (fixed from 6.2rc1)
|
||||
|
||||
# CVE-2022-45919 has no known resolution
|
||||
# cpe-stable-backport: Backported in 5.15.116
|
||||
CVE_CHECK_IGNORE += "CVE-2022-45919"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.85
|
||||
CVE_CHECK_IGNORE += "CVE-2022-45934"
|
||||
@@ -6612,7 +6617,8 @@ CVE_CHECK_IGNORE += "CVE-2022-48424"
|
||||
# cpe-stable-backport: Backported in 5.15.113
|
||||
CVE_CHECK_IGNORE += "CVE-2022-48425"
|
||||
|
||||
# CVE-2022-48502 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2022-48502"
|
||||
|
||||
# fixed-version: Fixed after version 5.0rc1
|
||||
CVE_CHECK_IGNORE += "CVE-2023-0030"
|
||||
@@ -6626,7 +6632,8 @@ CVE_CHECK_IGNORE += "CVE-2023-0047"
|
||||
# fixed-version: only affects 6.0rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-0122"
|
||||
|
||||
# CVE-2023-0160 has no known resolution
|
||||
# cpe-stable-backport: Backported in 5.15.111
|
||||
CVE_CHECK_IGNORE += "CVE-2023-0160"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.89
|
||||
CVE_CHECK_IGNORE += "CVE-2023-0179"
|
||||
@@ -6708,7 +6715,8 @@ CVE_CHECK_IGNORE += "CVE-2023-1192"
|
||||
# fixed-version: only affects 5.16rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-1195"
|
||||
|
||||
# CVE-2023-1206 needs backporting (fixed from 5.15.124)
|
||||
# cpe-stable-backport: Backported in 5.15.124
|
||||
CVE_CHECK_IGNORE += "CVE-2023-1206"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.33
|
||||
CVE_CHECK_IGNORE += "CVE-2023-1249"
|
||||
@@ -6789,11 +6797,12 @@ CVE_CHECK_IGNORE += "CVE-2023-2008"
|
||||
# cpe-stable-backport: Backported in 5.15.61
|
||||
CVE_CHECK_IGNORE += "CVE-2023-2019"
|
||||
|
||||
# CVE-2023-20569 has no known resolution
|
||||
# CVE-2023-20569 needs backporting (fixed from 5.15.125)
|
||||
|
||||
# CVE-2023-20588 has no known resolution
|
||||
# CVE-2023-20588 needs backporting (fixed from 5.15.126)
|
||||
|
||||
# CVE-2023-20593 needs backporting (fixed from 5.15.122)
|
||||
# cpe-stable-backport: Backported in 5.15.122
|
||||
CVE_CHECK_IGNORE += "CVE-2023-20593"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.61
|
||||
CVE_CHECK_IGNORE += "CVE-2023-20928"
|
||||
@@ -6817,7 +6826,8 @@ CVE_CHECK_IGNORE += "CVE-2023-2124"
|
||||
# fixed-version: only affects 5.16rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-21255"
|
||||
|
||||
# CVE-2023-21264 needs backporting (fixed from 6.4rc5)
|
||||
# fixed-version: only affects 5.17rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-21264"
|
||||
|
||||
# CVE-2023-21400 has no known resolution
|
||||
|
||||
@@ -6912,6 +6922,8 @@ CVE_CHECK_IGNORE += "CVE-2023-25012"
|
||||
# cpe-stable-backport: Backported in 5.15.61
|
||||
CVE_CHECK_IGNORE += "CVE-2023-2513"
|
||||
|
||||
# CVE-2023-25775 needs backporting (fixed from 6.6rc1)
|
||||
|
||||
# fixed-version: only affects 6.3rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-2598"
|
||||
|
||||
@@ -6958,7 +6970,8 @@ CVE_CHECK_IGNORE += "CVE-2023-28772"
|
||||
# fixed-version: only affects 5.17rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-28866"
|
||||
|
||||
# CVE-2023-2898 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-2898"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.99
|
||||
CVE_CHECK_IGNORE += "CVE-2023-2985"
|
||||
@@ -6986,7 +6999,7 @@ CVE_CHECK_IGNORE += "CVE-2023-3106"
|
||||
|
||||
# CVE-2023-31082 has no known resolution
|
||||
|
||||
# CVE-2023-31083 has no known resolution
|
||||
# CVE-2023-31083 needs backporting (fixed from 6.6rc1)
|
||||
|
||||
# CVE-2023-31084 needs backporting (fixed from 6.4rc3)
|
||||
|
||||
@@ -6998,7 +7011,8 @@ CVE_CHECK_IGNORE += "CVE-2023-3111"
|
||||
# cpe-stable-backport: Backported in 5.15.118
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3117"
|
||||
|
||||
# CVE-2023-31248 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-31248"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.113
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3141"
|
||||
@@ -7056,7 +7070,8 @@ CVE_CHECK_IGNORE += "CVE-2023-3317"
|
||||
# cpe-stable-backport: Backported in 5.15.105
|
||||
CVE_CHECK_IGNORE += "CVE-2023-33203"
|
||||
|
||||
# CVE-2023-33250 has no known resolution
|
||||
# fixed-version: only affects 6.2rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-33250"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.105
|
||||
CVE_CHECK_IGNORE += "CVE-2023-33288"
|
||||
@@ -7095,11 +7110,13 @@ CVE_CHECK_IGNORE += "CVE-2023-34255"
|
||||
# cpe-stable-backport: Backported in 5.15.112
|
||||
CVE_CHECK_IGNORE += "CVE-2023-34256"
|
||||
|
||||
# CVE-2023-34319 has no known resolution
|
||||
# fixed-version: only affects 6.1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-34319"
|
||||
|
||||
# CVE-2023-3439 needs backporting (fixed from 5.18rc5)
|
||||
|
||||
# CVE-2023-35001 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-35001"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.93
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3567"
|
||||
@@ -7132,19 +7149,26 @@ CVE_CHECK_IGNORE += "CVE-2023-3609"
|
||||
# cpe-stable-backport: Backported in 5.15.119
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3610"
|
||||
|
||||
# CVE-2023-3611 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3611"
|
||||
|
||||
# CVE-2023-3640 has no known resolution
|
||||
|
||||
# CVE-2023-37453 has no known resolution
|
||||
# fixed-version: only affects 6.3rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-37453"
|
||||
|
||||
# CVE-2023-37454 has no known resolution
|
||||
|
||||
# CVE-2023-3772 has no known resolution
|
||||
# CVE-2023-3772 needs backporting (fixed from 5.15.128)
|
||||
|
||||
# CVE-2023-3773 has no known resolution
|
||||
# fixed-version: only affects 5.17rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3773"
|
||||
|
||||
# CVE-2023-3776 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3776"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.123
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3777"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.78
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3812"
|
||||
@@ -7167,27 +7191,84 @@ CVE_CHECK_IGNORE += "CVE-2023-38429"
|
||||
|
||||
# CVE-2023-38431 needs backporting (fixed from 6.4rc6)
|
||||
|
||||
# CVE-2023-38432 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-38432"
|
||||
|
||||
# CVE-2023-3863 needs backporting (fixed from 5.15.121)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3863"
|
||||
|
||||
# CVE-2023-4004 needs backporting (fixed from 5.15.123)
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3865"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-3866"
|
||||
|
||||
# CVE-2023-3867 needs backporting (fixed from 6.5rc1)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.123
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4004"
|
||||
|
||||
# CVE-2023-4010 has no known resolution
|
||||
|
||||
# CVE-2023-4128 needs backporting (fixed from 6.5rc5)
|
||||
# cpe-stable-backport: Backported in 5.15.124
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4015"
|
||||
|
||||
# CVE-2023-4132 needs backporting (fixed from 5.15.121)
|
||||
# CVE-2023-40283 needs backporting (fixed from 5.15.126)
|
||||
|
||||
# CVE-2023-4128 needs backporting (fixed from 5.15.126)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.121
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4132"
|
||||
|
||||
# CVE-2023-4133 needs backporting (fixed from 6.3)
|
||||
|
||||
# CVE-2023-4134 needs backporting (fixed from 6.5rc1)
|
||||
|
||||
# CVE-2023-4147 needs backporting (fixed from 5.15.124)
|
||||
# cpe-stable-backport: Backported in 5.15.124
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4147"
|
||||
|
||||
# CVE-2023-4155 has no known resolution
|
||||
# CVE-2023-4155 needs backporting (fixed from 6.5rc6)
|
||||
|
||||
# CVE-2023-4194 needs backporting (fixed from 6.5rc5)
|
||||
# fixed-version: only affects 6.3rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4194"
|
||||
|
||||
# CVE-2023-4273 needs backporting (fixed from 6.5rc5)
|
||||
# CVE-2023-4206 needs backporting (fixed from 5.15.126)
|
||||
|
||||
# CVE-2023-4207 needs backporting (fixed from 5.15.126)
|
||||
|
||||
# CVE-2023-4208 needs backporting (fixed from 5.15.126)
|
||||
|
||||
# CVE-2023-4244 needs backporting (fixed from 6.5rc7)
|
||||
|
||||
# CVE-2023-4273 needs backporting (fixed from 5.15.128)
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.46
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4385"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.42
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4387"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.35
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4389"
|
||||
|
||||
# fixed-version: only affects 5.16rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4394"
|
||||
|
||||
# cpe-stable-backport: Backported in 5.15.42
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4459"
|
||||
|
||||
# CVE-2023-4563 needs backporting (fixed from 6.5rc6)
|
||||
|
||||
# CVE-2023-4569 needs backporting (fixed from 5.15.128)
|
||||
|
||||
# fixed-version: only affects 6.4rc1 onwards
|
||||
CVE_CHECK_IGNORE += "CVE-2023-4611"
|
||||
|
||||
# CVE-2023-4622 needs backporting (fixed from 6.5rc1)
|
||||
|
||||
# CVE-2023-4623 needs backporting (fixed from 6.6rc1)
|
||||
|
||||
# CVE-2023-4881 needs backporting (fixed from 6.6rc1)
|
||||
|
||||
# CVE-2023-4921 needs backporting (fixed from 6.6rc1)
|
||||
|
||||
|
||||
@@ -11,13 +11,13 @@ python () {
|
||||
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
|
||||
}
|
||||
|
||||
SRCREV_machine ?= "40d51460c17be51e4ebcdcc54a8ee8c86707c56c"
|
||||
SRCREV_meta ?= "9b0d4e338b1bbdd683347cf9365bacfec2169035"
|
||||
SRCREV_machine ?= "361bd6dc8f750afb690d28fd9aab33d116b38f68"
|
||||
SRCREV_meta ?= "080adc96faafd98d2370b009338fcad42cf8e5fd"
|
||||
|
||||
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.188"
|
||||
LINUX_VERSION ?= "5.10.197"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user