Commit Graph

69032 Commits

Author SHA1 Message Date
Fabrice Fontaine
97128028df package/tar: security bump to version 1.35
- Fix 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.
- Update hash of COPYING (http replaced by https)

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit d4d483451f0a305781b94b96c15a6cf4b489cd84)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 16:38:41 +02:00
Fabrice Fontaine
29e7a27801 package/syslog-ng: fix libressl build
Fox the following build failure with libressl raised since bump to
version 4.1.1 in commit 683563da80 and
bc05f28a4b:

lib/transport/tls-context.c: In function 'tls_context_setup_cmd_context':
lib/transport/tls-context.c:320:3: error: unknown type name 'SSL_CONF_CTX'; did you mean 'SSL_AEAD_CTX'?
  320 |   SSL_CONF_CTX *ssl_conf_ctx = SSL_CONF_CTX_new();
      |   ^~~~~~~~~~~~
      |   SSL_AEAD_CTX

Fixes:
 - http://autobuild.buildroot.org/results/dc4d60d752e579ef054915eee3d7e3e73c25929b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit b38aed4eb4246dff4815d85ae1603db2899fa98f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 16:37:51 +02:00
Yann E. MORIN
cbe2f10910 package/go: fix installation
When building for a target architecture that go does not support, the
installation fails with:

    $ make host-go
    [...]
    ln -sf ../lib/go/bin/go /home/nyma7486/dev/work/5GCroCo/O/pouet/per-package/host-go/host/bin/
    ln: failed to create symbolic link '/home/nyma7486/dev/work/5GCroCo/O/pouet/per-package/host-go/host/bin/': No such file or directory

Indeed, the HOST_DIR/bin is not guaranteed to exist when we install a
host package, so it needs to be explicitly created before we can create
entries in there.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Christian Stewart <christian@aperture.us>
Cc: Anisse Astier <anisse@astier.eu>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 1db38d928292aaca493c80527008b9bd7e6db602)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 16:36:58 +02:00
Herve Codina
15a57fab29 package/pkg-utils.mk: break hardlinks in global {TARGET, HOST}_DIR on per-package build
Without this patch, a make <pkg>_rebuild detects overwrites. Indeed, in
target_finalize steps some modifications are done on installed files (ie
strip or TARGET_FINALIZE_HOOKS for instance).

In order to avoid these modifications seen from per-package {TARGET,HOST}_DIR
and so been analyzed as some overwrites, global {TARGET,HOST}_DIR is built
using a full copy of the involved per-package files instead of hardlinks.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 21d52e52d8dee0940d28b3a38551eb183be37813)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 16:36:05 +02:00
Thomas Devoogdt
6c57e26517 package/webkitgtk: require GCC 9 for the 2.40.x series
Raise the minimal GCC version to 9.3, which is required since webkitgtk-2.40.0 [1].
Similar to commit ec1ff802df,
we do check on >= GCC 9, because we can't check on >= GCC 9.3.

[1] f9c142d9b5

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit de38484ec31437e3f2f0d7c0fa46f2f30d0a8fbb)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 16:35:10 +02:00
Jens Maus
4ede63c069 package/linux-tools: fix SysV init script
This commit fixes the S10hyperv SysV init script which expects binaries
to be locate in /sbin while they are installed in /usr/sbin. Please
note, that the systemd init scripts correctly reference them.
Furthermore, the SysV init script did not check for an actual HyperV
environment to be present, which is also corrected. In addition, this
commit also fixes check-package warnings regarding a missing DAEMON
definition.

Signed-off-by: Jens Maus <mail@jens-maus.de>
[Peter: drop from .checkpackageignore]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 14c4bd7bf8150283e158c50df87c77d63bb1b73c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 16:33:11 +02:00
Kory Maincent
67c5936f42 boot/at91bootstrap: disable PIE and stack-protector build flags
The toolchain wrapper automatically adds Position Independent
Execution and stack protector flags in the build process when selected
in the configuration. at91bootstrap being freestanding code, it
doesn't support these, so we have to disable them.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 1351222486b93b72c00057fb3401d40967025164)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 12:23:59 +02:00
Yann E. MORIN
e785e38dcc package/rockchip-mali: fix hash of generated archive
The "official" repository we used to reference disapeared quite some
time ago, so in commit 8c25838b53 (package/rockchip-mali: fix build
failure due to missing URL) we switched to using a mirror.

