mirror of
https://git.yoctoproject.org/poky
synced 2026-02-21 17:09:42 +01:00
Compare commits
177 Commits
scarthgap-
...
yocto-5.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f16cffd030 | ||
|
|
517a1206e0 | ||
|
|
2eb674803a | ||
|
|
6e74167ad4 | ||
|
|
697d7cc740 | ||
|
|
2f0df0334a | ||
|
|
9dafc77bd8 | ||
|
|
e085cf0d53 | ||
|
|
8c8680d4c0 | ||
|
|
ac57f3b9d2 | ||
|
|
aca68169cc | ||
|
|
da7d29485c | ||
|
|
9fb26deedd | ||
|
|
0db5ae637d | ||
|
|
7698e2910d | ||
|
|
8a80300d0f | ||
|
|
bb7e27a5db | ||
|
|
09dadcefe3 | ||
|
|
a981860c32 | ||
|
|
fbc7beca68 | ||
|
|
8e94da9219 | ||
|
|
a405b570b3 | ||
|
|
ec2689b334 | ||
|
|
77c866901d | ||
|
|
ea119eaa46 | ||
|
|
ddda72f2bd | ||
|
|
b95695a302 | ||
|
|
e49d690cf1 | ||
|
|
357a4beab6 | ||
|
|
c8a81cd75f | ||
|
|
6a8b1708e0 | ||
|
|
2ce56bd707 | ||
|
|
eae801c832 | ||
|
|
e9069b0404 | ||
|
|
9baa7dfdfd | ||
|
|
1b7cb8a80c | ||
|
|
afd75083e9 | ||
|
|
42ad822f6b | ||
|
|
4ae162f572 | ||
|
|
93eb8227dd | ||
|
|
b55b77df5f | ||
|
|
619804e1fc | ||
|
|
b079439d07 | ||
|
|
15078fe63f | ||
|
|
2a912b5065 | ||
|
|
5ee0ccc856 | ||
|
|
b418221cab | ||
|
|
e753480a05 | ||
|
|
f82e18eee1 | ||
|
|
f19d608f58 | ||
|
|
8cb12165ed | ||
|
|
4543508143 | ||
|
|
829e065196 | ||
|
|
e3ce89324d | ||
|
|
54578cd039 | ||
|
|
d2c6c66c1e | ||
|
|
838a12c621 | ||
|
|
c0775e4999 | ||
|
|
d4f27582ea | ||
|
|
2eccfb8b45 | ||
|
|
6b93199776 | ||
|
|
31b2c45764 | ||
|
|
ef363542ca | ||
|
|
91a33194a4 | ||
|
|
4807896466 | ||
|
|
3ab5d2556b | ||
|
|
3bb8b0dd37 | ||
|
|
f00c4968ff | ||
|
|
6400741e0c | ||
|
|
b078df11eb | ||
|
|
5c8ceb35b4 | ||
|
|
da9006ac51 | ||
|
|
328b35d7e3 | ||
|
|
9ce8f26d37 | ||
|
|
844ad4dc30 | ||
|
|
285b5070bb | ||
|
|
ebbbada5b8 | ||
|
|
438c0f8acb | ||
|
|
225f4064f3 | ||
|
|
41e1323758 | ||
|
|
cb17b874de | ||
|
|
e2e54e0354 | ||
|
|
765333686d | ||
|
|
52ac1f3309 | ||
|
|
7de6526866 | ||
|
|
6b639e1975 | ||
|
|
2a0bd475e8 | ||
|
|
0fdc4f72f5 | ||
|
|
f06f09415b | ||
|
|
9bea9b7394 | ||
|
|
b63fff4544 | ||
|
|
38b5ba89e6 | ||
|
|
c345127b52 | ||
|
|
96cf0503ed | ||
|
|
5368900445 | ||
|
|
bf7f8a0202 | ||
|
|
3270b1284e | ||
|
|
3a75849ff5 | ||
|
|
3f6144ca20 | ||
|
|
0ecde9a2a2 | ||
|
|
8ade657e16 | ||
|
|
766dfe5115 | ||
|
|
f584b357c3 | ||
|
|
c1b0ad70b4 | ||
|
|
35cae2014a | ||
|
|
b4135ab254 | ||
|
|
ec220ae083 | ||
|
|
1df3fcb4a5 | ||
|
|
93c7e11457 | ||
|
|
fb9746b787 | ||
|
|
dcfcbb21c2 | ||
|
|
f1647fba72 | ||
|
|
19dd05ccc9 | ||
|
|
3318b5eb4d | ||
|
|
9c4fe6dac5 | ||
|
|
819f151bed | ||
|
|
40999c1bbd | ||
|
|
00ade479ef | ||
|
|
4d2729b88c | ||
|
|
c030f0e492 | ||
|
|
729f2a3d19 | ||
|
|
1a02f43617 | ||
|
|
0a71bd589c | ||
|
|
61545ac190 | ||
|
|
95bbe19b02 | ||
|
|
83fac1162d | ||
|
|
eb487bba3e | ||
|
|
1db6ffa609 | ||
|
|
ba10ae532a | ||
|
|
2cc9a0249b | ||
|
|
6d83b872af | ||
|
|
0263c3dfa4 | ||
|
|
6f7e929ea6 | ||
|
|
1fd82d514f | ||
|
|
7d110f9a94 | ||
|
|
c82f7a0577 | ||
|
|
f6b4415273 | ||
|
|
d9b992de0d | ||
|
|
2156b7931e | ||
|
|
664f26b3f0 | ||
|
|
114eddfaef | ||
|
|
f569a0f2d9 | ||
|
|
f5aab38227 | ||
|
|
bee76dfe7e | ||
|
|
5de981dd1c | ||
|
|
e9a35f720c | ||
|
|
511d3e23f5 | ||
|
|
bfb799ef2a | ||
|
|
e711b2f39a | ||
|
|
f578ce2a73 | ||
|
|
057c86df84 | ||
|
|
8721aab7af | ||
|
|
8b8f23e650 | ||
|
|
93663dc300 | ||
|
|
0bc339e2fc | ||
|
|
3327031e2b | ||
|
|
cf89d7b3bf | ||
|
|
99f48be958 | ||
|
|
ed5a1a7443 | ||
|
|
5f469434d3 | ||
|
|
d5613f0d2e | ||
|
|
76f88baf01 | ||
|
|
b162dfb492 | ||
|
|
6269788fef | ||
|
|
0efe19beef | ||
|
|
792d18b4cb | ||
|
|
15a4d0cfb1 | ||
|
|
f2a6317735 | ||
|
|
d06bc81271 | ||
|
|
a27ca8e3c0 | ||
|
|
38f0ee2ec7 | ||
|
|
9302874dda | ||
|
|
c172c46096 | ||
|
|
83ba977250 | ||
|
|
ef6f8d5f46 | ||
|
|
ae35f06bb1 | ||
|
|
6d2f2bd3f7 |
@@ -27,7 +27,7 @@ from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
|
||||
|
||||
bb.utils.check_system_locale()
|
||||
|
||||
__version__ = "2.8.0"
|
||||
__version__ = "2.8.1"
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __version__ != bb.__version__:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
|
||||
__version__ = "2.8.0"
|
||||
__version__ = "2.8.1"
|
||||
|
||||
import sys
|
||||
if sys.version_info < (3, 8, 0):
|
||||
@@ -37,6 +37,34 @@ class BBHandledException(Exception):
|
||||
import os
|
||||
import logging
|
||||
from collections import namedtuple
|
||||
import multiprocessing as mp
|
||||
|
||||
# Python 3.14 changes the default multiprocessing context from "fork" to
|
||||
# "forkserver". However, bitbake heavily relies on "fork" behavior to
|
||||
# efficiently pass data to the child processes. Places that need this should do:
|
||||
# from bb import multiprocessing
|
||||
# in place of
|
||||
# import multiprocessing
|
||||
|
||||
class MultiprocessingContext(object):
|
||||
"""
|
||||
Multiprocessing proxy object that uses the "fork" context for a property if
|
||||
available, otherwise goes to the main multiprocessing module. This allows
|
||||
it to be a drop-in replacement for the multiprocessing module, but use the
|
||||
fork context
|
||||
"""
|
||||
def __init__(self):
|
||||
super().__setattr__("_ctx", mp.get_context("fork"))
|
||||
|
||||
def __getattr__(self, name):
|
||||
if hasattr(self._ctx, name):
|
||||
return getattr(self._ctx, name)
|
||||
return getattr(mp, name)
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
raise AttributeError(f"Unable to set attribute {name}")
|
||||
|
||||
multiprocessing = MultiprocessingContext()
|
||||
|
||||
|
||||
class NullHandler(logging.Handler):
|
||||
|
||||
@@ -11,7 +11,7 @@ import os
|
||||
import signal
|
||||
import socket
|
||||
import sys
|
||||
import multiprocessing
|
||||
from bb import multiprocessing
|
||||
import logging
|
||||
from .connection import StreamConnection, WebsocketConnection
|
||||
from .exceptions import ClientError, ServerError, ConnectionClosedError, InvokeError
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import sys, os, glob, os.path, re, time
|
||||
import itertools
|
||||
import logging
|
||||
import multiprocessing
|
||||
from bb import multiprocessing
|
||||
import threading
|
||||
from io import StringIO, UnsupportedOperation
|
||||
from contextlib import closing
|
||||
|
||||
@@ -729,6 +729,8 @@ class RunQueueData:
|
||||
if mc == frommc:
|
||||
fn = taskData[mcdep].build_targets[pn][0]
|
||||
newdep = '%s:%s' % (fn,deptask)
|
||||
if newdep not in taskData[mcdep].taskentries:
|
||||
bb.fatal("Task mcdepends on non-existent task %s" % (newdep))
|
||||
taskData[mc].taskentries[tid].tdepends.append(newdep)
|
||||
|
||||
for mc in taskData:
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import bb
|
||||
import bb.event
|
||||
import logging
|
||||
import multiprocessing
|
||||
from bb import multiprocessing
|
||||
import threading
|
||||
import array
|
||||
import os
|
||||
|
||||
@@ -1421,7 +1421,7 @@ class FetchLatestVersionTest(FetcherTest):
|
||||
# combination version pattern
|
||||
("sysprof", "git://git.yoctoproject.org/sysprof.git;protocol=https;branch=master", "cd44ee6644c3641507fb53b8a2a69137f2971219", "", "")
|
||||
: "1.2.0",
|
||||
("u-boot-mkimage", "git://source.denx.de/u-boot/u-boot.git;branch=master;protocol=https", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "", "")
|
||||
("u-boot-mkimage", "git://git.yoctoproject.org/bbfetchtests-u-boot.git;branch=master;protocol=https", "62c175fbb8a0f9a926c88294ea9f7e88eb898f6c", "", "")
|
||||
: "2014.01",
|
||||
# version pattern "yyyymmdd"
|
||||
("mobile-broadband-provider-info", "git://git.yoctoproject.org/mobile-broadband-provider-info.git;protocol=https;branch=master", "4ed19e11c2975105b71b956440acdb25d46a347d", "", "")
|
||||
|
||||
2
bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb
Normal file
2
bitbake/lib/bb/tests/runqueue-tests/recipes/g1.bb
Normal file
@@ -0,0 +1,2 @@
|
||||
do_build[mcdepends] = "mc::mc-1:h1:do_invalid"
|
||||
|
||||
0
bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb
Normal file
0
bitbake/lib/bb/tests/runqueue-tests/recipes/h1.bb
Normal file
@@ -26,7 +26,7 @@ class RunQueueTests(unittest.TestCase):
|
||||
a1_sstatevalid = "a1:do_package a1:do_package_qa a1:do_packagedata a1:do_package_write_ipk a1:do_package_write_rpm a1:do_populate_lic a1:do_populate_sysroot"
|
||||
b1_sstatevalid = "b1:do_package b1:do_package_qa b1:do_packagedata b1:do_package_write_ipk b1:do_package_write_rpm b1:do_populate_lic b1:do_populate_sysroot"
|
||||
|
||||
def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False):
|
||||
def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False, allowfailure=False):
|
||||
env = os.environ.copy()
|
||||
env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests"))
|
||||
env["BB_ENV_PASSTHROUGH_ADDITIONS"] = "SSTATEVALID SLOWTASKS TOPDIR"
|
||||
@@ -41,6 +41,8 @@ class RunQueueTests(unittest.TestCase):
|
||||
output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir)
|
||||
print(output)
|
||||
except subprocess.CalledProcessError as e:
|
||||
if allowfailure:
|
||||
return e.output
|
||||
self.fail("Command %s failed with %s" % (cmd, e.output))
|
||||
tasks = []
|
||||
tasklog = builddir + "/task.log"
|
||||
@@ -314,6 +316,13 @@ class RunQueueTests(unittest.TestCase):
|
||||
["mc_2:a1:%s" % t for t in rerun_tasks]
|
||||
self.assertEqual(set(tasks), set(expected))
|
||||
|
||||
# Check that a multiconfig that doesn't exist rasies a correct error message
|
||||
error_output = self.run_bitbakecmd(["bitbake", "g1"], tempdir, "", extraenv=extraenv, cleanup=True, allowfailure=True)
|
||||
self.assertIn("non-existent task", error_output)
|
||||
# If the word 'Traceback' or 'KeyError' is in the output we've regressed
|
||||
self.assertNotIn("Traceback", error_output)
|
||||
self.assertNotIn("KeyError", error_output)
|
||||
|
||||
self.shutdown(tempdir)
|
||||
|
||||
def test_hashserv_single(self):
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
import http.server
|
||||
import multiprocessing
|
||||
from bb import multiprocessing
|
||||
import os
|
||||
import traceback
|
||||
import signal
|
||||
@@ -43,7 +43,7 @@ class HTTPService(object):
|
||||
self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir, self.logger])
|
||||
|
||||
# The signal handler from testimage.bbclass can cause deadlocks here
|
||||
# if the HTTPServer is terminated before it can restore the standard
|
||||
# if the HTTPServer is terminated before it can restore the standard
|
||||
#signal behaviour
|
||||
orig = signal.getsignal(signal.SIGTERM)
|
||||
signal.signal(signal.SIGTERM, signal.SIG_DFL)
|
||||
|
||||
@@ -14,7 +14,7 @@ import logging
|
||||
import bb
|
||||
import bb.msg
|
||||
import locale
|
||||
import multiprocessing
|
||||
from bb import multiprocessing
|
||||
import fcntl
|
||||
import importlib
|
||||
import importlib.machinery
|
||||
@@ -1174,8 +1174,6 @@ def process_profilelog(fn, pout = None):
|
||||
#
|
||||
def multiprocessingpool(*args, **kwargs):
|
||||
|
||||
import multiprocessing.pool
|
||||
#import multiprocessing.util
|
||||
#multiprocessing.util.log_to_stderr(10)
|
||||
# Deal with a multiprocessing bug where signals to the processes would be delayed until the work
|
||||
# completes. Putting in a timeout means the signals (like SIGINT/SIGTERM) get processed.
|
||||
@@ -1854,6 +1852,15 @@ def path_is_descendant(descendant, ancestor):
|
||||
|
||||
return False
|
||||
|
||||
# Recomputing the sets in signal.py is expensive (bitbake -pP idle)
|
||||
# so try and use _signal directly to avoid it
|
||||
valid_signals = signal.valid_signals()
|
||||
try:
|
||||
import _signal
|
||||
sigmask = _signal.pthread_sigmask
|
||||
except ImportError:
|
||||
sigmask = signal.pthread_sigmask
|
||||
|
||||
# If we don't have a timeout of some kind and a process/thread exits badly (for example
|
||||
# OOM killed) and held a lock, we'd just hang in the lock futex forever. It is better
|
||||
# we exit at some point than hang. 5 minutes with no progress means we're probably deadlocked.
|
||||
@@ -1863,7 +1870,7 @@ def path_is_descendant(descendant, ancestor):
|
||||
@contextmanager
|
||||
def lock_timeout(lock):
|
||||
try:
|
||||
s = signal.pthread_sigmask(signal.SIG_BLOCK, signal.valid_signals())
|
||||
s = sigmask(signal.SIG_BLOCK, valid_signals)
|
||||
held = lock.acquire(timeout=5*60)
|
||||
if not held:
|
||||
bb.server.process.serverlog("Couldn't get the lock for 5 mins, timed out, exiting.\n%s" % traceback.format_stack())
|
||||
@@ -1871,16 +1878,16 @@ def lock_timeout(lock):
|
||||
yield held
|
||||
finally:
|
||||
lock.release()
|
||||
signal.pthread_sigmask(signal.SIG_SETMASK, s)
|
||||
sigmask(signal.SIG_SETMASK, s)
|
||||
|
||||
# A version of lock_timeout without the check that the lock was locked and a shorter timeout
|
||||
@contextmanager
|
||||
def lock_timeout_nocheck(lock):
|
||||
try:
|
||||
s = signal.pthread_sigmask(signal.SIG_BLOCK, signal.valid_signals())
|
||||
s = sigmask(signal.SIG_BLOCK, valid_signals)
|
||||
l = lock.acquire(timeout=10)
|
||||
yield l
|
||||
finally:
|
||||
if l:
|
||||
lock.release()
|
||||
signal.pthread_sigmask(signal.SIG_SETMASK, s)
|
||||
sigmask(signal.SIG_SETMASK, s)
|
||||
|
||||
@@ -11,7 +11,7 @@ from bb.asyncrpc import InvokeError
|
||||
from .client import ClientPool
|
||||
import hashlib
|
||||
import logging
|
||||
import multiprocessing
|
||||
from bb import multiprocessing
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
@@ -123,110 +123,116 @@ to add the upgraded version.
|
||||
|
||||
$ git commit -s file1 file2 dir1 dir2 ...
|
||||
|
||||
To include **a**\ ll staged files::
|
||||
To include all staged files::
|
||||
|
||||
$ git commit -sa
|
||||
|
||||
- The ``-s`` option of ``git commit`` adds a "Signed-off-by:" line
|
||||
to your commit message. There is the same requirement for contributing
|
||||
to the Linux kernel. Adding such a line signifies that you, the
|
||||
submitter, have agreed to the `Developer's Certificate of Origin 1.1
|
||||
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin>`__
|
||||
as follows:
|
||||
#. The ``-s`` option of ``git commit`` adds a "Signed-off-by:" line
|
||||
to your commit message. There is the same requirement for contributing
|
||||
to the Linux kernel. Adding such a line signifies that you, the
|
||||
submitter, have agreed to the `Developer's Certificate of Origin 1.1
|
||||
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin>`__
|
||||
as follows:
|
||||
|
||||
.. code-block:: none
|
||||
.. code-block:: none
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
|
||||
- Provide a single-line summary of the change and, if more
|
||||
explanation is needed, provide more detail in the body of the
|
||||
commit. This summary is typically viewable in the "shortlist" of
|
||||
changes. Thus, providing something short and descriptive that
|
||||
gives the reader a summary of the change is useful when viewing a
|
||||
list of many commits. You should prefix this short description
|
||||
with the recipe name (if changing a recipe), or else with the
|
||||
short form path to the file being changed.
|
||||
#. Provide a single-line summary of the change and, if more
|
||||
explanation is needed, provide more detail in the description of the
|
||||
commit. This summary is typically viewable in the "shortlist" of
|
||||
changes. Thus, providing something short and descriptive that
|
||||
gives the reader a summary of the change is useful when viewing a
|
||||
list of many commits. You should prefix this short description
|
||||
with the recipe name (if changing a recipe), or else with the
|
||||
short form path to the file being changed.
|
||||
|
||||
.. note::
|
||||
|
||||
To find a suitable prefix for the commit summary, a good idea
|
||||
is to look for prefixes used in previous commits touching the
|
||||
same files or directories::
|
||||
|
||||
git log --oneline <paths>
|
||||
|
||||
#. For the commit description, provide detailed information
|
||||
that describes what you changed, why you made the change, and the
|
||||
approach you used. It might also be helpful if you mention how you
|
||||
tested the change. Provide as much detail as you can in the commit
|
||||
description.
|
||||
|
||||
.. note::
|
||||
|
||||
If the single line summary is enough to describe a simple
|
||||
change, the commit description can be left empty.
|
||||
|
||||
#. If the change addresses a specific bug or issue that is associated
|
||||
with a bug-tracking ID, include a reference to that ID in the body of the
|
||||
commit message. For example, the Yocto Project uses a
|
||||
specific convention for bug references --- any commit that addresses
|
||||
a specific bug should use the following form for the body of the commit
|
||||
message. Be sure to use the actual bug-tracking ID from
|
||||
Bugzilla for bug-id::
|
||||
|
||||
single-line summary of change
|
||||
|
||||
Fixes [YOCTO #bug-id]
|
||||
|
||||
detailed description of change
|
||||
|
||||
#. If other people participated in this patch, add some tags to the commit
|
||||
description to credit other contributors to the change:
|
||||
|
||||
- ``Reported-by``: name and email of a person reporting a bug
|
||||
that your commit is trying to fix. This is a good practice
|
||||
to encourage people to go on reporting bugs and let them
|
||||
know that their reports are taken into account.
|
||||
|
||||
- ``Suggested-by``: name and email of a person to credit for the
|
||||
idea of making the change.
|
||||
|
||||
- ``Tested-by``, ``Reviewed-by``: name and email for people having
|
||||
tested your changes or reviewed their code. These fields are
|
||||
usually added by the maintainer accepting a patch, or by
|
||||
yourself if you submitted your patches to early reviewers,
|
||||
or are submitting an unmodified patch again as part of a
|
||||
new iteration of your patch series.
|
||||
|
||||
- ``Cc``: name and email of people you want to send a copy
|
||||
of your changes to. This field will be used by ``git send-email``.
|
||||
|
||||
See `more guidance about using such tags
|
||||
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`__
|
||||
in the Linux kernel documentation.
|
||||
|
||||
.. note::
|
||||
|
||||
To find a suitable prefix for the commit summary, a good idea
|
||||
is to look for prefixes used in previous commits touching the
|
||||
same files or directories::
|
||||
|
||||
git log --oneline <paths>
|
||||
|
||||
- For the body of the commit message, provide detailed information
|
||||
that describes what you changed, why you made the change, and the
|
||||
approach you used. It might also be helpful if you mention how you
|
||||
tested the change. Provide as much detail as you can in the body
|
||||
of the commit message.
|
||||
|
||||
.. note::
|
||||
|
||||
If the single line summary is enough to describe a simple
|
||||
change, the body of the commit message can be left empty.
|
||||
|
||||
- If the change addresses a specific bug or issue that is associated
|
||||
with a bug-tracking ID, include a reference to that ID in your
|
||||
detailed description. For example, the Yocto Project uses a
|
||||
specific convention for bug references --- any commit that addresses
|
||||
a specific bug should use the following form for the detailed
|
||||
description. Be sure to use the actual bug-tracking ID from
|
||||
Bugzilla for bug-id::
|
||||
|
||||
Fixes [YOCTO #bug-id]
|
||||
|
||||
detailed description of change
|
||||
|
||||
#. *Crediting contributors:* By using the ``git commit --amend`` command,
|
||||
you can add some tags to the commit description to credit other contributors
|
||||
to the change:
|
||||
|
||||
- ``Reported-by``: name and email of a person reporting a bug
|
||||
that your commit is trying to fix. This is a good practice
|
||||
to encourage people to go on reporting bugs and let them
|
||||
know that their reports are taken into account.
|
||||
|
||||
- ``Suggested-by``: name and email of a person to credit for the
|
||||
idea of making the change.
|
||||
|
||||
- ``Tested-by``, ``Reviewed-by``: name and email for people having
|
||||
tested your changes or reviewed their code. These fields are
|
||||
usually added by the maintainer accepting a patch, or by
|
||||
yourself if you submitted your patches to early reviewers,
|
||||
or are submitting an unmodified patch again as part of a
|
||||
new iteration of your patch series.
|
||||
|
||||
- ``CC:`` Name and email of people you want to send a copy
|
||||
of your changes to. This field will be used by ``git send-email``.
|
||||
|
||||
See `more guidance about using such tags
|
||||
<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes>`__
|
||||
in the Linux kernel documentation.
|
||||
One can amend an existing git commit message to add missing tags for
|
||||
contributors with the ``git commit --amend`` command.
|
||||
|
||||
Test your changes
|
||||
-----------------
|
||||
|
||||
@@ -909,6 +909,11 @@ to point to that directory::
|
||||
|
||||
EXTERNALSRC_BUILD:pn-myrecipe = "path-to-your-source-tree"
|
||||
|
||||
.. note::
|
||||
|
||||
The values of :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
|
||||
must be absolute paths.
|
||||
|
||||
Replicating a Build Offline
|
||||
===========================
|
||||
|
||||
|
||||
@@ -52,19 +52,24 @@ for them for significant issues.
|
||||
Security-related discussions at the Yocto Project
|
||||
-------------------------------------------------
|
||||
|
||||
We have set up two security-related mailing lists:
|
||||
We have set up two security-related emails/mailing lists:
|
||||
|
||||
- Public List: yocto [dash] security [at] yoctoproject[dot] org
|
||||
- Public Mailing List: yocto [dash] security [at] yoctoproject[dot] org
|
||||
|
||||
This is a public mailing list for anyone to subscribe to. This list is an
|
||||
open list to discuss public security issues/patches and security-related
|
||||
initiatives. For more information, including subscription information,
|
||||
please see the :yocto_lists:`yocto-security mailing list info page </g/yocto-security>`.
|
||||
This is a public mailing list for anyone to subscribe to. This list is an
|
||||
open list to discuss public security issues/patches and security-related
|
||||
initiatives. For more information, including subscription information,
|
||||
please see the :yocto_lists:`yocto-security mailing list info page
|
||||
</g/yocto-security>`.
|
||||
|
||||
- Private List: security [at] yoctoproject [dot] org
|
||||
This list requires moderator approval for new topics to be posted, to avoid
|
||||
private security reports to be posted by mistake.
|
||||
|
||||
This is a private mailing list for reporting non-published potential
|
||||
vulnerabilities. The list is monitored by the Yocto Project Security team.
|
||||
- Yocto Project Security Team: security [at] yoctoproject [dot] org
|
||||
|
||||
This is an email for reporting non-published potential vulnerabilities.
|
||||
Emails sent to this address are forwarded to the Yocto Project Security
|
||||
Team members.
|
||||
|
||||
|
||||
What you should do if you find a security vulnerability
|
||||
|
||||
@@ -543,6 +543,7 @@ your Yocto Project build host:
|
||||
DISKPART> select vdisk file="<path_to_VHDX_file>"
|
||||
DISKPART> attach vdisk readonly
|
||||
DISKPART> compact vdisk
|
||||
DISKPART> detach
|
||||
DISKPART> exit
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -650,13 +650,9 @@ the Broadcom 2708/2709 chipset::
|
||||
|
||||
KBUILD_DEFCONFIG:raspberrypi2 ?= "bcm2709_defconfig"
|
||||
|
||||
Aside from modifying your kernel recipe and providing your own
|
||||
``defconfig`` file, you need to be sure no files or statements set
|
||||
:term:`SRC_URI` to use a ``defconfig`` other than your "in-tree" file (e.g.
|
||||
a kernel's ``linux-``\ `machine`\ ``.inc`` file). In other words, if the
|
||||
build system detects a statement that identifies an "out-of-tree"
|
||||
``defconfig`` file, that statement will override your
|
||||
:term:`KBUILD_DEFCONFIG` variable.
|
||||
If the build system detects a statement that identifies an "out-of-tree"
|
||||
``defconfig`` file, your :term:`KBUILD_DEFCONFIG` variable will take precedence
|
||||
over it.
|
||||
|
||||
See the
|
||||
:term:`KBUILD_DEFCONFIG`
|
||||
|
||||
@@ -35,3 +35,4 @@ Release 4.0 (kirkstone)
|
||||
release-notes-4.0.26
|
||||
release-notes-4.0.27
|
||||
release-notes-4.0.28
|
||||
release-notes-4.0.29
|
||||
|
||||
@@ -17,3 +17,5 @@ Release 5.0 (scarthgap)
|
||||
release-notes-5.0.8
|
||||
release-notes-5.0.9
|
||||
release-notes-5.0.10
|
||||
release-notes-5.0.11
|
||||
release-notes-5.0.12
|
||||
|
||||
178
documentation/migration-guides/release-notes-4.0.29.rst
Normal file
178
documentation/migration-guides/release-notes-4.0.29.rst
Normal file
@@ -0,0 +1,178 @@
|
||||
Release notes for Yocto-4.0.29 (Kirkstone)
|
||||
------------------------------------------
|
||||
|
||||
Security Fixes in Yocto-4.0.29
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- avahi: Fix :cve_nist:`2024-52615`
|
||||
- binutils: Fix :cve_nist:`2025-7545` and :cve_nist:`2025-7546`
|
||||
- coreutils: Fix :cve_nist:`2025-5278`
|
||||
- curl: Fix :cve_nist:`2024-11053` and :cve_nist:`2025-0167`
|
||||
- dropbear: Fix :cve_nist:`2025-47203`
|
||||
- ffmpeg: Ignore :cve_nist:`2022-3109` and :cve_nist:`2022-3341`
|
||||
- gdk-pixbuf: Fix :cve_nist:`2025-7345`
|
||||
- ghostscript: Ignore :cve_nist:`2025-46646`
|
||||
- gnupg: Fix :cve_nist:`2025-30258`
|
||||
- gnutls: Fix :cve_nist:`2025-6395`, :cve_nist:`2025-32988`, :cve_nist:`2025-32989` and
|
||||
:cve_nist:`2025-32990`
|
||||
- iputils: Fix :cve_nist:`2025-48964`
|
||||
- libarchive: Fix :cve_nist:`2025-5914`, :cve_nist:`2025-5915`, :cve_nist:`2025-5916` and
|
||||
:cve_nist:`2025-5917`
|
||||
- libpam: Fix :cve_nist:`2025-6020`
|
||||
- libsoup-2.4: Fix :cve_nist:`2025-4945`
|
||||
- libsoup-2.4: Fix :cve_nist:`2025-4969` (update patch)
|
||||
- libsoup: Fix :cve_nist:`2025-4945`, :cve_nist:`2025-6021`, :cve_nist:`2025-6170`,
|
||||
:cve_nist:`2025-49794` and :cve_nist:`2025-49796`
|
||||
- ncurses: Fix :cve_nist:`2025-6141`
|
||||
- ofono: Fix :cve_nist:`2023-4232` and :cve_nist:`2023-4235`
|
||||
- openssl: Fix :cve_nist:`2024-41996`
|
||||
- python3-urllib3: Fix :cve_nist:`2025-50181`
|
||||
- ruby: Fix :cve_nist:`2024-43398` (update patches)
|
||||
- sqlite3: Fix :cve_nist:`2025-6965` and :cve_nist:`2025-7458`
|
||||
- sqlite3: Ignore :cve_nist:`2025-3277`
|
||||
- systemd: Fix :cve_nist:`2025-4598`
|
||||
- xwayland: Fix :cve_nist:`2025-49175`, :cve_nist:`2025-49176`, :cve_nist:`2025-49177`,
|
||||
:cve_nist:`2025-49178`, :cve_nist:`2025-49179` and :cve_nist:`2025-49180`
|
||||
|
||||
|
||||
Fixes in Yocto-4.0.29
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- bintuils: stable 2.38 branch update
|
||||
- bitbake: test/fetch: Switch u-boot based test to use our own mirror
|
||||
- build-appliance-image: Update to kirkstone head revision
|
||||
- conf.py: improve SearchEnglish to handle terms with dots
|
||||
- db: ignore implicit-int and implicit-function-declaration issues fatal with gcc-14
|
||||
- dev-manual/start.rst: added missing command in Optimize your VHDX file using DiskPart
|
||||
- glibc: stable 2.35 branch updates
|
||||
- gnutls: patch read buffer overrun in the "pre_shared_key" extension
|
||||
- gnutls: patch reject zero-length version in certificate request
|
||||
- linux-yocto/5.15: update to v5.15.186
|
||||
- migration-guides: add release notes for 4.0.28
|
||||
- oeqa/core/decorator: add decorators to skip based on :term:`HOST_ARCH`
|
||||
- openssl: upgrade to 3.0.17
|
||||
- orc: set :term:`CVE_PRODUCT`
|
||||
- overview-manual/concepts.rst: fix sayhello hardcoded bindir
|
||||
- poky.conf: bump version for 4.0.29
|
||||
- python3: update CVE product
|
||||
- ref-manual: document :term:`KERNEL_SPLIT_MODULES` variable
|
||||
- scripts/install-buildtools: Update to 4.0.28
|
||||
- sudo: upgrade to 1.9.17p1
|
||||
- tcf-agent: correct the :term:`SRC_URI`
|
||||
|
||||
|
||||
Known Issues in Yocto-4.0.29
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- N/A
|
||||
|
||||
|
||||
Contributors to Yocto-4.0.29
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Aleksandar Nikolic
|
||||
- Antonin Godard
|
||||
- Archana Polampalli
|
||||
- Bruce Ashfield
|
||||
- Changqing Li
|
||||
- Chen Qi
|
||||
- Colin Pinnell McAllister
|
||||
- Daniel Díaz
|
||||
- Deepesh Varatharajan
|
||||
- Divya Chellam
|
||||
- Dixit Parmar
|
||||
- Enrico Jörns
|
||||
- Guocai He
|
||||
- Hitendra Prajapati
|
||||
- Lee Chee Yang
|
||||
- Marco Cavallini
|
||||
- Martin Jansa
|
||||
- Peter Marko
|
||||
- Praveen Kumar
|
||||
- Richard Purdie
|
||||
- Rob Woolley
|
||||
- Ross Burton
|
||||
- Steve Sakoman
|
||||
- Vijay Anusuri
|
||||
- Yash Shinde
|
||||
- Yogita Urade
|
||||
- Zhang Peng
|
||||
|
||||
|
||||
Repositories / Downloads for Yocto-4.0.29
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
poky
|
||||
|
||||
- Repository Location: :yocto_git:`/poky`
|
||||
- Branch: :yocto_git:`kirkstone </poky/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.29 </poky/log/?h=yocto-4.0.29>`
|
||||
- Git Revision: :yocto_git:`81ab000fa437ca04f584a3327b076f7a512dc6d0 </poky/commit/?id=81ab000fa437ca04f584a3327b076f7a512dc6d0>`
|
||||
- Release Artefact: poky-81ab000fa437ca04f584a3327b076f7a512dc6d0
|
||||
- sha: 2fecf3cac5c2361c201b5ae826960af92289862ec9be13837a8431138e534fd2
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.29/poky-81ab000fa437ca04f584a3327b076f7a512dc6d0.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/poky-81ab000fa437ca04f584a3327b076f7a512dc6d0.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.29 </openembedded-core/log/?h=yocto-4.0.29>`
|
||||
- Git Revision: :oe_git:`bd620eb14660075fd0f7476bbbb65d5da6293874 </openembedded-core/commit/?id=bd620eb14660075fd0f7476bbbb65d5da6293874>`
|
||||
- Release Artefact: oecore-bd620eb14660075fd0f7476bbbb65d5da6293874
|
||||
- sha: f32ab195c7090268e6e87ccf8db2813cf705c517030654326d14b25d926de88e
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.29/oecore-bd620eb14660075fd0f7476bbbb65d5da6293874.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/oecore-bd620eb14660075fd0f7476bbbb65d5da6293874.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.29 </meta-mingw/log/?h=yocto-4.0.29>`
|
||||
- Git Revision: :yocto_git:`87c22abb1f11be430caf4372e6b833dc7d77564e </meta-mingw/commit/?id=87c22abb1f11be430caf4372e6b833dc7d77564e>`
|
||||
- Release Artefact: meta-mingw-87c22abb1f11be430caf4372e6b833dc7d77564e
|
||||
- sha: f0bc4873e2e0319fb9d6d6ab9b98eb3f89664d4339a167d2db6a787dd12bc1a8
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.29/meta-mingw-87c22abb1f11be430caf4372e6b833dc7d77564e.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/meta-mingw-87c22abb1f11be430caf4372e6b833dc7d77564e.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.29 </meta-gplv2/log/?h=yocto-4.0.29>`
|
||||
- Git Revision: :yocto_git:`d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a </meta-gplv2/commit/?id=d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a>`
|
||||
- Release Artefact: meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a
|
||||
- sha: c386f59f8a672747dc3d0be1d4234b6039273d0e57933eb87caa20f56b9cca6d
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.29/meta-gplv2-d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/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.29 </bitbake/log/?h=yocto-4.0.29>`
|
||||
- Git Revision: :oe_git:`8e2d1f8de055549b2101614d85454fcd1d0f94b2 </bitbake/commit/?id=8e2d1f8de055549b2101614d85454fcd1d0f94b2>`
|
||||
- Release Artefact: bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2
|
||||
- sha: fad4e7699bae62082118e89785324b031b0af0743064caee87c91ba28549afb0
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-4.0.29/bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-4.0.29/bitbake-8e2d1f8de055549b2101614d85454fcd1d0f94b2.tar.bz2
|
||||
|
||||
meta-yocto
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-yocto`
|
||||
- Branch: :yocto_git:`kirkstone </meta-yocto/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.29 </meta-yocto/log/?h=yocto-4.0.29>`
|
||||
- Git Revision: :yocto_git:`e916d3bad58f955b73e2c67aba975e63cd191394 </meta-yocto/commit/?id=e916d3bad58f955b73e2c67aba975e63cd191394>`
|
||||
|
||||
yocto-docs
|
||||
|
||||
- Repository Location: :yocto_git:`/yocto-docs`
|
||||
- Branch: :yocto_git:`kirkstone </yocto-docs/log/?h=kirkstone>`
|
||||
- Tag: :yocto_git:`yocto-4.0.29 </yocto-docs/log/?h=yocto-4.0.29>`
|
||||
- Git Revision: :yocto_git:`bf855ecaf4bec4cef9bbfea2e50caa65a8339828 </yocto-docs/commit/?id=bf855ecaf4bec4cef9bbfea2e50caa65a8339828>`
|
||||
|
||||
219
documentation/migration-guides/release-notes-5.0.11.rst
Normal file
219
documentation/migration-guides/release-notes-5.0.11.rst
Normal file
@@ -0,0 +1,219 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Release notes for Yocto-5.0.11 (Scarthgap)
|
||||
------------------------------------------
|
||||
|
||||
Security Fixes in Yocto-5.0.11
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- binutils: Fix :cve_nist:`2025-5244` and :cve_nist:`2025-5245`
|
||||
- busybox: Fix :cve_nist:`2022-48174`
|
||||
- coreutils: Fix :cve_nist:`2025-5278`
|
||||
- curl: Ignore :cve_nist:`2025-5025` if :term:`PACKAGECONFIG` set with openssl
|
||||
- ffmpeg: Fix :cve_nist:`2025-1373`
|
||||
- glibc: fix :cve_nist:`2025-4802` and :cve_nist:`2025-5702`
|
||||
- gnupg: Fix :cve_nist:`2025-30258`
|
||||
- go: Fix :cve_nist:`2025-4673`
|
||||
- go: Ignore :cve_nist:`2024-3566`
|
||||
- icu: Fix :cve_nist:`2025-5222`
|
||||
- kea: Fix :cve_nist:`2025-32801`, :cve_nist:`2025-32802` and :cve_nist:`2025-32803`
|
||||
- libarchive: fix :cve_nist:`2025-5914`, :cve_nist:`2025-5915`, :cve_nist:`2025-5916`,
|
||||
:cve_nist:`2025-5917` and :cve_nist:`2025-5918`
|
||||
- libsoup-2.4: Fix :cve_nist:`2025-2784`, :cve_nist:`2025-4476`, :cve_nist:`2025-4945`,
|
||||
:cve_nist:`2025-4948`, :cve_nist:`2025-4969`, :cve_nist:`2025-32050`, :cve_nist:`2025-32052`,
|
||||
:cve_nist:`2025-32053`, :cve_nist:`2025-32907` and :cve_nist:`2025-46421`
|
||||
- libsoup-3.4: Fix :cve_nist:`2025-2784`, :cve_nist:`2025-4945`, :cve_nist:`2025-4948`,
|
||||
:cve_nist:`2025-4969`, :cve_nist:`2025-32050`, :cve_nist:`2025-32051`, :cve_nist:`2025-32052`,
|
||||
:cve_nist:`2025-32053`, :cve_nist:`2025-32907`, :cve_nist:`2025-32908` and :cve_nist:`2025-46421`
|
||||
- libxml2: Fix :cve_nist:`2025-6021`
|
||||
- linux-yocto-6.6: Fix :cve_nist:`2025-21995`, :cve_nist:`2025-21996`, :cve_nist:`2025-21997`,
|
||||
:cve_nist:`2025-21999`, :cve_nist:`2025-22001`, :cve_nist:`2025-22003`, :cve_nist:`2025-22004`,
|
||||
:cve_nist:`2025-22005`, :cve_nist:`2025-22007`, :cve_nist:`2025-22009`, :cve_nist:`2025-22010`,
|
||||
:cve_nist:`2025-22014`, :cve_nist:`2025-22018`, :cve_nist:`2025-22020`, :cve_nist:`2025-22027`,
|
||||
:cve_nist:`2025-22033`, :cve_nist:`2025-22035`, :cve_nist:`2025-22038`, :cve_nist:`2025-22040`,
|
||||
:cve_nist:`2025-22041`, :cve_nist:`2025-22054`, :cve_nist:`2025-22056`, :cve_nist:`2025-22063`,
|
||||
:cve_nist:`2025-22066`, :cve_nist:`2025-22080`, :cve_nist:`2025-22081`, :cve_nist:`2025-22088`,
|
||||
:cve_nist:`2025-22097`, :cve_nist:`2025-23136`, :cve_nist:`2025-37785`, :cve_nist:`2025-37800`,
|
||||
:cve_nist:`2025-37801`, :cve_nist:`2025-37803`, :cve_nist:`2025-37805`, :cve_nist:`2025-37838`,
|
||||
:cve_nist:`2025-37893`, :cve_nist:`2025-38152`, :cve_nist:`2025-39728` and :cve_nist:`2025-39735`
|
||||
- net-tools: Fix :cve_nist:`2025-46836`
|
||||
- python3-setuptools: Fix :cve_nist:`2025-47273`
|
||||
- python3-requests: fix :cve_nist:`2024-47081`
|
||||
- python3-urllib3: Fix :cve_nist:`2025-50181`
|
||||
- python3: Fix CVE 2024-12718 CVE 2025-4138 CVE 2025-4330 CVE 2025-4435 :cve_nist:`2025-4516` CVE
|
||||
2025-4517
|
||||
- screen: fix :cve_nist:`2025-46802`, :cve_nist:`2025-46804` and :cve_nist:`2025-46805`
|
||||
- sudo: Fix :cve_nist:`2025-32462`
|
||||
- xwayland: Fix :cve_nist:`2025-49175`, :cve_nist:`2025-49176`, :cve_nist:`2025-49177`,
|
||||
:cve_nist:`2025-49178`, :cve_nist:`2025-49179` and :cve_nist:`2025-49180`
|
||||
|
||||
|
||||
Fixes in Yocto-5.0.11
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- bitbake: ast: Change deferred inherits to happen per recipe
|
||||
- bitbake: fetch2: Avoid deprecation warning
|
||||
- bitbake: gcp.py: remove slow calls to gsutil stat
|
||||
- bitbake: toaster/tests/buildtest: Switch to new CDN
|
||||
- brief-yoctoprojectqs/ref-manual: Switch to new CDN
|
||||
- bsp-guide: update kernel version example to 6.12
|
||||
- bsp-guide: update all of section 1.8.2 to reflect current beaglebone conf file
|
||||
- bsp-guide: update lonely "4.12" kernel reference to "6.12"
|
||||
- build-appliance-image: Update to scarthgap head revision
|
||||
- cmake: Correctly handle cost data of tests with arbitrary chars in name
|
||||
- conf.py: improve SearchEnglish to handle terms with dots
|
||||
- docs: Clean up explanation of minimum required version numbers
|
||||
- docs: README: specify how to contribute instead of pointing at another file
|
||||
- docs: conf.py: silence SyntaxWarning on js_splitter_code
|
||||
- gcc: Upgrade to GCC 13.4
|
||||
- ghostscript: upgrade to 10.05.1
|
||||
- glibc: stable 2.39 branch updates (06a70769fd...)
|
||||
- gnupg: update to 2.4.8
|
||||
- gtk+: add missing libdrm dependency
|
||||
- kea: upgrade to 2.4.2
|
||||
- libpng: Add ptest
|
||||
- libsoup-2.4: fix do_compile failure
|
||||
- linux-yocto/6.6: fix beaglebone ethernet
|
||||
- linux-yocto/6.6: update to v6.6.96
|
||||
- local.conf.sample: Switch to new CDN
|
||||
- ltp: backport patch to fix compilation error for x86_64
|
||||
- migration-guides: add release notes for 4.0.27, 4.0.28, 5.0.10
|
||||
- minicom: correct the :term:`SRC_URI`
|
||||
- nfs-utils: don't use signals to shut down nfs server.
|
||||
- overview-manual/concepts.rst: fix sayhello hardcoded bindir
|
||||
- overview-manual: small number of pedantic cleanups
|
||||
- package: export debugsources in :term:`PKGDESTWORK` as json
|
||||
- poky.conf: bump version for 5.0.11
|
||||
- python3-requests: upgrade to 2.32.4
|
||||
- python3: upgrade to 3.12.11
|
||||
- ref-manual: clarify :term:`KCONFIG_MODE` default behaviour
|
||||
- ref-manual: classes: nativesdk: move note to appropriate section
|
||||
- ref-manual: classes: reword to clarify that native/nativesdk options are exclusive
|
||||
- ref-manual: document :term:`KERNEL_SPLIT_MODULES` variable
|
||||
- scripts/install-buildtools: Update to 5.0.10
|
||||
- spdx: add option to include only compiled sources
|
||||
- sstatetests: Switch to new CDN
|
||||
- systemd: Rename systemd_v255.21 to systemd_255.21
|
||||
- systemd: upgrade to 255.21
|
||||
- tcf-agent: correct the :term:`SRC_URI`
|
||||
- testimage: get real os-release file
|
||||
- tune-cortexr52: Remove aarch64 for ARM Cortex-R52
|
||||
- uboot: Allow for customizing installed/deployed file names
|
||||
|
||||
|
||||
Known Issues in Yocto-5.0.11
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- N/A
|
||||
|
||||
Contributors to Yocto-5.0.11
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Thanks to the following people who contributed to this release:
|
||||
- Aleksandar Nikolic
|
||||
- Andrew Fernandes
|
||||
- Antonin Godard
|
||||
- Archana Polampalli
|
||||
- Ashish Sharma
|
||||
- Bruce Ashfield
|
||||
- Carlos Sánchez de La Lama
|
||||
- Changqing Li
|
||||
- Chen Qi
|
||||
- Colin Pinnell McAllister
|
||||
- Daniel Turull
|
||||
- Deepesh Varatharajan
|
||||
- Divya Chellam
|
||||
- Dixit Parmar
|
||||
- Enrico Jörns
|
||||
- Etienne Cordonnier
|
||||
- Guocai He
|
||||
- Guðni Már Gilbert
|
||||
- Hitendra Prajapati
|
||||
- Jiaying Song
|
||||
- Lee Chee Yang
|
||||
- Moritz Haase
|
||||
- NeilBrown
|
||||
- Peter Marko
|
||||
- Poonam Jadhav
|
||||
- Praveen Kumar
|
||||
- Preeti Sachan
|
||||
- Quentin Schulz
|
||||
- Richard Purdie
|
||||
- Robert P. J. Day
|
||||
- Roland Kovacs
|
||||
- Ryan Eatmon
|
||||
- Sandeep Gundlupet Raju
|
||||
- Savvas Etairidis
|
||||
- Steve Sakoman
|
||||
- Victor Giraud
|
||||
- Vijay Anusuri
|
||||
- Virendra Thakur
|
||||
- Wang Mingyu
|
||||
- Yogita Urade
|
||||
|
||||
|
||||
Repositories / Downloads for Yocto-5.0.11
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
poky
|
||||
|
||||
- Repository Location: :yocto_git:`/poky`
|
||||
- Branch: :yocto_git:`scarthgap </poky/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.11 </poky/log/?h=yocto-5.0.11>`
|
||||
- Git Revision: :yocto_git:`ae2d52758fc2fcb0ed996aa234430464ebf4b310 </poky/commit/?id=ae2d52758fc2fcb0ed996aa234430464ebf4b310>`
|
||||
- Release Artefact: poky-ae2d52758fc2fcb0ed996aa234430464ebf4b310
|
||||
- sha: 48dec434dd51e5c9c626abdccc334da300fa2b4975137d526f5df6703e5a930e
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/poky-ae2d52758fc2fcb0ed996aa234430464ebf4b310.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/poky-ae2d52758fc2fcb0ed996aa234430464ebf4b310.tar.bz2
|
||||
|
||||
openembedded-core
|
||||
|
||||
- Repository Location: :oe_git:`/openembedded-core`
|
||||
- Branch: :oe_git:`scarthgap </openembedded-core/log/?h=scarthgap>`
|
||||
- Tag: :oe_git:`yocto-5.0.11 </openembedded-core/log/?h=yocto-5.0.11>`
|
||||
- Git Revision: :oe_git:`7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b </openembedded-core/commit/?id=7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b>`
|
||||
- Release Artefact: oecore-7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b
|
||||
- sha: fb50992a28298915fe195e327628d6d5872fd2dbc74189c2d840178cd860bb2e
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/oecore-7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/oecore-7a59dc5ee6edd9596e87c2fbcd1f2594c06b3d1b.tar.bz2
|
||||
|
||||
meta-mingw
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-mingw`
|
||||
- Branch: :yocto_git:`scarthgap </meta-mingw/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.11 </meta-mingw/log/?h=yocto-5.0.11>`
|
||||
- Git Revision: :yocto_git:`bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f </meta-mingw/commit/?id=bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f>`
|
||||
- Release Artefact: meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f
|
||||
- sha: ab073def6487f237ac125d239b3739bf02415270959546b6b287778664f0ae65
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
|
||||
|
||||
bitbake
|
||||
|
||||
- Repository Location: :oe_git:`/bitbake`
|
||||
- Branch: :oe_git:`2.8 </bitbake/log/?h=2.8>`
|
||||
- Tag: :oe_git:`yocto-5.0.11 </bitbake/log/?h=yocto-5.0.11>`
|
||||
- Git Revision: :oe_git:`139f61fe9eec221745184a14b3618d2dfa650b91 </bitbake/commit/?id=139f61fe9eec221745184a14b3618d2dfa650b91>`
|
||||
- Release Artefact: bitbake-139f61fe9eec221745184a14b3618d2dfa650b91
|
||||
- sha: 86669d4220c50d35c0703f151571954ad9c6285cc91a870afbb878d2e555d2ca
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.11/bitbake-139f61fe9eec221745184a14b3618d2dfa650b91.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.11/bitbake-139f61fe9eec221745184a14b3618d2dfa650b91.tar.bz2
|
||||
|
||||
meta-yocto
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-yocto`
|
||||
- Branch: :yocto_git:`scarthgap </meta-yocto/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.11 </meta-yocto/log/?h=yocto-5.0.11>`
|
||||
- Git Revision: :yocto_git:`50e5c0d85d3775ac1294bdcd7f11deaa382c9d08 </meta-yocto/commit/?id=50e5c0d85d3775ac1294bdcd7f11deaa382c9d08>`
|
||||
|
||||
yocto-docs
|
||||
|
||||
- Repository Location: :yocto_git:`/yocto-docs`
|
||||
- Branch: :yocto_git:`scarthgap </yocto-docs/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.11 </yocto-docs/log/?h=yocto-5.0.11>`
|
||||
- Git Revision: :yocto_git:`3f88cb85cca8f9128cfaab36882c4563457b03d9 </yocto-docs/commit/?id=3f88cb85cca8f9128cfaab36882c4563457b03d9>`
|
||||
|
||||
184
documentation/migration-guides/release-notes-5.0.12.rst
Normal file
184
documentation/migration-guides/release-notes-5.0.12.rst
Normal file
@@ -0,0 +1,184 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
Release notes for Yocto-5.0.12 (Scarthgap)
|
||||
------------------------------------------
|
||||
|
||||
Security Fixes in Yocto-5.0.12
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- avahi: Fix :cve_nist:`2024-52615`
|
||||
- binutils: Fix :cve_nist:`2025-7545` and :cve_nist:`2025-7546`
|
||||
- busybox: Fix :cve_nist:`2023-39810`
|
||||
- dropbear: Fix :cve_nist:`2025-47203`
|
||||
- gdk-pixbuf: Fix :cve_nist:`2025-7345`
|
||||
- git: Fix :cve_nist:`2025-27613`, :cve_nist:`2025-27614`, :cve_nist:`2025-46334`,
|
||||
:cve_nist:`2025-46835`, :cve_nist:`2025-48384`, :cve_nist:`2025-48385` and :cve_nist:`2025-48386`
|
||||
- glib-2.0: Ignore :cve_nist:`2025-4056`
|
||||
- glibc: Fix :cve_nist:`2025-8058`
|
||||
- gnutls: Fix :cve_nist:`2025-6395`, :cve_nist:`2025-32988`, :cve_nist:`2025-32989` and
|
||||
:cve_nist:`2025-32990`
|
||||
- go: Ignore :cve_nist:`2025-0913`
|
||||
- gstreamer1.0-plugins-base: Fix :cve_nist:`2025-47806` and :cve_nist:`2025-47808`
|
||||
- gstreamer1.0-plugins-good: Fix :cve_nist:`2025-47183` and :cve_nist:`2025-47219`
|
||||
- iputils: Fix :cve_nist:`2025-48964`
|
||||
- libpam: Fix :cve_nist:`2025-6020`
|
||||
- libxml2: Fix :cve_nist:`2025-6170`, :cve_nist:`2025-49794`, :cve_nist:`2025-49795` and
|
||||
:cve_nist:`2025-49796`
|
||||
- libxml2: Ignore :cve_nist:`2025-8732`
|
||||
- ncurses: Fix :cve_nist:`2025-6141`
|
||||
- openssl: Fix :cve_nist:`2024-41996` and :cve_nist:`2025-27587`
|
||||
- python3: Fix :cve_nist:`2025-8194`
|
||||
- sqlite3: Fix :cve_nist:`2025-6965`
|
||||
- sudo: Fix :cve_nist:`2025-32463`
|
||||
- xserver-xorg: Fix :cve_nist:`2022-49737`, :cve_nist:`2025-49175`, :cve_nist:`2025-49176`,
|
||||
:cve_nist:`2025-49177`, :cve_nist:`2025-49178`, :cve_nist:`2025-49179`, :cve_nist:`2025-49180`
|
||||
and :cve_nist:`2025-49176`
|
||||
- xz: Ignore :cve_nist:`2024-47611`
|
||||
|
||||
|
||||
Fixes in Yocto-5.0.12
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- bash: Stick to C17 std
|
||||
- bash: use -std=gnu17 also for native :term:`CFLAGS`
|
||||
- binutils: stable 2.42 branch updates
|
||||
- bitbake: bitbake: runqueue: Verify mcdepends are valid
|
||||
- bitbake: test/fetch: Switch u-boot based test to use our own mirror
|
||||
- bitbake: utils: Optimise signal/sigmask performance
|
||||
- build-appliance-image: Update to scarthgap head revision
|
||||
- cairo: fix build with gcc-15 on host
|
||||
- cmake: Add :term:`PACKAGECONFIG` option for debugger support
|
||||
- cve-check: Add missing call to exit_if_errors
|
||||
- dev-manual/start.rst: added missing command in Optimize your VHDX file using DiskPart
|
||||
- e2fsprogs: Fix build failure with gcc 15
|
||||
- git: Upgrade to 2.44.4
|
||||
- glibc: stable 2.39 branch updates
|
||||
- gnutls: patch read buffer overrun in the "pre_shared_key" extension
|
||||
- gnutls: patch reject zero-length version in certificate request
|
||||
- go-helloworld: fix license
|
||||
- kea: set correct permissions for /var/run/kea
|
||||
- linux-libc-headers: Fix invalid conversion in cn_proc.h
|
||||
- migration-guides: add release notes for 5.0.11
|
||||
- mtools: upgrade to 4.0.49
|
||||
- oe-debuginfod: add option for data storage
|
||||
- orc: set :term:`CVE_PRODUCT`
|
||||
- overview-manual/yp-intro.rst: fix broken link to article
|
||||
- parted: Fix build with GCC 15
|
||||
- poky.conf: bump version for 5.0.12
|
||||
- python3: update CVE product
|
||||
- ref-manual/classes.rst: document the testexport class
|
||||
- ref-manual/system-requirements.rst: update supported distributions
|
||||
- ref-manual/variables.rst: document :term:`SPL_DTB_BINARY` :term:`FIT_CONF_PREFIX` variable
|
||||
- scripts/install-buildtools: Update to 5.0.11
|
||||
- sudo: upgrade to 1.9.17p1
|
||||
- timedated: wait for jobs before SetNTP response
|
||||
- variables.rst: remove references to obsolete tar packaging
|
||||
- xserver-xorg: upgrade to 21.1.18
|
||||
|
||||
|
||||
Known Issues in Yocto-5.0.12
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- N/A
|
||||
|
||||
Contributors to Yocto-5.0.12
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Thanks to the following people who contributed to this release:
|
||||
- Aleksandar Nikolic
|
||||
- Alexander Kanavin
|
||||
- Antonin Godard
|
||||
- Archana Polampalli
|
||||
- Daniel Turull
|
||||
- Deepesh Varatharajan
|
||||
- Erik Lindsten
|
||||
- Fabio Berton
|
||||
- Hitendra Prajapati
|
||||
- Jinfeng Wang
|
||||
- Joe Slater
|
||||
- Khem Raj
|
||||
- Lee Chee Yang
|
||||
- Marco Cavallini
|
||||
- Mark Hatle
|
||||
- Martin Jansa
|
||||
- Michal Seben
|
||||
- Nikhil R
|
||||
- Peter Marko
|
||||
- Philip Lorenz
|
||||
- Praveen Kumar
|
||||
- Quentin Schulz
|
||||
- Richard Purdie
|
||||
- Robert P. J. Day
|
||||
- Roland Kovacs
|
||||
- Steve Sakoman
|
||||
- Vijay Anusuri
|
||||
- Wang Mingyu
|
||||
- Yash Shinde
|
||||
- Yi Zhao
|
||||
- Zhang Peng
|
||||
|
||||
Repositories / Downloads for Yocto-5.0.12
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
poky
|
||||
|
||||
- Repository Location: :yocto_git:`/poky`
|
||||
- Branch: :yocto_git:`scarthgap </poky/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.12 </poky/log/?h=yocto-5.0.12>`
|
||||
- Git Revision: :yocto_git:`ec220ae083dba35c279192b2249ad03fe238446e </poky/commit/?id=ec220ae083dba35c279192b2249ad03fe238446e>`
|
||||
- Release Artefact: poky-ec220ae083dba35c279192b2249ad03fe238446e
|
||||
- sha: a5f8c2ad491c59d0bdfb85f46a136b0ee66cfdd4359ab1ab9dac2430d0a52c17
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/poky-ec220ae083dba35c279192b2249ad03fe238446e.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/poky-ec220ae083dba35c279192b2249ad03fe238446e.tar.bz2
|
||||
|
||||
openembedded-core
|
||||
|
||||
- Repository Location: :oe_git:`/openembedded-core`
|
||||
- Branch: :oe_git:`scarthgap </openembedded-core/log/?h=scarthgap>`
|
||||
- Tag: :oe_git:`yocto-5.0.12 </openembedded-core/log/?h=yocto-5.0.12>`
|
||||
- Git Revision: :oe_git:`93c7489d843a0e46fe4fc685b356d0ae885300d7 </openembedded-core/commit/?id=93c7489d843a0e46fe4fc685b356d0ae885300d7>`
|
||||
- Release Artefact: oecore-93c7489d843a0e46fe4fc685b356d0ae885300d7
|
||||
- sha: 49695592179cd777eee337d922aae354dad4ab503628f0344b1b53329900c4d9
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/oecore-93c7489d843a0e46fe4fc685b356d0ae885300d7.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/oecore-93c7489d843a0e46fe4fc685b356d0ae885300d7.tar.bz2
|
||||
|
||||
meta-mingw
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-mingw`
|
||||
- Branch: :yocto_git:`scarthgap </meta-mingw/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.12 </meta-mingw/log/?h=yocto-5.0.12>`
|
||||
- Git Revision: :yocto_git:`bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f </meta-mingw/commit/?id=bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f>`
|
||||
- Release Artefact: meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f
|
||||
- sha: ab073def6487f237ac125d239b3739bf02415270959546b6b287778664f0ae65
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/meta-mingw-bd9fef71ec005be3c3a6d7f8b99d8116daf70c4f.tar.bz2
|
||||
|
||||
bitbake
|
||||
|
||||
- Repository Location: :oe_git:`/bitbake`
|
||||
- Branch: :oe_git:`2.8 </bitbake/log/?h=2.8>`
|
||||
- Tag: :oe_git:`yocto-5.0.12 </bitbake/log/?h=yocto-5.0.12>`
|
||||
- Git Revision: :oe_git:`982645110a19ebb94d519926a4e14c8a2a205cfd </bitbake/commit/?id=982645110a19ebb94d519926a4e14c8a2a205cfd>`
|
||||
- Release Artefact: bitbake-982645110a19ebb94d519926a4e14c8a2a205cfd
|
||||
- sha: f8d777d322b8f05372d7ce75c67df2db2b7de3f64d5b7769b8051c507161245d
|
||||
- Download Locations:
|
||||
https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.12/bitbake-982645110a19ebb94d519926a4e14c8a2a205cfd.tar.bz2
|
||||
https://mirrors.kernel.org/yocto/yocto/yocto-5.0.12/bitbake-982645110a19ebb94d519926a4e14c8a2a205cfd.tar.bz2
|
||||
|
||||
meta-yocto
|
||||
|
||||
- Repository Location: :yocto_git:`/meta-yocto`
|
||||
- Branch: :yocto_git:`scarthgap </meta-yocto/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.12 </meta-yocto/log/?h=yocto-5.0.12>`
|
||||
- Git Revision: :yocto_git:`82602cda1a89644d1acbe230a81c93e3fb5031c8 </meta-yocto/commit/?id=82602cda1a89644d1acbe230a81c93e3fb5031c8>`
|
||||
|
||||
yocto-docs
|
||||
|
||||
- Repository Location: :yocto_git:`/yocto-docs`
|
||||
- Branch: :yocto_git:`scarthgap </yocto-docs/log/?h=scarthgap>`
|
||||
- Tag: :yocto_git:`yocto-5.0.12 </yocto-docs/log/?h=yocto-5.0.12>`
|
||||
- Git Revision: :yocto_git:`dd665216fa578a1f2f268790d708c6a5d2912ecf </yocto-docs/commit/?id=dd665216fa578a1f2f268790d708c6a5d2912ecf>`
|
||||
|
||||
@@ -28,7 +28,7 @@ platforms as well as software stacks that can be maintained and scaled.
|
||||
|
||||
For further introductory information on the Yocto Project, you might be
|
||||
interested in this
|
||||
`article <https://www.embedded.com/electronics-blogs/say-what-/4458600/Why-the-Yocto-Project-for-my-IoT-Project->`__
|
||||
`article <https://www.embedded.com/why-the-yocto-project-for-my-iot-project/>`__
|
||||
by Drew Moseley and in this short introductory
|
||||
`video <https://www.youtube.com/watch?v=utZpKM7i5Z4>`__.
|
||||
|
||||
|
||||
@@ -3186,6 +3186,22 @@ class assuming :term:`PATCHRESOLVE` is set to "user", the
|
||||
:ref:`ref-classes-cml1` class, and the :ref:`ref-classes-devshell` class all
|
||||
use the :ref:`ref-classes-terminal` class.
|
||||
|
||||
.. _ref-classes-testexport:
|
||||
|
||||
``testexport``
|
||||
==============
|
||||
|
||||
Based on the :ref:`ref-classes-testimage` class, the
|
||||
:ref:`ref-classes-testexport` class can be used to export the test environment
|
||||
outside of the :term:`OpenEmbedded Build System`. This will generate the
|
||||
directory structure to execute the runtime tests using the
|
||||
:oe_git:`runexported.py </openembedded-core/tree/meta/lib/oeqa/runexported.py>`
|
||||
Python script.
|
||||
|
||||
For more details on how to use :ref:`ref-classes-testexport`, see
|
||||
the :ref:`test-manual/runtime-testing:Exporting Tests` section in the Yocto
|
||||
Project Test Environment Manual.
|
||||
|
||||
.. _ref-classes-testimage:
|
||||
|
||||
``testimage``
|
||||
@@ -3316,6 +3332,9 @@ The variables used by this class are:
|
||||
- :term:`SPL_SIGN_ENABLE`: enable signing the FIT image.
|
||||
- :term:`SPL_SIGN_KEYDIR`: directory containing the signing keys.
|
||||
- :term:`SPL_SIGN_KEYNAME`: base filename of the signing keys.
|
||||
- :term:`SPL_DTB_BINARY`: Name of the SPL device tree binary. Can be set to an
|
||||
empty string to indicate that no SPL should be created and added to the FIT
|
||||
image.
|
||||
- :term:`UBOOT_FIT_ADDRESS_CELLS`: ``#address-cells`` value for the FIT image.
|
||||
- :term:`UBOOT_FIT_DESC`: description string encoded into the FIT image.
|
||||
- :term:`UBOOT_FIT_GENERATE_KEYS`: generate the keys if they don't exist yet.
|
||||
|
||||
@@ -344,6 +344,15 @@ This configuration file is generated by :doc:`bblock </dev-manual/bblock>` and
|
||||
contains the signatures locked by ``bblock``. By default, it does not exist
|
||||
and will be created upon the first invocation of ``bblock``.
|
||||
|
||||
.. _structure-build-conf-auto.conf:
|
||||
|
||||
``build/conf/auto.conf``
|
||||
------------------------
|
||||
|
||||
This file contains configuration variables that are automatically modified by
|
||||
tools such as :oe_git:`bitbake-config-build </bitbake/tree/bin/bitbake-config-build>`.
|
||||
This file should not be modified manually.
|
||||
|
||||
.. _structure-build-downloads:
|
||||
|
||||
``build/downloads/``
|
||||
|
||||
@@ -58,36 +58,35 @@ Supported Linux Distributions
|
||||
Currently, the &DISTRO; release ("&DISTRO_NAME;") of the Yocto Project is
|
||||
supported on the following distributions:
|
||||
|
||||
- Ubuntu 20.04 (LTS)
|
||||
|
||||
- Ubuntu 22.04 (LTS)
|
||||
|
||||
- Ubuntu 23.04
|
||||
|
||||
- Fedora 38
|
||||
|
||||
- Fedora 39
|
||||
|
||||
- CentOS Stream 8
|
||||
|
||||
- Debian GNU/Linux 11 (Bullseye)
|
||||
|
||||
- Debian GNU/Linux 12 (Bookworm)
|
||||
|
||||
- OpenSUSE Leap 15.4
|
||||
..
|
||||
Can be generated with yocto-autobuilder-helper's scripts/yocto-supported-distros:
|
||||
yocto-supported-distros --release scarthgap --config yocto-autobuilder2/config.py --output-format docs --poky-distros
|
||||
|
||||
- AlmaLinux 8
|
||||
|
||||
- AlmaLinux 9
|
||||
|
||||
- Rocky 9
|
||||
- Debian 11
|
||||
- Debian 12
|
||||
- Fedora 39
|
||||
- Fedora 40
|
||||
- Fedora 41
|
||||
- Rocky Linux 8
|
||||
- Rocky Linux 9
|
||||
- Ubuntu 20.04 (LTS)
|
||||
- Ubuntu 22.04 (LTS)
|
||||
- Ubuntu 24.04 (LTS)
|
||||
- Ubuntu 24.10
|
||||
|
||||
The following distribution versions are still tested, even though the
|
||||
organizations publishing them no longer make updates publicly available:
|
||||
|
||||
- Ubuntu 18.04 (LTS)
|
||||
..
|
||||
This list contains EOL distros that are still tested on the Autobuilder
|
||||
(meaning there are running workers).
|
||||
See https://endoflife.date for information of EOL releases.
|
||||
|
||||
- Ubuntu 23.04
|
||||
- Fedora 39
|
||||
- Fedora 40
|
||||
- Ubuntu 20.04 (LTS)
|
||||
|
||||
Note that the Yocto Project doesn't have access to private updates
|
||||
that some of these versions may have. Therefore, our testing has
|
||||
@@ -96,7 +95,15 @@ limited value if you have access to such updates.
|
||||
Finally, here are the distribution versions which were previously
|
||||
tested on former revisions of "&DISTRO_NAME;", but no longer are:
|
||||
|
||||
*This list is currently empty*
|
||||
..
|
||||
Can be generated with yocto-autobuilder-helper's scripts/yocto-supported-distros.
|
||||
yocto-supported-distros --release scarthgap --config yocto-autobuilder2/config.py --output-format docs --old-distros
|
||||
|
||||
- CentOS Stream 8
|
||||
- Fedora 38
|
||||
- OpenSUSE Leap 15.4
|
||||
- Ubuntu 18.04
|
||||
- Ubuntu 23.04
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -3270,6 +3270,10 @@ system and gives an overview of their function and contents.
|
||||
|
||||
This variable is used in the :ref:`ref-classes-kernel-fitimage` class.
|
||||
|
||||
:term:`FIT_CONF_PREFIX`
|
||||
When using the :ref:`ref-classes-kernel-fitimage`, this is the prefix
|
||||
used for creating FIT configuration nodes. Its default value is "conf-".
|
||||
|
||||
:term:`FIT_DESC`
|
||||
Specifies the description string encoded into a FIT image. The
|
||||
default value is set by the :ref:`ref-classes-kernel-fitimage` class as
|
||||
@@ -4075,14 +4079,20 @@ system and gives an overview of their function and contents.
|
||||
added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
|
||||
variable.
|
||||
|
||||
When using Wic tool, beware that a second overhead factor is also applied.
|
||||
This overhead value is defined by the ``--overhead-factor`` option, which
|
||||
defaults to "1.3" when omitted. See the
|
||||
:ref:`ref-manual/kickstart:command: part or partition` chapter in
|
||||
:doc:`/ref-manual/kickstart` for details.
|
||||
|
||||
:term:`IMAGE_PKGTYPE`
|
||||
Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
|
||||
Defines the package type (i.e. DEB, RPM or IPK) used by the
|
||||
OpenEmbedded build system. The variable is defined appropriately by
|
||||
the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`,
|
||||
or :ref:`ref-classes-package_ipk` class.
|
||||
one of the :ref:`ref-classes-package_deb`, :ref:`ref-classes-package_rpm`,
|
||||
or :ref:`ref-classes-package_ipk` classes.
|
||||
|
||||
The :ref:`ref-classes-populate-sdk-*` and :ref:`ref-classes-image`
|
||||
classes use the :term:`IMAGE_PKGTYPE` for packaging up images and SDKs.
|
||||
classes use the :term:`IMAGE_PKGTYPE` for packaging images and SDKs.
|
||||
|
||||
You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
|
||||
variable is set indirectly through the appropriate
|
||||
@@ -4091,12 +4101,6 @@ system and gives an overview of their function and contents.
|
||||
OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
|
||||
or IPK) that appears with the variable
|
||||
|
||||
.. note::
|
||||
|
||||
Files using the ``.tar`` format are never used as a substitute
|
||||
packaging format for DEB, RPM, and IPK formatted files for your image
|
||||
or SDK.
|
||||
|
||||
:term:`IMAGE_POSTPROCESS_COMMAND`
|
||||
Specifies a list of functions to call once the OpenEmbedded build
|
||||
system creates the final image output files. You can specify
|
||||
@@ -4772,8 +4776,7 @@ system and gives an overview of their function and contents.
|
||||
would place patch files and configuration fragment files (i.e.
|
||||
"out-of-tree"). However, if you want to use a ``defconfig`` file that
|
||||
is part of the kernel tree (i.e. "in-tree"), you can use the
|
||||
:term:`KBUILD_DEFCONFIG` variable and append the
|
||||
:term:`KMACHINE` variable to point to the
|
||||
:term:`KBUILD_DEFCONFIG` variable to point to the
|
||||
``defconfig`` file.
|
||||
|
||||
To use the variable, set it in the append file for your kernel recipe
|
||||
@@ -8451,6 +8454,11 @@ 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_DTB_BINARY`
|
||||
When inheriting the :ref:`ref-classes-uboot-sign` class, the
|
||||
:term:`SPL_DTB_BINARY` variable contains the name of the SPL binary to be
|
||||
compiled.
|
||||
|
||||
: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`
|
||||
@@ -8820,7 +8828,7 @@ system and gives an overview of their function and contents.
|
||||
directory for the build host.
|
||||
|
||||
:term:`STAGING_DIR`
|
||||
Helps construct the ``recipe-sysroots`` directory, which is used
|
||||
Helps construct the ``recipe-sysroot*`` directories, which are used
|
||||
during packaging.
|
||||
|
||||
For information on how staging for recipe-specific sysroots occurs,
|
||||
|
||||
@@ -56,9 +56,10 @@ project:
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
int main()
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
- ``configure.ac``::
|
||||
|
||||
@@ -403,7 +403,7 @@ defined in :term:`TEST_SUITES`.
|
||||
If your image is already built, make sure the following are set in your
|
||||
``local.conf`` file::
|
||||
|
||||
INHERIT += "testexport"
|
||||
IMAGE_CLASSES += "testexport"
|
||||
TEST_TARGET_IP = "IP-address-for-the-test-target"
|
||||
TEST_SERVER_IP = "IP-address-for-the-test-server"
|
||||
|
||||
@@ -413,18 +413,23 @@ following BitBake command form::
|
||||
$ bitbake image -c testexport
|
||||
|
||||
Exporting the tests places them in the :term:`Build Directory` in
|
||||
``tmp/testexport/``\ image, which is controlled by the :term:`TEST_EXPORT_DIR`
|
||||
``tmp/testimage/``\ image, which is controlled by the :term:`TEST_EXPORT_DIR`
|
||||
variable.
|
||||
|
||||
You can now run the tests outside of the build environment::
|
||||
|
||||
$ cd tmp/testexport/image
|
||||
$ ./runexported.py testdata.json
|
||||
$ cd tmp/testimage/image
|
||||
$ ./oe-test runtime
|
||||
|
||||
.. note::
|
||||
|
||||
You might need to run the image under QEMU or deploy it to your
|
||||
hardware before you can run the tests.
|
||||
|
||||
Here is a complete example that shows IP addresses and uses the
|
||||
``core-image-sato`` image::
|
||||
|
||||
INHERIT += "testexport"
|
||||
IMAGE_CLASSES += "testexport"
|
||||
TEST_TARGET_IP = "192.168.7.2"
|
||||
TEST_SERVER_IP = "192.168.7.1"
|
||||
|
||||
@@ -435,8 +440,8 @@ Use BitBake to export the tests::
|
||||
Run the tests outside of
|
||||
the build environment using the following::
|
||||
|
||||
$ cd tmp/testexport/core-image-sato
|
||||
$ ./runexported.py testdata.json
|
||||
$ cd tmp/testimage/core-image-sato
|
||||
$ ./oe-test runtime
|
||||
|
||||
Writing New Tests
|
||||
=================
|
||||
|
||||
@@ -38,7 +38,7 @@ Benefits
|
||||
and flexible: it gives users the ultimate power to change pretty much any
|
||||
aspect of the system but as with most things, power comes with responsibility.
|
||||
The Yocto Project would like to see people able to mix and match BSPs with
|
||||
distro configs or software stacks and be able to merge succesfully.
|
||||
distro configs or software stacks and be able to merge successfully.
|
||||
Over time, the project identified characteristics in layers that allow them
|
||||
to operate well together. "anti-patterns" were also found, preventing layers
|
||||
from working well together.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
|
||||
DISTRO_VERSION = "5.0.11"
|
||||
DISTRO_VERSION = "5.0.13"
|
||||
DISTRO_CODENAME = "scarthgap"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
|
||||
|
||||
@@ -27,3 +27,4 @@ render:x:527:
|
||||
sgx:x:528:
|
||||
ptest:x:529:
|
||||
xuser:x:530:
|
||||
audio:x:531:
|
||||
|
||||
@@ -196,6 +196,7 @@ python do_cve_check () {
|
||||
else:
|
||||
bb.note("No CVE database found, skipping CVE check")
|
||||
|
||||
oe.qa.exit_if_errors(d)
|
||||
}
|
||||
|
||||
addtask cve_check before do_build
|
||||
|
||||
@@ -703,7 +703,7 @@ DEBIAN_MIRROR = "http://ftp.debian.org/debian/pool"
|
||||
GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
|
||||
GNOME_GIT = "git://gitlab.gnome.org/GNOME"
|
||||
GNOME_MIRROR = "https://download.gnome.org/sources/"
|
||||
GNU_MIRROR = "https://ftp.gnu.org/gnu"
|
||||
GNU_MIRROR = "https://ftpmirror.gnu.org/gnu"
|
||||
GNUPG_MIRROR = "https://www.gnupg.org/ftp/gcrypt"
|
||||
GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
|
||||
KERNELORG_MIRROR = "https://cdn.kernel.org/pub"
|
||||
|
||||
@@ -61,4 +61,4 @@ KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
|
||||
# fetch from the network (and warn you if not). To disable the test set
|
||||
# the variable to be empty.
|
||||
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master;branch=master
|
||||
CONNECTIVITY_CHECK_URIS ?= "https://yoctoproject.org/connectivity.html"
|
||||
CONNECTIVITY_CHECK_URIS ?= "https://www.yoctoproject.org/connectivity.html"
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
# to the distro running on the build machine.
|
||||
#
|
||||
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.41"
|
||||
UNINATIVE_VERSION = "4.7"
|
||||
UNINATIVE_MAXGLIBCVERSION = "2.42"
|
||||
UNINATIVE_VERSION = "4.9"
|
||||
|
||||
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "ac440e4fc80665c79f9718c665c6e28d771e51609c088c3c97ba3ad5cfed197a"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "c5efa31450f3bbd63ea961d4e7c747ae41317937d429f65e1d5cf2050338e27a"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "5800d4e9a129d1be09cf548918d25f74e91a7c1193ae5239d5b0c9246c486d2c"
|
||||
UNINATIVE_CHECKSUM[aarch64] ?= "812045d826b7fda88944055e8526b95a5a9440bfef608d5b53fd52faab49bf85"
|
||||
UNINATIVE_CHECKSUM[i686] ?= "5cc28efd0c15a75de4bcb147c6cce65f1c1c9d442173a220f08427f40a3ffa09"
|
||||
UNINATIVE_CHECKSUM[x86_64] ?= "4c03d1ed2b7b4e823aca4a1a23d8f2e322f1770fc10e859adcede5777aff4f3a"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# See sanity.bbclass
|
||||
#
|
||||
# Expert users can confirm their sanity with "touch conf/sanity.conf"
|
||||
BB_MIN_VERSION = "2.7.3"
|
||||
BB_MIN_VERSION = "2.8.1"
|
||||
|
||||
SANITY_ABIFILE = "${TMPDIR}/abi_version"
|
||||
|
||||
|
||||
@@ -172,8 +172,8 @@ class ManifestVisitor(LicenseVisitor):
|
||||
LicenseVisitor.__init__(self)
|
||||
|
||||
def visit(self, node):
|
||||
if isinstance(node, ast.Str):
|
||||
lic = node.s
|
||||
if isinstance(node, ast.Constant):
|
||||
lic = node.value
|
||||
|
||||
if license_ok(self._canonical_license(self._d, lic),
|
||||
self._dont_want_licenses) == True:
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
#
|
||||
|
||||
import subprocess
|
||||
import multiprocessing
|
||||
import traceback
|
||||
import errno
|
||||
|
||||
from bb import multiprocessing
|
||||
|
||||
def read_file(filename):
|
||||
try:
|
||||
f = open( filename, "r" )
|
||||
|
||||
@@ -15,8 +15,8 @@ class HTTPTests(OESDKTestCase):
|
||||
"""
|
||||
|
||||
def test_wget(self):
|
||||
self._run('env -i wget --debug --output-document /dev/null https://yoctoproject.org/connectivity.html')
|
||||
self._run('env -i wget --debug --output-document /dev/null https://www.yoctoproject.org/connectivity.html')
|
||||
|
||||
def test_python(self):
|
||||
# urlopen() returns a file-like object on success and throws an exception otherwise
|
||||
self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://yoctoproject.org/connectivity.html")\'')
|
||||
self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://www.yoctoproject.org/connectivity.html")\'')
|
||||
|
||||
@@ -24,7 +24,7 @@ class BuildCpioTest(OESDKTestCase):
|
||||
|
||||
def test_cpio(self):
|
||||
with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir:
|
||||
tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz")
|
||||
tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.gz")
|
||||
|
||||
dirs = {}
|
||||
dirs["source"] = os.path.join(testdir, "cpio-2.15")
|
||||
|
||||
@@ -44,7 +44,7 @@ class MetaIDE(OESelftestTestCase):
|
||||
def test_meta_ide_can_build_cpio_project(self):
|
||||
dl_dir = self.td.get('DL_DIR', None)
|
||||
self.project = SDKBuildProject(self.tmpdir_metaideQA + "/cpio/", self.environment_script_path,
|
||||
"https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz",
|
||||
"https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.gz",
|
||||
self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
|
||||
self.project.download_archive()
|
||||
self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS'), 0,
|
||||
|
||||
75
meta/recipes-bsp/grub/files/CVE-2024-56738.patch
Normal file
75
meta/recipes-bsp/grub/files/CVE-2024-56738.patch
Normal file
@@ -0,0 +1,75 @@
|
||||
From 4cef2fc7308b2132317ad166939994f098b41561 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@arm.com>
|
||||
Date: Tue, 9 Sep 2025 14:23:14 +0100
|
||||
Subject: [PATCH] CVE-2024-56738
|
||||
|
||||
Backport an algorithmic change to grub_crypto_memcmp() so that it completes in
|
||||
constant time and thus isn't susceptible to side-channel attacks.
|
||||
|
||||
This is a partial backport of grub 0739d24cd
|
||||
("libgcrypt: Adjust import script, definitions and API users for libgcrypt 1.11")
|
||||
|
||||
CVE: CVE-2024-56738
|
||||
Upstream-Status: Backport [0739d24cd]
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
---
|
||||
grub-core/lib/crypto.c | 23 ++++++++++++++++-------
|
||||
include/grub/crypto.h | 2 +-
|
||||
2 files changed, 17 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
|
||||
index 396f76410..19db7870a 100644
|
||||
--- a/grub-core/lib/crypto.c
|
||||
+++ b/grub-core/lib/crypto.c
|
||||
@@ -433,19 +433,28 @@ grub_crypto_gcry_error (gcry_err_code_t in)
|
||||
return GRUB_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Compare byte arrays of length LEN, return 1 if it's not same,
|
||||
+ * 0, otherwise.
|
||||
+ */
|
||||
int
|
||||
-grub_crypto_memcmp (const void *a, const void *b, grub_size_t n)
|
||||
+grub_crypto_memcmp (const void *b1, const void *b2, grub_size_t len)
|
||||
{
|
||||
- register grub_size_t counter = 0;
|
||||
- const grub_uint8_t *pa, *pb;
|
||||
+ const grub_uint8_t *a = b1;
|
||||
+ const grub_uint8_t *b = b2;
|
||||
+ int ab, ba;
|
||||
+ grub_size_t i;
|
||||
|
||||
- for (pa = a, pb = b; n; pa++, pb++, n--)
|
||||
+ /* Constant-time compare. */
|
||||
+ for (i = 0, ab = 0, ba = 0; i < len; i++)
|
||||
{
|
||||
- if (*pa != *pb)
|
||||
- counter++;
|
||||
+ /* If a[i] != b[i], either ab or ba will be negative. */
|
||||
+ ab |= a[i] - b[i];
|
||||
+ ba |= b[i] - a[i];
|
||||
}
|
||||
|
||||
- return !!counter;
|
||||
+ /* 'ab | ba' is negative when buffers are not equal, extract sign bit. */
|
||||
+ return ((unsigned int)(ab | ba) >> (sizeof(unsigned int) * 8 - 1)) & 1;
|
||||
}
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
diff --git a/include/grub/crypto.h b/include/grub/crypto.h
|
||||
index 31c87c302..20ad4c5f7 100644
|
||||
--- a/include/grub/crypto.h
|
||||
+++ b/include/grub/crypto.h
|
||||
@@ -393,7 +393,7 @@ grub_crypto_pbkdf2 (const struct gcry_md_spec *md,
|
||||
grub_uint8_t *DK, grub_size_t dkLen);
|
||||
|
||||
int
|
||||
-grub_crypto_memcmp (const void *a, const void *b, grub_size_t n);
|
||||
+grub_crypto_memcmp (const void *b1, const void *b2, grub_size_t len);
|
||||
|
||||
int
|
||||
grub_password_get (char buf[], unsigned buf_size);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -37,6 +37,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
|
||||
file://CVE-2024-45778_CVE-2024-45779.patch \
|
||||
file://CVE-2025-0677_CVE-2025-0684_CVE-2025-0685_CVE-2025-0686_CVE-2025-0689.patch \
|
||||
file://CVE-2025-0678_CVE-2025-1125.patch \
|
||||
file://CVE-2024-56738.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91"
|
||||
@@ -44,6 +45,7 @@ SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154
|
||||
CVE_STATUS[CVE-2019-14865] = "not-applicable-platform: applies only to RHEL"
|
||||
CVE_STATUS[CVE-2023-4001] = "not-applicable-platform: Applies only to RHEL/Fedora"
|
||||
CVE_STATUS[CVE-2024-1048] = "not-applicable-platform: Applies only to RHEL/Fedora"
|
||||
CVE_STATUS[CVE-2024-2312] = "not-applicable-platform: Applies only to Ubuntu"
|
||||
|
||||
DEPENDS = "flex-native bison-native gettext-native"
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \
|
||||
file://CVE-2023-38472.patch \
|
||||
file://CVE-2023-38473.patch \
|
||||
file://CVE-2024-52616.patch \
|
||||
file://CVE-2024-52615.patch \
|
||||
"
|
||||
|
||||
GITHUB_BASE_URI = "https://github.com/avahi/avahi/releases/"
|
||||
|
||||
228
meta/recipes-connectivity/avahi/files/CVE-2024-52615.patch
Normal file
228
meta/recipes-connectivity/avahi/files/CVE-2024-52615.patch
Normal file
@@ -0,0 +1,228 @@
|
||||
From 4e2e1ea0908d7e6ad7f38ae04fdcdf2411f8b942 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Wed, 27 Nov 2024 18:07:32 +0100
|
||||
Subject: [PATCH] core/wide-area: fix for CVE-2024-52615
|
||||
|
||||
CVE: CVE-2024-52615
|
||||
Upstream-Status: Backport [https://github.com/avahi/avahi/commit/4e2e1ea0908d7e6ad7f38ae04fdcdf2411f8b942]
|
||||
|
||||
Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
|
||||
---
|
||||
avahi-core/wide-area.c | 128 ++++++++++++++++++++++-------------------
|
||||
1 file changed, 69 insertions(+), 59 deletions(-)
|
||||
|
||||
diff --git a/avahi-core/wide-area.c b/avahi-core/wide-area.c
|
||||
index 00a15056e..06df7afc6 100644
|
||||
--- a/avahi-core/wide-area.c
|
||||
+++ b/avahi-core/wide-area.c
|
||||
@@ -81,6 +81,10 @@ struct AvahiWideAreaLookup {
|
||||
|
||||
AvahiAddress dns_server_used;
|
||||
|
||||
+ int fd;
|
||||
+ AvahiWatch *watch;
|
||||
+ AvahiProtocol proto;
|
||||
+
|
||||
AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, lookups);
|
||||
AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, by_key);
|
||||
};
|
||||
@@ -88,9 +92,6 @@ struct AvahiWideAreaLookup {
|
||||
struct AvahiWideAreaLookupEngine {
|
||||
AvahiServer *server;
|
||||
|
||||
- int fd_ipv4, fd_ipv6;
|
||||
- AvahiWatch *watch_ipv4, *watch_ipv6;
|
||||
-
|
||||
/* Cache */
|
||||
AVAHI_LLIST_HEAD(AvahiWideAreaCacheEntry, cache);
|
||||
AvahiHashmap *cache_by_key;
|
||||
@@ -125,35 +126,67 @@ static AvahiWideAreaLookup* find_lookup(AvahiWideAreaLookupEngine *e, uint16_t i
|
||||
return l;
|
||||
}
|
||||
|
||||
+static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata);
|
||||
+
|
||||
static int send_to_dns_server(AvahiWideAreaLookup *l, AvahiDnsPacket *p) {
|
||||
+ AvahiWideAreaLookupEngine *e;
|
||||
AvahiAddress *a;
|
||||
+ AvahiServer *s;
|
||||
+ AvahiWatch *w;
|
||||
+ int r;
|
||||
|
||||
assert(l);
|
||||
assert(p);
|
||||
|
||||
- if (l->engine->n_dns_servers <= 0)
|
||||
+ e = l->engine;
|
||||
+ assert(e);
|
||||
+
|
||||
+ s = e->server;
|
||||
+ assert(s);
|
||||
+
|
||||
+ if (e->n_dns_servers <= 0)
|
||||
return -1;
|
||||
|
||||
- assert(l->engine->current_dns_server < l->engine->n_dns_servers);
|
||||
+ assert(e->current_dns_server < e->n_dns_servers);
|
||||
|
||||
- a = &l->engine->dns_servers[l->engine->current_dns_server];
|
||||
+ a = &e->dns_servers[e->current_dns_server];
|
||||
l->dns_server_used = *a;
|
||||
|
||||
- if (a->proto == AVAHI_PROTO_INET) {
|
||||
+ if (l->fd >= 0) {
|
||||
+ /* We are reusing lookup object and sending packet to another server so let's cleanup before we establish connection to new server. */
|
||||
+ s->poll_api->watch_free(l->watch);
|
||||
+ l->watch = NULL;
|
||||
|
||||
- if (l->engine->fd_ipv4 < 0)
|
||||
- return -1;
|
||||
+ close(l->fd);
|
||||
+ l->fd = -EBADF;
|
||||
+ }
|
||||
|
||||
- return avahi_send_dns_packet_ipv4(l->engine->fd_ipv4, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv4, AVAHI_DNS_PORT);
|
||||
+ assert(a->proto == AVAHI_PROTO_INET || a->proto == AVAHI_PROTO_INET6);
|
||||
|
||||
- } else {
|
||||
- assert(a->proto == AVAHI_PROTO_INET6);
|
||||
+ if (a->proto == AVAHI_PROTO_INET)
|
||||
+ r = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1;
|
||||
+ else
|
||||
+ r = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1;
|
||||
|
||||
- if (l->engine->fd_ipv6 < 0)
|
||||
- return -1;
|
||||
+ if (r < 0) {
|
||||
+ avahi_log_error(__FILE__ ": Failed to create socket for wide area lookup");
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
- return avahi_send_dns_packet_ipv6(l->engine->fd_ipv6, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv6, AVAHI_DNS_PORT);
|
||||
+ w = s->poll_api->watch_new(s->poll_api, r, AVAHI_WATCH_IN, socket_event, l);
|
||||
+ if (!w) {
|
||||
+ close(r);
|
||||
+ avahi_log_error(__FILE__ ": Failed to create socket watch for wide area lookup");
|
||||
+ return -1;
|
||||
}
|
||||
+
|
||||
+ l->fd = r;
|
||||
+ l->watch = w;
|
||||
+ l->proto = a->proto;
|
||||
+
|
||||
+ return a->proto == AVAHI_PROTO_INET ?
|
||||
+ avahi_send_dns_packet_ipv4(l->fd, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv4, AVAHI_DNS_PORT):
|
||||
+ avahi_send_dns_packet_ipv6(l->fd, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv6, AVAHI_DNS_PORT);
|
||||
}
|
||||
|
||||
static void next_dns_server(AvahiWideAreaLookupEngine *e) {
|
||||
@@ -246,6 +279,9 @@ AvahiWideAreaLookup *avahi_wide_area_lookup_new(
|
||||
l->dead = 0;
|
||||
l->key = avahi_key_ref(key);
|
||||
l->cname_key = avahi_key_new_cname(l->key);
|
||||
+ l->fd = -EBADF;
|
||||
+ l->watch = NULL;
|
||||
+ l->proto = AVAHI_PROTO_UNSPEC;
|
||||
l->callback = callback;
|
||||
l->userdata = userdata;
|
||||
|
||||
@@ -314,6 +350,12 @@ static void lookup_destroy(AvahiWideAreaLookup *l) {
|
||||
if (l->cname_key)
|
||||
avahi_key_unref(l->cname_key);
|
||||
|
||||
+ if (l->watch)
|
||||
+ l->engine->server->poll_api->watch_free(l->watch);
|
||||
+
|
||||
+ if (l->fd >= 0)
|
||||
+ close(l->fd);
|
||||
+
|
||||
avahi_free(l);
|
||||
}
|
||||
|
||||
@@ -572,14 +614,20 @@ static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) {
|
||||
}
|
||||
|
||||
static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata) {
|
||||
- AvahiWideAreaLookupEngine *e = userdata;
|
||||
+ AvahiWideAreaLookup *l = userdata;
|
||||
+ AvahiWideAreaLookupEngine *e = l->engine;
|
||||
AvahiDnsPacket *p = NULL;
|
||||
|
||||
- if (fd == e->fd_ipv4)
|
||||
- p = avahi_recv_dns_packet_ipv4(e->fd_ipv4, NULL, NULL, NULL, NULL, NULL);
|
||||
+ assert(l);
|
||||
+ assert(e);
|
||||
+ assert(l->fd == fd);
|
||||
+
|
||||
+ if (l->proto == AVAHI_PROTO_INET)
|
||||
+ p = avahi_recv_dns_packet_ipv4(l->fd, NULL, NULL, NULL, NULL, NULL);
|
||||
else {
|
||||
- assert(fd == e->fd_ipv6);
|
||||
- p = avahi_recv_dns_packet_ipv6(e->fd_ipv6, NULL, NULL, NULL, NULL, NULL);
|
||||
+ assert(l->proto == AVAHI_PROTO_INET6);
|
||||
+
|
||||
+ p = avahi_recv_dns_packet_ipv6(l->fd, NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
if (p) {
|
||||
@@ -598,32 +646,6 @@ AvahiWideAreaLookupEngine *avahi_wide_area_engine_new(AvahiServer *s) {
|
||||
e->server = s;
|
||||
e->cleanup_dead = 0;
|
||||
|
||||
- /* Create sockets */
|
||||
- e->fd_ipv4 = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1;
|
||||
- e->fd_ipv6 = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1;
|
||||
-
|
||||
- if (e->fd_ipv4 < 0 && e->fd_ipv6 < 0) {
|
||||
- avahi_log_error(__FILE__": Failed to create wide area sockets: %s", strerror(errno));
|
||||
-
|
||||
- if (e->fd_ipv6 >= 0)
|
||||
- close(e->fd_ipv6);
|
||||
-
|
||||
- if (e->fd_ipv4 >= 0)
|
||||
- close(e->fd_ipv4);
|
||||
-
|
||||
- avahi_free(e);
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
- /* Create watches */
|
||||
-
|
||||
- e->watch_ipv4 = e->watch_ipv6 = NULL;
|
||||
-
|
||||
- if (e->fd_ipv4 >= 0)
|
||||
- e->watch_ipv4 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv4, AVAHI_WATCH_IN, socket_event, e);
|
||||
- if (e->fd_ipv6 >= 0)
|
||||
- e->watch_ipv6 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv6, AVAHI_WATCH_IN, socket_event, e);
|
||||
-
|
||||
e->n_dns_servers = e->current_dns_server = 0;
|
||||
|
||||
/* Initialize cache */
|
||||
@@ -651,18 +673,6 @@ void avahi_wide_area_engine_free(AvahiWideAreaLookupEngine *e) {
|
||||
avahi_hashmap_free(e->lookups_by_id);
|
||||
avahi_hashmap_free(e->lookups_by_key);
|
||||
|
||||
- if (e->watch_ipv4)
|
||||
- e->server->poll_api->watch_free(e->watch_ipv4);
|
||||
-
|
||||
- if (e->watch_ipv6)
|
||||
- e->server->poll_api->watch_free(e->watch_ipv6);
|
||||
-
|
||||
- if (e->fd_ipv6 >= 0)
|
||||
- close(e->fd_ipv6);
|
||||
-
|
||||
- if (e->fd_ipv4 >= 0)
|
||||
- close(e->fd_ipv4);
|
||||
-
|
||||
avahi_free(e);
|
||||
}
|
||||
|
||||
@@ -680,7 +690,7 @@ void avahi_wide_area_set_servers(AvahiWideAreaLookupEngine *e, const AvahiAddres
|
||||
|
||||
if (a) {
|
||||
for (e->n_dns_servers = 0; n > 0 && e->n_dns_servers < AVAHI_WIDE_AREA_SERVERS_MAX; a++, n--)
|
||||
- if ((a->proto == AVAHI_PROTO_INET && e->fd_ipv4 >= 0) || (a->proto == AVAHI_PROTO_INET6 && e->fd_ipv6 >= 0))
|
||||
+ if (a->proto == AVAHI_PROTO_INET || a->proto == AVAHI_PROTO_INET6)
|
||||
e->dns_servers[e->n_dns_servers++] = *a;
|
||||
} else {
|
||||
assert(n == 0);
|
||||
@@ -6,6 +6,7 @@ After=time-sync.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
|
||||
ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -6,6 +6,7 @@ After=time-sync.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
|
||||
ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ After=time-sync.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
|
||||
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
|
||||
ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf
|
||||
|
||||
|
||||
@@ -4,20 +4,20 @@ export OPENSSL_ENGINES="$OECORE_NATIVE_SYSROOT/usr/lib/engines-3"
|
||||
|
||||
# Respect host env SSL_CERT_FILE/SSL_CERT_DIR first, then auto-detected host cert, then cert in buildtools
|
||||
# CAFILE/CAPATH is auto-deteced when source buildtools
|
||||
if [ -z "$SSL_CERT_FILE" ]; then
|
||||
if [ -n "$CAFILE" ];then
|
||||
export SSL_CERT_FILE="$CAFILE"
|
||||
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
|
||||
export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs/ca-certificates.crt"
|
||||
fi
|
||||
if [ -z "${SSL_CERT_FILE:-}" ]; then
|
||||
if [ -n "${CAFILE:-}" ];then
|
||||
export SSL_CERT_FILE="$CAFILE"
|
||||
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
|
||||
export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs/ca-certificates.crt"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$SSL_CERT_DIR" ]; then
|
||||
if [ -n "$CAPATH" ];then
|
||||
export SSL_CERT_DIR="$CAPATH"
|
||||
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
|
||||
export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs"
|
||||
fi
|
||||
if [ -z "${SSL_CERT_DIR:-}" ]; then
|
||||
if [ -n "${CAPATH:-}" ];then
|
||||
export SSL_CERT_DIR="$CAPATH"
|
||||
elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then
|
||||
export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/certs"
|
||||
fi
|
||||
fi
|
||||
|
||||
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} SSL_CERT_DIR SSL_CERT_FILE"
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From e70e34d857d4003199bcb5d3b52ca8102ccc1b98 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Mraz <tomas@openssl.org>
|
||||
Date: Mon, 5 Aug 2024 17:54:14 +0200
|
||||
Subject: [PATCH] dh_kmgmt.c: Avoid expensive public key validation for known
|
||||
safe-prime groups
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The partial validation is fully sufficient to check the key validity.
|
||||
|
||||
Thanks to Szilárd Pfeiffer for reporting the issue.
|
||||
|
||||
Reviewed-by: Neil Horman <nhorman@openssl.org>
|
||||
Reviewed-by: Matt Caswell <matt@openssl.org>
|
||||
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
|
||||
(Merged from https://github.com/openssl/openssl/pull/25088)
|
||||
|
||||
CVE: CVE-2024-41996
|
||||
Upstream-Status: Backport [https://github.com/openssl/openssl/commit/e70e34d857d4003199bcb5d3b52ca8102ccc1b98]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
providers/implementations/keymgmt/dh_kmgmt.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c
|
||||
index 82c3093b12..ebdce76710 100644
|
||||
--- a/providers/implementations/keymgmt/dh_kmgmt.c
|
||||
+++ b/providers/implementations/keymgmt/dh_kmgmt.c
|
||||
@@ -387,9 +387,11 @@ static int dh_validate_public(const DH *dh, int checktype)
|
||||
if (pub_key == NULL)
|
||||
return 0;
|
||||
|
||||
- /* The partial test is only valid for named group's with q = (p - 1) / 2 */
|
||||
- if (checktype == OSSL_KEYMGMT_VALIDATE_QUICK_CHECK
|
||||
- && ossl_dh_is_named_safe_prime_group(dh))
|
||||
+ /*
|
||||
+ * The partial test is only valid for named group's with q = (p - 1) / 2
|
||||
+ * but for that case it is also fully sufficient to check the key validity.
|
||||
+ */
|
||||
+ if (ossl_dh_is_named_safe_prime_group(dh))
|
||||
return ossl_dh_check_pub_key_partial(dh, pub_key, &res);
|
||||
|
||||
return DH_check_pub_key_ex(dh, pub_key);
|
||||
@@ -12,13 +12,14 @@ SRC_URI = "https://github.com/openssl/openssl/releases/download/openssl-${PV}/op
|
||||
file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
|
||||
file://0001-Configure-do-not-tweak-mips-cflags.patch \
|
||||
file://0001-Added-handshake-history-reporting-when-test-fails.patch \
|
||||
file://CVE-2024-41996.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-nativesdk = " \
|
||||
file://environment.d-openssl.sh \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716"
|
||||
SRC_URI[sha256sum] = "89681a9ddaa9ed7cf25ea8ef61338db805200bae47d00510490623547380c148"
|
||||
|
||||
inherit lib_package multilib_header multilib_script ptest perlnative manpages
|
||||
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
|
||||
@@ -0,0 +1,254 @@
|
||||
From 9d3f347a2b14652e767d51142600206a32676b62 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
Date: Mon, 24 Jan 2022 20:57:19 +0200
|
||||
Subject: [PATCH] DPP3: Add PKEX initiator retries and fallback from v2 to v1
|
||||
for hostapd
|
||||
|
||||
This extends hostapd with the design used in wpa_supplicant for PKEX
|
||||
initiator retries and automatic version fallback from v2 to v1 (the
|
||||
latter is enabled only with CONFIG_DPP3=y).
|
||||
|
||||
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
|
||||
CVE: CVE-2022-37660
|
||||
|
||||
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=9d3f347a2b14652e767d51142600206a32676b62]
|
||||
|
||||
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
|
||||
---
|
||||
src/ap/dpp_hostapd.c | 188 +++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 171 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
|
||||
index 13e1fc5..6c30ba3 100644
|
||||
--- a/src/ap/dpp_hostapd.c
|
||||
+++ b/src/ap/dpp_hostapd.c
|
||||
@@ -216,6 +216,163 @@ static void hostapd_dpp_auth_resp_retry(struct hostapd_data *hapd)
|
||||
}
|
||||
|
||||
|
||||
+static int hostapd_dpp_allow_ir(struct hostapd_data *hapd, unsigned int freq)
|
||||
+{
|
||||
+ int i, j;
|
||||
+
|
||||
+ if (!hapd->iface->hw_features)
|
||||
+ return -1;
|
||||
+
|
||||
+ for (i = 0; i < hapd->iface->num_hw_features; i++) {
|
||||
+ struct hostapd_hw_modes *mode = &hapd->iface->hw_features[i];
|
||||
+
|
||||
+ for (j = 0; j < mode->num_channels; j++) {
|
||||
+ struct hostapd_channel_data *chan = &mode->channels[j];
|
||||
+
|
||||
+ if (chan->freq != (int) freq)
|
||||
+ continue;
|
||||
+
|
||||
+ if (chan->flag & (HOSTAPD_CHAN_DISABLED |
|
||||
+ HOSTAPD_CHAN_NO_IR |
|
||||
+ HOSTAPD_CHAN_RADAR))
|
||||
+ continue;
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: Frequency %u MHz not supported or does not allow PKEX initiation in the current channel list",
|
||||
+ freq);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
|
||||
+ struct dpp_pkex *pkex)
|
||||
+{
|
||||
+ if (pkex->freq == 2437)
|
||||
+ pkex->freq = 5745;
|
||||
+ else if (pkex->freq == 5745)
|
||||
+ pkex->freq = 5220;
|
||||
+ else if (pkex->freq == 5220)
|
||||
+ pkex->freq = 60480;
|
||||
+ else
|
||||
+ return -1; /* no more channels to try */
|
||||
+
|
||||
+ if (hostapd_dpp_allow_ir(hapd, pkex->freq) == 1) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Try to initiate on %u MHz",
|
||||
+ pkex->freq);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Could not use this channel - try the next one */
|
||||
+ return hostapd_dpp_pkex_next_channel(hapd, pkex);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int hostapd_dpp_pkex_init(struct hostapd_data *hapd, bool v2)
|
||||
+{
|
||||
+ struct dpp_pkex *pkex;
|
||||
+ struct wpabuf *msg;
|
||||
+ unsigned int wait_time;
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
|
||||
+ dpp_pkex_free(hapd->dpp_pkex);
|
||||
+ hapd->dpp_pkex = dpp_pkex_init(hapd->msg_ctx, hapd->dpp_pkex_bi,
|
||||
+ hapd->own_addr,
|
||||
+ hapd->dpp_pkex_identifier,
|
||||
+ hapd->dpp_pkex_code, v2);
|
||||
+ pkex = hapd->dpp_pkex;
|
||||
+ if (!pkex)
|
||||
+ return -1;
|
||||
+
|
||||
+ msg = hapd->dpp_pkex->exchange_req;
|
||||
+ wait_time = 2000; /* TODO: hapd->max_remain_on_chan; */
|
||||
+ pkex->freq = 2437;
|
||||
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
|
||||
+ " freq=%u type=%d", MAC2STR(broadcast), pkex->freq,
|
||||
+ v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
|
||||
+ DPP_PA_PKEX_V1_EXCHANGE_REQ);
|
||||
+ hostapd_drv_send_action(hapd, pkex->freq, 0, broadcast,
|
||||
+ wpabuf_head(msg), wpabuf_len(msg));
|
||||
+ pkex->exch_req_wait_time = wait_time;
|
||||
+ pkex->exch_req_tries = 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void hostapd_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
+{
|
||||
+ struct hostapd_data *hapd = eloop_ctx;
|
||||
+ struct dpp_pkex *pkex = hapd->dpp_pkex;
|
||||
+
|
||||
+ if (!pkex || !pkex->exchange_req)
|
||||
+ return;
|
||||
+ if (pkex->exch_req_tries >= 5) {
|
||||
+ if (hostapd_dpp_pkex_next_channel(hapd, pkex) < 0) {
|
||||
+#ifdef CONFIG_DPP3
|
||||
+ if (pkex->v2) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: Fall back to PKEXv1");
|
||||
+ hostapd_dpp_pkex_init(hapd, false);
|
||||
+ return;
|
||||
+ }
|
||||
+#endif /* CONFIG_DPP3 */
|
||||
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_FAIL
|
||||
+ "No response from PKEX peer");
|
||||
+ dpp_pkex_free(pkex);
|
||||
+ hapd->dpp_pkex = NULL;
|
||||
+ return;
|
||||
+ }
|
||||
+ pkex->exch_req_tries = 0;
|
||||
+ }
|
||||
+
|
||||
+ pkex->exch_req_tries++;
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Retransmit PKEX Exchange Request (try %u)",
|
||||
+ pkex->exch_req_tries);
|
||||
+ wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
|
||||
+ " freq=%u type=%d",
|
||||
+ MAC2STR(broadcast), pkex->freq,
|
||||
+ pkex->v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
|
||||
+ DPP_PA_PKEX_V1_EXCHANGE_REQ);
|
||||
+ hostapd_drv_send_action(hapd, pkex->freq, pkex->exch_req_wait_time,
|
||||
+ broadcast,
|
||||
+ wpabuf_head(pkex->exchange_req),
|
||||
+ wpabuf_len(pkex->exchange_req));
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void hostapd_dpp_pkex_tx_status(struct hostapd_data *hapd, const u8 *dst,
|
||||
+ const u8 *data, size_t data_len, int ok)
|
||||
+{
|
||||
+ struct dpp_pkex *pkex = hapd->dpp_pkex;
|
||||
+
|
||||
+ if (pkex->failed) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: Terminate PKEX exchange due to an earlier error");
|
||||
+ if (pkex->t > pkex->own_bi->pkex_t)
|
||||
+ pkex->own_bi->pkex_t = pkex->t;
|
||||
+ dpp_pkex_free(pkex);
|
||||
+ hapd->dpp_pkex = NULL;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (pkex->exch_req_wait_time && pkex->exchange_req) {
|
||||
+ /* Wait for PKEX Exchange Response frame and retry request if
|
||||
+ * no response is seen. */
|
||||
+ eloop_cancel_timeout(hostapd_dpp_pkex_retry_timeout, hapd,
|
||||
+ NULL);
|
||||
+ eloop_register_timeout(pkex->exch_req_wait_time / 1000,
|
||||
+ (pkex->exch_req_wait_time % 1000) * 1000,
|
||||
+ hostapd_dpp_pkex_retry_timeout, hapd,
|
||||
+ NULL);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst,
|
||||
const u8 *data, size_t data_len, int ok)
|
||||
{
|
||||
@@ -227,6 +384,11 @@ void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst,
|
||||
" result=%s", MAC2STR(dst), ok ? "SUCCESS" : "FAILED");
|
||||
|
||||
if (!hapd->dpp_auth) {
|
||||
+ if (hapd->dpp_pkex) {
|
||||
+ hostapd_dpp_pkex_tx_status(hapd, dst, data, data_len,
|
||||
+ ok);
|
||||
+ return;
|
||||
+ }
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: Ignore TX status since there is no ongoing authentication exchange");
|
||||
return;
|
||||
@@ -1783,6 +1945,9 @@ hostapd_dpp_rx_pkex_exchange_resp(struct hostapd_data *hapd, const u8 *src,
|
||||
return;
|
||||
}
|
||||
|
||||
+ eloop_cancel_timeout(hostapd_dpp_pkex_retry_timeout, hapd, NULL);
|
||||
+ hapd->dpp_pkex->exch_req_wait_time = 0;
|
||||
+
|
||||
msg = dpp_pkex_rx_exchange_resp(hapd->dpp_pkex, src, buf, len);
|
||||
if (!msg) {
|
||||
wpa_printf(MSG_DEBUG, "DPP: Failed to process the response");
|
||||
@@ -2172,26 +2337,14 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
|
||||
return -1;
|
||||
|
||||
if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
|
||||
- struct wpabuf *msg;
|
||||
+#ifdef CONFIG_DPP3
|
||||
+ bool v2 = true;
|
||||
+#else /* CONFIG_DPP3 */
|
||||
bool v2 = os_strstr(cmd, " init=2") != NULL;
|
||||
+#endif /* CONFIG_DPP3 */
|
||||
|
||||
- wpa_printf(MSG_DEBUG, "DPP: Initiating PKEX");
|
||||
- dpp_pkex_free(hapd->dpp_pkex);
|
||||
- hapd->dpp_pkex = dpp_pkex_init(hapd->msg_ctx, own_bi,
|
||||
- hapd->own_addr,
|
||||
- hapd->dpp_pkex_identifier,
|
||||
- hapd->dpp_pkex_code, v2);
|
||||
- if (!hapd->dpp_pkex)
|
||||
+ if (hostapd_dpp_pkex_init(hapd, v2) < 0)
|
||||
return -1;
|
||||
-
|
||||
- msg = hapd->dpp_pkex->exchange_req;
|
||||
- /* TODO: Which channel to use? */
|
||||
- wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
|
||||
- " freq=%u type=%d", MAC2STR(broadcast), 2437,
|
||||
- v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
|
||||
- DPP_PA_PKEX_V1_EXCHANGE_REQ);
|
||||
- hostapd_drv_send_action(hapd, 2437, 0, broadcast,
|
||||
- wpabuf_head(msg), wpabuf_len(msg));
|
||||
}
|
||||
|
||||
/* TODO: Support multiple PKEX info entries */
|
||||
@@ -2319,6 +2472,7 @@ void hostapd_dpp_deinit(struct hostapd_data *hapd)
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
if (!hapd->dpp_init_done)
|
||||
return;
|
||||
+ eloop_cancel_timeout(hostapd_dpp_pkex_retry_timeout, hapd, NULL);
|
||||
eloop_cancel_timeout(hostapd_dpp_reply_wait_timeout, hapd, NULL);
|
||||
eloop_cancel_timeout(hostapd_dpp_auth_conf_wait_timeout, hapd, NULL);
|
||||
eloop_cancel_timeout(hostapd_dpp_init_timeout, hapd, NULL);
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
From 80213629981a21825e4688fde1b590e4c4d4bcea Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
Date: Mon, 24 Jan 2022 20:21:24 +0200
|
||||
Subject: [PATCH] DPP3: Start with PKEXv2 and fall back to v1
|
||||
|
||||
Use automatic PKEX version negotiation as the initiator by starting with
|
||||
PKEXv2 and if no response is received, trying again with PKEXv1. For
|
||||
now, this is enabled only in wpa_supplicant CONFIG_DPP3=y builds.
|
||||
|
||||
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
|
||||
CVE: CVE-2022-37660
|
||||
|
||||
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=80213629981a21825e4688fde1b590e4c4d4bcea]
|
||||
|
||||
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
|
||||
---
|
||||
wpa_supplicant/dpp_supplicant.c | 81 +++++++++++++++++++++------------
|
||||
1 file changed, 52 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
|
||||
index 584654a..43c85d3 100644
|
||||
--- a/wpa_supplicant/dpp_supplicant.c
|
||||
+++ b/wpa_supplicant/dpp_supplicant.c
|
||||
@@ -2557,6 +2557,45 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
|
||||
}
|
||||
|
||||
|
||||
+static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s, bool v2)
|
||||
+{
|
||||
+ struct dpp_pkex *pkex;
|
||||
+ struct wpabuf *msg;
|
||||
+ unsigned int wait_time;
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
|
||||
+ dpp_pkex_free(wpa_s->dpp_pkex);
|
||||
+ wpa_s->dpp_pkex = dpp_pkex_init(wpa_s, wpa_s->dpp_pkex_bi,
|
||||
+ wpa_s->own_addr,
|
||||
+ wpa_s->dpp_pkex_identifier,
|
||||
+ wpa_s->dpp_pkex_code, v2);
|
||||
+ pkex = wpa_s->dpp_pkex;
|
||||
+ if (!pkex)
|
||||
+ return -1;
|
||||
+
|
||||
+ msg = pkex->exchange_req;
|
||||
+ wait_time = wpa_s->max_remain_on_chan;
|
||||
+ if (wait_time > 2000)
|
||||
+ wait_time = 2000;
|
||||
+ pkex->freq = 2437;
|
||||
+ wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
|
||||
+ " freq=%u type=%d",
|
||||
+ MAC2STR(broadcast), pkex->freq,
|
||||
+ v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
|
||||
+ DPP_PA_PKEX_V1_EXCHANGE_REQ);
|
||||
+ offchannel_send_action(wpa_s, pkex->freq, broadcast,
|
||||
+ wpa_s->own_addr, broadcast,
|
||||
+ wpabuf_head(msg), wpabuf_len(msg),
|
||||
+ wait_time, wpas_dpp_tx_pkex_status, 0);
|
||||
+ if (wait_time == 0)
|
||||
+ wait_time = 2000;
|
||||
+ pkex->exch_req_wait_time = wait_time;
|
||||
+ pkex->exch_req_tries = 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = eloop_ctx;
|
||||
@@ -2566,6 +2605,14 @@ static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
return;
|
||||
if (pkex->exch_req_tries >= 5) {
|
||||
if (wpas_dpp_pkex_next_channel(wpa_s, pkex) < 0) {
|
||||
+#ifdef CONFIG_DPP3
|
||||
+ if (pkex->v2) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: Fall back to PKEXv1");
|
||||
+ wpas_dpp_pkex_init(wpa_s, false);
|
||||
+ return;
|
||||
+ }
|
||||
+#endif /* CONFIG_DPP3 */
|
||||
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_FAIL
|
||||
"No response from PKEX peer");
|
||||
dpp_pkex_free(pkex);
|
||||
@@ -3271,7 +3318,6 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
|
||||
{
|
||||
struct dpp_bootstrap_info *own_bi;
|
||||
const char *pos, *end;
|
||||
- unsigned int wait_time;
|
||||
|
||||
pos = os_strstr(cmd, " own=");
|
||||
if (!pos)
|
||||
@@ -3315,37 +3361,14 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
|
||||
return -1;
|
||||
|
||||
if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
|
||||
- struct dpp_pkex *pkex;
|
||||
- struct wpabuf *msg;
|
||||
+#ifdef CONFIG_DPP3
|
||||
+ bool v2 = true;
|
||||
+#else /* CONFIG_DPP3 */
|
||||
bool v2 = os_strstr(cmd, " init=2") != NULL;
|
||||
+#endif /* CONFIG_DPP3 */
|
||||
|
||||
- wpa_printf(MSG_DEBUG, "DPP: Initiating PKEX");
|
||||
- dpp_pkex_free(wpa_s->dpp_pkex);
|
||||
- wpa_s->dpp_pkex = dpp_pkex_init(wpa_s, own_bi, wpa_s->own_addr,
|
||||
- wpa_s->dpp_pkex_identifier,
|
||||
- wpa_s->dpp_pkex_code, v2);
|
||||
- pkex = wpa_s->dpp_pkex;
|
||||
- if (!pkex)
|
||||
+ if (wpas_dpp_pkex_init(wpa_s, v2) < 0)
|
||||
return -1;
|
||||
-
|
||||
- msg = pkex->exchange_req;
|
||||
- wait_time = wpa_s->max_remain_on_chan;
|
||||
- if (wait_time > 2000)
|
||||
- wait_time = 2000;
|
||||
- pkex->freq = 2437;
|
||||
- wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR
|
||||
- " freq=%u type=%d",
|
||||
- MAC2STR(broadcast), pkex->freq,
|
||||
- v2 ? DPP_PA_PKEX_EXCHANGE_REQ :
|
||||
- DPP_PA_PKEX_V1_EXCHANGE_REQ);
|
||||
- offchannel_send_action(wpa_s, pkex->freq, broadcast,
|
||||
- wpa_s->own_addr, broadcast,
|
||||
- wpabuf_head(msg), wpabuf_len(msg),
|
||||
- wait_time, wpas_dpp_tx_pkex_status, 0);
|
||||
- if (wait_time == 0)
|
||||
- wait_time = 2000;
|
||||
- pkex->exch_req_wait_time = wait_time;
|
||||
- pkex->exch_req_tries = 1;
|
||||
}
|
||||
|
||||
/* TODO: Support multiple PKEX info entries */
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
From bdcccbc2755dd1a75731496782e02b5435fb9534 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
Date: Tue, 25 Jan 2022 20:06:49 +0200
|
||||
Subject: [PATCH] DPP: Change PKEX version configuration design
|
||||
|
||||
Use a separate ver=<1|2> parameter to DPP_PKEX_ADD instead of
|
||||
overloading init=1 with version indication. This allows additional
|
||||
options for forcing v1-only and v2-only in addition to automatic mode
|
||||
(start with v2 and fall back to v1, if needed).
|
||||
|
||||
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
|
||||
CVE: CVE-2022-37660
|
||||
|
||||
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=bdcccbc2755dd1a75731496782e02b5435fb9534]
|
||||
|
||||
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
|
||||
---
|
||||
src/ap/dpp_hostapd.c | 37 ++++++++++++++++++++++++++-------
|
||||
src/common/dpp.h | 1 +
|
||||
wpa_supplicant/dpp_supplicant.c | 37 ++++++++++++++++++++++++++-------
|
||||
3 files changed, 61 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
|
||||
index 6c30ba3..fdfdcf9 100644
|
||||
--- a/src/ap/dpp_hostapd.c
|
||||
+++ b/src/ap/dpp_hostapd.c
|
||||
@@ -272,11 +272,19 @@ static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
|
||||
}
|
||||
|
||||
|
||||
-static int hostapd_dpp_pkex_init(struct hostapd_data *hapd, bool v2)
|
||||
+enum hostapd_dpp_pkex_ver {
|
||||
+ PKEX_VER_AUTO,
|
||||
+ PKEX_VER_ONLY_1,
|
||||
+ PKEX_VER_ONLY_2,
|
||||
+};
|
||||
+
|
||||
+static int hostapd_dpp_pkex_init(struct hostapd_data *hapd,
|
||||
+ enum hostapd_dpp_pkex_ver ver)
|
||||
{
|
||||
struct dpp_pkex *pkex;
|
||||
struct wpabuf *msg;
|
||||
unsigned int wait_time;
|
||||
+ bool v2 = ver != PKEX_VER_ONLY_1;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
|
||||
dpp_pkex_free(hapd->dpp_pkex);
|
||||
@@ -287,6 +295,7 @@ static int hostapd_dpp_pkex_init(struct hostapd_data *hapd, bool v2)
|
||||
pkex = hapd->dpp_pkex;
|
||||
if (!pkex)
|
||||
return -1;
|
||||
+ pkex->forced_ver = ver != PKEX_VER_AUTO;
|
||||
|
||||
msg = hapd->dpp_pkex->exchange_req;
|
||||
wait_time = 2000; /* TODO: hapd->max_remain_on_chan; */
|
||||
@@ -314,10 +323,10 @@ static void hostapd_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
if (pkex->exch_req_tries >= 5) {
|
||||
if (hostapd_dpp_pkex_next_channel(hapd, pkex) < 0) {
|
||||
#ifdef CONFIG_DPP3
|
||||
- if (pkex->v2) {
|
||||
+ if (pkex->v2 && !pkex->forced_ver) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: Fall back to PKEXv1");
|
||||
- hostapd_dpp_pkex_init(hapd, false);
|
||||
+ hostapd_dpp_pkex_init(hapd, PKEX_VER_ONLY_1);
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_DPP3 */
|
||||
@@ -2336,14 +2345,28 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
|
||||
if (!hapd->dpp_pkex_code)
|
||||
return -1;
|
||||
|
||||
- if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
|
||||
+ if (os_strstr(cmd, " init=1")) {
|
||||
#ifdef CONFIG_DPP3
|
||||
- bool v2 = true;
|
||||
+ enum hostapd_dpp_pkex_ver ver = PKEX_VER_AUTO;
|
||||
#else /* CONFIG_DPP3 */
|
||||
- bool v2 = os_strstr(cmd, " init=2") != NULL;
|
||||
+ enum hostapd_dpp_pkex_ver ver = PKEX_VER_ONLY_1;
|
||||
#endif /* CONFIG_DPP3 */
|
||||
|
||||
- if (hostapd_dpp_pkex_init(hapd, v2) < 0)
|
||||
+ pos = os_strstr(cmd, " ver=");
|
||||
+ if (pos) {
|
||||
+ int v;
|
||||
+
|
||||
+ pos += 5;
|
||||
+ v = atoi(pos);
|
||||
+ if (v == 1)
|
||||
+ ver = PKEX_VER_ONLY_1;
|
||||
+ else if (v == 2)
|
||||
+ ver = PKEX_VER_ONLY_2;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (hostapd_dpp_pkex_init(hapd, ver) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
diff --git a/src/common/dpp.h b/src/common/dpp.h
|
||||
index 8d62a0e..bfea446 100644
|
||||
--- a/src/common/dpp.h
|
||||
+++ b/src/common/dpp.h
|
||||
@@ -177,6 +177,7 @@ struct dpp_pkex {
|
||||
unsigned int exchange_done:1;
|
||||
unsigned int failed:1;
|
||||
unsigned int v2:1;
|
||||
+ unsigned int forced_ver:1;
|
||||
struct dpp_bootstrap_info *own_bi;
|
||||
u8 own_mac[ETH_ALEN];
|
||||
u8 peer_mac[ETH_ALEN];
|
||||
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
|
||||
index 43c85d3..61b300f 100644
|
||||
--- a/wpa_supplicant/dpp_supplicant.c
|
||||
+++ b/wpa_supplicant/dpp_supplicant.c
|
||||
@@ -2557,11 +2557,19 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
|
||||
}
|
||||
|
||||
|
||||
-static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s, bool v2)
|
||||
+enum wpas_dpp_pkex_ver {
|
||||
+ PKEX_VER_AUTO,
|
||||
+ PKEX_VER_ONLY_1,
|
||||
+ PKEX_VER_ONLY_2,
|
||||
+};
|
||||
+
|
||||
+static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s,
|
||||
+ enum wpas_dpp_pkex_ver ver)
|
||||
{
|
||||
struct dpp_pkex *pkex;
|
||||
struct wpabuf *msg;
|
||||
unsigned int wait_time;
|
||||
+ bool v2 = ver != PKEX_VER_ONLY_1;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
|
||||
dpp_pkex_free(wpa_s->dpp_pkex);
|
||||
@@ -2572,6 +2580,7 @@ static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s, bool v2)
|
||||
pkex = wpa_s->dpp_pkex;
|
||||
if (!pkex)
|
||||
return -1;
|
||||
+ pkex->forced_ver = ver != PKEX_VER_AUTO;
|
||||
|
||||
msg = pkex->exchange_req;
|
||||
wait_time = wpa_s->max_remain_on_chan;
|
||||
@@ -2606,10 +2615,10 @@ static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
if (pkex->exch_req_tries >= 5) {
|
||||
if (wpas_dpp_pkex_next_channel(wpa_s, pkex) < 0) {
|
||||
#ifdef CONFIG_DPP3
|
||||
- if (pkex->v2) {
|
||||
+ if (pkex->v2 && !pkex->forced_ver) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: Fall back to PKEXv1");
|
||||
- wpas_dpp_pkex_init(wpa_s, false);
|
||||
+ wpas_dpp_pkex_init(wpa_s, PKEX_VER_ONLY_1);
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_DPP3 */
|
||||
@@ -3360,14 +3369,28 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
|
||||
if (!wpa_s->dpp_pkex_code)
|
||||
return -1;
|
||||
|
||||
- if (os_strstr(cmd, " init=1") || os_strstr(cmd, " init=2")) {
|
||||
+ if (os_strstr(cmd, " init=1")) {
|
||||
#ifdef CONFIG_DPP3
|
||||
- bool v2 = true;
|
||||
+ enum wpas_dpp_pkex_ver ver = PKEX_VER_AUTO;
|
||||
#else /* CONFIG_DPP3 */
|
||||
- bool v2 = os_strstr(cmd, " init=2") != NULL;
|
||||
+ enum wpas_dpp_pkex_ver ver = PKEX_VER_ONLY_1;
|
||||
#endif /* CONFIG_DPP3 */
|
||||
|
||||
- if (wpas_dpp_pkex_init(wpa_s, v2) < 0)
|
||||
+ pos = os_strstr(cmd, " ver=");
|
||||
+ if (pos) {
|
||||
+ int v;
|
||||
+
|
||||
+ pos += 5;
|
||||
+ v = atoi(pos);
|
||||
+ if (v == 1)
|
||||
+ ver = PKEX_VER_ONLY_1;
|
||||
+ else if (v == 2)
|
||||
+ ver = PKEX_VER_ONLY_2;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (wpas_dpp_pkex_init(wpa_s, ver) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -0,0 +1,941 @@
|
||||
From d7be749335f2585658cf98c4f0e7d6cd5ac06865 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <jouni@qca.qualcomm.com>
|
||||
Date: Tue, 25 Jan 2022 00:35:36 +0200
|
||||
Subject: [PATCH] DPP3: PKEX over TCP
|
||||
|
||||
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
|
||||
|
||||
CVE: CVE-2022-37660
|
||||
|
||||
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=d7be749335f2585658cf98c4f0e7d6cd5ac06865]
|
||||
|
||||
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
|
||||
---
|
||||
src/ap/dpp_hostapd.c | 155 ++++++++++++++--
|
||||
src/common/dpp.h | 13 ++
|
||||
src/common/dpp_pkex.c | 18 +-
|
||||
src/common/dpp_tcp.c | 308 +++++++++++++++++++++++++++++++-
|
||||
wpa_supplicant/dpp_supplicant.c | 122 ++++++++++++-
|
||||
5 files changed, 580 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
|
||||
index fdfdcf9..d956be9 100644
|
||||
--- a/src/ap/dpp_hostapd.c
|
||||
+++ b/src/ap/dpp_hostapd.c
|
||||
@@ -28,12 +28,16 @@ static void hostapd_dpp_auth_conf_wait_timeout(void *eloop_ctx,
|
||||
static void hostapd_dpp_auth_success(struct hostapd_data *hapd, int initiator);
|
||||
static void hostapd_dpp_init_timeout(void *eloop_ctx, void *timeout_ctx);
|
||||
static int hostapd_dpp_auth_init_next(struct hostapd_data *hapd);
|
||||
+static void hostapd_dpp_set_testing_options(struct hostapd_data *hapd,
|
||||
+ struct dpp_authentication *auth);
|
||||
#ifdef CONFIG_DPP2
|
||||
static void hostapd_dpp_reconfig_reply_wait_timeout(void *eloop_ctx,
|
||||
void *timeout_ctx);
|
||||
static void hostapd_dpp_handle_config_obj(struct hostapd_data *hapd,
|
||||
struct dpp_authentication *auth,
|
||||
struct dpp_config_obj *conf);
|
||||
+static int hostapd_dpp_process_conf_obj(void *ctx,
|
||||
+ struct dpp_authentication *auth);
|
||||
#endif /* CONFIG_DPP2 */
|
||||
|
||||
static const u8 broadcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
@@ -272,6 +276,75 @@ static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
|
||||
}
|
||||
|
||||
|
||||
+#ifdef CONFIG_DPP2
|
||||
+static int hostapd_dpp_pkex_done(void *ctx, void *conn,
|
||||
+ struct dpp_bootstrap_info *peer_bi)
|
||||
+{
|
||||
+ struct hostapd_data *hapd = ctx;
|
||||
+ const char *cmd = hapd->dpp_pkex_auth_cmd;
|
||||
+ const char *pos;
|
||||
+ u8 allowed_roles = DPP_CAPAB_CONFIGURATOR;
|
||||
+ struct dpp_bootstrap_info *own_bi = NULL;
|
||||
+ struct dpp_authentication *auth;
|
||||
+
|
||||
+ if (!cmd)
|
||||
+ cmd = "";
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
|
||||
+ cmd);
|
||||
+
|
||||
+ pos = os_strstr(cmd, " own=");
|
||||
+ if (pos) {
|
||||
+ pos += 5;
|
||||
+ own_bi = dpp_bootstrap_get_id(hapd->iface->interfaces->dpp,
|
||||
+ atoi(pos));
|
||||
+ if (!own_bi) {
|
||||
+ wpa_printf(MSG_INFO,
|
||||
+ "DPP: Could not find bootstrapping info for the identified local entry");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (peer_bi->curve != own_bi->curve) {
|
||||
+ wpa_printf(MSG_INFO,
|
||||
+ "DPP: Mismatching curves in bootstrapping info (peer=%s own=%s)",
|
||||
+ peer_bi->curve->name, own_bi->curve->name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pos = os_strstr(cmd, " role=");
|
||||
+ if (pos) {
|
||||
+ pos += 6;
|
||||
+ if (os_strncmp(pos, "configurator", 12) == 0)
|
||||
+ allowed_roles = DPP_CAPAB_CONFIGURATOR;
|
||||
+ else if (os_strncmp(pos, "enrollee", 8) == 0)
|
||||
+ allowed_roles = DPP_CAPAB_ENROLLEE;
|
||||
+ else if (os_strncmp(pos, "either", 6) == 0)
|
||||
+ allowed_roles = DPP_CAPAB_CONFIGURATOR |
|
||||
+ DPP_CAPAB_ENROLLEE;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ auth = dpp_auth_init(hapd->iface->interfaces->dpp, hapd->msg_ctx,
|
||||
+ peer_bi, own_bi, allowed_roles, 0,
|
||||
+ hapd->iface->hw_features,
|
||||
+ hapd->iface->num_hw_features);
|
||||
+ if (!auth)
|
||||
+ return -1;
|
||||
+
|
||||
+ hostapd_dpp_set_testing_options(hapd, auth);
|
||||
+ if (dpp_set_configurator(auth, cmd) < 0) {
|
||||
+ dpp_auth_deinit(auth);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return dpp_tcp_auth(hapd->iface->interfaces->dpp, conn, auth,
|
||||
+ hapd->conf->dpp_name, DPP_NETROLE_AP,
|
||||
+ hostapd_dpp_process_conf_obj);
|
||||
+}
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
+
|
||||
+
|
||||
enum hostapd_dpp_pkex_ver {
|
||||
PKEX_VER_AUTO,
|
||||
PKEX_VER_ONLY_1,
|
||||
@@ -279,7 +352,9 @@ enum hostapd_dpp_pkex_ver {
|
||||
};
|
||||
|
||||
static int hostapd_dpp_pkex_init(struct hostapd_data *hapd,
|
||||
- enum hostapd_dpp_pkex_ver ver)
|
||||
+ enum hostapd_dpp_pkex_ver ver,
|
||||
+ const struct hostapd_ip_addr *ipaddr,
|
||||
+ int tcp_port)
|
||||
{
|
||||
struct dpp_pkex *pkex;
|
||||
struct wpabuf *msg;
|
||||
@@ -288,15 +363,26 @@ static int hostapd_dpp_pkex_init(struct hostapd_data *hapd,
|
||||
|
||||
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
|
||||
dpp_pkex_free(hapd->dpp_pkex);
|
||||
- hapd->dpp_pkex = dpp_pkex_init(hapd->msg_ctx, hapd->dpp_pkex_bi,
|
||||
- hapd->own_addr,
|
||||
- hapd->dpp_pkex_identifier,
|
||||
- hapd->dpp_pkex_code, v2);
|
||||
- pkex = hapd->dpp_pkex;
|
||||
+ hapd->dpp_pkex = NULL;
|
||||
+ pkex = dpp_pkex_init(hapd->msg_ctx, hapd->dpp_pkex_bi, hapd->own_addr,
|
||||
+ hapd->dpp_pkex_identifier,
|
||||
+ hapd->dpp_pkex_code, v2);
|
||||
if (!pkex)
|
||||
return -1;
|
||||
pkex->forced_ver = ver != PKEX_VER_AUTO;
|
||||
|
||||
+ if (ipaddr) {
|
||||
+#ifdef CONFIG_DPP2
|
||||
+ return dpp_tcp_pkex_init(hapd->iface->interfaces->dpp, pkex,
|
||||
+ ipaddr, tcp_port,
|
||||
+ hapd->msg_ctx, hapd,
|
||||
+ hostapd_dpp_pkex_done);
|
||||
+#else /* CONFIG_DPP2 */
|
||||
+ return -1;
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
+ }
|
||||
+
|
||||
+ hapd->dpp_pkex = pkex;
|
||||
msg = hapd->dpp_pkex->exchange_req;
|
||||
wait_time = 2000; /* TODO: hapd->max_remain_on_chan; */
|
||||
pkex->freq = 2437;
|
||||
@@ -326,7 +412,8 @@ static void hostapd_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
if (pkex->v2 && !pkex->forced_ver) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: Fall back to PKEXv1");
|
||||
- hostapd_dpp_pkex_init(hapd, PKEX_VER_ONLY_1);
|
||||
+ hostapd_dpp_pkex_init(hapd, PKEX_VER_ONLY_1,
|
||||
+ NULL, 0);
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_DPP3 */
|
||||
@@ -1883,7 +1970,7 @@ static void hostapd_dpp_rx_peer_disc_req(struct hostapd_data *hapd,
|
||||
|
||||
static void
|
||||
hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
|
||||
- const u8 *buf, size_t len,
|
||||
+ const u8 *hdr, const u8 *buf, size_t len,
|
||||
unsigned int freq, bool v2)
|
||||
{
|
||||
struct wpabuf *msg;
|
||||
@@ -1897,14 +1984,14 @@ hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
|
||||
if (!hapd->dpp_pkex_code || !hapd->dpp_pkex_bi) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: No PKEX code configured - ignore request");
|
||||
- return;
|
||||
+ goto try_relay;
|
||||
}
|
||||
|
||||
if (hapd->dpp_pkex) {
|
||||
/* TODO: Support parallel operations */
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: Already in PKEX session - ignore new request");
|
||||
- return;
|
||||
+ goto try_relay;
|
||||
}
|
||||
|
||||
hapd->dpp_pkex = dpp_pkex_rx_exchange_req(hapd->msg_ctx,
|
||||
@@ -1916,7 +2003,7 @@ hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
|
||||
if (!hapd->dpp_pkex) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: Failed to process the request - ignore it");
|
||||
- return;
|
||||
+ goto try_relay;
|
||||
}
|
||||
|
||||
msg = hapd->dpp_pkex->exchange_resp;
|
||||
@@ -1933,6 +2020,17 @@ hostapd_dpp_rx_pkex_exchange_req(struct hostapd_data *hapd, const u8 *src,
|
||||
dpp_pkex_free(hapd->dpp_pkex);
|
||||
hapd->dpp_pkex = NULL;
|
||||
}
|
||||
+
|
||||
+ return;
|
||||
+
|
||||
+try_relay:
|
||||
+#ifdef CONFIG_DPP2
|
||||
+ if (v2)
|
||||
+ dpp_relay_rx_action(hapd->iface->interfaces->dpp,
|
||||
+ src, hdr, buf, len, freq, NULL, NULL, hapd);
|
||||
+#else /* CONFIG_DPP2 */
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: No relay functionality included - skip");
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
}
|
||||
|
||||
|
||||
@@ -2132,12 +2230,12 @@ void hostapd_dpp_rx_action(struct hostapd_data *hapd, const u8 *src,
|
||||
/* This is for PKEXv2, but for now, process only with
|
||||
* CONFIG_DPP3 to avoid issues with a capability that has not
|
||||
* been tested with other implementations. */
|
||||
- hostapd_dpp_rx_pkex_exchange_req(hapd, src, buf, len, freq,
|
||||
+ hostapd_dpp_rx_pkex_exchange_req(hapd, src, hdr, buf, len, freq,
|
||||
true);
|
||||
break;
|
||||
#endif /* CONFIG_DPP3 */
|
||||
case DPP_PA_PKEX_V1_EXCHANGE_REQ:
|
||||
- hostapd_dpp_rx_pkex_exchange_req(hapd, src, buf, len, freq,
|
||||
+ hostapd_dpp_rx_pkex_exchange_req(hapd, src, hdr, buf, len, freq,
|
||||
false);
|
||||
break;
|
||||
case DPP_PA_PKEX_EXCHANGE_RESP:
|
||||
@@ -2303,6 +2401,29 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
|
||||
{
|
||||
struct dpp_bootstrap_info *own_bi;
|
||||
const char *pos, *end;
|
||||
+ int tcp_port = DPP_TCP_PORT;
|
||||
+ struct hostapd_ip_addr *ipaddr = NULL;
|
||||
+#ifdef CONFIG_DPP2
|
||||
+ struct hostapd_ip_addr ipaddr_buf;
|
||||
+ char *addr;
|
||||
+
|
||||
+ pos = os_strstr(cmd, " tcp_port=");
|
||||
+ if (pos) {
|
||||
+ pos += 10;
|
||||
+ tcp_port = atoi(pos);
|
||||
+ }
|
||||
+
|
||||
+ addr = get_param(cmd, " tcp_addr=");
|
||||
+ if (addr) {
|
||||
+ int res;
|
||||
+
|
||||
+ res = hostapd_parse_ip_addr(addr, &ipaddr_buf);
|
||||
+ os_free(addr);
|
||||
+ if (res)
|
||||
+ return -1;
|
||||
+ ipaddr = &ipaddr_buf;
|
||||
+ }
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
|
||||
pos = os_strstr(cmd, " own=");
|
||||
if (!pos)
|
||||
@@ -2366,8 +2487,14 @@ int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (hostapd_dpp_pkex_init(hapd, ver) < 0)
|
||||
+ if (hostapd_dpp_pkex_init(hapd, ver, ipaddr, tcp_port) < 0)
|
||||
return -1;
|
||||
+ } else {
|
||||
+#ifdef CONFIG_DPP2
|
||||
+ dpp_controller_pkex_add(hapd->iface->interfaces->dpp, own_bi,
|
||||
+ hapd->dpp_pkex_code,
|
||||
+ hapd->dpp_pkex_identifier);
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
}
|
||||
|
||||
/* TODO: Support multiple PKEX info entries */
|
||||
diff --git a/src/common/dpp.h b/src/common/dpp.h
|
||||
index bfea446..ca33fe3 100644
|
||||
--- a/src/common/dpp.h
|
||||
+++ b/src/common/dpp.h
|
||||
@@ -550,6 +550,9 @@ int dpp_auth_conf_rx(struct dpp_authentication *auth, const u8 *hdr,
|
||||
const u8 *attr_start, size_t attr_len);
|
||||
int dpp_notify_new_qr_code(struct dpp_authentication *auth,
|
||||
struct dpp_bootstrap_info *peer_bi);
|
||||
+void dpp_controller_pkex_add(struct dpp_global *dpp,
|
||||
+ struct dpp_bootstrap_info *bi,
|
||||
+ const char *code, const char *identifier);
|
||||
struct dpp_configuration * dpp_configuration_alloc(const char *type);
|
||||
int dpp_akm_psk(enum dpp_akm akm);
|
||||
int dpp_akm_sae(enum dpp_akm akm);
|
||||
@@ -688,12 +691,22 @@ struct dpp_authentication * dpp_controller_get_auth(struct dpp_global *dpp,
|
||||
unsigned int id);
|
||||
void dpp_controller_new_qr_code(struct dpp_global *dpp,
|
||||
struct dpp_bootstrap_info *bi);
|
||||
+int dpp_tcp_pkex_init(struct dpp_global *dpp, struct dpp_pkex *pkex,
|
||||
+ const struct hostapd_ip_addr *addr, int port,
|
||||
+ void *msg_ctx, void *cb_ctx,
|
||||
+ int (*pkex_done)(void *ctx, void *conn,
|
||||
+ struct dpp_bootstrap_info *bi));
|
||||
int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
|
||||
const struct hostapd_ip_addr *addr, int port,
|
||||
const char *name, enum dpp_netrole netrole, void *msg_ctx,
|
||||
void *cb_ctx,
|
||||
int (*process_conf_obj)(void *ctx,
|
||||
struct dpp_authentication *auth));
|
||||
+int dpp_tcp_auth(struct dpp_global *dpp, void *_conn,
|
||||
+ struct dpp_authentication *auth, const char *name,
|
||||
+ enum dpp_netrole netrole,
|
||||
+ int (*process_conf_obj)(void *ctx,
|
||||
+ struct dpp_authentication *auth));
|
||||
|
||||
struct wpabuf * dpp_build_presence_announcement(struct dpp_bootstrap_info *bi);
|
||||
void dpp_notify_chirp_received(void *msg_ctx, int id, const u8 *src,
|
||||
diff --git a/src/common/dpp_pkex.c b/src/common/dpp_pkex.c
|
||||
index 38349fa..72084d9 100644
|
||||
--- a/src/common/dpp_pkex.c
|
||||
+++ b/src/common/dpp_pkex.c
|
||||
@@ -469,8 +469,10 @@ struct dpp_pkex * dpp_pkex_rx_exchange_req(void *msg_ctx,
|
||||
pkex->t = bi->pkex_t;
|
||||
pkex->msg_ctx = msg_ctx;
|
||||
pkex->own_bi = bi;
|
||||
- os_memcpy(pkex->own_mac, own_mac, ETH_ALEN);
|
||||
- os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
|
||||
+ if (own_mac)
|
||||
+ os_memcpy(pkex->own_mac, own_mac, ETH_ALEN);
|
||||
+ if (peer_mac)
|
||||
+ os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
|
||||
if (identifier) {
|
||||
pkex->identifier = os_strdup(identifier);
|
||||
if (!pkex->identifier)
|
||||
@@ -742,7 +744,8 @@ struct wpabuf * dpp_pkex_rx_exchange_resp(struct dpp_pkex *pkex,
|
||||
}
|
||||
#endif /* CONFIG_DPP2 */
|
||||
|
||||
- os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
|
||||
+ if (peer_mac)
|
||||
+ os_memcpy(pkex->peer_mac, peer_mac, ETH_ALEN);
|
||||
|
||||
attr_status = dpp_get_attr(buf, buflen, DPP_ATTR_STATUS,
|
||||
&attr_status_len);
|
||||
@@ -1341,9 +1344,12 @@ dpp_pkex_finish(struct dpp_global *dpp, struct dpp_pkex *pkex, const u8 *peer,
|
||||
return NULL;
|
||||
bi->id = dpp_next_id(dpp);
|
||||
bi->type = DPP_BOOTSTRAP_PKEX;
|
||||
- os_memcpy(bi->mac_addr, peer, ETH_ALEN);
|
||||
- bi->num_freq = 1;
|
||||
- bi->freq[0] = freq;
|
||||
+ if (peer)
|
||||
+ os_memcpy(bi->mac_addr, peer, ETH_ALEN);
|
||||
+ if (freq) {
|
||||
+ bi->num_freq = 1;
|
||||
+ bi->freq[0] = freq;
|
||||
+ }
|
||||
bi->curve = pkex->own_bi->curve;
|
||||
bi->pubkey = pkex->peer_bootstrap_key;
|
||||
pkex->peer_bootstrap_key = NULL;
|
||||
diff --git a/src/common/dpp_tcp.c b/src/common/dpp_tcp.c
|
||||
index fb8ef1c..1a8a7c7 100644
|
||||
--- a/src/common/dpp_tcp.c
|
||||
+++ b/src/common/dpp_tcp.c
|
||||
@@ -24,10 +24,12 @@ struct dpp_connection {
|
||||
struct dpp_controller *ctrl;
|
||||
struct dpp_relay_controller *relay;
|
||||
struct dpp_global *global;
|
||||
+ struct dpp_pkex *pkex;
|
||||
struct dpp_authentication *auth;
|
||||
void *msg_ctx;
|
||||
void *cb_ctx;
|
||||
int (*process_conf_obj)(void *ctx, struct dpp_authentication *auth);
|
||||
+ int (*pkex_done)(void *ctx, void *conn, struct dpp_bootstrap_info *bi);
|
||||
int sock;
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
unsigned int freq;
|
||||
@@ -71,6 +73,9 @@ struct dpp_controller {
|
||||
struct dl_list conn; /* struct dpp_connection */
|
||||
char *configurator_params;
|
||||
enum dpp_netrole netrole;
|
||||
+ struct dpp_bootstrap_info *pkex_bi;
|
||||
+ char *pkex_code;
|
||||
+ char *pkex_identifier;
|
||||
void *msg_ctx;
|
||||
void *cb_ctx;
|
||||
int (*process_conf_obj)(void *ctx, struct dpp_authentication *auth);
|
||||
@@ -102,6 +107,7 @@ static void dpp_connection_free(struct dpp_connection *conn)
|
||||
wpabuf_free(conn->msg);
|
||||
wpabuf_free(conn->msg_out);
|
||||
dpp_auth_deinit(conn->auth);
|
||||
+ dpp_pkex_free(conn->pkex);
|
||||
os_free(conn->name);
|
||||
os_free(conn);
|
||||
}
|
||||
@@ -525,6 +531,8 @@ int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr,
|
||||
/* TODO: Could send this to all configured Controllers. For now,
|
||||
* only the first Controller is supported. */
|
||||
ctrl = dpp_relay_controller_get_ctx(dpp, cb_ctx);
|
||||
+ } else if (type == DPP_PA_PKEX_EXCHANGE_REQ) {
|
||||
+ ctrl = dpp_relay_controller_get_ctx(dpp, cb_ctx);
|
||||
} else {
|
||||
if (!r_bootstrap)
|
||||
return -1;
|
||||
@@ -609,6 +617,8 @@ static void dpp_controller_free(struct dpp_controller *ctrl)
|
||||
eloop_unregister_sock(ctrl->sock, EVENT_TYPE_READ);
|
||||
}
|
||||
os_free(ctrl->configurator_params);
|
||||
+ os_free(ctrl->pkex_code);
|
||||
+ os_free(ctrl->pkex_identifier);
|
||||
os_free(ctrl);
|
||||
}
|
||||
|
||||
@@ -955,6 +965,143 @@ static int dpp_controller_rx_reconfig_auth_resp(struct dpp_connection *conn,
|
||||
}
|
||||
|
||||
|
||||
+static int dpp_controller_rx_pkex_exchange_req(struct dpp_connection *conn,
|
||||
+ const u8 *hdr, const u8 *buf,
|
||||
+ size_t len)
|
||||
+{
|
||||
+ struct dpp_controller *ctrl = conn->ctrl;
|
||||
+
|
||||
+ if (!ctrl)
|
||||
+ return 0;
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Exchange Request");
|
||||
+
|
||||
+ /* TODO: Support multiple PKEX codes by iterating over all the enabled
|
||||
+ * values here */
|
||||
+
|
||||
+ if (!ctrl->pkex_code || !ctrl->pkex_bi) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: No PKEX code configured - ignore request");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (conn->pkex || conn->auth) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: Already in PKEX/Authentication session - ignore new PKEX request");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ conn->pkex = dpp_pkex_rx_exchange_req(conn->ctrl->global, ctrl->pkex_bi,
|
||||
+ NULL, NULL,
|
||||
+ ctrl->pkex_identifier,
|
||||
+ ctrl->pkex_code,
|
||||
+ buf, len, true);
|
||||
+ if (!conn->pkex) {
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: Failed to process the request");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return dpp_tcp_send_msg(conn, conn->pkex->exchange_resp);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int dpp_controller_rx_pkex_exchange_resp(struct dpp_connection *conn,
|
||||
+ const u8 *hdr, const u8 *buf,
|
||||
+ size_t len)
|
||||
+{
|
||||
+ struct dpp_pkex *pkex = conn->pkex;
|
||||
+ struct wpabuf *msg;
|
||||
+ int res;
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Exchange Response");
|
||||
+
|
||||
+ if (!pkex || !pkex->initiator || pkex->exchange_done) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: No matching PKEX session");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ msg = dpp_pkex_rx_exchange_resp(pkex, NULL, buf, len);
|
||||
+ if (!msg) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Failed to process the response");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Send PKEX Commit-Reveal Request");
|
||||
+ res = dpp_tcp_send_msg(conn, msg);
|
||||
+ wpabuf_free(msg);
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int dpp_controller_rx_pkex_commit_reveal_req(struct dpp_connection *conn,
|
||||
+ const u8 *hdr,
|
||||
+ const u8 *buf, size_t len)
|
||||
+{
|
||||
+ struct dpp_pkex *pkex = conn->pkex;
|
||||
+ struct wpabuf *msg;
|
||||
+ int res;
|
||||
+ struct dpp_bootstrap_info *bi;
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Commit-Reveal Request");
|
||||
+
|
||||
+ if (!pkex || pkex->initiator || !pkex->exchange_done) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: No matching PKEX session");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ msg = dpp_pkex_rx_commit_reveal_req(pkex, hdr, buf, len);
|
||||
+ if (!msg) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Failed to process the request");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Send PKEX Commit-Reveal Response");
|
||||
+ res = dpp_tcp_send_msg(conn, msg);
|
||||
+ wpabuf_free(msg);
|
||||
+ if (res < 0)
|
||||
+ return res;
|
||||
+ bi = dpp_pkex_finish(conn->global, pkex, NULL, 0);
|
||||
+ if (!bi)
|
||||
+ return -1;
|
||||
+ conn->pkex = NULL;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+dpp_controller_rx_pkex_commit_reveal_resp(struct dpp_connection *conn,
|
||||
+ const u8 *hdr,
|
||||
+ const u8 *buf, size_t len)
|
||||
+{
|
||||
+ struct dpp_pkex *pkex = conn->pkex;
|
||||
+ int res;
|
||||
+ struct dpp_bootstrap_info *bi;
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: PKEX Commit-Reveal Response");
|
||||
+
|
||||
+ if (!pkex || !pkex->initiator || !pkex->exchange_done) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: No matching PKEX session");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ res = dpp_pkex_rx_commit_reveal_resp(pkex, hdr, buf, len);
|
||||
+ if (res < 0) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Failed to process the response");
|
||||
+ return res;
|
||||
+ }
|
||||
+
|
||||
+ bi = dpp_pkex_finish(conn->global, pkex, NULL, 0);
|
||||
+ if (!bi)
|
||||
+ return -1;
|
||||
+ conn->pkex = NULL;
|
||||
+
|
||||
+ if (!conn->pkex_done)
|
||||
+ return -1;
|
||||
+ return conn->pkex_done(conn->cb_ctx, conn, bi);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int dpp_controller_rx_action(struct dpp_connection *conn, const u8 *msg,
|
||||
size_t len)
|
||||
{
|
||||
@@ -1014,6 +1161,22 @@ static int dpp_controller_rx_action(struct dpp_connection *conn, const u8 *msg,
|
||||
case DPP_PA_RECONFIG_AUTH_RESP:
|
||||
return dpp_controller_rx_reconfig_auth_resp(conn, msg, pos,
|
||||
end - pos);
|
||||
+ case DPP_PA_PKEX_V1_EXCHANGE_REQ:
|
||||
+ wpa_printf(MSG_DEBUG,
|
||||
+ "DPP: Ignore PKEXv1 Exchange Request - not supported over TCP");
|
||||
+ return -1;
|
||||
+ case DPP_PA_PKEX_EXCHANGE_REQ:
|
||||
+ return dpp_controller_rx_pkex_exchange_req(conn, msg, pos,
|
||||
+ end - pos);
|
||||
+ case DPP_PA_PKEX_EXCHANGE_RESP:
|
||||
+ return dpp_controller_rx_pkex_exchange_resp(conn, msg, pos,
|
||||
+ end - pos);
|
||||
+ case DPP_PA_PKEX_COMMIT_REVEAL_REQ:
|
||||
+ return dpp_controller_rx_pkex_commit_reveal_req(conn, msg, pos,
|
||||
+ end - pos);
|
||||
+ case DPP_PA_PKEX_COMMIT_REVEAL_RESP:
|
||||
+ return dpp_controller_rx_pkex_commit_reveal_resp(conn, msg, pos,
|
||||
+ end - pos);
|
||||
default:
|
||||
/* TODO: missing messages types */
|
||||
wpa_printf(MSG_DEBUG,
|
||||
@@ -1559,6 +1722,101 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
+int dpp_tcp_pkex_init(struct dpp_global *dpp, struct dpp_pkex *pkex,
|
||||
+ const struct hostapd_ip_addr *addr, int port,
|
||||
+ void *msg_ctx, void *cb_ctx,
|
||||
+ int (*pkex_done)(void *ctx, void *conn,
|
||||
+ struct dpp_bootstrap_info *bi))
|
||||
+{
|
||||
+ struct dpp_connection *conn;
|
||||
+ struct sockaddr_storage saddr;
|
||||
+ socklen_t addrlen;
|
||||
+ const u8 *hdr, *pos, *end;
|
||||
+ char txt[100];
|
||||
+
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Initialize TCP connection to %s port %d",
|
||||
+ hostapd_ip_txt(addr, txt, sizeof(txt)), port);
|
||||
+ if (dpp_ipaddr_to_sockaddr((struct sockaddr *) &saddr, &addrlen,
|
||||
+ addr, port) < 0) {
|
||||
+ dpp_pkex_free(pkex);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ conn = os_zalloc(sizeof(*conn));
|
||||
+ if (!conn) {
|
||||
+ dpp_pkex_free(pkex);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ conn->msg_ctx = msg_ctx;
|
||||
+ conn->cb_ctx = cb_ctx;
|
||||
+ conn->pkex_done = pkex_done;
|
||||
+ conn->global = dpp;
|
||||
+ conn->pkex = pkex;
|
||||
+ conn->sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
+ if (conn->sock < 0)
|
||||
+ goto fail;
|
||||
+
|
||||
+ if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) != 0) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: fnctl(O_NONBLOCK) failed: %s",
|
||||
+ strerror(errno));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ if (connect(conn->sock, (struct sockaddr *) &saddr, addrlen) < 0) {
|
||||
+ if (errno != EINPROGRESS) {
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Failed to connect: %s",
|
||||
+ strerror(errno));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Continue connecting in the background; eloop will call us
|
||||
+ * once the connection is ready (or failed).
|
||||
+ */
|
||||
+ }
|
||||
+
|
||||
+ if (eloop_register_sock(conn->sock, EVENT_TYPE_WRITE,
|
||||
+ dpp_conn_tx_ready, conn, NULL) < 0)
|
||||
+ goto fail;
|
||||
+ conn->write_eloop = 1;
|
||||
+
|
||||
+ hdr = wpabuf_head(pkex->exchange_req);
|
||||
+ end = hdr + wpabuf_len(pkex->exchange_req);
|
||||
+ hdr += 2; /* skip Category and Actiom */
|
||||
+ pos = hdr + DPP_HDR_LEN;
|
||||
+ conn->msg_out = dpp_tcp_encaps(hdr, pos, end - pos);
|
||||
+ if (!conn->msg_out)
|
||||
+ goto fail;
|
||||
+ /* Message will be sent in dpp_conn_tx_ready() */
|
||||
+
|
||||
+ /* TODO: eloop timeout to clear a connection if it does not complete
|
||||
+ * properly */
|
||||
+ dl_list_add(&dpp->tcp_init, &conn->list);
|
||||
+ return 0;
|
||||
+fail:
|
||||
+ dpp_connection_free(conn);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int dpp_tcp_auth_start(struct dpp_connection *conn,
|
||||
+ struct dpp_authentication *auth)
|
||||
+{
|
||||
+ const u8 *hdr, *pos, *end;
|
||||
+
|
||||
+ hdr = wpabuf_head(auth->req_msg);
|
||||
+ end = hdr + wpabuf_len(auth->req_msg);
|
||||
+ hdr += 2; /* skip Category and Actiom */
|
||||
+ pos = hdr + DPP_HDR_LEN;
|
||||
+ conn->msg_out = dpp_tcp_encaps(hdr, pos, end - pos);
|
||||
+ if (!conn->msg_out)
|
||||
+ return -1;
|
||||
+ /* Message will be sent in dpp_conn_tx_ready() */
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
|
||||
const struct hostapd_ip_addr *addr, int port, const char *name,
|
||||
enum dpp_netrole netrole, void *msg_ctx, void *cb_ctx,
|
||||
@@ -1568,7 +1826,6 @@ int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
|
||||
struct dpp_connection *conn;
|
||||
struct sockaddr_storage saddr;
|
||||
socklen_t addrlen;
|
||||
- const u8 *hdr, *pos, *end;
|
||||
char txt[100];
|
||||
|
||||
wpa_printf(MSG_DEBUG, "DPP: Initialize TCP connection to %s port %d",
|
||||
@@ -1620,14 +1877,8 @@ int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
|
||||
goto fail;
|
||||
conn->write_eloop = 1;
|
||||
|
||||
- hdr = wpabuf_head(auth->req_msg);
|
||||
- end = hdr + wpabuf_len(auth->req_msg);
|
||||
- hdr += 2; /* skip Category and Actiom */
|
||||
- pos = hdr + DPP_HDR_LEN;
|
||||
- conn->msg_out = dpp_tcp_encaps(hdr, pos, end - pos);
|
||||
- if (!conn->msg_out)
|
||||
+ if (dpp_tcp_auth_start(conn, auth) < 0)
|
||||
goto fail;
|
||||
- /* Message will be sent in dpp_conn_tx_ready() */
|
||||
|
||||
/* TODO: eloop timeout to clear a connection if it does not complete
|
||||
* properly */
|
||||
@@ -1639,6 +1890,30 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
+int dpp_tcp_auth(struct dpp_global *dpp, void *_conn,
|
||||
+ struct dpp_authentication *auth, const char *name,
|
||||
+ enum dpp_netrole netrole,
|
||||
+ int (*process_conf_obj)(void *ctx,
|
||||
+ struct dpp_authentication *auth))
|
||||
+{
|
||||
+ struct dpp_connection *conn = _conn;
|
||||
+
|
||||
+ /* Continue with Authentication exchange on an existing TCP connection.
|
||||
+ */
|
||||
+ conn->process_conf_obj = process_conf_obj;
|
||||
+ os_free(conn->name);
|
||||
+ conn->name = os_strdup(name ? name : "Test");
|
||||
+ conn->netrole = netrole;
|
||||
+ conn->auth = auth;
|
||||
+
|
||||
+ if (dpp_tcp_auth_start(conn, auth) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ dpp_conn_tx_ready(conn->sock, conn, NULL);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int dpp_controller_start(struct dpp_global *dpp,
|
||||
struct dpp_controller_config *config)
|
||||
{
|
||||
@@ -1789,6 +2064,23 @@ void dpp_controller_new_qr_code(struct dpp_global *dpp,
|
||||
}
|
||||
|
||||
|
||||
+void dpp_controller_pkex_add(struct dpp_global *dpp,
|
||||
+ struct dpp_bootstrap_info *bi,
|
||||
+ const char *code, const char *identifier)
|
||||
+{
|
||||
+ struct dpp_controller *ctrl = dpp->controller;
|
||||
+
|
||||
+ if (!ctrl)
|
||||
+ return;
|
||||
+
|
||||
+ ctrl->pkex_bi = bi;
|
||||
+ os_free(ctrl->pkex_code);
|
||||
+ ctrl->pkex_code = code ? os_strdup(code) : NULL;
|
||||
+ os_free(ctrl->pkex_identifier);
|
||||
+ ctrl->pkex_identifier = identifier ? os_strdup(identifier) : NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
void dpp_tcp_init_flush(struct dpp_global *dpp)
|
||||
{
|
||||
struct dpp_connection *conn, *tmp;
|
||||
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
|
||||
index 61b300f..aab94cb 100644
|
||||
--- a/wpa_supplicant/dpp_supplicant.c
|
||||
+++ b/wpa_supplicant/dpp_supplicant.c
|
||||
@@ -2557,6 +2557,71 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
|
||||
}
|
||||
|
||||
|
||||
+#ifdef CONFIG_DPP2
|
||||
+static int wpas_dpp_pkex_done(void *ctx, void *conn,
|
||||
+ struct dpp_bootstrap_info *peer_bi)
|
||||
+{
|
||||
+ struct wpa_supplicant *wpa_s = ctx;
|
||||
+ const char *cmd = wpa_s->dpp_pkex_auth_cmd;
|
||||
+ const char *pos;
|
||||
+ u8 allowed_roles = DPP_CAPAB_CONFIGURATOR;
|
||||
+ struct dpp_bootstrap_info *own_bi = NULL;
|
||||
+ struct dpp_authentication *auth;
|
||||
+
|
||||
+ if (!cmd)
|
||||
+ cmd = "";
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
|
||||
+ cmd);
|
||||
+
|
||||
+ pos = os_strstr(cmd, " own=");
|
||||
+ if (pos) {
|
||||
+ pos += 5;
|
||||
+ own_bi = dpp_bootstrap_get_id(wpa_s->dpp, atoi(pos));
|
||||
+ if (!own_bi) {
|
||||
+ wpa_printf(MSG_INFO,
|
||||
+ "DPP: Could not find bootstrapping info for the identified local entry");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (peer_bi->curve != own_bi->curve) {
|
||||
+ wpa_printf(MSG_INFO,
|
||||
+ "DPP: Mismatching curves in bootstrapping info (peer=%s own=%s)",
|
||||
+ peer_bi->curve->name, own_bi->curve->name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pos = os_strstr(cmd, " role=");
|
||||
+ if (pos) {
|
||||
+ pos += 6;
|
||||
+ if (os_strncmp(pos, "configurator", 12) == 0)
|
||||
+ allowed_roles = DPP_CAPAB_CONFIGURATOR;
|
||||
+ else if (os_strncmp(pos, "enrollee", 8) == 0)
|
||||
+ allowed_roles = DPP_CAPAB_ENROLLEE;
|
||||
+ else if (os_strncmp(pos, "either", 6) == 0)
|
||||
+ allowed_roles = DPP_CAPAB_CONFIGURATOR |
|
||||
+ DPP_CAPAB_ENROLLEE;
|
||||
+ else
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ auth = dpp_auth_init(wpa_s->dpp, wpa_s, peer_bi, own_bi, allowed_roles,
|
||||
+ 0, wpa_s->hw.modes, wpa_s->hw.num_modes);
|
||||
+ if (!auth)
|
||||
+ return -1;
|
||||
+
|
||||
+ wpas_dpp_set_testing_options(wpa_s, auth);
|
||||
+ if (dpp_set_configurator(auth, cmd) < 0) {
|
||||
+ dpp_auth_deinit(auth);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return dpp_tcp_auth(wpa_s->dpp, conn, auth, wpa_s->conf->dpp_name,
|
||||
+ DPP_NETROLE_STA, wpas_dpp_process_conf_obj);
|
||||
+}
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
+
|
||||
+
|
||||
enum wpas_dpp_pkex_ver {
|
||||
PKEX_VER_AUTO,
|
||||
PKEX_VER_ONLY_1,
|
||||
@@ -2564,7 +2629,9 @@ enum wpas_dpp_pkex_ver {
|
||||
};
|
||||
|
||||
static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s,
|
||||
- enum wpas_dpp_pkex_ver ver)
|
||||
+ enum wpas_dpp_pkex_ver ver,
|
||||
+ const struct hostapd_ip_addr *ipaddr,
|
||||
+ int tcp_port)
|
||||
{
|
||||
struct dpp_pkex *pkex;
|
||||
struct wpabuf *msg;
|
||||
@@ -2573,15 +2640,24 @@ static int wpas_dpp_pkex_init(struct wpa_supplicant *wpa_s,
|
||||
|
||||
wpa_printf(MSG_DEBUG, "DPP: Initiating PKEXv%d", v2 ? 2 : 1);
|
||||
dpp_pkex_free(wpa_s->dpp_pkex);
|
||||
- wpa_s->dpp_pkex = dpp_pkex_init(wpa_s, wpa_s->dpp_pkex_bi,
|
||||
- wpa_s->own_addr,
|
||||
- wpa_s->dpp_pkex_identifier,
|
||||
- wpa_s->dpp_pkex_code, v2);
|
||||
- pkex = wpa_s->dpp_pkex;
|
||||
+ wpa_s->dpp_pkex = NULL;
|
||||
+ pkex = dpp_pkex_init(wpa_s, wpa_s->dpp_pkex_bi, wpa_s->own_addr,
|
||||
+ wpa_s->dpp_pkex_identifier,
|
||||
+ wpa_s->dpp_pkex_code, v2);
|
||||
if (!pkex)
|
||||
return -1;
|
||||
pkex->forced_ver = ver != PKEX_VER_AUTO;
|
||||
|
||||
+ if (ipaddr) {
|
||||
+#ifdef CONFIG_DPP2
|
||||
+ return dpp_tcp_pkex_init(wpa_s->dpp, pkex, ipaddr, tcp_port,
|
||||
+ wpa_s, wpa_s, wpas_dpp_pkex_done);
|
||||
+#else /* CONFIG_DPP2 */
|
||||
+ return -1;
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
+ }
|
||||
+
|
||||
+ wpa_s->dpp_pkex = pkex;
|
||||
msg = pkex->exchange_req;
|
||||
wait_time = wpa_s->max_remain_on_chan;
|
||||
if (wait_time > 2000)
|
||||
@@ -2618,7 +2694,8 @@ static void wpas_dpp_pkex_retry_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
if (pkex->v2 && !pkex->forced_ver) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"DPP: Fall back to PKEXv1");
|
||||
- wpas_dpp_pkex_init(wpa_s, PKEX_VER_ONLY_1);
|
||||
+ wpas_dpp_pkex_init(wpa_s, PKEX_VER_ONLY_1,
|
||||
+ NULL, 0);
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_DPP3 */
|
||||
@@ -3327,6 +3404,29 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
|
||||
{
|
||||
struct dpp_bootstrap_info *own_bi;
|
||||
const char *pos, *end;
|
||||
+ int tcp_port = DPP_TCP_PORT;
|
||||
+ struct hostapd_ip_addr *ipaddr = NULL;
|
||||
+#ifdef CONFIG_DPP2
|
||||
+ struct hostapd_ip_addr ipaddr_buf;
|
||||
+ char *addr;
|
||||
+
|
||||
+ pos = os_strstr(cmd, " tcp_port=");
|
||||
+ if (pos) {
|
||||
+ pos += 10;
|
||||
+ tcp_port = atoi(pos);
|
||||
+ }
|
||||
+
|
||||
+ addr = get_param(cmd, " tcp_addr=");
|
||||
+ if (addr) {
|
||||
+ int res;
|
||||
+
|
||||
+ res = hostapd_parse_ip_addr(addr, &ipaddr_buf);
|
||||
+ os_free(addr);
|
||||
+ if (res)
|
||||
+ return -1;
|
||||
+ ipaddr = &ipaddr_buf;
|
||||
+ }
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
|
||||
pos = os_strstr(cmd, " own=");
|
||||
if (!pos)
|
||||
@@ -3390,8 +3490,14 @@ int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (wpas_dpp_pkex_init(wpa_s, ver) < 0)
|
||||
+ if (wpas_dpp_pkex_init(wpa_s, ver, ipaddr, tcp_port) < 0)
|
||||
return -1;
|
||||
+ } else {
|
||||
+#ifdef CONFIG_DPP2
|
||||
+ dpp_controller_pkex_add(wpa_s->dpp, own_bi,
|
||||
+ wpa_s->dpp_pkex_code,
|
||||
+ wpa_s->dpp_pkex_identifier);
|
||||
+#endif /* CONFIG_DPP2 */
|
||||
}
|
||||
|
||||
/* TODO: Support multiple PKEX info entries */
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
From 15af83cf1846870873a011ed4d714732f01cd2e4 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
Date: Tue, 19 Jul 2022 21:23:04 +0300
|
||||
Subject: [PATCH] DPP: Delete PKEX code and identifier on success completion of
|
||||
PKEX
|
||||
|
||||
We are not supposed to reuse these without being explicitly requested to
|
||||
perform PKEX again. There is not a strong use case for being able to
|
||||
provision an Enrollee multiple times with PKEX, so this should have no
|
||||
issues on the Enrollee. For a Configurator, there might be some use
|
||||
cases that would benefit from being able to use the same code with
|
||||
multiple Enrollee devices, e.g., for guess access with a laptop and a
|
||||
smart phone. That case will now require a new DPP_PKEX_ADD command on
|
||||
the Configurator after each completion of the provisioning exchange.
|
||||
|
||||
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
|
||||
|
||||
CVE: CVE-2022-37660
|
||||
|
||||
Upstream-Status: Backport [https://git.w1.fi/cgit/hostap/commit/?id=15af83cf1846870873a011ed4d714732f01cd2e4]
|
||||
|
||||
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
|
||||
---
|
||||
src/ap/dpp_hostapd.c | 22 +++++++++++++++++++++-
|
||||
wpa_supplicant/dpp_supplicant.c | 21 ++++++++++++++++++++-
|
||||
2 files changed, 41 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
|
||||
index d956be9..73b09ba 100644
|
||||
--- a/src/ap/dpp_hostapd.c
|
||||
+++ b/src/ap/dpp_hostapd.c
|
||||
@@ -276,6 +276,22 @@ static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
|
||||
}
|
||||
|
||||
|
||||
+static void hostapd_dpp_pkex_clear_code(struct hostapd_data *hapd)
|
||||
+{
|
||||
+ if (!hapd->dpp_pkex_code && !hapd->dpp_pkex_identifier)
|
||||
+ return;
|
||||
+
|
||||
+ /* Delete PKEX code and identifier on successful completion of
|
||||
+ * PKEX. We are not supposed to reuse these without being
|
||||
+ * explicitly requested to perform PKEX again. */
|
||||
+ wpa_printf(MSG_DEBUG, "DPP: Delete PKEX code/identifier");
|
||||
+ os_free(hapd->dpp_pkex_code);
|
||||
+ hapd->dpp_pkex_code = NULL;
|
||||
+ os_free(hapd->dpp_pkex_identifier);
|
||||
+ hapd->dpp_pkex_identifier = NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
#ifdef CONFIG_DPP2
|
||||
static int hostapd_dpp_pkex_done(void *ctx, void *conn,
|
||||
struct dpp_bootstrap_info *peer_bi)
|
||||
@@ -287,6 +303,8 @@ static int hostapd_dpp_pkex_done(void *ctx, void *conn,
|
||||
struct dpp_bootstrap_info *own_bi = NULL;
|
||||
struct dpp_authentication *auth;
|
||||
|
||||
+ hostapd_dpp_pkex_clear_code(hapd);
|
||||
+
|
||||
if (!cmd)
|
||||
cmd = "";
|
||||
wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
|
||||
@@ -2114,6 +2132,7 @@ hostapd_dpp_rx_pkex_commit_reveal_req(struct hostapd_data *hapd, const u8 *src,
|
||||
wpabuf_head(msg), wpabuf_len(msg));
|
||||
wpabuf_free(msg);
|
||||
|
||||
+ hostapd_dpp_pkex_clear_code(hapd);
|
||||
bi = dpp_pkex_finish(hapd->iface->interfaces->dpp, pkex, src, freq);
|
||||
if (!bi)
|
||||
return;
|
||||
@@ -2145,6 +2164,7 @@ hostapd_dpp_rx_pkex_commit_reveal_resp(struct hostapd_data *hapd, const u8 *src,
|
||||
return;
|
||||
}
|
||||
|
||||
+ hostapd_dpp_pkex_clear_code(hapd);
|
||||
bi = dpp_pkex_finish(hapd->iface->interfaces->dpp, pkex, src, freq);
|
||||
if (!bi)
|
||||
return;
|
||||
@@ -2518,7 +2538,7 @@ int hostapd_dpp_pkex_remove(struct hostapd_data *hapd, const char *id)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if ((id_val != 0 && id_val != 1) || !hapd->dpp_pkex_code)
|
||||
+ if ((id_val != 0 && id_val != 1))
|
||||
return -1;
|
||||
|
||||
/* TODO: Support multiple PKEX entries */
|
||||
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
|
||||
index aab94cb..015ae66 100644
|
||||
--- a/wpa_supplicant/dpp_supplicant.c
|
||||
+++ b/wpa_supplicant/dpp_supplicant.c
|
||||
@@ -2557,6 +2557,22 @@ static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
|
||||
}
|
||||
|
||||
|
||||
+static void wpas_dpp_pkex_clear_code(struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
+ if (!wpa_s->dpp_pkex_code && !wpa_s->dpp_pkex_identifier)
|
||||
+ return;
|
||||
+
|
||||
+ /* Delete PKEX code and identifier on successful completion of
|
||||
+ * PKEX. We are not supposed to reuse these without being
|
||||
+ * explicitly requested to perform PKEX again. */
|
||||
+ os_free(wpa_s->dpp_pkex_code);
|
||||
+ wpa_s->dpp_pkex_code = NULL;
|
||||
+ os_free(wpa_s->dpp_pkex_identifier);
|
||||
+ wpa_s->dpp_pkex_identifier = NULL;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
#ifdef CONFIG_DPP2
|
||||
static int wpas_dpp_pkex_done(void *ctx, void *conn,
|
||||
struct dpp_bootstrap_info *peer_bi)
|
||||
@@ -2568,6 +2584,8 @@ static int wpas_dpp_pkex_done(void *ctx, void *conn,
|
||||
struct dpp_bootstrap_info *own_bi = NULL;
|
||||
struct dpp_authentication *auth;
|
||||
|
||||
+ wpas_dpp_pkex_clear_code(wpa_s);
|
||||
+
|
||||
if (!cmd)
|
||||
cmd = "";
|
||||
wpa_printf(MSG_DEBUG, "DPP: Start authentication after PKEX (cmd: %s)",
|
||||
@@ -2872,6 +2890,7 @@ wpas_dpp_pkex_finish(struct wpa_supplicant *wpa_s, const u8 *peer,
|
||||
{
|
||||
struct dpp_bootstrap_info *bi;
|
||||
|
||||
+ wpas_dpp_pkex_clear_code(wpa_s);
|
||||
bi = dpp_pkex_finish(wpa_s->dpp, wpa_s->dpp_pkex, peer, freq);
|
||||
if (!bi)
|
||||
return NULL;
|
||||
@@ -3521,7 +3540,7 @@ int wpas_dpp_pkex_remove(struct wpa_supplicant *wpa_s, const char *id)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if ((id_val != 0 && id_val != 1) || !wpa_s->dpp_pkex_code)
|
||||
+ if ((id_val != 0 && id_val != 1))
|
||||
return -1;
|
||||
|
||||
/* TODO: Support multiple PKEX entries */
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -31,6 +31,11 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
|
||||
file://0001-SAE-Check-for-invalid-Rejected-Groups-element-length.patch \
|
||||
file://0002-SAE-Check-for-invalid-Rejected-Groups-element-length.patch \
|
||||
file://0003-SAE-Reject-invalid-Rejected-Groups-element-in-the-pa.patch \
|
||||
file://CVE-2022-37660-0001.patch \
|
||||
file://CVE-2022-37660-0002.patch \
|
||||
file://CVE-2022-37660-0003.patch \
|
||||
file://CVE-2022-37660-0004.patch \
|
||||
file://CVE-2022-37660-0005.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "20df7ae5154b3830355f8ab4269123a87affdea59fe74fe9292a91d0d7e17b2f"
|
||||
|
||||
|
||||
136
meta/recipes-core/busybox/busybox/CVE-2023-39810.patch
Normal file
136
meta/recipes-core/busybox/busybox/CVE-2023-39810.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
From 9a8796436b9b0641e13480811902ea2ac57881d3 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Wed, 2 Oct 2024 10:12:05 +0200
|
||||
Subject: [PATCH] archival: disallow path traversals (CVE-2023-39810)
|
||||
|
||||
Create new configure option for archival/libarchive based extractions to
|
||||
disallow path traversals.
|
||||
As this is a paranoid option and might introduce backward
|
||||
incompatibility, default it to no.
|
||||
|
||||
Fixes: CVE-2023-39810
|
||||
|
||||
Based on the patch by Peter Kaestle <peter.kaestle@nokia.com>
|
||||
|
||||
function old new delta
|
||||
data_extract_all 921 945 +24
|
||||
strip_unsafe_prefix 101 102 +1
|
||||
------------------------------------------------------------------------------
|
||||
(add/remove: 0/0 grow/shrink: 2/0 up/down: 25/0) Total: 25 bytes
|
||||
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
|
||||
CVE: CVE-2023-39810
|
||||
Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=9a8796436b9b0641e13480811902ea2ac57881d3]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
archival/Config.src | 11 +++++++++++
|
||||
archival/libarchive/data_extract_all.c | 8 ++++++++
|
||||
archival/libarchive/unsafe_prefix.c | 6 +++++-
|
||||
scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +-
|
||||
testsuite/cpio.tests | 23 ++++++++++++++++++++++
|
||||
5 files changed, 48 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/archival/Config.src b/archival/Config.src
|
||||
index 6f4f30c43..cbcd7217c 100644
|
||||
--- a/archival/Config.src
|
||||
+++ b/archival/Config.src
|
||||
@@ -35,4 +35,15 @@ config FEATURE_LZMA_FAST
|
||||
This option reduces decompression time by about 25% at the cost of
|
||||
a 1K bigger binary.
|
||||
|
||||
+config FEATURE_PATH_TRAVERSAL_PROTECTION
|
||||
+ bool "Prevent extraction of filenames with /../ path component"
|
||||
+ default n
|
||||
+ help
|
||||
+ busybox tar and unzip remove "PREFIX/../" (if it exists)
|
||||
+ from extracted names.
|
||||
+ This option enables this behavior for all other unpacking applets,
|
||||
+ such as cpio, ar, rpm.
|
||||
+ GNU cpio 2.15 has NO such sanity check.
|
||||
+# try other archivers and document their behavior?
|
||||
+
|
||||
endmenu
|
||||
diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c
|
||||
index 049c2c156..8a69711c1 100644
|
||||
--- a/archival/libarchive/data_extract_all.c
|
||||
+++ b/archival/libarchive/data_extract_all.c
|
||||
@@ -65,6 +65,14 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
|
||||
} while (--n != 0);
|
||||
}
|
||||
#endif
|
||||
+#if ENABLE_FEATURE_PATH_TRAVERSAL_PROTECTION
|
||||
+ /* Strip leading "/" and up to last "/../" path component */
|
||||
+ dst_name = (char *)strip_unsafe_prefix(dst_name);
|
||||
+#endif
|
||||
+// ^^^ This may be a problem if some applets do need to extract absolute names.
|
||||
+// (Probably will need to invent ARCHIVE_ALLOW_UNSAFE_NAME flag).
|
||||
+// You might think that rpm needs it, but in my tests rpm's internal cpio
|
||||
+// archive has names like "./usr/bin/FOO", not "/usr/bin/FOO".
|
||||
|
||||
if (archive_handle->ah_flags & ARCHIVE_CREATE_LEADING_DIRS) {
|
||||
char *slash = strrchr(dst_name, '/');
|
||||
diff --git a/archival/libarchive/unsafe_prefix.c b/archival/libarchive/unsafe_prefix.c
|
||||
index 33e487bf9..667081195 100644
|
||||
--- a/archival/libarchive/unsafe_prefix.c
|
||||
+++ b/archival/libarchive/unsafe_prefix.c
|
||||
@@ -14,7 +14,11 @@ const char* FAST_FUNC strip_unsafe_prefix(const char *str)
|
||||
cp++;
|
||||
continue;
|
||||
}
|
||||
- if (is_prefixed_with(cp, "/../"+1)) {
|
||||
+ /* We are called lots of times.
|
||||
+ * is_prefixed_with(cp, "../") is slower than open-coding it,
|
||||
+ * with minimal code growth (~few bytes).
|
||||
+ */
|
||||
+ if (cp[0] == '.' && cp[1] == '.' && cp[2] == '/') {
|
||||
cp += 3;
|
||||
continue;
|
||||
}
|
||||
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
index 5075ebf2d..910ca1f7c 100755
|
||||
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
@@ -55,7 +55,7 @@ trap "rm -f $tmp" 0 1 2 3 15
|
||||
check() {
|
||||
$cc -x c - -o $tmp 2>/dev/null <<'EOF'
|
||||
#include CURSES_LOC
|
||||
-main() {}
|
||||
+int main() { return 0; }
|
||||
EOF
|
||||
if [ $? != 0 ]; then
|
||||
echo " *** Unable to find the ncurses libraries or the" 1>&2
|
||||
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests
|
||||
index 85e746589..a4462c53e 100755
|
||||
--- a/testsuite/cpio.tests
|
||||
+++ b/testsuite/cpio.tests
|
||||
@@ -154,6 +154,29 @@ testing "cpio -R with extract" \
|
||||
" "" ""
|
||||
SKIP=
|
||||
|
||||
+# Create an archive containing a file with "../dont_write" filename.
|
||||
+# See that it will not be allowed to unpack.
|
||||
+# NB: GNU cpio 2.15 DOES NOT do such checks.
|
||||
+optional FEATURE_PATH_TRAVERSAL_PROTECTION
|
||||
+rm -rf cpio.testdir
|
||||
+mkdir -p cpio.testdir/prepare/inner
|
||||
+echo "file outside of destination was written" > cpio.testdir/prepare/dont_write
|
||||
+echo "data" > cpio.testdir/prepare/inner/to_extract
|
||||
+mkdir -p cpio.testdir/extract
|
||||
+testing "cpio extract file outside of destination" "\
|
||||
+(cd cpio.testdir/prepare/inner && echo -e '../dont_write\nto_extract' | cpio -o -H newc) | (cd cpio.testdir/extract && cpio -vi 2>&1)
|
||||
+echo \$?
|
||||
+ls cpio.testdir/dont_write 2>&1" \
|
||||
+"\
|
||||
+cpio: removing leading '../' from member names
|
||||
+../dont_write
|
||||
+to_extract
|
||||
+1 blocks
|
||||
+0
|
||||
+ls: cpio.testdir/dont_write: No such file or directory
|
||||
+" "" ""
|
||||
+SKIP=
|
||||
+
|
||||
# Clean up
|
||||
rm -rf cpio.testdir cpio.testdir2 2>/dev/null
|
||||
|
||||
57
meta/recipes-core/busybox/busybox/CVE-2025-46394-01.patch
Normal file
57
meta/recipes-core/busybox/busybox/CVE-2025-46394-01.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
From f5e1bf966b19ea1821f00a8c9ecd7774598689b4 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Wed, 24 Sep 2025 03:28:47 +0200
|
||||
Subject: [PATCH] archival/libarchive: sanitize filenames on output (prevent
|
||||
control sequence attacks
|
||||
|
||||
This fixes CVE-2025-46394 (terminal escape sequence injection)
|
||||
|
||||
Original credit: Ian.Norton at entrust.com
|
||||
|
||||
function old new delta
|
||||
header_list 9 15 +6
|
||||
header_verbose_list 239 244 +5
|
||||
------------------------------------------------------------------------------
|
||||
(add/remove: 0/0 grow/shrink: 2/0 up/down: 11/0) Total: 11 bytes
|
||||
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
|
||||
CVE: CVE-2025-46394
|
||||
Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=f5e1bf966b19ea1821f00a8c9ecd7774598689b4]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
archival/libarchive/header_list.c | 2 +-
|
||||
archival/libarchive/header_verbose_list.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/archival/libarchive/header_list.c b/archival/libarchive/header_list.c
|
||||
index 0621aa406..9490b3635 100644
|
||||
--- a/archival/libarchive/header_list.c
|
||||
+++ b/archival/libarchive/header_list.c
|
||||
@@ -8,5 +8,5 @@
|
||||
void FAST_FUNC header_list(const file_header_t *file_header)
|
||||
{
|
||||
//TODO: cpio -vp DIR should output "DIR/NAME", not just "NAME" */
|
||||
- puts(file_header->name);
|
||||
+ puts(printable_string(file_header->name));
|
||||
}
|
||||
diff --git a/archival/libarchive/header_verbose_list.c b/archival/libarchive/header_verbose_list.c
|
||||
index a575a08a0..e7a09430d 100644
|
||||
--- a/archival/libarchive/header_verbose_list.c
|
||||
+++ b/archival/libarchive/header_verbose_list.c
|
||||
@@ -57,13 +57,13 @@ void FAST_FUNC header_verbose_list(const file_header_t *file_header)
|
||||
ptm->tm_hour,
|
||||
ptm->tm_min,
|
||||
ptm->tm_sec,
|
||||
- file_header->name);
|
||||
+ printable_string(file_header->name));
|
||||
|
||||
#endif /* FEATURE_TAR_UNAME_GNAME */
|
||||
|
||||
/* NB: GNU tar shows "->" for symlinks and "link to" for hardlinks */
|
||||
if (file_header->link_target) {
|
||||
- printf(" -> %s", file_header->link_target);
|
||||
+ printf(" -> %s", printable_string(file_header->link_target));
|
||||
}
|
||||
bb_putchar('\n');
|
||||
}
|
||||
32
meta/recipes-core/busybox/busybox/CVE-2025-46394-02.patch
Normal file
32
meta/recipes-core/busybox/busybox/CVE-2025-46394-02.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 7378db981d87b4a2264e14d60340a7fb5c67ae59 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Marko <peter.marko@siemens.com>
|
||||
Date: Fri, 3 Oct 2025 16:12:56 +0200
|
||||
Subject: [PATCH] testsuite/tar.tests: fix test after CVE-2025-46394
|
||||
|
||||
tar now sanitizes output and this test needs to expect that.
|
||||
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
|
||||
CVE: CVE-2025-46394
|
||||
Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2025-October/091743.html]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
testsuite/tar.tests | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/testsuite/tar.tests b/testsuite/tar.tests
|
||||
index 0f2e89112..48fc38114 100755
|
||||
--- a/testsuite/tar.tests
|
||||
+++ b/testsuite/tar.tests
|
||||
@@ -325,9 +325,9 @@ unset LANG
|
||||
rm -rf etc usr
|
||||
' "\
|
||||
etc/ssl/certs/3b2716e5.0
|
||||
-etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
|
||||
+etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.pem
|
||||
etc/ssl/certs/f80cc7f6.0
|
||||
-usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
|
||||
+usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.crt
|
||||
0
|
||||
etc/ssl/certs/3b2716e5.0 -> EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem
|
||||
etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.pem -> /usr/share/ca-certificates/mozilla/EBG_Elektronik_Sertifika_Hizmet_Sağlayıcısı.crt
|
||||
@@ -58,6 +58,9 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
|
||||
file://0001-awk.c-fix-CVE-2023-42366-bug-15874.patch \
|
||||
file://0001-cut-Fix-s-flag-to-omit-blank-lines.patch \
|
||||
file://CVE-2022-48174.patch \
|
||||
file://CVE-2023-39810.patch \
|
||||
file://CVE-2025-46394-01.patch \
|
||||
file://CVE-2025-46394-02.patch \
|
||||
"
|
||||
SRC_URI:append:libc-musl = " file://musl.cfg "
|
||||
# TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html
|
||||
|
||||
37
meta/recipes-core/dbus/dbus-glib/fix-build-with-gcc-15.patch
Normal file
37
meta/recipes-core/dbus/dbus-glib/fix-build-with-gcc-15.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From 8c32bc9fa67513f46199bc31498dc1fecbb611bb Mon Sep 17 00:00:00 2001
|
||||
From: Simon McVittie <smcv@collabora.com>
|
||||
Date: Thu, 13 Mar 2025 14:19:28 +0000
|
||||
Subject: [PATCH] dbus-gvalue: Avoid using the reserved word 'bool'
|
||||
|
||||
This is reserved in C23 for the equivalent of `<stdbool.h>`.
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/1096507
|
||||
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/dbus/dbus-glib/-/commit/8c32bc9fa67513f46199bc31498dc1fecbb611bb]
|
||||
igned-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||
---
|
||||
dbus/dbus-gvalue.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c
|
||||
index 534e90a..788e360 100644
|
||||
--- a/dbus/dbus-gvalue.c
|
||||
+++ b/dbus/dbus-gvalue.c
|
||||
@@ -545,11 +545,11 @@ demarshal_basic (DBusGValueMarshalCtx *context,
|
||||
{
|
||||
case DBUS_TYPE_BOOLEAN:
|
||||
{
|
||||
- dbus_bool_t bool;
|
||||
+ dbus_bool_t b;
|
||||
if (!G_VALUE_HOLDS (value, G_TYPE_BOOLEAN))
|
||||
goto invalid_type;
|
||||
- dbus_message_iter_get_basic (iter, &bool);
|
||||
- g_value_set_boolean (value, bool);
|
||||
+ dbus_message_iter_get_basic (iter, &b);
|
||||
+ g_value_set_boolean (value, b);
|
||||
return TRUE;
|
||||
}
|
||||
case DBUS_TYPE_BYTE:
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -13,6 +13,7 @@ DEPENDS:class-native = "glib-2.0-native dbus-native"
|
||||
SRC_URI = "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
|
||||
file://no-examples.patch \
|
||||
file://test-install-makefile.patch \
|
||||
file://fix-build-with-gcc-15.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "021e6c8a288df02c227e4aafbf7e7527"
|
||||
SRC_URI[sha256sum] = "7d550dccdfcd286e33895501829ed971eeb65c614e73aadb4a08aeef719b143a"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From d59436a4d56de58b856142a5d489a4a8fc7382ed Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnston <matt@ucc.asn.au>
|
||||
Date: Mon, 8 Apr 2024 22:01:21 +0800
|
||||
Subject: [PATCH] Avoid unused variable with DROPBEAR_CLI_PUBKEY_AUTH 0
|
||||
|
||||
Fixes PR #291
|
||||
|
||||
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/d59436a4d56de58b856142a5d489a4a8fc7382ed]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
cli-runopts.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/cli-runopts.c b/cli-runopts.c
|
||||
index b853a13..6668aee 100644
|
||||
--- a/cli-runopts.c
|
||||
+++ b/cli-runopts.c
|
||||
@@ -533,7 +533,9 @@ static void loadidentityfile(const char* filename, int warnfail) {
|
||||
static char* multihop_passthrough_args(void) {
|
||||
char *args = NULL;
|
||||
unsigned int len, total;
|
||||
+#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||
m_list_elem *iter;
|
||||
+#endif
|
||||
/* Sufficient space for non-string args */
|
||||
len = 100;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From 697b1f86c0b2b0caf12e9e32bab29161093ab5d4 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnston <matt@ucc.asn.au>
|
||||
Date: Mon, 1 Apr 2024 11:50:26 +0800
|
||||
Subject: [PATCH] Handle arbitrary length paths and commands in
|
||||
multihop_passthrough_args()
|
||||
|
||||
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/697b1f86c0b2b0caf12e9e32bab29161093ab5d4]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
cli-runopts.c | 30 +++++++++++++++++++++---------
|
||||
1 file changed, 21 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/cli-runopts.c b/cli-runopts.c
|
||||
index 37ea61d..219fc53 100644
|
||||
--- a/cli-runopts.c
|
||||
+++ b/cli-runopts.c
|
||||
@@ -528,15 +528,29 @@ static void loadidentityfile(const char* filename, int warnfail) {
|
||||
|
||||
#if DROPBEAR_CLI_MULTIHOP
|
||||
|
||||
-static char*
|
||||
-multihop_passthrough_args() {
|
||||
- char *ret, args[256];
|
||||
+/* Fill out -i, -y, -W options that make sense for all
|
||||
+ * the intermediate processes */
|
||||
+static char* multihop_passthrough_args(void) {
|
||||
+ char *args = NULL;
|
||||
unsigned int len, total;
|
||||
m_list_elem *iter;
|
||||
- /* Fill out -i, -y, -W options that make sense for all
|
||||
- * the intermediate processes */
|
||||
+ /* Sufficient space for non-string args */
|
||||
+ len = 100;
|
||||
+
|
||||
+ /* String arguments have arbitrary length, so determine space required */
|
||||
+ if (cli_opts.proxycmd) {
|
||||
+ len += strlen(cli_opts.proxycmd);
|
||||
+ }
|
||||
+ for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
|
||||
+ {
|
||||
+ sign_key * key = (sign_key*)iter->item;
|
||||
+ len += 4 + strlen(key->filename);
|
||||
+ }
|
||||
+
|
||||
+ args = m_malloc(len);
|
||||
total = 0;
|
||||
- len = 255;
|
||||
+
|
||||
+ /* Create new argument string */
|
||||
|
||||
if (cli_opts.quiet) {
|
||||
total += m_snprintf(args+total, len-total, "-q ");
|
||||
@@ -564,9 +578,7 @@ multihop_passthrough_args() {
|
||||
}
|
||||
#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
|
||||
|
||||
- ret = m_malloc(total + 1);
|
||||
- strcpy(ret,args);
|
||||
- return ret;
|
||||
+ return args;
|
||||
}
|
||||
|
||||
/* Sets up 'onion-forwarding' connections. This will spawn
|
||||
@@ -0,0 +1,81 @@
|
||||
From 2f1177e55f33afd676e08c9449ab7ab517fc3b30 Mon Sep 17 00:00:00 2001
|
||||
From: HansH111 <hans@atbas.org>
|
||||
Date: Sat, 24 Feb 2024 08:29:30 +0000
|
||||
Subject: [PATCH] add -o BatchMode and also forward this when multihop
|
||||
destination is used
|
||||
|
||||
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/2f1177e55f33afd676e08c9449ab7ab517fc3b30]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
cli-runopts.c | 33 +++++++++++----------------------
|
||||
1 file changed, 11 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/cli-runopts.c b/cli-runopts.c
|
||||
index 38a73f7..37ea61d 100644
|
||||
--- a/cli-runopts.c
|
||||
+++ b/cli-runopts.c
|
||||
@@ -530,53 +530,42 @@ static void loadidentityfile(const char* filename, int warnfail) {
|
||||
|
||||
static char*
|
||||
multihop_passthrough_args() {
|
||||
- char *ret;
|
||||
+ char *ret, args[256];
|
||||
unsigned int len, total;
|
||||
m_list_elem *iter;
|
||||
/* Fill out -i, -y, -W options that make sense for all
|
||||
- * the intermediate processes */
|
||||
- len = 30; /* space for "-q -y -y -W <size>\0" */
|
||||
-#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||
- for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
|
||||
- {
|
||||
- sign_key * key = (sign_key*)iter->item;
|
||||
- len += 3 + strlen(key->filename);
|
||||
- }
|
||||
-#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
|
||||
- if (cli_opts.proxycmd) {
|
||||
- /* "-J 'cmd'" */
|
||||
- len += 6 + strlen(cli_opts.proxycmd);
|
||||
- }
|
||||
-
|
||||
- ret = m_malloc(len);
|
||||
+ * the intermediate processes */
|
||||
total = 0;
|
||||
+ len = 255;
|
||||
|
||||
if (cli_opts.quiet) {
|
||||
- total += m_snprintf(ret+total, len-total, "-q ");
|
||||
+ total += m_snprintf(args+total, len-total, "-q ");
|
||||
}
|
||||
|
||||
if (cli_opts.no_hostkey_check) {
|
||||
- total += m_snprintf(ret+total, len-total, "-y -y ");
|
||||
+ total += m_snprintf(args+total, len-total, "-y -y ");
|
||||
} else if (cli_opts.always_accept_key) {
|
||||
- total += m_snprintf(ret+total, len-total, "-y ");
|
||||
+ total += m_snprintf(args+total, len-total, "-y ");
|
||||
}
|
||||
|
||||
if (cli_opts.proxycmd) {
|
||||
- total += m_snprintf(ret+total, len-total, "-J '%s' ", cli_opts.proxycmd);
|
||||
+ total += m_snprintf(args+total, len-total, "-J '%s' ", cli_opts.proxycmd);
|
||||
}
|
||||
|
||||
if (opts.recv_window != DEFAULT_RECV_WINDOW) {
|
||||
- total += m_snprintf(ret+total, len-total, "-W %u ", opts.recv_window);
|
||||
+ total += m_snprintf(args+total, len-total, "-W %u ", opts.recv_window);
|
||||
}
|
||||
|
||||
#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
|
||||
{
|
||||
sign_key * key = (sign_key*)iter->item;
|
||||
- total += m_snprintf(ret+total, len-total, "-i %s ", key->filename);
|
||||
+ total += m_snprintf(args+total, len-total, "-i %s ", key->filename);
|
||||
}
|
||||
#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
|
||||
|
||||
+ ret = m_malloc(total + 1);
|
||||
+ strcpy(ret,args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From dd03da772bfad6174425066ff9752b60e25ed183 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Ponomarev <stokito@gmail.com>
|
||||
Date: Sun, 7 Apr 2024 21:16:50 +0300
|
||||
Subject: [PATCH] cli-runopts.c add missing DROPBEAR_CLI_PUBKEY_AUTH
|
||||
|
||||
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/dd03da772bfad6174425066ff9752b60e25ed183]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
cli-runopts.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/cli-runopts.c b/cli-runopts.c
|
||||
index 219fc53..b853a13 100644
|
||||
--- a/cli-runopts.c
|
||||
+++ b/cli-runopts.c
|
||||
@@ -541,11 +541,13 @@ static char* multihop_passthrough_args(void) {
|
||||
if (cli_opts.proxycmd) {
|
||||
len += strlen(cli_opts.proxycmd);
|
||||
}
|
||||
+#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
|
||||
{
|
||||
sign_key * key = (sign_key*)iter->item;
|
||||
len += 4 + strlen(key->filename);
|
||||
}
|
||||
+#endif
|
||||
|
||||
args = m_malloc(len);
|
||||
total = 0;
|
||||
367
meta/recipes-core/dropbear/dropbear/CVE-2025-47203.patch
Normal file
367
meta/recipes-core/dropbear/dropbear/CVE-2025-47203.patch
Normal file
@@ -0,0 +1,367 @@
|
||||
From e5a0ef27c227f7ae69d9a9fec98a056494409b9b Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnston <matt@ucc.asn.au>
|
||||
Date: Mon, 5 May 2025 23:14:19 +0800
|
||||
Subject: [PATCH] Execute multihop commands directly, no shell
|
||||
|
||||
This avoids problems with shell escaping if arguments contain special
|
||||
characters.
|
||||
|
||||
CVE: CVE-2025-47203
|
||||
Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/e5a0ef27c227f7ae69d9a9fec98a056494409b9b]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
cli-main.c | 59 +++++++++++++++++++----------
|
||||
cli-runopts.c | 100 +++++++++++++++++++++++++++++---------------------
|
||||
dbutil.c | 9 ++++-
|
||||
dbutil.h | 1 +
|
||||
runopts.h | 5 +++
|
||||
5 files changed, 112 insertions(+), 62 deletions(-)
|
||||
|
||||
diff --git a/cli-main.c b/cli-main.c
|
||||
index 065fd76..2fafa88 100644
|
||||
--- a/cli-main.c
|
||||
+++ b/cli-main.c
|
||||
@@ -77,9 +77,8 @@ int main(int argc, char ** argv) {
|
||||
}
|
||||
|
||||
#if DROPBEAR_CLI_PROXYCMD
|
||||
- if (cli_opts.proxycmd) {
|
||||
+ if (cli_opts.proxycmd || cli_opts.proxyexec) {
|
||||
cli_proxy_cmd(&sock_in, &sock_out, &proxy_cmd_pid);
|
||||
- m_free(cli_opts.proxycmd);
|
||||
if (signal(SIGINT, kill_proxy_sighandler) == SIG_ERR ||
|
||||
signal(SIGTERM, kill_proxy_sighandler) == SIG_ERR ||
|
||||
signal(SIGHUP, kill_proxy_sighandler) == SIG_ERR) {
|
||||
@@ -101,7 +100,8 @@ int main(int argc, char ** argv) {
|
||||
}
|
||||
#endif /* DBMULTI stuff */
|
||||
|
||||
-static void exec_proxy_cmd(const void *user_data_cmd) {
|
||||
+#if DROPBEAR_CLI_PROXYCMD
|
||||
+static void shell_proxy_cmd(const void *user_data_cmd) {
|
||||
const char *cmd = user_data_cmd;
|
||||
char *usershell;
|
||||
|
||||
@@ -110,41 +110,62 @@ static void exec_proxy_cmd(const void *user_data_cmd) {
|
||||
dropbear_exit("Failed to run '%s'\n", cmd);
|
||||
}
|
||||
|
||||
-#if DROPBEAR_CLI_PROXYCMD
|
||||
+static void exec_proxy_cmd(const void *unused) {
|
||||
+ (void)unused;
|
||||
+ run_command(cli_opts.proxyexec[0], cli_opts.proxyexec, ses.maxfd);
|
||||
+ dropbear_exit("Failed to run '%s'\n", cli_opts.proxyexec[0]);
|
||||
+}
|
||||
+
|
||||
static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
|
||||
- char * ex_cmd = NULL;
|
||||
- size_t ex_cmdlen;
|
||||
+ char * cmd_arg = NULL;
|
||||
+ void (*exec_fn)(const void *user_data) = NULL;
|
||||
int ret;
|
||||
|
||||
+ /* exactly one of cli_opts.proxycmd or cli_opts.proxyexec should be set */
|
||||
+
|
||||
/* File descriptor "-j &3" */
|
||||
- if (*cli_opts.proxycmd == '&') {
|
||||
+ if (cli_opts.proxycmd && *cli_opts.proxycmd == '&') {
|
||||
char *p = cli_opts.proxycmd + 1;
|
||||
int sock = strtoul(p, &p, 10);
|
||||
/* must be a single number, and not stdin/stdout/stderr */
|
||||
if (sock > 2 && sock < 1024 && *p == '\0') {
|
||||
*sock_in = sock;
|
||||
*sock_out = sock;
|
||||
- return;
|
||||
+ goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
- /* Normal proxycommand */
|
||||
+ if (cli_opts.proxycmd) {
|
||||
+ /* Normal proxycommand */
|
||||
+ size_t shell_cmdlen;
|
||||
+ /* So that spawn_command knows which shell to run */
|
||||
+ fill_passwd(cli_opts.own_user);
|
||||
|
||||
- /* So that spawn_command knows which shell to run */
|
||||
- fill_passwd(cli_opts.own_user);
|
||||
+ shell_cmdlen = strlen(cli_opts.proxycmd) + 6; /* "exec " + command + '\0' */
|
||||
+ cmd_arg = m_malloc(shell_cmdlen);
|
||||
+ snprintf(cmd_arg, shell_cmdlen, "exec %s", cli_opts.proxycmd);
|
||||
+ exec_fn = shell_proxy_cmd;
|
||||
+ } else {
|
||||
+ /* No shell */
|
||||
+ exec_fn = exec_proxy_cmd;
|
||||
+ }
|
||||
|
||||
- ex_cmdlen = strlen(cli_opts.proxycmd) + 6; /* "exec " + command + '\0' */
|
||||
- ex_cmd = m_malloc(ex_cmdlen);
|
||||
- snprintf(ex_cmd, ex_cmdlen, "exec %s", cli_opts.proxycmd);
|
||||
-
|
||||
- ret = spawn_command(exec_proxy_cmd, ex_cmd,
|
||||
- sock_out, sock_in, NULL, pid_out);
|
||||
- DEBUG1(("cmd: %s pid=%d", ex_cmd,*pid_out))
|
||||
- m_free(ex_cmd);
|
||||
+ ret = spawn_command(exec_fn, cmd_arg, sock_out, sock_in, NULL, pid_out);
|
||||
if (ret == DROPBEAR_FAILURE) {
|
||||
dropbear_exit("Failed running proxy command");
|
||||
*sock_in = *sock_out = -1;
|
||||
}
|
||||
+
|
||||
+cleanup:
|
||||
+ m_free(cli_opts.proxycmd);
|
||||
+ m_free(cmd_arg);
|
||||
+ if (cli_opts.proxyexec) {
|
||||
+ char **a = NULL;
|
||||
+ for (a = cli_opts.proxyexec; *a; a++) {
|
||||
+ m_free_direct(*a);
|
||||
+ }
|
||||
+ m_free(cli_opts.proxyexec);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void kill_proxy_sighandler(int UNUSED(signo)) {
|
||||
diff --git a/cli-runopts.c b/cli-runopts.c
|
||||
index 6668aee..b9add84 100644
|
||||
--- a/cli-runopts.c
|
||||
+++ b/cli-runopts.c
|
||||
@@ -530,58 +530,81 @@ static void loadidentityfile(const char* filename, int warnfail) {
|
||||
|
||||
/* Fill out -i, -y, -W options that make sense for all
|
||||
* the intermediate processes */
|
||||
-static char* multihop_passthrough_args(void) {
|
||||
- char *args = NULL;
|
||||
- unsigned int len, total;
|
||||
+static char** multihop_args(const char* argv0, const char* prior_hops) {
|
||||
+ /* null terminated array */
|
||||
+ char **args = NULL;
|
||||
+ size_t max_args = 14, pos = 0, len;
|
||||
#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||
m_list_elem *iter;
|
||||
#endif
|
||||
- /* Sufficient space for non-string args */
|
||||
- len = 100;
|
||||
|
||||
- /* String arguments have arbitrary length, so determine space required */
|
||||
- if (cli_opts.proxycmd) {
|
||||
- len += strlen(cli_opts.proxycmd);
|
||||
- }
|
||||
#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
|
||||
{
|
||||
- sign_key * key = (sign_key*)iter->item;
|
||||
- len += 4 + strlen(key->filename);
|
||||
+ /* "-i file" for each */
|
||||
+ max_args += 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
- args = m_malloc(len);
|
||||
- total = 0;
|
||||
+ args = m_malloc(sizeof(char*) * max_args);
|
||||
+ pos = 0;
|
||||
|
||||
- /* Create new argument string */
|
||||
+ args[pos] = m_strdup(argv0);
|
||||
+ pos++;
|
||||
|
||||
if (cli_opts.quiet) {
|
||||
- total += m_snprintf(args+total, len-total, "-q ");
|
||||
+ args[pos] = m_strdup("-q");
|
||||
+ pos++;
|
||||
}
|
||||
|
||||
if (cli_opts.no_hostkey_check) {
|
||||
- total += m_snprintf(args+total, len-total, "-y -y ");
|
||||
+ args[pos] = m_strdup("-y");
|
||||
+ pos++;
|
||||
+ args[pos] = m_strdup("-y");
|
||||
+ pos++;
|
||||
} else if (cli_opts.always_accept_key) {
|
||||
- total += m_snprintf(args+total, len-total, "-y ");
|
||||
+ args[pos] = m_strdup("-y");
|
||||
+ pos++;
|
||||
}
|
||||
|
||||
if (cli_opts.proxycmd) {
|
||||
- total += m_snprintf(args+total, len-total, "-J '%s' ", cli_opts.proxycmd);
|
||||
+ args[pos] = m_strdup("-J");
|
||||
+ pos++;
|
||||
+ args[pos] = m_strdup(cli_opts.proxycmd);
|
||||
+ pos++;
|
||||
}
|
||||
|
||||
if (opts.recv_window != DEFAULT_RECV_WINDOW) {
|
||||
- total += m_snprintf(args+total, len-total, "-W %u ", opts.recv_window);
|
||||
+ args[pos] = m_strdup("-W");
|
||||
+ pos++;
|
||||
+ args[pos] = m_malloc(11);
|
||||
+ m_snprintf(args[pos], 11, "%u", opts.recv_window);
|
||||
+ pos++;
|
||||
}
|
||||
|
||||
#if DROPBEAR_CLI_PUBKEY_AUTH
|
||||
for (iter = cli_opts.privkeys->first; iter; iter = iter->next)
|
||||
{
|
||||
sign_key * key = (sign_key*)iter->item;
|
||||
- total += m_snprintf(args+total, len-total, "-i %s ", key->filename);
|
||||
+ args[pos] = m_strdup("-i");
|
||||
+ pos++;
|
||||
+ args[pos] = m_strdup(key->filename);
|
||||
+ pos++;
|
||||
}
|
||||
#endif /* DROPBEAR_CLI_PUBKEY_AUTH */
|
||||
|
||||
+ /* last hop */
|
||||
+ args[pos] = m_strdup("-B");
|
||||
+ pos++;
|
||||
+ len = strlen(cli_opts.remotehost) + strlen(cli_opts.remoteport) + 2;
|
||||
+ args[pos] = m_malloc(len);
|
||||
+ snprintf(args[pos], len, "%s:%s", cli_opts.remotehost, cli_opts.remoteport);
|
||||
+ pos++;
|
||||
+
|
||||
+ /* hostnames of prior hops */
|
||||
+ args[pos] = m_strdup(prior_hops);
|
||||
+ pos++;
|
||||
+
|
||||
return args;
|
||||
}
|
||||
|
||||
@@ -596,7 +619,7 @@ static char* multihop_passthrough_args(void) {
|
||||
* etc for as many hosts as we want.
|
||||
*
|
||||
* Note that "-J" arguments aren't actually used, instead
|
||||
- * below sets cli_opts.proxycmd directly.
|
||||
+ * below sets cli_opts.proxyexec directly.
|
||||
*
|
||||
* Ports for hosts can be specified as host/port.
|
||||
*/
|
||||
@@ -604,7 +627,7 @@ static void parse_multihop_hostname(const char* orighostarg, const char* argv0)
|
||||
char *userhostarg = NULL;
|
||||
char *hostbuf = NULL;
|
||||
char *last_hop = NULL;
|
||||
- char *remainder = NULL;
|
||||
+ char *prior_hops = NULL;
|
||||
|
||||
/* both scp and rsync parse a user@host argument
|
||||
* and turn it into "-l user host". This breaks
|
||||
@@ -622,6 +645,8 @@ static void parse_multihop_hostname(const char* orighostarg, const char* argv0)
|
||||
}
|
||||
userhostarg = hostbuf;
|
||||
|
||||
+ /* Split off any last hostname and use that as remotehost/remoteport.
|
||||
+ * That is used for authorized_keys checking etc */
|
||||
last_hop = strrchr(userhostarg, ',');
|
||||
if (last_hop) {
|
||||
if (last_hop == userhostarg) {
|
||||
@@ -629,35 +654,28 @@ static void parse_multihop_hostname(const char* orighostarg, const char* argv0)
|
||||
}
|
||||
*last_hop = '\0';
|
||||
last_hop++;
|
||||
- remainder = userhostarg;
|
||||
+ prior_hops = userhostarg;
|
||||
userhostarg = last_hop;
|
||||
}
|
||||
|
||||
+ /* Update cli_opts.remotehost and cli_opts.remoteport */
|
||||
parse_hostname(userhostarg);
|
||||
|
||||
- if (last_hop) {
|
||||
- /* Set up the proxycmd */
|
||||
- unsigned int cmd_len = 0;
|
||||
- char *passthrough_args = multihop_passthrough_args();
|
||||
- if (cli_opts.remoteport == NULL) {
|
||||
- cli_opts.remoteport = "22";
|
||||
+ /* Construct any multihop proxy command. Use proxyexec to
|
||||
+ * avoid worrying about shell escaping. */
|
||||
+ if (prior_hops) {
|
||||
+ cli_opts.proxyexec = multihop_args(argv0, prior_hops);
|
||||
+ /* Any -J argument has been copied to proxyexec */
|
||||
+ if (cli_opts.proxycmd) {
|
||||
+ m_free(cli_opts.proxycmd);
|
||||
}
|
||||
- cmd_len = strlen(argv0) + strlen(remainder)
|
||||
- + strlen(cli_opts.remotehost) + strlen(cli_opts.remoteport)
|
||||
- + strlen(passthrough_args)
|
||||
- + 30;
|
||||
- /* replace proxycmd. old -J arguments have been copied
|
||||
- to passthrough_args */
|
||||
- cli_opts.proxycmd = m_realloc(cli_opts.proxycmd, cmd_len);
|
||||
- m_snprintf(cli_opts.proxycmd, cmd_len, "%s -B %s:%s %s %s",
|
||||
- argv0, cli_opts.remotehost, cli_opts.remoteport,
|
||||
- passthrough_args, remainder);
|
||||
+
|
||||
#ifndef DISABLE_ZLIB
|
||||
- /* The stream will be incompressible since it's encrypted. */
|
||||
+ /* This outer stream will be incompressible since it's encrypted. */
|
||||
opts.compress_mode = DROPBEAR_COMPRESS_OFF;
|
||||
#endif
|
||||
- m_free(passthrough_args);
|
||||
}
|
||||
+
|
||||
m_free(hostbuf);
|
||||
}
|
||||
#endif /* !DROPBEAR_CLI_MULTIHOP */
|
||||
diff --git a/dbutil.c b/dbutil.c
|
||||
index bd66454..910fa27 100644
|
||||
--- a/dbutil.c
|
||||
+++ b/dbutil.c
|
||||
@@ -371,7 +371,6 @@ int spawn_command(void(*exec_fn)(const void *user_data), const void *exec_data,
|
||||
void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell) {
|
||||
char * argv[4];
|
||||
char * baseshell = NULL;
|
||||
- unsigned int i;
|
||||
|
||||
baseshell = basename(usershell);
|
||||
|
||||
@@ -393,6 +392,12 @@ void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell) {
|
||||
argv[1] = NULL;
|
||||
}
|
||||
|
||||
+ run_command(usershell, argv, maxfd);
|
||||
+}
|
||||
+
|
||||
+void run_command(const char* argv0, char** args, unsigned int maxfd) {
|
||||
+ unsigned int i;
|
||||
+
|
||||
/* Re-enable SIGPIPE for the executed process */
|
||||
if (signal(SIGPIPE, SIG_DFL) == SIG_ERR) {
|
||||
dropbear_exit("signal() error");
|
||||
@@ -404,7 +409,7 @@ void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell) {
|
||||
m_close(i);
|
||||
}
|
||||
|
||||
- execv(usershell, argv);
|
||||
+ execv(argv0, args);
|
||||
}
|
||||
|
||||
#if DEBUG_TRACE
|
||||
diff --git a/dbutil.h b/dbutil.h
|
||||
index 64af170..bfc1f1f 100644
|
||||
--- a/dbutil.h
|
||||
+++ b/dbutil.h
|
||||
@@ -63,6 +63,7 @@ char * stripcontrol(const char * text);
|
||||
int spawn_command(void(*exec_fn)(const void *user_data), const void *exec_data,
|
||||
int *writefd, int *readfd, int *errfd, pid_t *pid);
|
||||
void run_shell_command(const char* cmd, unsigned int maxfd, char* usershell);
|
||||
+void run_command(const char* argv0, char** args, unsigned int maxfd);
|
||||
#if ENABLE_CONNECT_UNIX
|
||||
int connect_unix(const char* addr);
|
||||
#endif
|
||||
diff --git a/runopts.h b/runopts.h
|
||||
index 1675836..11c3ef2 100644
|
||||
--- a/runopts.h
|
||||
+++ b/runopts.h
|
||||
@@ -188,7 +188,12 @@ typedef struct cli_runopts {
|
||||
unsigned int netcat_port;
|
||||
#endif
|
||||
#if DROPBEAR_CLI_PROXYCMD
|
||||
+ /* A proxy command to run via the user's shell */
|
||||
char *proxycmd;
|
||||
+#endif
|
||||
+#if DROPBEAR_CLI_MULTIHOP
|
||||
+ /* Similar to proxycmd, but is arguments for execve(), not shell */
|
||||
+ char **proxyexec;
|
||||
#endif
|
||||
char *bind_address;
|
||||
char *bind_port;
|
||||
@@ -24,6 +24,11 @@ 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-2023-36328.patch \
|
||||
file://CVE-2023-48795.patch \
|
||||
file://0001-add-o-BatchMode-and-also-forward-this-when-multihop-.patch \
|
||||
file://0001-Handle-arbitrary-length-paths-and-commands-in-multih.patch \
|
||||
file://0001-cli-runopts.c-add-missing-DROPBEAR_CLI_PUBKEY_AUTH.patch \
|
||||
file://0001-Avoid-unused-variable-with-DROPBEAR_CLI_PUBKEY_AUTH-.patch \
|
||||
file://CVE-2025-47203.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b"
|
||||
|
||||
35
meta/recipes-core/expat/expat/CVE-2024-8176-03.patch
Normal file
35
meta/recipes-core/expat/expat/CVE-2024-8176-03.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From ba80428c2207259103b73871d447dee34755340c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Berkay=20Eren=20=C3=9Cr=C3=BCn?= <berkay.ueruen@tum.de>
|
||||
Date: Tue, 23 Sep 2025 11:22:14 +0200
|
||||
Subject: [PATCH] lib: Fix detection of asynchronous tags in entities
|
||||
|
||||
According to the XML standard, tags must be closed within the same
|
||||
element in which they are opened. Since the change of the entity
|
||||
processing method in version 2.7.0, violations of this rule have not
|
||||
been handled correctly for entities.
|
||||
|
||||
This commit adds the required checks to detect any violations and
|
||||
restores the correct behaviour.
|
||||
|
||||
CVE: CVE-2024-8176
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1059]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
lib/xmlparse.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
|
||||
index ce29ab6f..ba4e3c48 100644
|
||||
--- a/lib/xmlparse.c
|
||||
+++ b/lib/xmlparse.c
|
||||
@@ -6087,6 +6087,10 @@ internalEntityProcessor(XML_Parser parser, const char *s, const char *end,
|
||||
// process its possible inner entities (which are added to the
|
||||
// m_openInternalEntities during doProlog or doContent calls above)
|
||||
entity->hasMore = XML_FALSE;
|
||||
+ if (! entity->is_param
|
||||
+ && (openEntity->startTagLevel != parser->m_tagLevel)) {
|
||||
+ return XML_ERROR_ASYNC_ENTITY;
|
||||
+ }
|
||||
triggerReenter(parser);
|
||||
return result;
|
||||
} // End of entity processing, "if" block will return here
|
||||
115
meta/recipes-core/expat/expat/CVE-2024-8176-04.patch
Normal file
115
meta/recipes-core/expat/expat/CVE-2024-8176-04.patch
Normal file
@@ -0,0 +1,115 @@
|
||||
From 81a114f7eebcd41a6993337128cda337986a26f4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Pipping <sebastian@pipping.org>
|
||||
Date: Mon, 15 Sep 2025 21:57:07 +0200
|
||||
Subject: [PATCH] tests: Cover XML_ERROR_ASYNC_ENTITY cases
|
||||
|
||||
CVE: CVE-2024-8176
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1059]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
tests/misc_tests.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 87 insertions(+)
|
||||
|
||||
diff --git a/tests/misc_tests.c b/tests/misc_tests.c
|
||||
index 3346bce6..19f41df7 100644
|
||||
--- a/tests/misc_tests.c
|
||||
+++ b/tests/misc_tests.c
|
||||
@@ -621,6 +621,91 @@ START_TEST(test_misc_expected_event_ptr_issue_980) {
|
||||
}
|
||||
END_TEST
|
||||
|
||||
+START_TEST(test_misc_sync_entity_tolerated) {
|
||||
+ const char *const doc = "<!DOCTYPE t0 [\n"
|
||||
+ " <!ENTITY a '<t1></t1>'>\n"
|
||||
+ " <!ENTITY b '<t2>two</t2>'>\n"
|
||||
+ " <!ENTITY c '<t3>three<t4>four</t4>three</t3>'>\n"
|
||||
+ " <!ENTITY d '<t5>&b;</t5>'>\n"
|
||||
+ "]>\n"
|
||||
+ "<t0>&a;&b;&c;&d;</t0>\n";
|
||||
+ XML_Parser parser = XML_ParserCreate(NULL);
|
||||
+
|
||||
+ assert_true(_XML_Parse_SINGLE_BYTES(parser, doc, (int)strlen(doc),
|
||||
+ /*isFinal=*/XML_TRUE)
|
||||
+ == XML_STATUS_OK);
|
||||
+
|
||||
+ XML_ParserFree(parser);
|
||||
+}
|
||||
+END_TEST
|
||||
+
|
||||
+START_TEST(test_misc_async_entity_rejected) {
|
||||
+ struct test_case {
|
||||
+ const char *doc;
|
||||
+ enum XML_Status expectedStatusNoGE;
|
||||
+ enum XML_Error expectedErrorNoGE;
|
||||
+ };
|
||||
+ const struct test_case cases[] = {
|
||||
+ // Opened by one entity, closed by another
|
||||
+ {"<!DOCTYPE t0 [\n"
|
||||
+ " <!ENTITY open '<t1>'>\n"
|
||||
+ " <!ENTITY close '</t1>'>\n"
|
||||
+ "]>\n"
|
||||
+ "<t0>&open;&close;</t0>\n",
|
||||
+ XML_STATUS_OK, XML_ERROR_NONE},
|
||||
+ // Opened by tag, closed by entity (non-root case)
|
||||
+ {"<!DOCTYPE t0 [\n"
|
||||
+ " <!ENTITY g0 ''>\n"
|
||||
+ " <!ENTITY g1 '&g0;</t1>'>\n"
|
||||
+ "]>\n"
|
||||
+ "<t0><t1>&g1;</t0>\n",
|
||||
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
|
||||
+ // Opened by tag, closed by entity (root case)
|
||||
+ {"<!DOCTYPE t0 [\n"
|
||||
+ " <!ENTITY g0 ''>\n"
|
||||
+ " <!ENTITY g1 '&g0;</t0>'>\n"
|
||||
+ "]>\n"
|
||||
+ "<t0>&g1;\n",
|
||||
+ XML_STATUS_ERROR, XML_ERROR_NO_ELEMENTS},
|
||||
+ // Opened by entity, closed by tag <-- regression from 2.7.0
|
||||
+ {"<!DOCTYPE t0 [\n"
|
||||
+ " <!ENTITY g0 ''>\n"
|
||||
+ " <!ENTITY g1 '<t1>&g0;'>\n"
|
||||
+ "]>\n"
|
||||
+ "<t0>&g1;</t1></t0>\n",
|
||||
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
|
||||
+ // Opened by tag, closed by entity; then the other way around
|
||||
+ {"<!DOCTYPE t0 [\n"
|
||||
+ " <!ENTITY open '<t1>'>\n"
|
||||
+ " <!ENTITY close '</t1>'>\n"
|
||||
+ "]>\n"
|
||||
+ "<t0><t1>&close;&open;</t1></t0>\n",
|
||||
+ XML_STATUS_OK, XML_ERROR_NONE},
|
||||
+ };
|
||||
+
|
||||
+ for (size_t i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) {
|
||||
+ const struct test_case testCase = cases[i];
|
||||
+ set_subtest("cases[%d]", (int)i);
|
||||
+
|
||||
+ const char *const doc = testCase.doc;
|
||||
+#if XML_GE == 1
|
||||
+ const enum XML_Status expectedStatus = XML_STATUS_ERROR;
|
||||
+ const enum XML_Error expectedError = XML_ERROR_ASYNC_ENTITY;
|
||||
+#else
|
||||
+ const enum XML_Status expectedStatus = testCase.expectedStatusNoGE;
|
||||
+ const enum XML_Error expectedError = testCase.expectedErrorNoGE;
|
||||
+#endif
|
||||
+
|
||||
+ XML_Parser parser = XML_ParserCreate(NULL);
|
||||
+ assert_true(_XML_Parse_SINGLE_BYTES(parser, doc, (int)strlen(doc),
|
||||
+ /*isFinal=*/XML_TRUE)
|
||||
+ == expectedStatus);
|
||||
+ assert_true(XML_GetErrorCode(parser) == expectedError);
|
||||
+ XML_ParserFree(parser);
|
||||
+ }
|
||||
+}
|
||||
+END_TEST
|
||||
+
|
||||
void
|
||||
make_miscellaneous_test_case(Suite *s) {
|
||||
TCase *tc_misc = tcase_create("miscellaneous tests");
|
||||
@@ -649,4 +734,6 @@ make_miscellaneous_test_case(Suite *s) {
|
||||
tcase_add_test(tc_misc, test_misc_stopparser_rejects_unstarted_parser);
|
||||
tcase_add_test__if_xml_ge(tc_misc, test_renter_loop_finite_content);
|
||||
tcase_add_test(tc_misc, test_misc_expected_event_ptr_issue_980);
|
||||
+ tcase_add_test(tc_misc, test_misc_sync_entity_tolerated);
|
||||
+ tcase_add_test(tc_misc, test_misc_async_entity_rejected);
|
||||
}
|
||||
78
meta/recipes-core/expat/expat/CVE-2024-8176-05.patch
Normal file
78
meta/recipes-core/expat/expat/CVE-2024-8176-05.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
From a9aaf85cfc3025b7013b5adc4bef2ce32ecc7fb1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Berkay=20Eren=20=C3=9Cr=C3=BCn?= <berkay.ueruen@tum.de>
|
||||
Date: Tue, 23 Sep 2025 12:12:50 +0200
|
||||
Subject: [PATCH] tests: Add line/column checks to async entity tests
|
||||
|
||||
CVE: CVE-2024-8176
|
||||
Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1059]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
tests/misc_tests.c | 17 ++++++++++++-----
|
||||
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tests/misc_tests.c b/tests/misc_tests.c
|
||||
index 19f41df7..7a4d2455 100644
|
||||
--- a/tests/misc_tests.c
|
||||
+++ b/tests/misc_tests.c
|
||||
@@ -644,6 +644,8 @@ START_TEST(test_misc_async_entity_rejected) {
|
||||
const char *doc;
|
||||
enum XML_Status expectedStatusNoGE;
|
||||
enum XML_Error expectedErrorNoGE;
|
||||
+ XML_Size expectedErrorLine;
|
||||
+ XML_Size expectedErrorColumn;
|
||||
};
|
||||
const struct test_case cases[] = {
|
||||
// Opened by one entity, closed by another
|
||||
@@ -652,35 +654,35 @@ START_TEST(test_misc_async_entity_rejected) {
|
||||
" <!ENTITY close '</t1>'>\n"
|
||||
"]>\n"
|
||||
"<t0>&open;&close;</t0>\n",
|
||||
- XML_STATUS_OK, XML_ERROR_NONE},
|
||||
+ XML_STATUS_OK, XML_ERROR_NONE, 5, 4},
|
||||
// Opened by tag, closed by entity (non-root case)
|
||||
{"<!DOCTYPE t0 [\n"
|
||||
" <!ENTITY g0 ''>\n"
|
||||
" <!ENTITY g1 '&g0;</t1>'>\n"
|
||||
"]>\n"
|
||||
"<t0><t1>&g1;</t0>\n",
|
||||
- XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
|
||||
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH, 5, 8},
|
||||
// Opened by tag, closed by entity (root case)
|
||||
{"<!DOCTYPE t0 [\n"
|
||||
" <!ENTITY g0 ''>\n"
|
||||
" <!ENTITY g1 '&g0;</t0>'>\n"
|
||||
"]>\n"
|
||||
"<t0>&g1;\n",
|
||||
- XML_STATUS_ERROR, XML_ERROR_NO_ELEMENTS},
|
||||
+ XML_STATUS_ERROR, XML_ERROR_NO_ELEMENTS, 5, 4},
|
||||
// Opened by entity, closed by tag <-- regression from 2.7.0
|
||||
{"<!DOCTYPE t0 [\n"
|
||||
" <!ENTITY g0 ''>\n"
|
||||
" <!ENTITY g1 '<t1>&g0;'>\n"
|
||||
"]>\n"
|
||||
"<t0>&g1;</t1></t0>\n",
|
||||
- XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH},
|
||||
+ XML_STATUS_ERROR, XML_ERROR_TAG_MISMATCH, 5, 4},
|
||||
// Opened by tag, closed by entity; then the other way around
|
||||
{"<!DOCTYPE t0 [\n"
|
||||
" <!ENTITY open '<t1>'>\n"
|
||||
" <!ENTITY close '</t1>'>\n"
|
||||
"]>\n"
|
||||
"<t0><t1>&close;&open;</t1></t0>\n",
|
||||
- XML_STATUS_OK, XML_ERROR_NONE},
|
||||
+ XML_STATUS_OK, XML_ERROR_NONE, 5, 8},
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) {
|
||||
@@ -701,6 +703,11 @@ START_TEST(test_misc_async_entity_rejected) {
|
||||
/*isFinal=*/XML_TRUE)
|
||||
== expectedStatus);
|
||||
assert_true(XML_GetErrorCode(parser) == expectedError);
|
||||
+#if XML_GE == 1
|
||||
+ assert_true(XML_GetCurrentLineNumber(parser) == testCase.expectedErrorLine);
|
||||
+ assert_true(XML_GetCurrentColumnNumber(parser)
|
||||
+ == testCase.expectedErrorColumn);
|
||||
+#endif
|
||||
XML_ParserFree(parser);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,9 @@ SRC_URI = "${GITHUB_BASE_URI}/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \
|
||||
file://0001-tests-Cover-indirect-entity-recursion.patch;striplevel=2 \
|
||||
file://CVE-2024-8176-01.patch;striplevel=2 \
|
||||
file://CVE-2024-8176-02.patch;striplevel=2 \
|
||||
file://CVE-2024-8176-03.patch \
|
||||
file://CVE-2024-8176-04.patch \
|
||||
file://CVE-2024-8176-05.patch \
|
||||
"
|
||||
|
||||
GITHUB_BASE_URI = "https://github.com/libexpat/libexpat/releases/"
|
||||
|
||||
69
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-6052-01.patch
Normal file
69
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-6052-01.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
From 987309f23ada52592bffdb5db0d8a5d58bd8097b Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <pwithnall@gnome.org>
|
||||
Date: Tue, 3 Jun 2025 11:31:04 +0100
|
||||
Subject: [PATCH] gstring: Fix overflow check when expanding the string
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
After commit 34b7992fd6e3894bf6d2229b8aa59cac34bcb1b5 the overflow check
|
||||
was only done when expanding the string, but we need to do it before
|
||||
checking whether to expand the string, otherwise that calculation could
|
||||
overflow and falsely decide that the string is big enough already.
|
||||
|
||||
As a concrete example, consider a `GString` which has:
|
||||
* `.len = G_MAXSIZE / 2 + 1`
|
||||
* `.allocated_len = G_MAXSIZE / 2 + 1`
|
||||
and `g_string_append()` is called on it with an input string of length
|
||||
`G_MAXSIZE / 2`.
|
||||
|
||||
This results in a call `g_string_maybe_expand (string, G_MAXSIZE / 2)`,
|
||||
which calculates `string->len + len` as `(G_MAXSIZE / 2 + 1) +
|
||||
(G_MAXSIZE / 2)` which evaluates to `1` as it overflows. This is not
|
||||
greater than `string->allocated_len` (which is `G_MAXSIZE / 2 + 1`), so
|
||||
`g_string_expand()` is *not* called, and `g_string_maybe_expand()`
|
||||
returns successfully. The caller then assumes that there’s enough space
|
||||
in the buffer, and happily continues to cause a buffer overflow.
|
||||
|
||||
It’s unlikely anyone could hit this in practice because it requires
|
||||
ludicrously big strings and `GString` allocations, which likely would
|
||||
have been blocked by other code, but if we’re going to have the overflow
|
||||
checks in `GString` then they should be effective.
|
||||
|
||||
Spotted by code inspection.
|
||||
|
||||
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
|
||||
|
||||
CVE: CVE-2025-6052
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/987309f23ada52592bffdb5db0d8a5d58bd8097b]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gstring.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/glib/gstring.c b/glib/gstring.c
|
||||
index 2a399ee21..8a489ca0d 100644
|
||||
--- a/glib/gstring.c
|
||||
+++ b/glib/gstring.c
|
||||
@@ -78,10 +78,6 @@ static void
|
||||
g_string_expand (GString *string,
|
||||
gsize len)
|
||||
{
|
||||
- /* Detect potential overflow */
|
||||
- if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
|
||||
- g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
|
||||
-
|
||||
string->allocated_len = g_nearest_pow (string->len + len + 1);
|
||||
/* If the new size is bigger than G_MAXSIZE / 2, only allocate enough
|
||||
* memory for this string and don't over-allocate.
|
||||
@@ -96,6 +92,10 @@ static inline void
|
||||
g_string_maybe_expand (GString *string,
|
||||
gsize len)
|
||||
{
|
||||
+ /* Detect potential overflow */
|
||||
+ if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
|
||||
+ g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
|
||||
+
|
||||
if (G_UNLIKELY (string->len + len >= string->allocated_len))
|
||||
g_string_expand (string, len);
|
||||
}
|
||||
97
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-6052-02.patch
Normal file
97
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-6052-02.patch
Normal file
@@ -0,0 +1,97 @@
|
||||
From 6aa97beda32bb337370858862f4efe2f3372619f Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Date: Mon, 7 Jul 2025 20:52:24 +0200
|
||||
Subject: [PATCH] gstring: Fix g_string_sized_new segmentation fault
|
||||
|
||||
If glib is compiled with -Dglib_assert=false, i.e. no asserts
|
||||
enabled, then g_string_sized_new(G_MAXSIZE) leads to a segmentation
|
||||
fault due to an out of boundary write.
|
||||
|
||||
This happens because the overflow check was moved into
|
||||
g_string_maybe_expand which is not called by g_string_sized_new.
|
||||
|
||||
By assuming that string->allocated_len is always larger than
|
||||
string->len (and the code would be in huge trouble if that is not true),
|
||||
the G_UNLIKELY check in g_string_maybe_expand can be rephrased to
|
||||
avoid a potential G_MAXSIZE overflow.
|
||||
|
||||
This in turn leads to 150-200 bytes smaller compiled library
|
||||
depending on gcc and clang versions, and one less check for the most
|
||||
common code paths.
|
||||
|
||||
Reverts https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4655 and
|
||||
reorders internal g_string_maybe_expand check to still fix
|
||||
CVE-2025-6052.
|
||||
|
||||
CVE: CVE-2025-6052
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6aa97beda32bb337370858862f4efe2f3372619f]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gstring.c | 10 +++++-----
|
||||
glib/tests/string.c | 18 ++++++++++++++++++
|
||||
2 files changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/glib/gstring.c b/glib/gstring.c
|
||||
index 010a8e976..24c4bfb40 100644
|
||||
--- a/glib/gstring.c
|
||||
+++ b/glib/gstring.c
|
||||
@@ -78,6 +78,10 @@ static void
|
||||
g_string_expand (GString *string,
|
||||
gsize len)
|
||||
{
|
||||
+ /* Detect potential overflow */
|
||||
+ if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
|
||||
+ g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
|
||||
+
|
||||
string->allocated_len = g_nearest_pow (string->len + len + 1);
|
||||
/* If the new size is bigger than G_MAXSIZE / 2, only allocate enough
|
||||
* memory for this string and don't over-allocate.
|
||||
@@ -92,11 +96,7 @@ static inline void
|
||||
g_string_maybe_expand (GString *string,
|
||||
gsize len)
|
||||
{
|
||||
- /* Detect potential overflow */
|
||||
- if G_UNLIKELY ((G_MAXSIZE - string->len - 1) < len)
|
||||
- g_error ("adding %" G_GSIZE_FORMAT " to string would overflow", len);
|
||||
-
|
||||
- if (G_UNLIKELY (string->len + len >= string->allocated_len))
|
||||
+ if (G_UNLIKELY (len >= string->allocated_len - string->len))
|
||||
g_string_expand (string, len);
|
||||
}
|
||||
|
||||
diff --git a/glib/tests/string.c b/glib/tests/string.c
|
||||
index aa363c57a..e3bc4a02e 100644
|
||||
--- a/glib/tests/string.c
|
||||
+++ b/glib/tests/string.c
|
||||
@@ -743,6 +743,23 @@ test_string_new_take_null (void)
|
||||
g_string_free (g_steal_pointer (&string), TRUE);
|
||||
}
|
||||
|
||||
+static void
|
||||
+test_string_sized_new (void)
|
||||
+{
|
||||
+
|
||||
+ if (g_test_subprocess ())
|
||||
+ {
|
||||
+ GString *string = g_string_sized_new (G_MAXSIZE);
|
||||
+ g_string_free (string, TRUE);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
|
||||
+ g_test_trap_assert_failed ();
|
||||
+ g_test_trap_assert_stderr ("*string would overflow*");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
@@ -772,6 +789,7 @@ main (int argc,
|
||||
g_test_add_func ("/string/test-string-steal", test_string_steal);
|
||||
g_test_add_func ("/string/test-string-new-take", test_string_new_take);
|
||||
g_test_add_func ("/string/test-string-new-take/null", test_string_new_take_null);
|
||||
+ g_test_add_func ("/string/sized-new", test_string_sized_new);
|
||||
|
||||
return g_test_run();
|
||||
}
|
||||
35
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-6052-03.patch
Normal file
35
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-6052-03.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 3752760c5091eaed561ec11636b069e529533514 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Date: Mon, 7 Jul 2025 20:57:41 +0200
|
||||
Subject: [PATCH] gstring: Improve g_string_append_len_inline checks
|
||||
|
||||
Use the same style for the G_LIKELY check here as in g_string_sized_new.
|
||||
The check could overflow on 32 bit systems.
|
||||
|
||||
Also improve the memcpy/memmove check to use memcpy if val itself is
|
||||
adjacent to end + len_unsigned, which means that no overlapping exists.
|
||||
|
||||
CVE: CVE-2025-6052
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/3752760c5091eaed561ec11636b069e529533514]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gstring.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/glib/gstring.h b/glib/gstring.h
|
||||
index e817176c9..c5e64b33a 100644
|
||||
--- a/glib/gstring.h
|
||||
+++ b/glib/gstring.h
|
||||
@@ -228,10 +228,10 @@ g_string_append_len_inline (GString *gstring,
|
||||
else
|
||||
len_unsigned = (gsize) len;
|
||||
|
||||
- if (G_LIKELY (gstring->len + len_unsigned < gstring->allocated_len))
|
||||
+ if (G_LIKELY (len_unsigned < gstring->allocated_len - gstring->len))
|
||||
{
|
||||
char *end = gstring->str + gstring->len;
|
||||
- if (G_LIKELY (val + len_unsigned <= end || val > end + len_unsigned))
|
||||
+ if (G_LIKELY (val + len_unsigned <= end || val >= end + len_unsigned))
|
||||
memcpy (end, val, len_unsigned);
|
||||
else
|
||||
memmove (end, val, len_unsigned);
|
||||
43
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-7039.patch
Normal file
43
meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-7039.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 61e963284889ddb4544e6f1d5261c16120f6fcc3 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Catanzaro <mcatanzaro@redhat.com>
|
||||
Date: Tue, 1 Jul 2025 10:58:07 -0500
|
||||
Subject: [PATCH] gfileutils: fix computation of temporary file name
|
||||
|
||||
We need to ensure that the value we use to index into the letters array
|
||||
is always positive.
|
||||
|
||||
Fixes #3716
|
||||
|
||||
CVE: CVE-2025-7039
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/61e963284889ddb4544e6f1d5261c16120f6fcc3]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
glib/gfileutils.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
|
||||
index c7d3339d1..286b1b154 100644
|
||||
--- a/glib/gfileutils.c
|
||||
+++ b/glib/gfileutils.c
|
||||
@@ -1532,9 +1532,9 @@ get_tmp_file (gchar *tmpl,
|
||||
static const char letters[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
static const int NLETTERS = sizeof (letters) - 1;
|
||||
- gint64 value;
|
||||
- gint64 now_us;
|
||||
- static int counter = 0;
|
||||
+ guint64 value;
|
||||
+ guint64 now_us;
|
||||
+ static guint counter = 0;
|
||||
|
||||
g_return_val_if_fail (tmpl != NULL, -1);
|
||||
|
||||
@@ -1553,7 +1553,7 @@ get_tmp_file (gchar *tmpl,
|
||||
|
||||
for (count = 0; count < 100; value += 7777, ++count)
|
||||
{
|
||||
- gint64 v = value;
|
||||
+ guint64 v = value;
|
||||
|
||||
/* Fill in the random bits. */
|
||||
XXXXXX[0] = letters[v % NLETTERS];
|
||||
@@ -29,6 +29,10 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
|
||||
file://CVE-2025-3360-06.patch \
|
||||
file://CVE-2025-4373-01.patch \
|
||||
file://CVE-2025-4373-02.patch \
|
||||
file://CVE-2025-7039.patch \
|
||||
file://CVE-2025-6052-01.patch \
|
||||
file://CVE-2025-6052-02.patch \
|
||||
file://CVE-2025-6052-03.patch \
|
||||
"
|
||||
SRC_URI:append:class-native = " file://relocate-modules.patch \
|
||||
file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
|
||||
@@ -66,3 +70,5 @@ def find_meson_cross_files(d):
|
||||
python () {
|
||||
find_meson_cross_files(d)
|
||||
}
|
||||
|
||||
CVE_STATUS[CVE-2025-4056] = "not-applicable-platform: Issue only applies on Windows"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SRCBRANCH ?= "release/2.39/master"
|
||||
PV = "2.39+git"
|
||||
SRCREV_glibc ?= "06a70769fd0b2e1f2a3085ad50ab620282bd77b3"
|
||||
SRCREV_glibc ?= "b027d5b145f1b2908f370bdb96dfe40180d0fcb6"
|
||||
SRCREV_localedef ?= "fab74f31b3811df543e24b6de47efdf45b538abc"
|
||||
|
||||
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git;protocol=https"
|
||||
|
||||
@@ -18,7 +18,7 @@ easier access for another. 'ASLR bypass itself is not a vulnerability.'"
|
||||
|
||||
CVE_STATUS_GROUPS += "CVE_STATUS_STABLE_BACKPORTS"
|
||||
CVE_STATUS_STABLE_BACKPORTS = "CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602 CVE-2025-0395 \
|
||||
CVE-2025-4802 CVE-2025-5702"
|
||||
CVE-2025-4802 CVE-2025-5702 CVE-2025-8058"
|
||||
CVE_STATUS_STABLE_BACKPORTS[status] = "cpe-stable-backport: fix available in used git hash"
|
||||
|
||||
DEPENDS += "gperf-native bison-native"
|
||||
|
||||
@@ -26,7 +26,7 @@ inherit core-image setuptools3 features_check
|
||||
|
||||
REQUIRED_DISTRO_FEATURES += "xattr"
|
||||
|
||||
SRCREV ?= "e5c05018e042e762c886c2f5476f2277a787b9c6"
|
||||
SRCREV ?= "517a1206e0e7fbb5d0f05b25a08b0f06462a4b8c"
|
||||
SRC_URI = "git://git.yoctoproject.org/poky;branch=scarthgap \
|
||||
file://Yocto_Build_Appliance.vmx \
|
||||
file://Yocto_Build_Appliance.vmxf \
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
From 71e1e8af5ee46dad1b57bb96cfbf1c3ad21fbd7b Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Fri, 4 Jul 2025 14:28:26 +0200
|
||||
Subject: [PATCH] schematron: Fix memory safety issues in
|
||||
xmlSchematronReportOutput
|
||||
|
||||
Fix use-after-free (CVE-2025-49794) and type confusion (CVE-2025-49796)
|
||||
in xmlSchematronReportOutput.
|
||||
|
||||
Fixes #931.
|
||||
Fixes #933.
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/71e1e8af5ee46dad1b57bb96cfbf1c3ad21fbd7b]
|
||||
CVE: CVE-2025-49794 CVE-2025-49796
|
||||
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
||||
---
|
||||
result/schematron/cve-2025-49794_0.err | 2 ++
|
||||
result/schematron/cve-2025-49796_0.err | 2 ++
|
||||
schematron.c | 49 ++++++++++++++------------
|
||||
test/schematron/cve-2025-49794.sct | 10 ++++++
|
||||
test/schematron/cve-2025-49794_0.xml | 6 ++++
|
||||
test/schematron/cve-2025-49796.sct | 9 +++++
|
||||
test/schematron/cve-2025-49796_0.xml | 3 ++
|
||||
7 files changed, 58 insertions(+), 23 deletions(-)
|
||||
create mode 100644 result/schematron/cve-2025-49794_0.err
|
||||
create mode 100644 result/schematron/cve-2025-49796_0.err
|
||||
create mode 100644 test/schematron/cve-2025-49794.sct
|
||||
create mode 100644 test/schematron/cve-2025-49794_0.xml
|
||||
create mode 100644 test/schematron/cve-2025-49796.sct
|
||||
create mode 100644 test/schematron/cve-2025-49796_0.xml
|
||||
|
||||
diff --git a/result/schematron/cve-2025-49794_0.err b/result/schematron/cve-2025-49794_0.err
|
||||
new file mode 100644
|
||||
index 0000000..5775231
|
||||
--- /dev/null
|
||||
+++ b/result/schematron/cve-2025-49794_0.err
|
||||
@@ -0,0 +1,2 @@
|
||||
+./test/schematron/cve-2025-49794_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2:
|
||||
+./test/schematron/cve-2025-49794_0.xml fails to validate
|
||||
diff --git a/result/schematron/cve-2025-49796_0.err b/result/schematron/cve-2025-49796_0.err
|
||||
new file mode 100644
|
||||
index 0000000..bf875ee
|
||||
--- /dev/null
|
||||
+++ b/result/schematron/cve-2025-49796_0.err
|
||||
@@ -0,0 +1,2 @@
|
||||
+./test/schematron/cve-2025-49796_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2:
|
||||
+./test/schematron/cve-2025-49796_0.xml fails to validate
|
||||
diff --git a/schematron.c b/schematron.c
|
||||
index a825920..411a515 100644
|
||||
--- a/schematron.c
|
||||
+++ b/schematron.c
|
||||
@@ -1389,27 +1389,15 @@ exit:
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
-static xmlNodePtr
|
||||
+static xmlXPathObjectPtr
|
||||
xmlSchematronGetNode(xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlNodePtr cur, const xmlChar *xpath) {
|
||||
- xmlNodePtr node = NULL;
|
||||
- xmlXPathObjectPtr ret;
|
||||
-
|
||||
if ((ctxt == NULL) || (cur == NULL) || (xpath == NULL))
|
||||
return(NULL);
|
||||
|
||||
ctxt->xctxt->doc = cur->doc;
|
||||
ctxt->xctxt->node = cur;
|
||||
- ret = xmlXPathEval(xpath, ctxt->xctxt);
|
||||
- if (ret == NULL)
|
||||
- return(NULL);
|
||||
-
|
||||
- if ((ret->type == XPATH_NODESET) &&
|
||||
- (ret->nodesetval != NULL) && (ret->nodesetval->nodeNr > 0))
|
||||
- node = ret->nodesetval->nodeTab[0];
|
||||
-
|
||||
- xmlXPathFreeObject(ret);
|
||||
- return(node);
|
||||
+ return(xmlXPathEval(xpath, ctxt->xctxt));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1455,25 +1443,40 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
|
||||
(child->type == XML_CDATA_SECTION_NODE))
|
||||
ret = xmlStrcat(ret, child->content);
|
||||
else if (IS_SCHEMATRON(child, "name")) {
|
||||
+ xmlXPathObject *obj = NULL;
|
||||
xmlChar *path;
|
||||
|
||||
path = xmlGetNoNsProp(child, BAD_CAST "path");
|
||||
|
||||
node = cur;
|
||||
if (path != NULL) {
|
||||
- node = xmlSchematronGetNode(ctxt, cur, path);
|
||||
- if (node == NULL)
|
||||
- node = cur;
|
||||
+ obj = xmlSchematronGetNode(ctxt, cur, path);
|
||||
+ if ((obj != NULL) &&
|
||||
+ (obj->type == XPATH_NODESET) &&
|
||||
+ (obj->nodesetval != NULL) &&
|
||||
+ (obj->nodesetval->nodeNr > 0))
|
||||
+ node = obj->nodesetval->nodeTab[0];
|
||||
xmlFree(path);
|
||||
}
|
||||
|
||||
- if ((node->ns == NULL) || (node->ns->prefix == NULL))
|
||||
- ret = xmlStrcat(ret, node->name);
|
||||
- else {
|
||||
- ret = xmlStrcat(ret, node->ns->prefix);
|
||||
- ret = xmlStrcat(ret, BAD_CAST ":");
|
||||
- ret = xmlStrcat(ret, node->name);
|
||||
+ switch (node->type) {
|
||||
+ case XML_ELEMENT_NODE:
|
||||
+ case XML_ATTRIBUTE_NODE:
|
||||
+ if ((node->ns == NULL) || (node->ns->prefix == NULL))
|
||||
+ ret = xmlStrcat(ret, node->name);
|
||||
+ else {
|
||||
+ ret = xmlStrcat(ret, node->ns->prefix);
|
||||
+ ret = xmlStrcat(ret, BAD_CAST ":");
|
||||
+ ret = xmlStrcat(ret, node->name);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ /* TODO: handle other node types */
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ xmlXPathFreeObject(obj);
|
||||
} else if (IS_SCHEMATRON(child, "value-of")) {
|
||||
xmlChar *select;
|
||||
xmlXPathObjectPtr eval;
|
||||
diff --git a/test/schematron/cve-2025-49794.sct b/test/schematron/cve-2025-49794.sct
|
||||
new file mode 100644
|
||||
index 0000000..7fc9ee3
|
||||
--- /dev/null
|
||||
+++ b/test/schematron/cve-2025-49794.sct
|
||||
@@ -0,0 +1,10 @@
|
||||
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
|
||||
+ <sch:pattern id="">
|
||||
+ <sch:rule context="boo0">
|
||||
+ <sch:report test="not(0)">
|
||||
+ <sch:name path="	e|namespace::*|e"/>
|
||||
+ </sch:report>
|
||||
+ <sch:report test="0"></sch:report>
|
||||
+ </sch:rule>
|
||||
+ </sch:pattern>
|
||||
+</sch:schema>
|
||||
diff --git a/test/schematron/cve-2025-49794_0.xml b/test/schematron/cve-2025-49794_0.xml
|
||||
new file mode 100644
|
||||
index 0000000..debc64b
|
||||
--- /dev/null
|
||||
+++ b/test/schematron/cve-2025-49794_0.xml
|
||||
@@ -0,0 +1,6 @@
|
||||
+<librar0>
|
||||
+ <boo0 t="">
|
||||
+ <author></author>
|
||||
+ </boo0>
|
||||
+ <ins></ins>
|
||||
+</librar0>
|
||||
diff --git a/test/schematron/cve-2025-49796.sct b/test/schematron/cve-2025-49796.sct
|
||||
new file mode 100644
|
||||
index 0000000..e9702d7
|
||||
--- /dev/null
|
||||
+++ b/test/schematron/cve-2025-49796.sct
|
||||
@@ -0,0 +1,9 @@
|
||||
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
|
||||
+ <sch:pattern id="">
|
||||
+ <sch:rule context="boo0">
|
||||
+ <sch:report test="not(0)">
|
||||
+ <sch:name path="/"/>
|
||||
+ </sch:report>
|
||||
+ </sch:rule>
|
||||
+ </sch:pattern>
|
||||
+</sch:schema>
|
||||
diff --git a/test/schematron/cve-2025-49796_0.xml b/test/schematron/cve-2025-49796_0.xml
|
||||
new file mode 100644
|
||||
index 0000000..be33c4e
|
||||
--- /dev/null
|
||||
+++ b/test/schematron/cve-2025-49796_0.xml
|
||||
@@ -0,0 +1,3 @@
|
||||
+<librar0>
|
||||
+ <boo0/>
|
||||
+</librar0>
|
||||
--
|
||||
2.49.0
|
||||
|
||||
92
meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch
Normal file
92
meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch
Normal file
@@ -0,0 +1,92 @@
|
||||
From 19e0a3ed092085a4d6689397d4f08cf5d86267af Mon Sep 17 00:00:00 2001
|
||||
From: Michael Mann <mmann78@netscape.net>
|
||||
Date: Sat, 21 Jun 2025 12:11:30 -0400
|
||||
Subject: [PATCH] Schematron: Fix null pointer dereference leading to DoS
|
||||
|
||||
(CVE-2025-49795)
|
||||
|
||||
Fixes #932
|
||||
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/c24909ba2601848825b49a60f988222da3019667]
|
||||
CVE: CVE-2025-49795
|
||||
|
||||
(cherry picked from commit c24909ba2601848825b49a60f988222da3019667)
|
||||
Signed-off-by: Roland Kovacs <roland.kovacs@est.tech>
|
||||
---
|
||||
result/schematron/zvon16_0 | 6 ++++++
|
||||
result/schematron/zvon16_0.err | 5 +++++
|
||||
schematron.c | 5 +++++
|
||||
test/schematron/zvon16.sct | 7 +++++++
|
||||
test/schematron/zvon16_0.xml | 5 +++++
|
||||
5 files changed, 28 insertions(+)
|
||||
create mode 100644 result/schematron/zvon16_0
|
||||
create mode 100644 result/schematron/zvon16_0.err
|
||||
create mode 100644 test/schematron/zvon16.sct
|
||||
create mode 100644 test/schematron/zvon16_0.xml
|
||||
|
||||
diff --git a/result/schematron/zvon16_0 b/result/schematron/zvon16_0
|
||||
new file mode 100644
|
||||
index 00000000..768cf6f5
|
||||
--- /dev/null
|
||||
+++ b/result/schematron/zvon16_0
|
||||
@@ -0,0 +1,6 @@
|
||||
+<?xml version="1.0"?>
|
||||
+<library>
|
||||
+ <book title="Test Book" id="bk101">
|
||||
+ <author>Test Author</author>
|
||||
+ </book>
|
||||
+</library>
|
||||
diff --git a/result/schematron/zvon16_0.err b/result/schematron/zvon16_0.err
|
||||
new file mode 100644
|
||||
index 00000000..a4fab4c8
|
||||
--- /dev/null
|
||||
+++ b/result/schematron/zvon16_0.err
|
||||
@@ -0,0 +1,5 @@
|
||||
+Pattern: TestPattern
|
||||
+xmlXPathCompOpEval: function falae not found
|
||||
+XPath error : Unregistered function
|
||||
+/library/book line 2: Book
|
||||
+./test/schematron/zvon16_0.xml fails to validate
|
||||
diff --git a/schematron.c b/schematron.c
|
||||
index a8259201..86c63e64 100644
|
||||
--- a/schematron.c
|
||||
+++ b/schematron.c
|
||||
@@ -1481,6 +1481,11 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
|
||||
select = xmlGetNoNsProp(child, BAD_CAST "select");
|
||||
comp = xmlXPathCtxtCompile(ctxt->xctxt, select);
|
||||
eval = xmlXPathCompiledEval(comp, ctxt->xctxt);
|
||||
+ if (eval == NULL) {
|
||||
+ xmlXPathFreeCompExpr(comp);
|
||||
+ xmlFree(select);
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
switch (eval->type) {
|
||||
case XPATH_NODESET: {
|
||||
diff --git a/test/schematron/zvon16.sct b/test/schematron/zvon16.sct
|
||||
new file mode 100644
|
||||
index 00000000..f03848aa
|
||||
--- /dev/null
|
||||
+++ b/test/schematron/zvon16.sct
|
||||
@@ -0,0 +1,7 @@
|
||||
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
|
||||
+ <sch:pattern id="TestPattern">
|
||||
+ <sch:rule context="book">
|
||||
+ <sch:report test="not(@available)">Book <sch:value-of select="falae()"/> test</sch:report>
|
||||
+ </sch:rule>
|
||||
+ </sch:pattern>
|
||||
+</sch:schema>
|
||||
diff --git a/test/schematron/zvon16_0.xml b/test/schematron/zvon16_0.xml
|
||||
new file mode 100644
|
||||
index 00000000..551e2d65
|
||||
--- /dev/null
|
||||
+++ b/test/schematron/zvon16_0.xml
|
||||
@@ -0,0 +1,5 @@
|
||||
+<library>
|
||||
+ <book title="Test Book" id="bk101">
|
||||
+ <author>Test Author</author>
|
||||
+ </book>
|
||||
+</library>
|
||||
--
|
||||
2.34.1
|
||||
|
||||
103
meta/recipes-core/libxml/libxml2/CVE-2025-6170.patch
Normal file
103
meta/recipes-core/libxml/libxml2/CVE-2025-6170.patch
Normal file
@@ -0,0 +1,103 @@
|
||||
From 5e9ec5c107d3f5b5179c3dbc19df43df041cd55b Mon Sep 17 00:00:00 2001
|
||||
From: Michael Mann <mmann78@netscape.net>
|
||||
Date: Fri, 20 Jun 2025 23:05:00 -0400
|
||||
Subject: [PATCH] [CVE-2025-6170] Fix potential buffer overflows of interactive
|
||||
shell
|
||||
|
||||
Fixes #941
|
||||
|
||||
CVE: CVE-2025-6170
|
||||
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/5e9ec5c107d3f5b5179c3dbc19df43df041cd55b]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
debugXML.c | 15 ++++++++++-----
|
||||
result/scripts/long_command | 8 ++++++++
|
||||
test/scripts/long_command.script | 6 ++++++
|
||||
test/scripts/long_command.xml | 1 +
|
||||
4 files changed, 25 insertions(+), 5 deletions(-)
|
||||
create mode 100644 result/scripts/long_command
|
||||
create mode 100644 test/scripts/long_command.script
|
||||
create mode 100644 test/scripts/long_command.xml
|
||||
|
||||
diff --git a/debugXML.c b/debugXML.c
|
||||
index ed56b0f8..452b9573 100644
|
||||
--- a/debugXML.c
|
||||
+++ b/debugXML.c
|
||||
@@ -1043,6 +1043,10 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
|
||||
xmlCtxtGenericNodeCheck(ctxt, node);
|
||||
}
|
||||
|
||||
+#define MAX_PROMPT_SIZE 500
|
||||
+#define MAX_ARG_SIZE 400
|
||||
+#define MAX_COMMAND_SIZE 100
|
||||
+
|
||||
/**
|
||||
* xmlCtxtDumpNode:
|
||||
* @output: the FILE * for the output
|
||||
@@ -2794,10 +2798,10 @@ void
|
||||
xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
||||
FILE * output)
|
||||
{
|
||||
- char prompt[500] = "/ > ";
|
||||
+ char prompt[MAX_PROMPT_SIZE] = "/ > ";
|
||||
char *cmdline = NULL, *cur;
|
||||
- char command[100];
|
||||
- char arg[400];
|
||||
+ char command[MAX_COMMAND_SIZE];
|
||||
+ char arg[MAX_ARG_SIZE];
|
||||
int i;
|
||||
xmlShellCtxtPtr ctxt;
|
||||
xmlXPathObjectPtr list;
|
||||
@@ -2855,7 +2859,8 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
||||
cur++;
|
||||
i = 0;
|
||||
while ((*cur != ' ') && (*cur != '\t') &&
|
||||
- (*cur != '\n') && (*cur != '\r')) {
|
||||
+ (*cur != '\n') && (*cur != '\r') &&
|
||||
+ (i < (MAX_COMMAND_SIZE - 1))) {
|
||||
if (*cur == 0)
|
||||
break;
|
||||
command[i++] = *cur++;
|
||||
@@ -2870,7 +2875,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
||||
while ((*cur == ' ') || (*cur == '\t'))
|
||||
cur++;
|
||||
i = 0;
|
||||
- while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
|
||||
+ while ((*cur != '\n') && (*cur != '\r') && (*cur != 0) && (i < (MAX_ARG_SIZE-1))) {
|
||||
if (*cur == 0)
|
||||
break;
|
||||
arg[i++] = *cur++;
|
||||
diff --git a/result/scripts/long_command b/result/scripts/long_command
|
||||
new file mode 100644
|
||||
index 00000000..e6f00708
|
||||
--- /dev/null
|
||||
+++ b/result/scripts/long_command
|
||||
@@ -0,0 +1,8 @@
|
||||
+/ > b > b > Object is a Node Set :
|
||||
+Set contains 1 nodes:
|
||||
+1 ELEMENT a:c
|
||||
+b > Unknown command This_is_a_really_long_command_string_designed_to_test_the_limits_of_the_memory_that_stores_the_comm
|
||||
+b > b > Unknown command ess_currents_of_time_and_existence
|
||||
+b > <?xml version="1.0"?>
|
||||
+<a xmlns:a="bar"><b xmlns:a="foo">Navigating_the_labyrinthine_corridors_of_human_cognition_one_often_encounters_the_perplexing_paradox_that_the_more_we_delve_into_the_intricate_dance_of_neural_pathways_and_synaptic_firings_the_further_we_seem_to_stray_from_a_truly_holistic_understanding_of_consciousness_a_phenomenon_that_remains_as_elusive_as_a_moonbeam_caught_in_a_spiderweb_yet_undeniably_shapes_every_fleeting_thought_every_prof</b></a>
|
||||
+b >
|
||||
\ No newline at end of file
|
||||
diff --git a/test/scripts/long_command.script b/test/scripts/long_command.script
|
||||
new file mode 100644
|
||||
index 00000000..00f6df09
|
||||
--- /dev/null
|
||||
+++ b/test/scripts/long_command.script
|
||||
@@ -0,0 +1,6 @@
|
||||
+cd a/b
|
||||
+set <a:c/>
|
||||
+xpath //*[namespace-uri()="foo"]
|
||||
+This_is_a_really_long_command_string_designed_to_test_the_limits_of_the_memory_that_stores_the_command_please_dont_crash foo
|
||||
+set Navigating_the_labyrinthine_corridors_of_human_cognition_one_often_encounters_the_perplexing_paradox_that_the_more_we_delve_into_the_intricate_dance_of_neural_pathways_and_synaptic_firings_the_further_we_seem_to_stray_from_a_truly_holistic_understanding_of_consciousness_a_phenomenon_that_remains_as_elusive_as_a_moonbeam_caught_in_a_spiderweb_yet_undeniably_shapes_every_fleeting_thought_every_profound_emotion_and_every_grand_aspiration_that_propels_our_species_ever_onward_through_the_relentless_currents_of_time_and_existence
|
||||
+save -
|
||||
diff --git a/test/scripts/long_command.xml b/test/scripts/long_command.xml
|
||||
new file mode 100644
|
||||
index 00000000..1ba44016
|
||||
--- /dev/null
|
||||
+++ b/test/scripts/long_command.xml
|
||||
@@ -0,0 +1 @@
|
||||
+<a xmlns:a="bar"><b xmlns:a="foo"/></a>
|
||||
@@ -21,6 +21,9 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt
|
||||
file://CVE-2025-32414.patch \
|
||||
file://CVE-2025-32415.patch \
|
||||
file://CVE-2025-6021.patch \
|
||||
file://CVE-2025-49794-CVE-2025-49796.patch \
|
||||
file://CVE-2025-49795.patch \
|
||||
file://CVE-2025-6170.patch \
|
||||
"
|
||||
|
||||
SRC_URI[archive.sha256sum] = "c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995"
|
||||
@@ -29,6 +32,10 @@ SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be47223
|
||||
# Disputed as a security issue, but fixed in d39f780
|
||||
CVE_STATUS[CVE-2023-45322] = "disputed: issue requires memory allocation to fail"
|
||||
|
||||
# Disputed as a security issue, if attempts to process an invalid file, it fails
|
||||
# https://gitlab.gnome.org/GNOME/libxml2/-/issues/958
|
||||
CVE_STATUS[CVE-2025-8732] = "disputed: the code maintainer explains, that the issue can only be triggered with untrusted SGML catalogs and it makes absolutely no sense to use untrusted catalogs. The issue triggers a crash if an invalid file is provided. https://gitlab.gnome.org/GNOME/libxml2/-/issues/958"
|
||||
|
||||
BINCONFIG = "${bindir}/xml2-config"
|
||||
|
||||
PACKAGECONFIG ??= "python \
|
||||
|
||||
25
meta/recipes-core/ncurses/files/CVE-2025-6141.patch
Normal file
25
meta/recipes-core/ncurses/files/CVE-2025-6141.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 27d1493340d714e7be6e08c0a8f43e48276149c4 Mon Sep 17 00:00:00 2001
|
||||
From: "Thomas E. Dickey" <dickey@invisible-island.net>
|
||||
Date: Sat, 29 Mar 2025 22:52:37 +0000
|
||||
Subject: [PATCH] snapshot of project "ncurses", label v6_5_20250329
|
||||
|
||||
CVE: CVE-2025-6141
|
||||
Upstream-Status: Backport [https://github.com/ThomasDickey/ncurses-snapshots/commit/27d1493340d714e7be6e08c0a8f43e48276149c4]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
ncurses/tinfo/parse_entry.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
|
||||
index a2278c07..c551c780 100644
|
||||
--- a/ncurses/tinfo/parse_entry.c
|
||||
+++ b/ncurses/tinfo/parse_entry.c
|
||||
@@ -985,6 +985,8 @@ postprocess_termcap(TERMTYPE2 *tp, bool has_base)
|
||||
bp = tp->Strings[from_ptr->nte_index];
|
||||
if (VALID_STRING(bp)) {
|
||||
for (dp = buf2; *bp; bp++) {
|
||||
+ if ((size_t) (dp - buf2) >= (sizeof(buf2) - sizeof(TERMTYPE2)))
|
||||
+ break;
|
||||
if (bp[0] == '$' && bp[1] == '<') {
|
||||
while (*bp && *bp != '>') {
|
||||
++bp;
|
||||
@@ -30,6 +30,10 @@ ENABLE_WIDEC ?= "true"
|
||||
# _GNU_SOURCE is required for widec stuff and is not detected automatically
|
||||
CPPFLAGS += "-D_GNU_SOURCE"
|
||||
|
||||
# Check if we still need it when next release (6.6) happens
|
||||
CFLAGS += "-std=gnu17"
|
||||
BUILD_CFLAGS += "-std=gnu17"
|
||||
|
||||
# natives don't generally look in base_libdir
|
||||
base_libdir:class-native = "${libdir}"
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ SRC_URI += "file://0001-tic-hang.patch \
|
||||
file://0001-Updating-reset-code-ncurses-6.4-patch-20231104.patch \
|
||||
file://CVE-2023-50495.patch \
|
||||
file://CVE-2023-45918.patch \
|
||||
file://CVE-2025-6141.patch \
|
||||
"
|
||||
# commit id corresponds to the revision in package version
|
||||
SRCREV = "1003914e200fd622a27237abca155ce6bf2e6030"
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
From 3a51e31be9f626cf772733cb289ed64739fab0e4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
|
||||
Date: Tue, 20 Feb 2024 19:26:16 +0100
|
||||
Subject: [PATCH] timedated: Respond on org.freedesktop.timedate1.SetNTP only
|
||||
when really finished
|
||||
|
||||
The method returns prematurely (before jobs it triggers terminate). This
|
||||
is externally visible because other methods may fail if jobs did not
|
||||
finish.
|
||||
Postpone the DBus method response until we collect all signals for
|
||||
finished jobs.
|
||||
systemd-timedated keeps track of in-flight DBus requests and answers
|
||||
them all in unspecified order when jobs finish. The capacity of requests
|
||||
in systemd-timedated is limited.
|
||||
|
||||
Fixes: #17739
|
||||
|
||||
Upstream-Status: Backport [https://github.com/systemd/systemd/commit/3a51e31be9f626cf772733cb289ed64739fab0e4]
|
||||
Signed-off-by: Michal Seben <michal.seben@siemens.com>
|
||||
---
|
||||
src/timedate/timedated.c | 21 ++++++++++++++++++---
|
||||
1 file changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: git/src/timedate/timedated.c
|
||||
===================================================================
|
||||
--- git.orig/src/timedate/timedated.c
|
||||
+++ git/src/timedate/timedated.c
|
||||
@@ -45,6 +45,7 @@
|
||||
#define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n"
|
||||
|
||||
#define UNIT_LIST_DIRS (const char* const*) CONF_PATHS_STRV("systemd/ntp-units.d")
|
||||
+#define SET_NTP_IN_FLIGHT_MAX 16
|
||||
|
||||
typedef struct UnitStatusInfo {
|
||||
char *name;
|
||||
@@ -61,6 +62,7 @@ typedef struct Context {
|
||||
bool local_rtc;
|
||||
Hashmap *polkit_registry;
|
||||
sd_bus_message *cache;
|
||||
+ Set *set_ntp_calls;
|
||||
|
||||
sd_bus_slot *slot_job_removed;
|
||||
|
||||
@@ -121,6 +123,7 @@ static void context_clear(Context *c) {
|
||||
free(c->zone);
|
||||
bus_verify_polkit_async_registry_free(c->polkit_registry);
|
||||
sd_bus_message_unref(c->cache);
|
||||
+ set_free(c->set_ntp_calls);
|
||||
|
||||
sd_bus_slot_unref(c->slot_job_removed);
|
||||
|
||||
@@ -461,11 +464,19 @@ static int match_job_removed(sd_bus_mess
|
||||
n += !!u->path;
|
||||
|
||||
if (n == 0) {
|
||||
+ sd_bus_message *cm;
|
||||
+
|
||||
c->slot_job_removed = sd_bus_slot_unref(c->slot_job_removed);
|
||||
|
||||
(void) sd_bus_emit_properties_changed(sd_bus_message_get_bus(m),
|
||||
"/org/freedesktop/timedate1", "org.freedesktop.timedate1", "NTP",
|
||||
NULL);
|
||||
+ while ((cm = set_steal_first(c->set_ntp_calls))) {
|
||||
+ r = sd_bus_reply_method_return(cm, NULL);
|
||||
+ if (r < 0)
|
||||
+ log_debug_errno(r, "Failed to reply to SetNTP method call, ignoring: %m");
|
||||
+ sd_bus_message_unref(cm);
|
||||
+ }
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -944,6 +955,9 @@ static int method_set_ntp(sd_bus_message
|
||||
LIST_FOREACH(units, u, c->units)
|
||||
u->path = mfree(u->path);
|
||||
|
||||
+ if (set_size(c->set_ntp_calls) >= SET_NTP_IN_FLIGHT_MAX)
|
||||
+ return sd_bus_error_set_errnof(error, EAGAIN, "Too many calls in flight.");
|
||||
+
|
||||
if (!c->slot_job_removed) {
|
||||
r = bus_match_signal_async(
|
||||
bus,
|
||||
@@ -998,11 +1012,12 @@ static int method_set_ntp(sd_bus_message
|
||||
c->slot_job_removed = TAKE_PTR(slot);
|
||||
|
||||
if (selected)
|
||||
- log_info("Set NTP to enabled (%s).", selected->name);
|
||||
+ log_info("Set NTP to be enabled (%s).", selected->name);
|
||||
else
|
||||
- log_info("Set NTP to disabled.");
|
||||
+ log_info("Set NTP to be disabled.");
|
||||
|
||||
- return sd_bus_reply_method_return(m, NULL);
|
||||
+ /* Asynchrounous reply to m in match_job_removed() */
|
||||
+ return set_ensure_consume(&c->set_ntp_calls, &bus_message_hash_ops, sd_bus_message_ref(m));
|
||||
}
|
||||
|
||||
static int method_list_timezones(sd_bus_message *m, void *userdata, sd_bus_error *error) {
|
||||
@@ -27,6 +27,7 @@ SRC_URI += " \
|
||||
file://99-default.preset \
|
||||
file://systemd-pager.sh \
|
||||
file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
|
||||
file://0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch \
|
||||
file://0008-implment-systemd-sysv-install-for-OE.patch \
|
||||
"
|
||||
|
||||
@@ -246,6 +247,7 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
|
||||
-Dmode=release \
|
||||
-Dsystem-alloc-uid-min=101 \
|
||||
-Dsystem-uid-max=999 \
|
||||
-Dtranslations=${@'false' if d.getVar('USE_NLS') == 'no' else 'true'} \
|
||||
-Dsystem-alloc-gid-min=101 \
|
||||
-Dsystem-gid-max=999 \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \
|
||||
|
||||
@@ -329,7 +329,7 @@ do_install_ptest() {
|
||||
cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/
|
||||
cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
|
||||
cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/
|
||||
cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH}
|
||||
cp ${B}/config.h ${D}${PTEST_PATH}
|
||||
|
||||
sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
|
||||
CVE_STATUS[CVE-2023-25584] = "cpe-incorrect: Applies only for version 2.40 and earlier"
|
||||
CVE_STATUS[CVE-2025-1180] = "patched: fixed by patch for CVE-2025-1176"
|
||||
|
||||
SRCREV ?= "6558f9f5f0ccc107a083ae7fbf106ebcb5efa817"
|
||||
SRCREV ?= "f9488b0d92b591bdf3ff8cce485cb0e1b3727cc0"
|
||||
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https"
|
||||
SRC_URI = "\
|
||||
${BINUTILS_GIT_URI} \
|
||||
@@ -39,6 +39,10 @@ SRC_URI = "\
|
||||
file://0015-gprofng-change-use-of-bignum-to-bigint.patch \
|
||||
file://0016-CVE-2024-53589.patch \
|
||||
file://0017-dlltool-file-name-too-long.patch \
|
||||
file://0018-opcodes-fix-std-gnu23-compatibility-wrt-static_assert.patch \
|
||||
file://0019-Fix-32097-Warnings-when-building-gprofng-with-Clang.patch \
|
||||
file://0020-gprofng-fix-std-gnu23-compatibility-wrt-unprototyped.patch \
|
||||
file://0021-gprofng-fix-build-with-std-gnu23.patch \
|
||||
file://0018-CVE-2025-0840.patch \
|
||||
file://CVE-2025-1176.patch \
|
||||
file://CVE-2025-1178.patch \
|
||||
@@ -53,5 +57,7 @@ SRC_URI = "\
|
||||
file://CVE-2025-1179.patch \
|
||||
file://0022-CVE-2025-5245.patch \
|
||||
file://0022-CVE-2025-5244.patch \
|
||||
file://0023-CVE-2025-7546.patch \
|
||||
file://0023-CVE-2025-7545.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
From 8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Sat, 16 Nov 2024 05:03:52 +0000
|
||||
Subject: [PATCH] opcodes: fix -std=gnu23 compatibility wrt static_assert
|
||||
|
||||
static_assert is declared in C23 so we can't reuse that identifier:
|
||||
* Define our own static_assert conditionally;
|
||||
|
||||
* Rename "static assert" hacks to _N as we do already in some places
|
||||
to avoid a conflict.
|
||||
|
||||
ChangeLog:
|
||||
PR ld/32372
|
||||
|
||||
* i386-gen.c (static_assert): Define conditionally.
|
||||
* mips-formats.h (MAPPED_INT): Rename identifier.
|
||||
(MAPPED_REG): Rename identifier.
|
||||
(OPTIONAL_MAPPED_REG): Rename identifier.
|
||||
* s390-opc.c (static_assert): Define conditionally.
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4]
|
||||
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||
---
|
||||
opcodes/i386-gen.c | 2 ++
|
||||
opcodes/mips-formats.h | 6 +++---
|
||||
opcodes/s390-opc.c | 2 ++
|
||||
3 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
|
||||
index 053b66675c5..7ee8a30310c 100644
|
||||
--- a/opcodes/i386-gen.c
|
||||
+++ b/opcodes/i386-gen.c
|
||||
@@ -30,7 +30,9 @@
|
||||
|
||||
/* Build-time checks are preferrable over runtime ones. Use this construct
|
||||
in preference where possible. */
|
||||
+#ifndef static_assert
|
||||
#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
|
||||
+#endif
|
||||
|
||||
static const char *program_name = NULL;
|
||||
static int debug = 0;
|
||||
diff --git a/opcodes/mips-formats.h b/opcodes/mips-formats.h
|
||||
index 90df7100803..c4dec6352bf 100644
|
||||
--- a/opcodes/mips-formats.h
|
||||
+++ b/opcodes/mips-formats.h
|
||||
@@ -49,7 +49,7 @@
|
||||
#define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \
|
||||
{ \
|
||||
typedef char ATTRIBUTE_UNUSED \
|
||||
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
|
||||
+ static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
|
||||
static const struct mips_mapped_int_operand op = { \
|
||||
{ OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \
|
||||
}; \
|
||||
@@ -83,7 +83,7 @@
|
||||
#define MAPPED_REG(SIZE, LSB, BANK, MAP) \
|
||||
{ \
|
||||
typedef char ATTRIBUTE_UNUSED \
|
||||
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
|
||||
+ static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
|
||||
static const struct mips_reg_operand op = { \
|
||||
{ OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
|
||||
}; \
|
||||
@@ -93,7 +93,7 @@
|
||||
#define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \
|
||||
{ \
|
||||
typedef char ATTRIBUTE_UNUSED \
|
||||
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
|
||||
+ static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
|
||||
static const struct mips_reg_operand op = { \
|
||||
{ OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
|
||||
}; \
|
||||
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
|
||||
index 9d9f0973e55..49efd714157 100644
|
||||
--- a/opcodes/s390-opc.c
|
||||
+++ b/opcodes/s390-opc.c
|
||||
@@ -36,7 +36,9 @@
|
||||
|
||||
/* Build-time checks are preferrable over runtime ones. Use this construct
|
||||
in preference where possible. */
|
||||
+#ifndef static_assert
|
||||
#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
|
||||
+#endif
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
--
|
||||
2.43.7
|
||||
|
||||
@@ -0,0 +1,767 @@
|
||||
From b7888eb5a45772ed2e9a2030c50625a15b5ef795 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
|
||||
Date: Tue, 3 Sep 2024 21:30:31 -0700
|
||||
Subject: [PATCH] Fix 32097 Warnings when building gprofng with Clang
|
||||
|
||||
gprofng/ChangeLog
|
||||
2024-09-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>.
|
||||
|
||||
PR gprofng/32097
|
||||
* common/hwcdrv.c: Fix -Wempty-body warnings.
|
||||
* common/hwcentry.h: Fix -Wdeprecated-non-prototype warnings.
|
||||
* common/hwctable.c: Fix -Wdeprecated-non-prototype warnings.
|
||||
* libcollector/collector.c: Likewise.
|
||||
* libcollector/collector.h: Likewise.
|
||||
* libcollector/collectorAPI.c: Likewise.
|
||||
* libcollector/dispatcher.c: Likewise.
|
||||
* libcollector/iotrace.c: Likewise.
|
||||
* libcollector/libcol_util.c: Fix -Wunused-but-set-variable warnings.
|
||||
* libcollector/libcol_util.h: Remove unused declarations.
|
||||
* libcollector/linetrace.c: Fix -Wdeprecated-non-prototype warnings.
|
||||
* src/BaseMetricTreeNode.h: Fix -Wunused-private-field warnings.
|
||||
* src/Dbe.cc: Fix -Wself-assign warnings.
|
||||
* src/DbeSession.cc: Fix -Wunused-but-set-variable warnings.
|
||||
* src/Disasm.cc: Fix -Wunused-const-variable warnings.
|
||||
* src/Experiment.cc: Fix -Wunused-private-field warnings.
|
||||
* src/HashMap.h: Fix -Wself-assign warnings.
|
||||
* src/IOActivity.h: Fix -Wunused-private-field warnings.
|
||||
* src/collctrl.cc: Fix -Wself-assign, -Wparentheses-equality warnings.
|
||||
* src/collctrl.h: Fix -Wunused-private-field warnings.
|
||||
* src/collector_module.h: Fix -Wdeprecated-non-prototype warnings.
|
||||
* src/gp-display-src.cc: Fix -Wunused-private-field warnings.
|
||||
* src/gp-print.h: Fix -Wheader-guard warnings.
|
||||
* src/hwc_intel_icelake.h: Fix -Winitializer-overrides warnings.
|
||||
* src/util.cc: Fix -Wunused-but-set-variable warnings.
|
||||
Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/b79c457ca01df82dbe1facb708e45def4584c903]
|
||||
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||
---
|
||||
gprofng/common/hwcdrv.c | 3 ++-
|
||||
gprofng/common/hwcentry.h | 7 +----
|
||||
gprofng/common/hwctable.c | 13 +---------
|
||||
gprofng/libcollector/collector.c | 15 ++++-------
|
||||
gprofng/libcollector/collector.h | 2 +-
|
||||
gprofng/libcollector/collectorAPI.c | 15 ++++++-----
|
||||
gprofng/libcollector/dispatcher.c | 19 ++++++++------
|
||||
gprofng/libcollector/iotrace.c | 12 ++++-----
|
||||
gprofng/libcollector/libcol_util.c | 2 --
|
||||
gprofng/libcollector/libcol_util.h | 6 -----
|
||||
gprofng/libcollector/linetrace.c | 40 +++++++++++++++++------------
|
||||
gprofng/src/BaseMetricTreeNode.h | 1 -
|
||||
gprofng/src/Dbe.cc | 12 ++++-----
|
||||
gprofng/src/DbeSession.cc | 3 ---
|
||||
gprofng/src/Disasm.cc | 1 -
|
||||
gprofng/src/Experiment.cc | 2 --
|
||||
gprofng/src/HashMap.h | 3 +--
|
||||
gprofng/src/IOActivity.h | 1 -
|
||||
gprofng/src/collctrl.cc | 14 +++++-----
|
||||
gprofng/src/collctrl.h | 1 -
|
||||
gprofng/src/collector_module.h | 20 +++++++--------
|
||||
gprofng/src/gp-display-src.cc | 8 ------
|
||||
gprofng/src/gp-print.h | 2 +-
|
||||
gprofng/src/util.cc | 10 +++-----
|
||||
24 files changed, 84 insertions(+), 128 deletions(-)
|
||||
|
||||
diff --git a/gprofng/common/hwcdrv.c b/gprofng/common/hwcdrv.c
|
||||
index 2d549b0d6a5..fa1ad32430b 100644
|
||||
--- a/gprofng/common/hwcdrv.c
|
||||
+++ b/gprofng/common/hwcdrv.c
|
||||
@@ -650,6 +650,7 @@ read_sample (counter_state_t *ctr_state, int msgsz, uint64_t *rvalue,
|
||||
static void
|
||||
dump_perf_event_attr (struct perf_event_attr *at)
|
||||
{
|
||||
+#if defined(DEBUG)
|
||||
TprintfT (DBG_LT2, "dump_perf_event_attr: size=%d type=%d sample_period=%lld\n"
|
||||
" config=0x%llx config1=0x%llx config2=0x%llx wakeup_events=%lld __reserved_1=%lld\n",
|
||||
(int) at->size, (int) at->type, (unsigned long long) at->sample_period,
|
||||
@@ -665,13 +666,13 @@ dump_perf_event_attr (struct perf_event_attr *at)
|
||||
DUMP_F (exclude_kernel);
|
||||
DUMP_F (exclude_hv);
|
||||
DUMP_F (exclude_idle);
|
||||
- // DUMP_F(xmmap);
|
||||
DUMP_F (comm);
|
||||
DUMP_F (freq);
|
||||
DUMP_F (inherit_stat);
|
||||
DUMP_F (enable_on_exec);
|
||||
DUMP_F (task);
|
||||
DUMP_F (watermark);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
diff --git a/gprofng/common/hwcentry.h b/gprofng/common/hwcentry.h
|
||||
index a35a363e693..7899875cf96 100644
|
||||
--- a/gprofng/common/hwcentry.h
|
||||
+++ b/gprofng/common/hwcentry.h
|
||||
@@ -202,17 +202,12 @@ extern "C"
|
||||
extern char *hwc_get_docref (char *buf, size_t buflen);
|
||||
/* Return a CPU HWC document reference, or NULL. */
|
||||
|
||||
- // TBR
|
||||
- extern char *hwc_get_default_cntrs ();
|
||||
- /* Return a default HW counter string; may be NULL, or zero-length */
|
||||
- /* NULL means none is defined in the table; or zero-length means string defined could not be loaded */
|
||||
-
|
||||
extern char *hwc_get_default_cntrs2 (int forKernel, int style);
|
||||
/* like hwc_get_default_cntrs() for style==1 */
|
||||
/* but allows other styles of formatting as well */
|
||||
/* deprecate and eventually remove hwc_get_default_cntrs() */
|
||||
|
||||
- extern char *hwc_get_orig_default_cntrs ();
|
||||
+ extern char *hwc_get_orig_default_cntrs (int forKernel);
|
||||
/* Get the default HW counter string as set in the table */
|
||||
/* NULL means none is defined in the table */
|
||||
|
||||
diff --git a/gprofng/common/hwctable.c b/gprofng/common/hwctable.c
|
||||
index d0735132fac..fe9153190e7 100644
|
||||
--- a/gprofng/common/hwctable.c
|
||||
+++ b/gprofng/common/hwctable.c
|
||||
@@ -3231,7 +3231,7 @@ check_tables ()
|
||||
}
|
||||
#endif
|
||||
|
||||
-static int try_a_counter ();
|
||||
+static int try_a_counter (int forKernel);
|
||||
static void hwc_process_raw_ctrs (int forKernel, Hwcentry ***pstd_out,
|
||||
Hwcentry ***praw_out, Hwcentry ***phidden_out,
|
||||
Hwcentry**static_tables,
|
||||
@@ -4321,17 +4321,6 @@ hwc_get_docref (char *buf, size_t buflen)
|
||||
return buf;
|
||||
}
|
||||
|
||||
-//TBR:
|
||||
-
|
||||
-extern char*
|
||||
-hwc_get_default_cntrs ()
|
||||
-{
|
||||
- setup_cpcx ();
|
||||
- if (cpcx_default_hwcs[0] != NULL)
|
||||
- return strdup (cpcx_default_hwcs[0]); // TBR deprecate this
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
extern char*
|
||||
hwc_get_default_cntrs2 (int forKernel, int style)
|
||||
{
|
||||
diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
|
||||
index 39529758600..ef580dcbdd9 100644
|
||||
--- a/gprofng/libcollector/collector.c
|
||||
+++ b/gprofng/libcollector/collector.c
|
||||
@@ -210,15 +210,10 @@ get_collector_interface ()
|
||||
static void
|
||||
collector_module_init (CollectorInterface *col_intf)
|
||||
{
|
||||
- int nmodules = 0;
|
||||
-
|
||||
ModuleInitFunc next_init = (ModuleInitFunc) dlsym (RTLD_DEFAULT, "__collector_module_init");
|
||||
if (next_init != NULL)
|
||||
- {
|
||||
- nmodules++;
|
||||
- next_init (col_intf);
|
||||
- }
|
||||
- TprintfT (DBG_LT1, "collector_module_init: %d modules\n", nmodules);
|
||||
+ next_init (col_intf);
|
||||
+ TprintfT (DBG_LT1, "collector_module_init: %d modules\n", next_init ? 1 : 0);
|
||||
}
|
||||
|
||||
/* Routines concerned with general experiment start and stop */
|
||||
@@ -1784,7 +1779,7 @@ __collector_pause ()
|
||||
}
|
||||
|
||||
void
|
||||
-__collector_pause_m (char *reason)
|
||||
+__collector_pause_m (const char *reason)
|
||||
{
|
||||
hrtime_t now;
|
||||
char xreason[MAXPATHLEN];
|
||||
@@ -2451,8 +2446,8 @@ __collector_dlog (int tflag, int level, char *format, ...)
|
||||
|
||||
static void (*__real__exit) (int status) = NULL; /* libc only: _exit */
|
||||
static void (*__real__Exit) (int status) = NULL; /* libc only: _Exit */
|
||||
-void _exit () __attribute__ ((weak, alias ("__collector_exit")));
|
||||
-void _Exit () __attribute__ ((weak, alias ("__collector_Exit")));
|
||||
+void _exit (int status) __attribute__ ((weak, alias ("__collector_exit")));
|
||||
+void _Exit (int status) __attribute__ ((weak, alias ("__collector_Exit")));
|
||||
|
||||
void
|
||||
__collector_exit (int status)
|
||||
diff --git a/gprofng/libcollector/collector.h b/gprofng/libcollector/collector.h
|
||||
index 07a03bdd17a..eda68a0e4f5 100644
|
||||
--- a/gprofng/libcollector/collector.h
|
||||
+++ b/gprofng/libcollector/collector.h
|
||||
@@ -123,7 +123,7 @@ extern void __collector_terminate_expt ();
|
||||
extern void __collector_terminate_hook ();
|
||||
extern void __collector_sample (char *name);
|
||||
extern void __collector_pause ();
|
||||
-extern void __collector_pause_m ();
|
||||
+extern void __collector_pause_m (const char *reason);
|
||||
extern void __collector_resume ();
|
||||
extern int collector_sigemt_sigaction (const struct sigaction*,
|
||||
struct sigaction*);
|
||||
diff --git a/gprofng/libcollector/collectorAPI.c b/gprofng/libcollector/collectorAPI.c
|
||||
index 5fa6403ad49..449bbbaab65 100644
|
||||
--- a/gprofng/libcollector/collectorAPI.c
|
||||
+++ b/gprofng/libcollector/collectorAPI.c
|
||||
@@ -26,16 +26,17 @@
|
||||
#include "collectorAPI.h"
|
||||
#include "gp-experiment.h"
|
||||
|
||||
-static void *__real_collector_sample = NULL;
|
||||
-static void *__real_collector_pause = NULL;
|
||||
-static void *__real_collector_resume = NULL;
|
||||
-static void *__real_collector_terminate_expt = NULL;
|
||||
-static void *__real_collector_func_load = NULL;
|
||||
-static void *__real_collector_func_unload = NULL;
|
||||
+static void (*__real_collector_sample)(const char *) = NULL;
|
||||
+static void (*__real_collector_pause)() = NULL;
|
||||
+static void (*__real_collector_resume)() = NULL;
|
||||
+static void (*__real_collector_terminate_expt)() = NULL;
|
||||
+static void (*__real_collector_func_load)(const char *, const char *,
|
||||
+ const char *, void *, int, int, Lineno *) = NULL;
|
||||
+static void (*__real_collector_func_unload)(void *) = NULL;
|
||||
|
||||
#define INIT_API if (init_API == 0) collectorAPI_initAPI()
|
||||
#define NULL_PTR(x) (__real_##x == NULL)
|
||||
-#define CALL_REAL(x) (*(void(*)())__real_##x)
|
||||
+#define CALL_REAL(x) (__real_##x)
|
||||
#define CALL_IF_REAL(x) INIT_API; if (!NULL_PTR(x)) CALL_REAL(x)
|
||||
|
||||
static int init_API = 0;
|
||||
diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c
|
||||
index d2a4ad0b60b..867753a22ec 100644
|
||||
--- a/gprofng/libcollector/dispatcher.c
|
||||
+++ b/gprofng/libcollector/dispatcher.c
|
||||
@@ -909,8 +909,9 @@ sigset (int sig, sighandler_t handler)
|
||||
|
||||
// map interposed symbol versions
|
||||
static int
|
||||
-gprofng_timer_create (int (real_func) (), clockid_t clockid,
|
||||
- struct sigevent *sevp, timer_t *timerid)
|
||||
+gprofng_timer_create (int (real_func) (clockid_t, struct sigevent *, timer_t *),
|
||||
+ clockid_t clockid,
|
||||
+ struct sigevent *sevp, timer_t *timerid)
|
||||
{
|
||||
// collector reserves SIGPROF
|
||||
if (sevp == NULL || sevp->sigev_notify != SIGEV_SIGNAL ||
|
||||
@@ -1045,7 +1046,7 @@ __collector_thr_sigsetmask (int how, const sigset_t* iset, sigset_t* oset)
|
||||
// map interposed symbol versions
|
||||
|
||||
static int
|
||||
-gprofng_pthread_sigmask (int (real_func) (),
|
||||
+gprofng_pthread_sigmask (int (real_func) (int, const sigset_t *, sigset_t*),
|
||||
int how, const sigset_t *iset, sigset_t* oset)
|
||||
{
|
||||
sigset_t lsigset;
|
||||
@@ -1140,9 +1141,10 @@ collector_root (void *cargs)
|
||||
// map interposed symbol versions
|
||||
|
||||
static int
|
||||
-gprofng_pthread_create (int (real_func) (), pthread_t *thread,
|
||||
- const pthread_attr_t *attr,
|
||||
- void *(*func)(void*), void *arg)
|
||||
+gprofng_pthread_create (int (real_func) (pthread_t *, const pthread_attr_t *,
|
||||
+ void *(*)(void *), void *),
|
||||
+ pthread_t *thread, const pthread_attr_t *attr,
|
||||
+ void *(*func)(void*), void *arg)
|
||||
{
|
||||
TprintfT (DBG_LTT, "gprofng_pthread_create @%p\n", real_func);
|
||||
if (dispatch_mode != DISPATCH_ON)
|
||||
@@ -1277,6 +1279,7 @@ __collector_ext_clone_pthread (int (*fn)(void *), void *child_stack, int flags,
|
||||
}
|
||||
|
||||
// weak symbols:
|
||||
-int sigprocmask () __attribute__ ((weak, alias ("__collector_sigprocmask")));
|
||||
-int thr_sigsetmask () __attribute__ ((weak, alias ("__collector_thr_sigsetmask")));
|
||||
+int sigprocmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_sigprocmask")));
|
||||
+int thr_sigsetmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_thr_sigsetmask")));
|
||||
int setitimer () __attribute__ ((weak, alias ("_setitimer")));
|
||||
+
|
||||
diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c
|
||||
index 18060864796..3deb441d9c7 100644
|
||||
--- a/gprofng/libcollector/iotrace.c
|
||||
+++ b/gprofng/libcollector/iotrace.c
|
||||
@@ -1350,7 +1350,7 @@ mkstemp (char *template)
|
||||
unsigned pktSize;
|
||||
if (NULL_PTR (mkstemp))
|
||||
init_io_intf ();
|
||||
- if (CHCK_REENTRANCE (guard) || template == NULL)
|
||||
+ if (CHCK_REENTRANCE (guard))
|
||||
return CALL_REAL (mkstemp)(template);
|
||||
PUSH_REENTRANCE (guard);
|
||||
hrtime_t reqt = gethrtime ();
|
||||
@@ -1405,7 +1405,7 @@ mkstemps (char *template, int slen)
|
||||
unsigned pktSize;
|
||||
if (NULL_PTR (mkstemps))
|
||||
init_io_intf ();
|
||||
- if (CHCK_REENTRANCE (guard) || template == NULL)
|
||||
+ if (CHCK_REENTRANCE (guard))
|
||||
return CALL_REAL (mkstemps)(template, slen);
|
||||
PUSH_REENTRANCE (guard);
|
||||
hrtime_t reqt = gethrtime ();
|
||||
@@ -1485,7 +1485,7 @@ close (int fildes)
|
||||
|
||||
/*------------------------------------------------------------- fopen */
|
||||
static FILE*
|
||||
-gprofng_fopen (FILE*(real_fopen) (), const char *filename, const char *mode)
|
||||
+gprofng_fopen (FILE*(real_fopen) (const char *, const char *), const char *filename, const char *mode)
|
||||
{
|
||||
int *guard;
|
||||
FILE *fp = NULL;
|
||||
@@ -1559,7 +1559,7 @@ DCL_FOPEN (fopen)
|
||||
|
||||
/*------------------------------------------------------------- fclose */
|
||||
static int
|
||||
-gprofng_fclose (int(real_fclose) (), FILE *stream)
|
||||
+gprofng_fclose (int(real_fclose) (FILE *), FILE *stream)
|
||||
{
|
||||
int *guard;
|
||||
int stat;
|
||||
@@ -1645,7 +1645,7 @@ fflush (FILE *stream)
|
||||
|
||||
/*------------------------------------------------------------- fdopen */
|
||||
static FILE*
|
||||
-gprofng_fdopen (FILE*(real_fdopen) (), int fildes, const char *mode)
|
||||
+gprofng_fdopen (FILE*(real_fdopen) (int, const char *), int fildes, const char *mode)
|
||||
{
|
||||
int *guard;
|
||||
FILE *fp = NULL;
|
||||
@@ -2957,7 +2957,7 @@ DCL_FGETPOS (fgetpos)
|
||||
|
||||
/*------------------------------------------------------------- fgetpos64 */
|
||||
static int
|
||||
-gprofng_fgetpos64 (int(real_fgetpos64) (), FILE *stream, fpos64_t *pos)
|
||||
+gprofng_fgetpos64 (int(real_fgetpos64) (FILE *, fpos64_t *), FILE *stream, fpos64_t *pos)
|
||||
{
|
||||
int *guard;
|
||||
int ret;
|
||||
diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
|
||||
index 15ba24d2ab5..c2b82894e6b 100644
|
||||
--- a/gprofng/libcollector/libcol_util.c
|
||||
+++ b/gprofng/libcollector/libcol_util.c
|
||||
@@ -1013,7 +1013,6 @@ __collector_open (const char *path, int oflag, ...)
|
||||
mode_t mode = 0;
|
||||
|
||||
hrtime_t t_timeout = __collector_gethrtime () + 5 * ((hrtime_t) NANOSEC);
|
||||
- int nretries = 0;
|
||||
long long delay = 100; /* start at some small, arbitrary value */
|
||||
|
||||
/* get optional mode argument if it's expected/required */
|
||||
@@ -1058,7 +1057,6 @@ __collector_open (const char *path, int oflag, ...)
|
||||
delay *= 2;
|
||||
if (delay > 100000000)
|
||||
delay = 100000000; /* cap at some large, arbitrary value */
|
||||
- nretries++;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
diff --git a/gprofng/libcollector/libcol_util.h b/gprofng/libcollector/libcol_util.h
|
||||
index 2eeeaeed50b..1b1b928180a 100644
|
||||
--- a/gprofng/libcollector/libcol_util.h
|
||||
+++ b/gprofng/libcollector/libcol_util.h
|
||||
@@ -81,12 +81,6 @@ extern int __collector_mutex_trylock (collector_mutex_t *mp);
|
||||
#define __collector_mutex_init(xx) \
|
||||
do { collector_mutex_t tmp=COLLECTOR_MUTEX_INITIALIZER; *(xx)=tmp; } while(0)
|
||||
|
||||
-void __collector_sample (char *name);
|
||||
-void __collector_terminate_expt ();
|
||||
-void __collector_pause ();
|
||||
-void __collector_pause_m ();
|
||||
-void __collector_resume ();
|
||||
-
|
||||
struct DT_lineno;
|
||||
|
||||
typedef enum
|
||||
diff --git a/gprofng/libcollector/linetrace.c b/gprofng/libcollector/linetrace.c
|
||||
index 67b2d7e9030..66844bc1337 100644
|
||||
--- a/gprofng/libcollector/linetrace.c
|
||||
+++ b/gprofng/libcollector/linetrace.c
|
||||
@@ -1207,7 +1207,7 @@ __collector_vfork (void)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------- execve */
|
||||
-int execve () __attribute__ ((weak, alias ("__collector_execve")));
|
||||
+int execve (const char *, char *const [], char *const []) __attribute__ ((weak, alias ("__collector_execve")));
|
||||
|
||||
int
|
||||
__collector_execve (const char* path, char *const argv[], char *const envp[])
|
||||
@@ -1237,7 +1237,7 @@ __collector_execve (const char* path, char *const argv[], char *const envp[])
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int execvp () __attribute__ ((weak, alias ("__collector_execvp")));
|
||||
+int execvp (const char *, char *const []) __attribute__ ((weak, alias ("__collector_execvp")));
|
||||
|
||||
int
|
||||
__collector_execvp (const char* file, char *const argv[])
|
||||
@@ -1269,7 +1269,7 @@ __collector_execvp (const char* file, char *const argv[])
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int execv () __attribute__ ((weak, alias ("__collector_execv")));
|
||||
+int execv (const char *, char *const []) __attribute__ ((weak, alias ("__collector_execv")));
|
||||
|
||||
int
|
||||
__collector_execv (const char* path, char *const argv[])
|
||||
@@ -1408,7 +1408,10 @@ __collector_execl (const char* path, const char *arg0, ...)
|
||||
/*-------------------------------------------------------- posix_spawn */
|
||||
// map interposed symbol versions
|
||||
static int
|
||||
-gprofng_posix_spawn (int(real_posix_spawn) (),
|
||||
+gprofng_posix_spawn (int(real_posix_spawn) (pid_t *, const char *,
|
||||
+ const posix_spawn_file_actions_t *,
|
||||
+ const posix_spawnattr_t *,
|
||||
+ char *const [], char *const []),
|
||||
pid_t *pidp, const char *path,
|
||||
const posix_spawn_file_actions_t *file_actions,
|
||||
const posix_spawnattr_t *attrp,
|
||||
@@ -1466,7 +1469,10 @@ DCL_POSIX_SPAWN (posix_spawn)
|
||||
|
||||
/*-------------------------------------------------------- posix_spawnp */
|
||||
static int
|
||||
-gprofng_posix_spawnp (int (real_posix_spawnp) (),
|
||||
+gprofng_posix_spawnp (int (real_posix_spawnp) (pid_t *, const char *,
|
||||
+ const posix_spawn_file_actions_t *,
|
||||
+ const posix_spawnattr_t *,
|
||||
+ char *const [], char *const []),
|
||||
pid_t *pidp, const char *path,
|
||||
const posix_spawn_file_actions_t *file_actions,
|
||||
const posix_spawnattr_t *attrp,
|
||||
@@ -1754,8 +1760,8 @@ __collector_clone (int (*fn)(void *), void *child_stack, int flags, void *arg,
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------- setuid */
|
||||
-int setuid () __attribute__ ((weak, alias ("__collector_setuid")));
|
||||
-int _setuid () __attribute__ ((weak, alias ("__collector_setuid")));
|
||||
+int setuid (uid_t) __attribute__ ((weak, alias ("__collector_setuid")));
|
||||
+int _setuid (uid_t) __attribute__ ((weak, alias ("__collector_setuid")));
|
||||
|
||||
int
|
||||
__collector_setuid (uid_t ruid)
|
||||
@@ -1770,8 +1776,8 @@ __collector_setuid (uid_t ruid)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------- seteuid */
|
||||
-int seteuid () __attribute__ ((weak, alias ("__collector_seteuid")));
|
||||
-int _seteuid () __attribute__ ((weak, alias ("__collector_seteuid")));
|
||||
+int seteuid (uid_t) __attribute__ ((weak, alias ("__collector_seteuid")));
|
||||
+int _seteuid (uid_t) __attribute__ ((weak, alias ("__collector_seteuid")));
|
||||
|
||||
int
|
||||
__collector_seteuid (uid_t euid)
|
||||
@@ -1786,8 +1792,8 @@ __collector_seteuid (uid_t euid)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------ setreuid */
|
||||
-int setreuid () __attribute__ ((weak, alias ("__collector_setreuid")));
|
||||
-int _setreuid () __attribute__ ((weak, alias ("__collector_setreuid")));
|
||||
+int setreuid (uid_t, uid_t) __attribute__ ((weak, alias ("__collector_setreuid")));
|
||||
+int _setreuid (uid_t, uid_t) __attribute__ ((weak, alias ("__collector_setreuid")));
|
||||
|
||||
int
|
||||
__collector_setreuid (uid_t ruid, uid_t euid)
|
||||
@@ -1802,8 +1808,8 @@ __collector_setreuid (uid_t ruid, uid_t euid)
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------- setgid */
|
||||
-int setgid () __attribute__ ((weak, alias ("__collector_setgid")));
|
||||
-int _setgid () __attribute__ ((weak, alias ("__collector_setgid")));
|
||||
+int setgid (gid_t) __attribute__ ((weak, alias ("__collector_setgid")));
|
||||
+int _setgid (gid_t) __attribute__ ((weak, alias ("__collector_setgid")));
|
||||
|
||||
int
|
||||
__collector_setgid (gid_t rgid)
|
||||
@@ -1818,8 +1824,8 @@ __collector_setgid (gid_t rgid)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------- setegid */
|
||||
-int setegid () __attribute__ ((weak, alias ("__collector_setegid")));
|
||||
-int _setegid () __attribute__ ((weak, alias ("__collector_setegid")));
|
||||
+int setegid (gid_t) __attribute__ ((weak, alias ("__collector_setegid")));
|
||||
+int _setegid (gid_t) __attribute__ ((weak, alias ("__collector_setegid")));
|
||||
|
||||
int
|
||||
__collector_setegid (gid_t egid)
|
||||
@@ -1834,8 +1840,8 @@ __collector_setegid (gid_t egid)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------ setregid */
|
||||
-int setregid () __attribute__ ((weak, alias ("__collector_setregid")));
|
||||
-int _setregid () __attribute__ ((weak, alias ("__collector_setregid")));
|
||||
+int setregid (gid_t, gid_t) __attribute__ ((weak, alias ("__collector_setregid")));
|
||||
+int _setregid (gid_t, gid_t) __attribute__ ((weak, alias ("__collector_setregid")));
|
||||
|
||||
int
|
||||
__collector_setregid (gid_t rgid, gid_t egid)
|
||||
diff --git a/gprofng/src/BaseMetricTreeNode.h b/gprofng/src/BaseMetricTreeNode.h
|
||||
index d73d244e27e..7698f9c6eaf 100644
|
||||
--- a/gprofng/src/BaseMetricTreeNode.h
|
||||
+++ b/gprofng/src/BaseMetricTreeNode.h
|
||||
@@ -85,7 +85,6 @@ private:
|
||||
|
||||
BaseMetricTreeNode *root; // root of tree
|
||||
BaseMetricTreeNode *parent; // my parent
|
||||
- bool aggregation; // value is based on children's values
|
||||
char *name; // bm->get_cmd() for metrics, unique string otherwise
|
||||
char *uname; // user-visible text
|
||||
char *unit; // see UNIT_* defines
|
||||
diff --git a/gprofng/src/Dbe.cc b/gprofng/src/Dbe.cc
|
||||
index 91a5aa5ef05..bcbf4694565 100644
|
||||
--- a/gprofng/src/Dbe.cc
|
||||
+++ b/gprofng/src/Dbe.cc
|
||||
@@ -9594,14 +9594,12 @@ dbeGetTLDataRepVals (VMode view_mode, hrtime_t start_ts, hrtime_t delta,
|
||||
}
|
||||
if (sampleVals != NULL)
|
||||
{
|
||||
- Sample* sample = (Sample*) packets->getObjValue (PROP_SMPLOBJ, packetIdx);
|
||||
- if (!sample || !sample->get_usage ())
|
||||
- sample = sample;
|
||||
- else
|
||||
+ Sample *sample = (Sample*) packets->getObjValue (PROP_SMPLOBJ, packetIdx);
|
||||
+ if (sample != NULL)
|
||||
{
|
||||
- PrUsage* prusage = sample->get_usage ();
|
||||
- Vector<long long> *mstateVals = prusage->getMstateValues ();
|
||||
- sampleVals->store (eventIdx, mstateVals);
|
||||
+ PrUsage *prusage = sample->get_usage ();
|
||||
+ if (prusage != NULL)
|
||||
+ sampleVals->store (eventIdx, prusage->getMstateValues ());
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/gprofng/src/DbeSession.cc b/gprofng/src/DbeSession.cc
|
||||
index 20329091167..5d6bab75638 100644
|
||||
--- a/gprofng/src/DbeSession.cc
|
||||
+++ b/gprofng/src/DbeSession.cc
|
||||
@@ -1162,8 +1162,6 @@ DbeSession::open_experiment (Experiment *exp, char *path)
|
||||
closedir (exp_dir);
|
||||
exp_names->sort (dir_name_cmp);
|
||||
Experiment **t_exp_list = new Experiment *[exp_names->size ()];
|
||||
- int nsubexps = 0;
|
||||
-
|
||||
for (int j = 0, jsz = exp_names->size (); j < jsz; j++)
|
||||
{
|
||||
t_exp_list[j] = NULL;
|
||||
@@ -1220,7 +1218,6 @@ DbeSession::open_experiment (Experiment *exp, char *path)
|
||||
dexp->open (dpath);
|
||||
append (dexp);
|
||||
t_exp_list[j] = dexp;
|
||||
- nsubexps++;
|
||||
dexp->set_clock (exp->clock);
|
||||
|
||||
// DbeView add_experiment() is split into two parts
|
||||
diff --git a/gprofng/src/Disasm.cc b/gprofng/src/Disasm.cc
|
||||
index 1396e4fb072..d78212cee39 100644
|
||||
--- a/gprofng/src/Disasm.cc
|
||||
+++ b/gprofng/src/Disasm.cc
|
||||
@@ -49,7 +49,6 @@ struct DisContext
|
||||
};
|
||||
|
||||
static const int MAX_DISASM_STR = 2048;
|
||||
-static const int MAX_INSTR_SIZE = 8;
|
||||
|
||||
Disasm::Disasm (char *fname)
|
||||
{
|
||||
diff --git a/gprofng/src/Experiment.cc b/gprofng/src/Experiment.cc
|
||||
index 02a24ebc40d..a31550aff66 100644
|
||||
--- a/gprofng/src/Experiment.cc
|
||||
+++ b/gprofng/src/Experiment.cc
|
||||
@@ -1935,8 +1935,6 @@ private:
|
||||
}
|
||||
|
||||
Experiment *exp;
|
||||
- char *hostname;
|
||||
- hrtime_t time, tstamp;
|
||||
};
|
||||
|
||||
void
|
||||
diff --git a/gprofng/src/HashMap.h b/gprofng/src/HashMap.h
|
||||
index 918c0dc95f9..c5fdd345ba8 100644
|
||||
--- a/gprofng/src/HashMap.h
|
||||
+++ b/gprofng/src/HashMap.h
|
||||
@@ -78,9 +78,8 @@ copy_key (uint64_t a)
|
||||
}
|
||||
|
||||
template<> inline void
|
||||
-delete_key (uint64_t a)
|
||||
+delete_key (uint64_t)
|
||||
{
|
||||
- a = a;
|
||||
}
|
||||
|
||||
template<> inline int
|
||||
diff --git a/gprofng/src/IOActivity.h b/gprofng/src/IOActivity.h
|
||||
index cf462cf8d55..f3a22ada6b1 100644
|
||||
--- a/gprofng/src/IOActivity.h
|
||||
+++ b/gprofng/src/IOActivity.h
|
||||
@@ -78,7 +78,6 @@ private:
|
||||
Hist_data *hist_data_file_all;
|
||||
Hist_data *hist_data_vfd_all;
|
||||
Hist_data *hist_data_callstack_all;
|
||||
- Hist_data *hist_data_callstack;
|
||||
|
||||
DbeView *dbev;
|
||||
};
|
||||
diff --git a/gprofng/src/collctrl.cc b/gprofng/src/collctrl.cc
|
||||
index ebf888c5a20..b0ed66efcdc 100644
|
||||
--- a/gprofng/src/collctrl.cc
|
||||
+++ b/gprofng/src/collctrl.cc
|
||||
@@ -952,9 +952,7 @@ Coll_Ctrl::set_clkprof (const char *string, char** warn)
|
||||
double dval = strtod (string, &endchar);
|
||||
if (*endchar == 'm' || *endchar == 0) /* user specified milliseconds */
|
||||
dval = dval * 1000.;
|
||||
- else if (*endchar == 'u') /* user specified microseconds */
|
||||
- dval = dval;
|
||||
- else
|
||||
+ else if (*endchar != 'u')
|
||||
return dbe_sprintf (GTXT ("Unrecognized clock-profiling interval `%s'\n"), string);
|
||||
nclkprof_timer = (int) (dval + 0.5);
|
||||
}
|
||||
@@ -2901,7 +2899,7 @@ Coll_Ctrl::get (char * control)
|
||||
}
|
||||
if (!strncmp (control, ipc_str_javaprof, len))
|
||||
{
|
||||
- if ((java_mode == 0))
|
||||
+ if (java_mode == 0)
|
||||
return strdup (ipc_str_off);
|
||||
return strdup (ipc_str_on);
|
||||
}
|
||||
@@ -2917,7 +2915,7 @@ Coll_Ctrl::get (char * control)
|
||||
}
|
||||
if (!strncmp (control, ipc_str_sample_sig, len))
|
||||
{
|
||||
- if ((sample_sig == 0))
|
||||
+ if (sample_sig == 0)
|
||||
return strdup (ipc_str_off);
|
||||
char *str_signal = find_signal_name (sample_sig);
|
||||
if (str_signal != NULL)
|
||||
@@ -2951,15 +2949,15 @@ Coll_Ctrl::get (char * control)
|
||||
}
|
||||
if (!strncmp (control, ipc_str_iotrace, len))
|
||||
{
|
||||
- if ((iotrace_enabled == 0))
|
||||
+ if (iotrace_enabled == 0)
|
||||
return strdup (ipc_str_off);
|
||||
return strdup (ipc_str_on);
|
||||
}
|
||||
if (!strncmp (control, ipc_str_count, len))
|
||||
{
|
||||
- if ((count_enabled == 0))
|
||||
+ if (count_enabled == 0)
|
||||
return strdup (ipc_str_off);
|
||||
- if ((count_enabled < 0))
|
||||
+ if (count_enabled < 0)
|
||||
return strdup ("on\nstatic");
|
||||
return strdup (ipc_str_on);
|
||||
}
|
||||
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
|
||||
index bb48eadb9f8..ebcdbca561f 100644
|
||||
--- a/gprofng/src/collector_module.h
|
||||
+++ b/gprofng/src/collector_module.h
|
||||
@@ -40,12 +40,12 @@ struct tm;
|
||||
* If you add any, please put it in the right place */
|
||||
typedef struct CollectorUtilFuncs
|
||||
{
|
||||
- int (*access)();
|
||||
+ int (*access)(const char *, int);
|
||||
int (*atoi)(const char *nptr);
|
||||
void *(*calloc)(size_t nelem, size_t elsize);
|
||||
int (*clearenv)(void);
|
||||
int (*close)(int);
|
||||
- int (*closedir)();
|
||||
+ int (*closedir)(DIR *);
|
||||
int (*execv)(const char *path, char *const argv[]);
|
||||
void (*exit)(int status);
|
||||
int (*fclose)(FILE *stream);
|
||||
@@ -66,20 +66,20 @@ typedef struct CollectorUtilFuncs
|
||||
off_t (*lseek)(int fd, off_t offset, int whence);
|
||||
void *(*malloc)(size_t size);
|
||||
void *(*memset)(void *s1, int c, size_t n);
|
||||
- int (*mkdir)();
|
||||
+ int (*mkdir)(const char *, mode_t);
|
||||
time_t (*mktime)(struct tm *timeptr);
|
||||
void *(*mmap)(void *, size_t, int, int, int, off_t);
|
||||
- void *(*mmap64_)();
|
||||
- int (*munmap)();
|
||||
+ void *(*mmap64_)(void *, size_t, int, int, int, off_t);
|
||||
+ int (*munmap)(void *, size_t);
|
||||
int (*open)(const char *, int, ...);
|
||||
int (*open_bare)(const char *, int, ...);
|
||||
- DIR *(*opendir)();
|
||||
+ DIR *(*opendir)(const char *);
|
||||
int (*pclose)(FILE *stream);
|
||||
FILE *(*popen)(const char *command, const char *mode);
|
||||
int (*putenv)(char *string);
|
||||
- ssize_t (*pwrite)();
|
||||
- ssize_t (*pwrite64_)();
|
||||
- ssize_t (*read)();
|
||||
+ ssize_t (*pwrite)(int, const void *, size_t, off_t);
|
||||
+ ssize_t (*pwrite64_)(int, const void *, size_t, off_t);
|
||||
+ ssize_t (*read)(int, void *, size_t);
|
||||
int (*setenv)(const char *name, const char *value, int overwrite);
|
||||
int (*sigfillset)(sigset_t *set);
|
||||
int (*sigprocmask)(int how, const sigset_t *set, sigset_t *oldset);
|
||||
@@ -112,7 +112,7 @@ typedef struct CollectorUtilFuncs
|
||||
int (*unsetenv)(const char *name);
|
||||
int (*vsnprintf)(char *str, size_t size, const char *format, va_list ap);
|
||||
pid_t (*waitpid)(pid_t pid, int *stat_loc, int options);
|
||||
- ssize_t (*write)();
|
||||
+ ssize_t (*write)(int, void *, size_t);
|
||||
double (*atof)();
|
||||
void *n_a;
|
||||
} CollectorUtilFuncs;
|
||||
diff --git a/gprofng/src/gp-display-src.cc b/gprofng/src/gp-display-src.cc
|
||||
index 200e6080d2e..24af375edf1 100644
|
||||
--- a/gprofng/src/gp-display-src.cc
|
||||
+++ b/gprofng/src/gp-display-src.cc
|
||||
@@ -75,14 +75,6 @@ private:
|
||||
bool v_opt;
|
||||
int multiple;
|
||||
char *str_compcom;
|
||||
- bool hex_visible;
|
||||
- int src_visible;
|
||||
- int vis_src;
|
||||
- int vis_dis;
|
||||
- int threshold_src;
|
||||
- int threshold_dis;
|
||||
- int threshold;
|
||||
- int vis_bits;
|
||||
};
|
||||
|
||||
static int
|
||||
diff --git a/gprofng/src/gp-print.h b/gprofng/src/gp-print.h
|
||||
index 1b748ea60a3..1a8ad3b6c13 100644
|
||||
--- a/gprofng/src/gp-print.h
|
||||
+++ b/gprofng/src/gp-print.h
|
||||
@@ -19,7 +19,7 @@
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _GP_PRINT_H
|
||||
-#define _ER_PRINT_H
|
||||
+#define _GP_PRINT_H
|
||||
|
||||
#include "Command.h"
|
||||
#include "DbeApplication.h"
|
||||
diff --git a/gprofng/src/util.cc b/gprofng/src/util.cc
|
||||
index 201f7088b66..228140b61ae 100644
|
||||
--- a/gprofng/src/util.cc
|
||||
+++ b/gprofng/src/util.cc
|
||||
@@ -741,17 +741,13 @@ get_relative_link (const char *path_from, const char *path_to)
|
||||
s2 = canonical_path (s2);
|
||||
long l = dbe_sstrlen (s1);
|
||||
// try to find common directories
|
||||
- int common_slashes = 0;
|
||||
int last_common_slash = -1;
|
||||
for (int i = 0; i < l; i++)
|
||||
{
|
||||
- if (s1[i] != s2[i]) break;
|
||||
- if (s1[i] == 0) break;
|
||||
+ if (s1[i] != s2[i] || s1[i] == 0)
|
||||
+ break;
|
||||
if (s1[i] == '/')
|
||||
- {
|
||||
- common_slashes++;
|
||||
- last_common_slash = i;
|
||||
- }
|
||||
+ last_common_slash = i;
|
||||
}
|
||||
// find slashes in remaining path_to
|
||||
int slashes = 0;
|
||||
@@ -0,0 +1,606 @@
|
||||
From 610889f9e0cace025758fdd0ce8e8f9edf9f4223 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Sat, 16 Nov 2024 05:13:48 +0000
|
||||
Subject: [PATCH] gprofng: fix -std=gnu23 compatibility wrt unprototyped
|
||||
functions
|
||||
|
||||
C23 removes support for unprototyped functions. Fix function pointer types
|
||||
accordingly.
|
||||
|
||||
This does not fix all instances, there's a few left as I commented on in
|
||||
PR32374 (e.g. setitimer which I have a local workaround for but it involves
|
||||
a glibc implementation detail; the Linaro precommit CI tester pointed that
|
||||
out too, so dropped that).
|
||||
|
||||
ChangeLog:
|
||||
PR gprofng/32374
|
||||
|
||||
* libcollector/collector.c (collector_sample): Fix prototype.
|
||||
* libcollector/envmgmt.c (putenv): Ditto.
|
||||
(_putenv): Ditto.
|
||||
(__collector_putenv): Ditto.
|
||||
(setenv): Ditto.
|
||||
(_setenv): Ditto.
|
||||
(__collector_setenv): Ditto.
|
||||
(unsetenv): Ditto.
|
||||
(_unsetenv): Ditto.
|
||||
(__collector_unsetenv): Ditto.
|
||||
* libcollector/jprofile.c (open_experiment): Ditto.
|
||||
(__collector_jprofile_enable_synctrace): Ditto.
|
||||
(jprof_find_asyncgetcalltrace): Ditto.
|
||||
* libcollector/libcol_util.c (__collector_util_init): Ditto.
|
||||
(ARCH): Ditto.
|
||||
* libcollector/mmaptrace.c (collector_func_load): Ditto.
|
||||
(collector_func_unload): Ditto.
|
||||
* libcollector/unwind.c (__collector_ext_unwind_init): Ditto.
|
||||
* src/collector_module.h: Ditto.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/a2f774427e078f3da2c06bdea25f77a61979a695]
|
||||
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||
---
|
||||
gprofng/libcollector/collector.c | 2 +-
|
||||
gprofng/libcollector/envmgmt.c | 24 ++++-----
|
||||
gprofng/libcollector/jprofile.c | 10 ++--
|
||||
gprofng/libcollector/libcol_util.c | 84 +++++++++++++++---------------
|
||||
gprofng/libcollector/mmaptrace.c | 4 +-
|
||||
gprofng/libcollector/unwind.c | 2 +-
|
||||
gprofng/src/collector_module.h | 2 +-
|
||||
7 files changed, 64 insertions(+), 64 deletions(-)
|
||||
|
||||
diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c
|
||||
index ef580dcbdd9..899f08a5381 100644
|
||||
--- a/gprofng/libcollector/collector.c
|
||||
+++ b/gprofng/libcollector/collector.c
|
||||
@@ -1579,7 +1579,7 @@ __collector_resume_experiment ()
|
||||
}
|
||||
|
||||
/* Code to support Samples and Pause/Resume */
|
||||
-void collector_sample () __attribute__ ((weak, alias ("__collector_sample")));
|
||||
+void collector_sample (char *name) __attribute__ ((weak, alias ("__collector_sample")));
|
||||
void
|
||||
__collector_sample (char *name)
|
||||
{
|
||||
diff --git a/gprofng/libcollector/envmgmt.c b/gprofng/libcollector/envmgmt.c
|
||||
index ebe08f82007..0ff7621070d 100644
|
||||
--- a/gprofng/libcollector/envmgmt.c
|
||||
+++ b/gprofng/libcollector/envmgmt.c
|
||||
@@ -692,8 +692,8 @@ __collector_env_update (char *envp[])
|
||||
|
||||
|
||||
/*------------------------------------------------------------- putenv */
|
||||
-int putenv () __attribute__ ((weak, alias ("__collector_putenv")));
|
||||
-int _putenv () __attribute__ ((weak, alias ("__collector_putenv")));
|
||||
+int putenv (char*) __attribute__ ((weak, alias ("__collector_putenv")));
|
||||
+int _putenv (char*) __attribute__ ((weak, alias ("__collector_putenv")));
|
||||
|
||||
int
|
||||
__collector_putenv (char * string)
|
||||
@@ -701,9 +701,9 @@ __collector_putenv (char * string)
|
||||
if (CALL_UTIL (putenv) == __collector_putenv ||
|
||||
CALL_UTIL (putenv) == NULL)
|
||||
{ // __collector_libc_funcs_init failed
|
||||
- CALL_UTIL (putenv) = (int(*)())dlsym (RTLD_NEXT, "putenv");
|
||||
+ CALL_UTIL (putenv) = (int(*)(char*))dlsym (RTLD_NEXT, "putenv");
|
||||
if (CALL_UTIL (putenv) == NULL || CALL_UTIL (putenv) == __collector_putenv)
|
||||
- CALL_UTIL (putenv) = (int(*)())dlsym (RTLD_DEFAULT, "putenv");
|
||||
+ CALL_UTIL (putenv) = (int(*)(char*))dlsym (RTLD_DEFAULT, "putenv");
|
||||
if (CALL_UTIL (putenv) == NULL || CALL_UTIL (putenv) == __collector_putenv)
|
||||
{
|
||||
TprintfT (DBG_LT2, "__collector_putenv(): ERROR: no pointer found.\n");
|
||||
@@ -719,8 +719,8 @@ __collector_putenv (char * string)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------- setenv */
|
||||
-int setenv () __attribute__ ((weak, alias ("__collector_setenv")));
|
||||
-int _setenv () __attribute__ ((weak, alias ("__collector_setenv")));
|
||||
+int setenv (const char*, const char*, int) __attribute__ ((weak, alias ("__collector_setenv")));
|
||||
+int _setenv (const char*, const char*, int) __attribute__ ((weak, alias ("__collector_setenv")));
|
||||
|
||||
int
|
||||
__collector_setenv (const char *name, const char *value, int overwrite)
|
||||
@@ -728,9 +728,9 @@ __collector_setenv (const char *name, const char *value, int overwrite)
|
||||
if (CALL_UTIL (setenv) == __collector_setenv ||
|
||||
CALL_UTIL (setenv) == NULL)
|
||||
{ // __collector_libc_funcs_init failed
|
||||
- CALL_UTIL (setenv) = (int(*)())dlsym (RTLD_NEXT, "setenv");
|
||||
+ CALL_UTIL (setenv) = (int(*)(const char*, const char*, int))dlsym (RTLD_NEXT, "setenv");
|
||||
if (CALL_UTIL (setenv) == NULL || CALL_UTIL (setenv) == __collector_setenv)
|
||||
- CALL_UTIL (setenv) = (int(*)())dlsym (RTLD_DEFAULT, "setenv");
|
||||
+ CALL_UTIL (setenv) = (int(*)(const char*, const char*, int))dlsym (RTLD_DEFAULT, "setenv");
|
||||
if (CALL_UTIL (setenv) == NULL || CALL_UTIL (setenv) == __collector_setenv)
|
||||
{
|
||||
TprintfT (DBG_LT2, "__collector_setenv(): ERROR: no pointer found.\n");
|
||||
@@ -765,8 +765,8 @@ __collector_setenv (const char *name, const char *value, int overwrite)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------- unsetenv */
|
||||
-int unsetenv () __attribute__ ((weak, alias ("__collector_unsetenv")));
|
||||
-int _unsetenv () __attribute__ ((weak, alias ("__collector_unsetenv")));
|
||||
+int unsetenv (const char*) __attribute__ ((weak, alias ("__collector_unsetenv")));
|
||||
+int _unsetenv (const char*) __attribute__ ((weak, alias ("__collector_unsetenv")));
|
||||
|
||||
int
|
||||
__collector_unsetenv (const char *name)
|
||||
@@ -774,9 +774,9 @@ __collector_unsetenv (const char *name)
|
||||
if (CALL_UTIL (unsetenv) == __collector_unsetenv ||
|
||||
CALL_UTIL (unsetenv) == NULL)
|
||||
{ // __collector_libc_funcs_init failed
|
||||
- CALL_UTIL (unsetenv) = (int(*)())dlsym (RTLD_NEXT, "unsetenv");
|
||||
+ CALL_UTIL (unsetenv) = (int(*)(const char*))dlsym (RTLD_NEXT, "unsetenv");
|
||||
if (CALL_UTIL (unsetenv) == NULL || CALL_UTIL (unsetenv) == __collector_unsetenv)
|
||||
- CALL_UTIL (unsetenv) = (int(*)())dlsym (RTLD_DEFAULT, "unsetenv");
|
||||
+ CALL_UTIL (unsetenv) = (int(*)(const char*))dlsym (RTLD_DEFAULT, "unsetenv");
|
||||
if (CALL_UTIL (unsetenv) == NULL || CALL_UTIL (unsetenv) == __collector_unsetenv)
|
||||
{
|
||||
TprintfT (DBG_LT2, "__collector_unsetenv(): ERROR: no pointer found.\n");
|
||||
diff --git a/gprofng/libcollector/jprofile.c b/gprofng/libcollector/jprofile.c
|
||||
index 1bacacc1a2a..11051f937ef 100644
|
||||
--- a/gprofng/libcollector/jprofile.c
|
||||
+++ b/gprofng/libcollector/jprofile.c
|
||||
@@ -105,8 +105,8 @@ static void rwrite (int fd, const void *buf, size_t nbyte);
|
||||
static void addToDynamicArchive (const char* name, const unsigned char* class_data, int class_data_len);
|
||||
static void (*AsyncGetCallTrace)(JVMPI_CallTrace*, jint, ucontext_t*) = NULL;
|
||||
static void (*collector_heap_record)(int, int, void*) = NULL;
|
||||
-static void (*collector_jsync_begin)() = NULL;
|
||||
-static void (*collector_jsync_end)(hrtime_t, void *) = NULL;
|
||||
+static void (*collector_jsync_begin)(void) = NULL;
|
||||
+static void (*collector_jsync_end)(hrtime_t, void*) = NULL;
|
||||
|
||||
#define gethrtime collector_interface->getHiResTime
|
||||
|
||||
@@ -230,7 +230,7 @@ open_experiment (const char *exp)
|
||||
else if (__collector_strStartWith (args, "s:") == 0)
|
||||
{
|
||||
java_sync_mode = 1;
|
||||
- collector_jsync_begin = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
|
||||
+ collector_jsync_begin = (void(*)(void))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
|
||||
collector_jsync_end = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_end");
|
||||
}
|
||||
#endif
|
||||
@@ -255,7 +255,7 @@ __collector_jprofile_enable_synctrace ()
|
||||
return;
|
||||
}
|
||||
java_sync_mode = 1;
|
||||
- collector_jsync_begin = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
|
||||
+ collector_jsync_begin = (void(*)(void))dlsym (RTLD_DEFAULT, "__collector_jsync_begin");
|
||||
collector_jsync_end = (void(*)(hrtime_t, void *))dlsym (RTLD_DEFAULT, "__collector_jsync_end");
|
||||
TprintfT (DBG_LT1, "jprofile: turning on Java synctrace, and requesting events\n");
|
||||
}
|
||||
@@ -1129,7 +1129,7 @@ jprof_find_asyncgetcalltrace ()
|
||||
{
|
||||
void *jvmhandle;
|
||||
if (__collector_VM_ReadByteInstruction == NULL)
|
||||
- __collector_VM_ReadByteInstruction = (int(*)()) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
|
||||
+ __collector_VM_ReadByteInstruction = (int(*)(unsigned char*)) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
|
||||
|
||||
/* look for stack unwind function using default path */
|
||||
AsyncGetCallTrace = (void (*)(JVMPI_CallTrace*, jint, ucontext_t*))
|
||||
diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
|
||||
index c2b82894e6b..688bdf19c6d 100644
|
||||
--- a/gprofng/libcollector/libcol_util.c
|
||||
+++ b/gprofng/libcollector/libcol_util.c
|
||||
@@ -1114,7 +1114,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "munmap");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.munmap = (int(*)())ptr;
|
||||
+ __collector_util_funcs.munmap = (int(*)(void *, size_t))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT munmap: %s\n", dlerror ());
|
||||
@@ -1123,7 +1123,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "close");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.close = (int(*)())ptr;
|
||||
+ __collector_util_funcs.close = (int(*)(int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT close: %s\n", dlerror ());
|
||||
@@ -1158,7 +1158,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "close");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.close = (int(*)())ptr;
|
||||
+ __collector_util_funcs.close = (int(*)(int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT close: %s\n", dlerror ());
|
||||
@@ -1167,7 +1167,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "read");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.read = (ssize_t (*)())ptr;
|
||||
+ __collector_util_funcs.read = (ssize_t (*)(int, void*, size_t))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT read: %s\n", dlerror ());
|
||||
@@ -1176,7 +1176,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "write");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.write = (ssize_t (*)())ptr;
|
||||
+ __collector_util_funcs.write = (ssize_t (*)(int, void*, size_t))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT write: %s\n", dlerror ());
|
||||
@@ -1186,14 +1186,14 @@ __collector_util_init ()
|
||||
#if ARCH(Intel) && WSIZE(32)
|
||||
ptr = dlvsym (libc, "pwrite", "GLIBC_2.2"); // it is in /lib/libpthread.so.0
|
||||
if (ptr)
|
||||
- __collector_util_funcs.pwrite = (ssize_t (*)())ptr;
|
||||
+ __collector_util_funcs.pwrite = (ssize_t (*)(int, void*, size_t, off_t))ptr;
|
||||
else
|
||||
{
|
||||
Tprintf (DBG_LT0, "libcol_util: WARNING: dlvsym for %s@%s failed. Using dlsym() instead.", "pwrite", "GLIBC_2.2");
|
||||
#endif /* ARCH(Intel) && WSIZE(32) */
|
||||
ptr = dlsym (libc, "pwrite");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.pwrite = (ssize_t (*)())ptr;
|
||||
+ __collector_util_funcs.pwrite = (ssize_t (*)(int, const void*, size_t, off_t))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT pwrite: %s\n", dlerror ());
|
||||
@@ -1213,7 +1213,7 @@ __collector_util_init ()
|
||||
#endif /* ARCH(Intel) && WSIZE(32) */
|
||||
ptr = dlsym (libc, "pwrite64");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.pwrite64_ = (ssize_t (*)())ptr;
|
||||
+ __collector_util_funcs.pwrite64_ = (ssize_t (*)(int, const void*, size_t, off_t))ptr;
|
||||
else
|
||||
__collector_util_funcs.pwrite64_ = __collector_util_funcs.pwrite;
|
||||
#if ARCH(Intel) && WSIZE(32)
|
||||
@@ -1222,7 +1222,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "lseek");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.lseek = (off_t (*)())ptr;
|
||||
+ __collector_util_funcs.lseek = (off_t (*)(int, off_t, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT lseek: %s\n", dlerror ());
|
||||
@@ -1231,7 +1231,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "access");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.access = (int(*)())ptr;
|
||||
+ __collector_util_funcs.access = (int(*)(const char*, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT access: %s\n", dlerror ());
|
||||
@@ -1240,7 +1240,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "mkdir");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.mkdir = (int(*)())ptr;
|
||||
+ __collector_util_funcs.mkdir = (int(*)(const char*, mode_t))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT mkdir: %s\n", dlerror ());
|
||||
@@ -1249,7 +1249,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "opendir");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.opendir = (DIR * (*)())ptr;
|
||||
+ __collector_util_funcs.opendir = (DIR * (*)(const char*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT opendir: %s\n", dlerror ());
|
||||
@@ -1258,7 +1258,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "closedir");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.closedir = (int(*)())ptr;
|
||||
+ __collector_util_funcs.closedir = (int(*)(DIR*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT closedir: %s\n", dlerror ());
|
||||
@@ -1267,7 +1267,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "execv");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.execv = (int(*)())ptr;
|
||||
+ __collector_util_funcs.execv = (int(*)(const char*, char* const*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT execv: %s\n", dlerror ());
|
||||
@@ -1276,7 +1276,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "exit");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.exit = (void(*)())ptr;
|
||||
+ __collector_util_funcs.exit = (void(*)(int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT exit: %s\n", dlerror ());
|
||||
@@ -1285,7 +1285,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "vfork");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.vfork = (pid_t (*)())ptr;
|
||||
+ __collector_util_funcs.vfork = (pid_t (*)(void))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT vfork: %s\n", dlerror ());
|
||||
@@ -1294,7 +1294,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "waitpid");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.waitpid = (pid_t (*)())ptr;
|
||||
+ __collector_util_funcs.waitpid = (pid_t (*)(pid_t, int*, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT waitpid: %s\n", dlerror ());
|
||||
@@ -1313,7 +1313,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "getcontext");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.getcontext = (int(*)())ptr;
|
||||
+ __collector_util_funcs.getcontext = (int(*)(ucontext_t*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT getcontext: %s\n", dlerror ());
|
||||
@@ -1331,7 +1331,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "putenv");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.putenv = (int(*)())ptr;
|
||||
+ __collector_util_funcs.putenv = (int(*)(char*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT putenv: %s\n", dlerror ());
|
||||
@@ -1340,7 +1340,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "getenv");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.getenv = (char*(*)())ptr;
|
||||
+ __collector_util_funcs.getenv = (char*(*)(const char*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT getenv: %s\n", dlerror ());
|
||||
@@ -1349,7 +1349,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "time");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.time = (time_t (*)())ptr;
|
||||
+ __collector_util_funcs.time = (time_t (*)(time_t*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT time: %s\n", dlerror ());
|
||||
@@ -1358,7 +1358,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "mktime");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.mktime = (time_t (*)())ptr;
|
||||
+ __collector_util_funcs.mktime = (time_t (*)(struct tm*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT mktime: %s\n", dlerror ());
|
||||
@@ -1372,7 +1372,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "gmtime_r");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.gmtime_r = (struct tm * (*)())ptr;
|
||||
+ __collector_util_funcs.gmtime_r = (struct tm * (*)(const time_t*, struct tm*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT gmtime_r: %s\n", dlerror ());
|
||||
@@ -1381,7 +1381,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "strtol");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.strtol = (long (*)())ptr;
|
||||
+ __collector_util_funcs.strtol = (long (*)(const char*, char**, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtol: %s\n", dlerror ());
|
||||
@@ -1390,7 +1390,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "strtoll");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.strtoll = (long long (*)())ptr;
|
||||
+ __collector_util_funcs.strtoll = (long long (*)(const char*, char**, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtoll: %s\n", dlerror ());
|
||||
@@ -1402,7 +1402,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "setenv");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.setenv = (int(*)())ptr;
|
||||
+ __collector_util_funcs.setenv = (int(*)(const char*, const char*, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT setenv: %s\n", dlerror ());
|
||||
@@ -1411,7 +1411,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "unsetenv");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.unsetenv = (int(*)())ptr;
|
||||
+ __collector_util_funcs.unsetenv = (int(*)(const char*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT unsetenv: %s\n", dlerror ());
|
||||
@@ -1498,7 +1498,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "pclose");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.pclose = (int(*)())ptr;
|
||||
+ __collector_util_funcs.pclose = (int(*)(FILE*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT pclose: %s\n", dlerror ());
|
||||
@@ -1507,7 +1507,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "fgets");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.fgets = (char*(*)())ptr;
|
||||
+ __collector_util_funcs.fgets = (char*(*)(char*, int, FILE*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT fgets: %s\n", dlerror ());
|
||||
@@ -1534,7 +1534,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "vsnprintf");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.vsnprintf = (int(*)())ptr;
|
||||
+ __collector_util_funcs.vsnprintf = (int(*)(char*, size_t, const char*, ...))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT vsnprintf: %s\n", dlerror ());
|
||||
@@ -1543,7 +1543,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "atoi");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.atoi = (int(*)())ptr;
|
||||
+ __collector_util_funcs.atoi = (int(*)(const char*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT atoi: %s\n", dlerror ());
|
||||
@@ -1552,7 +1552,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "calloc");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.calloc = (void*(*)())ptr;
|
||||
+ __collector_util_funcs.calloc = (void*(*)(size_t, size_t))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT calloc: %s\n", dlerror ());
|
||||
@@ -1562,7 +1562,7 @@ __collector_util_init ()
|
||||
ptr = dlsym (libc, "free");
|
||||
if (ptr)
|
||||
{
|
||||
- __collector_util_funcs.free = (void(*)())ptr;
|
||||
+ __collector_util_funcs.free = (void(*)(void*))ptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1572,7 +1572,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "strdup");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.libc_strdup = (char*(*)())ptr;
|
||||
+ __collector_util_funcs.libc_strdup = (char*(*)(const char*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strdup: %s\n", dlerror ());
|
||||
@@ -1585,7 +1585,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "strerror");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.strerror = (char*(*)())ptr;
|
||||
+ __collector_util_funcs.strerror = (char*(*)(int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strerror: %s\n", dlerror ());
|
||||
@@ -1593,7 +1593,7 @@ __collector_util_init ()
|
||||
}
|
||||
ptr = dlsym (libc, "strerror_r");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.strerror_r = (int(*)())ptr;
|
||||
+ __collector_util_funcs.strerror_r = (int(*)(int, char*, size_t))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strerror_r: %s\n", dlerror ());
|
||||
@@ -1601,7 +1601,7 @@ __collector_util_init ()
|
||||
}
|
||||
ptr = dlsym (libc, "strspn");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.strspn = (size_t (*)())ptr;
|
||||
+ __collector_util_funcs.strspn = (size_t (*)(const char*, const char*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strspn: %s\n", dlerror ());
|
||||
@@ -1610,7 +1610,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "strtoul");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.strtoul = (unsigned long int(*)())ptr;
|
||||
+ __collector_util_funcs.strtoul = (unsigned long int(*)(const char*, char**, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtoul: %s\n", dlerror ());
|
||||
@@ -1619,7 +1619,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "strtoull");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.strtoull = (unsigned long long int(*)())ptr;
|
||||
+ __collector_util_funcs.strtoull = (unsigned long long int(*)(const char*, char**, int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT strtoull: %s\n", dlerror ());
|
||||
@@ -1664,7 +1664,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "sysconf");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.sysconf = (long(*)())ptr;
|
||||
+ __collector_util_funcs.sysconf = (long(*)(int))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sysconf: %s\n", dlerror ());
|
||||
@@ -1673,7 +1673,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "sigfillset");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.sigfillset = (int(*)())ptr;
|
||||
+ __collector_util_funcs.sigfillset = (int(*)(sigset_t*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sigfillset: %s\n", dlerror ());
|
||||
@@ -1682,7 +1682,7 @@ __collector_util_init ()
|
||||
|
||||
ptr = dlsym (libc, "sigprocmask");
|
||||
if (ptr)
|
||||
- __collector_util_funcs.sigprocmask = (int(*)())ptr;
|
||||
+ __collector_util_funcs.sigprocmask = (int(*)(int, const sigset_t*, sigset_t*))ptr;
|
||||
else
|
||||
{
|
||||
CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sigprocmask: %s\n", dlerror ());
|
||||
diff --git a/gprofng/libcollector/mmaptrace.c b/gprofng/libcollector/mmaptrace.c
|
||||
index f07f4d76513..2a6857ab58e 100644
|
||||
--- a/gprofng/libcollector/mmaptrace.c
|
||||
+++ b/gprofng/libcollector/mmaptrace.c
|
||||
@@ -1209,7 +1209,7 @@ process_vsyscall_page ()
|
||||
/*
|
||||
* collector API for dynamic functions
|
||||
*/
|
||||
-void collector_func_load () __attribute__ ((weak, alias ("__collector_func_load")));
|
||||
+void collector_func_load (char*, char*, char*, void*, int, int, DT_lineno *) __attribute__ ((weak, alias ("__collector_func_load")));
|
||||
void
|
||||
__collector_func_load (char *name, char *alias, char *sourcename,
|
||||
void *vaddr, int size, int lntsize, DT_lineno *lntable)
|
||||
@@ -1218,7 +1218,7 @@ __collector_func_load (char *name, char *alias, char *sourcename,
|
||||
vaddr, size, lntsize, lntable);
|
||||
}
|
||||
|
||||
-void collector_func_unload () __attribute__ ((weak, alias ("__collector_func_unload")));
|
||||
+void collector_func_unload (void *vaddr) __attribute__ ((weak, alias ("__collector_func_unload")));
|
||||
void
|
||||
__collector_func_unload (void *vaddr)
|
||||
{
|
||||
diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c
|
||||
index 91678b1e334..cd47d4fbe0f 100644
|
||||
--- a/gprofng/libcollector/unwind.c
|
||||
+++ b/gprofng/libcollector/unwind.c
|
||||
@@ -416,7 +416,7 @@ __collector_ext_unwind_init (int record)
|
||||
omp_no_walk = 1;
|
||||
|
||||
if (__collector_VM_ReadByteInstruction == NULL)
|
||||
- __collector_VM_ReadByteInstruction = (int(*)()) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
|
||||
+ __collector_VM_ReadByteInstruction = (int(*)(unsigned char*)) dlsym (RTLD_DEFAULT, "Async_VM_ReadByteInstruction");
|
||||
|
||||
#if ARCH(SPARC)
|
||||
#if WSIZE(64)
|
||||
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
|
||||
index ebcdbca561f..fd888cd58dd 100644
|
||||
--- a/gprofng/src/collector_module.h
|
||||
+++ b/gprofng/src/collector_module.h
|
||||
@@ -110,7 +110,7 @@ typedef struct CollectorUtilFuncs
|
||||
long (*sysinfo)(int command, char *buf, long count);
|
||||
time_t (*time)(time_t *tloc);
|
||||
int (*unsetenv)(const char *name);
|
||||
- int (*vsnprintf)(char *str, size_t size, const char *format, va_list ap);
|
||||
+ int (*vsnprintf)(char *str, size_t size, const char *format, ...);
|
||||
pid_t (*waitpid)(pid_t pid, int *stat_loc, int options);
|
||||
ssize_t (*write)(int, void *, size_t);
|
||||
double (*atof)();
|
||||
@@ -0,0 +1,196 @@
|
||||
From 7683ea4411d2b76f346a8100b761615d09343448 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
|
||||
Date: Thu, 21 Nov 2024 14:48:20 -0800
|
||||
Subject: [PATCH] gprofng: fix build with -std=gnu23
|
||||
|
||||
Fix function pointer types accordingly.
|
||||
Remove unused function pointers.
|
||||
|
||||
gprofng/ChangeLog
|
||||
2024-11-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
|
||||
|
||||
PR gprofng/32374
|
||||
PR gprofng/32373
|
||||
* common/cpuid.c: Define ATTRIBUTE_UNUSED if necessary.
|
||||
* libcollector/libcol_util.c (sysinfo): Remove unused pointer.
|
||||
* src/collector_module.h: Likewise.
|
||||
* libcollector/dispatcher.c (setitimer): Fix prototype.
|
||||
* libcollector/linetrace.c (system, grantpt, ptsname): Likewise.
|
||||
* testsuite/gprofng.display/mttest/mttest.c (dump_arrays): Likewise.
|
||||
* testsuite/gprofng.display/synprog/endcases.c (xinline_code,
|
||||
s_inline_code): Likewise.
|
||||
* testsuite/gprofng.display/synprog/inc_inline.h (ext_inline_code):
|
||||
Likewise.
|
||||
* testsuite/gprofng.display/synprog/synprog.c (doabort): Rename nullptr.
|
||||
Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/4e943705e3e8a5a9448d087502bcb390a694ad02]
|
||||
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||
---
|
||||
gprofng/common/cpuid.c | 2 ++
|
||||
gprofng/libcollector/dispatcher.c | 3 +--
|
||||
gprofng/libcollector/libcol_util.c | 9 ---------
|
||||
gprofng/libcollector/linetrace.c | 10 +++++-----
|
||||
gprofng/src/collector_module.h | 1 -
|
||||
gprofng/testsuite/gprofng.display/mttest/mttest.c | 2 +-
|
||||
gprofng/testsuite/gprofng.display/synprog/endcases.c | 4 ++--
|
||||
gprofng/testsuite/gprofng.display/synprog/inc_inline.h | 2 +-
|
||||
gprofng/testsuite/gprofng.display/synprog/synprog.c | 4 ++--
|
||||
9 files changed, 14 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/gprofng/common/cpuid.c b/gprofng/common/cpuid.c
|
||||
index af15439eb27..0373969693b 100644
|
||||
--- a/gprofng/common/cpuid.c
|
||||
+++ b/gprofng/common/cpuid.c
|
||||
@@ -21,7 +21,9 @@
|
||||
#if defined(__i386__) || defined(__x86_64)
|
||||
#include <cpuid.h> /* GCC-provided */
|
||||
#elif defined(__aarch64__)
|
||||
+#if !defined(ATTRIBUTE_UNUSED)
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
+#endif
|
||||
|
||||
static inline uint_t __attribute_const__
|
||||
__get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax,
|
||||
diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c
|
||||
index 867753a22ec..e85c343c776 100644
|
||||
--- a/gprofng/libcollector/dispatcher.c
|
||||
+++ b/gprofng/libcollector/dispatcher.c
|
||||
@@ -1281,5 +1281,4 @@ __collector_ext_clone_pthread (int (*fn)(void *), void *child_stack, int flags,
|
||||
// weak symbols:
|
||||
int sigprocmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_sigprocmask")));
|
||||
int thr_sigsetmask (int, const sigset_t*, sigset_t*) __attribute__ ((weak, alias ("__collector_thr_sigsetmask")));
|
||||
-int setitimer () __attribute__ ((weak, alias ("_setitimer")));
|
||||
-
|
||||
+__typeof(setitimer) setitimer __attribute__ ((weak, alias ("_setitimer")));
|
||||
diff --git a/gprofng/libcollector/libcol_util.c b/gprofng/libcollector/libcol_util.c
|
||||
index 688bdf19c6d..46f8b80ccb4 100644
|
||||
--- a/gprofng/libcollector/libcol_util.c
|
||||
+++ b/gprofng/libcollector/libcol_util.c
|
||||
@@ -1427,15 +1427,6 @@ __collector_util_init ()
|
||||
err = COL_ERROR_UTIL_INIT;
|
||||
}
|
||||
|
||||
- ptr = dlsym (libc, "sysinfo");
|
||||
- if (ptr)
|
||||
- __collector_util_funcs.sysinfo = (long (*)())ptr;
|
||||
- else
|
||||
- {
|
||||
- CALL_UTIL (fprintf)(stderr, "collector_util_init COL_ERROR_UTIL_INIT sysinfo: %s\n", dlerror ());
|
||||
- err = COL_ERROR_UTIL_INIT;
|
||||
- }
|
||||
-
|
||||
ptr = dlsym (libc, "clearenv");
|
||||
if (ptr)
|
||||
__collector_util_funcs.clearenv = (int(*)())ptr;
|
||||
diff --git a/gprofng/libcollector/linetrace.c b/gprofng/libcollector/linetrace.c
|
||||
index 66844bc1337..c81ae1a2272 100644
|
||||
--- a/gprofng/libcollector/linetrace.c
|
||||
+++ b/gprofng/libcollector/linetrace.c
|
||||
@@ -1527,7 +1527,7 @@ DCL_FUNC_VER (DCL_POSIX_SPAWNP, posix_spawnp_2_2, posix_spawnp@GLIBC_2.2)
|
||||
DCL_POSIX_SPAWNP (posix_spawnp)
|
||||
|
||||
/*------------------------------------------------------------- system */
|
||||
-int system () __attribute__ ((weak, alias ("__collector_system")));
|
||||
+int system (const char *cmd) __attribute__ ((weak, alias ("__collector_system")));
|
||||
|
||||
int
|
||||
__collector_system (const char *cmd)
|
||||
@@ -1582,10 +1582,10 @@ DCL_FUNC_VER (DCL_POPEN, popen_2_0, popen@GLIBC_2.0)
|
||||
DCL_POPEN (popen)
|
||||
|
||||
/*------------------------------------------------------------- grantpt */
|
||||
-int grantpt () __attribute__ ((weak, alias ("__collector_grantpt")));
|
||||
+int grantpt (int fildes) __attribute__ ((weak, alias ("__collector_grantpt")));
|
||||
|
||||
int
|
||||
-__collector_grantpt (const int fildes)
|
||||
+__collector_grantpt (int fildes)
|
||||
{
|
||||
if (NULL_PTR (grantpt))
|
||||
init_lineage_intf ();
|
||||
@@ -1607,10 +1607,10 @@ __collector_grantpt (const int fildes)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------- ptsname */
|
||||
-char *ptsname () __attribute__ ((weak, alias ("__collector_ptsname")));
|
||||
+char *ptsname (int fildes) __attribute__ ((weak, alias ("__collector_ptsname")));
|
||||
|
||||
char *
|
||||
-__collector_ptsname (const int fildes)
|
||||
+__collector_ptsname (int fildes)
|
||||
{
|
||||
if (NULL_PTR (ptsname))
|
||||
init_lineage_intf ();
|
||||
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
|
||||
index fd888cd58dd..6640f12fa3c 100644
|
||||
--- a/gprofng/src/collector_module.h
|
||||
+++ b/gprofng/src/collector_module.h
|
||||
@@ -107,7 +107,6 @@ typedef struct CollectorUtilFuncs
|
||||
int (*symlink)(const char *s1, const char *s2);
|
||||
int (*syscall)(int number, ...);
|
||||
long (*sysconf)(int name);
|
||||
- long (*sysinfo)(int command, char *buf, long count);
|
||||
time_t (*time)(time_t *tloc);
|
||||
int (*unsetenv)(const char *name);
|
||||
int (*vsnprintf)(char *str, size_t size, const char *format, ...);
|
||||
diff --git a/gprofng/testsuite/gprofng.display/mttest/mttest.c b/gprofng/testsuite/gprofng.display/mttest/mttest.c
|
||||
index e0835c833e5..3db5b8d8e86 100644
|
||||
--- a/gprofng/testsuite/gprofng.display/mttest/mttest.c
|
||||
+++ b/gprofng/testsuite/gprofng.display/mttest/mttest.c
|
||||
@@ -171,7 +171,7 @@ void computeJ (workStruct_t *x);
|
||||
void computeK (workStruct_t *x);
|
||||
void addone (workCtr_t *x);
|
||||
void init_arrays (int strat);
|
||||
-void dump_arrays ();
|
||||
+void dump_arrays (hrtime_t real, hrtime_t cpu, int case_index);
|
||||
void *do_work (void *v);
|
||||
void thread_work ();
|
||||
void nothreads (Workblk *array, struct scripttab *k);
|
||||
diff --git a/gprofng/testsuite/gprofng.display/synprog/endcases.c b/gprofng/testsuite/gprofng.display/synprog/endcases.c
|
||||
index a6a1389658a..6f1c83b6859 100644
|
||||
--- a/gprofng/testsuite/gprofng.display/synprog/endcases.c
|
||||
+++ b/gprofng/testsuite/gprofng.display/synprog/endcases.c
|
||||
@@ -40,8 +40,8 @@ static void s_inline_code (int);
|
||||
void ext_inline_code (int);
|
||||
|
||||
#ifndef NO_INLINE
|
||||
-void xinline_code () __attribute__ ((always_inline));
|
||||
-void s_inline_code () __attribute__ ((always_inline));
|
||||
+void xinline_code (int) __attribute__ ((always_inline));
|
||||
+void s_inline_code (int) __attribute__ ((always_inline));
|
||||
#endif
|
||||
|
||||
#include "inc_inline.h"
|
||||
diff --git a/gprofng/testsuite/gprofng.display/synprog/inc_inline.h b/gprofng/testsuite/gprofng.display/synprog/inc_inline.h
|
||||
index da42563c828..6600eacb66d 100644
|
||||
--- a/gprofng/testsuite/gprofng.display/synprog/inc_inline.h
|
||||
+++ b/gprofng/testsuite/gprofng.display/synprog/inc_inline.h
|
||||
@@ -19,7 +19,7 @@
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#ifndef NO_INLINE
|
||||
-void ext_inline_code() __attribute__ ((always_inline));
|
||||
+void ext_inline_code(int) __attribute__ ((always_inline));
|
||||
#endif
|
||||
|
||||
void
|
||||
diff --git a/gprofng/testsuite/gprofng.display/synprog/synprog.c b/gprofng/testsuite/gprofng.display/synprog/synprog.c
|
||||
index cf1bc5b0909..05920dc7419 100644
|
||||
--- a/gprofng/testsuite/gprofng.display/synprog/synprog.c
|
||||
+++ b/gprofng/testsuite/gprofng.display/synprog/synprog.c
|
||||
@@ -528,14 +528,14 @@ reapchildren ()
|
||||
int
|
||||
doabort (int k)
|
||||
{
|
||||
- char *nullptr = NULL;
|
||||
+ char *p = NULL;
|
||||
char c;
|
||||
|
||||
/* Log the event */
|
||||
wlog ("start of doabort", NULL);
|
||||
|
||||
/* and dereference a NULL */
|
||||
- c = *nullptr;
|
||||
+ c = *p;
|
||||
|
||||
/* this should never be reached */
|
||||
return (int) c;
|
||||
@@ -0,0 +1,39 @@
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Sat, 21 Jun 2025 06:36:56 +0800
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944]
|
||||
CVE: CVE-2025-7545
|
||||
|
||||
Since the output section contents are copied from the input, don't
|
||||
extend the output section size beyond the input section size.
|
||||
|
||||
PR binutils/33049
|
||||
* objcopy.c (copy_section): Don't extend the output section
|
||||
size beyond the input section size.
|
||||
|
||||
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
|
||||
|
||||
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
|
||||
index a85d2620..18cd1bfd 100644
|
||||
--- a/binutils/objcopy.c
|
||||
+++ b/binutils/objcopy.c
|
||||
@@ -4547,6 +4547,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
|
||||
char *to = (char *) memhunk;
|
||||
char *end = (char *) memhunk + size;
|
||||
int i;
|
||||
+ bfd_size_type memhunk_size = size;
|
||||
|
||||
/* If the section address is not exactly divisible by the interleave,
|
||||
then we must bias the from address. If the copy_byte is less than
|
||||
@@ -4566,6 +4567,11 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
|
||||
}
|
||||
|
||||
size = (size + interleave - 1 - copy_byte) / interleave * copy_width;
|
||||
+
|
||||
+ /* Don't extend the output section size. */
|
||||
+ if (size > memhunk_size)
|
||||
+ size = memhunk_size;
|
||||
+
|
||||
osection->lma /= interleave;
|
||||
if (copy_byte < extra)
|
||||
osection->lma++;
|
||||
@@ -0,0 +1,58 @@
|
||||
From 41461010eb7c79fee7a9d5f6209accdaac66cc6b Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Sat, 21 Jun 2025 06:52:00 +0800
|
||||
Subject: [PATCH] elf: Report corrupted group section
|
||||
|
||||
Report corrupted group section instead of trying to recover.
|
||||
|
||||
PR binutils/33050
|
||||
* elf.c (bfd_elf_set_group_contents): Report corrupted group
|
||||
section.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41461010eb7c79fee7a9d5f6209accdaac66cc6b]
|
||||
CVE: CVE-2025-7546
|
||||
|
||||
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
||||
Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
|
||||
---
|
||||
bfd/elf.c | 23 ++++++++++-------------
|
||||
1 file changed, 10 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index 14ce15c7254..ee894eb05f2 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -3971,20 +3971,17 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
|
||||
break;
|
||||
}
|
||||
|
||||
- /* We should always get here with loc == sec->contents + 4, but it is
|
||||
- possible to craft bogus SHT_GROUP sections that will cause segfaults
|
||||
- in objcopy without checking loc here and in the loop above. */
|
||||
- if (loc == sec->contents)
|
||||
- BFD_ASSERT (0);
|
||||
- else
|
||||
+ /* We should always get here with loc == sec->contents + 4. Return
|
||||
+ an error for bogus SHT_GROUP sections. */
|
||||
+ loc -= 4;
|
||||
+ if (loc != sec->contents)
|
||||
{
|
||||
- loc -= 4;
|
||||
- if (loc != sec->contents)
|
||||
- {
|
||||
- BFD_ASSERT (0);
|
||||
- memset (sec->contents + 4, 0, loc - sec->contents);
|
||||
- loc = sec->contents;
|
||||
- }
|
||||
+ /* xgettext:c-format */
|
||||
+ _bfd_error_handler (_("%pB: corrupted group section: `%pA'"),
|
||||
+ abfd, sec);
|
||||
+ bfd_set_error (bfd_error_bad_value);
|
||||
+ *failedptr = true;
|
||||
+ return;
|
||||
}
|
||||
|
||||
H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
|
||||
--
|
||||
2.43.5
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user