Commit Graph

69204 Commits

Author SHA1 Message Date
Peter Korsgaard
4193eea256 support/dependencies/check-host-tar.sh: blacklist tar 1.35+
GNU tar 1.35 changed the behaviour for the devmajor/devminor fields,
breaking the download hash validation.  For details, see:

https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00005.html
https://patchwork.ozlabs.org/project/buildroot/patch/20231018141155.533944-1-vfazio@gmail.com/

To work around this issue, blacklist tar 1.35+ similar to how we do it for
pre-1.27 versions so Buildroot falls back to building host-tar (which is
currently 1.34).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit f1ee7015a4)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-14 08:55:11 +01:00
Peter Korsgaard
0496e70976 package/tar: add upstream security patch for CVE-2022-48303
Fixes CVE-2022-48303: GNU Tar through 1.34 has a one-byte out-of-bounds read
that results in use of uninitialized memory for a conditional jump.
Exploitation to change the flow of control has not been demonstrated.  The
issue occurs in from_header in list.c via a V7 archive in which mtime has
approximately 11 whitespace characters.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Peter: add _IGNORE_CVES entry]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit ad0bb50dc7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-14 08:55:04 +01:00
Peter Korsgaard
22a1300c61 Revert "package/tar: security bump to version 1.35"
This reverts commit d4d483451f.

Tar 1.35 unfortunately changes the behaviour for the devmajor/devminor
fields, breaking the download hash validation.  From the release notes:

* Leave the devmajor and devminor fields empty (rather than zero) for
  non-special files, as this is more compatible with traditional tar.

https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00005.html

So revert the bump for now.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit f2b23a6320)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-14 08:54:54 +01:00
Fabrice Fontaine
aaee2d9943 package/libmemcached: force CMAKE_BUILD_TYPE
Force CMAKE_BUILD_TYPE to Release to avoid the following build failure
with c-icap or php-memcached raised since bump to version 1.1.4 and
switch to cmake-package in commit
7205df8a4f:

Fixes:
 - http://autobuild.buildroot.org/results/bca84915550a72f1dc89c8661cba2545d6bc96ef
 - http://autobuild.buildroot.org/results/b140d225208e7fa44b935a119e74347caf710e55

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Peter: use +=]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit d23bcbd2bb)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-13 19:53:39 +01:00
Peter Korsgaard
83b09400dd utils/add-custom-hashes: add script to manage global patch dir hashes
Add a script to manage the .hash files in the BR2_GLOBAL_PATCH_DIR for
packages using custom versions.

To use it, run in a configured Buildroot directory, E.G.

  make foo_defconfig; ./utils/add-custom-hashes

We support multiple patch directories in BR2_GLOBAL_PATCH_DIR.  If multiple
directories are specified then use the last one as that is likely to be the
most specific one.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Peter: silence command -v invocation]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 4984d0f230)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-13 19:52:52 +01:00
Oleg Lyovin
943a1d15cf package: dhcpcd: fix dhcpcd binary not stripped
By default dhcpcd installed with 555 permissions as it is
configured in its Makefile.inc. Since 'w' bit is missing,
strip fails and dhcpcd binary installed non-stripped.

On ARM GCC 12 glibc configuration strip saves over 1MB of disk space.

Signed-off-by: Oleg Lyovin <ovlevin@salutedevices.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 72c3f87efa)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-13 14:00:45 +01:00
Bernd Kuhls
f90dedabf4 package/openvpn: security bump version to 2.6.7
Fixes CVE-2023-46849 & CVE-2023-46850.

Changelog:
https://github.com/OpenVPN/openvpn/blob/release/2.6/ChangeLog
https://github.com/OpenVPN/openvpn/blob/release/2.6/Changes.rst

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 437352bd5b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-13 13:58:23 +01:00
Bernd Kuhls
5c4c23cceb package/openvpn: bump version to 2.6.6
Changelog:
https://github.com/OpenVPN/openvpn/blob/release/2.6/ChangeLog
https://github.com/OpenVPN/openvpn/blob/release/2.6/Changes.rst

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit c68987b9c4)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-13 13:57:55 +01:00
Bernd Kuhls
817d6ca340 {linux, linux-headers}: bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 5, 6}.x series
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit b8c92f7d48)
[Peter: drop 6.5.x / 6.6.x bump]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-13 13:52:47 +01:00
Woodrow Douglass
dc1d056476 package/opencv4: security bump to version 4.8.1
Also, bump package/opencv4-contrib to in lock-step.