The tarballs generated on the Github side have a top-level directory
that is named "repo-name-HASH", so when we switched to a repository
named "libmali" to one named "mirrors", the content of the generated
tarball changed, even though the content of the files did not.

We can't just change the hash to the new value, or that would conflict
with the copy on s.b.o and older versions of Buildroot.

So, we drop one char from the commit hash, which eans the tarball name
changes, and thus we can calculate a new hash for that tarball, and
there will be no conflict with any existing tarball on s.b.o.

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit f7f2de3da7e1a5af4e2773ff6bb9e528159be7d3)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 12:21:51 +02:00
Peter Korsgaard
bd682063d0 package/urandom-scripts: move seedrng init script to S01
We want to initialize the kernel random number generator as soon as
possible, as early init scripts may also need random numbers (E.G.
syslog-ng in S01syslog-ng does).

Seedrng was presumably only using S20 because the previos urandom script
used S20, which (after som moves) dates all the way back to:

commit 8262508fc4
Author: Eric Andersen <andersen@codepoet.org>
Date:   Fri Apr 26 22:01:43 2002 +0000

    With this update, everything now works as expected.
     -Erik

Seedrng needs persistent storage, but mount -a is run before executing the
init scripts, so S01 should be as good as S20 - Atleast with the scripts in
upstream Buildroot.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 11a46002ae11a0766a4ec9d3d8ccafe7be42c2fc)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 12:13:37 +02:00
Peter Korsgaard
814281c439 package/opkg-utils: actually install to target
Commit b9bf1c6535 (package/opkg-utils: add opkg-utils as target pkg)
misspelled the macro to install to target, most probably as a bad
copy-paste from the host macro.

Fix that.

Reported-by: Michael Hacker <mh@superbox.one>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 8c3c741439acb817e156fe28083ba0c6a0c4c720)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 12:13:25 +02:00
Fabrice Fontaine
f8483dbae4 package/powertop: picutils is optional, not mandatory
pciutils is optional, not mandatory since version 2.1 and the addition
of the package in commit 0adc0e24ee and
98ca605e7c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr:
  - one item per multi-line in _DEPENDENCIES
  - reorder _DEPENDENCIES
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit bcfcc07413c9e5222ad82552208c7b17ffb17105)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:21:42 +02:00
Thomas Petazzoni
fb3aef53d2 package/gnu-efi: disable on mips64el
The gnu-efi package was enabled on mips64el by commit
11b347c03a ("package/gnu-efi: add
mips64el support"). However, it has been failing to build for a long
time, and nobody bothered fixing it:

gnu-efi-3.0.15//gnuefi/crt0-efi-mips64el.S:71: Error: cannot represent BFD_RELOC_16 relocation in this object file format

Even reverting back to gnu-efi 3.0.10, which was the version used at
the time of 11b347c03a, does not fix the
issue. We tested updating to the latest gnu-efi version, 3.0.17, and
the problem still exists.

Since EFI on MIPS is extremely niche, we don't really want to invest
the time to fix this issue, so let's disable it again. If someone
cares enough, it can be fixed and re-enabled.

Fixes:

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 13b0e6bbf3b1473993972fff8e4590a28749d823)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:20:31 +02:00
Fabrice Fontaine
7f420077e0 package/olsr: fix build with gpsd >= 3.25
Fix the following build failure with gpsd >= 3.25 raised since commit
3c7fece853:

In file included from src/configuration.h:50,
                 from src/configuration.c:46:
src/gpsdclient.h:64:8: error: redefinition of 'struct fixsource_t'
   64 | struct fixsource_t {
      |        ^~~~~~~~~~~
In file included from src/gpsdclient.h:49,
                 from src/configuration.h:50,
                 from src/configuration.c:46:
/tmp/instance-17/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/gps.h:2714:8: note: originally defined here
 2714 | struct fixsource_t
      |        ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/47a619686bb47debd525c92aa7e14bee5c40ca9e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 4c32b3d9ff8727fd61dbf2d55105c2900f0d2dec)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:14:02 +02:00
Romain Naour
3ff6c0ba88 package/python-mako: add optional runtime dependency on python-babel
Some extensions of python-mako use python-babel, if they are used,
python-babel must be added as a runtime dependency.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 411a3deb1a4850f4eeff3faebdb87b8ef544d650)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:11:59 +02:00
Romain Naour
889446cf96 package/python-mako: add optional runtime dependency on python-pygments
Some extensions of python-mako use python-pygments, if they are used,
python-pygments must be added as a runtime dependency.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit adb3f5a3e0d5bd6df60c91c46a03a2ff9c867dbb)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:11:53 +02:00
Sebastian Weyer
b370a3bfab package/python-mako: add missing dependency on python-markupsafe
Mako imports markupsafe so it needs to be selected when selecting
BR2_PACKAGE_PYTHON_MAKO.

