mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 16:39:40 +01:00
Compare commits
137 Commits
yocto-4.0.
...
kirkstone-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54af8c5e80 | ||
|
|
f91fefe108 | ||
|
|
f634b9852e | ||
|
|
78e79d47c2 | ||
|
|
f5f650aaa4 | ||
|
|
d1a5c51431 | ||
|
|
8f6035f44d | ||
|
|
ae249a900f | ||
|
|
d9f531b374 | ||
|
|
b3e1dabe66 | ||
|
|
80b4e5f953 | ||
|
|
410d7bf8cb | ||
|
|
ce477b4d6e | ||
|
|
906af0cb8b | ||
|
|
426dfdc8d2 | ||
|
|
924b38aa01 | ||
|
|
4a900fd822 | ||
|
|
4289397aaf | ||
|
|
76d570000e | ||
|
|
33faa4d392 | ||
|
|
f96bd47ea2 | ||
|
|
a818202d85 | ||
|
|
c165a558da | ||
|
|
e318dc57e3 | ||
|
|
c0a199acdc | ||
|
|
f0f023e86d | ||
|
|
d1aae420f9 | ||
|
|
d9532264b9 | ||
|
|
6c7c9b1146 | ||
|
|
3ef22a75a3 | ||
|
|
19b0baeb81 | ||
|
|
88ba7d2d3a | ||
|
|
df2f696e68 | ||
|
|
bad31561c0 | ||
|
|
e9dbcd7a01 | ||
|
|
8ffcfd69b5 | ||
|
|
f754b5d45b | ||
|
|
d95d26073d | ||
|
|
19c1f963a9 | ||
|
|
1b0b487dcc | ||
|
|
a7eb75e292 | ||
|
|
7262c0f235 | ||
|
|
558325482c | ||
|
|
3b8c412b7f | ||
|
|
8d726b790a | ||
|
|
7008d999c5 | ||
|
|
a7f86b0e78 | ||
|
|
1520bf97aa | ||
|
|
ddbdef6e58 | ||
|
|
4a7f8470c2 | ||
|
|
9b7cc27c39 | ||
|
|
306316eb80 | ||
|
|
27ec491044 | ||
|
|
2ebcefae46 | ||
|
|
7640d1f82e | ||
|
|
ac4914f538 | ||
|
|
f4d36b60f8 | ||
|
|
7a939cd7e6 | ||
|
|
064936af55 | ||
|
|
3a5ddec4d1 | ||
|
|
d00aada1d1 | ||
|
|
cfcbf783ab | ||
|
|
15b42171a3 | ||
|
|
8caaab3252 | ||
|
|
cd6f183a34 | ||
|
|
875ce46a8d | ||
|
|
755632c2fc | ||
|
|
387d01b0a4 | ||
|
|
4761cbe1ee | ||
|
|
8a09f8472f | ||
|
|
82802901c6 | ||
|
|
f22a96e5cc | ||
|
|
3562768af7 | ||
|
|
6f84c60edf | ||
|
|
eadd5efcb3 | ||
|
|
e01044d629 | ||
|
|
079e50aba0 | ||
|
|
26ffdb7a30 | ||
|
|
1110f16718 | ||
|
|
8b75148d87 | ||
|
|
75b08b43a4 | ||
|
|
c4f28d9643 | ||
|
|
30be4f67cc | ||
|
|
75cd31f6d3 | ||
|
|
f5c3c374e8 | ||
|
|
93d2e547d1 | ||
|
|
31507dd07a | ||
|
|
82e76d21dc | ||
|
|
006b4b976c | ||
|
|
d6385a54cb | ||
|
|
acd993f24c | ||
|
|
98223b776a | ||
|
|
7057b7bb2b | ||
|
|
a76bc698c4 | ||
|
|
3e73216a32 | ||
|
|
239bf770b6 | ||
|
|
d1b9e2acaa | ||
|
|
51a2c26e29 | ||
|
|
f46bb8ad10 | ||
|
|
f007ad78dd | ||
|
|
24121f9699 | ||
|
|
f8a7dbd8fb | ||
|
|
8dc22248a8 | ||
|
|
b159ad2464 | ||
|
|
a2d67684cc | ||
|
|
fdd88b549f | ||
|
|
95795dff9b | ||
|
|
6c9f29507f | ||
|
|
942c66a9fb | ||
|
|
12643571ec | ||
|
|
9536f32528 | ||
|
|
e826f80436 | ||
|
|
f19d7f427e | ||
|
|
c8fa08b01c | ||
|
|
ecba5ff495 | ||
|
|
a7657ca5ff | ||
|
|
c771630e99 | ||
|
|
39aa7af59b | ||
|
|
2629c5fe89 | ||
|
|
517e513209 | ||
|
|
973020ce12 | ||
|
|
f2c0b5cef2 | ||
|
|
1867c0de35 | ||
|
|
24646e55b2 | ||
|
|
f9527fb2ac | ||
|
|
e447b4139f | ||
|
|
f60fb52055 | ||
|
|
2e3c89e255 | ||
|
|
9200c6b310 | ||
|
|
ae28221a40 | ||
|
|
4e227eaf1c | ||
|
|
9f0a8901d1 | ||
|
|
f9a95adda5 | ||
|
|
a171408008 | ||
|
|
8d57eddc82 | ||
|
|
2fc0a78176 | ||
|
|
0207478c7b |
@@ -36,9 +36,10 @@ if __name__ == "__main__":
|
||||
print("--flag only makes sense with --value")
|
||||
sys.exit(1)
|
||||
|
||||
with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not args.quiet) as tinfoil:
|
||||
quiet = args.quiet
|
||||
with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil:
|
||||
if args.recipe:
|
||||
tinfoil.prepare(quiet=2)
|
||||
tinfoil.prepare(quiet=3 if quiet else 2)
|
||||
d = tinfoil.parse_recipe(args.recipe)
|
||||
else:
|
||||
tinfoil.prepare(quiet=2, config_only=True)
|
||||
|
||||
@@ -56,25 +56,24 @@ def main():
|
||||
nonlocal missed_hashes
|
||||
nonlocal max_time
|
||||
|
||||
client = hashserv.create_client(args.address)
|
||||
with hashserv.create_client(args.address) as client:
|
||||
for i in range(args.requests):
|
||||
taskhash = hashlib.sha256()
|
||||
taskhash.update(args.taskhash_seed.encode('utf-8'))
|
||||
taskhash.update(str(i).encode('utf-8'))
|
||||
|
||||
for i in range(args.requests):
|
||||
taskhash = hashlib.sha256()
|
||||
taskhash.update(args.taskhash_seed.encode('utf-8'))
|
||||
taskhash.update(str(i).encode('utf-8'))
|
||||
start_time = time.perf_counter()
|
||||
l = client.get_unihash(METHOD, taskhash.hexdigest())
|
||||
elapsed = time.perf_counter() - start_time
|
||||
|
||||
start_time = time.perf_counter()
|
||||
l = client.get_unihash(METHOD, taskhash.hexdigest())
|
||||
elapsed = time.perf_counter() - start_time
|
||||
with lock:
|
||||
if l:
|
||||
found_hashes += 1
|
||||
else:
|
||||
missed_hashes += 1
|
||||
|
||||
with lock:
|
||||
if l:
|
||||
found_hashes += 1
|
||||
else:
|
||||
missed_hashes += 1
|
||||
|
||||
max_time = max(elapsed, max_time)
|
||||
pbar.update()
|
||||
max_time = max(elapsed, max_time)
|
||||
pbar.update()
|
||||
|
||||
max_time = 0
|
||||
found_hashes = 0
|
||||
@@ -152,9 +151,8 @@ def main():
|
||||
|
||||
func = getattr(args, 'func', None)
|
||||
if func:
|
||||
client = hashserv.create_client(args.address)
|
||||
|
||||
return func(args, client)
|
||||
with hashserv.create_client(args.address) as client:
|
||||
return func(args, client)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -15,6 +15,13 @@ import sys
|
||||
if sys.version_info < (3, 6, 0):
|
||||
raise RuntimeError("Sorry, python 3.6.0 or later is required for this version of bitbake")
|
||||
|
||||
if sys.version_info < (3, 10, 0):
|
||||
# With python 3.8 and 3.9, we see errors of "libgcc_s.so.1 must be installed for pthread_cancel to work"
|
||||
# https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work
|
||||
# https://bugs.ams1.psf.io/issue42888
|
||||
# so ensure libgcc_s is loaded early on
|
||||
import ctypes
|
||||
libgcc_s = ctypes.CDLL('libgcc_s.so.1')
|
||||
|
||||
class BBHandledException(Exception):
|
||||
"""
|
||||
|
||||
@@ -126,6 +126,12 @@ class AsyncClient(object):
|
||||
{'ping': {}}
|
||||
)
|
||||
|
||||
async def __aenter__(self):
|
||||
return self
|
||||
|
||||
async def __aexit__(self, exc_type, exc_value, traceback):
|
||||
await self.close()
|
||||
|
||||
|
||||
class Client(object):
|
||||
def __init__(self):
|
||||
@@ -176,3 +182,10 @@ class Client(object):
|
||||
if sys.version_info >= (3, 6):
|
||||
self.loop.run_until_complete(self.loop.shutdown_asyncgens())
|
||||
self.loop.close()
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
self.close()
|
||||
return False
|
||||
|
||||
@@ -310,6 +310,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, ignored_vars, d):
|
||||
value += "\n_remove of %s" % r
|
||||
deps |= r2.references
|
||||
deps = deps | (keys & r2.execs)
|
||||
value = handle_contains(value, r2.contains, exclusions, d)
|
||||
return value
|
||||
|
||||
if "vardepvalue" in varflags:
|
||||
|
||||
@@ -234,9 +234,10 @@ class diskMonitor:
|
||||
freeInode = st.f_favail
|
||||
|
||||
if minInode and freeInode < minInode:
|
||||
# Some filesystems use dynamic inodes so can't run out
|
||||
# (e.g. btrfs). This is reported by the inode count being 0.
|
||||
if st.f_files == 0:
|
||||
# Some filesystems use dynamic inodes so can't run out.
|
||||
# This is reported by the inode count being 0 (btrfs) or the free
|
||||
# inode count being -1 (cephfs).
|
||||
if st.f_files == 0 or st.f_favail == -1:
|
||||
self.devDict[k][2] = None
|
||||
continue
|
||||
# Always show warning, the self.checked would always be False if the action is WARN
|
||||
|
||||
@@ -198,15 +198,27 @@ class RunQueueScheduler(object):
|
||||
curr_cpu_pressure = cpu_pressure_fds.readline().split()[4].split("=")[1]
|
||||
curr_io_pressure = io_pressure_fds.readline().split()[4].split("=")[1]
|
||||
curr_memory_pressure = memory_pressure_fds.readline().split()[4].split("=")[1]
|
||||
exceeds_cpu_pressure = self.rq.max_cpu_pressure and (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) > self.rq.max_cpu_pressure
|
||||
exceeds_io_pressure = self.rq.max_io_pressure and (float(curr_io_pressure) - float(self.prev_io_pressure)) > self.rq.max_io_pressure
|
||||
exceeds_memory_pressure = self.rq.max_memory_pressure and (float(curr_memory_pressure) - float(self.prev_memory_pressure)) > self.rq.max_memory_pressure
|
||||
now = time.time()
|
||||
if now - self.prev_pressure_time > 1.0:
|
||||
tdiff = now - self.prev_pressure_time
|
||||
psi_accumulation_interval = 1.0
|
||||
cpu_pressure = (float(curr_cpu_pressure) - float(self.prev_cpu_pressure)) / tdiff
|
||||
io_pressure = (float(curr_io_pressure) - float(self.prev_io_pressure)) / tdiff
|
||||
memory_pressure = (float(curr_memory_pressure) - float(self.prev_memory_pressure)) / tdiff
|
||||
exceeds_cpu_pressure = self.rq.max_cpu_pressure and cpu_pressure > self.rq.max_cpu_pressure
|
||||
exceeds_io_pressure = self.rq.max_io_pressure and io_pressure > self.rq.max_io_pressure
|
||||
exceeds_memory_pressure = self.rq.max_memory_pressure and memory_pressure > self.rq.max_memory_pressure
|
||||
|
||||
if tdiff > psi_accumulation_interval:
|
||||
self.prev_cpu_pressure = curr_cpu_pressure
|
||||
self.prev_io_pressure = curr_io_pressure
|
||||
self.prev_memory_pressure = curr_memory_pressure
|
||||
self.prev_pressure_time = now
|
||||
|
||||
pressure_state = (exceeds_cpu_pressure, exceeds_io_pressure, exceeds_memory_pressure)
|
||||
pressure_values = (round(cpu_pressure,1), self.rq.max_cpu_pressure, round(io_pressure,1), self.rq.max_io_pressure, round(memory_pressure,1), self.rq.max_memory_pressure)
|
||||
if hasattr(self, "pressure_state") and pressure_state != self.pressure_state:
|
||||
bb.note("Pressure status changed to CPU: %s, IO: %s, Mem: %s (CPU: %s/%s, IO: %s/%s, Mem: %s/%s) - using %s/%s bitbake threads" % (pressure_state + pressure_values + (len(self.rq.runq_running.difference(self.rq.runq_complete)), self.rq.number_tasks)))
|
||||
self.pressure_state = pressure_state
|
||||
return (exceeds_cpu_pressure or exceeds_io_pressure or exceeds_memory_pressure)
|
||||
return False
|
||||
|
||||
@@ -1980,12 +1992,12 @@ class RunQueueExecute:
|
||||
# Allow the next deferred task to run. Any other deferred tasks should be deferred after that task.
|
||||
# We shouldn't allow all to run at once as it is prone to races.
|
||||
if not found:
|
||||
bb.note("Deferred task %s now buildable" % t)
|
||||
bb.debug(1, "Deferred task %s now buildable" % t)
|
||||
del self.sq_deferred[t]
|
||||
update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
|
||||
found = t
|
||||
else:
|
||||
bb.note("Deferring %s after %s" % (t, found))
|
||||
bb.debug(1, "Deferring %s after %s" % (t, found))
|
||||
self.sq_deferred[t] = found
|
||||
|
||||
def task_complete(self, task):
|
||||
@@ -2892,7 +2904,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
|
||||
sqdata.hashes[h] = tid
|
||||
else:
|
||||
sqrq.sq_deferred[tid] = sqdata.hashes[h]
|
||||
bb.note("Deferring %s after %s" % (tid, sqdata.hashes[h]))
|
||||
bb.debug(1, "Deferring %s after %s" % (tid, sqdata.hashes[h]))
|
||||
|
||||
update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
|
||||
|
||||
|
||||
@@ -430,6 +430,32 @@ esac
|
||||
self.assertEqual(deps, set(["TESTVAR2"]))
|
||||
self.assertEqual(self.d.getVar('ANOTHERVAR').split(), ['testval3', 'anothervalue'])
|
||||
|
||||
def test_contains_vardeps_override_operators(self):
|
||||
# Check override operators handle dependencies correctly with the contains functionality
|
||||
expr_plain = 'testval'
|
||||
expr_prepend = '${@bb.utils.filter("TESTVAR1", "testval1", d)} '
|
||||
expr_append = ' ${@bb.utils.filter("TESTVAR2", "testval2", d)}'
|
||||
expr_remove = '${@bb.utils.contains("TESTVAR3", "no-testval", "testval", "", d)}'
|
||||
# Check dependencies
|
||||
self.d.setVar('ANOTHERVAR', expr_plain)
|
||||
self.d.prependVar('ANOTHERVAR', expr_prepend)
|
||||
self.d.appendVar('ANOTHERVAR', expr_append)
|
||||
self.d.setVar('ANOTHERVAR:remove', expr_remove)
|
||||
self.d.setVar('TESTVAR1', 'blah')
|
||||
self.d.setVar('TESTVAR2', 'testval2')
|
||||
self.d.setVar('TESTVAR3', 'no-testval')
|
||||
deps, values = bb.data.build_dependencies("ANOTHERVAR", set(self.d.keys()), set(), set(), set(), self.d)
|
||||
self.assertEqual(sorted(values.splitlines()),
|
||||
sorted([
|
||||
expr_prepend + expr_plain + expr_append,
|
||||
'_remove of ' + expr_remove,
|
||||
'TESTVAR1{testval1} = Unset',
|
||||
'TESTVAR2{testval2} = Set',
|
||||
'TESTVAR3{no-testval} = Set',
|
||||
]))
|
||||
# Check final value
|
||||
self.assertEqual(self.d.getVar('ANOTHERVAR').split(), ['testval2'])
|
||||
|
||||
#Currently no wildcard support
|
||||
#def test_vardeps_wildcards(self):
|
||||
# self.d.setVar("oe_libinstall", "echo test")
|
||||
|
||||
@@ -324,11 +324,11 @@ class Tinfoil:
|
||||
self.recipes_parsed = False
|
||||
self.quiet = 0
|
||||
self.oldhandlers = self.logger.handlers[:]
|
||||
self.localhandlers = []
|
||||
if setup_logging:
|
||||
# This is the *client-side* logger, nothing to do with
|
||||
# logging messages from the server
|
||||
bb.msg.logger_create('BitBake', output)
|
||||
self.localhandlers = []
|
||||
for handler in self.logger.handlers:
|
||||
if handler not in self.oldhandlers:
|
||||
self.localhandlers.append(handler)
|
||||
|
||||
@@ -344,9 +344,9 @@ def auto_shutdown():
|
||||
def ping(host, port):
|
||||
from . import client
|
||||
|
||||
conn = client.PRClient()
|
||||
conn.connect_tcp(host, port)
|
||||
return conn.ping()
|
||||
with client.PRClient() as conn:
|
||||
conn.connect_tcp(host, port)
|
||||
return conn.ping()
|
||||
|
||||
def connect(host, port):
|
||||
from . import client
|
||||
|
||||
@@ -11,7 +11,7 @@ import os
|
||||
import re
|
||||
import logging
|
||||
import json
|
||||
import subprocess
|
||||
import glob
|
||||
from collections import Counter
|
||||
|
||||
from orm.models import Project, ProjectTarget, Build, Layer_Version
|
||||
@@ -234,13 +234,11 @@ class XhrSetDefaultImageUrl(View):
|
||||
|
||||
def scan_layer_content(layer,layer_version):
|
||||
# if this is a local layer directory, we can immediately scan its content
|
||||
if layer.local_source_dir:
|
||||
if os.path.isdir(layer.local_source_dir):
|
||||
try:
|
||||
# recipes-*/*/*.bb
|
||||
cmd = '%s %s' % ('ls', os.path.join(layer.local_source_dir,'recipes-*/*/*.bb'))
|
||||
recipes_list = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read()
|
||||
recipes_list = recipes_list.decode("utf-8").strip()
|
||||
if recipes_list and 'No such' not in recipes_list:
|
||||
recipes_list = glob.glob(os.path.join(layer.local_source_dir, 'recipes-*/*/*.bb'))
|
||||
for recipe in recipes_list:
|
||||
for recipe in recipes_list.split('\n'):
|
||||
recipe_path = recipe[recipe.rfind('recipes-'):]
|
||||
recipe_name = recipe[recipe.rfind('/')+1:].replace('.bb','')
|
||||
@@ -260,6 +258,9 @@ def scan_layer_content(layer,layer_version):
|
||||
|
||||
except Exception as e:
|
||||
logger.warning("ERROR:scan_layer_content: %s" % e)
|
||||
else:
|
||||
logger.warning("ERROR: wrong path given")
|
||||
raise KeyError("local_source_dir")
|
||||
|
||||
class XhrLayer(View):
|
||||
""" Delete, Get, Add and Update Layer information
|
||||
|
||||
@@ -254,10 +254,10 @@ an entire Linux distribution, including the toolchain, from source.
|
||||
To use such mirrors, uncomment the below lines in your ``conf/local.conf``
|
||||
file in the :term:`Build Directory`::
|
||||
|
||||
BB_SIGNATURE_HANDLER = "OEEquivHash"
|
||||
BB_HASHSERVE = "auto"
|
||||
BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"
|
||||
SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
|
||||
BB_HASHSERVE = "auto"
|
||||
BB_SIGNATURE_HANDLER = "OEEquivHash"
|
||||
|
||||
#. **Start the Build:** Continue with the following command to build an OS
|
||||
image for the target, which is ``core-image-sato`` in this example:
|
||||
|
||||
@@ -250,6 +250,18 @@ Recipes need to define both the :term:`LICENSE` and
|
||||
correct string that you can substitute into the recipe file for a
|
||||
subsequent build.
|
||||
|
||||
License Updates
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
When you change the :term:`LICENSE` or :term:`LIC_FILES_CHKSUM` in the recipe
|
||||
you need to briefly explain the reason for the change via a ``License-Update:``
|
||||
tag. Often it's quite trivial, such as::
|
||||
|
||||
License-Update: copyright years refreshed
|
||||
|
||||
Less often, the actual licensing terms themselves will have changed. If so, do
|
||||
try to link to upstream making/justifying that decision.
|
||||
|
||||
Tips and Guidelines for Writing Recipes
|
||||
---------------------------------------
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ Set up Git
|
||||
The first thing to do is to install Git packages. Here is an example
|
||||
on Debian and Ubuntu::
|
||||
|
||||
sudo aptitude install git-core git-email
|
||||
sudo apt install git-core git-email
|
||||
|
||||
Then, you need to set a name and e-mail address that Git will
|
||||
use to identify your commits::
|
||||
@@ -420,7 +420,7 @@ or any layer other than :oe_git:`openembedded-core </openembedded-core/>`,
|
||||
please add the appropriate prefix so that it is clear which layer the patch is intended
|
||||
to be applied to::
|
||||
|
||||
git send-email --subject-prefix="meta-oe][PATCH" ...
|
||||
git format-patch --subject-prefix="meta-oe][PATCH" ...
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@ build host running Linux.
|
||||
OpenEmbedded build system, see the
|
||||
:doc:`/brief-yoctoprojectqs/index` document.
|
||||
|
||||
- You can also use the `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension for Visual Studio Code to build images.
|
||||
|
||||
The build process creates an entire Linux distribution from source and
|
||||
places it in your :term:`Build Directory` under ``tmp/deploy/images``. For
|
||||
detailed information on the build process using BitBake, see the
|
||||
|
||||
@@ -327,7 +327,7 @@ BitBake has determined by doing the following:
|
||||
the task. This list also includes indirect dependencies from
|
||||
variables depending on other variables, recursively::
|
||||
|
||||
Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
|
||||
Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[sha256sum]', 'base_do_fetch']
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ Logo for your layer and application. The process consists of two parts:
|
||||
successful compatibility registration.
|
||||
|
||||
#. Completion of an application acceptance form, which you can find at
|
||||
:yocto_home:`/webform/yocto-project-compatible-registration`.
|
||||
:yocto_home:`/compatible-registration/`.
|
||||
|
||||
To be granted permission to use the logo, you need to satisfy the
|
||||
following:
|
||||
@@ -337,7 +337,7 @@ application, you can use the Yocto Project Compatibility Logo with your
|
||||
layer and the application that uses your layer.
|
||||
|
||||
To access the form, use this link:
|
||||
:yocto_home:`/webform/yocto-project-compatible-registration`.
|
||||
:yocto_home:`/compatible-registration`.
|
||||
Follow the instructions on the form to complete your application.
|
||||
|
||||
The application consists of the following sections:
|
||||
|
||||
@@ -303,28 +303,33 @@ If your :term:`SRC_URI` statement includes URLs pointing to individual files
|
||||
fetched from a remote server other than a version control system,
|
||||
BitBake attempts to verify the files against checksums defined in your
|
||||
recipe to ensure they have not been tampered with or otherwise modified
|
||||
since the recipe was written. Two checksums are used:
|
||||
``SRC_URI[md5sum]`` and ``SRC_URI[sha256sum]``.
|
||||
since the recipe was written. Multiple checksums are supported:
|
||||
``SRC_URI[md5sum]``, ``SRC_URI[sha1sum]``, ``SRC_URI[sha256sum]``.
|
||||
``SRC_URI[sha384sum]`` and ``SRC_URI[sha512sum]``, but only
|
||||
``SRC_URI[sha256sum]`` is commonly used.
|
||||
|
||||
.. note::
|
||||
|
||||
``SRC_URI[md5sum]`` used to also be commonly used, but it is deprecated
|
||||
and should be replaced by ``SRC_URI[sha256sum]`` when updating existing
|
||||
recipes.
|
||||
|
||||
If your :term:`SRC_URI` variable points to more than a single URL (excluding
|
||||
SCM URLs), you need to provide the ``md5`` and ``sha256`` checksums for
|
||||
each URL. For these cases, you provide a name for each URL as part of
|
||||
the :term:`SRC_URI` and then reference that name in the subsequent checksum
|
||||
statements. Here is an example combining lines from the files
|
||||
``git.inc`` and ``git_2.24.1.bb``::
|
||||
SCM URLs), you need to provide the ``sha256`` checksum for each URL. For these
|
||||
cases, you provide a name for each URL as part of the :term:`SRC_URI` and then
|
||||
reference that name in the subsequent checksum statements. Here is an example
|
||||
combining lines from the files ``git.inc`` and ``git_2.24.1.bb``::
|
||||
|
||||
SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
|
||||
${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages"
|
||||
|
||||
SRC_URI[tarball.md5sum] = "166bde96adbbc11c8843d4f8f4f9811b"
|
||||
SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02"
|
||||
SRC_URI[manpages.md5sum] = "31c2272a8979022497ba3d4202df145d"
|
||||
SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230"
|
||||
|
||||
Proper values for ``md5`` and ``sha256`` checksums might be available
|
||||
The proper value for the ``sha256`` checksum might be available together
|
||||
with other signatures on the download page for the upstream source (e.g.
|
||||
``md5``, ``sha1``, ``sha256``, ``GPG``, and so forth). Because the
|
||||
OpenEmbedded build system only deals with ``sha256sum`` and ``md5sum``,
|
||||
OpenEmbedded build system typically only deals with ``sha256sum``,
|
||||
you should verify all the signatures you find by hand.
|
||||
|
||||
If no :term:`SRC_URI` checksums are specified when you attempt to build the
|
||||
|
||||
@@ -332,7 +332,7 @@ You can start the tests automatically or manually:
|
||||
bitbake core-image-sato
|
||||
|
||||
- *Manually running tests:* To manually run the tests, first globally
|
||||
inherit the :ref:`ref-classes-testimage*` class by editing your
|
||||
inherit the :ref:`ref-classes-testimage` class by editing your
|
||||
``local.conf`` file::
|
||||
|
||||
IMAGE_CLASSES += "testimage"
|
||||
@@ -459,7 +459,7 @@ layer's ``layer.conf`` file as normal). Just remember the following:
|
||||
directory.
|
||||
|
||||
To create a new test, start by copying an existing module (e.g.
|
||||
``syslog.py`` or ``gcc.py`` are good ones to use). Test modules can use
|
||||
``oe_syslog.py`` or ``gcc.py`` are good ones to use). Test modules can use
|
||||
code from ``meta/lib/oeqa/utils``, which are helper classes.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -332,7 +332,10 @@ to use the Extensible SDK, see the ":doc:`/sdk-manual/extensible`" Chapter in th
|
||||
Project Application Development and the Extensible Software Development
|
||||
Kit (eSDK) manual. If you want to work on the kernel, see the :doc:`/kernel-dev/index`. If you are going to use
|
||||
Toaster, see the ":doc:`/toaster-manual/setup-and-use`"
|
||||
section in the Toaster User Manual.
|
||||
section in the Toaster User Manual. If you are a VSCode user, you can configure
|
||||
the `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension accordingly.
|
||||
|
||||
Setting Up to Use CROss PlatformS (CROPS)
|
||||
-----------------------------------------
|
||||
@@ -424,7 +427,10 @@ section. If you are going to use the Extensible SDK container, see the
|
||||
Project Application Development and the Extensible Software Development
|
||||
Kit (eSDK) manual. If you are going to use the Toaster container, see
|
||||
the ":doc:`/toaster-manual/setup-and-use`"
|
||||
section in the Toaster User Manual.
|
||||
section in the Toaster User Manual. If you are a VSCode user, you can configure
|
||||
the `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension accordingly.
|
||||
|
||||
Setting Up to Use Windows Subsystem For Linux (WSLv2)
|
||||
-----------------------------------------------------
|
||||
@@ -554,7 +560,10 @@ Extensible SDK container, see the ":doc:`/sdk-manual/extensible`" Chapter in the
|
||||
Project Application Development and the Extensible Software Development
|
||||
Kit (eSDK) manual. If you are going to use the Toaster container, see
|
||||
the ":doc:`/toaster-manual/setup-and-use`"
|
||||
section in the Toaster User Manual.
|
||||
section in the Toaster User Manual. If you are a VSCode user, you can configure
|
||||
the `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension accordingly.
|
||||
|
||||
Locating Yocto Project Source Files
|
||||
===================================
|
||||
@@ -642,7 +651,7 @@ Follow these steps to locate and download a particular tarball:
|
||||
Using the Downloads Page
|
||||
------------------------
|
||||
|
||||
The :yocto_home:`Yocto Project Website <>` uses a "DOWNLOADS" page
|
||||
The :yocto_home:`Yocto Project Website <>` uses a "RELEASES" page
|
||||
from which you can locate and download tarballs of any Yocto Project
|
||||
release. Rather than Git repositories, these files represent snapshot
|
||||
tarballs similar to the tarballs located in the Index of Releases
|
||||
@@ -651,11 +660,13 @@ described in the ":ref:`dev-manual/start:accessing index of releases`" section.
|
||||
1. *Go to the Yocto Project Website:* Open The
|
||||
:yocto_home:`Yocto Project Website <>` in your browser.
|
||||
|
||||
2. *Get to the Downloads Area:* Select the "DOWNLOADS" item from the
|
||||
pull-down "SOFTWARE" tab menu near the top of the page.
|
||||
#. *Get to the Downloads Area:* Select the "RELEASES" item from the
|
||||
pull-down "DEVELOPMENT" tab menu near the top of the page.
|
||||
|
||||
3. *Select a Yocto Project Release:* Use the menu next to "RELEASE" to
|
||||
display and choose a recent or past supported Yocto Project release
|
||||
#. *Select a Yocto Project Release:* On the top of the "RELEASE" page currently
|
||||
supported releases are displayed, further down past supported Yocto Project
|
||||
releases are visible. The "Download" links in the rows of the table there
|
||||
will lead to the download tarballs for the release
|
||||
(e.g. &DISTRO_NAME_NO_CAP;, &DISTRO_NAME_NO_CAP_MINUS_ONE;, and so forth).
|
||||
|
||||
.. note::
|
||||
@@ -666,9 +677,9 @@ described in the ":ref:`dev-manual/start:accessing index of releases`" section.
|
||||
You can use the "RELEASE ARCHIVE" link to reveal a menu of all Yocto
|
||||
Project releases.
|
||||
|
||||
4. *Download Tools or Board Support Packages (BSPs):* From the
|
||||
"DOWNLOADS" page, you can download tools or BSPs as well. Just scroll
|
||||
down the page and look for what you need.
|
||||
#. *Download Tools or Board Support Packages (BSPs):* Next to the tarballs you
|
||||
will find download tools or BSPs as well. Just select a Yocto Project
|
||||
release and look for what you need.
|
||||
|
||||
Cloning and Checking Out Branches
|
||||
=================================
|
||||
|
||||
@@ -113,7 +113,7 @@ The following steps describe how to set up the AUH utility:
|
||||
``upgrade-helper/work/recipe/buildhistory-diff.txt`` file found in
|
||||
your :term:`Build Directory`.
|
||||
|
||||
- If you want to enable testing through the :ref:`ref-classes-testimage*`
|
||||
- If you want to enable testing through the :ref:`ref-classes-testimage`
|
||||
class, which is optional, you need to have the following set in
|
||||
your ``conf/local.conf`` file::
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ Automated Image Testing
|
||||
-----------------------
|
||||
|
||||
A new automated image testing framework has been added through the
|
||||
:ref:`ref-classes-testimage*` classes. This
|
||||
:ref:`ref-classes-testimage` classes. This
|
||||
framework replaces the older ``imagetest-qemu`` framework.
|
||||
|
||||
You can learn more about performing automated image tests in the
|
||||
|
||||
@@ -27,7 +27,7 @@ Staging Directories in Sysroot Has Been Simplified
|
||||
The way directories are staged in sysroot has been simplified and
|
||||
introduces the new :term:`SYSROOT_DIRS`,
|
||||
:term:`SYSROOT_DIRS_NATIVE`, and ``SYSROOT_DIRS_BLACKLIST``
|
||||
(replaced by :term:`SYSROOT_DIRS_IGNORE` in version 3.5). See the
|
||||
(replaced by :term:`SYSROOT_DIRS_IGNORE` in version 4.0). See the
|
||||
:oe_lists:`v2 patch series on the OE-Core Mailing List
|
||||
</pipermail/openembedded-core/2016-May/121365.html>`
|
||||
for additional information.
|
||||
@@ -442,7 +442,7 @@ The following miscellaneous changes have occurred:
|
||||
- :ref:`ref-classes-image`: Renamed COMPRESS(ION) to CONVERSION. This change
|
||||
means that ``COMPRESSIONTYPES``, ``COMPRESS_DEPENDS`` and
|
||||
``COMPRESS_CMD`` are deprecated in favor of ``CONVERSIONTYPES``,
|
||||
``CONVERSION_DEPENDS`` and ``CONVERSION_CMD``. The ``COMPRESS*``
|
||||
``CONVERSION_DEPENDS`` and :term:`CONVERSION_CMD`. The ``COMPRESS*``
|
||||
variable names will still work in the 2.2 release but metadata that
|
||||
does not need to be backwards-compatible should be changed to use the
|
||||
new names as the ``COMPRESS*`` ones will be removed in a future
|
||||
|
||||
@@ -301,7 +301,7 @@ The following are additional changes:
|
||||
likely be removed in the next Yocto Project release.
|
||||
|
||||
- The ``vmdk``, ``vdi``, and ``qcow2`` image file types are now used in
|
||||
conjunction with the "wic" image type through ``CONVERSION_CMD``.
|
||||
conjunction with the "wic" image type through :term:`CONVERSION_CMD`.
|
||||
Consequently, the equivalent image types are now ``wic.vmdk``,
|
||||
``wic.vdi``, and ``wic.qcow2``, respectively.
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ This section provides information about automatic testing changes:
|
||||
practices now dictate that you use the
|
||||
:term:`IMAGE_CLASSES` variable rather than the
|
||||
:term:`INHERIT` variable when you inherit the
|
||||
:ref:`testimage <ref-classes-testimage*>` and
|
||||
:ref:`testimage <ref-classes-testimage>` and
|
||||
:ref:`testsdk <ref-classes-testsdk>` classes used for automatic
|
||||
testing.
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ XML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
|
||||
and makes other improvements.
|
||||
|
||||
Additionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
|
||||
by ``CVE_CHECK_WHITELIST`` (replaced by :term:`CVE_CHECK_IGNORE` in version 3.5).
|
||||
by ``CVE_CHECK_WHITELIST`` (replaced by :term:`CVE_CHECK_IGNORE` in version 4.0).
|
||||
|
||||
.. _migration-3.0-bitbake-changes:
|
||||
|
||||
|
||||
@@ -252,8 +252,8 @@ Miscellaneous
|
||||
|
||||
- The previously deprecated ``COMPRESS_CMD`` and
|
||||
``CVE_CHECK_CVE_WHITELIST`` variables have been removed. Use
|
||||
``CONVERSION_CMD`` and ``CVE_CHECK_WHITELIST`` (replaced by
|
||||
:term:`CVE_CHECK_IGNORE` in version 3.5) respectively
|
||||
:term:`CONVERSION_CMD` and ``CVE_CHECK_WHITELIST`` (replaced by
|
||||
:term:`CVE_CHECK_IGNORE` in version 4.0) respectively
|
||||
instead.
|
||||
|
||||
- The obsolete ``oe_machinstall`` function previously provided in the
|
||||
|
||||
@@ -20,3 +20,5 @@ Release 4.0 (kirkstone)
|
||||
release-notes-4.0.11
|
||||
release-notes-4.0.12
|
||||
release-notes-4.0.13
|
||||
release-notes-4.0.14
|
||||
release-notes-4.0.15
|
||||
|
||||
227
documentation/migration-guides/release-notes-4.0.14.rst
Normal file
227
documentation/migration-guides/release-notes-4.0.14.rst
Normal file
File diff suppressed because one or more lines are too long
189
documentation/migration-guides/release-notes-4.0.15.rst
Normal file
189
documentation/migration-guides/release-notes-4.0.15.rst
Normal file
@@ -0,0 +1,189 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Release notes for Yocto-4.0.15 (Kirkstone)
|
||||
------------------------------------------
|
||||
|
||||
Security Fixes in Yocto-4.0.15
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- avahi: Fix :cve:`2023-1981`, :cve:`2023-38469`, :cve:`2023-38470`, :cve:`2023-38471`, :cve:`2023-38472` and :cve:`2023-38473`
|
||||
- binutils: Fix :cve:`2022-47007`, :cve:`2022-47010` and :cve:`2022-48064`
|
||||
- bluez5: Fix :cve:`2023-45866`
|
||||
- ghostscript: Ignore GhostPCL :cve:`2023-38560`
|
||||
- gnutls: Fix :cve:`2023-5981`
|
||||
- go: Ignore :cve:`2023-45283` and :cve:`2023-45284`
|
||||
- grub: Fix :cve:`2023-4692` and :cve:`2023-4693`
|
||||
- gstreamer1.0-plugins-bad: Fix :cve_mitre:`2023-44429`
|
||||
- libsndfile: Fix :cve:`2022-33065`
|
||||
- libwebp: Fix :cve:`2023-4863`
|
||||
- openssl: Fix :cve:`2023-5678`
|
||||
- python3-cryptography: Fix :cve:`2023-49083`
|
||||
- qemu: Fix :cve:`2023-1544`
|
||||
- sudo: :cve:`2023-42456` and :cve_mitre:`2023-42465`
|
||||
- tiff: Fix :cve:`2023-41175`
|
||||
- vim: Fix :cve:`2023-46246`, :cve:`2023-48231`, :cve:`2023-48232`, :cve:`2023-48233`, :cve:`2023-48234`, :cve:`2023-48235`, :cve:`2023-48236`, :cve:`2023-48237` and :cve:`2023-48706`
|
||||
- xserver-xorg: Fix :cve:`2023-5367` and :cve:`2023-5380`
|
||||
- xwayland: Fix :cve:`2023-5367`
|
||||
|
||||
|
||||
Fixes in Yocto-4.0.15
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- bash: changes to SIGINT handler while waiting for a child
|
||||
- bitbake: Fix disk space monitoring on cephfs
|
||||
- bitbake: bitbake-getvar: Make --quiet work with --recipe
|
||||
- bitbake: runqueue.py: fix PSI check logic
|
||||
- bitbake: runqueue: Add pressure change logging
|
||||
- bitbake: runqueue: convert deferral messages from bb.note to bb.debug
|
||||
- bitbake: runqueue: fix PSI check calculation
|
||||
- bitbake: runqueue: show more pressure data
|
||||
- bitbake: runqueue: show number of currently running bitbake threads when pressure changes
|
||||
- bitbake: tinfoil: Do not fail when logging is disabled and full config is used
|
||||
- build-appliance-image: Update to kirkstone head revision
|
||||
- cve-check: don't warn if a patch is remote
|
||||
- cve-check: slightly more verbose warning when adding the same package twice
|
||||
- cve-check: sort the package list in the JSON report
|
||||
- cve-exclusion_5.10.inc: update for 5.10.202
|
||||
- go: Fix issue in DNS resolver
|
||||
- goarch: Move Go architecture mapping to a library
|
||||
- gstreamer1.0-plugins-base: enable glx/opengl support
|
||||
- linux-yocto/5.10: update to v5.10.202
|
||||
- manuals: update class references
|
||||
- migration-guide: add release notes for 4.0.14
|
||||
- native: Clear TUNE_FEATURES/ABIEXTENSION
|
||||
- openssh: drop sudo from ptest dependencies
|
||||
- overview-manual: concepts: Add Bitbake Tasks Map
|
||||
- poky.conf: bump version for 4.0.15
|
||||
- python3-jinja2: Fixed ptest result output as per the standard
|
||||
- ref-manual: classes: explain cml1 class name
|
||||
- ref-manual: update :term:`SDK_NAME` variable documentation
|
||||
- ref-manual: variables: add :term:`RECIPE_MAINTAINER`
|
||||
- ref-manual: variables: document OEQA_REPRODUCIBLE_* variables
|
||||
- ref-manual: variables: mention new CDN for :term:`SSTATE_MIRRORS`
|
||||
- rust-common: Set llvm-target correctly for cross SDK targets
|
||||
- rust-cross-canadian: Fix ordering of target json config generation
|
||||
- rust-cross/rust-common: Merge arm target handling code to fix cross-canadian
|
||||
- rust-cross: Simplfy the rust_gen_target calls
|
||||
- rust-llvm: Allow overriding LLVM target archs
|
||||
- sdk-manual: extensible.rst: remove instructions for using SDK functionality directly in a yocto build
|
||||
- sudo: upgrade to 1.9.15p2
|
||||
- systemtap_git: fix used uninitialized error
|
||||
- vim: Improve locale handling
|
||||
- vim: Upgrade to 9.0.2130
|
||||
- vim: use upstream generated .po files
|
||||
|
||||
|
||||
Known Issues in Yocto-4.0.15
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- N/A
|
||||
|
||||
|
||||
Contributors to Yocto-4.0.15
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Alexander Kanavin
|
||||
- Archana Polampalli
|
||||
- BELHADJ SALEM Talel
|
||||
- Bruce Ashfield
|
||||
- Chaitanya Vadrevu
|
||||
- Chen Qi
|
||||
- Deepthi Hemraj
|
||||
- Denys Dmytriyenko
|
||||
- Hitendra Prajapati
|
||||
- Lee Chee Yang
|
||||
- Li Wang
|
||||
- Martin Jansa
|
||||
- Meenali Gupta
|
||||
- Michael Opdenacker
|
||||
- Mikko Rapeli
|
||||
- Narpat Mali
|
||||
- Niko Mauno
|
||||
- Ninad Palsule
|
||||
- Niranjan Pradhan
|
||||
- Paul Eggleton
|
||||
- Peter Kjellerstedt
|
||||
- Peter Marko
|
||||
- Richard Purdie
|
||||
- Ross Burton
|
||||
- Samantha Jalabert
|
||||
- Sanjana
|
||||
- Soumya Sambu
|
||||
- Steve Sakoman
|
||||
- Tim Orling
|
||||
- Vijay Anusuri
|
||||
- Vivek Kumbhar
|
||||
- Wenlin Kang
|
||||
- Yogita Urade
|
||||
|
||||
|
||||
Repositories / Downloads for Yocto-4.0.15
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
poky
|
||||
|
||||
- Repository Location: :yocto_git:`/poky`
|
||||
- Branch: :yocto_git:`kirkstone </poky/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.15 </poky/log/?h=yocto-4.0.15>`
|
||||
- Git Revision: :yocto_git:`755632c2fcab43aa05cdcfa529727064b045073c </poky/commit/?id=755632c2fcab43aa05cdcfa529727064b045073c>`
|
||||
- Release Artefact: poky-755632c2fcab43aa05cdcfa529727064b045073c
|
||||
- sha: b40b43bd270d21a420c399981f9cfe0eb999f15e051fc2c89d124f249cdc0bd5
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/poky-755632c2fcab43aa05cdcfa529727064b045073c.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/poky-755632c2fcab43aa05cdcfa529727064b045073c.tar.bz2
|
||||
|
||||
openembedded-core
|
||||
|
||||
- Repository Location: :oe_git:`/openembedded-core`
|
||||
- Branch: :oe_git:`kirkstone </openembedded-core/log/?h=kirkstone>`
|
||||
- Tag: :oe_git:`yocto-4.0.15 </openembedded-core/log/?h=yocto-4.0.15>`
|
||||
- Git Revision: :oe_git:`eea685e1caafd8e8121006d3f8b5d0b8a4f2a933 </openembedded-core/commit/?id=eea685e1caafd8e8121006d3f8b5d0b8a4f2a933>`
|
||||
- Release Artefact: oecore-eea685e1caafd8e8121006d3f8b5d0b8a4f2a933
|
||||
- sha: ddc3d4a2c8a097f2aa7132ae716affacc44b119c616a1eeffb7db56caa7fc79e
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/oecore-eea685e1caafd8e8121006d3f8b5d0b8a4f2a933.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/oecore-eea685e1caafd8e8121006d3f8b5d0b8a4f2a933.tar.bz2
|
||||
|
||||
meta-mingw
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-mingw`
|
||||
- Branch: :yocto_git:`kirkstone </meta-mingw/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.15 </meta-mingw/log/?h=yocto-4.0.15>`
|
||||
- Git Revision: :yocto_git:`f6b38ce3c90e1600d41c2ebb41e152936a0357d7 </meta-mingw/commit/?id=f6b38ce3c90e1600d41c2ebb41e152936a0357d7>`
|
||||
- Release Artefact: meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7
|
||||
- sha: 7d57167c19077f4ab95623d55a24c2267a3a3fb5ed83688659b4c03586373b25
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/meta-mingw-f6b38ce3c90e1600d41c2ebb41e152936a0357d7.tar.bz2
|
||||
|
||||
meta-gplv2
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-gplv2`
|
||||
- Branch: :yocto_git:`kirkstone </meta-gplv2/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.15 </meta-gplv2/log/?h=yocto-4.0.15>`
|
||||
- Git Revision: :yocto_git:`d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a </meta-gplv2/commit/?id=d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a>`
|
||||
- Release Artefact: meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a
|
||||
- sha: c386f59f8a672747dc3d0be1d4234b6039273d0e57933eb87caa20f56b9cca6d
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||
|
||||
bitbake
|
||||
|
||||
- Repository Location: :oe_git:`/bitbake`
|
||||
- Branch: :oe_git:`2.0 </bitbake/log/?h=2.0>`
|
||||
- Tag: :oe_git:`yocto-4.0.15 </bitbake/log/?h=yocto-4.0.15>`
|
||||
- Git Revision: :oe_git:`42a1c9fe698a03feb34c5bba223c6e6e0350925b </bitbake/commit/?id=42a1c9fe698a03feb34c5bba223c6e6e0350925b>`
|
||||
- Release Artefact: bitbake-42a1c9fe698a03feb34c5bba223c6e6e0350925b
|
||||
- sha: 64c684ccd661fa13e25c859dfc68d66bec79281da0f4f81b0d6a9995acb659b5
|
||||
- Download Locations:
|
||||
http://downloads.yoctoproject.org/releases/yocto/yocto-4.0.15/bitbake-42a1c9fe698a03feb34c5bba223c6e6e0350925b.tar.bz2
|
||||
http://mirrors.kernel.org/yocto/yocto/yocto-4.0.15/bitbake-42a1c9fe698a03feb34c5bba223c6e6e0350925b.tar.bz2
|
||||
|
||||
yocto-docs
|
||||
|
||||
- Repository Location: :yocto_git:`/yocto-docs`
|
||||
- Branch: :yocto_git:`kirkstone </yocto-docs/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.15 </yocto-docs/log/?h=yocto-4.0.15>`
|
||||
- Git Revision: :yocto_git:`08fda7a5601393617b1ecfe89229459e14a90b1d </yocto-docs/commit/?id=08fda7a5601393617b1ecfe89229459e14a90b1d>`
|
||||
|
||||
@@ -1026,7 +1026,7 @@ processing includes creation of a manifest file and optimizations.
|
||||
The manifest file (``.manifest``) resides in the same directory as the
|
||||
root filesystem image. This file lists out, line-by-line, the installed
|
||||
packages. The manifest file is useful for the
|
||||
:ref:`testimage <ref-classes-testimage*>` class,
|
||||
:ref:`testimage <ref-classes-testimage>` class,
|
||||
for example, to determine whether or not to run specific tests. See the
|
||||
:term:`IMAGE_MANIFEST`
|
||||
variable for additional information.
|
||||
@@ -2230,3 +2230,173 @@ For more information, see the
|
||||
BitBake User Manual. You can also reference the "`Why Not
|
||||
Fakeroot? <https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot>`__"
|
||||
article for background information on Fakeroot and Pseudo.
|
||||
|
||||
BitBake Tasks Map
|
||||
=================
|
||||
|
||||
To understand how BitBake operates in the build directory and environment
|
||||
we can consider the following recipes and diagram, to have full picture
|
||||
about the tasks that BitBake runs to generate the final package file
|
||||
for the recipe.
|
||||
|
||||
We will have two recipes as an example:
|
||||
|
||||
- ``libhello``: A recipe that provides a shared library
|
||||
- ``sayhello``: A recipe that uses ``libhello`` library to do its job
|
||||
|
||||
.. note::
|
||||
|
||||
``sayhello`` depends on ``libhello`` at compile time as it needs the shared
|
||||
library to do the dynamic linking process. It also depends on it at runtime
|
||||
as the shared library loader needs to find the library.
|
||||
For more details about dependencies check :ref:`ref-varlocality-recipe-dependencies`.
|
||||
|
||||
``libhello`` sources are as follows:
|
||||
|
||||
- ``LICENSE``: This is the license associated with this library
|
||||
- ``Makefile``: The file used by ``make`` to build the library
|
||||
- ``hellolib.c``: The implementation of the library
|
||||
- ``hellolib.h``: The C header of the library
|
||||
|
||||
``sayhello`` sources are as follows:
|
||||
|
||||
- ``LICENSE``: This is the license associated with this project
|
||||
- ``Makefile``: The file used by ``make`` to build the project
|
||||
- ``sayhello.c``: The source file of the project
|
||||
|
||||
Before presenting the contents of each file, here are the steps
|
||||
that we need to follow to accomplish what we want in the first place,
|
||||
which is integrating ``sayhello`` in our root file system:
|
||||
|
||||
#. Create a Git repository for each project with the corresponding files
|
||||
|
||||
#. Create a recipe for each project
|
||||
|
||||
#. Make sure that ``sayhello`` recipe :term:`DEPENDS` on ``libhello``
|
||||
|
||||
#. Make sure that ``sayhello`` recipe :term:`RDEPENDS` on ``libhello``
|
||||
|
||||
#. Add ``sayhello`` to :term:`IMAGE_INSTALL` to integrate it into
|
||||
the root file system
|
||||
|
||||
The following are the contents of ``libhello/Makefile``::
|
||||
|
||||
LIB=libhello.so
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
$(LIB): hellolib.o
|
||||
$(CC) $< -Wl,-soname,$(LIB).1 -fPIC $(LDFLAGS) -shared -o $(LIB).1.0
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $<
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.so*
|
||||
|
||||
.. note::
|
||||
|
||||
When creating shared libraries, it is strongly recommended to follow the Linux
|
||||
conventions and guidelines (see `this article
|
||||
<https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html>`__
|
||||
for some background).
|
||||
|
||||
.. note::
|
||||
|
||||
When creating ``Makefile`` files, it is strongly recommended to use ``CC``, ``LDFLAGS``
|
||||
and ``CFLAGS`` as BitBake will set them as environment variables according
|
||||
to your build configuration.
|
||||
|
||||
The following are the contents of ``libhello/hellolib.h``::
|
||||
|
||||
#ifndef HELLOLIB_H
|
||||
#define HELLOLIB_H
|
||||
|
||||
void Hello();
|
||||
|
||||
#endif
|
||||
|
||||
The following are the contents of ``libhello/hellolib.c``::
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void Hello(){
|
||||
puts("Hello from a Yocto demo \n");
|
||||
}
|
||||
|
||||
The following are the contents of ``sayhello/Makefile``::
|
||||
|
||||
EXEC=sayhello
|
||||
LDFLAGS += -lhello
|
||||
|
||||
all: $(EXEC)
|
||||
|
||||
$(EXEC): sayhello.c
|
||||
$(CC) $< $(LDFLAGS) $(CFLAGS) -o $(EXEC)
|
||||
|
||||
clean:
|
||||
rm -rf $(EXEC) *.o
|
||||
|
||||
The following are the contents of ``sayhello/sayhello.c``::
|
||||
|
||||
#include <hellolib.h>
|
||||
|
||||
int main(){
|
||||
Hello();
|
||||
return 0;
|
||||
}
|
||||
|
||||
The following are the contents of ``libhello_0.1.bb``::
|
||||
|
||||
SUMMARY = "Hello demo library"
|
||||
DESCRIPTION = "Hello shared library used in Yocto demo"
|
||||
|
||||
# NOTE: Set the License according to the LICENSE file of your project
|
||||
# and then add LIC_FILES_CHKSUM accordingly
|
||||
LICENSE = "CLOSED"
|
||||
|
||||
# Assuming the branch is main
|
||||
# Change <username> accordingly
|
||||
SRC_URI = "git://github.com/<username>/libhello;branch=main;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_install(){
|
||||
install -d ${D}${includedir}
|
||||
install -d ${D}${libdir}
|
||||
|
||||
install hellolib.h ${D}${includedir}
|
||||
oe_soinstall ${PN}.so.${PV} ${D}${libdir}
|
||||
}
|
||||
|
||||
The following are the contents of ``sayhello_0.1.bb``::
|
||||
|
||||
SUMMARY = "SayHello demo"
|
||||
DESCRIPTION = "SayHello project used in Yocto demo"
|
||||
|
||||
# NOTE: Set the License according to the LICENSE file of your project
|
||||
# and then add LIC_FILES_CHKSUM accordingly
|
||||
LICENSE = "CLOSED"
|
||||
|
||||
# Assuming the branch is main
|
||||
# Change <username> accordingly
|
||||
SRC_URI = "git://github.com/<username>/sayhello;branch=main;protocol=https"
|
||||
|
||||
DEPENDS += "libhello"
|
||||
RDEPENDS:${PN} += "libhello"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_install(){
|
||||
install -d ${D}/usr/bin
|
||||
install -m 0700 sayhello ${D}/usr/bin
|
||||
}
|
||||
|
||||
After placing the recipes in a custom layer we can run ``bitbake sayhello``
|
||||
to build the recipe.
|
||||
|
||||
The following diagram shows the sequences of tasks that BitBake
|
||||
executes to accomplish that.
|
||||
|
||||
.. image:: svg/bitbake_tasks_map.*
|
||||
:width: 100%
|
||||
|
||||
@@ -132,6 +132,14 @@ are several ways of working in the Yocto Project environment:
|
||||
Toaster and on how to use Toaster in general, see the
|
||||
:doc:`/toaster-manual/index`.
|
||||
|
||||
- *Using the VSCode Extension:* You can use the `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension for Visual Studio Code to start your BitBake builds through a
|
||||
graphical user interface.
|
||||
|
||||
Learn more about the VSCode Extension on the `extension's marketplace page
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__.
|
||||
|
||||
Yocto Project Source Repositories
|
||||
=================================
|
||||
|
||||
|
||||
4
documentation/overview-manual/svg/bitbake_tasks_map.svg
Normal file
4
documentation/overview-manual/svg/bitbake_tasks_map.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 197 KiB |
@@ -340,6 +340,18 @@ the Yocto Project:
|
||||
view information about builds. For information on Toaster, see the
|
||||
:doc:`/toaster-manual/index`.
|
||||
|
||||
- *VSCode IDE Extension:* The `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension for Visual Studio Code provides a rich set of features for working
|
||||
with BitBake recipes. The extension provides syntax highlighting,
|
||||
hover tips, and completion for BitBake files as well as embedded Python and
|
||||
Bash languages. Additional views and commands allow you to efficiently
|
||||
browse, build and edit recipes. It also provides SDK integration for
|
||||
cross-compiling and debugging through ``devtool``.
|
||||
|
||||
Learn more about the VSCode Extension on the `extension's frontpage
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__.
|
||||
|
||||
Production Tools
|
||||
----------------
|
||||
|
||||
@@ -610,6 +622,14 @@ Build Host runs, you have several choices.
|
||||
For information about and how to use Toaster, see the
|
||||
:doc:`/toaster-manual/index`.
|
||||
|
||||
- *Using the VSCode Extension:* You can use the `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension for Visual Studio Code to start your BitBake builds through a
|
||||
graphical user interface.
|
||||
|
||||
Learn more about the VSCode Extension on the `extension's marketplace page
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
|
||||
Reference Embedded Distribution (Poky)
|
||||
======================================
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -163,7 +163,7 @@ consists of the following pieces:
|
||||
an ARM target, did the build produce ARM binaries. If, for example,
|
||||
the build produced PPC binaries then there is a problem.
|
||||
|
||||
- :ref:`ref-classes-testimage*`: This class
|
||||
- :ref:`ref-classes-testimage`: This class
|
||||
performs runtime testing of images after they are built. The tests
|
||||
are usually used with :doc:`QEMU </dev-manual/qemu>`
|
||||
to boot the images and check the combined runtime result boot
|
||||
|
||||
@@ -63,26 +63,28 @@ and announcements. To subscribe to one of the following mailing lists,
|
||||
click on the appropriate URL in the following list and follow the
|
||||
instructions:
|
||||
|
||||
- :yocto_lists:`/g/yocto` - General Yocto Project
|
||||
- :yocto_lists:`/g/yocto` --- general Yocto Project
|
||||
discussion mailing list.
|
||||
|
||||
- :oe_lists:`/g/openembedded-core` - Discussion mailing
|
||||
- :oe_lists:`/g/openembedded-core` --- discussion mailing
|
||||
list about OpenEmbedded-Core (the core metadata).
|
||||
|
||||
- :oe_lists:`/g/openembedded-devel` - Discussion
|
||||
- :oe_lists:`/g/openembedded-devel` --- discussion
|
||||
mailing list about OpenEmbedded.
|
||||
|
||||
- :oe_lists:`/g/bitbake-devel` - Discussion mailing
|
||||
- :oe_lists:`/g/bitbake-devel` --- discussion mailing
|
||||
list about the :term:`BitBake` build tool.
|
||||
|
||||
- :yocto_lists:`/g/poky` - Discussion mailing list
|
||||
- :yocto_lists:`/g/poky` --- discussion mailing list
|
||||
about :term:`Poky`.
|
||||
|
||||
- :yocto_lists:`/g/yocto-announce` - Mailing list to
|
||||
- :yocto_lists:`/g/yocto-announce` --- mailing list to
|
||||
receive official Yocto Project release and milestone announcements.
|
||||
|
||||
For more Yocto Project-related mailing lists, see the
|
||||
:yocto_home:`Yocto Project Website <>`.
|
||||
- :yocto_lists:`/g/docs` --- discussion mailing list about the Yocto Project
|
||||
documentation.
|
||||
|
||||
See also :yocto_home:`the description of all mailing lists </community/mailing-lists/>`.
|
||||
|
||||
.. _resources-irc:
|
||||
|
||||
@@ -103,93 +105,96 @@ Links and Related Documentation
|
||||
|
||||
Here is a list of resources you might find helpful:
|
||||
|
||||
- :yocto_home:`The Yocto Project Website <>`\ *:* The home site
|
||||
- :yocto_home:`The Yocto Project Website <>`: The home site
|
||||
for the Yocto Project.
|
||||
|
||||
- :yocto_wiki:`The Yocto Project Main Wiki Page <>`\ *:* The main wiki page for
|
||||
- :yocto_wiki:`The Yocto Project Main Wiki Page <>`: The main wiki page for
|
||||
the Yocto Project. This page contains information about project
|
||||
planning, release engineering, QA & automation, a reference site map,
|
||||
and other resources related to the Yocto Project.
|
||||
|
||||
- :oe_home:`OpenEmbedded <>`\ *:* The build system used by the
|
||||
- :oe_home:`OpenEmbedded <>`: The build system used by the
|
||||
Yocto Project. This project is the upstream, generic, embedded
|
||||
distribution from which the Yocto Project derives its build system
|
||||
(Poky) and to which it contributes.
|
||||
|
||||
- :oe_wiki:`BitBake </BitBake>`\ *:* The tool used to process metadata.
|
||||
- :oe_wiki:`BitBake </BitBake>`: The tool used to process metadata.
|
||||
|
||||
- :doc:`BitBake User Manual <bitbake:index>`\ *:* A comprehensive
|
||||
- :doc:`BitBake User Manual <bitbake:index>`: A comprehensive
|
||||
guide to the BitBake tool. If you want information on BitBake, see
|
||||
this manual.
|
||||
|
||||
- :doc:`/brief-yoctoprojectqs/index` *:* This
|
||||
- :doc:`/brief-yoctoprojectqs/index`: This
|
||||
short document lets you experience building an image using the Yocto
|
||||
Project without having to understand any concepts or details.
|
||||
|
||||
- :doc:`/overview-manual/index` *:* This manual provides overview
|
||||
- :doc:`/overview-manual/index`: This manual provides overview
|
||||
and conceptual information about the Yocto Project.
|
||||
|
||||
- :doc:`/dev-manual/index` *:* This manual is a "how-to" guide
|
||||
- :doc:`/dev-manual/index`: This manual is a "how-to" guide
|
||||
that presents procedures useful to both application and system
|
||||
developers who use the Yocto Project.
|
||||
|
||||
- :doc:`/sdk-manual/index` *manual :* This
|
||||
- :doc:`/sdk-manual/index` manual: This
|
||||
guide provides information that lets you get going with the standard
|
||||
or extensible SDK. An SDK, with its cross-development toolchains,
|
||||
allows you to develop projects inside or outside of the Yocto Project
|
||||
environment.
|
||||
|
||||
- :doc:`/bsp-guide/bsp` *:* This guide defines the structure
|
||||
- :doc:`/bsp-guide/bsp`: This guide defines the structure
|
||||
for BSP components. Having a commonly understood structure encourages
|
||||
standardization.
|
||||
|
||||
- :doc:`/kernel-dev/index` *:* This manual describes
|
||||
- :doc:`/kernel-dev/index`: This manual describes
|
||||
how to work with Linux Yocto kernels as well as provides a bit of
|
||||
conceptual information on the construction of the Yocto Linux kernel
|
||||
tree.
|
||||
|
||||
- :doc:`/ref-manual/index` *:* This
|
||||
- :doc:`/ref-manual/index`: This
|
||||
manual provides reference material such as variable, task, and class
|
||||
descriptions.
|
||||
|
||||
- :yocto_docs:`Yocto Project Mega-Manual </singleindex.html>`\ *:* This manual
|
||||
- :yocto_docs:`Yocto Project Mega-Manual </singleindex.html>`: This manual
|
||||
is simply a single HTML file comprised of the bulk of the Yocto
|
||||
Project manuals. It makes it easy to search for phrases and terms used
|
||||
in the Yocto Project documentation set.
|
||||
|
||||
- :doc:`/profile-manual/index` *:* This manual presents a set of
|
||||
- :doc:`/profile-manual/index`: This manual presents a set of
|
||||
common and generally useful tracing and profiling schemes along with
|
||||
their applications (as appropriate) to each tool.
|
||||
|
||||
- :doc:`/toaster-manual/index` *:* This manual
|
||||
- :doc:`/toaster-manual/index`: This manual
|
||||
introduces and describes how to set up and use Toaster. Toaster is an
|
||||
Application Programming Interface (API) and web-based interface to
|
||||
the :term:`OpenEmbedded Build System`, which uses
|
||||
BitBake, that reports build information.
|
||||
|
||||
- :yocto_wiki:`FAQ </FAQ>`\ *:* A list of commonly asked
|
||||
- `Yocto Project BitBake extension for VSCode
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__:
|
||||
This extension provides a rich feature set when working with BitBake recipes
|
||||
within the Visual Studio Code IDE.
|
||||
|
||||
- :yocto_wiki:`FAQ </FAQ>`: A list of commonly asked
|
||||
questions and their answers.
|
||||
|
||||
- *Release Notes:* Features, updates and known issues for the current
|
||||
release of the Yocto Project. To access the Release Notes, go to the
|
||||
:yocto_home:`Downloads </software-overview/downloads>` page on
|
||||
the Yocto Project website and click on the "RELEASE INFORMATION" link
|
||||
for the appropriate release.
|
||||
- :doc:`Release Information </migration-guides/index>`:
|
||||
Migration guides, release notes, new features, updates and known issues
|
||||
for the current and past releases of the Yocto Project.
|
||||
|
||||
- :yocto_bugs:`Bugzilla <>`\ *:* The bug tracking application
|
||||
- :yocto_bugs:`Bugzilla <>`: The bug tracking application
|
||||
the Yocto Project uses. If you find problems with the Yocto Project,
|
||||
you should report them using this application.
|
||||
|
||||
- :yocto_wiki:`Bugzilla Configuration and Bug Tracking Wiki Page
|
||||
</Bugzilla_Configuration_and_Bug_Tracking>`\ *:*
|
||||
</Bugzilla_Configuration_and_Bug_Tracking>`:
|
||||
Information on how to get set up and use the Yocto Project
|
||||
implementation of Bugzilla for logging and tracking Yocto Project
|
||||
defects.
|
||||
|
||||
- *Internet Relay Chat (IRC):* Two IRC channels on
|
||||
- Internet Relay Chat (IRC): Two IRC channels on
|
||||
`Libera Chat <https://libera.chat/>`__ are
|
||||
available for Yocto Project and OpenEmbeddded discussions: ``#yocto`` and
|
||||
``#oe``, respectively.
|
||||
|
||||
- `Quick EMUlator (QEMU) <https://wiki.qemu.org/Index.html>`__\ *:* An
|
||||
- `Quick EMUlator (QEMU) <https://wiki.qemu.org/Index.html>`__: An
|
||||
open-source machine emulator and virtualizer.
|
||||
|
||||
@@ -404,15 +404,15 @@
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1846"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
id="namedview4"
|
||||
showgrid="true"
|
||||
inkscape:zoom="0.51166405"
|
||||
inkscape:cx="-43.974166"
|
||||
inkscape:cy="311.72798"
|
||||
inkscape:window-x="1994"
|
||||
inkscape:window-y="27"
|
||||
inkscape:zoom="1.4472045"
|
||||
inkscape:cx="736.24703"
|
||||
inkscape:cy="312.32629"
|
||||
inkscape:window-x="1728"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g10"
|
||||
inkscape:document-rotation="0"
|
||||
@@ -669,28 +669,28 @@
|
||||
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">4.2</tspan></text>
|
||||
<g
|
||||
id="g32107">
|
||||
id="g1379">
|
||||
<rect
|
||||
style="opacity:0.75;fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
id="rect917-0-0-4-4-9-4-5-3"
|
||||
width="140.00014"
|
||||
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-opacity:1"
|
||||
id="rect917-0-0-4-4-9-4-5-38"
|
||||
width="140.00003"
|
||||
height="45.000004"
|
||||
x="1199.9999"
|
||||
y="-229.99998"
|
||||
x="1220"
|
||||
y="-230.00005"
|
||||
ry="2.2558987" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:bold;font-size:13.3333px;line-height:125%;font-family:'Nimbus Roman';-inkscape-font-specification:'Nimbus Roman, Bold';letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;fill:#fffefe;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="1247.2329"
|
||||
x="1269.2329"
|
||||
y="-210.32925"
|
||||
id="text1185-3-55-4-0-0-0-1-1"><tspan
|
||||
sodipodi:role="line"
|
||||
x="1247.2329"
|
||||
x="1269.2329"
|
||||
y="-210.32925"
|
||||
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="tspan957-2-8-6-3-9-7-4">Nanbield</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="1247.2329"
|
||||
x="1269.2329"
|
||||
y="-192.33258"
|
||||
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">4.3</tspan></text>
|
||||
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
@@ -41,20 +41,17 @@ supported on the following distributions:
|
||||
|
||||
- Ubuntu 22.04 (LTS)
|
||||
|
||||
- Fedora 37
|
||||
- Fedora 38
|
||||
|
||||
- Debian GNU/Linux 11.x (Bullseye)
|
||||
|
||||
- AlmaLinux 8.8
|
||||
- AlmaLinux 8
|
||||
|
||||
The following distribution versions are still tested (being listed
|
||||
in :term:`SANITY_TESTED_DISTROS`), even though the organizations
|
||||
publishing them no longer make updates publicly available:
|
||||
The following distribution versions are still tested, even though the
|
||||
organizations publishing them no longer make updates publicly available:
|
||||
|
||||
- Ubuntu 18.04 (LTS)
|
||||
|
||||
- OpenSUSE Leap 15.3
|
||||
|
||||
Note that the Yocto Project doesn't have access to private updates
|
||||
that some of these versions may have. Therefore, our testing has
|
||||
limited value if you have access to such updates.
|
||||
@@ -72,18 +69,18 @@ tested on former revisions of "&DISTRO_NAME;", but no longer are:
|
||||
|
||||
- Fedora 36
|
||||
|
||||
- Fedora 37
|
||||
|
||||
- CentOS 7.x
|
||||
|
||||
- CentOS 8.x
|
||||
|
||||
- AlmaLinux 8.5
|
||||
|
||||
- AlmaLinux 8.7
|
||||
|
||||
- Debian GNU/Linux 9.x (Stretch)
|
||||
|
||||
- Debian GNU/Linux 10.x (Buster)
|
||||
|
||||
- OpenSUSE Leap 15.3
|
||||
|
||||
.. note::
|
||||
|
||||
- While the Yocto Project Team attempts to ensure all Yocto Project
|
||||
|
||||
@@ -1342,6 +1342,19 @@ system and gives an overview of their function and contents.
|
||||
the recipe will be skipped, and if the build system attempts to build
|
||||
the recipe then an error will be triggered.
|
||||
|
||||
:term:`CONVERSION_CMD`
|
||||
This variable is used for storing image conversion commands.
|
||||
Image conversion can convert an image into different objects like:
|
||||
|
||||
- Compressed version of the image
|
||||
|
||||
- Checksums for the image
|
||||
|
||||
An example of :term:`CONVERSION_CMD` from :ref:`image-types
|
||||
<ref-classes-image_types>` class is::
|
||||
|
||||
CONVERSION_CMD:lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
|
||||
|
||||
:term:`COPY_LIC_DIRS`
|
||||
If set to "1" along with the
|
||||
:term:`COPY_LIC_MANIFEST` variable, the
|
||||
@@ -2101,6 +2114,18 @@ system and gives an overview of their function and contents.
|
||||
For information on policies and on how to use this variable, see the
|
||||
comments in the ``meta/classes/compress_doc.bbclass`` file.
|
||||
|
||||
:term:`DT_FILES_PATH`
|
||||
When compiling out-of-tree device tree sources using a recipe that
|
||||
inherits the :ref:`ref-classes-devicetree` class, this variable specifies
|
||||
the path to the directory containing dts files to build.
|
||||
|
||||
Defaults to the :term:`S` directory.
|
||||
|
||||
:term:`DT_PADDING_SIZE`
|
||||
When inheriting the :ref:`ref-classes-devicetree` class, this variable
|
||||
specifies the size of padding appended to the device tree blob, used as
|
||||
extra space typically for additional properties during boot.
|
||||
|
||||
:term:`EFI_PROVIDER`
|
||||
When building bootable images (i.e. where ``hddimg``, ``iso``, or
|
||||
``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
|
||||
@@ -2860,6 +2885,73 @@ system and gives an overview of their function and contents.
|
||||
|
||||
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
|
||||
|
||||
:term:`GO_IMPORT`
|
||||
When inheriting the :ref:`ref-classes-go` class, this mandatory variable
|
||||
sets the import path for the Go package that will be created for the code
|
||||
to build. If you have a ``go.mod`` file in the source directory, this
|
||||
typically matches the path in the ``module`` line in this file.
|
||||
|
||||
Other Go programs importing this package will use this path.
|
||||
|
||||
Here is an example setting from the
|
||||
:yocto_git:`go-helloworld_0.1.bb </poky/tree/meta/recipes-extended/go-examples/go-helloworld_0.1.bb>`
|
||||
recipe::
|
||||
|
||||
GO_IMPORT = "golang.org/x/example"
|
||||
|
||||
:term:`GO_INSTALL`
|
||||
When inheriting the :ref:`ref-classes-go` class, this optional variable
|
||||
specifies which packages in the sources should be compiled and
|
||||
installed in the Go build space by the
|
||||
`go install <https://go.dev/ref/mod#go-install>`__ command.
|
||||
|
||||
Here is an example setting from the
|
||||
:oe_git:`crucible </meta-openembedded/tree/meta-oe/recipes-support/crucible/>`
|
||||
recipe::
|
||||
|
||||
GO_INSTALL = "\
|
||||
${GO_IMPORT}/cmd/crucible \
|
||||
${GO_IMPORT}/cmd/habtool \
|
||||
"
|
||||
|
||||
By default, :term:`GO_INSTALL` is defined as::
|
||||
|
||||
GO_INSTALL ?= "${GO_IMPORT}/..."
|
||||
|
||||
The ``...`` wildcard means that it will catch all
|
||||
packages found in the sources.
|
||||
|
||||
See the :term:`GO_INSTALL_FILTEROUT` variable for
|
||||
filtering out unwanted packages from the ones
|
||||
found from the :term:`GO_INSTALL` value.
|
||||
|
||||
:term:`GO_INSTALL_FILTEROUT`
|
||||
When using the Go "vendor" mechanism to bring in dependencies for a Go
|
||||
package, the default :term:`GO_INSTALL` setting, which uses the ``...``
|
||||
wildcard, will include the vendored packages in the build, which produces
|
||||
incorrect results.
|
||||
|
||||
There are also some Go packages that are structured poorly, so that the
|
||||
``...`` wildcard results in building example or test code that should not
|
||||
be included in the build, or could fail to build.
|
||||
|
||||
This optional variable allows for filtering out a subset of the sources.
|
||||
It defaults to excluding everything under the ``vendor`` subdirectory
|
||||
under package's main directory. This is the normal location for vendored
|
||||
packages, but it can be overridden by a recipe to filter out other
|
||||
subdirectories if needed.
|
||||
|
||||
:term:`GO_WORKDIR`
|
||||
When using Go Modules, the current working directory must be the directory
|
||||
containing the ``go.mod`` file, or one of its subdirectories. When the
|
||||
``go`` tool is used, it will automatically look for the ``go.mod`` file
|
||||
in the Go working directory or in any parent directory, but not in
|
||||
subdirectories.
|
||||
|
||||
When using the :ref:`ref-classes-go-mod` class to use Go modules,
|
||||
the optional :term:`GO_WORKDIR` variable, defaulting to the value
|
||||
of :term:`GO_IMPORT`, allows to specify a different Go working directory.
|
||||
|
||||
:term:`GROUPADD_PARAM`
|
||||
When inheriting the :ref:`useradd <ref-classes-useradd>` class,
|
||||
this variable specifies for a package what parameters should be
|
||||
@@ -3128,17 +3220,23 @@ system and gives an overview of their function and contents.
|
||||
material for Wic is located in the
|
||||
":doc:`/ref-manual/kickstart`" chapter.
|
||||
|
||||
:term:`IMAGE_BUILDINFO_FILE`
|
||||
When using the :ref:`ref-classes-image-buildinfo` class,
|
||||
specifies the file in the image to write the build information into. The
|
||||
default value is "``${sysconfdir}/buildinfo``".
|
||||
|
||||
:term:`IMAGE_BUILDINFO_VARS`
|
||||
When using the :ref:`ref-classes-image-buildinfo` class,
|
||||
specifies the list of variables to include in the `Build Configuration`
|
||||
section of the output file (as a space-separated list). Defaults to
|
||||
":term:`DISTRO` :term:`DISTRO_VERSION`".
|
||||
|
||||
:term:`IMAGE_CLASSES`
|
||||
A list of classes that all images should inherit. You typically use
|
||||
this variable to specify the list of classes that register the
|
||||
different types of images the OpenEmbedded build system creates.
|
||||
A list of classes that all images should inherit. This is typically used
|
||||
to enable functionality across all image recipes.
|
||||
|
||||
The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
|
||||
set this variable in your ``local.conf`` or in a distribution
|
||||
configuration file.
|
||||
|
||||
For more information, see ``meta/classes/image_types.bbclass`` in the
|
||||
:term:`Source Directory`.
|
||||
Classes specified in :term:`IMAGE_CLASSES` must be located in the
|
||||
``classes-recipe/`` or ``classes/`` subdirectories.
|
||||
|
||||
:term:`IMAGE_CMD`
|
||||
Specifies the command to create the image file for a specific image
|
||||
@@ -4115,9 +4213,18 @@ system and gives an overview of their function and contents.
|
||||
There is legacy support for specifying the full path to the device
|
||||
tree. However, providing just the ``.dtb`` file is preferred.
|
||||
|
||||
In order to use this variable, the
|
||||
:ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
|
||||
be inherited.
|
||||
In order to use this variable, the :ref:`ref-classes-kernel-devicetree`
|
||||
class must be inherited.
|
||||
|
||||
:term:`KERNEL_DEVICETREE_BUNDLE`
|
||||
When set to "1", this variable allows to bundle the Linux kernel
|
||||
and the Device Tree Binary together in a single file.
|
||||
|
||||
This feature is currently only supported on the "arm" (32 bit)
|
||||
architecture.
|
||||
|
||||
This variable is set to "0" by default by the
|
||||
:ref:`ref-classes-kernel-devicetree` class.
|
||||
|
||||
:term:`KERNEL_DTB_LINK_NAME`
|
||||
The link name of the kernel device tree binary (DTB). This variable
|
||||
@@ -4142,10 +4249,25 @@ system and gives an overview of their function and contents.
|
||||
|
||||
KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
||||
|
||||
The value of the :term:`KERNEL_ARTIFACT_NAME`
|
||||
variable, which is set in the same file, has the following value::
|
||||
See :term:`KERNEL_ARTIFACT_NAME` for additional information.
|
||||
|
||||
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
|
||||
|
||||
:term:`KERNEL_DTBDEST`
|
||||
This variable, used by the :ref:`ref-classes-kernel-devicetree`
|
||||
class, allows to change the installation directory of the DTB
|
||||
(Device Tree Binary) files.
|
||||
|
||||
It is set by default to "${KERNEL_IMAGEDEST}" by the
|
||||
:ref:`ref-classes-kernel` class.
|
||||
|
||||
:term:`KERNEL_DTBVENDORED`
|
||||
This variable, used by the :ref:`ref-classes-kernel-devicetree`,
|
||||
allows to ignore vendor subdirectories when installing DTB
|
||||
(Device Tree Binary) files, when it is set to "false".
|
||||
|
||||
To keep vendor subdirectories, set this variable to "true".
|
||||
|
||||
It is set by default to "false" by the :ref:`ref-classes-kernel` class.
|
||||
|
||||
:term:`KERNEL_DTC_FLAGS`
|
||||
Specifies the ``dtc`` flags that are passed to the Linux kernel build
|
||||
@@ -4260,9 +4382,12 @@ system and gives an overview of their function and contents.
|
||||
when building the kernel and is passed to ``make`` as the target to
|
||||
build.
|
||||
|
||||
If you want to build an alternate kernel image type in addition to that
|
||||
specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
|
||||
variable.
|
||||
To build additional kernel image types, use :term:`KERNEL_IMAGETYPES`.
|
||||
|
||||
:term:`KERNEL_IMAGETYPES`
|
||||
Lists additional types of kernel images to build for a device in addition
|
||||
to image type specified in :term:`KERNEL_IMAGETYPE`. Usually set by the
|
||||
machine configuration files.
|
||||
|
||||
:term:`KERNEL_MODULE_AUTOLOAD`
|
||||
Lists kernel modules that need to be auto-loaded during boot.
|
||||
@@ -4300,6 +4425,14 @@ system and gives an overview of their function and contents.
|
||||
provide those module configurations, see the
|
||||
:term:`module_conf_* <module_conf>` variable.
|
||||
|
||||
:term:`KERNEL_PACKAGE_NAME`
|
||||
Specifies the base name of the kernel packages, such as "kernel"
|
||||
in the kernel packages such as "kernel-modules", "kernel-image" and
|
||||
"kernel-dbg".
|
||||
|
||||
The default value for this variable is set to "kernel" by the
|
||||
:ref:`ref-classes-kernel` class.
|
||||
|
||||
:term:`KERNEL_PATH`
|
||||
The location of the kernel sources. This variable is set to the value
|
||||
of the :term:`STAGING_KERNEL_DIR` within
|
||||
@@ -4908,9 +5041,8 @@ system and gives an overview of their function and contents.
|
||||
:term:`PREMIRRORS`, the upstream source, and then
|
||||
locations specified by :term:`MIRRORS` in that order.
|
||||
|
||||
Assuming your distribution (:term:`DISTRO`) is "poky",
|
||||
the default value for :term:`MIRRORS` is defined in the
|
||||
``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
|
||||
The default value for :term:`MIRRORS` is defined in the
|
||||
``meta/classes-global/mirrors.bbclass`` file in the core metadata layer.
|
||||
|
||||
:term:`MLPREFIX`
|
||||
Specifies a prefix has been added to :term:`PN` to create a
|
||||
@@ -5142,6 +5274,16 @@ system and gives an overview of their function and contents.
|
||||
:term:`Source Directory` for details on how this class
|
||||
applies these additional sed command arguments.
|
||||
|
||||
:term:`OECMAKE_GENERATOR`
|
||||
A variable for the :ref:`ref-classes-cmake` class, allowing to choose
|
||||
which back-end will be generated by CMake to build an application.
|
||||
|
||||
By default, this variable is set to ``Ninja``, which is faster than GNU
|
||||
make, but if building is broken with Ninja, a recipe can use this
|
||||
variable to use GNU make instead::
|
||||
|
||||
OECMAKE_GENERATOR = "Unix Makefiles"
|
||||
|
||||
:term:`OE_IMPORTS`
|
||||
An internal variable used to tell the OpenEmbedded build system what
|
||||
Python modules to import for every Python function run by the system.
|
||||
@@ -5185,6 +5327,20 @@ system and gives an overview of their function and contents.
|
||||
For additional information on how this variable is used, see the
|
||||
initialization script.
|
||||
|
||||
:term:`OEQA_REPRODUCIBLE_TEST_PACKAGE`
|
||||
Set the package manager(s) for build reproducibility testing.
|
||||
See :yocto_git:`reproducible.py </poky/tree/meta/lib/oeqa/selftest/cases/reproducible.py>`
|
||||
and :doc:`/test-manual/reproducible-builds`.
|
||||
|
||||
:term:`OEQA_REPRODUCIBLE_TEST_TARGET`
|
||||
Set build target for build reproducibility testing. By default
|
||||
all available recipes are compiled with "bitbake world", see also :term:`EXCLUDE_FROM_WORLD`
|
||||
and :doc:`/test-manual/reproducible-builds`.
|
||||
|
||||
:term:`OEQA_REPRODUCIBLE_TEST_SSTATE_TARGETS`
|
||||
Set build targets which can be rebuilt using :ref:`shared state <overview-manual/concepts:shared state cache>`
|
||||
when running build reproducibility tests. See :doc:`/test-manual/reproducible-builds`.
|
||||
|
||||
:term:`OLDEST_KERNEL`
|
||||
Declares the oldest version of the Linux kernel that the produced
|
||||
binaries must support. This variable is passed into the build of the
|
||||
@@ -6104,9 +6260,8 @@ system and gives an overview of their function and contents.
|
||||
source, and then locations specified by
|
||||
:term:`MIRRORS` in that order.
|
||||
|
||||
Assuming your distribution (:term:`DISTRO`) is "poky",
|
||||
the default value for :term:`PREMIRRORS` is defined in the
|
||||
``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
|
||||
The default value for :term:`PREMIRRORS` is defined in the
|
||||
``meta/classes-global/mirrors.bbclass`` file in the core metadata layer.
|
||||
|
||||
Typically, you could add a specific server for the build system to
|
||||
attempt before any others by adding something like the following to
|
||||
@@ -6449,6 +6604,22 @@ system and gives an overview of their function and contents.
|
||||
BitBake User Manual for additional information on tasks and
|
||||
dependencies.
|
||||
|
||||
:term:`RECIPE_MAINTAINER`
|
||||
This variable defines the name and e-mail address of the maintainer of a
|
||||
recipe. Such information can be used by human users submitted changes,
|
||||
and by automated tools to send notifications, for example about
|
||||
vulnerabilities or source updates.
|
||||
|
||||
The variable can be defined in a global distribution :oe_git:`maintainers.inc
|
||||
</openembedded-core/tree/meta/conf/distro/include/maintainers.inc>` file::
|
||||
|
||||
meta/conf/distro/include/maintainers.inc:RECIPE_MAINTAINER:pn-sysvinit = "Ross Burton <ross.burton@arm.com>"
|
||||
|
||||
It can also be directly defined in a recipe,
|
||||
for example in the ``libgpiod`` one::
|
||||
|
||||
RECIPE_MAINTAINER = "Bartosz Golaszewski <brgl@bgdev.pl>"
|
||||
|
||||
:term:`RECIPE_NO_UPDATE_REASON`
|
||||
If a recipe should not be replaced by a more recent upstream version,
|
||||
putting the reason why in this variable in a recipe allows
|
||||
@@ -6850,13 +7021,16 @@ system and gives an overview of their function and contents.
|
||||
:term:`SDK_EXT_TYPE` is set to "full".
|
||||
|
||||
:term:`SDK_NAME`
|
||||
The base name for SDK output files. The name is derived from the
|
||||
:term:`DISTRO`, :term:`TCLIBC`,
|
||||
:term:`SDK_ARCH`,
|
||||
:term:`IMAGE_BASENAME`, and
|
||||
:term:`TUNE_PKGARCH` variables::
|
||||
The base name for SDK output files. The default value (as set in
|
||||
``meta-poky/conf/distro/poky.conf``) is derived from the
|
||||
:term:`DISTRO`,
|
||||
:term:`TCLIBC`,
|
||||
:term:`SDKMACHINE`,
|
||||
:term:`IMAGE_BASENAME`,
|
||||
:term:`TUNE_PKGARCH`, and
|
||||
:term:`MACHINE` variables::
|
||||
|
||||
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
|
||||
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
|
||||
|
||||
:term:`SDK_OS`
|
||||
Specifies the operating system for which the SDK will be built. The
|
||||
@@ -7387,6 +7561,38 @@ system and gives an overview of their function and contents.
|
||||
section in the Yocto Project Board Support Package Developer's Guide
|
||||
for additional information.
|
||||
|
||||
:term:`SPL_MKIMAGE_DTCOPTS`
|
||||
Options for the device tree compiler passed to ``mkimage -D`` feature
|
||||
while creating a FIT image with the :ref:`ref-classes-uboot-sign`
|
||||
class. If :term:`SPL_MKIMAGE_DTCOPTS` is not set then the
|
||||
:ref:`ref-classes-uboot-sign` class will not pass the ``-D`` option
|
||||
to ``mkimage``.
|
||||
|
||||
The default value is set to "" by the :ref:`ref-classes-uboot-config`
|
||||
class.
|
||||
|
||||
:term:`SPL_SIGN_ENABLE`
|
||||
Enable signing of the U-Boot FIT image. The default value is "0".
|
||||
This variable is used by the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`SPL_SIGN_KEYDIR`
|
||||
Location of the directory containing the RSA key and certificate used for
|
||||
signing the U-Boot FIT image, used by the :ref:`ref-classes-uboot-sign`
|
||||
class.
|
||||
|
||||
:term:`SPL_SIGN_KEYNAME`
|
||||
The name of keys used by the :ref:`ref-classes-kernel-fitimage` class
|
||||
for signing U-Boot FIT image stored in the :term:`SPL_SIGN_KEYDIR`
|
||||
directory. If we have for example a ``dev.key`` key and a ``dev.crt``
|
||||
certificate stored in the :term:`SPL_SIGN_KEYDIR` directory, you will
|
||||
have to set :term:`SPL_SIGN_KEYNAME` to ``dev``.
|
||||
|
||||
:term:`SPLASH`
|
||||
This variable, used by the :ref:`ref-classes-image` class, allows
|
||||
to choose splashscreen applications. Set it to the names of packages
|
||||
for such applications to use. This variable is set by default to
|
||||
``psplash``.
|
||||
|
||||
:term:`SPLASH_IMAGES`
|
||||
This variable, used by the ``psplash`` recipe, allows to customize
|
||||
the default splashscreen image.
|
||||
@@ -7605,6 +7811,16 @@ system and gives an overview of their function and contents.
|
||||
file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
|
||||
file://.* file:///some-local-dir/sstate/PATH"
|
||||
|
||||
The Yocto Project actually shares the cache data objects built by its
|
||||
autobuilder::
|
||||
|
||||
SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
|
||||
|
||||
As such binary artifacts are built for the generic QEMU machines
|
||||
supported by the various Poky releases, they are less likely to be
|
||||
reusable in real projects building binaries optimized for a specific
|
||||
CPU family.
|
||||
|
||||
:term:`SSTATE_SCAN_FILES`
|
||||
Controls the list of files the OpenEmbedded build system scans for
|
||||
hardcoded installation paths. The variable uses a space-separated
|
||||
@@ -8472,7 +8688,7 @@ system and gives an overview of their function and contents.
|
||||
on enabling, running, and writing these tests, see the
|
||||
":ref:`dev-manual/runtime-testing:performing automated runtime testing`"
|
||||
section in the Yocto Project Development Tasks Manual and the
|
||||
":ref:`ref-classes-testimage*`" section.
|
||||
":ref:`ref-classes-testimage`" section.
|
||||
|
||||
:term:`THISDIR`
|
||||
The directory in which the file BitBake is currently parsing is
|
||||
@@ -8716,23 +8932,30 @@ system and gives an overview of their function and contents.
|
||||
See the machine include files in the :term:`Source Directory`
|
||||
for these features.
|
||||
|
||||
:term:`UBOOT_BINARY`
|
||||
Specifies the name of the binary build by U-Boot.
|
||||
|
||||
:term:`UBOOT_CONFIG`
|
||||
Configures the :term:`UBOOT_MACHINE` and can
|
||||
also define :term:`IMAGE_FSTYPES` for individual
|
||||
cases.
|
||||
Configures one or more U-Boot configurations to build. Each
|
||||
configuration can define the :term:`UBOOT_MACHINE` and optionally the
|
||||
:term:`IMAGE_FSTYPES` and the :term:`UBOOT_BINARY`.
|
||||
|
||||
Following is an example from the ``meta-fsl-arm`` layer. ::
|
||||
Following is an example from the ``meta-freescale`` layer. ::
|
||||
|
||||
UBOOT_CONFIG ??= "sd"
|
||||
UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
|
||||
UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
|
||||
UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
|
||||
UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
|
||||
UBOOT_CONFIG ??= "sdcard-ifc-secure-boot sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
|
||||
UBOOT_CONFIG[nor] = "ls1021atwr_nor_defconfig"
|
||||
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_defconfig,,u-boot-with-spl-pbl.bin"
|
||||
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_defconfig,,u-boot-with-spl-pbl.bin"
|
||||
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_defconfig"
|
||||
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_defconfig"
|
||||
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_defconfig"
|
||||
UBOOT_CONFIG[sdcard-ifc-secure-boot] = "ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin"
|
||||
|
||||
In this example, "sd" is selected as the configuration of the possible four for the
|
||||
:term:`UBOOT_MACHINE`. The "sd" configuration defines
|
||||
"mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
|
||||
"sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
|
||||
In this example, all possible seven configurations are selected. Each
|
||||
configuration specifies "..._defconfig" as :term:`UBOOT_MACHINE`, and
|
||||
the "sd..." configurations define an individual name for
|
||||
:term:`UBOOT_BINARY`. No configuration defines a second parameter for
|
||||
:term:`IMAGE_FSTYPES` to use for the U-Boot image.
|
||||
|
||||
For more information on how the :term:`UBOOT_CONFIG` is handled, see the
|
||||
:ref:`uboot-config <ref-classes-uboot-config>`
|
||||
@@ -8756,6 +8979,64 @@ system and gives an overview of their function and contents.
|
||||
creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
|
||||
command-line parameter to the ``uboot-mkimage`` utility.
|
||||
|
||||
:term:`UBOOT_FIT_DESC`
|
||||
Specifies the description string encoded into a U-Boot fitImage. The default
|
||||
value is set by the :ref:`ref-classes-uboot-sign` class as follows::
|
||||
|
||||
UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
|
||||
|
||||
:term:`UBOOT_FIT_GENERATE_KEYS`
|
||||
Decides whether to generate the keys for signing the U-Boot fitImage if
|
||||
they don't already exist. The keys are created in :term:`SPL_SIGN_KEYDIR`.
|
||||
The default value is "0".
|
||||
|
||||
Enable this as follows::
|
||||
|
||||
UBOOT_FIT_GENERATE_KEYS = "1"
|
||||
|
||||
This variable is used in the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_HASH_ALG`
|
||||
Specifies the hash algorithm used in creating the U-Boot FIT Image.
|
||||
It is set by default to ``sha256`` by the :ref:`ref-classes-uboot-sign`
|
||||
class.
|
||||
|
||||
:term:`UBOOT_FIT_KEY_GENRSA_ARGS`
|
||||
Arguments to ``openssl genrsa`` for generating a RSA private key for
|
||||
signing the U-Boot FIT image. The default value of this variable
|
||||
is set to "-F4" by the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_KEY_REQ_ARGS`
|
||||
Arguments to ``openssl req`` for generating a certificate for signing
|
||||
the U-Boot FIT image. The default value is "-batch -new" by the
|
||||
:ref:`ref-classes-uboot-sign` class, "batch" for
|
||||
non interactive mode and "new" for generating new keys.
|
||||
|
||||
:term:`UBOOT_FIT_KEY_SIGN_PKCS`
|
||||
Format for the public key certificate used for signing the U-Boot FIT
|
||||
image. The default value is set to "x509" by the
|
||||
:ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_SIGN_ALG`
|
||||
Specifies the signature algorithm used in creating the U-Boot FIT Image.
|
||||
This variable is set by default to "rsa2048" by the
|
||||
:ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FIT_SIGN_NUMBITS`
|
||||
Size of the private key used in signing the U-Boot FIT image, in number
|
||||
of bits. The default value for this variable is set to "2048"
|
||||
by the :ref:`ref-classes-uboot-sign` class.
|
||||
|
||||
:term:`UBOOT_FITIMAGE_ENABLE`
|
||||
This variable allows to generate a FIT image for U-Boot, which is one
|
||||
of the ways to implement a verified boot process.
|
||||
|
||||
Its default value is "0", so set it to "1" to enable this functionality::
|
||||
|
||||
UBOOT_FITIMAGE_ENABLE = "1"
|
||||
|
||||
See the :ref:`ref-classes-uboot-sign` class for details.
|
||||
|
||||
:term:`UBOOT_LOADADDRESS`
|
||||
Specifies the load address for the U-Boot image. During U-Boot image
|
||||
creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
|
||||
|
||||
@@ -41,44 +41,6 @@ functionality.
|
||||
Installing the Extensible SDK
|
||||
=============================
|
||||
|
||||
Two ways to install the Extensible SDK
|
||||
--------------------------------------
|
||||
|
||||
Extensible SDK can be installed in two different ways, and both have
|
||||
their own pros and cons:
|
||||
|
||||
#. *Setting up the Extensible SDK environment directly in a Yocto build*. This
|
||||
avoids having to produce, test, distribute and maintain separate SDK
|
||||
installer archives, which can get very large. There is only one environment
|
||||
for the regular Yocto build and the SDK and less code paths where things can
|
||||
go not according to plan. It's easier to update the SDK: it simply means
|
||||
updating the Yocto layers with git fetch or layer management tooling. The
|
||||
SDK extensibility is better than in the second option: just run ``bitbake``
|
||||
again to add more things to the sysroot, or add layers if even more things
|
||||
are required.
|
||||
|
||||
#. *Setting up the Extensible SDK from a standalone installer*. This has the
|
||||
benefit of having a single, self-contained archive that includes all the
|
||||
needed binary artifacts. So nothing needs to be rebuilt, and there is no
|
||||
need to provide a well-functioning binary artefact cache over the network
|
||||
for developers with underpowered laptops.
|
||||
|
||||
Setting up the Extensible SDK environment directly in a Yocto build
|
||||
-------------------------------------------------------------------
|
||||
|
||||
#. Set up all the needed layers and a Yocto :term:`Build Directory`, e.g. a regular Yocto
|
||||
build where ``bitbake`` can be executed.
|
||||
|
||||
#. Run::
|
||||
|
||||
$ bitbake meta-ide-support
|
||||
$ bitbake -c populate_sysroot gtk+3
|
||||
# or any other target or native item that the application developer would need
|
||||
$ bitbake build-sysroots
|
||||
|
||||
Setting up the Extensible SDK from a standalone installer
|
||||
---------------------------------------------------------
|
||||
|
||||
The first thing you need to do is install the SDK on your :term:`Build
|
||||
Host` by running the ``*.sh`` installation script.
|
||||
|
||||
@@ -172,12 +134,7 @@ Running the Extensible SDK Environment Setup Script
|
||||
===================================================
|
||||
|
||||
Once you have the SDK installed, you must run the SDK environment setup
|
||||
script before you can actually use the SDK.
|
||||
|
||||
When using a SDK directly in a Yocto build, you will find the script in
|
||||
``tmp/deploy/images/qemux86-64/`` in your :term:`Build Directory`.
|
||||
|
||||
When using a standalone SDK installer, this setup script resides in
|
||||
script before you can actually use the SDK. This setup script resides in
|
||||
the directory you chose when you installed the SDK, which is either the
|
||||
default ``poky_sdk`` directory or the directory you chose during
|
||||
installation.
|
||||
@@ -195,11 +152,6 @@ script is for an IA-based target machine using i586 tuning::
|
||||
SDK environment now set up; additionally you may now run devtool to perform development tasks.
|
||||
Run devtool --help for further details.
|
||||
|
||||
When using the environment script directly in a Yocto build, it can
|
||||
be run similarly::
|
||||
|
||||
$ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
|
||||
|
||||
Running the setup script defines many environment variables needed in order to
|
||||
use the SDK (e.g. ``PATH``, :term:`CC`, :term:`LD`, and so forth). If you want
|
||||
to see all the environment variables the script exports, examine the
|
||||
@@ -1219,19 +1171,6 @@ You can use the following command to find out::
|
||||
Once you know the recipe
|
||||
(i.e. ``mesa`` in this example), you can install it.
|
||||
|
||||
When using the extensible SDK directly in a Yocto build
|
||||
-------------------------------------------------------
|
||||
|
||||
In this scenario, the Yocto build tooling, e.g. ``bitbake``
|
||||
is directly accessible to build additional items, and it
|
||||
can simply be executed directly::
|
||||
|
||||
$ bitbake mesa
|
||||
$ bitbake build-sysroots
|
||||
|
||||
When using a standalone installer for the Extensible SDK
|
||||
--------------------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
$ devtool sdk-install mesa
|
||||
|
||||
@@ -14,15 +14,13 @@ release works as intended. All the project's testing infrastructure and
|
||||
processes are publicly visible and available so that the community can
|
||||
see what testing is being performed, how it's being done and the current
|
||||
status of the tests and the project at any given time. It is intended
|
||||
that Other organizations can leverage off the process and testing
|
||||
that other organizations can leverage off the process and testing
|
||||
environment used by the Yocto Project to create their own automated,
|
||||
production test environment, building upon the foundations from the
|
||||
project core.
|
||||
|
||||
Currently, the Yocto Project Test Environment Manual has no projected
|
||||
release date. This manual is a work-in-progress and is being initially
|
||||
loaded with information from the README files and notes from key
|
||||
engineers:
|
||||
This manual is a work-in-progress and is being initially loaded with
|
||||
information from the README files and notes from key engineers:
|
||||
|
||||
- *yocto-autobuilder2:* This
|
||||
:yocto_git:`README.md </yocto-autobuilder2/tree/README.md>`
|
||||
@@ -39,7 +37,7 @@ engineers:
|
||||
As a result, it can be used by any Continuous Improvement (CI) system
|
||||
to run builds, support getting the correct code revisions, configure
|
||||
builds and layers, run builds, and collect results. The code is
|
||||
independent of any CI system, which means the code can work `Buildbot <https://docs.buildbot.net/0.9.15.post1/>`__,
|
||||
independent of any CI system, which means the code can work `Buildbot <https://docs.buildbot.net/current/>`__,
|
||||
Jenkins, or others. This repository has a branch per release of the
|
||||
project defining the tests to run on a per release basis.
|
||||
|
||||
@@ -54,8 +52,8 @@ the Autobuilder tests if things work. The Autobuilder builds all test
|
||||
targets and runs all the tests.
|
||||
|
||||
The Yocto Project uses now uses standard upstream
|
||||
`Buildbot <https://docs.buildbot.net/0.9.15.post1/>`__ (version 9) to
|
||||
drive its integration and testing. Buildbot Nine has a plug-in interface
|
||||
Buildbot (`version 3.8 <https://docs.buildbot.net/3.8.0/>`__) to
|
||||
drive its integration and testing. Buildbot has a plug-in interface
|
||||
that the Yocto Project customizes using code from the
|
||||
``yocto-autobuilder2`` repository, adding its own console UI plugin. The
|
||||
resulting UI plug-in allows you to visualize builds in a way suited to
|
||||
@@ -93,8 +91,8 @@ the following types of tests:
|
||||
- *Build Testing:* Tests whether specific configurations build by
|
||||
varying :term:`MACHINE`,
|
||||
:term:`DISTRO`, other configuration
|
||||
options, and the specific target images being built (or world). Used
|
||||
to trigger builds of all the different test configurations on the
|
||||
options, and the specific target images being built (or ``world``). This is
|
||||
used to trigger builds of all the different test configurations on the
|
||||
Autobuilder. Builds usually cover many different targets for
|
||||
different architectures, machines, and distributions, as well as
|
||||
different configurations, such as different init systems. The
|
||||
@@ -121,7 +119,8 @@ the following types of tests:
|
||||
|
||||
$ bitbake image -c testsdkext
|
||||
|
||||
The tests utilize the :ref:`testsdkext <ref-classes-testsdk>` class and the ``do_testsdkext`` task.
|
||||
The tests use the :ref:`ref-classes-testsdk` class and the
|
||||
``do_testsdkext`` task.
|
||||
|
||||
- *Feature Testing:* Various scenario-based tests are run through the
|
||||
:ref:`OpenEmbedded Self test (oe-selftest) <ref-manual/release-process:Testing and Quality Assurance>`. We test oe-selftest on each of the main distributions
|
||||
@@ -131,8 +130,8 @@ the following types of tests:
|
||||
|
||||
$ bitbake image -c testimage
|
||||
|
||||
The tests utilize the :ref:`testimage* <ref-classes-testimage*>`
|
||||
classes and the :ref:`ref-tasks-testimage` task.
|
||||
The tests use the :ref:`ref-classes-testimage`
|
||||
class and the :ref:`ref-tasks-testimage` task.
|
||||
|
||||
- *Layer Testing:* The Autobuilder has the possibility to test whether
|
||||
specific layers work with the test of the system. The layers tested
|
||||
@@ -151,7 +150,7 @@ the following types of tests:
|
||||
|
||||
$ bitbake image -c testsdk
|
||||
|
||||
The tests utilize the :ref:`testsdk <ref-classes-testsdk>` class and
|
||||
The tests use the :ref:`ref-classes-testsdk` class and
|
||||
the ``do_testsdk`` task.
|
||||
|
||||
- *Unit Testing:* Unit tests on various components of the system run
|
||||
@@ -179,7 +178,7 @@ Tests map into the codebase as follows:
|
||||
$ bitbake-selftest
|
||||
|
||||
To skip tests that access the Internet, use the ``BB_SKIP_NETTESTS``
|
||||
variable when running "bitbake-selftest" as follows::
|
||||
variable when running ``bitbake-selftest`` as follows::
|
||||
|
||||
$ BB_SKIP_NETTESTS=yes bitbake-selftest
|
||||
|
||||
@@ -191,31 +190,32 @@ Tests map into the codebase as follows:
|
||||
Use this option when you wish to skip tests that access the network,
|
||||
which are mostly necessary to test the fetcher modules. To specify
|
||||
individual test modules to run, append the test module name to the
|
||||
"bitbake-selftest" command. For example, to specify the tests for the
|
||||
bb.data.module, run::
|
||||
``bitbake-selftest`` command. For example, to specify the tests for
|
||||
``bb.tests.data.DataExpansions``, run::
|
||||
|
||||
$ bitbake-selftest bb.test.data.module
|
||||
$ bitbake-selftest bb.tests.data.DataExpansions
|
||||
|
||||
You can also specify individual tests by defining the full name and module
|
||||
plus the class path of the test, for example::
|
||||
|
||||
$ bitbake-selftest bb.tests.data.TestOverrides.test_one_override
|
||||
$ bitbake-selftest bb.tests.data.DataExpansions.test_one_var
|
||||
|
||||
The tests are based on `Python
|
||||
unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||
The tests are based on
|
||||
`Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||
|
||||
- *oe-selftest:*
|
||||
|
||||
- These tests use OE to test the workflows, which include testing
|
||||
specific features, behaviors of tasks, and API unit tests.
|
||||
|
||||
- The tests can take advantage of parallelism through the "-j"
|
||||
- The tests can take advantage of parallelism through the ``-j``
|
||||
option, which can specify a number of threads to spread the tests
|
||||
across. Note that all tests from a given class of tests will run
|
||||
in the same thread. To parallelize large numbers of tests you can
|
||||
split the class into multiple units.
|
||||
|
||||
- The tests are based on Python unittest.
|
||||
- The tests are based on
|
||||
`Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||
|
||||
- The code for the tests resides in
|
||||
``meta/lib/oeqa/selftest/cases/``.
|
||||
@@ -225,18 +225,18 @@ Tests map into the codebase as follows:
|
||||
$ oe-selftest -a
|
||||
|
||||
- To run a specific test, use the following command form where
|
||||
testname is the name of the specific test::
|
||||
``testname`` is the name of the specific test::
|
||||
|
||||
$ oe-selftest -r <testname>
|
||||
|
||||
For example, the following command would run the tinfoil
|
||||
getVar API test::
|
||||
For example, the following command would run the ``tinfoil``
|
||||
``getVar`` API test::
|
||||
|
||||
$ oe-selftest -r tinfoil.TinfoilTests.test_getvar
|
||||
|
||||
It is also possible to run a set
|
||||
of tests. For example the following command will run all of the
|
||||
tinfoil tests::
|
||||
``tinfoil`` tests::
|
||||
|
||||
$ oe-selftest -r tinfoil
|
||||
|
||||
@@ -271,7 +271,7 @@ Tests map into the codebase as follows:
|
||||
- These tests build an extended SDK (eSDK), install that eSDK, and
|
||||
run tests against the eSDK.
|
||||
|
||||
- The code for these tests resides in ``meta/lib/oeqa/esdk``.
|
||||
- The code for these tests resides in ``meta/lib/oeqa/sdkext/cases/``.
|
||||
|
||||
- To run the tests, use the following command form::
|
||||
|
||||
@@ -298,13 +298,13 @@ Tests map into the codebase as follows:
|
||||
Git repository.
|
||||
|
||||
Use the ``oe-build-perf-report`` command to generate text reports
|
||||
and HTML reports with graphs of the performance data. For
|
||||
examples, see
|
||||
:yocto_dl:`/releases/yocto/yocto-2.7/testresults/buildperf-centos7/perf-centos7.yoctoproject.org_warrior_20190414204758_0e39202.html`
|
||||
and HTML reports with graphs of the performance data. See
|
||||
:yocto_dl:`html </releases/yocto/yocto-4.3/testresults/buildperf-debian11/perf-debian11_nanbield_20231019191258_15b576c410.html>`
|
||||
and
|
||||
:yocto_dl:`/releases/yocto/yocto-2.7/testresults/buildperf-centos7/perf-centos7.yoctoproject.org_warrior_20190414204758_0e39202.txt`.
|
||||
:yocto_dl:`txt </releases/yocto/yocto-4.3/testresults/buildperf-debian11/perf-debian11_nanbield_20231019191258_15b576c410.txt>`
|
||||
examples.
|
||||
|
||||
- The tests are contained in ``lib/oeqa/buildperf/test_basic.py``.
|
||||
- The tests are contained in ``meta/lib/oeqa/buildperf/test_basic.py``.
|
||||
|
||||
Test Examples
|
||||
=============
|
||||
@@ -312,16 +312,14 @@ Test Examples
|
||||
This section provides example tests for each of the tests listed in the
|
||||
:ref:`test-manual/intro:How Tests Map to Areas of Code` section.
|
||||
|
||||
For oeqa tests, testcases for each area reside in the main test
|
||||
directory at ``meta/lib/oeqa/selftest/cases`` directory.
|
||||
- ``oe-selftest`` testcases reside in the ``meta/lib/oeqa/selftest/cases`` directory.
|
||||
|
||||
For oe-selftest. bitbake testcases reside in the ``lib/bb/tests/``
|
||||
directory.
|
||||
- ``bitbake-selftest`` testcases reside in the ``bitbake/lib/bb/tests/`` directory.
|
||||
|
||||
``bitbake-selftest``
|
||||
--------------------
|
||||
|
||||
A simple test example from ``lib/bb/tests/data.py`` is::
|
||||
A simple test example from ``bitbake/lib/bb/tests/data.py`` is::
|
||||
|
||||
class DataExpansions(unittest.TestCase):
|
||||
def setUp(self):
|
||||
@@ -334,21 +332,24 @@ A simple test example from ``lib/bb/tests/data.py`` is::
|
||||
val = self.d.expand("${foo}")
|
||||
self.assertEqual(str(val), "value_of_foo")
|
||||
|
||||
In this example, a ``DataExpansions`` class of tests is created,
|
||||
derived from standard python unittest. The class has a common ``setUp``
|
||||
function which is shared by all the tests in the class. A simple test is
|
||||
then added to test that when a variable is expanded, the correct value
|
||||
is found.
|
||||
In this example, a ``DataExpansions`` class of tests is created, derived from
|
||||
standard `Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||
The class has a common ``setUp`` function which is shared by all the tests in
|
||||
the class. A simple test is then added to test that when a variable is
|
||||
expanded, the correct value is found.
|
||||
|
||||
Bitbake selftests are straightforward python unittest. Refer to the
|
||||
Python unittest documentation for additional information on writing
|
||||
these tests at: https://docs.python.org/3/library/unittest.html.
|
||||
BitBake selftests are straightforward
|
||||
`Python unittest <https://docs.python.org/3/library/unittest.html>`__.
|
||||
Refer to the `Python unittest documentation
|
||||
<https://docs.python.org/3/library/unittest.html>`__ for additional information
|
||||
on writing such tests.
|
||||
|
||||
``oe-selftest``
|
||||
---------------
|
||||
|
||||
These tests are more complex due to the setup required behind the scenes
|
||||
for full builds. Rather than directly using Python's unittest, the code
|
||||
for full builds. Rather than directly using `Python unittest
|
||||
<https://docs.python.org/3/library/unittest.html>`__, the code
|
||||
wraps most of the standard objects. The tests can be simple, such as
|
||||
testing a command from within the OE build environment using the
|
||||
following example::
|
||||
@@ -385,14 +386,14 @@ so tests within a given test class should always run in the same build,
|
||||
while tests in different classes or modules may be split into different
|
||||
builds. There is no data store available for these tests since the tests
|
||||
launch the ``bitbake`` command and exist outside of its context. As a
|
||||
result, common bitbake library functions (bb.\*) are also unavailable.
|
||||
result, common BitBake library functions (``bb.\*``) are also unavailable.
|
||||
|
||||
``testimage``
|
||||
-------------
|
||||
|
||||
These tests are run once an image is up and running, either on target
|
||||
hardware or under QEMU. As a result, they are assumed to be running in a
|
||||
target image environment, as opposed to a host build environment. A
|
||||
target image environment, as opposed to in a host build environment. A
|
||||
simple example from ``meta/lib/oeqa/runtime/cases/python.py`` contains
|
||||
the following::
|
||||
|
||||
@@ -407,19 +408,19 @@ the following::
|
||||
|
||||
In this example, the ``OERuntimeTestCase`` class wraps
|
||||
``unittest.TestCase``. Within the test, ``self.target`` represents the
|
||||
target system, where commands can be run on it using the ``run()``
|
||||
target system, where commands can be run using the ``run()``
|
||||
method.
|
||||
|
||||
To ensure certain test or package dependencies are met, you can use the
|
||||
To ensure certain tests or package dependencies are met, you can use the
|
||||
``OETestDepends`` and ``OEHasPackage`` decorators. For example, the test
|
||||
in this example would only make sense if python3-core is installed in
|
||||
in this example would only make sense if ``python3-core`` is installed in
|
||||
the image.
|
||||
|
||||
``testsdk_ext``
|
||||
---------------
|
||||
|
||||
These tests are run against built extensible SDKs (eSDKs). The tests can
|
||||
assume that the eSDK environment has already been setup. An example from
|
||||
assume that the eSDK environment has already been set up. An example from
|
||||
``meta/lib/oeqa/sdk/cases/devtool.py`` contains the following::
|
||||
|
||||
class DevtoolTest(OESDKExtTestCase):
|
||||
@@ -466,9 +467,9 @@ following::
|
||||
output = self._run(cmd)
|
||||
self.assertEqual(output, "Hello, world\n")
|
||||
|
||||
In this example, if nativesdk-python3-core has been installed into the SDK, the code runs
|
||||
the python3 interpreter with a basic command to check it is working
|
||||
correctly. The test would only run if python3 is installed in the SDK.
|
||||
In this example, if ``nativesdk-python3-core`` has been installed into the SDK,
|
||||
the code runs the ``python3`` interpreter with a basic command to check it is
|
||||
working correctly. The test would only run if Python3 is installed in the SDK.
|
||||
|
||||
``oe-build-perf-test``
|
||||
----------------------
|
||||
@@ -512,9 +513,9 @@ an isolated directory.
|
||||
|
||||
**Running "cleansstate" is not permitted.**
|
||||
|
||||
This can delete files from SSTATE_DIR which would potentially break
|
||||
other builds running in parallel. If this is required, SSTATE_DIR must
|
||||
be set to an isolated directory. Alternatively, you can use the "-f"
|
||||
This can delete files from :term:`SSTATE_DIR` which would potentially break
|
||||
other builds running in parallel. If this is required, :term:`SSTATE_DIR` must
|
||||
be set to an isolated directory. Alternatively, you can use the ``-f``
|
||||
option with the ``bitbake`` command to "taint" tasks by changing the
|
||||
sstate checksums to ensure sstate cache items will not be reused.
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ helps review and test patches and this is his testing tree).
|
||||
We have two broad categories of test builds, including "full" and
|
||||
"quick". On the Autobuilder, these can be seen as "a-quick" and
|
||||
"a-full", simply for ease of sorting in the UI. Use our Autobuilder
|
||||
console view to see where me manage most test-related items, available
|
||||
at: :yocto_ab:`/typhoon/#/console`.
|
||||
:yocto_ab:`console view </typhoon/#/console>` to see where we manage most
|
||||
test-related items.
|
||||
|
||||
Builds are triggered manually when the test branches are ready. The
|
||||
builds are monitored by the SWAT team. For additional information, see
|
||||
@@ -34,24 +34,21 @@ which the result was required.
|
||||
|
||||
The Autobuilder does build the ``master`` branch once daily for several
|
||||
reasons, in particular, to ensure the current ``master`` branch does
|
||||
build, but also to keep ``yocto-testresults``
|
||||
(:yocto_git:`/yocto-testresults/`),
|
||||
buildhistory
|
||||
(:yocto_git:`/poky-buildhistory/`), and
|
||||
our sstate up to date. On the weekend, there is a master-next build
|
||||
build, but also to keep (:yocto_git:`yocto-testresults </yocto-testresults/>`),
|
||||
(:yocto_git:`buildhistory </poky-buildhistory/>`), and
|
||||
our sstate up to date. On the weekend, there is a ``master-next`` build
|
||||
instead to ensure the test results are updated for the less frequently
|
||||
run targets.
|
||||
|
||||
Performance builds (buildperf-\* targets in the console) are triggered
|
||||
Performance builds (``buildperf-\*`` targets in the console) are triggered
|
||||
separately every six hours and automatically push their results to the
|
||||
buildstats repository at:
|
||||
:yocto_git:`/yocto-buildstats/`.
|
||||
:yocto_git:`buildstats </yocto-buildstats/>` repository.
|
||||
|
||||
The 'quick' targets have been selected to be the ones which catch the
|
||||
most failures or give the most valuable data. We run 'fast' ptests in
|
||||
The "quick" targets have been selected to be the ones which catch the
|
||||
most failures or give the most valuable data. We run "fast" ptests in
|
||||
this case for example but not the ones which take a long time. The quick
|
||||
target doesn't include \*-lsb builds for all architectures, some world
|
||||
builds and doesn't trigger performance tests or ltp testing. The full
|
||||
target doesn't include ``\*-lsb`` builds for all architectures, some ``world``
|
||||
builds and doesn't trigger performance tests or ``ltp`` testing. The full
|
||||
build includes all these things and is slower but more comprehensive.
|
||||
|
||||
Release Builds
|
||||
@@ -67,12 +64,12 @@ that in :ref:`test-manual/test-process:day to day development`, in that the
|
||||
a-full target of the Autobuilder is used but in addition the form is
|
||||
configured to generate and publish artifacts and the milestone number,
|
||||
version, release candidate number and other information is entered. The
|
||||
box to "generate an email to QA"is also checked.
|
||||
box to "generate an email to QA" is also checked.
|
||||
|
||||
When the build completes, an email is sent out using the send-qa-email
|
||||
script in the ``yocto-autobuilder-helper`` repository to the list of
|
||||
people configured for that release. Release builds are placed into a
|
||||
directory in https://autobuilder.yocto.io/pub/releases on the
|
||||
When the build completes, an email is sent out using the ``send-qa-email``
|
||||
script in the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||
repository to the list of people configured for that release. Release builds
|
||||
are placed into a directory in https://autobuilder.yocto.io/pub/releases on the
|
||||
Autobuilder which is included in the email. The process from here is
|
||||
more manual and control is effectively passed to release engineering.
|
||||
The next steps include:
|
||||
@@ -80,14 +77,15 @@ The next steps include:
|
||||
- QA teams respond to the email saying which tests they plan to run and
|
||||
when the results will be available.
|
||||
|
||||
- QA teams run their tests and share their results in the yocto-
|
||||
testresults-contrib repository, along with a summary of their
|
||||
findings.
|
||||
- QA teams run their tests and share their results in the
|
||||
:yocto_git:`yocto-testresults-contrib </yocto-testresults-contrib>`
|
||||
repository, along with a summary of their findings.
|
||||
|
||||
- Release engineering prepare the release as per their process.
|
||||
|
||||
- Test results from the QA teams are included into the release in
|
||||
separate directories and also uploaded to the yocto-testresults
|
||||
separate directories and also uploaded to the
|
||||
:yocto_git:`yocto-testresults </yocto-testresults>`
|
||||
repository alongside the other test results for the given revision.
|
||||
|
||||
- The QA report in the final release is regenerated using resulttool to
|
||||
|
||||
@@ -9,8 +9,8 @@ Execution Flow within the Autobuilder
|
||||
|
||||
The "a-full" and "a-quick" targets are the usual entry points into the
|
||||
Autobuilder and it makes sense to follow the process through the system
|
||||
starting there. This is best visualized from the Autobuilder Console
|
||||
view (:yocto_ab:`/typhoon/#/console`).
|
||||
starting there. This is best visualized from the :yocto_ab:`Autobuilder
|
||||
Console view </typhoon/#/console>`.
|
||||
|
||||
Each item along the top of that view represents some "target build" and
|
||||
these targets are all run in parallel. The 'full' build will trigger the
|
||||
@@ -18,9 +18,9 @@ majority of them, the "quick" build will trigger some subset of them.
|
||||
The Autobuilder effectively runs whichever configuration is defined for
|
||||
each of those targets on a separate buildbot worker. To understand the
|
||||
configuration, you need to look at the entry on ``config.json`` file
|
||||
within the ``yocto-autobuilder-helper`` repository. The targets are
|
||||
defined in the ‘overrides' section, a quick example could be qemux86-64
|
||||
which looks like::
|
||||
within the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||
repository. The targets are defined in the ``overrides`` section, a quick
|
||||
example could be ``qemux86-64`` which looks like::
|
||||
|
||||
"qemux86-64" : {
|
||||
"MACHINE" : "qemux86-64",
|
||||
@@ -32,8 +32,8 @@ which looks like::
|
||||
}
|
||||
},
|
||||
|
||||
And to expand that, you need the "arch-qemu" entry from
|
||||
the "templates" section, which looks like::
|
||||
And to expand that, you need the ``arch-qemu`` entry from
|
||||
the ``templates`` section, which looks like::
|
||||
|
||||
"arch-qemu" : {
|
||||
"BUILDINFO" : true,
|
||||
@@ -54,11 +54,11 @@ the "templates" section, which looks like::
|
||||
}
|
||||
},
|
||||
|
||||
Combining these two entries you can see that "qemux86-64" is a three step build where the
|
||||
``bitbake BBTARGETS`` would be run, then ``bitbake SANITYTARGETS`` for each step; all for
|
||||
``MACHINE="qemx86-64"`` but with differing SDKMACHINE settings. In step
|
||||
1 an extra variable is added to the ``auto.conf`` file to enable wic
|
||||
image generation.
|
||||
Combining these two entries you can see that ``qemux86-64`` is a three step
|
||||
build where ``bitbake BBTARGETS`` would be run, then ``bitbake SANITYTARGETS``
|
||||
for each step; all for ``MACHINE="qemux86-64"`` but with differing
|
||||
:term:`SDKMACHINE` settings. In step 1, an extra variable is added to the
|
||||
``auto.conf`` file to enable wic image generation.
|
||||
|
||||
While not every detail of this is covered here, you can see how the
|
||||
template mechanism allows quite complex configurations to be built up
|
||||
@@ -88,9 +88,9 @@ roughly consist of:
|
||||
|
||||
#. *Obtain yocto-autobuilder-helper*
|
||||
|
||||
This step clones the ``yocto-autobuilder-helper`` git repository.
|
||||
This is necessary to prevent the requirement to maintain all the
|
||||
release or project-specific code within Buildbot. The branch chosen
|
||||
This step clones the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||
git repository. This is necessary to avoid the requirement to maintain all
|
||||
the release or project-specific code within Buildbot. The branch chosen
|
||||
matches the release being built so we can support older releases and
|
||||
still make changes in newer ones.
|
||||
|
||||
@@ -163,8 +163,9 @@ Autobuilder Worker Janitor
|
||||
--------------------------
|
||||
|
||||
This is a process running on each Worker that performs two basic
|
||||
operations, including background file deletion at IO idle (see :ref:`test-manual/understand-autobuilder:Autobuilder Target Execution Overview`: Run clobberdir) and
|
||||
maintenance of a cache of cloned repositories to improve the speed
|
||||
operations, including background file deletion at IO idle (see
|
||||
"Run clobberdir" in :ref:`test-manual/understand-autobuilder:Autobuilder Target Execution Overview`)
|
||||
and maintenance of a cache of cloned repositories to improve the speed
|
||||
the system can checkout repositories.
|
||||
|
||||
Shared DL_DIR
|
||||
@@ -172,7 +173,7 @@ Shared DL_DIR
|
||||
|
||||
The Workers are all connected over NFS which allows DL_DIR to be shared
|
||||
between them. This reduces network accesses from the system and allows
|
||||
the build to be sped up. Usage of the directory within the build system
|
||||
the build to be sped up. The usage of the directory within the build system
|
||||
is designed to be able to be shared over NFS.
|
||||
|
||||
Shared SSTATE_DIR
|
||||
@@ -180,8 +181,8 @@ Shared SSTATE_DIR
|
||||
|
||||
The Workers are all connected over NFS which allows the ``sstate``
|
||||
directory to be shared between them. This means once a Worker has built
|
||||
an artifact, all the others can benefit from it. Usage of the directory
|
||||
within the directory is designed for sharing over NFS.
|
||||
an artifact, all the others can benefit from it. The usage of the directory
|
||||
within the build system is designed for sharing over NFS.
|
||||
|
||||
Resulttool
|
||||
----------
|
||||
@@ -192,7 +193,7 @@ in a given build and their status. Additional information, such as
|
||||
failure logs or the time taken to run the tests, may also be included.
|
||||
|
||||
Resulttool is part of OpenEmbedded-Core and is used to manipulate these
|
||||
json results files. It has the ability to merge files together, display
|
||||
JSON results files. It has the ability to merge files together, display
|
||||
reports of the test results and compare different result files.
|
||||
|
||||
For details, see :yocto_wiki:`/Resulttool`.
|
||||
@@ -206,7 +207,11 @@ are general setup steps that are run once and include:
|
||||
|
||||
#. Set up any ``buildtools-tarball`` if configured.
|
||||
|
||||
<<<<<<< HEAD
|
||||
#. Call "buildhistory-init" if buildhistory is configured.
|
||||
=======
|
||||
#. Call ``buildhistory-init`` if :ref:`ref-classes-buildhistory` is configured.
|
||||
>>>>>>> 7c4f616f77 (test-manual: text and formatting fixes)
|
||||
|
||||
For each step that is configured in ``config.json``, it will perform the
|
||||
following:
|
||||
@@ -250,15 +255,16 @@ Deploying Yocto Autobuilder
|
||||
===========================
|
||||
|
||||
The most up to date information about how to setup and deploy your own
|
||||
Autobuilder can be found in README.md in the ``yocto-autobuilder2``
|
||||
repository.
|
||||
Autobuilder can be found in :yocto_git:`README.md </yocto-autobuilder2/tree/README.md>`
|
||||
in the :yocto_git:`yocto-autobuilder2 </yocto-autobuilder2>` repository.
|
||||
|
||||
We hope that people can use the ``yocto-autobuilder2`` code directly but
|
||||
it is inevitable that users will end up needing to heavily customise the
|
||||
``yocto-autobuilder-helper`` repository, particularly the
|
||||
``config.json`` file as they will want to define their own test matrix.
|
||||
We hope that people can use the :yocto_git:`yocto-autobuilder2 </yocto-autobuilder2>`
|
||||
code directly but it is inevitable that users will end up needing to heavily
|
||||
customize the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>`
|
||||
repository, particularly the ``config.json`` file as they will want to define
|
||||
their own test matrix.
|
||||
|
||||
The Autobuilder supports wo customization options:
|
||||
The Autobuilder supports two customization options:
|
||||
|
||||
- variable substitution
|
||||
|
||||
@@ -278,7 +284,7 @@ environment::
|
||||
$ ABHELPER_JSON="config.json /some/location/local.json"
|
||||
|
||||
One issue users often run into is validation of the ``config.json`` files. A
|
||||
tip for minimizing issues from invalid json files is to use a Git
|
||||
tip for minimizing issues from invalid JSON files is to use a Git
|
||||
``pre-commit-hook.sh`` script to verify the JSON file before committing
|
||||
it. Create a symbolic link as follows::
|
||||
|
||||
|
||||
@@ -29,8 +29,9 @@ contact us with other suggestions.
|
||||
#. **Get to know the layer index:**
|
||||
All layers can be found in the :oe_layerindex:`layer index <>`. Layers which
|
||||
have applied for Yocto Project Compatible status (structure continuity
|
||||
assurance and testing) can be found in the :yocto_home:`Yocto Project Compatible index
|
||||
</software-over/layer/>`. Generally check the Compatible layer index first,
|
||||
assurance and testing) can be found in the :yocto_home:`Yocto Project
|
||||
Compatible Layers </development/yocto-project-compatible-layers/>` page.
|
||||
Generally check the Compatible layer index first,
|
||||
and if you don't find the necessary layer check the general layer index. The
|
||||
layer index is an original artifact from the Open Embedded Project. As such,
|
||||
that index doesn't have the curating and testing that the Yocto Project
|
||||
@@ -212,6 +213,13 @@ contact us with other suggestions.
|
||||
OpenEmbedded build system. If you are interested in using this type of
|
||||
interface to create images, see the :doc:`/toaster-manual/index`.
|
||||
|
||||
* **Discover the VSCode extension**: The `Yocto Project BitBake
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__
|
||||
extension for the Visual Studio Code IDE provides language features and
|
||||
commands for working with the Yocto Project. If you are interested in using
|
||||
this extension, visit its `marketplace page
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__.
|
||||
|
||||
* **Have Available the Yocto Project Reference Manual**: Unlike the rest of
|
||||
the Yocto Project manual set, this manual is comprised of material suited
|
||||
for reference rather than procedures. You can get build details, a closer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
#DISTRO_VERSION = "3.4+snapshot-${METADATA_REVISION}"
|
||||
DISTRO_VERSION = "4.0.14"
|
||||
DISTRO_VERSION = "4.0.16"
|
||||
DISTRO_CODENAME = "kirkstone"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
|
||||
@@ -12,7 +12,7 @@ inherit logging
|
||||
|
||||
OE_EXTRA_IMPORTS ?= ""
|
||||
|
||||
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust ${OE_EXTRA_IMPORTS}"
|
||||
OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license oe.qa oe.reproducible oe.rust oe.go ${OE_EXTRA_IMPORTS}"
|
||||
OE_IMPORTS[type] = "list"
|
||||
|
||||
PACKAGECONFIG_CONFARGS ??= ""
|
||||
|
||||
@@ -98,6 +98,8 @@ def generate_json_report(d, out_path, link_path):
|
||||
cve_check_merge_jsons(summary, data)
|
||||
filename = f.readline()
|
||||
|
||||
summary["package"].sort(key=lambda d: d['name'])
|
||||
|
||||
with open(out_path, "w") as f:
|
||||
json.dump(summary, f, indent=2)
|
||||
|
||||
|
||||
@@ -62,6 +62,10 @@ python () {
|
||||
else:
|
||||
d.setVar('B', '${WORKDIR}/${BPN}-${PV}')
|
||||
|
||||
if d.getVar('SRCREV', "INVALID") != "INVALID":
|
||||
# Ensure SRCREV has been processed before accessing SRC_URI
|
||||
bb.fetch.get_srcrev(d)
|
||||
|
||||
local_srcuri = []
|
||||
fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
|
||||
for url in fetch.urls:
|
||||
|
||||
@@ -61,31 +61,10 @@ SECURITY_NOPIE_CFLAGS ??= ""
|
||||
CCACHE_DISABLE ?= "1"
|
||||
|
||||
def go_map_arch(a, d):
|
||||
import re
|
||||
if re.match('i.86', a):
|
||||
return '386'
|
||||
elif a == 'x86_64':
|
||||
return 'amd64'
|
||||
elif re.match('arm.*', a):
|
||||
return 'arm'
|
||||
elif re.match('aarch64.*', a):
|
||||
return 'arm64'
|
||||
elif re.match('mips64el.*', a):
|
||||
return 'mips64le'
|
||||
elif re.match('mips64.*', a):
|
||||
return 'mips64'
|
||||
elif a == 'mips':
|
||||
return 'mips'
|
||||
elif a == 'mipsel':
|
||||
return 'mipsle'
|
||||
elif re.match('p(pc|owerpc)(64le)', a):
|
||||
return 'ppc64le'
|
||||
elif re.match('p(pc|owerpc)(64)', a):
|
||||
return 'ppc64'
|
||||
elif a == 'riscv64':
|
||||
return 'riscv64'
|
||||
else:
|
||||
arch = oe.go.map_arch(a)
|
||||
if not arch:
|
||||
raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a)
|
||||
return arch
|
||||
|
||||
def go_map_arm(a, d):
|
||||
if a.startswith("arm"):
|
||||
|
||||
@@ -23,6 +23,8 @@ TARGET_CFLAGS = "${BUILD_CFLAGS}"
|
||||
TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
|
||||
TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
|
||||
TARGET_FPU = ""
|
||||
TUNE_FEATURES = ""
|
||||
ABIEXTENSION = ""
|
||||
|
||||
HOST_ARCH = "${BUILD_ARCH}"
|
||||
HOST_OS = "${BUILD_OS}"
|
||||
|
||||
@@ -101,36 +101,12 @@ TESTIMAGE_DUMP_DIR ?= "${LOG_DIR}/runtime-hostdump/"
|
||||
TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
|
||||
|
||||
testimage_dump_target () {
|
||||
top -bn1
|
||||
ps
|
||||
free
|
||||
df
|
||||
# The next command will export the default gateway IP
|
||||
export DEFAULT_GATEWAY=$(ip route | awk '/default/ { print $3}')
|
||||
ping -c3 $DEFAULT_GATEWAY
|
||||
dmesg
|
||||
netstat -an
|
||||
ip address
|
||||
# Next command will dump logs from /var/log/
|
||||
find /var/log/ -type f 2>/dev/null -exec echo "====================" \; -exec echo {} \; -exec echo "====================" \; -exec cat {} \; -exec echo "" \;
|
||||
}
|
||||
|
||||
testimage_dump_host () {
|
||||
top -bn1
|
||||
iostat -x -z -N -d -p ALL 20 2
|
||||
ps -ef
|
||||
free
|
||||
df
|
||||
memstat
|
||||
dmesg
|
||||
ip -s link
|
||||
netstat -an
|
||||
}
|
||||
|
||||
testimage_dump_monitor () {
|
||||
query-status
|
||||
query-block
|
||||
dump-guest-memory {"paging":false,"protocol":"file:%s.img"}
|
||||
}
|
||||
|
||||
python do_testimage() {
|
||||
|
||||
@@ -89,11 +89,6 @@ def get_patched_cves(d):
|
||||
for url in oe.patch.src_patches(d):
|
||||
patch_file = bb.fetch.decodeurl(url)[2]
|
||||
|
||||
# Remote compressed patches may not be unpacked, so silently ignore them
|
||||
if not os.path.isfile(patch_file):
|
||||
bb.warn("%s does not exist, cannot extract CVE list" % patch_file)
|
||||
continue
|
||||
|
||||
# Check patch file name for CVE ID
|
||||
fname_match = cve_file_name_match.search(patch_file)
|
||||
if fname_match:
|
||||
@@ -101,6 +96,12 @@ def get_patched_cves(d):
|
||||
patched_cves.add(cve)
|
||||
bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file))
|
||||
|
||||
# Remote patches won't be present and compressed patches won't be
|
||||
# unpacked, so say we're not scanning them
|
||||
if not os.path.isfile(patch_file):
|
||||
bb.note("%s is remote or compressed, not scanning content" % patch_file)
|
||||
continue
|
||||
|
||||
with open(patch_file, "r", encoding="utf-8") as f:
|
||||
try:
|
||||
patch_text = f.read()
|
||||
@@ -159,7 +160,7 @@ def cve_check_merge_jsons(output, data):
|
||||
|
||||
for product in output["package"]:
|
||||
if product["name"] == data["package"][0]["name"]:
|
||||
bb.error("Error adding the same package twice")
|
||||
bb.error("Error adding the same package %s twice" % product["name"])
|
||||
return
|
||||
|
||||
output["package"].append(data["package"][0])
|
||||
|
||||
32
meta/lib/oe/go.py
Normal file
32
meta/lib/oe/go.py
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright OpenEmbedded Contributors
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
import re
|
||||
|
||||
def map_arch(a):
|
||||
if re.match('i.86', a):
|
||||
return '386'
|
||||
elif a == 'x86_64':
|
||||
return 'amd64'
|
||||
elif re.match('arm.*', a):
|
||||
return 'arm'
|
||||
elif re.match('aarch64.*', a):
|
||||
return 'arm64'
|
||||
elif re.match('mips64el.*', a):
|
||||
return 'mips64le'
|
||||
elif re.match('mips64.*', a):
|
||||
return 'mips64'
|
||||
elif a == 'mips':
|
||||
return 'mips'
|
||||
elif a == 'mipsel':
|
||||
return 'mipsle'
|
||||
elif re.match('p(pc|owerpc)(64le)', a):
|
||||
return 'ppc64le'
|
||||
elif re.match('p(pc|owerpc)(64)', a):
|
||||
return 'ppc64'
|
||||
elif a == 'riscv64':
|
||||
return 'riscv64'
|
||||
return ''
|
||||
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
97
meta/recipes-bsp/grub/files/CVE-2023-4692.patch
Normal file
@@ -0,0 +1,97 @@
|
||||
From 43651027d24e62a7a463254165e1e46e42aecdea Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Date: Thu, 16 Nov 2023 07:21:50 +0000
|
||||
Subject: [PATCH] fs/ntfs: Fix an OOB write when parsing the $ATTRIBUTE_LIST
|
||||
attribute for the $MFT file
|
||||
|
||||
When parsing an extremely fragmented $MFT file, i.e., the file described
|
||||
using the $ATTRIBUTE_LIST attribute, current NTFS code will reuse a buffer
|
||||
containing bytes read from the underlying drive to store sector numbers,
|
||||
which are consumed later to read data from these sectors into another buffer.
|
||||
|
||||
These sectors numbers, two 32-bit integers, are always stored at predefined
|
||||
offsets, 0x10 and 0x14, relative to first byte of the selected entry within
|
||||
the $ATTRIBUTE_LIST attribute. Usually, this won't cause any problem.
|
||||
|
||||
However, when parsing a specially-crafted file system image, this may cause
|
||||
the NTFS code to write these integers beyond the buffer boundary, likely
|
||||
causing the GRUB memory allocator to misbehave or fail. These integers contain
|
||||
values which are controlled by on-disk structures of the NTFS file system.
|
||||
|
||||
Such modification and resulting misbehavior may touch a memory range not
|
||||
assigned to the GRUB and owned by firmware or another EFI application/driver.
|
||||
|
||||
This fix introduces checks to ensure that these sector numbers are never
|
||||
written beyond the boundary.
|
||||
|
||||
Fixes: CVE-2023-4692
|
||||
|
||||
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
CVE: CVE-2023-4692
|
||||
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=43651027d24e62a7a463254165e1e46e42aecdea]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
grub-core/fs/ntfs.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||
index 2f34f76..6009e49 100644
|
||||
--- a/grub-core/fs/ntfs.c
|
||||
+++ b/grub-core/fs/ntfs.c
|
||||
@@ -184,7 +184,7 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
}
|
||||
if (at->attr_end)
|
||||
{
|
||||
- grub_uint8_t *pa;
|
||||
+ grub_uint8_t *pa, *pa_end;
|
||||
|
||||
at->emft_buf = grub_malloc (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||
if (at->emft_buf == NULL)
|
||||
@@ -209,11 +209,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
}
|
||||
at->attr_nxt = at->edat_buf;
|
||||
at->attr_end = at->edat_buf + u32at (pa, 0x30);
|
||||
+ pa_end = at->edat_buf + n;
|
||||
}
|
||||
else
|
||||
{
|
||||
at->attr_nxt = at->attr_end + u16at (pa, 0x14);
|
||||
at->attr_end = at->attr_end + u32at (pa, 4);
|
||||
+ pa_end = at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
|
||||
}
|
||||
at->flags |= GRUB_NTFS_AF_ALST;
|
||||
while (at->attr_nxt < at->attr_end)
|
||||
@@ -230,6 +232,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
at->flags |= GRUB_NTFS_AF_GPOS;
|
||||
at->attr_cur = at->attr_nxt;
|
||||
pa = at->attr_cur;
|
||||
+
|
||||
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
grub_set_unaligned32 ((char *) pa + 0x10,
|
||||
grub_cpu_to_le32 (at->mft->data->mft_start));
|
||||
grub_set_unaligned32 ((char *) pa + 0x14,
|
||||
@@ -240,6 +249,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
|
||||
{
|
||||
if (*pa != attr)
|
||||
break;
|
||||
+
|
||||
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
if (read_attr
|
||||
(at, pa + 0x10,
|
||||
u32at (pa, 0x10) * (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR),
|
||||
--
|
||||
2.40.0
|
||||
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
62
meta/recipes-bsp/grub/files/CVE-2023-4693.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From 0ed2458cc4eff6d9a9199527e2a0b6d445802f94 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Date: Mon, 28 Aug 2023 16:32:33 +0300
|
||||
Subject: [PATCH] fs/ntfs: Fix an OOB read when reading data from the resident
|
||||
$DATA attribute
|
||||
|
||||
When reading a file containing resident data, i.e., the file data is stored in
|
||||
the $DATA attribute within the NTFS file record, not in external clusters,
|
||||
there are no checks that this resident data actually fits the corresponding
|
||||
file record segment.
|
||||
|
||||
When parsing a specially-crafted file system image, the current NTFS code will
|
||||
read the file data from an arbitrary, attacker-chosen memory offset and of
|
||||
arbitrary, attacker-chosen length.
|
||||
|
||||
This allows an attacker to display arbitrary chunks of memory, which could
|
||||
contain sensitive information like password hashes or even plain-text,
|
||||
obfuscated passwords from BS EFI variables.
|
||||
|
||||
This fix implements a check to ensure that resident data is read from the
|
||||
corresponding file record segment only.
|
||||
|
||||
Fixes: CVE-2023-4693
|
||||
|
||||
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=0ed2458cc4eff6d9a9199527e2a0b6d445802f94]
|
||||
CVE: CVE-2023-4693
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
grub-core/fs/ntfs.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
|
||||
index 7e43fd6..8f63c83 100644
|
||||
--- a/grub-core/fs/ntfs.c
|
||||
+++ b/grub-core/fs/ntfs.c
|
||||
@@ -401,7 +401,18 @@ read_data (struct grub_ntfs_attr *at, grub_uint8_t *pa, grub_uint8_t *dest,
|
||||
{
|
||||
if (ofs + len > u32at (pa, 0x10))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "read out of range");
|
||||
- grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
|
||||
+
|
||||
+ if (u32at (pa, 0x10) > (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute too large");
|
||||
+
|
||||
+ if (pa >= at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||
+
|
||||
+ if (u16at (pa, 0x14) + u32at (pa, 0x10) >
|
||||
+ (grub_addr_t) at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR) - (grub_addr_t) pa)
|
||||
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
|
||||
+
|
||||
+ grub_memcpy (dest, pa + u16at (pa, 0x14) + ofs, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -38,6 +38,8 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
|
||||
file://loader-efi-chainloader-Simplify-the-loader-state.patch \
|
||||
file://commands-boot-Add-API-to-pass-context-to-loader.patch \
|
||||
file://CVE-2022-28736-loader-efi-chainloader-Use-grub_loader_set_ex.patch \
|
||||
file://CVE-2023-4692.patch \
|
||||
file://CVE-2023-4693.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
|
||||
|
||||
@@ -26,6 +26,15 @@ SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}
|
||||
file://0001-Fix-opening-etc-resolv.conf-error.patch \
|
||||
file://handle-hup.patch \
|
||||
file://local-ping.patch \
|
||||
file://CVE-2023-1981.patch \
|
||||
file://CVE-2023-38469-1.patch \
|
||||
file://CVE-2023-38469-2.patch \
|
||||
file://CVE-2023-38470-1.patch \
|
||||
file://CVE-2023-38470-2.patch \
|
||||
file://CVE-2023-38471-1.patch \
|
||||
file://CVE-2023-38471-2.patch \
|
||||
file://CVE-2023-38472.patch \
|
||||
file://CVE-2023-38473.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
|
||||
|
||||
58
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
58
meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Thu, 17 Nov 2022 01:51:53 +0100
|
||||
Subject: [PATCH] Emit error if requested service is not found
|
||||
|
||||
It currently just crashes instead of replying with error. Check return
|
||||
value and emit error instead of passing NULL pointer to reply.
|
||||
|
||||
Fixes #375
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f]
|
||||
CVE: CVE-2023-1981
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------
|
||||
1 file changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
|
||||
index 70d7687bc..406d0b441 100644
|
||||
--- a/avahi-daemon/dbus-protocol.c
|
||||
+++ b/avahi-daemon/dbus-protocol.c
|
||||
@@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM
|
||||
}
|
||||
|
||||
t = avahi_alternative_host_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
|
||||
+ }
|
||||
}
|
||||
|
||||
static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||
@@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB
|
||||
}
|
||||
|
||||
t = avahi_alternative_service_name(n);
|
||||
- avahi_dbus_respond_string(c, m, t);
|
||||
- avahi_free(t);
|
||||
+ if (t) {
|
||||
+ avahi_dbus_respond_string(c, m, t);
|
||||
+ avahi_free(t);
|
||||
|
||||
- return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ return DBUS_HANDLER_RESULT_HANDLED;
|
||||
+ } else {
|
||||
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
|
||||
+ }
|
||||
}
|
||||
|
||||
static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) {
|
||||
47
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
47
meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
From a337a1ba7d15853fb56deef1f464529af6e3a1cf Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Mon, 23 Oct 2023 20:29:31 +0000
|
||||
Subject: [PATCH]core: reject overly long TXT resource records
|
||||
Closes https://github.com/lathiat/avahi/issues/455
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/pull/500/commits/a337a1ba7d15853fb56deef1f464529af6e3a1cf]
|
||||
CVE: CVE-2023-38469
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-core/rr.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-core/rr.c b/avahi-core/rr.c
|
||||
index 7fa0bee..b03a24c 100644
|
||||
--- a/avahi-core/rr.c
|
||||
+++ b/avahi-core/rr.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <avahi-common/malloc.h>
|
||||
#include <avahi-common/defs.h>
|
||||
|
||||
+#include "dns.h"
|
||||
#include "rr.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
@@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r) {
|
||||
case AVAHI_DNS_TYPE_TXT: {
|
||||
|
||||
AvahiStringList *strlst;
|
||||
+ size_t used = 0;
|
||||
|
||||
- for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
|
||||
+ for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) {
|
||||
if (strlst->size > 255 || strlst->size <= 0)
|
||||
return 0;
|
||||
|
||||
+ used += 1+strlst->size;
|
||||
+ if (used > AVAHI_DNS_RDATA_MAX)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.40.0
|
||||
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
65
meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Wed, 25 Oct 2023 18:15:42 +0000
|
||||
Subject: [PATCH] tests: pass overly long TXT resource records
|
||||
|
||||
to make sure they don't crash avahi any more.
|
||||
It reproduces https://github.com/lathiat/avahi/issues/455
|
||||
|
||||
Canonical notes:
|
||||
nickgalanis> removed first hunk since there is no .github dir in this release
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-2.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/c6cab87df290448a63323c8ca759baa516166237]
|
||||
CVE: CVE-2023-38469
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-client/client-test.c | 14 ++++++++++++++
|
||||
1 files changed, 14 insertions(+)
|
||||
|
||||
Index: avahi-0.8/avahi-client/client-test.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-client/client-test.c
|
||||
+++ avahi-0.8/avahi-client/client-test.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <avahi-client/client.h>
|
||||
@@ -33,6 +34,8 @@
|
||||
#include <avahi-common/malloc.h>
|
||||
#include <avahi-common/timeval.h>
|
||||
|
||||
+#include <avahi-core/dns.h>
|
||||
+
|
||||
static const AvahiPoll *poll_api = NULL;
|
||||
static AvahiSimplePoll *simple_poll = NULL;
|
||||
|
||||
@@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
uint32_t cookie;
|
||||
struct timeval tv;
|
||||
AvahiAddress a;
|
||||
+ uint8_t rdata[AVAHI_DNS_RDATA_MAX+1];
|
||||
+ AvahiStringList *txt = NULL;
|
||||
+ int r;
|
||||
|
||||
simple_poll = avahi_simple_poll_new();
|
||||
poll_api = avahi_simple_poll_get(simple_poll);
|
||||
@@ -258,6 +264,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL)));
|
||||
printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6));
|
||||
|
||||
+ memset(rdata, 1, sizeof(rdata));
|
||||
+ r = avahi_string_list_parse(rdata, sizeof(rdata), &txt);
|
||||
+ assert(r >= 0);
|
||||
+ assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata));
|
||||
+ error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt);
|
||||
+ assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||
+ avahi_string_list_free(txt);
|
||||
+
|
||||
avahi_entry_group_commit (group);
|
||||
|
||||
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||
59
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
59
meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From 26806dbde54c5b40a2bf108d334ba59ec9d242d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Tue, 11 Apr 2023 15:29:59 +0200
|
||||
Subject: [PATCH]Ensure each label is at least one byte long
|
||||
|
||||
The only allowed exception is single dot, where it should return empty
|
||||
string.
|
||||
|
||||
Fixes #454.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c]
|
||||
CVE: CVE-2023-38470
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-common/domain-test.c | 14 ++++++++++++++
|
||||
avahi-common/domain.c | 2 +-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c
|
||||
index cf763ec..3acc1c1 100644
|
||||
--- a/avahi-common/domain-test.c
|
||||
+++ b/avahi-common/domain-test.c
|
||||
@@ -45,6 +45,20 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
|
||||
printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo."));
|
||||
avahi_free(s);
|
||||
|
||||
+ printf("%s\n", s = avahi_normalize_name_strdup("."));
|
||||
+ avahi_free(s);
|
||||
+
|
||||
+ s = avahi_normalize_name_strdup(",.=.}.=.?-.}.=.?.?.}.}.?.?.?.z.?.?.}.}."
|
||||
+ "}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.}.}.}"
|
||||
+ ".?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.?.zM.?`"
|
||||
+ "?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}??.}.}.?.?."
|
||||
+ "?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.?`?.}.}.}."
|
||||
+ "??.?.zM.?`?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}?"
|
||||
+ "?.}.}.?.?.?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM."
|
||||
+ "?`?.}.}.}.?.?.?.r.=.=.?.?`.?.?}.}.}.?.?.?.r.=.?.}.=.?.?."
|
||||
+ "}.?.?.?.}.=.?.?.}");
|
||||
+ assert(s == NULL);
|
||||
+
|
||||
printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
|
||||
printf("%i\n", avahi_domain_equal("A", "a"));
|
||||
|
||||
diff --git a/avahi-common/domain.c b/avahi-common/domain.c
|
||||
index 3b1ab68..e66d241 100644
|
||||
--- a/avahi-common/domain.c
|
||||
+++ b/avahi-common/domain.c
|
||||
@@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s, char *ret_s, size_t size) {
|
||||
}
|
||||
|
||||
if (!empty) {
|
||||
- if (size < 1)
|
||||
+ if (size < 2)
|
||||
return NULL;
|
||||
|
||||
*(r++) = '.';
|
||||
--
|
||||
2.40.0
|
||||
52
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
52
meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From 20dec84b2480821704258bc908e7b2bd2e883b24 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Tue, 19 Sep 2023 03:21:25 +0000
|
||||
Subject: [PATCH] [common] bail out when escaped labels can't fit into ret
|
||||
|
||||
Fixes:
|
||||
```
|
||||
==93410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9e76f14c16 at pc 0x00000047208d bp 0x7ffee90a6a00 sp 0x7ffee90a61c8
|
||||
READ of size 1110 at 0x7f9e76f14c16 thread T0
|
||||
#0 0x47208c in __interceptor_strlen (out/fuzz-domain+0x47208c) (BuildId: 731b20c1eef22c2104e75a6496a399b10cfc7cba)
|
||||
#1 0x534eb0 in avahi_strdup avahi/avahi-common/malloc.c:167:12
|
||||
#2 0x53862c in avahi_normalize_name_strdup avahi/avahi-common/domain.c:226:12
|
||||
```
|
||||
and
|
||||
```
|
||||
fuzz-domain: fuzz/fuzz-domain.c:38: int LLVMFuzzerTestOneInput(const uint8_t *, size_t): Assertion `avahi_domain_equal(s, t)' failed.
|
||||
==101571== ERROR: libFuzzer: deadly signal
|
||||
#0 0x501175 in __sanitizer_print_stack_trace (/home/vagrant/avahi/out/fuzz-domain+0x501175) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#1 0x45ad2c in fuzzer::PrintStackTrace() (/home/vagrant/avahi/out/fuzz-domain+0x45ad2c) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#2 0x43fc07 in fuzzer::Fuzzer::CrashCallback() (/home/vagrant/avahi/out/fuzz-domain+0x43fc07) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
|
||||
#3 0x7f1581d7ebaf (/lib64/libc.so.6+0x3dbaf) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#4 0x7f1581dcf883 in __pthread_kill_implementation (/lib64/libc.so.6+0x8e883) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#5 0x7f1581d7eafd in gsignal (/lib64/libc.so.6+0x3dafd) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#6 0x7f1581d6787e in abort (/lib64/libc.so.6+0x2687e) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#7 0x7f1581d6779a in __assert_fail_base.cold (/lib64/libc.so.6+0x2679a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#8 0x7f1581d77186 in __assert_fail (/lib64/libc.so.6+0x36186) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
|
||||
#9 0x5344a4 in LLVMFuzzerTestOneInput /home/vagrant/avahi/fuzz/fuzz-domain.c:38:9
|
||||
```
|
||||
|
||||
It's a follow-up to 94cb6489114636940ac683515417990b55b5d66c
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38470-2.patch?h=ubuntu/jammy-security
|
||||
CVE: CVE-2023-38470 #Follow-up patch
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-common/domain.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.8/avahi-common/domain.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-common/domain.c
|
||||
+++ avahi-0.8/avahi-common/domain.c
|
||||
@@ -210,7 +210,8 @@ char *avahi_normalize_name(const char *s
|
||||
} else
|
||||
empty = 0;
|
||||
|
||||
- avahi_escape_label(label, strlen(label), &r, &size);
|
||||
+ if (!(avahi_escape_label(label, strlen(label), &r, &size)))
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
return ret_s;
|
||||
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
73
meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
From 9cd4ea89b3ac89b7bb0196fda1aa88cd51b106b6 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Mon, 23 Oct 2023 13:38:35 +0200
|
||||
Subject: [PATCH] core: extract host name using avahi_unescape_label()
|
||||
|
||||
Previously we could create invalid escape sequence when we split the
|
||||
string on dot. For example, from valid host name "foo\\.bar" we have
|
||||
created invalid name "foo\\" and tried to set that as the host name
|
||||
which crashed the daemon.
|
||||
|
||||
Fixes #453
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09]
|
||||
CVE: CVE-2023-38471
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-core/server.c | 27 +++++++++++++++++++++------
|
||||
1 file changed, 21 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/avahi-core/server.c b/avahi-core/server.c
|
||||
index e507750..40f1d68 100644
|
||||
--- a/avahi-core/server.c
|
||||
+++ b/avahi-core/server.c
|
||||
@@ -1295,7 +1295,11 @@ static void update_fqdn(AvahiServer *s) {
|
||||
}
|
||||
|
||||
int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
|
||||
- char *hn = NULL;
|
||||
+ char label_escaped[AVAHI_LABEL_MAX*4+1];
|
||||
+ char label[AVAHI_LABEL_MAX];
|
||||
+ char *hn = NULL, *h;
|
||||
+ size_t len;
|
||||
+
|
||||
assert(s);
|
||||
|
||||
AVAHI_CHECK_VALIDITY(s, !host_name || avahi_is_valid_host_name(host_name), AVAHI_ERR_INVALID_HOST_NAME);
|
||||
@@ -1305,17 +1309,28 @@ int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
|
||||
else
|
||||
hn = avahi_normalize_name_strdup(host_name);
|
||||
|
||||
- hn[strcspn(hn, ".")] = 0;
|
||||
+ h = hn;
|
||||
+ if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||
+ avahi_free(h);
|
||||
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ }
|
||||
+
|
||||
+ avahi_free(h);
|
||||
+
|
||||
+ h = label_escaped;
|
||||
+ len = sizeof(label_escaped);
|
||||
+ if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||
+ return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
|
||||
- if (avahi_domain_equal(s->host_name, hn) && s->state != AVAHI_SERVER_COLLISION) {
|
||||
- avahi_free(hn);
|
||||
+ if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||
- }
|
||||
|
||||
withdraw_host_rrs(s);
|
||||
|
||||
avahi_free(s->host_name);
|
||||
- s->host_name = hn;
|
||||
+ s->host_name = avahi_strdup(label_escaped);
|
||||
+ if (!s->host_name)
|
||||
+ return AVAHI_ERR_NO_MEMORY;
|
||||
|
||||
update_fqdn(s);
|
||||
|
||||
--
|
||||
2.40.0
|
||||
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
52
meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From b675f70739f404342f7f78635d6e2dcd85a13460 Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Tue, 24 Oct 2023 22:04:51 +0000
|
||||
Subject: [PATCH] core: return errors from avahi_server_set_host_name properly
|
||||
|
||||
It's a follow-up to 894f085f402e023a98cbb6f5a3d117bd88d93b09
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460]
|
||||
CVE: CVE-2023-38471 #Follow-up Patch
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-core/server.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: avahi-0.8/avahi-core/server.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-core/server.c
|
||||
+++ avahi-0.8/avahi-core/server.c
|
||||
@@ -1309,10 +1309,13 @@ int avahi_server_set_host_name(AvahiServ
|
||||
else
|
||||
hn = avahi_normalize_name_strdup(host_name);
|
||||
|
||||
+ if (!hn)
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||
+
|
||||
h = hn;
|
||||
if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
|
||||
avahi_free(h);
|
||||
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||
}
|
||||
|
||||
avahi_free(h);
|
||||
@@ -1320,7 +1323,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||
h = label_escaped;
|
||||
len = sizeof(label_escaped);
|
||||
if (!avahi_escape_label(label, strlen(label), &h, &len))
|
||||
- return AVAHI_ERR_INVALID_HOST_NAME;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
|
||||
|
||||
if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
|
||||
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
|
||||
@@ -1330,7 +1333,7 @@ int avahi_server_set_host_name(AvahiServ
|
||||
avahi_free(s->host_name);
|
||||
s->host_name = avahi_strdup(label_escaped);
|
||||
if (!s->host_name)
|
||||
- return AVAHI_ERR_NO_MEMORY;
|
||||
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
|
||||
|
||||
update_fqdn(s);
|
||||
|
||||
46
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
46
meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From b024ae5749f4aeba03478e6391687c3c9c8dee40 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Thu, 19 Oct 2023 17:36:44 +0200
|
||||
Subject: [PATCH] core: make sure there is rdata to process before parsing it
|
||||
|
||||
Fixes #452
|
||||
|
||||
CVE-2023-38472
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38472.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40]
|
||||
CVE: CVE-2023-38472
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
avahi-client/client-test.c | 3 +++
|
||||
avahi-daemon/dbus-entry-group.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: avahi-0.8/avahi-client/client-test.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-client/client-test.c
|
||||
+++ avahi-0.8/avahi-client/client-test.c
|
||||
@@ -272,6 +272,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
|
||||
assert(error == AVAHI_ERR_INVALID_RECORD);
|
||||
avahi_string_list_free(txt);
|
||||
|
||||
+ error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0);
|
||||
+ assert(error != AVAHI_OK);
|
||||
+
|
||||
avahi_entry_group_commit (group);
|
||||
|
||||
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
|
||||
Index: avahi-0.8/avahi-daemon/dbus-entry-group.c
|
||||
===================================================================
|
||||
--- avahi-0.8.orig/avahi-daemon/dbus-entry-group.c
|
||||
+++ avahi-0.8/avahi-daemon/dbus-entry-group.c
|
||||
@@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_g
|
||||
if (!(r = avahi_record_new_full (name, clazz, type, ttl)))
|
||||
return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL);
|
||||
|
||||
- if (avahi_rdata_parse (r, rdata, size) < 0) {
|
||||
+ if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) {
|
||||
avahi_record_unref (r);
|
||||
return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL);
|
||||
}
|
||||
108
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
108
meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch
Normal file
@@ -0,0 +1,108 @@
|
||||
From b448c9f771bada14ae8de175695a9729f8646797 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Wed, 11 Oct 2023 17:45:44 +0200
|
||||
Subject: [PATCH]common: derive alternative host name from its
|
||||
unescaped version
|
||||
|
||||
Normalization of input makes sure we don't have to deal with special
|
||||
cases like unescaped dot at the end of label.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797]
|
||||
CVE: CVE-2023-38473
|
||||
|
||||
Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
|
||||
---
|
||||
avahi-common/alternative-test.c | 3 +++
|
||||
avahi-common/alternative.c | 27 +++++++++++++++++++--------
|
||||
2 files changed, 22 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/avahi-common/alternative-test.c b/avahi-common/alternative-test.c
|
||||
index 9255435..681fc15 100644
|
||||
--- a/avahi-common/alternative-test.c
|
||||
+++ b/avahi-common/alternative-test.c
|
||||
@@ -31,6 +31,9 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
|
||||
const char* const test_strings[] = {
|
||||
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXüüüüüüü",
|
||||
+ ").",
|
||||
+ "\\.",
|
||||
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\",
|
||||
"gurke",
|
||||
"-",
|
||||
" #",
|
||||
diff --git a/avahi-common/alternative.c b/avahi-common/alternative.c
|
||||
index b3d39f0..a094e6d 100644
|
||||
--- a/avahi-common/alternative.c
|
||||
+++ b/avahi-common/alternative.c
|
||||
@@ -49,15 +49,20 @@ static void drop_incomplete_utf8(char *c) {
|
||||
}
|
||||
|
||||
char *avahi_alternative_host_name(const char *s) {
|
||||
+ char label[AVAHI_LABEL_MAX], alternative[AVAHI_LABEL_MAX*4+1];
|
||||
+ char *alt, *r, *ret;
|
||||
const char *e;
|
||||
- char *r;
|
||||
+ size_t len;
|
||||
|
||||
assert(s);
|
||||
|
||||
if (!avahi_is_valid_host_name(s))
|
||||
return NULL;
|
||||
|
||||
- if ((e = strrchr(s, '-'))) {
|
||||
+ if (!avahi_unescape_label(&s, label, sizeof(label)))
|
||||
+ return NULL;
|
||||
+
|
||||
+ if ((e = strrchr(label, '-'))) {
|
||||
const char *p;
|
||||
|
||||
e++;
|
||||
@@ -74,19 +79,18 @@ char *avahi_alternative_host_name(const char *s) {
|
||||
|
||||
if (e) {
|
||||
char *c, *m;
|
||||
- size_t l;
|
||||
int n;
|
||||
|
||||
n = atoi(e)+1;
|
||||
if (!(m = avahi_strdup_printf("%i", n)))
|
||||
return NULL;
|
||||
|
||||
- l = e-s-1;
|
||||
+ len = e-label-1;
|
||||
|
||||
- if (l >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||
- l = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||
+ if (len >= AVAHI_LABEL_MAX-1-strlen(m)-1)
|
||||
+ len = AVAHI_LABEL_MAX-1-strlen(m)-1;
|
||||
|
||||
- if (!(c = avahi_strndup(s, l))) {
|
||||
+ if (!(c = avahi_strndup(label, len))) {
|
||||
avahi_free(m);
|
||||
return NULL;
|
||||
}
|
||||
@@ -100,7 +104,7 @@ char *avahi_alternative_host_name(const char *s) {
|
||||
} else {
|
||||
char *c;
|
||||
|
||||
- if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-2)))
|
||||
+ if (!(c = avahi_strndup(label, AVAHI_LABEL_MAX-1-2)))
|
||||
return NULL;
|
||||
|
||||
drop_incomplete_utf8(c);
|
||||
@@ -109,6 +113,13 @@ char *avahi_alternative_host_name(const char *s) {
|
||||
avahi_free(c);
|
||||
}
|
||||
|
||||
+ alt = alternative;
|
||||
+ len = sizeof(alternative);
|
||||
+ ret = avahi_escape_label(r, strlen(r), &alt, &len);
|
||||
+
|
||||
+ avahi_free(r);
|
||||
+ r = avahi_strdup(ret);
|
||||
+
|
||||
assert(avahi_is_valid_host_name(r));
|
||||
|
||||
return r;
|
||||
--
|
||||
2.40.0
|
||||
@@ -54,6 +54,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
|
||||
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
|
||||
file://0001-test-gatt-Fix-hung-issue.patch \
|
||||
file://CVE-2023-45866.patch \
|
||||
"
|
||||
S = "${WORKDIR}/bluez-${PV}"
|
||||
|
||||
|
||||
56
meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch
Normal file
56
meta/recipes-connectivity/bluez5/bluez5/CVE-2023-45866.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
From 25a471a83e02e1effb15d5a488b3f0085eaeb675 Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
Date: Tue, 10 Oct 2023 13:03:12 -0700
|
||||
Subject: [PATCH] input.conf: Change default of ClassicBondedOnly
|
||||
|
||||
This changes the default of ClassicBondedOnly since defaulting to false
|
||||
is not inline with HID specification which mandates the of Security Mode
|
||||
4:
|
||||
|
||||
BLUETOOTH SPECIFICATION Page 84 of 123
|
||||
Human Interface Device (HID) Profile:
|
||||
|
||||
5.4.3.4.2 Security Modes
|
||||
Bluetooth HID Hosts shall use Security Mode 4 when interoperating with
|
||||
Bluetooth HID devices that are compliant to the Bluetooth Core
|
||||
Specification v2.1+EDR[6].
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/profiles/input?id=25a471a83e02e1effb15d5a488b3f0085eaeb675]
|
||||
|
||||
CVE: CVE-2023-45866
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
profiles/input/device.c | 2 +-
|
||||
profiles/input/input.conf | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/profiles/input/device.c b/profiles/input/device.c
|
||||
index 4a50ea9..4310dd1 100644
|
||||
--- a/profiles/input/device.c
|
||||
+++ b/profiles/input/device.c
|
||||
@@ -81,7 +81,7 @@ struct input_device {
|
||||
|
||||
static int idle_timeout = 0;
|
||||
static bool uhid_enabled = false;
|
||||
-static bool classic_bonded_only = false;
|
||||
+static bool classic_bonded_only = true;
|
||||
|
||||
void input_set_idle_timeout(int timeout)
|
||||
{
|
||||
diff --git a/profiles/input/input.conf b/profiles/input/input.conf
|
||||
index 4c70bc5..d8645f3 100644
|
||||
--- a/profiles/input/input.conf
|
||||
+++ b/profiles/input/input.conf
|
||||
@@ -17,7 +17,7 @@
|
||||
# platforms may want to make sure that input connections only come from bonded
|
||||
# device connections. Several older mice have been known for not supporting
|
||||
# pairing/encryption.
|
||||
-# Defaults to false to maximize device compatibility.
|
||||
+# Defaults to true for security.
|
||||
#ClassicBondedOnly=true
|
||||
|
||||
# LE upgrade security
|
||||
--
|
||||
2.40.0
|
||||
476
meta/recipes-connectivity/openssh/openssh/CVE-2023-48795.patch
Normal file
476
meta/recipes-connectivity/openssh/openssh/CVE-2023-48795.patch
Normal file
@@ -0,0 +1,476 @@
|
||||
(modified to not remove ssh_packet_read_expect() and to add to
|
||||
KexAlgorithms in sshd.c and sshconnect2.c as this version pre-dates
|
||||
kex_proposal_populate_entries())
|
||||
|
||||
Backport of:
|
||||
|
||||
From 1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 Mon Sep 17 00:00:00 2001
|
||||
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||
Date: Mon, 18 Dec 2023 14:45:17 +0000
|
||||
Subject: [PATCH] upstream: implement "strict key exchange" in ssh and sshd
|
||||
|
||||
This adds a protocol extension to improve the integrity of the SSH
|
||||
transport protocol, particular in and around the initial key exchange
|
||||
(KEX) phase.
|
||||
|
||||
Full details of the extension are in the PROTOCOL file.
|
||||
|
||||
with markus@
|
||||
|
||||
OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/openssh/tree/debian/patches/CVE-2023-48795.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/openssh/openssh-portable/commit/1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5]
|
||||
CVE: CVE-2023-48795
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
PROTOCOL | 26 +++++++++++++++++
|
||||
kex.c | 72 +++++++++++++++++++++++++++++++----------------
|
||||
kex.h | 1 +
|
||||
packet.c | 78 ++++++++++++++++++++++++++++++++++++++-------------
|
||||
sshconnect2.c | 14 +++------
|
||||
sshd.c | 7 +++--
|
||||
6 files changed, 142 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/PROTOCOL b/PROTOCOL
|
||||
index e6a7d60..971f01e 100644
|
||||
--- a/PROTOCOL
|
||||
+++ b/PROTOCOL
|
||||
@@ -102,6 +102,32 @@ OpenSSH supports the use of ECDH in Curve25519 for key exchange as
|
||||
described at:
|
||||
http://git.libssh.org/users/aris/libssh.git/plain/doc/curve25519-sha256@libssh.org.txt?h=curve25519
|
||||
|
||||
+1.9 transport: strict key exchange extension
|
||||
+
|
||||
+OpenSSH supports a number of transport-layer hardening measures under
|
||||
+a "strict KEX" feature. This feature is signalled similarly to the
|
||||
+RFC8308 ext-info feature: by including a additional algorithm in the
|
||||
+initiial SSH2_MSG_KEXINIT kex_algorithms field. The client may append
|
||||
+"kex-strict-c-v00@openssh.com" to its kex_algorithms and the server
|
||||
+may append "kex-strict-s-v00@openssh.com". These pseudo-algorithms
|
||||
+are only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored
|
||||
+if they are present in subsequent SSH2_MSG_KEXINIT packets.
|
||||
+
|
||||
+When an endpoint that supports this extension observes this algorithm
|
||||
+name in a peer's KEXINIT packet, it MUST make the following changes to
|
||||
+the the protocol:
|
||||
+
|
||||
+a) During initial KEX, terminate the connection if any unexpected or
|
||||
+ out-of-sequence packet is received. This includes terminating the
|
||||
+ connection if the first packet received is not SSH2_MSG_KEXINIT.
|
||||
+ Unexpected packets for the purpose of strict KEX include messages
|
||||
+ that are otherwise valid at any time during the connection such as
|
||||
+ SSH2_MSG_DEBUG and SSH2_MSG_IGNORE.
|
||||
+b) After sending or receiving a SSH2_MSG_NEWKEYS message, reset the
|
||||
+ packet sequence number to zero. This behaviour persists for the
|
||||
+ duration of the connection (i.e. not just the first
|
||||
+ SSH2_MSG_NEWKEYS).
|
||||
+
|
||||
2. Connection protocol changes
|
||||
|
||||
2.1. connection: Channel write close extension "eow@openssh.com"
|
||||
diff --git a/kex.c b/kex.c
|
||||
index 0bcd27d..e7b2d4d 100644
|
||||
--- a/kex.c
|
||||
+++ b/kex.c
|
||||
@@ -63,7 +63,7 @@
|
||||
#include "digest.h"
|
||||
|
||||
/* prototype */
|
||||
-static int kex_choose_conf(struct ssh *);
|
||||
+static int kex_choose_conf(struct ssh *, uint32_t seq);
|
||||
static int kex_input_newkeys(int, u_int32_t, struct ssh *);
|
||||
|
||||
static const char * const proposal_names[PROPOSAL_MAX] = {
|
||||
@@ -175,6 +175,18 @@ kex_names_valid(const char *names)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+/* returns non-zero if proposal contains any algorithm from algs */
|
||||
+static int
|
||||
+has_any_alg(const char *proposal, const char *algs)
|
||||
+{
|
||||
+ char *cp;
|
||||
+
|
||||
+ if ((cp = match_list(proposal, algs, NULL)) == NULL)
|
||||
+ return 0;
|
||||
+ free(cp);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Concatenate algorithm names, avoiding duplicates in the process.
|
||||
* Caller must free returned string.
|
||||
@@ -182,7 +194,7 @@ kex_names_valid(const char *names)
|
||||
char *
|
||||
kex_names_cat(const char *a, const char *b)
|
||||
{
|
||||
- char *ret = NULL, *tmp = NULL, *cp, *p, *m;
|
||||
+ char *ret = NULL, *tmp = NULL, *cp, *p;
|
||||
size_t len;
|
||||
|
||||
if (a == NULL || *a == '\0')
|
||||
@@ -199,10 +211,8 @@ kex_names_cat(const char *a, const char *b)
|
||||
}
|
||||
strlcpy(ret, a, len);
|
||||
for ((p = strsep(&cp, ",")); p && *p != '\0'; (p = strsep(&cp, ","))) {
|
||||
- if ((m = match_list(ret, p, NULL)) != NULL) {
|
||||
- free(m);
|
||||
+ if (has_any_alg(ret, p))
|
||||
continue; /* Algorithm already present */
|
||||
- }
|
||||
if (strlcat(ret, ",", len) >= len ||
|
||||
strlcat(ret, p, len) >= len) {
|
||||
free(tmp);
|
||||
@@ -410,7 +420,12 @@ kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh)
|
||||
{
|
||||
int r;
|
||||
|
||||
- error("kex protocol error: type %d seq %u", type, seq);
|
||||
+ /* If in strict mode, any unexpected message is an error */
|
||||
+ if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) {
|
||||
+ ssh_packet_disconnect(ssh, "strict KEX violation: "
|
||||
+ "unexpected packet type %u (seqnr %u)", type, seq);
|
||||
+ }
|
||||
+ error_f("type %u seq %u", type, seq);
|
||||
if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 ||
|
||||
(r = sshpkt_put_u32(ssh, seq)) != 0 ||
|
||||
(r = sshpkt_send(ssh)) != 0)
|
||||
@@ -485,6 +500,11 @@ kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh)
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_protocol_error);
|
||||
if ((r = sshpkt_get_u32(ssh, &ninfo)) != 0)
|
||||
return r;
|
||||
+ if (ninfo >= 1024) {
|
||||
+ error("SSH2_MSG_EXT_INFO with too many entries, expected "
|
||||
+ "<=1024, received %u", ninfo);
|
||||
+ return dispatch_protocol_error(type, seq, ssh);
|
||||
+ }
|
||||
for (i = 0; i < ninfo; i++) {
|
||||
if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0)
|
||||
return r;
|
||||
@@ -600,7 +620,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh)
|
||||
error_f("no kex");
|
||||
return SSH_ERR_INTERNAL_ERROR;
|
||||
}
|
||||
- ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
|
||||
+ ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_protocol_error);
|
||||
ptr = sshpkt_ptr(ssh, &dlen);
|
||||
if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
|
||||
return r;
|
||||
@@ -636,7 +656,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh)
|
||||
if (!(kex->flags & KEX_INIT_SENT))
|
||||
if ((r = kex_send_kexinit(ssh)) != 0)
|
||||
return r;
|
||||
- if ((r = kex_choose_conf(ssh)) != 0)
|
||||
+ if ((r = kex_choose_conf(ssh, seq)) != 0)
|
||||
return r;
|
||||
|
||||
if (kex->kex_type < KEX_MAX && kex->kex[kex->kex_type] != NULL)
|
||||
@@ -900,20 +920,14 @@ proposals_match(char *my[PROPOSAL_MAX], char *peer[PROPOSAL_MAX])
|
||||
return (1);
|
||||
}
|
||||
|
||||
-/* returns non-zero if proposal contains any algorithm from algs */
|
||||
static int
|
||||
-has_any_alg(const char *proposal, const char *algs)
|
||||
+kexalgs_contains(char **peer, const char *ext)
|
||||
{
|
||||
- char *cp;
|
||||
-
|
||||
- if ((cp = match_list(proposal, algs, NULL)) == NULL)
|
||||
- return 0;
|
||||
- free(cp);
|
||||
- return 1;
|
||||
+ return has_any_alg(peer[PROPOSAL_KEX_ALGS], ext);
|
||||
}
|
||||
|
||||
static int
|
||||
-kex_choose_conf(struct ssh *ssh)
|
||||
+kex_choose_conf(struct ssh *ssh, uint32_t seq)
|
||||
{
|
||||
struct kex *kex = ssh->kex;
|
||||
struct newkeys *newkeys;
|
||||
@@ -938,13 +952,23 @@ kex_choose_conf(struct ssh *ssh)
|
||||
sprop=peer;
|
||||
}
|
||||
|
||||
- /* Check whether client supports ext_info_c */
|
||||
- if (kex->server && (kex->flags & KEX_INITIAL)) {
|
||||
- char *ext;
|
||||
-
|
||||
- ext = match_list("ext-info-c", peer[PROPOSAL_KEX_ALGS], NULL);
|
||||
- kex->ext_info_c = (ext != NULL);
|
||||
- free(ext);
|
||||
+ /* Check whether peer supports ext_info/kex_strict */
|
||||
+ if ((kex->flags & KEX_INITIAL) != 0) {
|
||||
+ if (kex->server) {
|
||||
+ kex->ext_info_c = kexalgs_contains(peer, "ext-info-c");
|
||||
+ kex->kex_strict = kexalgs_contains(peer,
|
||||
+ "kex-strict-c-v00@openssh.com");
|
||||
+ } else {
|
||||
+ kex->kex_strict = kexalgs_contains(peer,
|
||||
+ "kex-strict-s-v00@openssh.com");
|
||||
+ }
|
||||
+ if (kex->kex_strict) {
|
||||
+ debug3_f("will use strict KEX ordering");
|
||||
+ if (seq != 0)
|
||||
+ ssh_packet_disconnect(ssh,
|
||||
+ "strict KEX violation: "
|
||||
+ "KEXINIT was not the first packet");
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Check whether client supports rsa-sha2 algorithms */
|
||||
diff --git a/kex.h b/kex.h
|
||||
index c353295..d97323e 100644
|
||||
--- a/kex.h
|
||||
+++ b/kex.h
|
||||
@@ -148,6 +148,7 @@ struct kex {
|
||||
u_int kex_type;
|
||||
char *server_sig_algs;
|
||||
int ext_info_c;
|
||||
+ int kex_strict;
|
||||
struct sshbuf *my;
|
||||
struct sshbuf *peer;
|
||||
struct sshbuf *client_version;
|
||||
diff --git a/packet.c b/packet.c
|
||||
index bde6c10..28f3729 100644
|
||||
--- a/packet.c
|
||||
+++ b/packet.c
|
||||
@@ -1205,8 +1205,13 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
|
||||
sshbuf_dump(state->output, stderr);
|
||||
#endif
|
||||
/* increment sequence number for outgoing packets */
|
||||
- if (++state->p_send.seqnr == 0)
|
||||
+ if (++state->p_send.seqnr == 0) {
|
||||
+ if ((ssh->kex->flags & KEX_INITIAL) != 0) {
|
||||
+ ssh_packet_disconnect(ssh, "outgoing sequence number "
|
||||
+ "wrapped during initial key exchange");
|
||||
+ }
|
||||
logit("outgoing seqnr wraps around");
|
||||
+ }
|
||||
if (++state->p_send.packets == 0)
|
||||
if (!(ssh->compat & SSH_BUG_NOREKEY))
|
||||
return SSH_ERR_NEED_REKEY;
|
||||
@@ -1214,6 +1219,11 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
|
||||
state->p_send.bytes += len;
|
||||
sshbuf_reset(state->outgoing_packet);
|
||||
|
||||
+ if (type == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
|
||||
+ debug_f("resetting send seqnr %u", state->p_send.seqnr);
|
||||
+ state->p_send.seqnr = 0;
|
||||
+ }
|
||||
+
|
||||
if (type == SSH2_MSG_NEWKEYS)
|
||||
r = ssh_set_newkeys(ssh, MODE_OUT);
|
||||
else if (type == SSH2_MSG_USERAUTH_SUCCESS && state->server_side)
|
||||
@@ -1342,8 +1352,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||
/* Stay in the loop until we have received a complete packet. */
|
||||
for (;;) {
|
||||
/* Try to read a packet from the buffer. */
|
||||
- r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p);
|
||||
- if (r != 0)
|
||||
+ if ((r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p)) != 0)
|
||||
break;
|
||||
/* If we got a packet, return it. */
|
||||
if (*typep != SSH_MSG_NONE)
|
||||
@@ -1627,10 +1636,16 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||
if ((r = sshbuf_consume(state->input, mac->mac_len)) != 0)
|
||||
goto out;
|
||||
}
|
||||
+
|
||||
if (seqnr_p != NULL)
|
||||
*seqnr_p = state->p_read.seqnr;
|
||||
- if (++state->p_read.seqnr == 0)
|
||||
+ if (++state->p_read.seqnr == 0) {
|
||||
+ if ((ssh->kex->flags & KEX_INITIAL) != 0) {
|
||||
+ ssh_packet_disconnect(ssh, "incoming sequence number "
|
||||
+ "wrapped during initial key exchange");
|
||||
+ }
|
||||
logit("incoming seqnr wraps around");
|
||||
+ }
|
||||
if (++state->p_read.packets == 0)
|
||||
if (!(ssh->compat & SSH_BUG_NOREKEY))
|
||||
return SSH_ERR_NEED_REKEY;
|
||||
@@ -1696,6 +1711,10 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||
#endif
|
||||
/* reset for next packet */
|
||||
state->packlen = 0;
|
||||
+ if (*typep == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
|
||||
+ debug_f("resetting read seqnr %u", state->p_read.seqnr);
|
||||
+ state->p_read.seqnr = 0;
|
||||
+ }
|
||||
|
||||
if ((r = ssh_packet_check_rekey(ssh)) != 0)
|
||||
return r;
|
||||
@@ -1716,10 +1735,39 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||
r = ssh_packet_read_poll2(ssh, typep, seqnr_p);
|
||||
if (r != 0)
|
||||
return r;
|
||||
- if (*typep) {
|
||||
- state->keep_alive_timeouts = 0;
|
||||
- DBG(debug("received packet type %d", *typep));
|
||||
+ if (*typep == 0) {
|
||||
+ /* no message ready */
|
||||
+ return 0;
|
||||
+ }
|
||||
+ state->keep_alive_timeouts = 0;
|
||||
+ DBG(debug("received packet type %d", *typep));
|
||||
+
|
||||
+ /* Always process disconnect messages */
|
||||
+ if (*typep == SSH2_MSG_DISCONNECT) {
|
||||
+ if ((r = sshpkt_get_u32(ssh, &reason)) != 0 ||
|
||||
+ (r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
|
||||
+ return r;
|
||||
+ /* Ignore normal client exit notifications */
|
||||
+ do_log2(ssh->state->server_side &&
|
||||
+ reason == SSH2_DISCONNECT_BY_APPLICATION ?
|
||||
+ SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
|
||||
+ "Received disconnect from %s port %d:"
|
||||
+ "%u: %.400s", ssh_remote_ipaddr(ssh),
|
||||
+ ssh_remote_port(ssh), reason, msg);
|
||||
+ free(msg);
|
||||
+ return SSH_ERR_DISCONNECTED;
|
||||
}
|
||||
+
|
||||
+ /*
|
||||
+ * Do not implicitly handle any messages here during initial
|
||||
+ * KEX when in strict mode. They will be need to be allowed
|
||||
+ * explicitly by the KEX dispatch table or they will generate
|
||||
+ * protocol errors.
|
||||
+ */
|
||||
+ if (ssh->kex != NULL &&
|
||||
+ (ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict)
|
||||
+ return 0;
|
||||
+ /* Implicitly handle transport-level messages */
|
||||
switch (*typep) {
|
||||
case SSH2_MSG_IGNORE:
|
||||
debug3("Received SSH2_MSG_IGNORE");
|
||||
@@ -1734,19 +1782,6 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||
debug("Remote: %.900s", msg);
|
||||
free(msg);
|
||||
break;
|
||||
- case SSH2_MSG_DISCONNECT:
|
||||
- if ((r = sshpkt_get_u32(ssh, &reason)) != 0 ||
|
||||
- (r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
|
||||
- return r;
|
||||
- /* Ignore normal client exit notifications */
|
||||
- do_log2(ssh->state->server_side &&
|
||||
- reason == SSH2_DISCONNECT_BY_APPLICATION ?
|
||||
- SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
|
||||
- "Received disconnect from %s port %d:"
|
||||
- "%u: %.400s", ssh_remote_ipaddr(ssh),
|
||||
- ssh_remote_port(ssh), reason, msg);
|
||||
- free(msg);
|
||||
- return SSH_ERR_DISCONNECTED;
|
||||
case SSH2_MSG_UNIMPLEMENTED:
|
||||
if ((r = sshpkt_get_u32(ssh, &seqnr)) != 0)
|
||||
return r;
|
||||
@@ -2211,6 +2246,7 @@ kex_to_blob(struct sshbuf *m, struct kex *kex)
|
||||
(r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 ||
|
||||
(r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 ||
|
||||
(r = sshbuf_put_u32(m, kex->kex_type)) != 0 ||
|
||||
+ (r = sshbuf_put_u32(m, kex->kex_strict)) != 0 ||
|
||||
(r = sshbuf_put_stringb(m, kex->my)) != 0 ||
|
||||
(r = sshbuf_put_stringb(m, kex->peer)) != 0 ||
|
||||
(r = sshbuf_put_stringb(m, kex->client_version)) != 0 ||
|
||||
@@ -2373,6 +2409,7 @@ kex_from_blob(struct sshbuf *m, struct kex **kexp)
|
||||
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_type)) != 0 ||
|
||||
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_nid)) != 0 ||
|
||||
(r = sshbuf_get_u32(m, &kex->kex_type)) != 0 ||
|
||||
+ (r = sshbuf_get_u32(m, &kex->kex_strict)) != 0 ||
|
||||
(r = sshbuf_get_stringb(m, kex->my)) != 0 ||
|
||||
(r = sshbuf_get_stringb(m, kex->peer)) != 0 ||
|
||||
(r = sshbuf_get_stringb(m, kex->client_version)) != 0 ||
|
||||
@@ -2701,6 +2738,7 @@ sshpkt_disconnect(struct ssh *ssh, const char *fmt,...)
|
||||
vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
va_end(args);
|
||||
|
||||
+ debug2_f("sending SSH2_MSG_DISCONNECT: %s", buf);
|
||||
if ((r = sshpkt_start(ssh, SSH2_MSG_DISCONNECT)) != 0 ||
|
||||
(r = sshpkt_put_u32(ssh, SSH2_DISCONNECT_PROTOCOL_ERROR)) != 0 ||
|
||||
(r = sshpkt_put_cstring(ssh, buf)) != 0 ||
|
||||
diff --git a/sshconnect2.c b/sshconnect2.c
|
||||
index b25225e..83ae4a4 100644
|
||||
--- a/sshconnect2.c
|
||||
+++ b/sshconnect2.c
|
||||
@@ -241,7 +241,8 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port,
|
||||
fatal_fr(r, "kex_assemble_namelist");
|
||||
free(all_key);
|
||||
|
||||
- if ((s = kex_names_cat(options.kex_algorithms, "ext-info-c")) == NULL)
|
||||
+ if ((s = kex_names_cat(options.kex_algorithms,
|
||||
+ "ext-info-c,kex-strict-c-v00@openssh.com")) == NULL)
|
||||
fatal_f("kex_names_cat");
|
||||
myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh, s);
|
||||
myproposal[PROPOSAL_ENC_ALGS_CTOS] =
|
||||
@@ -363,7 +364,6 @@ struct cauthmethod {
|
||||
};
|
||||
|
||||
static int input_userauth_service_accept(int, u_int32_t, struct ssh *);
|
||||
-static int input_userauth_ext_info(int, u_int32_t, struct ssh *);
|
||||
static int input_userauth_success(int, u_int32_t, struct ssh *);
|
||||
static int input_userauth_failure(int, u_int32_t, struct ssh *);
|
||||
static int input_userauth_banner(int, u_int32_t, struct ssh *);
|
||||
@@ -477,7 +477,7 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
|
||||
|
||||
ssh->authctxt = &authctxt;
|
||||
ssh_dispatch_init(ssh, &input_userauth_error);
|
||||
- ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info);
|
||||
+ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, kex_input_ext_info);
|
||||
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept);
|
||||
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */
|
||||
pubkey_cleanup(ssh);
|
||||
@@ -529,13 +529,6 @@ input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh)
|
||||
return r;
|
||||
}
|
||||
|
||||
-/* ARGSUSED */
|
||||
-static int
|
||||
-input_userauth_ext_info(int type, u_int32_t seqnr, struct ssh *ssh)
|
||||
-{
|
||||
- return kex_input_ext_info(type, seqnr, ssh);
|
||||
-}
|
||||
-
|
||||
void
|
||||
userauth(struct ssh *ssh, char *authlist)
|
||||
{
|
||||
@@ -617,6 +610,7 @@ input_userauth_success(int type, u_int32_t seq, struct ssh *ssh)
|
||||
free(authctxt->methoddata);
|
||||
authctxt->methoddata = NULL;
|
||||
authctxt->success = 1; /* break out */
|
||||
+ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, dispatch_protocol_error);
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/sshd.c b/sshd.c
|
||||
index ef18ba4..652bdc3 100644
|
||||
--- a/sshd.c
|
||||
+++ b/sshd.c
|
||||
@@ -2354,11 +2354,13 @@ static void
|
||||
do_ssh2_kex(struct ssh *ssh)
|
||||
{
|
||||
char *myproposal[PROPOSAL_MAX] = { KEX_SERVER };
|
||||
+ char *s;
|
||||
struct kex *kex;
|
||||
int r;
|
||||
|
||||
- myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh,
|
||||
- options.kex_algorithms);
|
||||
+ if ((s = kex_names_cat(options.kex_algorithms, "kex-strict-s-v00@openssh.com")) == NULL)
|
||||
+ fatal_f("kex_names_cat");
|
||||
+ myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(ssh, s);
|
||||
myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal(ssh,
|
||||
options.ciphers);
|
||||
myproposal[PROPOSAL_ENC_ALGS_STOC] = compat_cipher_proposal(ssh,
|
||||
@@ -2411,6 +2413,7 @@ do_ssh2_kex(struct ssh *ssh)
|
||||
(r = ssh_packet_write_wait(ssh)) != 0)
|
||||
fatal_fr(r, "send test");
|
||||
#endif
|
||||
+ free(s);
|
||||
debug("KEX done");
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
171
meta/recipes-connectivity/openssh/openssh/CVE-2023-51384.patch
Normal file
171
meta/recipes-connectivity/openssh/openssh/CVE-2023-51384.patch
Normal file
@@ -0,0 +1,171 @@
|
||||
From 881d9c6af9da4257c69c327c4e2f1508b2fa754b Mon Sep 17 00:00:00 2001
|
||||
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||
Date: Mon, 18 Dec 2023 14:46:12 +0000
|
||||
Subject: [PATCH] upstream: apply destination constraints to all p11 keys
|
||||
|
||||
Previously applied only to the first key returned from each token.
|
||||
|
||||
ok markus@
|
||||
|
||||
OpenBSD-Commit-ID: 36df3afb8eb94eec6b2541f063d0d164ef8b488d
|
||||
|
||||
CVE: CVE-2023-51384
|
||||
|
||||
Upstream-Status: Backport
|
||||
https://github.com/openssh/openssh-portable/commit/881d9c6af9da4257c69c327c4e2f1508b2fa754b
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
ssh-agent.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 98 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/ssh-agent.c b/ssh-agent.c
|
||||
index 19eeaae..4dbb4f3 100644
|
||||
--- a/ssh-agent.c
|
||||
+++ b/ssh-agent.c
|
||||
@@ -249,6 +249,90 @@ free_dest_constraints(struct dest_constraint *dcs, size_t ndcs)
|
||||
free(dcs);
|
||||
}
|
||||
|
||||
+static void
|
||||
+dup_dest_constraint_hop(const struct dest_constraint_hop *dch,
|
||||
+ struct dest_constraint_hop *out)
|
||||
+{
|
||||
+ u_int i;
|
||||
+ int r;
|
||||
+
|
||||
+ out->user = dch->user == NULL ? NULL : xstrdup(dch->user);
|
||||
+ out->hostname = dch->hostname == NULL ? NULL : xstrdup(dch->hostname);
|
||||
+ out->is_ca = dch->is_ca;
|
||||
+ out->nkeys = dch->nkeys;
|
||||
+ out->keys = out->nkeys == 0 ? NULL :
|
||||
+ xcalloc(out->nkeys, sizeof(*out->keys));
|
||||
+ out->key_is_ca = out->nkeys == 0 ? NULL :
|
||||
+ xcalloc(out->nkeys, sizeof(*out->key_is_ca));
|
||||
+ for (i = 0; i < dch->nkeys; i++) {
|
||||
+ if (dch->keys[i] != NULL &&
|
||||
+ (r = sshkey_from_private(dch->keys[i],
|
||||
+ &(out->keys[i]))) != 0)
|
||||
+ fatal_fr(r, "copy key");
|
||||
+ out->key_is_ca[i] = dch->key_is_ca[i];
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct dest_constraint *
|
||||
+dup_dest_constraints(const struct dest_constraint *dcs, size_t ndcs)
|
||||
+{
|
||||
+ size_t i;
|
||||
+ struct dest_constraint *ret;
|
||||
+
|
||||
+ if (ndcs == 0)
|
||||
+ return NULL;
|
||||
+ ret = xcalloc(ndcs, sizeof(*ret));
|
||||
+ for (i = 0; i < ndcs; i++) {
|
||||
+ dup_dest_constraint_hop(&dcs[i].from, &ret[i].from);
|
||||
+ dup_dest_constraint_hop(&dcs[i].to, &ret[i].to);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+#ifdef DEBUG_CONSTRAINTS
|
||||
+static void
|
||||
+dump_dest_constraint_hop(const struct dest_constraint_hop *dch)
|
||||
+{
|
||||
+ u_int i;
|
||||
+ char *fp;
|
||||
+
|
||||
+ debug_f("user %s hostname %s is_ca %d nkeys %u",
|
||||
+ dch->user == NULL ? "(null)" : dch->user,
|
||||
+ dch->hostname == NULL ? "(null)" : dch->hostname,
|
||||
+ dch->is_ca, dch->nkeys);
|
||||
+ for (i = 0; i < dch->nkeys; i++) {
|
||||
+ fp = NULL;
|
||||
+ if (dch->keys[i] != NULL &&
|
||||
+ (fp = sshkey_fingerprint(dch->keys[i],
|
||||
+ SSH_FP_HASH_DEFAULT, SSH_FP_DEFAULT)) == NULL)
|
||||
+ fatal_f("fingerprint failed");
|
||||
+ debug_f("key %u/%u: %s%s%s key_is_ca %d", i, dch->nkeys,
|
||||
+ dch->keys[i] == NULL ? "" : sshkey_ssh_name(dch->keys[i]),
|
||||
+ dch->keys[i] == NULL ? "" : " ",
|
||||
+ dch->keys[i] == NULL ? "none" : fp,
|
||||
+ dch->key_is_ca[i]);
|
||||
+ free(fp);
|
||||
+ }
|
||||
+}
|
||||
+#endif /* DEBUG_CONSTRAINTS */
|
||||
+
|
||||
+static void
|
||||
+dump_dest_constraints(const char *context,
|
||||
+ const struct dest_constraint *dcs, size_t ndcs)
|
||||
+{
|
||||
+#ifdef DEBUG_CONSTRAINTS
|
||||
+ size_t i;
|
||||
+
|
||||
+ debug_f("%s: %zu constraints", context, ndcs);
|
||||
+ for (i = 0; i < ndcs; i++) {
|
||||
+ debug_f("constraint %zu / %zu: from: ", i, ndcs);
|
||||
+ dump_dest_constraint_hop(&dcs[i].from);
|
||||
+ debug_f("constraint %zu / %zu: to: ", i, ndcs);
|
||||
+ dump_dest_constraint_hop(&dcs[i].to);
|
||||
+ }
|
||||
+ debug_f("done for %s", context);
|
||||
+#endif /* DEBUG_CONSTRAINTS */
|
||||
+}
|
||||
static void
|
||||
free_identity(Identity *id)
|
||||
{
|
||||
@@ -520,13 +604,22 @@ process_request_identities(SocketEntry *e)
|
||||
Identity *id;
|
||||
struct sshbuf *msg, *keys;
|
||||
int r;
|
||||
- u_int nentries = 0;
|
||||
+ u_int i = 0, nentries = 0;
|
||||
+ char *fp;
|
||||
|
||||
debug2_f("entering");
|
||||
|
||||
if ((msg = sshbuf_new()) == NULL || (keys = sshbuf_new()) == NULL)
|
||||
fatal_f("sshbuf_new failed");
|
||||
TAILQ_FOREACH(id, &idtab->idlist, next) {
|
||||
+ if ((fp = sshkey_fingerprint(id->key, SSH_FP_HASH_DEFAULT,
|
||||
+ SSH_FP_DEFAULT)) == NULL)
|
||||
+ fatal_f("fingerprint failed");
|
||||
+ debug_f("key %u / %u: %s %s", i++, idtab->nentries,
|
||||
+ sshkey_ssh_name(id->key), fp);
|
||||
+ dump_dest_constraints(__func__,
|
||||
+ id->dest_constraints, id->ndest_constraints);
|
||||
+ free(fp);
|
||||
/* identity not visible, don't include in response */
|
||||
if (identity_permitted(id, e, NULL, NULL, NULL) != 0)
|
||||
continue;
|
||||
@@ -1235,6 +1328,7 @@ process_add_identity(SocketEntry *e)
|
||||
sshbuf_reset(e->request);
|
||||
goto out;
|
||||
}
|
||||
+ dump_dest_constraints(__func__, dest_constraints, ndest_constraints);
|
||||
|
||||
if (sk_provider != NULL) {
|
||||
if (!sshkey_is_sk(k)) {
|
||||
@@ -1414,6 +1508,7 @@ process_add_smartcard_key(SocketEntry *e)
|
||||
error_f("failed to parse constraints");
|
||||
goto send;
|
||||
}
|
||||
+ dump_dest_constraints(__func__, dest_constraints, ndest_constraints);
|
||||
if (e->nsession_ids != 0 && !remote_add_provider) {
|
||||
verbose("failed PKCS#11 add of \"%.100s\": remote addition of "
|
||||
"providers is disabled", provider);
|
||||
@@ -1449,10 +1544,9 @@ process_add_smartcard_key(SocketEntry *e)
|
||||
}
|
||||
id->death = death;
|
||||
id->confirm = confirm;
|
||||
- id->dest_constraints = dest_constraints;
|
||||
+ id->dest_constraints = dup_dest_constraints(
|
||||
+ dest_constraints, ndest_constraints);
|
||||
id->ndest_constraints = ndest_constraints;
|
||||
- dest_constraints = NULL; /* transferred */
|
||||
- ndest_constraints = 0;
|
||||
TAILQ_INSERT_TAIL(&idtab->idlist, id, next);
|
||||
idtab->nentries++;
|
||||
success = 1;
|
||||
--
|
||||
2.40.0
|
||||
@@ -0,0 +1,97 @@
|
||||
From 7ef3787c84b6b524501211b11a26c742f829af1a Mon Sep 17 00:00:00 2001
|
||||
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||
Date: Mon, 18 Dec 2023 14:47:44 +0000
|
||||
Subject: [PATCH] upstream: ban user/hostnames with most shell metacharacters
|
||||
This makes ssh(1) refuse user or host names provided on the commandline that
|
||||
contain most shell metacharacters.
|
||||
|
||||
Some programs that invoke ssh(1) using untrusted data do not filter
|
||||
metacharacters in arguments they supply. This could create
|
||||
interactions with user-specified ProxyCommand and other directives
|
||||
that allow shell injection attacks to occur.
|
||||
|
||||
It's a mistake to invoke ssh(1) with arbitrary untrusted arguments,
|
||||
but getting this stuff right can be tricky, so this should prevent
|
||||
most obvious ways of creating risky situations. It however is not
|
||||
and cannot be perfect: ssh(1) has no practical way of interpreting
|
||||
what shell quoting rules are in use and how they interact with the
|
||||
user's specified ProxyCommand.
|
||||
|
||||
To allow configurations that use strange user or hostnames to
|
||||
continue to work, this strictness is applied only to names coming
|
||||
from the commandline. Names specified using User or Hostname
|
||||
directives in ssh_config(5) are not affected.
|
||||
|
||||
feedback/ok millert@ markus@ dtucker@ deraadt@
|
||||
|
||||
OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9
|
||||
|
||||
CVE: CVE-2023-51385
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a]
|
||||
|
||||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
|
||||
---
|
||||
ssh.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 39 insertions(+)
|
||||
|
||||
diff --git a/ssh.c b/ssh.c
|
||||
index 8ff9788..82ed15f 100644
|
||||
--- a/ssh.c
|
||||
+++ b/ssh.c
|
||||
@@ -611,6 +611,41 @@ ssh_conn_info_free(struct ssh_conn_info *cinfo)
|
||||
free(cinfo);
|
||||
}
|
||||
|
||||
+static int
|
||||
+valid_hostname(const char *s)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ if (*s == '-')
|
||||
+ return 0;
|
||||
+ for (i = 0; s[i] != 0; i++) {
|
||||
+ if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL ||
|
||||
+ isspace((u_char)s[i]) || iscntrl((u_char)s[i]))
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+valid_ruser(const char *s)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ if (*s == '-')
|
||||
+ return 0;
|
||||
+ for (i = 0; s[i] != 0; i++) {
|
||||
+ if (strchr("'`\";&<>|(){}", s[i]) != NULL)
|
||||
+ return 0;
|
||||
+ /* Disallow '-' after whitespace */
|
||||
+ if (isspace((u_char)s[i]) && s[i + 1] == '-')
|
||||
+ return 0;
|
||||
+ /* Disallow \ in last position */
|
||||
+ if (s[i] == '\\' && s[i + 1] == '\0')
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Main program for the ssh client.
|
||||
*/
|
||||
@@ -1097,6 +1132,10 @@ main(int ac, char **av)
|
||||
if (!host)
|
||||
usage();
|
||||
|
||||
+ if (!valid_hostname(host))
|
||||
+ fatal("hostname contains invalid characters");
|
||||
+ if (options.user != NULL && !valid_ruser(options.user))
|
||||
+ fatal("remote username contains invalid characters");
|
||||
host_arg = xstrdup(host);
|
||||
|
||||
/* Initialize the command to execute on remote host. */
|
||||
--
|
||||
2.40.0
|
||||
@@ -0,0 +1,30 @@
|
||||
From fcd78e31cdd45a7e69ccfe6d8a3b1037dc1de290 Mon Sep 17 00:00:00 2001
|
||||
From: "djm@openbsd.org" <djm@openbsd.org>
|
||||
Date: Wed, 24 May 2023 23:01:06 +0000
|
||||
Subject: [PATCH] upstream: fix AuthorizedPrincipalsCommand when
|
||||
AuthorizedKeysCommand
|
||||
Description: Fix the wrong code as the Subject suggests
|
||||
I added that description to mention, that the file header change was
|
||||
incompatible with the proposed code below and failed to apply,
|
||||
therefore I dropped that chunk of the code.
|
||||
Origin: backport, https://github.com/openssh/openssh-portable/commit/fcd78e31cdd45a7e69ccfe6d8a3b1037dc1de290
|
||||
Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=3574
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2031942
|
||||
Last-Update: 2023-09-01
|
||||
|
||||
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/openssh/tree/debian/patches/fix-authorized-principals-command.patch?h=ubuntu/jammy-security
|
||||
Upstream commit https://github.com/openssh/openssh-portable/commit/fcd78e31cdd45a7e69ccfe6d8a3b1037dc1de290]
|
||||
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/servconf.c
|
||||
+++ b/servconf.c
|
||||
@@ -2372,7 +2372,7 @@ process_server_config_line_depth(ServerO
|
||||
fatal("%.200s line %d: %s must be an absolute path",
|
||||
filename, linenum, keyword);
|
||||
}
|
||||
- if (*activep && options->authorized_keys_command == NULL)
|
||||
+ if (*activep && *charptr == NULL)
|
||||
*charptr = xstrdup(str + len);
|
||||
argv_consume(&ac);
|
||||
break;
|
||||
@@ -5,7 +5,7 @@ export SKIP_UNIT=1
|
||||
|
||||
cd regress
|
||||
sed -i "/\t\tagent-ptrace /d" Makefile
|
||||
make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
|
||||
make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="" tests \
|
||||
| sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
|
||||
|
||||
SSHAGENT=`which ssh-agent`
|
||||
|
||||
@@ -32,6 +32,10 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
|
||||
file://CVE-2023-38408-0002.patch \
|
||||
file://CVE-2023-38408-0003.patch \
|
||||
file://CVE-2023-38408-0004.patch \
|
||||
file://fix-authorized-principals-command.patch \
|
||||
file://CVE-2023-48795.patch \
|
||||
file://CVE-2023-51384.patch \
|
||||
file://CVE-2023-51385.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "fd497654b7ab1686dac672fb83dfb4ba4096e8b5ffcdaccd262380ae58bec5e7"
|
||||
|
||||
@@ -170,7 +174,7 @@ RDEPENDS:${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pa
|
||||
# conflict with each other
|
||||
RDEPENDS:${PN}-dev = ""
|
||||
# gdb would make attach-ptrace test pass rather than skip but not worth the build dependencies
|
||||
RDEPENDS:${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed sudo coreutils"
|
||||
RDEPENDS:${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed coreutils"
|
||||
|
||||
RPROVIDES:${PN}-ssh = "ssh"
|
||||
RPROVIDES:${PN}-sshd = "sshd"
|
||||
|
||||
180
meta/recipes-connectivity/openssl/openssl/CVE-2023-5678.patch
Normal file
180
meta/recipes-connectivity/openssl/openssl/CVE-2023-5678.patch
Normal file
@@ -0,0 +1,180 @@
|
||||
From db925ae2e65d0d925adef429afc37f75bd1c2017 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Levitte <levitte@openssl.org>
|
||||
Date: Fri, 20 Oct 2023 09:18:19 +0200
|
||||
Subject: [PATCH] Make DH_check_pub_key() and DH_generate_key() safer yet
|
||||
|
||||
We already check for an excessively large P in DH_generate_key(), but not in
|
||||
DH_check_pub_key(), and none of them check for an excessively large Q.
|
||||
|
||||
This change adds all the missing excessive size checks of P and Q.
|
||||
|
||||
It's to be noted that behaviours surrounding excessively sized P and Q
|
||||
differ. DH_check() raises an error on the excessively sized P, but only
|
||||
sets a flag for the excessively sized Q. This behaviour is mimicked in
|
||||
DH_check_pub_key().
|
||||
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
Reviewed-by: Matt Caswell <matt@openssl.org>
|
||||
Reviewed-by: Hugo Landau <hlandau@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/22518)
|
||||
|
||||
(cherry picked from commit ddeb4b6c6d527e54ce9a99cba785c0f7776e54b6)
|
||||
|
||||
Upstream-Status: Backport [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=db925ae2e65d0d925adef429afc37f75bd1c2017]
|
||||
CVE: CVE-2023-5678
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
crypto/dh/dh_check.c | 12 ++++++++++++
|
||||
crypto/dh/dh_err.c | 3 ++-
|
||||
crypto/dh/dh_key.c | 12 ++++++++++++
|
||||
crypto/err/openssl.txt | 1 +
|
||||
include/crypto/dherr.h | 2 +-
|
||||
include/openssl/dh.h | 6 +++---
|
||||
include/openssl/dherr.h | 3 ++-
|
||||
7 files changed, 33 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c
|
||||
index 7ba2bea..e20eb62 100644
|
||||
--- a/crypto/dh/dh_check.c
|
||||
+++ b/crypto/dh/dh_check.c
|
||||
@@ -249,6 +249,18 @@ int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key)
|
||||
*/
|
||||
int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
|
||||
{
|
||||
+ /* Don't do any checks at all with an excessively large modulus */
|
||||
+ if (BN_num_bits(dh->params.p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) {
|
||||
+ ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_LARGE);
|
||||
+ *ret = DH_MODULUS_TOO_LARGE | DH_CHECK_PUBKEY_INVALID;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (dh->params.q != NULL && BN_ucmp(dh->params.p, dh->params.q) < 0) {
|
||||
+ *ret |= DH_CHECK_INVALID_Q_VALUE | DH_CHECK_PUBKEY_INVALID;
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
return ossl_ffc_validate_public_key(&dh->params, pub_key, ret);
|
||||
}
|
||||
|
||||
diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c
|
||||
index 4152397..f76ac0d 100644
|
||||
--- a/crypto/dh/dh_err.c
|
||||
+++ b/crypto/dh/dh_err.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
+ * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -54,6 +54,7 @@ static const ERR_STRING_DATA DH_str_reasons[] = {
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_PARAMETER_ENCODING_ERROR),
|
||||
"parameter encoding error"},
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_PEER_KEY_ERROR), "peer key error"},
|
||||
+ {ERR_PACK(ERR_LIB_DH, 0, DH_R_Q_TOO_LARGE), "q too large"},
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_SHARED_INFO_ERROR), "shared info error"},
|
||||
{ERR_PACK(ERR_LIB_DH, 0, DH_R_UNABLE_TO_CHECK_GENERATOR),
|
||||
"unable to check generator"},
|
||||
diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c
|
||||
index d84ea99..afc49f5 100644
|
||||
--- a/crypto/dh/dh_key.c
|
||||
+++ b/crypto/dh/dh_key.c
|
||||
@@ -49,6 +49,12 @@ int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
|
||||
goto err;
|
||||
}
|
||||
|
||||
+ if (dh->params.q != NULL
|
||||
+ && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) {
|
||||
+ ERR_raise(ERR_LIB_DH, DH_R_Q_TOO_LARGE);
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) {
|
||||
ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_SMALL);
|
||||
return 0;
|
||||
@@ -267,6 +273,12 @@ static int generate_key(DH *dh)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ if (dh->params.q != NULL
|
||||
+ && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) {
|
||||
+ ERR_raise(ERR_LIB_DH, DH_R_Q_TOO_LARGE);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (BN_num_bits(dh->params.p) < DH_MIN_MODULUS_BITS) {
|
||||
ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_SMALL);
|
||||
return 0;
|
||||
diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt
|
||||
index e51504b..36de321 100644
|
||||
--- a/crypto/err/openssl.txt
|
||||
+++ b/crypto/err/openssl.txt
|
||||
@@ -500,6 +500,7 @@ DH_R_NO_PARAMETERS_SET:107:no parameters set
|
||||
DH_R_NO_PRIVATE_VALUE:100:no private value
|
||||
DH_R_PARAMETER_ENCODING_ERROR:105:parameter encoding error
|
||||
DH_R_PEER_KEY_ERROR:111:peer key error
|
||||
+DH_R_Q_TOO_LARGE:130:q too large
|
||||
DH_R_SHARED_INFO_ERROR:113:shared info error
|
||||
DH_R_UNABLE_TO_CHECK_GENERATOR:121:unable to check generator
|
||||
DSA_R_BAD_FFC_PARAMETERS:114:bad ffc parameters
|
||||
diff --git a/include/crypto/dherr.h b/include/crypto/dherr.h
|
||||
index bb24d13..519327f 100644
|
||||
--- a/include/crypto/dherr.h
|
||||
+++ b/include/crypto/dherr.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
- * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
+ * Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
diff --git a/include/openssl/dh.h b/include/openssl/dh.h
|
||||
index 6533260..50e0cf5 100644
|
||||
--- a/include/openssl/dh.h
|
||||
+++ b/include/openssl/dh.h
|
||||
@@ -141,7 +141,7 @@ DECLARE_ASN1_ITEM(DHparams)
|
||||
# define DH_GENERATOR_3 3
|
||||
# define DH_GENERATOR_5 5
|
||||
|
||||
-/* DH_check error codes */
|
||||
+/* DH_check error codes, some of them shared with DH_check_pub_key */
|
||||
/*
|
||||
* NB: These values must align with the equivalently named macros in
|
||||
* internal/ffc.h.
|
||||
@@ -151,10 +151,10 @@ DECLARE_ASN1_ITEM(DHparams)
|
||||
# define DH_UNABLE_TO_CHECK_GENERATOR 0x04
|
||||
# define DH_NOT_SUITABLE_GENERATOR 0x08
|
||||
# define DH_CHECK_Q_NOT_PRIME 0x10
|
||||
-# define DH_CHECK_INVALID_Q_VALUE 0x20
|
||||
+# define DH_CHECK_INVALID_Q_VALUE 0x20 /* +DH_check_pub_key */
|
||||
# define DH_CHECK_INVALID_J_VALUE 0x40
|
||||
# define DH_MODULUS_TOO_SMALL 0x80
|
||||
-# define DH_MODULUS_TOO_LARGE 0x100
|
||||
+# define DH_MODULUS_TOO_LARGE 0x100 /* +DH_check_pub_key */
|
||||
|
||||
/* DH_check_pub_key error codes */
|
||||
# define DH_CHECK_PUBKEY_TOO_SMALL 0x01
|
||||
diff --git a/include/openssl/dherr.h b/include/openssl/dherr.h
|
||||
index 5d2a762..074a701 100644
|
||||
--- a/include/openssl/dherr.h
|
||||
+++ b/include/openssl/dherr.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
+ * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -50,6 +50,7 @@
|
||||
# define DH_R_NO_PRIVATE_VALUE 100
|
||||
# define DH_R_PARAMETER_ENCODING_ERROR 105
|
||||
# define DH_R_PEER_KEY_ERROR 111
|
||||
+# define DH_R_Q_TOO_LARGE 130
|
||||
# define DH_R_SHARED_INFO_ERROR 113
|
||||
# define DH_R_UNABLE_TO_CHECK_GENERATOR 121
|
||||
|
||||
--
|
||||
2.40.1
|
||||
113
meta/recipes-connectivity/openssl/openssl/CVE-2023-6129.patch
Normal file
113
meta/recipes-connectivity/openssl/openssl/CVE-2023-6129.patch
Normal file
@@ -0,0 +1,113 @@
|
||||
From 8d847a3ffd4f0b17ee33962cf69c36224925b34f Mon Sep 17 00:00:00 2001
|
||||
From: Rohan McLure <rmclure@linux.ibm.com>
|
||||
Date: Thu, 4 Jan 2024 10:25:50 +0100
|
||||
Subject: [PATCH] poly1305-ppc.pl: Fix vector register clobbering
|
||||
|
||||
Fixes CVE-2023-6129
|
||||
|
||||
The POLY1305 MAC (message authentication code) implementation in OpenSSL for
|
||||
PowerPC CPUs saves the the contents of vector registers in different order
|
||||
than they are restored. Thus the contents of some of these vector registers
|
||||
is corrupted when returning to the caller. The vulnerable code is used only
|
||||
on newer PowerPC processors supporting the PowerISA 2.07 instructions.
|
||||
|
||||
Reviewed-by: Matt Caswell <matt@openssl.org>
|
||||
Reviewed-by: Richard Levitte <levitte@openssl.org>
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/23200)
|
||||
|
||||
Upstream-Status: Backport [https://github.com/openssl/openssl/commit/8d847a3ffd4f0b17ee33962cf69c36224925b34f]
|
||||
CVE: CVE-2023-6129
|
||||
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
|
||||
---
|
||||
crypto/poly1305/asm/poly1305-ppc.pl | 42 ++++++++++++++---------------
|
||||
1 file changed, 21 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/crypto/poly1305/asm/poly1305-ppc.pl b/crypto/poly1305/asm/poly1305-ppc.pl
|
||||
index 9f86134..2e601bb 100755
|
||||
--- a/crypto/poly1305/asm/poly1305-ppc.pl
|
||||
+++ b/crypto/poly1305/asm/poly1305-ppc.pl
|
||||
@@ -744,7 +744,7 @@ ___
|
||||
my $LOCALS= 6*$SIZE_T;
|
||||
my $VSXFRAME = $LOCALS + 6*$SIZE_T;
|
||||
$VSXFRAME += 128; # local variables
|
||||
- $VSXFRAME += 13*16; # v20-v31 offload
|
||||
+ $VSXFRAME += 12*16; # v20-v31 offload
|
||||
|
||||
my $BIG_ENDIAN = ($flavour !~ /le/) ? 4 : 0;
|
||||
|
||||
@@ -919,12 +919,12 @@ __poly1305_blocks_vsx:
|
||||
addi r11,r11,32
|
||||
stvx v22,r10,$sp
|
||||
addi r10,r10,32
|
||||
- stvx v23,r10,$sp
|
||||
- addi r10,r10,32
|
||||
- stvx v24,r11,$sp
|
||||
+ stvx v23,r11,$sp
|
||||
addi r11,r11,32
|
||||
- stvx v25,r10,$sp
|
||||
+ stvx v24,r10,$sp
|
||||
addi r10,r10,32
|
||||
+ stvx v25,r11,$sp
|
||||
+ addi r11,r11,32
|
||||
stvx v26,r10,$sp
|
||||
addi r10,r10,32
|
||||
stvx v27,r11,$sp
|
||||
@@ -1153,12 +1153,12 @@ __poly1305_blocks_vsx:
|
||||
addi r11,r11,32
|
||||
stvx v22,r10,$sp
|
||||
addi r10,r10,32
|
||||
- stvx v23,r10,$sp
|
||||
- addi r10,r10,32
|
||||
- stvx v24,r11,$sp
|
||||
+ stvx v23,r11,$sp
|
||||
addi r11,r11,32
|
||||
- stvx v25,r10,$sp
|
||||
+ stvx v24,r10,$sp
|
||||
addi r10,r10,32
|
||||
+ stvx v25,r11,$sp
|
||||
+ addi r11,r11,32
|
||||
stvx v26,r10,$sp
|
||||
addi r10,r10,32
|
||||
stvx v27,r11,$sp
|
||||
@@ -1899,26 +1899,26 @@ Ldone_vsx:
|
||||
mtspr 256,r12 # restore vrsave
|
||||
lvx v20,r10,$sp
|
||||
addi r10,r10,32
|
||||
- lvx v21,r10,$sp
|
||||
- addi r10,r10,32
|
||||
- lvx v22,r11,$sp
|
||||
+ lvx v21,r11,$sp
|
||||
addi r11,r11,32
|
||||
- lvx v23,r10,$sp
|
||||
+ lvx v22,r10,$sp
|
||||
addi r10,r10,32
|
||||
- lvx v24,r11,$sp
|
||||
+ lvx v23,r11,$sp
|
||||
addi r11,r11,32
|
||||
- lvx v25,r10,$sp
|
||||
+ lvx v24,r10,$sp
|
||||
addi r10,r10,32
|
||||
- lvx v26,r11,$sp
|
||||
+ lvx v25,r11,$sp
|
||||
addi r11,r11,32
|
||||
- lvx v27,r10,$sp
|
||||
+ lvx v26,r10,$sp
|
||||
addi r10,r10,32
|
||||
- lvx v28,r11,$sp
|
||||
+ lvx v27,r11,$sp
|
||||
addi r11,r11,32
|
||||
- lvx v29,r10,$sp
|
||||
+ lvx v28,r10,$sp
|
||||
addi r10,r10,32
|
||||
- lvx v30,r11,$sp
|
||||
- lvx v31,r10,$sp
|
||||
+ lvx v29,r11,$sp
|
||||
+ addi r11,r11,32
|
||||
+ lvx v30,r10,$sp
|
||||
+ lvx v31,r11,$sp
|
||||
$POP r27,`$VSXFRAME-$SIZE_T*5`($sp)
|
||||
$POP r28,`$VSXFRAME-$SIZE_T*4`($sp)
|
||||
$POP r29,`$VSXFRAME-$SIZE_T*3`($sp)
|
||||
--
|
||||
2.39.3
|
||||
127
meta/recipes-connectivity/openssl/openssl/CVE-2023-6237.patch
Normal file
127
meta/recipes-connectivity/openssl/openssl/CVE-2023-6237.patch
Normal file
@@ -0,0 +1,127 @@
|
||||
rom e09fc1d746a4fd15bb5c3d7bbbab950aadd005db Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Mraz <tomas@openssl.org>
|
||||
Date: Fri, 22 Dec 2023 16:25:56 +0100
|
||||
Subject: [PATCH] Limit the execution time of RSA public key check
|
||||
|
||||
Fixes CVE-2023-6237
|
||||
|
||||
If a large and incorrect RSA public key is checked with
|
||||
EVP_PKEY_public_check() the computation could take very long time
|
||||
due to no limit being applied to the RSA public key size and
|
||||
unnecessarily high number of Miller-Rabin algorithm rounds
|
||||
used for non-primality check of the modulus.
|
||||
|
||||
Now the keys larger than 16384 bits (OPENSSL_RSA_MAX_MODULUS_BITS)
|
||||
will fail the check with RSA_R_MODULUS_TOO_LARGE error reason.
|
||||
Also the number of Miller-Rabin rounds was set to 5.
|
||||
|
||||
Reviewed-by: Neil Horman <nhorman@openssl.org>
|
||||
Reviewed-by: Matt Caswell <matt@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/23243)
|
||||
|
||||
Upstream-Status: Backport [https://github.com/openssl/openssl/commit/e09fc1d746a4fd15bb5c3d7bbbab950aadd005db]
|
||||
CVE: CVE-2023-6237
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
crypto/rsa/rsa_sp800_56b_check.c | 8 +++-
|
||||
test/recipes/91-test_pkey_check.t | 2 +-
|
||||
.../91-test_pkey_check_data/rsapub_17k.pem | 48 +++++++++++++++++++
|
||||
3 files changed, 56 insertions(+), 2 deletions(-)
|
||||
create mode 100644 test/recipes/91-test_pkey_check_data/rsapub_17k.pem
|
||||
|
||||
diff --git a/crypto/rsa/rsa_sp800_56b_check.c b/crypto/rsa/rsa_sp800_56b_check.c
|
||||
index fc8f19b..bcbdd24 100644
|
||||
--- a/crypto/rsa/rsa_sp800_56b_check.c
|
||||
+++ b/crypto/rsa/rsa_sp800_56b_check.c
|
||||
@@ -289,6 +289,11 @@ int ossl_rsa_sp800_56b_check_public(const RSA *rsa)
|
||||
return 0;
|
||||
|
||||
nbits = BN_num_bits(rsa->n);
|
||||
+ if (nbits > OPENSSL_RSA_MAX_MODULUS_BITS) {
|
||||
+ ERR_raise(ERR_LIB_RSA, RSA_R_MODULUS_TOO_LARGE);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
#ifdef FIPS_MODULE
|
||||
/*
|
||||
* (Step a): modulus must be 2048 or 3072 (caveat from SP800-56Br1)
|
||||
@@ -324,7 +329,8 @@ int ossl_rsa_sp800_56b_check_public(const RSA *rsa)
|
||||
goto err;
|
||||
}
|
||||
|
||||
- ret = ossl_bn_miller_rabin_is_prime(rsa->n, 0, ctx, NULL, 1, &status);
|
||||
+ /* Highest number of MR rounds from FIPS 186-5 Section B.3 Table B.1 */
|
||||
+ ret = ossl_bn_miller_rabin_is_prime(rsa->n, 5, ctx, NULL, 1, &status);
|
||||
#ifdef FIPS_MODULE
|
||||
if (ret != 1 || status != BN_PRIMETEST_COMPOSITE_NOT_POWER_OF_PRIME) {
|
||||
#else
|
||||
diff --git a/test/recipes/91-test_pkey_check.t b/test/recipes/91-test_pkey_check.t
|
||||
index dc7cc64..f8088df 100644
|
||||
--- a/test/recipes/91-test_pkey_check.t
|
||||
+++ b/test/recipes/91-test_pkey_check.t
|
||||
@@ -70,7 +70,7 @@ push(@positive_tests, (
|
||||
"dhpkey.pem"
|
||||
)) unless disabled("dh");
|
||||
|
||||
-my @negative_pubtests = ();
|
||||
+my @negative_pubtests = ("rsapub_17k.pem"); # Too big RSA public key
|
||||
|
||||
push(@negative_pubtests, (
|
||||
"dsapub_noparam.der"
|
||||
diff --git a/test/recipes/91-test_pkey_check_data/rsapub_17k.pem b/test/recipes/91-test_pkey_check_data/rsapub_17k.pem
|
||||
new file mode 100644
|
||||
index 0000000..9a2eaed
|
||||
--- /dev/null
|
||||
+++ b/test/recipes/91-test_pkey_check_data/rsapub_17k.pem
|
||||
@@ -0,0 +1,48 @@
|
||||
+-----BEGIN PUBLIC KEY-----
|
||||
+MIIIbzANBgkqhkiG9w0BAQEFAAOCCFwAMIIIVwKCCE4Ang+cE5H+hg3RbapDAHqR
|
||||
+B9lUnp2MlAwsZxQ/FhYepaR60bFQeumbu7817Eo5YLMObVI99hF1C4u/qcpD4Jph
|
||||
+gZt87/JAYDbP+DIh/5gUXCL9m5Fp4u7mvZaZdnlcftBvR1uKUTCAwc9pZ/Cfr8W2
|
||||
+GzrRODzsNYnk2DcZMfe2vRDuDZRopE+Y+I72rom2SZLxoN547N1daM/M/CL9KVQ/
|
||||
+XMI/YOpJrBI0jI3brMRhLkvLckwies9joufydlGbJkeil9H7/grj3fQZtFkZ2Pkj
|
||||
+b87XDzRVX7wsEpAgPJxskL3jApokCp1kQYKG+Uc3dKM9Ade6IAPK7VKcmbAQTYw2
|
||||
+gZxsc28dtstazmfGz0ACCTSMrmbgWAM3oPL7RRzhrXDWgmYQ0jHefGh8SNTIgtPq
|
||||
+TuHxPYkDMQNaf0LmDGCxqlnf4b5ld3YaU8zZ/RqIRx5v/+w0rJUvU53qY1bYSnL1
|
||||
+vbqKSnN2mip0GYyQ4AUgkS1NBV4rGYU/VTvzEjLfkg02KOtHKandvEoUjmZPzCT0
|
||||
+V2ZhGc8K1UJNGYlIiHqCdwCBoghvly/pYajTkDXyd6BsukzA5H3IkZB1xDgl035j
|
||||
+/0Cr7QeZLEOdi9fPdSSaBT6OmD0WFuZfJF0wMr7ucRhWzPXvSensD9v7MBE7tNfH
|
||||
+SLeTSx8tLt8UeWriiM+0CnkPR1IOqMOxubOyf1eV8NQqEWm5wEQG/0IskbOKnaHa
|
||||
+PqLFJZn/bvyL3XK5OxVIJG3z6bnRDOMS9SzkjqgPdIO8tkySEHVSi/6iuGUltx3Y
|
||||
+Fmq6ye/r34ekyHPbfn6UuTON7joM6SIXb5bHM64x4iMVWx4hMvDjfy0UqfywAUyu
|
||||
+C1o7BExSMxxFG8GJcqR0K8akpPp7EM588PC+YuItoxzXgfUJnP3BQ1Beev2Ve7/J
|
||||
+xeGZH0N4ntfr+cuaLAakAER9zDglwChWflw3NNFgIdAgSxXv3XXx5xDXpdP4lxUo
|
||||
+F5zAN4Mero3yV90FaJl7Vhq/UFVidbwFc15jUDwaE0mKRcsBeVd3GOhoECAgE0id
|
||||
+aIPT20z8oVY0FyTJlRk7QSjo8WjJSrHY/Fn14gctX07ZdfkufyL6w+NijBdYluvB
|
||||
+nIrgHEvpkDEWoIa8qcx0EppoIcmqgMV2mTShfFYSybsO33Pm8WXec2FXjwhzs1Pi
|
||||
+R/BuIW8rHPI67xqWm0h8dEw11vtfi9a/BBBikFHe59KBjMTG+lW/gADNvRoTzGh7
|
||||
+kN4+UVDS3jlSisRZZOn1XoeQtpubNYWgUsecjKy45IwIj8h1SHgn3wkmUesY0woN
|
||||
+mOdoNtq+NezN4RFtbCOHhxFVpKKDi/HQP2ro0ykkXMDjwEIVf2Lii1Mg9UP8m+Ux
|
||||
+AOqkTrIkdogkRx+70h7/wUOfDIFUq2JbKzqxJYamyEphcdAko7/B8efQKc61Z93O
|
||||
+f2SHa4++4WI7wIIx18v5KV4M/cRmrfc8w9WRkQN3gBT5AJMuqwcSHVXBWvNQeGmi
|
||||
+ScMh7X6cCZ0daEujqb8svq4WgsJ8UT4GaGBRIYtt7QUKEh+JQwNJzneRYZ3pzpaH
|
||||
+UJeeoYobMlkp3rM9cYzdq90nBQiI9Jsbim9m9ggb2dMOS5CsI9S/IuG2O5uTjfxx
|
||||
+wkwsd5nLDFtNXHYZ7W6XlVJ1Rc6zShnEmdCn3mmibb6OaMUmun2yl9ryEjVSoXLP
|
||||
+fSA8W9K9yNhKTRkzdXJfqlC+s/ovX2xBGxsuOoUDaXhRVz0qmpKIHeSFjIP4iXq4
|
||||
+y8gDiwvM3HbZfvVonbg6siPwpn4uvw3hesojk1DKAENS52i6U3uK2fs1ALVxsFNS
|
||||
+Yh914rDu0Q3e4RXVhURaYzoEbLCot6WGYeCCfQOK0rkETMv+sTYYscC8/THuW7SL
|
||||
+HG5zy9Ed95N1Xmf8J+My7gM7ZFodGdHsWvdzEmqsdOFh6IVx/VfHFX0MDBq0t6lZ
|
||||
+eRvVgVCfu3gkYLwPScn/04E02vOom51ISKHsF/I11erC66jjNYV9BSpH8O7sAHxZ
|
||||
+EmPT2ZVVRSgivOHdQW/FZ3UZQQhVaVSympo2Eb4yWEMFn84Q8T+9Honj6gnB5PXz
|
||||
+chmeCsOMlcg1mwWwhn0k+OAWEZy7VRUk5Ahp0fBAGJgwBdqrZ3kM356DjUkVBiYq
|
||||
+4eHyvafNKmjf2mnFsI3g2NKRNyl1Lh63wyCFx60yYvBUfXF/W9PFJbD9CiP83kEW
|
||||
+gV36gxTsbOSfhpO1OXR90ODy0kx06XzWmJCUugK8u9bx4F/CjV+LIHExuNJiethC
|
||||
+A8sIup/MT0fWp4RO/SsVblGqfoqJTaPnhptQzeH2N07pbWkxeMuL6ppPuwFmfVjK
|
||||
+FJndqCVrAukcPEOQ16iVURuloJMudqYRc9QKkJFsnv0W/iMNbqQGmXe8Q/5qFiys
|
||||
+26NIQBiE2ad9hNLnoccEnmYSRgnW3ZPSKuq5TDdYyDqTZH2r8cam65pr3beKw2XC
|
||||
+xw4cc7VaxiwGC2Mg2wRmwwPaTjrcEt6sMa3RjwFEVBxBFyM26wnTEZsTBquCxV0J
|
||||
+pgERaeplkixP2Q0m7XAdlDaob973SM2vOoUgypzDchWmpx7u775bnOfU5CihwXl+
|
||||
+k0i09WZuT8bPmhEAiGCw5sNzMkz1BC2cCZFfJIkE2vc/wXYOrGxBTJo0EKaUFswa
|
||||
+2dnP/u0bn+VksBUM7ywW9LJSXh4mN+tpzdeJtxEObKwX1I0dQxSPWmjd2++wMr9q
|
||||
+Unre5fCrDToy2H7C2VKSpuOCT2/Kv4JDQRWwI4KxQOpn0UknAGNmfBoTtpIZ3LEb
|
||||
+77oBUJdMQD7tQBBLL0a6f1TdK0dHVprWWawJ+gGFMiMQXqAqblHcxFKWuHv9bQID
|
||||
+AQAB
|
||||
+-----END PUBLIC KEY-----
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -12,6 +12,9 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
|
||||
file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
|
||||
file://afalg.patch \
|
||||
file://0001-Configure-do-not-tweak-mips-cflags.patch \
|
||||
file://CVE-2023-5678.patch \
|
||||
file://CVE-2023-6129.patch \
|
||||
file://CVE-2023-6237.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-nativesdk = " \
|
||||
|
||||
@@ -30,6 +30,7 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
|
||||
file://CVE-2021-36369.patch \
|
||||
file://CVE-2023-36328.patch \
|
||||
file://CVE-2023-48795.patch \
|
||||
"
|
||||
|
||||
PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
|
||||
|
||||
234
meta/recipes-core/dropbear/dropbear/CVE-2023-48795.patch
Normal file
234
meta/recipes-core/dropbear/dropbear/CVE-2023-48795.patch
Normal file
@@ -0,0 +1,234 @@
|
||||
From 6e43be5c7b99dbee49dc72b6f989f29fdd7e9356 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnston <matt@ucc.asn.au>
|
||||
Date: Mon, 20 Nov 2023 14:02:47 +0800
|
||||
Subject: [PATCH] Implement Strict KEX mode
|
||||
|
||||
As specified by OpenSSH with kex-strict-c-v00@openssh.com and
|
||||
kex-strict-s-v00@openssh.com.
|
||||
|
||||
CVE: CVE-2023-48795
|
||||
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/6e43be5c7b99dbee49dc72b6f989f29fdd7e9356]
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
cli-session.c | 11 +++++++++++
|
||||
common-algo.c | 6 ++++++
|
||||
common-kex.c | 26 +++++++++++++++++++++++++-
|
||||
kex.h | 3 +++
|
||||
process-packet.c | 34 +++++++++++++++++++---------------
|
||||
ssh.h | 4 ++++
|
||||
svr-session.c | 3 +++
|
||||
7 files changed, 71 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/cli-session.c b/src/cli-session.c
|
||||
index 5981b2470..d261c8f82 100644
|
||||
--- a/cli-session.c
|
||||
+++ b/cli-session.c
|
||||
@@ -46,6 +46,7 @@ static void cli_finished(void) ATTRIB_NORETURN;
|
||||
static void recv_msg_service_accept(void);
|
||||
static void cli_session_cleanup(void);
|
||||
static void recv_msg_global_request_cli(void);
|
||||
+static void cli_algos_initialise(void);
|
||||
|
||||
struct clientsession cli_ses; /* GLOBAL */
|
||||
|
||||
@@ -114,6 +115,7 @@ void cli_session(int sock_in, int sock_out, struct dropbear_progress_connection
|
||||
}
|
||||
|
||||
chaninitialise(cli_chantypes);
|
||||
+ cli_algos_initialise();
|
||||
|
||||
/* Set up cli_ses vars */
|
||||
cli_session_init(proxy_cmd_pid);
|
||||
@@ -473,3 +475,12 @@ void cli_dropbear_log(int priority, const char* format, va_list param) {
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
+static void cli_algos_initialise(void) {
|
||||
+ algo_type *algo;
|
||||
+ for (algo = sshkex; algo->name; algo++) {
|
||||
+ if (strcmp(algo->name, SSH_STRICT_KEX_S) == 0) {
|
||||
+ algo->usable = 0;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
diff --git a/common-algo.c b/src/common-algo.c
|
||||
index 378f0ca8e..f9d46ebb6 100644
|
||||
--- a/common-algo.c
|
||||
+++ b/common-algo.c
|
||||
@@ -332,6 +332,12 @@ algo_type sshkex[] = {
|
||||
/* Set unusable by svr_algos_initialise() */
|
||||
{SSH_EXT_INFO_C, 0, NULL, 1, NULL},
|
||||
#endif
|
||||
+#endif
|
||||
+#if DROPBEAR_CLIENT
|
||||
+ {SSH_STRICT_KEX_C, 0, NULL, 1, NULL},
|
||||
+#endif
|
||||
+#if DROPBEAR_SERVER
|
||||
+ {SSH_STRICT_KEX_S, 0, NULL, 1, NULL},
|
||||
#endif
|
||||
{NULL, 0, NULL, 0, NULL}
|
||||
};
|
||||
diff --git a/common-kex.c b/src/common-kex.c
|
||||
index ac8844246..8e33b12a6 100644
|
||||
--- a/common-kex.c
|
||||
+++ b/common-kex.c
|
||||
@@ -183,6 +183,10 @@ void send_msg_newkeys() {
|
||||
gen_new_keys();
|
||||
switch_keys();
|
||||
|
||||
+ if (ses.kexstate.strict_kex) {
|
||||
+ ses.transseq = 0;
|
||||
+ }
|
||||
+
|
||||
TRACE(("leave send_msg_newkeys"))
|
||||
}
|
||||
|
||||
@@ -193,7 +197,11 @@ void recv_msg_newkeys() {
|
||||
|
||||
ses.kexstate.recvnewkeys = 1;
|
||||
switch_keys();
|
||||
-
|
||||
+
|
||||
+ if (ses.kexstate.strict_kex) {
|
||||
+ ses.recvseq = 0;
|
||||
+ }
|
||||
+
|
||||
TRACE(("leave recv_msg_newkeys"))
|
||||
}
|
||||
|
||||
@@ -551,6 +559,10 @@ void recv_msg_kexinit() {
|
||||
|
||||
ses.kexstate.recvkexinit = 1;
|
||||
|
||||
+ if (ses.kexstate.strict_kex && !ses.kexstate.donefirstkex && ses.recvseq != 1) {
|
||||
+ dropbear_exit("First packet wasn't kexinit");
|
||||
+ }
|
||||
+
|
||||
TRACE(("leave recv_msg_kexinit"))
|
||||
}
|
||||
|
||||
@@ -861,6 +873,18 @@ static void read_kex_algos() {
|
||||
}
|
||||
#endif
|
||||
|
||||
+ if (!ses.kexstate.donefirstkex) {
|
||||
+ const char* strict_name;
|
||||
+ if (IS_DROPBEAR_CLIENT) {
|
||||
+ strict_name = SSH_STRICT_KEX_S;
|
||||
+ } else {
|
||||
+ strict_name = SSH_STRICT_KEX_C;
|
||||
+ }
|
||||
+ if (buf_has_algo(ses.payload, strict_name) == DROPBEAR_SUCCESS) {
|
||||
+ ses.kexstate.strict_kex = 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
algo = buf_match_algo(ses.payload, sshkex, kexguess2, &goodguess);
|
||||
allgood &= goodguess;
|
||||
if (algo == NULL || algo->data == NULL) {
|
||||
diff --git a/kex.h b/src/kex.h
|
||||
index 77cf21a37..7fcc3c252 100644
|
||||
--- a/kex.h
|
||||
+++ b/kex.h
|
||||
@@ -83,6 +83,9 @@ struct KEXState {
|
||||
|
||||
unsigned our_first_follows_matches : 1;
|
||||
|
||||
+ /* Boolean indicating that strict kex mode is in use */
|
||||
+ unsigned int strict_kex;
|
||||
+
|
||||
time_t lastkextime; /* time of the last kex */
|
||||
unsigned int datatrans; /* data transmitted since last kex */
|
||||
unsigned int datarecv; /* data received since last kex */
|
||||
diff --git a/process-packet.c b/src/process-packet.c
|
||||
index 945416023..133a152d0 100644
|
||||
--- a/process-packet.c
|
||||
+++ b/process-packet.c
|
||||
@@ -44,6 +44,7 @@ void process_packet() {
|
||||
|
||||
unsigned char type;
|
||||
unsigned int i;
|
||||
+ unsigned int first_strict_kex = ses.kexstate.strict_kex && !ses.kexstate.donefirstkex;
|
||||
time_t now;
|
||||
|
||||
TRACE2(("enter process_packet"))
|
||||
@@ -54,22 +55,24 @@ void process_packet() {
|
||||
now = monotonic_now();
|
||||
ses.last_packet_time_keepalive_recv = now;
|
||||
|
||||
- /* These packets we can receive at any time */
|
||||
- switch(type) {
|
||||
|
||||
- case SSH_MSG_IGNORE:
|
||||
- goto out;
|
||||
- case SSH_MSG_DEBUG:
|
||||
- goto out;
|
||||
+ if (type == SSH_MSG_DISCONNECT) {
|
||||
+ /* Allowed at any time */
|
||||
+ dropbear_close("Disconnect received");
|
||||
+ }
|
||||
|
||||
- case SSH_MSG_UNIMPLEMENTED:
|
||||
- /* debugging XXX */
|
||||
- TRACE(("SSH_MSG_UNIMPLEMENTED"))
|
||||
- goto out;
|
||||
-
|
||||
- case SSH_MSG_DISCONNECT:
|
||||
- /* TODO cleanup? */
|
||||
- dropbear_close("Disconnect received");
|
||||
+ /* These packets may be received at any time,
|
||||
+ except during first kex with strict kex */
|
||||
+ if (!first_strict_kex) {
|
||||
+ switch(type) {
|
||||
+ case SSH_MSG_IGNORE:
|
||||
+ goto out;
|
||||
+ case SSH_MSG_DEBUG:
|
||||
+ goto out;
|
||||
+ case SSH_MSG_UNIMPLEMENTED:
|
||||
+ TRACE(("SSH_MSG_UNIMPLEMENTED"))
|
||||
+ goto out;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Ignore these packet types so that keepalives don't interfere with
|
||||
@@ -98,7 +101,8 @@ void process_packet() {
|
||||
if (type >= 1 && type <= 49
|
||||
&& type != SSH_MSG_SERVICE_REQUEST
|
||||
&& type != SSH_MSG_SERVICE_ACCEPT
|
||||
- && type != SSH_MSG_KEXINIT)
|
||||
+ && type != SSH_MSG_KEXINIT
|
||||
+ && !first_strict_kex)
|
||||
{
|
||||
TRACE(("unknown allowed packet during kexinit"))
|
||||
recv_unimplemented();
|
||||
diff --git a/ssh.h b/src/ssh.h
|
||||
index 1b4fec65f..ef3efdca0 100644
|
||||
--- a/ssh.h
|
||||
+++ b/ssh.h
|
||||
@@ -100,6 +100,10 @@
|
||||
#define SSH_EXT_INFO_C "ext-info-c"
|
||||
#define SSH_SERVER_SIG_ALGS "server-sig-algs"
|
||||
|
||||
+/* OpenSSH strict KEX feature */
|
||||
+#define SSH_STRICT_KEX_S "kex-strict-s-v00@openssh.com"
|
||||
+#define SSH_STRICT_KEX_C "kex-strict-c-v00@openssh.com"
|
||||
+
|
||||
/* service types */
|
||||
#define SSH_SERVICE_USERAUTH "ssh-userauth"
|
||||
#define SSH_SERVICE_USERAUTH_LEN 12
|
||||
diff --git a/svr-session.c b/src/svr-session.c
|
||||
index 769f0731d..a538e2c5c 100644
|
||||
--- a/svr-session.c
|
||||
+++ b/svr-session.c
|
||||
@@ -342,6 +342,9 @@ static void svr_algos_initialise(void) {
|
||||
algo->usable = 0;
|
||||
}
|
||||
#endif
|
||||
+ if (strcmp(algo->name, SSH_STRICT_KEX_C) == 0) {
|
||||
+ algo->usable = 0;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
|
||||
|
||||
inherit core-image setuptools3
|
||||
|
||||
SRCREV ?= "73e3b5481bc88b332a198a8ec51a3c43c5f08e7e"
|
||||
SRCREV ?= "f91fefe108568a1587c804c9ebc857a6fe7d8a33"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=kirkstone \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -26,8 +26,8 @@ NVDCVE_API_KEY ?= ""
|
||||
# Use a negative value to skip the update
|
||||
CVE_DB_UPDATE_INTERVAL ?= "86400"
|
||||
|
||||
# Timeout for blocking socket operations, such as the connection attempt.
|
||||
CVE_SOCKET_TIMEOUT ?= "60"
|
||||
# Number of attmepts for each http query to nvd server before giving up
|
||||
CVE_DB_UPDATE_ATTEMPTS ?= "5"
|
||||
|
||||
CVE_DB_TEMP_FILE ?= "${CVE_CHECK_DB_DIR}/temp_nvdcve_2.db"
|
||||
|
||||
@@ -114,7 +114,10 @@ def cleanup_db_download(db_file, db_tmp_file):
|
||||
if os.path.exists(db_tmp_file):
|
||||
os.remove(db_tmp_file)
|
||||
|
||||
def nvd_request_next(url, api_key, args):
|
||||
def nvd_request_wait(attempt, min_wait):
|
||||
return min ( ( (2 * attempt) + min_wait ) , 30)
|
||||
|
||||
def nvd_request_next(url, attempts, api_key, args, min_wait):
|
||||
"""
|
||||
Request next part of the NVD dabase
|
||||
"""
|
||||
@@ -130,7 +133,7 @@ def nvd_request_next(url, api_key, args):
|
||||
request.add_header("apiKey", api_key)
|
||||
bb.note("Requesting %s" % request.full_url)
|
||||
|
||||
for attempt in range(5):
|
||||
for attempt in range(attempts):
|
||||
try:
|
||||
r = urllib.request.urlopen(request)
|
||||
|
||||
@@ -143,8 +146,10 @@ def nvd_request_next(url, api_key, args):
|
||||
r.close()
|
||||
|
||||
except Exception as e:
|
||||
bb.note("CVE database: received error (%s), retrying" % (e))
|
||||
time.sleep(6)
|
||||
wait_time = nvd_request_wait(attempt, min_wait)
|
||||
bb.note("CVE database: received error (%s)" % (e))
|
||||
bb.note("CVE database: retrying download after %d seconds. attempted (%d/%d)" % (wait_time, attempt+1, attempts))
|
||||
time.sleep(wait_time)
|
||||
pass
|
||||
else:
|
||||
return raw_data
|
||||
@@ -186,10 +191,16 @@ def update_db_file(db_tmp_file, d, database_time):
|
||||
index = 0
|
||||
url = d.getVar("NVDCVE_URL")
|
||||
api_key = d.getVar("NVDCVE_API_KEY") or None
|
||||
attempts = int(d.getVar("CVE_DB_UPDATE_ATTEMPTS"))
|
||||
|
||||
# Recommended by NVD
|
||||
wait_time = 6
|
||||
if api_key:
|
||||
wait_time = 2
|
||||
|
||||
while True:
|
||||
req_args['startIndex'] = index
|
||||
raw_data = nvd_request_next(url, api_key, req_args)
|
||||
raw_data = nvd_request_next(url, attempts, api_key, req_args, wait_time)
|
||||
if raw_data is None:
|
||||
# We haven't managed to download data
|
||||
return False
|
||||
@@ -209,7 +220,7 @@ def update_db_file(db_tmp_file, d, database_time):
|
||||
break
|
||||
|
||||
# Recommended by NVD
|
||||
time.sleep(6)
|
||||
time.sleep(wait_time)
|
||||
|
||||
# Update success, set the date to cve_check file.
|
||||
cve_f.write('CVE database update : %s\n\n' % datetime.date.today())
|
||||
|
||||
40
meta/recipes-core/systemd/systemd/CVE-2023-7008.patch
Normal file
40
meta/recipes-core/systemd/systemd/CVE-2023-7008.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 3b4cc1437b51fcc0b08da8cc3f5d1175eed25eb1 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Wed, 20 Dec 2023 16:44:14 +0100
|
||||
Subject: [PATCH] resolved: actually check authenticated flag of SOA
|
||||
transaction
|
||||
|
||||
Fixes #25676
|
||||
|
||||
Upstream-Status: Backport [https://github.com/systemd/systemd/commit/3b4cc1437b51fcc0b08da8cc3f5d1175eed25eb1]
|
||||
CVE: CVE-2023-7008
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
src/resolve/resolved-dns-transaction.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
|
||||
index f937f9f7b5..7deb598400 100644
|
||||
--- a/src/resolve/resolved-dns-transaction.c
|
||||
+++ b/src/resolve/resolved-dns-transaction.c
|
||||
@@ -2761,7 +2761,7 @@ static int dns_transaction_requires_rrsig(DnsTransaction *t, DnsResourceRecord *
|
||||
if (r == 0)
|
||||
continue;
|
||||
|
||||
- return FLAGS_SET(t->answer_query_flags, SD_RESOLVED_AUTHENTICATED);
|
||||
+ return FLAGS_SET(dt->answer_query_flags, SD_RESOLVED_AUTHENTICATED);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2788,7 +2788,7 @@ static int dns_transaction_requires_rrsig(DnsTransaction *t, DnsResourceRecord *
|
||||
/* We found the transaction that was supposed to find the SOA RR for us. It was
|
||||
* successful, but found no RR for us. This means we are not at a zone cut. In this
|
||||
* case, we require authentication if the SOA lookup was authenticated too. */
|
||||
- return FLAGS_SET(t->answer_query_flags, SD_RESOLVED_AUTHENTICATED);
|
||||
+ return FLAGS_SET(dt->answer_query_flags, SD_RESOLVED_AUTHENTICATED);
|
||||
}
|
||||
|
||||
return true;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -32,6 +32,7 @@ SRC_URI += "file://touchscreen.rules \
|
||||
file://CVE-2022-4415-2.patch \
|
||||
file://0001-network-remove-only-managed-configs-on-reconfigure-o.patch \
|
||||
file://0001-nspawn-make-sure-host-root-can-write-to-the-uidmappe.patch \
|
||||
file://CVE-2023-7008.patch \
|
||||
"
|
||||
|
||||
# patches needed by musl
|
||||
|
||||
@@ -54,3 +54,6 @@ do_install:append:class-target() {
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
# this CVE is for cloudflare zlib
|
||||
CVE_CHECK_IGNORE += "CVE-2023-6992"
|
||||
|
||||
@@ -66,5 +66,8 @@ SRC_URI = "\
|
||||
file://0031-CVE-2022-45703-2.patch \
|
||||
file://0031-CVE-2022-47695.patch \
|
||||
file://CVE-2022-48063.patch \
|
||||
file://0032-CVE-2022-47010.patch \
|
||||
file://0033-CVE-2022-47007.patch \
|
||||
file://0034-CVE-2022-48064.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Mon, 20 Jun 2022 01:09:31 +0000 (+0930)
|
||||
Subject: PR29262, memory leak in pr_function_type
|
||||
X-Git-Tag: binutils-2_39~224
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0d02e70b197c786f26175b9a73f94e01d14abdab
|
||||
|
||||
PR29262, memory leak in pr_function_type
|
||||
|
||||
PR 29262
|
||||
* prdbg.c (pr_function_type): Free "s" on failure path.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0d02e70b197c786f26175b9a73f94e01d14abdab]
|
||||
|
||||
CVE: CVE-2022-47010
|
||||
|
||||
Signed-off-by: Sanjana Venkatesh <Sanjana.Venkatesh@windriver.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
|
||||
index c1e41628d26..bb42a5b6c2d 100644
|
||||
--- a/binutils/prdbg.c
|
||||
+++ b/binutils/prdbg.c
|
||||
@@ -742,12 +742,9 @@ pr_function_type (void *p, int argcount, bool varargs)
|
||||
|
||||
strcat (s, ")");
|
||||
|
||||
- if (! substitute_type (info, s))
|
||||
- return false;
|
||||
-
|
||||
+ bool ret = substitute_type (info, s);
|
||||
free (s);
|
||||
-
|
||||
- return true;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/* Turn the top type on the stack into a reference to that type. */
|
||||
@@ -0,0 +1,34 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 16 Jun 2022 23:30:41 +0000 (+0930)
|
||||
Subject: PR29254, memory leak in stab_demangle_v3_arg
|
||||
X-Git-Tag: binutils-2_39~237
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb
|
||||
|
||||
PR29254, memory leak in stab_demangle_v3_arg
|
||||
|
||||
PR 29254
|
||||
* stabs.c (stab_demangle_v3_arg): Free dt on failure path.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb]
|
||||
|
||||
CVE: CVE-2022-47007
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
---
|
||||
|
||||
diff --git a/binutils/stabs.c b/binutils/stabs.c
|
||||
index 2b5241637c1..796ff85b86a 100644
|
||||
--- a/binutils/stabs.c
|
||||
+++ b/binutils/stabs.c
|
||||
@@ -5467,7 +5467,10 @@ stab_demangle_v3_arg (void *dhandle, struct stab_handle *info,
|
||||
dc->u.s_binary.right,
|
||||
&varargs);
|
||||
if (pargs == NULL)
|
||||
- return NULL;
|
||||
+ {
|
||||
+ free (dt);
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
return debug_make_function_type (dhandle, dt, pargs, varargs);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Tue, 20 Dec 2022 13:17:03 +0000 (+1030)
|
||||
Subject: PR29922, SHT_NOBITS section avoids section size sanity check
|
||||
X-Git-Tag: binutils-2_40~202
|
||||
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8f2c64de86bc3d7556121fe296dd679000283931
|
||||
|
||||
PR29922, SHT_NOBITS section avoids section size sanity check
|
||||
|
||||
PR 29922
|
||||
* dwarf2.c (find_debug_info): Ignore sections without
|
||||
SEC_HAS_CONTENTS.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=8f2c64de86bc3d7556121fe296dd679000283931]
|
||||
|
||||
CVE: CVE-2022-48064
|
||||
|
||||
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
|
||||
|
||||
---
|
||||
|
||||
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
|
||||
index 95f45708e9d..0cd8152ee6e 100644
|
||||
--- a/bfd/dwarf2.c
|
||||
+++ b/bfd/dwarf2.c
|
||||
@@ -4831,16 +4831,19 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
|
||||
{
|
||||
look = debug_sections[debug_info].uncompressed_name;
|
||||
msec = bfd_get_section_by_name (abfd, look);
|
||||
- if (msec != NULL)
|
||||
+ /* Testing SEC_HAS_CONTENTS is an anti-fuzzer measure. Of
|
||||
+ course debug sections always have contents. */
|
||||
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
|
||||
return msec;
|
||||
|
||||
look = debug_sections[debug_info].compressed_name;
|
||||
msec = bfd_get_section_by_name (abfd, look);
|
||||
- if (msec != NULL)
|
||||
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
|
||||
return msec;
|
||||
|
||||
for (msec = abfd->sections; msec != NULL; msec = msec->next)
|
||||
- if (startswith (msec->name, GNU_LINKONCE_INFO))
|
||||
+ if ((msec->flags & SEC_HAS_CONTENTS) != 0
|
||||
+ && startswith (msec->name, GNU_LINKONCE_INFO))
|
||||
return msec;
|
||||
|
||||
return NULL;
|
||||
@@ -4848,6 +4851,9 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
|
||||
|
||||
for (msec = after_sec->next; msec != NULL; msec = msec->next)
|
||||
{
|
||||
+ if ((msec->flags & SEC_HAS_CONTENTS) == 0)
|
||||
+ continue;
|
||||
+
|
||||
look = debug_sections[debug_info].uncompressed_name;
|
||||
if (strcmp (msec->name, look) == 0)
|
||||
return msec;
|
||||
@@ -35,6 +35,8 @@ PTEST_ENABLED:libc-musl = "0"
|
||||
|
||||
EXTRA_OECONF = "--program-prefix=eu-"
|
||||
|
||||
BUILD_CFLAGS += "-Wno-error=stringop-overflow"
|
||||
|
||||
DEPENDS_BZIP2 = "bzip2-replacement-native"
|
||||
DEPENDS_BZIP2:class-target = "bzip2"
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ SRC_URI += "\
|
||||
file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \
|
||||
file://0001-exec.go-do-not-write-linker-flags-into-buildids.patch \
|
||||
file://0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
|
||||
file://0010-net-Fix-issue-with-DNS-not-being-updated.patch \
|
||||
file://CVE-2022-27664.patch \
|
||||
file://0001-net-http-httputil-avoid-query-parameter-smuggling.patch \
|
||||
file://CVE-2022-41715.patch \
|
||||
@@ -46,6 +47,7 @@ SRC_URI += "\
|
||||
file://CVE-2023-29409.patch \
|
||||
file://CVE-2023-39319.patch \
|
||||
file://CVE-2023-39318.patch \
|
||||
file://CVE-2023-39326.patch \
|
||||
"
|
||||
SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd"
|
||||
|
||||
@@ -54,5 +56,5 @@ SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784
|
||||
# https://github.com/golang/go/issues/30999#issuecomment-910470358
|
||||
CVE_CHECK_IGNORE += "CVE-2021-29923"
|
||||
|
||||
# This is specific to Microsoft Windows
|
||||
CVE_CHECK_IGNORE += "CVE-2022-41716"
|
||||
# This are specific to Microsoft Windows
|
||||
CVE_CHECK_IGNORE += "CVE-2022-41716 CVE-2023-45283 CVE-2023-45284"
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 20176b390e28daa86b4552965cb7bd9181983c4d Mon Sep 17 00:00:00 2001
|
||||
From: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
|
||||
Date: Mon, 6 Nov 2023 20:11:19 -0600
|
||||
Subject: [PATCH] net: Fix issue with DNS not being updated
|
||||
|
||||
When dns requests are made, go's native DNS resolver only reads
|
||||
/etc/resolv.conf if the previous request is older than 5 seconds.
|
||||
|
||||
On first network call, an initialization code runs that is
|
||||
supposed to initialize DNS data and set lastChecked time. There is a bug
|
||||
in this code that causes /etc/resolv.conf to not be read during
|
||||
initialization and the DNS data from program startup ends up being used
|
||||
until the next 5 seconds. This means that if /etc/resolv.conf changed
|
||||
between program startup and the first network call, old DNS data is
|
||||
still used until the next 5 seconds.
|
||||
|
||||
This causes "docker pull" to fail the first time if docker daemon is
|
||||
started before networking is up.
|
||||
|
||||
Upstream commit d52883f443e1d564b0300acdd382af1769bf0477 made lot of
|
||||
improvements to DNS resolver to fix some issues which also fixes this
|
||||
issue.
|
||||
This patch picks the relevant changes from it to fix this particular
|
||||
issue.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/d52883f443e1d564b0300acdd382af1769bf0477]
|
||||
|
||||
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
|
||||
---
|
||||
src/net/dnsclient_unix.go | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go
|
||||
index 6dfd4af..520ffe6 100644
|
||||
--- a/src/net/dnsclient_unix.go
|
||||
+++ b/src/net/dnsclient_unix.go
|
||||
@@ -337,10 +337,7 @@ var resolvConf resolverConfig
|
||||
func (conf *resolverConfig) init() {
|
||||
// Set dnsConfig and lastChecked so we don't parse
|
||||
// resolv.conf twice the first time.
|
||||
- conf.dnsConfig = systemConf().resolv
|
||||
- if conf.dnsConfig == nil {
|
||||
- conf.dnsConfig = dnsReadConfig("/etc/resolv.conf")
|
||||
- }
|
||||
+ conf.dnsConfig = dnsReadConfig("/etc/resolv.conf")
|
||||
conf.lastChecked = time.Now()
|
||||
|
||||
// Prepare ch so that only one update of resolverConfig may
|
||||
--
|
||||
2.34.1
|
||||
|
||||
182
meta/recipes-devtools/go/go-1.20/CVE-2023-39326.patch
Normal file
182
meta/recipes-devtools/go/go-1.20/CVE-2023-39326.patch
Normal file
@@ -0,0 +1,182 @@
|
||||
From 6446af942e2e2b161c4ec1b60d9703a2b55dc4dd Mon Sep 17 00:00:00 2001
|
||||
From: Damien Neil <dneil@google.com>
|
||||
Date: Tue, 7 Nov 2023 10:47:56 -0800
|
||||
Subject: [PATCH] net/http: limit chunked data overhead
|
||||
|
||||
The chunked transfer encoding adds some overhead to
|
||||
the content transferred. When writing one byte per
|
||||
chunk, for example, there are five bytes of overhead
|
||||
per byte of data transferred: "1\r\nX\r\n" to send "X".
|
||||
|
||||
Chunks may include "chunk extensions",
|
||||
which we skip over and do not use.
|
||||
For example: "1;chunk extension here\r\nX\r\n".
|
||||
|
||||
A malicious sender can use chunk extensions to add
|
||||
about 4k of overhead per byte of data.
|
||||
(The maximum chunk header line size we will accept.)
|
||||
|
||||
Track the amount of overhead read in chunked data,
|
||||
and produce an error if it seems excessive.
|
||||
|
||||
Updates #64433
|
||||
Fixes #64434
|
||||
Fixes CVE-2023-39326
|
||||
|
||||
Change-Id: I40f8d70eb6f9575fb43f506eb19132ccedafcf39
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2076135
|
||||
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
|
||||
Reviewed-by: Roland Shoemaker <bracewell@google.com>
|
||||
(cherry picked from commit 3473ae72ee66c60744665a24b2fde143e8964d4f)
|
||||
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2095407
|
||||
Run-TryBot: Roland Shoemaker <bracewell@google.com>
|
||||
TryBot-Result: Security TryBots <security-trybots@go-security-trybots.iam.gserviceaccount.com>
|
||||
Reviewed-by: Damien Neil <dneil@google.com>
|
||||
Reviewed-on: https://go-review.googlesource.com/c/go/+/547355
|
||||
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
|
||||
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
|
||||
|
||||
CVE: CVE-2023-39326
|
||||
|
||||
Upstream-Status: Backport [https://github.com/golang/go/commit/6446af942e2e2b161c4ec1b60d9703a2b55dc4dd]
|
||||
|
||||
Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
|
||||
---
|
||||
src/net/http/internal/chunked.go | 36 +++++++++++++---
|
||||
src/net/http/internal/chunked_test.go | 59 +++++++++++++++++++++++++++
|
||||
2 files changed, 89 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/net/http/internal/chunked.go b/src/net/http/internal/chunked.go
|
||||
index f06e572..ddbaacb 100644
|
||||
--- a/src/net/http/internal/chunked.go
|
||||
+++ b/src/net/http/internal/chunked.go
|
||||
@@ -39,7 +39,8 @@ type chunkedReader struct {
|
||||
n uint64 // unread bytes in chunk
|
||||
err error
|
||||
buf [2]byte
|
||||
- checkEnd bool // whether need to check for \r\n chunk footer
|
||||
+ checkEnd bool // whether need to check for \r\n chunk footer
|
||||
+ excess int64 // "excessive" chunk overhead, for malicious sender detection
|
||||
}
|
||||
|
||||
func (cr *chunkedReader) beginChunk() {
|
||||
@@ -49,10 +50,38 @@ func (cr *chunkedReader) beginChunk() {
|
||||
if cr.err != nil {
|
||||
return
|
||||
}
|
||||
+ cr.excess += int64(len(line)) + 2 // header, plus \r\n after the chunk data
|
||||
+ line = trimTrailingWhitespace(line)
|
||||
+ line, cr.err = removeChunkExtension(line)
|
||||
+ if cr.err != nil {
|
||||
+ return
|
||||
+ }
|
||||
cr.n, cr.err = parseHexUint(line)
|
||||
if cr.err != nil {
|
||||
return
|
||||
}
|
||||
+ // A sender who sends one byte per chunk will send 5 bytes of overhead
|
||||
+ // for every byte of data. ("1\r\nX\r\n" to send "X".)
|
||||
+ // We want to allow this, since streaming a byte at a time can be legitimate.
|
||||
+ //
|
||||
+ // A sender can use chunk extensions to add arbitrary amounts of additional
|
||||
+ // data per byte read. ("1;very long extension\r\nX\r\n" to send "X".)
|
||||
+ // We don't want to disallow extensions (although we discard them),
|
||||
+ // but we also don't want to allow a sender to reduce the signal/noise ratio
|
||||
+ // arbitrarily.
|
||||
+ //
|
||||
+ // We track the amount of excess overhead read,
|
||||
+ // and produce an error if it grows too large.
|
||||
+ //
|
||||
+ // Currently, we say that we're willing to accept 16 bytes of overhead per chunk,
|
||||
+ // plus twice the amount of real data in the chunk.
|
||||
+ cr.excess -= 16 + (2 * int64(cr.n))
|
||||
+ if cr.excess < 0 {
|
||||
+ cr.excess = 0
|
||||
+ }
|
||||
+ if cr.excess > 16*1024 {
|
||||
+ cr.err = errors.New("chunked encoding contains too much non-data")
|
||||
+ }
|
||||
if cr.n == 0 {
|
||||
cr.err = io.EOF
|
||||
}
|
||||
@@ -133,11 +162,6 @@ func readChunkLine(b *bufio.Reader) ([]byte, error) {
|
||||
if len(p) >= maxLineLength {
|
||||
return nil, ErrLineTooLong
|
||||
}
|
||||
- p = trimTrailingWhitespace(p)
|
||||
- p, err = removeChunkExtension(p)
|
||||
- if err != nil {
|
||||
- return nil, err
|
||||
- }
|
||||
return p, nil
|
||||
}
|
||||
|
||||
diff --git a/src/net/http/internal/chunked_test.go b/src/net/http/internal/chunked_test.go
|
||||
index 08152ed..5fbeb08 100644
|
||||
--- a/src/net/http/internal/chunked_test.go
|
||||
+++ b/src/net/http/internal/chunked_test.go
|
||||
@@ -211,3 +211,62 @@ func TestChunkReadPartial(t *testing.T) {
|
||||
}
|
||||
|
||||
}
|
||||
+
|
||||
+func TestChunkReaderTooMuchOverhead(t *testing.T) {
|
||||
+ // If the sender is sending 100x as many chunk header bytes as chunk data,
|
||||
+ // we should reject the stream at some point.
|
||||
+ chunk := []byte("1;")
|
||||
+ for i := 0; i < 100; i++ {
|
||||
+ chunk = append(chunk, 'a') // chunk extension
|
||||
+ }
|
||||
+ chunk = append(chunk, "\r\nX\r\n"...)
|
||||
+ const bodylen = 1 << 20
|
||||
+ r := NewChunkedReader(&funcReader{f: func(i int) ([]byte, error) {
|
||||
+ if i < bodylen {
|
||||
+ return chunk, nil
|
||||
+ }
|
||||
+ return []byte("0\r\n"), nil
|
||||
+ }})
|
||||
+ _, err := io.ReadAll(r)
|
||||
+ if err == nil {
|
||||
+ t.Fatalf("successfully read body with excessive overhead; want error")
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func TestChunkReaderByteAtATime(t *testing.T) {
|
||||
+ // Sending one byte per chunk should not trip the excess-overhead detection.
|
||||
+ const bodylen = 1 << 20
|
||||
+ r := NewChunkedReader(&funcReader{f: func(i int) ([]byte, error) {
|
||||
+ if i < bodylen {
|
||||
+ return []byte("1\r\nX\r\n"), nil
|
||||
+ }
|
||||
+ return []byte("0\r\n"), nil
|
||||
+ }})
|
||||
+ got, err := io.ReadAll(r)
|
||||
+ if err != nil {
|
||||
+ t.Errorf("unexpected error: %v", err)
|
||||
+ }
|
||||
+ if len(got) != bodylen {
|
||||
+ t.Errorf("read %v bytes, want %v", len(got), bodylen)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+type funcReader struct {
|
||||
+ f func(iteration int) ([]byte, error)
|
||||
+ i int
|
||||
+ b []byte
|
||||
+ err error
|
||||
+}
|
||||
+
|
||||
+func (r *funcReader) Read(p []byte) (n int, err error) {
|
||||
+ if len(r.b) == 0 && r.err == nil {
|
||||
+ r.b, r.err = r.f(r.i)
|
||||
+ r.i++
|
||||
+ }
|
||||
+ n = copy(p, r.b)
|
||||
+ r.b = r.b[n:]
|
||||
+ if len(r.b) > 0 {
|
||||
+ return n, nil
|
||||
+ }
|
||||
+ return n, r.err
|
||||
+}
|
||||
--
|
||||
2.40.0
|
||||
@@ -21,8 +21,8 @@ index f4a26f5..7bc748e 100644
|
||||
# Original versions are not saved anymore; patch generally takes care of this,
|
||||
# and if that fails, reaching for the source tarball is the safest option.
|
||||
$(CROSSPATCHED): %.applied: %.patch
|
||||
- patch -p1 -i $< && touch $@
|
||||
+ test ! -f $@ && (patch -p1 -i $< && touch $@) || echo "$@ exist"
|
||||
- $(cpatch) -p1 -i $< && touch $@
|
||||
+ test ! -f $@ && ($(cpatch) -p1 -i $< && touch $@) || echo "$@ exist"
|
||||
|
||||
# ---[ common ]-----------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ SRC_URI = "https://github.com/arsv/perl-cross/releases/download/${PV}/perl-cross
|
||||
"
|
||||
UPSTREAM_CHECK_URI = "https://github.com/arsv/perl-cross/releases/"
|
||||
|
||||
SRC_URI[perl-cross.sha256sum] = "77f13ca84a63025053852331b72d4046c1f90ded98bd45ccedea738621907335"
|
||||
SRC_URI[perl-cross.sha256sum] = "584dc54c48dca25e032b676a15bef377c1fed9de318b4fc140292a5dbf326e90"
|
||||
|
||||
S = "${WORKDIR}/perl-cross-${PV}"
|
||||
|
||||
@@ -29,7 +29,7 @@ SRC_URI:append:class-target = " \
|
||||
file://encodefix.patch \
|
||||
"
|
||||
|
||||
SRC_URI[perl.sha256sum] = "357951a491b0ba1ce3611263922feec78ccd581dddc24a446b033e25acf242a1"
|
||||
SRC_URI[perl.sha256sum] = "5b12f62863332b2a5f54102af9cdf8c010877e4bf3294911edbd594b2a1e8ede"
|
||||
|
||||
S = "${WORKDIR}/perl-${PV}"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 627ac5e314303acc00a19d58f09eb1eabd029fd1 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Gaynor <alex.gaynor@gmail.com>
|
||||
Date: Wed, 6 Dec 2023 08:04:53 +0000
|
||||
Subject: [PATCH] Fixed crash when loading a PKCS#7 bundle with no certificates
|
||||
(#9926)
|
||||
|
||||
CVE: CVE-2023-49083
|
||||
|
||||
Upstream-Status: Backport [https://github.com/pyca/cryptography/commit/1e7b4d074e14c4e694d3ce69ad6754a6039fd6ff]
|
||||
|
||||
Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
|
||||
---
|
||||
src/cryptography/hazmat/backends/openssl/backend.py | 5 ++++-
|
||||
tests/hazmat/primitives/test_pkcs7.py | 6 ++++++
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
|
||||
index 5606fe6..c43fea0 100644
|
||||
--- a/src/cryptography/hazmat/backends/openssl/backend.py
|
||||
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
|
||||
@@ -2189,9 +2189,12 @@ class Backend(BackendInterface):
|
||||
_Reasons.UNSUPPORTED_SERIALIZATION,
|
||||
)
|
||||
|
||||
+ certs: list[x509.Certificate] = []
|
||||
+ if p7.d.sign == self._ffi.NULL:
|
||||
+ return certs
|
||||
+
|
||||
sk_x509 = p7.d.sign.cert
|
||||
num = self._lib.sk_X509_num(sk_x509)
|
||||
- certs = []
|
||||
for i in range(num):
|
||||
x509 = self._lib.sk_X509_value(sk_x509, i)
|
||||
self.openssl_assert(x509 != self._ffi.NULL)
|
||||
diff --git a/tests/hazmat/primitives/test_pkcs7.py b/tests/hazmat/primitives/test_pkcs7.py
|
||||
index 91ac842..b98a9f1 100644
|
||||
--- a/tests/hazmat/primitives/test_pkcs7.py
|
||||
+++ b/tests/hazmat/primitives/test_pkcs7.py
|
||||
@@ -81,6 +81,12 @@ class TestPKCS7Loading(object):
|
||||
mode="rb",
|
||||
)
|
||||
|
||||
+ def test_load_pkcs7_empty_certificates(self):
|
||||
+ der = b"\x30\x0B\x06\x09\x2A\x86\x48\x86\xF7\x0D\x01\x07\x02"
|
||||
+
|
||||
+ certificates = pkcs7.load_der_pkcs7_certificates(der)
|
||||
+ assert certificates == []
|
||||
+
|
||||
|
||||
# We have no public verification API and won't be adding one until we get
|
||||
# some requirements from users so this function exists to give us basic
|
||||
--
|
||||
2.40.0
|
||||
@@ -18,6 +18,7 @@ SRC_URI += " \
|
||||
file://0002-Cargo.toml-edition-2018-2021.patch \
|
||||
file://fix-leak-metric.patch \
|
||||
file://CVE-2023-23931.patch \
|
||||
file://CVE-2023-49083.patch \
|
||||
"
|
||||
|
||||
inherit pypi python_setuptools3_rust
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'| sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s : %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
|
||||
pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'| sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user