This addresses both CVE-2023-2617 and CVE-2023-2618, that have been
fixed in OpenCV 4.8.0.

Signed-off-by: Woodrow Douglass <wdouglass@carnegierobotics.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit a01490397e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-11 14:26:08 +01:00
Maxim Kochetkov
9301784cf8 package/libosmium: add optional GDAL dependency
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit e3e844a1f9)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-11 14:25:29 +01:00
Reza Arbab
cfa253f8dc package/petitboot: fix pb-discover pidfile creation
pb-discover does not create its own pid file. Handle the creation and
removal of the pid file in the init script.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 0f04c7ae01)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-11 14:23:35 +01:00
Peter Korsgaard
8b09097f4f package/go: security bump to version 1.20.11
Fixes the following (Windows only) security issues:

CVE-2023-45283: path/filepath: recognize \??\ as a Root Local Device path prefix.
CVE-2023-45284: path/filepath: recognize device names with trailing spaces and superscripts

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-11 14:18:20 +01:00
Christian Hitz
51ba58a112 package/network-manager: add patch for compatibility with curl 8.4
This upstream patch restores the connectivity check functionality with
libcurl 8.4.

Fixes: https://bugs.busybox.net/show_bug.cgi?id=15835

Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
Reviewed-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit b660402b57)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 18:42:22 +01:00
Giulio Benetti
2b32574c3f package/nodejs/nodejs-src: fix arch check on additional modules
Node modules available on the npm registry, may contain prebuild
binaries for various targets and/or ABIs; for example., there might be
ARM. AArch64, x86_64 binaries for glibc or musl, for Linux or Darwin.
Needless to say, those binaries will most often not match the current
target architecture; as such, check-bin-arch will whine loudly as
reported in #15823:

    ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-arm/node.napi.armv6.node" is "ARM", should be "AArch64"
    ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/android-arm/node.napi.armv7.node" is "ARM", should be "AArch64"
    ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-arm/node.napi.armv7.node" is "ARM", should be "AArch64"
    ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-x64/node.napi.glibc.node" is "Advanced Micro Devices X86-64", should be "AArch64"
    ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-x64/node.napi.musl.node" is "Advanced Micro Devices X86-64", should be "AArch64"

The proper solution would be to remove all those prebuilt binaries, and
request npm to forcefully rebuild the proper binary for the current
architecture; alas, there is no option to tell npm to do so.

Doing it manually would not be easy either, as such modules might be
retrieved as part of the "vendoring" for another module that the user
has requested, and be pretty deep in the dependency chain; trying to fix
this properly would be a nightmare: it would require that we manually
inspect the depednency chain, and install dependent modules one by one,
recursively, re-implementing the same logic npm has when multiple
verions of the same module are installed as part of different branches
of the depenency tree, all while detecting prebuilds and removing them
before installing the mpdule (hence decorrelating download and install,
which is not trivial to do with npm alone).

We also can't simply remove all the prebuilds, because it is not known
whether the location ("<module>/prebuilds/") is standardised, or a
convention with the path noted somewhere in the package metadata, and
how deep they would be in the tree, and whether that could conflict with
arbitrary files...

Instead, we will consider that npm has a sane heuristic to detect
whether it should indeed rebuilt the modules, and that node has a sane
heuristic to know which binary to load at runtime, and we will leave the
prebuilt binaries in place and just exclude them from being checked.

Fixes: https://bugs.busybox.net/show_bug.cgi?id=15823

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Tested-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit cbc5691ab2)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 18:37:32 +01:00
Yann E. MORIN
7a27887903 pkg-download: add option to enforce hash checking
Currently, when a package is downloaded from a custom location or
version, Buildroot excludes such a package from the mandatory integrity
check with hashes, because it was until now not possible to have such
hashes.