Fixes:

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

Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 2b506cb2dd031f2bdecc3c90111e31e145211d75)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:09:20 +02:00
Yu Chien Peter Lin
252b6ade2c package/openblas: Add support for RISC-V architecture
OpenBLAS RISC-V 64bit support was added in [1] and was renamed to
"RISCV64_GENERIC" in [2]. Those commits were first included in
OpenBLAS release v0.3.13. This support can now be enabled. With this
commit, we can install the library and packages such as GNU Octave on
RISC-V platforms.

This patch also adjusts the alignment for adding "RISCV64_GENERIC"
in Config.in.

[1] c167a3d6f4
[2] 265ab484c8

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Julien Olivain <ju.o@free.fr>
Tested-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit c789bcddf0fb17580bef0cdc45b5334a90ecdf13)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:07:01 +02:00
Julien Olivain
5a594e2cf8 package/pipewire: fix typo in Kconfig comment
"NTPL" should read "NPTL" (Native POSIX Threads Library).

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit b9300f70b26f15d4cc58c0d5cff17f86b6e43bf6)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:05:09 +02:00
Brandon Maier
5b1a3bd2c3 board/freescale: fix i.MX arm-trusted-firmware for GCC12
The arm-trusted-firmware package for IMX boards fails due to a GCC bug.
See the attached patch description for detail.

Fixes:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/5134910620
  https://gitlab.com/buildroot.org/buildroot/-/jobs/5134910622
  https://gitlab.com/buildroot.org/buildroot/-/jobs/5134910624
  https://gitlab.com/buildroot.org/buildroot/-/jobs/5134910627

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 977965a83a2bc8da163ce45739c55bb775db55ce)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-13 08:00:11 +02:00
Brandon Maier
0c6524edfd board/freescale: fix arm-trusted-firmware for binutils 2.39+
The NXP arm-trusted-firmware forks use an older version of ATF that will
error with "LOAD segment with RWX permissions". Similar patches are
present in boot/arm-trusted-firmware/ for older ATF versions.

Fixes:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/5134910852
  https://gitlab.com/buildroot.org/buildroot/-/jobs/5134910630
  https://gitlab.com/buildroot.org/buildroot/-/jobs/5134910631
  (and a bunch of others which are not yet visible as they are hidden
  by other build issues)

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 8f3c940cbebbbdb5c94c41e60066d2f87ef13045)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-12 23:07:59 +02:00
Daniel Lang
789b30afd0 package/gtkmm3: bump to version 3.24.8
https://gitlab.gnome.org/GNOME/gtkmm/-/blob/3.24.8/NEWS

Signed-off-by: Daniel Lang <dalang@gmx.at>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 7a14ef1d24a43bf14b760b76870b30927e1bbb84)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-12 21:44:43 +02:00
Fabrice Fontaine
339c49c241 package/linux-pam: needs gcc >= 4.9
linux-pam raises the following build failure with gcc 4.8 since bump to
version 1.5.3 in commit f8147e27cd and
8f9816b57e:

pam_access.c: In function 'pam_sm_authenticate':
pam_access.c:1084:13: error: 'for' loop initial declarations are only allowed in C99 mode
             for (int i = 0; filename_list[i] != NULL; i++) {
             ^

Those build failures could be fixed by adding -std=c99 but then the
build will fails because stdadtomic.h is mandatory since
a35e092e24

Fixes:
 - http://autobuild.buildroot.org/results/9b2ba987d2c873f4a7caea72707acb655279d16b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit c77e25c3f113c44d753dec308334e52e4c0bec6c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-12 18:41:08 +02:00
Jens Maus
52369b5b7a boot/grub2: fix incompat e2fsprogs feature use
With bump of package/e2fsprogs to 1.47.0 [1] a freshly generated
ext4 fs has unfortunately different default features enabled
(e.g. metadata_csum_seed). This and some other newer fs features
(e.g. large_dir) are however not supported by our grub2.
Thus, newly generated ext-based rootfs won't be recognized by grub2
and are therefore not bootable/usable from grub2 anymore. This is
an issue already known to other Linux derivates [2],[3],[4].

This commit introduces two additional upstream patches to
package/grub2 which adds EXT4_FEATURE_INCOMPAT_CSUM_SEED and
EXT4_FEATURE_INCOMPAT_LARGEDIR to the EXT2_DRIVER_IGNORED_INCOMPAT
list of ignored incompatible ext features, allowing grub2 to
use ext filesystems with these newer default feature sets.

[1] https://git.buildroot.net/buildroot/commit/?id=6a21733f839478d902f3eab287a82b456e55f708
[2] https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1844012
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031325
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030939

Signed-off-by: Jens Maus <mail@jens-maus.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 9c25f1b51eeb988449ad0f1f524283ef5361ee4d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-12 18:39:42 +02:00
Waldemar Brodkorb
7704baa480 package/batman-adv: update to 2023.1
Older Batman-adv versions fail to build with kernel 6.4.x
with following error message:
bat_iv_ogm.c:283:18: error: implicit declaration of function 'prandom_u32_max'; did you mean 'prandom_u32_state'? [-Werror=implicit-function-declaration]

prandom_u32_max got removed in commit 3c202d14a9d73fb63c3dccb18feac5618c21e1c4
from the Linux kernel.

Fixes:
 - http://autobuild.buildroot.net/results/205/2055ac3805d1941c148f1681a224570055dd83cd

For other changes in this release, see:
https://www.open-mesh.org/news/112

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 01ec4a39f5ceb83c62b0040067ba53197a0a6843)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-12 18:33:11 +02:00
Ben Dooks
5567239034 board/qemu/aarch64-virt/linux.config: enable base ACPI support
When testing the virt machine with EDK2, the buildroot 6.1 kernel
will not boot as it has no base ACPI support. Whilst you can run
qemu with the -no-acpi option, it would help if basic ACPI support
was there as otherwise there is no output from the kernel post the
ACPI BIOS initialisation.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit b1f9c511626e2a91f99ed6113ff29a504a717711)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-12 18:31:39 +02:00
Christian Stewart
ede5bd5859 package/go: cgo for the target needs the toolchain
Building go with cgo support needs to build some .c files to generate target
support code, and thus calls the cross C compiler, which is failing when the
toolchain is not built before host-go:

    >>> host-go 1.21.1 Building
    cd .../build/host-go-1.21.1/src && GO111MODULE=off GOCACHE=.../per-package/host-go/host/share/host-go-cache GOROOT_BOOTSTRAP=.../per-package/host-go/host/lib/go-1.19.11 GOROOT_FINAL=.../per-package/host-go/host/lib/go GOROOT=".../build/host-go-1.21.1" GOBIN=".../build/host-go-1.21.1/bin" GOOS=linux CC=/usr/bin/gcc CXX=/usr/bin/g++ CGO_ENABLED=1 CC_FOR_TARGET=".../per-package/host-go/host/bin/arm-linux-gcc" CXX_FOR_TARGET=".../per-package/host-go/host/bin/arm-linux-g++" GOOS="linux" GOARCH=arm  GOARM=6 GO_ASSUME_CROSSCOMPILING=1 ./make.bash
    Building Go cmd/dist using .../per-package/host-go/host/lib/go-1.19.11.  (go1.19.11 linux/amd64)
    go tool dist: cannot invoke C compiler [".../per-package/host-go/host/bin/arm-linux-gcc"]: fork/exec .../per-package/host-go/host/bin/arm-linux-gcc: no such file or directory

    Go needs a system C compiler for use with cgo.
    To set a C compiler, set CC=the-compiler.
    To disable cgo, set CGO_ENABLED=0.

This happens systematically with PPD, and happens without PPD when
host-go is explicitly built (by running: "make host-go").

Since only CGO support needs to compile C files, only add the toolchain
dependency in that case.

When the target is not supported by go, then there is obviously no need
to depend on the toolchain (even if we unconditionally enable cgo
support in only-for-the-host host-go).

Signed-off-by: Christian Stewart <christian@aperture.us>
[yann.morin@orange.com:
  - only add the toolchain dependency for target cgo
  - reword commit log
]
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Anisse Astier <anisse@astier.eu>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 1a44f9242c960dcb114f60674043c8044c71c2c0)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-12 17:26:24 +02:00
Peter Korsgaard
1da113559f package/go: security bump to version 1.20.9
Fixes CVE-2023-39323: Line directives ("//line") can be used to bypass the
restrictions on "//go:cgo_" directives, allowing blocked linker and compiler
flags to be passed during compilation.  This can result in unexpected
execution of arbitrary code when running "go build".