We now have a mechanism which users can leverage to provide additional
hashes, and so custom versions or locations can now be checked too.

Buildroot has no way to know that hashes have indeed been provided for
a custom location/version, and so will still happily ignore an
unchecked package.

However, users who do provide extra hashes most probably do expect that
no download is done without an integrity check, and thus expect that a
missing hash not be ignored.

Add an option that users can select to make Buildroot forcibly require
at least one valid hash, and no invalid hash, for all downloads.

Reported-by: "Martin Zeiser (mzeiser)" <mzeiser@cisco.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit e091e31831)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 14:30:35 +01:00
Yann E. MORIN
106a8d940f package/pkg-download: lookup hash files in global-patch-dir
Currently, we expect and only use hash files that lie within the package
directory, alongside the .mk file. Those hash files are thus bundled
with Buildroot.

This implies that only what's known to Buildroot can ever get into those
hash files. For packages where the version is fixed (or a static
choice), then we can carry hashes for those known versions.

However, we do have a few packages for which the version is a free-form
entry, where the user can provide a custom location and/or version.  like
a custom VCS tree and revision, or a custom tarball URL. This means that
Buildroot has no way to be able to cary hashes for such custom versions.

This means that there is no integrity check that what was downloaded is
what was expected. For a sha1 in a git tree, this is a minor issue,
because the sha1 by itself is already a hash of the expected content.
But for custom tarballs URLs, or for a tag in a VCS, there is indeed no
integrity check.

Buildroot can't provide such hashes, but interested users may want to
provide those, and currently there is no (easy) way to do so.

We leverage the existing global-patch-dir mechanism to look for extra
hash files. We use the same heuristic that is used for bundled hash
files, and for each global patch directory <dir>, we use the first file
to exist among:
 1. look into <dir>/<package>/<version>/<package>.hash
 2. look into <dir>/<package>/<package>.hash

Reported-by: "Martin Zeiser (mzeiser)" <mzeiser@cisco.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 5d36710e36)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 14:30:00 +01:00
Yann E. MORIN
b3fb71b1d7 support/download: teach dl-wrapper to handle more than one hash file
Currently, we expect and only use hash files that lie within the package
directory, alongside the .mk file. Those hash files are thus bundled
with Buildroot.

This implies that only what's known to Buildroot can ever get into those
hash files. For packages where the version is fixed (or a static
choice), then we can carry hashes for those known versions.

However, we do have a few packages for which the version is a free-form
entry, where the user can provide a custom location and/or version. like
a custom VCS tree and revision, or a custom tarball URL. This means that
Buildroot has no way to be able to cary hashes for such custom versions.

This means that there is no integrity check that what was downloaded is
what was expected. For a sha1 in a git tree, this is a minor issue,
because the sha1 by itself is already a hash of the expected content.
But for custom tarballs URLs, or for a tag in a VCS, there is indeed no
integrity check.

Buildroot can't provide such hashes, but interested users may want to
provide those, and currently there is no (easy) way to do so.

So, we need our download helpers to be able to accept more than one hash
file to lookup for hashes.

Extend the dl-wrapper and the check-hash helpers thusly, and update the
legal-info accordingly.

Note that, to be able to pass more than one hash file, we also need to
re-order the arguments passed to support/download/check-hash, which also
impies some shuffling in the three places it is called:
  - 2 in dl-wrapper
  - 1 in the legal-info infra

That in turn also requires that the legal-license-file macro args get
re-ordered to have the hash file last; we take the opportunity to also
move the HOST/TARGET arg to be first, like in the other legal-info
macros.

Reported-by: "Martin Zeiser (mzeiser)" <mzeiser@cisco.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit f91e89b6e6)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 14:29:55 +01:00
Peter Korsgaard
10a4451b26 configs/avenger96_defconfig: downgrade to TF-A v2.5
Commit 27bf08e4ad (configs/avenger96_defconfig: bump ATF version to 2.9
for binutils 2.39+ support) bumped TF-A, but it unfortunately does not boot
and instead dies with a panic:

NOTICE:  CPU: STM32MP157AAC Rev.B
NOTICE:  Model: Arrow Electronics STM32MP157A Avenger96 board
ERROR:   nvmem node board_id not found
INFO:    PMIC version = 0x10
ERROR:   Product_below_2v5=1:
ERROR:          HSLVEN update is destructive,
ERROR:          no update as VDD > 2.7V
PANIC at PC : 0x2fff086f

Exception mode=0x00000016 at: 0x2fff086f

Instead use v2.5 to match the other stm32mp1 boards and use the same E=0
-Werror workaround.  The avenger95 support is unfortunately broken since
v2.3 with the introduction of authentication support, so add a patch to the
DTS to fix that.

Notice that the authentication support was reworked in v2.7 so it is skipped
for the mp157a variant used on the avenger96, so the patch is not upstreamable.

While we're at it, also drop the debug option for consistency with the other
boards.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit deb8d71c92)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 13:25:41 +01:00
Peter Korsgaard
c1a26ae7a2 configs/stm32mp157c_odyssey_defconfig: use a fixed TF-A version
Commit f20589cbc7 (configs/stm32mp157c_odyssey: new defconfig) forgot to
specify a fixed TF-A version, so do that now.

When the defconfig was added, the default version was v2.5 - So use that.
Similarly to the other stm32mp1 defconfigs, this needs disabling -Werror
with E=0 to fix a build issue with GCC >= 12.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 69ac9fdbc4)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 13:23:57 +01:00
Peter Korsgaard
6e92dc4589 configs/stm32mp157c_dk2_defconfig: unbreak TF-A build with GCC >= 12
With the move to default to GCC 12 in commit e0091e42ee (package/gcc:
switch to gcc 12.x as the default), TF-A now fails to build as a warning is
generated and it builds with -Werror:

  CC      plat/st/stm32mp1/bl2_plat_setup.c
drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
  249 |         int result;
      |             ^~~~~~
cc1: all warnings being treated as errors

This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
uninitialized variable warning), but I do not have the board to verify if
v2.6 works, so instead disable -Werror by passsing E=0.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 1c0c67fc1a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 13:23:40 +01:00
Peter Korsgaard
a8a3a1a9d0 configs/stm32mp157a_dk1_defconfig: unbreak TF-A build with GCC >= 12
With the move to default to GCC 12 in commit e0091e42ee (package/gcc:
switch to gcc 12.x as the default), TF-A now fails to build as a warning is
generated and it builds with -Werror:

  CC      plat/st/stm32mp1/bl2_plat_setup.c
drivers/st/io/io_stm32image.c: In function ‘stm32image_partition_read’:
drivers/st/io/io_stm32image.c:249:13: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
  249 |         int result;
      |             ^~~~~~
cc1: all warnings being treated as errors

This is fixed in TF-A v2.6 with commit c1d732d0db24 (fix(io_stm32image):
uninitialized variable warning), but I do not have the board to verify if
v2.6 works, so instead disable -Werror by passsing E=0.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5c40f41b2e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 13:23:37 +01:00
Fabrice Fontaine
8a959f7a0d package/freeradius-server: fix python build
Fix the following build failure raised since bump to version 3.2.3 in
commit 4155139365:

In file included from /home/thomas/autobuild/instance-1/output-1/host/include/python3.11/Python.h:38,
                 from src/modules/rlm_python3/rlm_python3.c:37:
/home/thomas/autobuild/instance-1/output-1/host/include/python3.11/pyport.h:596:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  596 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
      |  ^~~~~

Fixes:
 - http://autobuild.buildroot.org/results/36143ab06b66a047aa2247ea66b1df0d6c1cbd66

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit fdae1d231c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 13:20:52 +01:00
Fabrice Fontaine
21b3741167 package/freeradius-server: fix python handling
python handling is wrong since the addition of the package in commit
736c4c1655 so disable python(2) and enable
python3 if needed

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 4513f5198a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 13:06:10 +01:00
Fabrice Fontaine
ad9fb6063d package/kvmtool: add KVMTOOL_CPE_ID_VENDOR
cpe:2.3🅰️kvmtool_project:kvmtool is a valid CPE identifier for this
package:

  https://nvd.nist.gov/products/cpe/detail/9B4C8068-B4EB-487F-958A-353BD3F494D1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 718a800828)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 13:00:17 +01:00