go1.20.9 (released 2023-10-05) includes one security fixes to the cmd/go
package, as well as bug fixes to the go command and the linker.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-08 18:00:35 +02:00
Peter Korsgaard
03b44ac6d6 package/{glibc, localedef}: security bump to version glibc-2.37-45-gb4e23c75aea756b4bddc4abcf27a1c6dca8b6bd3
Fixes the following security issues:

  CVE-2023-4911: If a tunable of the form NAME=NAME=VAL is passed in the
  environment of a setuid program and NAME is valid, it may result in a
  buffer overflow, which could be exploited to achieve escalated
  privileges.  This flaw was introduced in glibc 2.34.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-08 17:59:22 +02:00
Fabrice Fontaine
6374f0c527 package/neon: drop patches
Patches (and so autoreconf) are not needed since bump to version 0.32.4
in commit f39ac8336e and
9924d4d315

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit e1b2cd5835d0a13bff763cfcf289919519c202ff)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:41:04 +02:00
Peter Korsgaard
6d6fcd1d74 package/libfastjson: security bump to version 0.99.9.1
Fixes the equivalent of CVE-2020-12762, which was a json-c vulnerability:

https://github.com/advisories/GHSA-3797-gmjf-45gm

https://github.com/rsyslog/libfastjson/pull/166

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit cfe830c9ee5d66d3bdca15933ed8b59e3ec16e88)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:39:41 +02:00
Bernd Kuhls
8b9251b8cc package/libvpx: Add upstream security patch to fix CVE-2023-5217
Fixes CVE_2023-5217: Heap buffer overflow in vp8 encoding in libvpx in
Google Chrome prior to 117.0.5938.132 and libvpx 1.13.1 allowed a remote
attacker to potentially exploit heap corruption via a crafted HTML page.

https://www.openwall.com/lists/oss-security/2023/09/28/5

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Peter: extend commit message, add _IGNORE_CVES]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit e99999d7cb1dca94d1073fc1b2db672152cd728b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:37:45 +02:00
Francois Perrad
cdb4d67b5b package/mosquitto: bump to version 2.0.18
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 236dc1015cbda9b0c3479e2f37cb09c507da04dc)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:36:22 +02:00
Bernd Kuhls
7bd3366516 package/samba4: bump version to 4.18.7
Release notes: https://www.samba.org/samba/history/samba-4.18.7.html

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 94b2dc586fc96be90cfc02f279f5b14bbabe0c5a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:32:12 +02:00
Bernd Kuhls
72af9a1dc4 package/php: bump version to 8.2.11
Changelog: https://www.php.net/ChangeLog-8.php#8.2.11
Release notes: https://www.php.net/releases/8_2_11.php

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 3686d9fc17aa1ad200d03d6dc1004c71026dbde0)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:31:14 +02:00
Fabrice Fontaine
e6bdfad8d3 package/stress-ng: drop LDFLAGS_EXTRA
Drop LDFLAGS_EXTRA to fix the following build failure raised since
commit 42f25180233df459cd2bfbc5b9ebf8b95c6b60cb:

/home/buildroot/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-gnu/12.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: stress-crypt.o: in function `$L17':
stress-crypt.c:(.text+0x2dc): undefined reference to `crypt_r'

Fixes:
 - http://autobuild.buildroot.org/results/0c1d2ef59b88ebb3ae10bf8cb986280b4c1283eb

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 5e97bc1f05d6925b71e7871c74f1ccf9b5a2d58b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:30:25 +02:00
Fabrice Fontaine
38e3f0213f package/suricata: security bump to version 6.0.14
- Fix CVE-2023-35852: In Suricata before 6.0.13 (when there is an
  adversary who controls an external source of rules), a dataset
  filename, that comes from a rule, may trigger absolute or relative
  directory traversal, and lead to write access to a local filesystem.
  This is addressed in 6.0.13 by requiring allow-absolute-filenames and
  allow-write (in the datasets rules configuration section) if an
  installation requires traversal/writing in this situation.
- Fix CVE-2023-35853: In Suricata before 6.0.13, an adversary who
  controls an external source of Lua rules may be able to execute Lua
  code. This is addressed in 6.0.13 by disabling Lua unless allow-rules
  is true in the security lua configuration section.
- Drop first patch (not needed since
  c8a3aa608e)