Adam Duskett
fc4bccfa25 support/testing/tests/package/test_python_django.py: fix timeout calculation.
timeout = 35 * self.emulator.timeout_multiplier
[...]
        self.assertRunOk(cmd, timeout=timeout)

Gets re-multiplied by self.emulator.timeout_multiplier in self.emulator.run().
Drop multiplying the timeout by self.emulator.timeout_multiplier to fix this
issue.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 9a81c7a7a4)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 12:49:57 +01:00
Adam Duskett
8208fbb393 support/testing/tests/package/test_lxc.py: use timeout argument for emulator.login
self.emulator.timeout_multiplier *= 10 is equivilent to 60 * 10 or 600.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 4889ac89b8)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 12:49:39 +01:00
Adam Duskett
f9b20cb21d support/testing/test/init/test_systemd_selinux.py: use timeout argument for emulator.login
self.emulator.timeout_multiplier *= 10 is equivilent to 60 * 10 or 600.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit c9316f21c7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 12:48:41 +01:00
Adam Duskett
682e55ce9a support/testing/infra/emulator.py: add a timeout argument for the login method
to override the current value of 60 seconds

As per a suggestion by Thomas, add a timeout argument to override the current
value of 60 seconds for the emulator.login method.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit b1d554b9a7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-10 12:48:32 +01:00
Yann E. MORIN
cf635737ed docs/manual: svn downloads can be hash-checked
Since commit 89f5e98932 (support/download/svn: generate reproducible
svn archives), we've been able to generate reproducible archives, and
thus we have been able to verify the hashes for those archives.

However, the manual was not changed, and still falsely hinted that this
was not the cae.

Fix that.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 6898781f03)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 18:22:10 +01:00
Fabrice Fontaine
65e19c6c8c package/traceroute: security bump to version 2.1.3
Fix CVE-2023-46316: In buc Traceroute 2.0.12 through 2.1.2 before 2.1.3,
the wrapper scripts do not properly parse command lines.

https://sourceforge.net/projects/traceroute/files/traceroute/traceroute-2.1.1
https://sourceforge.net/projects/traceroute/files/traceroute/traceroute-2.1.2
https://sourceforge.net/projects/traceroute/files/traceroute/traceroute-2.1.3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 604573a625)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 18:18:28 +01:00
Fabrice Fontaine
c6cd83c5fc package/traceroute: add TRACEROUTE_CPE_ID_VENDOR
cpe:2.3🅰️buc:traceroute is a valid CPE identifier for this package:

  https://nvd.nist.gov/products/cpe/detail/399C82DE-9AC7-4C48-8E9B-57C480E95FF5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 707c2c70bc)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 18:18:23 +01:00
Reza Arbab
3434b72fab package/petitboot: use default logfile dir
All the petitboot components assume /var/log/petitboot by default;
pb-console can also put multiple logs there and pb-sos collects that
directory when creating a diagnostic tarball.

Defer to this default when launching pb-discover. If someone wants to
override, let's call the file /etc/default/petitboot which makes more
sense to be shared by all the components.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 12e9643021)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 17:56:40 +01:00
Reza Arbab
3b977a0f4d package/petitboot: fix menu comment
The comment should appear if threads aren't enabled, not when they are.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 4954b5140e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 17:56:24 +01:00
Fabrice Fontaine
3a00793d8f package/linux-pam: link with -latomic when needed
Fix the following build failure raised since bump to version 1.5.3 in
commit f8147e27cd and
a35e092e24:

/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/11.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: .libs/pam_keyinit.o: in function `pam_sm_open_session':
pam_keyinit.c:(.text+0x824): undefined reference to `__atomic_fetch_add_4'

Fixes:
 - http://autobuild.buildroot.org/results/52c51b5ad5930ed783b88fb33932297379fd4429

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit f1a47904b6)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 16:07:20 +01:00
Andrew Donnellan
d8191f1546 package/libzlib: Switch to using HTTPS
Switch to using HTTPS for downloading libzlib from zlib.net.

(zlib.net doesn't default to HTTPS but does suggest HTTPS in the permalink
for the latest zlib release. Also works better with some corporate firewalls
that get suspicious about zlib for some reason.)

Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5b139e2a8d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 13:48:02 +01:00
Peter Korsgaard
c284d6bba0 package/nano: really disable nanorc for !BR2_PACKAGE_FILE
Commit 3c4fa30f7a (package/nano: fix tiny build) tried to explicitly
disable libmagic/coloring/nanorc, but accidently passed 2x
--disable-libmagic instead of --disable-nanorc.  Fix that.

Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 3c71477f66)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 13:47:25 +01:00
Paul Cercueil
c286101af8 package/lightning: fix build on mips64
Grab commit 90f5c78f47dfb1ae4b953b0e30c7ef72a6438396 from upstream to
fix the build on mips64 and mips64el.

Fixes:

  http://autobuild.buildroot.net/results/f951d91d2ca4647170a52499a243d45d13d3bced/

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 604eecf011)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 12:38:22 +01:00
Fabrice Fontaine
285be8f4a5 package/cups-filters: fix CVE-2023-24805
Fix CVE-2023-24805: cups-filters contains backends, filters, and other
software required to get the cups printing service working on operating
systems other than macos. If you use the Backend Error Handler (beh) to
create an accessible network printer, this security vulnerability can
cause remote code execution. `beh.c` contains the line `retval =
system(cmdline) >> 8;` which calls the `system` command with the operand
`cmdline`. `cmdline` contains multiple user controlled, unsanitized
values. As a result an attacker with network access to the hosted print
server can exploit this vulnerability to inject system commands which
are executed in the context of the running server. This issue has been
addressed in commit `8f2740357` and is expected to be bundled in the
next release. Users are advised to upgrade when possible and to restrict
access to network printers in the meantime.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 738029bc12)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 12:16:30 +01:00
Daniel Lang
4f7bf0937b Makefile: drop gen-missing-cpe leftovers
In 6fa3a239 the gen-missing-cpe support script was removed together with
"make missing-cpe".
Remove the leftover path variable and drop it from "make clean".

Signed-off-by: Daniel Lang <dalang@gmx.at>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 8a307fbac9)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 12:15:19 +01:00
Kalpesh Panchal
ea2695a1b0 package/freeradius-server: enable default modules mschap and realm
"mschap" and "realm" are already part of default required
raddb modules(DEFAULT_MODULES in raddb/all.mk).

so removed them from disabled module list so that
radiusd.service can start without following errors:

- /etc/raddb/mods-enabled/mschap[11]: Failed to link to module 'rlm_mschap': /usr/lib/rlm_mschap.so
- /etc/raddb/mods-enabled/realm[21]: Failed to link to module 'rlm_realm': /usr/lib/rlm_realm.so

Signed-off-by: Kalpesh Panchal <kalpesh.panchal2@collins.com>
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit ce918125e1)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 12:12:25 +01:00
Adam Duskett
470087031c package/pkg-generic: auto-install selinux modules only for upstream refpolicy
The description of REFPOLICY_CUSTOM_GIT states:

The custom refpolicy must define the full policy explicitly,
and must be a fork of the original refpolicy, to have the
same build system.  When this is selected, only the custom
policy definition are taken into account and all the modules
of the policy are built into the binary policy.

Currently, if a user definess their own policy, a package containing a selinux
directory would add to their custom policy, which is not what they would want.
Disable applying selinux policies in selinux/ directories for custom git
refpolicies.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5f6e608057)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 10:47:16 +01:00
Yann E. MORIN
5785da3fdf package/pkg-golang: handle licensing terms for host-only packages
The licensing terms are inherited from the target variant to the host
variant: when the host _LICENSE is empty, then the value of the target
_LICENSE is used.

However, for the golang infra, we want to append a little blurb about
vendored depndencies. If the package is a host-only, then it would
inherit the target _LICENSE, i.e. the variable without the leading
HOST_. If that is defined, this is inherited in the generic-package part
of the infra, but in the golang infra, we saw an empty variable, and so
we would not add the vendoring blurb.