https://github.com/OISF/suricata/blob/suricata-6.0.14/ChangeLog

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit ce17f93e828a07292e03653be04a49480250f23f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:26:19 +02:00
Fabrice Fontaine
962ec546d0 package/librsvg: security bump to version 2.50.9
Fix CVE-2023-38633: A directory traversal problem in the URL decoder of
librsvg before 2.56.3 could be used by local or remote attackers to
disclose files (on the local filesystem outside of the expected area),
as demonstrated by href=".?../../../../../../../../../../etc/passwd" in
an xi:include element.

https://gitlab.gnome.org/GNOME/librsvg/-/blob/2.50.9/NEWS

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit e7988c7060d7d8b137d18721ef773ef266114690)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:25:28 +02:00
Brandon Maier
df2180cd89 unifdef: add missing license
The COPYING also contains a BSD-3-Clause license. The BSD-3-Clause
applies to "manual page unifdef.1 and the portability support code in
the FreeBSD subdirectory". The BSD-2-Clause applies to everything else.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Reviewed-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit d8cea23ce4c2462000a3dd01304ba613a39253d5)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-10-01 20:24:25 +02:00
Peter Korsgaard
c35b052d97 package/{glibc, localedef}: security bump to 2.37-43
Fixes the following security issues:

CVE-2023-25139: When the printf family of functions is called with a
format specifier that uses an <apostrophe> (enable grouping) and a
minimum width specifier, the resulting output could be larger than
reasonably expected by a caller that computed a tight bound on the
buffer size.  The resulting larger than expected output could result
in a buffer overflow in the printf family of functions.

CVE-2023-4527: If the system is configured in no-aaaa mode via
/etc/resolv.conf, getaddrinfo is called for the AF_UNSPEC address
family, and a DNS response is received over TCP that is larger than
2048 bytes, getaddrinfo may potentially disclose stack contents via
the returned address data, or crash.

CVE-2023-4806: When an NSS plugin only implements the
_gethostbyname2_r and _getcanonname_r callbacks, getaddrinfo could use
memory that was freed during buffer resizing, potentially causing a
crash or read or write to arbitrary memory.

CVE-2023-5156: The fix for CVE-2023-4806 introduced a memory leak when
an application calls getaddrinfo for AF_INET6 with AI_CANONNAME,
AI_ALL and AI_V4MAPPED flags set.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-30 16:15:19 +02:00
Yann E. MORIN
3095614111 package/nodejs: fix parallel build further
Commit 84c24ab1b5a7 (package/nodejs: fix parallel build) made use of
BR2_JLEVEL to set the number of jobs nodejs should use instead of using
the number of CPUs (+2).

However, BR2_JLEVEL can be set to 0 by the user, to let Buildroot detect
the number of CPUs (+1), and stores it in PARALLEL_JOBS, and leaves
BR2_JLEVEL untouched, so 0.

Thus, we can end up spawning a build by passing -j0 to ninja, which it
interprets as "no -limit yolo" and does not limit the number oj jobs it
spawns, which usually ends up in an OOM somewhere...

Fix this by using PARALLEL_JOBS.

Reported-by: Cédric & Co
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit d574e2a4f440903a0e32de6deb8275b1f385da2e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-30 12:34:32 +02:00
Maxim Kochetkov
789502a583 configs/visionfive2_defconfig: bump custom kernel version to 05533e9c31
Current kernel fails to build with GCC>=12:
  AS      arch/riscv/kernel/vdso/note.o
./arch/riscv/include/asm/vdso/gettimeofday.h: Assembler messages:
./arch/riscv/include/asm/vdso/gettimeofday.h:71: Error: unrecognized opcode `csrr a5,0xc01', extension `zicsr' required
./arch/riscv/include/asm/vdso/gettimeofday.h:71: Error: unrecognized opcode `csrr a5,0xc01', extension `zicsr' required

So use latest kernel from starfive repo.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit d15bc66b9a809427b6bc1c7f5d6d3e661acb4b3f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-30 12:31:39 +02:00
Fabrice Fontaine
c1dd0e4dad package/libyang: security bump to version 2.1.111
- Fix CVE-2023-26916: libyang from v2.0.164 to v2.1.30 was discovered to
  contain a NULL pointer dereference via the function lys_parse_mem at
  lys_parse_mem.c.
- Fix CVE-2023-26917: libyang from v2.0.164 to v2.1.30 was discovered to
  contain a NULL pointer dereference via the function
  lysp_stmt_validate_value at lys_parse_mem.c.

https://github.com/CESNET/libyang/releases/tag/v2.1.55
https://github.com/CESNET/libyang/releases/tag/v2.1.80
https://github.com/CESNET/libyang/releases/tag/v2.1.111

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 799512e14935af57c6e685c45fa5e99b04274b4f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-30 12:29:30 +02:00
Fabrice Fontaine
6a939e5ee6 package/bind: security bump to version 9.16.44
Fix CVE-2023-3341: The code that processes control channel messages sent
to `named` calls certain functions recursively during packet parsing.
Recursion depth is only limited by the maximum accepted packet size;
depending on the environment, this may cause the packet-parsing code to
run out of available stack memory, causing `named` to terminate
unexpectedly. Since each incoming control channel message is fully
parsed before its contents are authenticated, exploiting this flaw does
not require the attacker to hold a valid RNDC key; only network access
to the control channel's configured TCP port is necessary. This issue
affects BIND 9 versions 9.2.0 through 9.16.43, 9.18.0 through 9.18.18,
9.19.0 through 9.19.16, 9.9.3-S1 through 9.16.43-S1, and 9.18.0-S1
through 9.18.18-S1.

https://ftp.isc.org/isc/bind9/9.16.44/CHANGES

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 54f6e1f81fd7c96d2ce68d48c10407e50778fc0c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-30 12:25:21 +02:00
Bernd Kuhls
73528b3ff3 {linux, linux-headers}: bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 4}.x series
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 181cf756ca42422569ed4fa8ac00ea844722208d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-30 12:21:50 +02:00
Peter Korsgaard
9266ab06e0 Update for 2023.08.1
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-28 00:08:42 +02:00
Fabrice Fontaine
4e7856226c package/pppd: drop PPPD_DROP_INTERNAL_IF_PPOL2TP_H
PPPD_DROP_INTERNAL_IF_PPOL2TP_H is not needed since bump to version
2.4.6 in commit 49b239ab20 and
c41092dd4c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 0a0dd63c824c1c8a104e09b4f773764daf5b3e3f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-27 13:45:01 +02:00
Jens Maus
ef266a16b9 package/nodejs: fix cross-compile builds
When nodejs is build, a qemu wrapper script is used to execute some
programs built for the target in user-mode emulation. However, when the
target and build machines are similar (e.g. x86_74), running those
programs fails, with errors such as:

    cd ../../tools/v8_gypfiles; python ../../deps/v8/tools/run.py ../../out/Release/v8-qemu-wrapper ../../out/Release/bytecode_builtins_list_generator ../../out/Release/obj.host/gen/generate-bytecode-output-root/builtins-generated/bytecodes-builtins-list.h
    ../../out/Release/bytecode_builtins_list_generator: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ../../out/Release/bytecode_builtins_list_generator)
    ../../out/Release/bytecode_builtins_list_generator: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ../../out/Release/bytecode_builtins_list_generator)
    ../../out/Release/bytecode_builtins_list_generator: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ../../out/Release/bytecode_builtins_list_generator)
    ../../out/Release/bytecode_builtins_list_generator: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ../../out/Release/bytecode_builtins_list_generator)
    Return code is 1

So the question is: why the heck does Qemu use the host C library?

To answer this question, we first have to look at how the -L option of
Qemu is implemented. This option is documented as such:

    -L path     QEMU_LD_PREFIX   set the elf interpreter prefix to 'path'

The v8-qemu-wrapper script makes this option point to $(STAGING_DIR),
so that the ELF interpreter used is the one in $(STAGING_DIR).

However, contrary to what the option documentation says, this option
does much more than setting the ELF interpreter prefix: it is going to
affect how *all* system calls manipulating files (open, etc.) are
going to work.

When this option is passed, the function init_paths() in
https://git.qemu.org/?p=qemu.git;a=blob;f=util/path.c is called at
initialization time, and essentially its sets the global "base"
variable to point to the directory passed as -L argument.

Then, for every single syscall that manipulates a path, this path will
be passed through the path() function in the same file. This function
will first attempt to resolve the path with "base" as a prefix, and if
not, return the unprefixed path.

After adding some traces into this function, I was able to understand
what happens:

(1) -L$(STAGING_DIR) is passed, causing "base" to point to
$(STAGING_DIR)

(2) The target ELF interpreter from $(STAGING_DIR) is properly invoked

(3) When this ELF interpreter then resolves the libc.so.6 library, it
    first looks for /etc/ld.so.cache.