We can't move the condition appending that blurb, after we called into
the generic-package infra, otherwise in that case, we'd have the
opposite issue for packages that are both target and host packages,
where the blurb would be duplicated for host packages...

Instead, we workaround the issue by duplicating the heuristic to inherit
the target value, from the generic- into the golang-package infra.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit aa87875b9f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 10:44:08 +01:00
Yann E. MORIN
fbadaaf709 package/pkg-golang: don't expand license info when empty
The golang infrastructure automatically expands the list of licenses
with a little blurb that the licenses for vendored dependencies might be
missing in the list.

However, when a package does not define a license, the resulting text is
sub-optimal, resulting in a manifest that contains (with a leading
comma, yes):

    , vendored dependencies licenses probably not listed

In that case, pointing out some unkown licensing terms may be part of
unkonwn licensing terms is superfluous.

Instead, just let the legal infra do its job, and report an "unkown"
license altogether.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 01a4614d10)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 10:43:51 +01:00
Yann E. MORIN
f03b295d71 package/pkg-cargo: handle licensing terms for host-only packages
The licensing terms are inherited from the target variant to the host
variant: when the host _LICENSE is empty, then the value of the target
_LICENSE is used.

However, for the cargo infra, we want to append a little blurb about
vendored depndencies. If the package is a host-only, then it would
inherit the target _LICENSE, i.e. the variable without the leading
HOST_. If that is defined, this is inherited in the generic-package part
of the infra, but in the cargo infra, we saw an empty variable, and so
we would not add the vendoring blurb.

We can't move the condition appending that blurb, after we called into
the generic-package infra, otherwise in that case, we'd have the
opposite issue for packages that are both target and host packages,
where the blurb would be duplicated for host packages...

Instead, we workaround the issue by duplicating the heuristic to inherit
the target value, from the generic- into the cargo-package infra.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 049ea7b389)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-09 10:43:20 +01:00
Yann E. MORIN
e543b3f34d package/pkg-cargo: don't expand license info when empty
The cargo infrastructure automatically expands the list of licenses with
a little blurb that the licenses for vendored dependencies might be
missing in the list.

However, when a package does not define a license, the resulting text is
sub-optimal, resulting in a manifest that contains (with a leading
comma, yes):

    , vendored dependencies licenses probably not listed

In that case, pointing out some unkown licensing terms may be part of
unkonwn licensing terms is superfluous.

Instead, just let the legal infra do its job, and report an "unkown"
license altogether.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 0a8bc54e09)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-08 22:12:52 +01:00
Fabrice Fontaine
311ef9526f package/libgdiplus: add upstream link to patch
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit 200b264b7a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-08 21:57:35 +01:00
Fabrice Fontaine
74ce715829 package/freeradius-server: bump to version 3.2.3
- Refresh patches
- autoconf must be switched to autoreconf because of
  7cd23f2de6
- redis cache module is available since
  575bff4810

https://github.com/FreeRADIUS/freeradius-server/blob/release_3_2_3/doc/ChangeLog

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 4155139365)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-08 21:51:39 +01:00
Fabrice Fontaine
73a2491b78 package/freeradius-server: fix redis handling
redis handling is wrong since the addition of the package in commit
736c4c1655. Indeed, freeradius-server
needs hiredis, not redis

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5a8d6014c7)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-08 21:51:29 +01:00
Michael Nosthoff
ed0ba74817 package/websocketpp: fix build with C++20
websocketpp had some ill-formed usage of template parameters which was
finally removed in C++20. Hence build fails when building with C++20
support enabled.

The patch is already in the develop branch but no new release was
done.

There are no autobuilder failures because websocketpp is a header-only
library, and there are no packages in Buildroot that depned on
websocketpp.

A build issue was encountered when bumping an internal project to
C++20. This issue triggered quite some bug reports in the project [0]
and there are backports to other package managers like vcpkg [1] and
conan [2].

[0] https://github.com/zaphoyd/websocketpp/pull/1060
[1] https://github.com/microsoft/vcpkg/pull/23669
[2] https://github.com/conan-io/conan-center-index/pull/15295

Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
[Thomas: extend commit log with details provided by Michael.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 9ac1a76fcf)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-08 21:33:43 +01:00