(4) Qemu first looks for /etc/ld.so.cache with the -L prefix, i.e
    $(STAGING_DIR)/etc/ld.so.cache, but it does not exist. So, the Qemu
    system call emulation falls back to /etc/ld.so.cache, which means
    the target ELF interpreter reads the /etc/ld.so.cache of the host
    system.

(5) This /etc/ld.so.cache of the host system says that libc.so.6 is in
    /lib/x86_64-linux-gnu/

(6) The target ELF interpreter therefore tries to use
    /lib/x86_64-linux-gnu/libc.so.6. The Qemu system call emulation
    first tries $(STAGING_DIR)/lib/x86_64-linux-gnu/libc.so.6, but
    this library does not exist (it is in
    $(STAGING_DIR)/lib/libc.so.6), so the Qemu system call emulation
    falls back to /lib/x86_64-linux-gnu/libc.so.6 of the host system,
    which exist... but is too old compared to the target C library.
    Indeed, results from ld.so.cache take precedence over the simple
    resolution of library paths in /usr/lib and /lib.

We see 3 possible ideas to resolve this problem:

(A) Change the behavior of Qemu to not fallback to unprefixed paths:
    when -L is passed, all path-related system calls should see the
    paths prefixed by the -L option.

    Issue with this is that this change is unlikely to get accepted by
    Qemu upstream. And there might be some side effects we have not
    really identified.

(B) Create an empty $(STAGING_DIR)/etc/ld.so.cache. We have tested
    this solution and it works: it gets used instead of the host
    /etc/ld.so.cache. Because $(STAGING_DIR)/etc/ld.so.cache is empty,
    there's no libc.so.6 match, so the target ELF interpreter goes
    through its normal library location resolution logic, which falls
    back to trying in /usr/lib and /lib, which works as those paths
    ends up being prefixed with $(STAGING_DIR) by Qemu.

(C) Pass LD_LIBRARY_PATH pointing to $(STAGING_DIR)/lib and
    $(STAGING_DIR)/usr/lib in the Qemu wrapper. This works because
    LD_LIBRARY_PATH paths have precedence over paths given by
    ld.so.cache.

    This is the solution already used by the GOI qemu wrapper in
    package/gobject-introspection/g-ir-scanner-qemuwrapper.in.

We chose to go with the third option, because it has been proven to work
for the GOI wrapper, and has been reported to solve #14366. Even though
the first option would be the best, it is also the one that has the
least chances to land any time soon (if ever); the second has not been
exercised, and the impact is not fully understood either (e.g what about
non-glibc toolchains?).

Fixes: #14366

Signed-off-by: Jens Maus <mail@jens-maus.de>
[yann.morin.1998@free.fr:
  - add whole analsys done by Thomas in:
    https://lore.kernel.org/buildroot/20221031213926.50d3c778@windsurf/
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 278d1db56becb4c6b5784c9bb9a0c452ea73ae16)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-27 13:38:49 +02:00
Peter Korsgaard
f4c3e4a55e package/libopenssl: bump to version 3.0.11
Fixes CVE-2023-4807 (Windows-only):
https://www.openssl.org/news/vulnerabilities.html

Changelog: https://www.openssl.org/news/openssl-3.0-notes.html

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-26 13:51:12 +02:00
Jens Maus
9c4ef96fe8 package/nodejs: fix parallel build
Unless told otherwise, ninja will spawn as many jobs as there are CPU
(plus 2). Nodejs is built with ninja, but it is a generic package, so
there is no variable (like with cmake-package) that passes the proper
number of parallel jobs as configured by the user.

As a consequence, the nodejs build will use as many CPU as are
available, possibly overcommitting the rsources the user expected to be
used.

Set the JOBS variableto limit that number.

Signed-off-by: Jens Maus <mail@jens-maus.de>
[yann.morin.1998@free.fr: reword commit log]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 84c24ab1b5a7d38b481b37a759480ff2273b499d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-26 10:50:22 +02:00
Peter Korsgaard
7efe2b30fe package/libpjsip: security bump to version 2.13.1
Fixes the following security vulnerability:

- CVE-2023-27585: Heap buffer overflow when parsing DNS packet
  https://github.com/pjsip/pjproject/security/advisories/GHSA-q9cp-8wcq-7pfr

Drop now upstreamed security fixes for CVE-2022-23537 and CVE-2022-23547.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 7447700f057a4bf8b2ee84c22a2319ab05f9aeea)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-26 10:01:28 +02:00