Commit Graph

516 Commits

Author SHA1 Message Date
Thomas Petazzoni
8f3f28102d busybox: fix build on SPARC and SPARC64
Since we introduced the support for building Busybox as individual
binaries, Busybox started failing to build on SPARC/SPARC64 with this
feature enabled:

appletlib.c:(.text.find_applet_by_name+0x14): relocation truncated to fit: R_SPARC_GOT13 against symbol `applet_nameofs' defined in .rodata.applet_nameofs section in libbb/lib.a(appletlib.o)
appletlib.c:(.text.find_applet_by_name+0x18): relocation truncated to fit: R_SPARC_GOT13 against symbol `applet_names' defined in .rodata.applet_names section in libbb/lib.a(appletlib.o)
[...]

This commit adds two patches to Busybox to fix this issue, by adding
-fPIC to CFLAGS when building on SPARC/SPARC64. The patches have been
submitted upstream.

Fixes:

  http://autobuild.buildroot.net/results/90144369ccea8c41ec7643a79a7ebfaa9b7db95c/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-25 23:34:33 +02:00
Yann E. MORIN
5a8484dec2 system: move remounting / to the corresponding init systems
Currently, remounting / read-write (or not) is done by the skeleton
package when the init system is either busybox or sysvinit, by
registering a target-finalize hook; it is not done at all for systemd.

Move registering this target-finalize hook to both of busybox and
sysvinit. Leave systemd alone, we'll take care of it later.

Rename the macro to a more meaningful name, and move it to system.mk
with the other such macros.

Yet a little bit less init-system knowledge in the skeleton.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: remove not-so-useful comments, as pointed by Arnout.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-22 22:34:40 +02:00
Yann E. MORIN
b07ccc47cb system: move setting getty to the corresponding init systems
Currently, setting the getty is done:
  - by the skeleton package when the init system is either busybox or
    sysvinit;
  - by the systemd package when the init system is systemd;
both by registering a target-finalize hook.

This is not very consistent.

Move setting the getty out of the skeleton and into the package that
provides the init system, by registering a per-package target-fialize
hook.

This offloads yet a bit more out of the skeleton, so that it is easier
to properly separate the skeletons for the various init systems.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-22 22:33:38 +02:00
Peter Korsgaard
15e8e721f6 busybox: disable CONFIG_FEATURE_CLEAN_UP in default configs
FEATURE_CLEAN_UP is a configuration feature to get busybox to explicitly
call free() on dynamic allocated memory just before exiting so memory leak
detectors like valgrind don't get confused.  Upstream explicitly recommends
to NOT enable this option:

config FEATURE_CLEAN_UP
	bool "Clean up all memory before exiting (usually not needed)"
	default n
	help
	  As a size optimization, busybox normally exits without explicitly
	  freeing dynamically allocated memory or closing files. This saves
	  space since the OS will clean up for us, but it can confuse debuggers
	  like valgrind, which report tons of memory and resource leaks.

	  Don't enable this unless you have a really good reason to clean
	  things up manually.

Having this option enabled adds a bit of bloat, but more significantly these
cleanup code paths don't get tested very often so some times get out of sync
with the allocation code which can lead to crashes (or security issues from
double frees), so it is safer to disable the option.

For people wanting to debug memory leak issues with busybox, the option can
still be enabled with a configuration fragment (or a custom config).

The size difference isn't huge (br-arm-full-static):

-rwxr-xr-x 1 peko peko 886K Jul  5 10:56 output-busybox1/target/bin/busybox
-rwxr-xr-x 1 peko peko 882K Jul  5 10:53 output-busybox2/target/bin/busybox

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 12:25:15 +02:00
Clayton Shotwell
b1e07d6d79 busybox: applets as individual binaries
The individual binaries option of busybox allows for the applets
that would usually be symlinks to be built as individual applications
that link against a shared library.

This feature is needed for SELinux to allow the applications to run
under the correct SELinux context.

The patch being added allows the individual applications to be
installed and will be upstreamed to the busybox developers.

The initial work for this change was done by Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>.

Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Niranjan Reddy <niranjan.reddy@rockwellcollins.com>
Signed-off-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
[Thomas:
 - add help text in Config.in option.
 - rename BUSYBOX_CONFIGURE_INDIVIDUAL_BINARIES to
   BUSYBOX_SET_INDIVIDUAL_BINARIES to be consistent with other
   variables.
 - call BUSYBOX_INSTALL_INDIVIDUAL_BINARIES in
   BUSYBOX_INSTALL_TARGET_CMDS, not in BUSYBOX_INSTALL_INIT_SYSV.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Arnout:
 - revert to the "optional file" approach in makedevs;
 - reword Config.in comment text to match our usual pattern;
 - abbreviate comment about how suid applets are found a little;
 - all applets are optional (each one may have been unselected from the
   busybox config).]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: remove /usr/share/udhcpc/default.script from BUSYBOX_PERMISSIONS.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-04 00:54:56 +02:00
Adam Duskett
4db9bbb475 package/b*/Config.in: fix help text wrapping
The check-package script when ran gives warnings on text wrapping
on all of these Config files.  This patch cleans up all warnings
related to the text wrapping for the Config files starting with
the letter b in the package directory.

The appropriate indentation is: <tab><2 spaces><62 chars>
See http://nightly.buildroot.org/#writing-rules-config-in for more
information.

Signed-off-by: Adam Duskett <aduskett@codeblue.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-05-11 23:26:49 +02:00
Adam Duskett
48bd50287f package/b*/Config.in: fix ordering of statements
The check-package script when ran gives warnings on ordering issues
on all of these Config files.  This patch cleans up all warnings
related to the ordering in the Config files for packages starting with
the letter b in the package directory.

The appropriate ordering is: type, default, depends on, select, help
See http://nightly.buildroot.org/#_config_files for more information.

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-29 17:17:57 +02:00
Arnout Vandecappelle
200282e207 busybox: no need to disable clear and reset
Removing clear and reset from the busybox config when the ncurses tools
are enabled is not really needed.

Since commit 802bff9c42, the busybox install will not overwrite
existing programs. Therefore, the tools will be installed correctly
regardless of the order of the build:
- if busybox is built first, the clear and reset apps are installed,
  but they will be overwritten by ncurses;
- if ncurses is built first, it will install the clear and reset apps,
  and busybox will no longer install them.

We prefer not to modify the busybox configuration when not strictly
necessary, because it is surprising for the user that his configuration
is not applied. Clearly, it's not ideal that busybox is configured with
redundant apps, but if the user wants to shrink it, it's possible to
provide a custom config.

This partially reverts commit 33c72344a8.

Cc: Matthew Weber <matthew.weber@rockwellcollins.com>
Cc: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Matt Weber  <matthew.weber@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-04-26 09:20:15 +02:00
Adam Duskett
5fabb89fe8 package/busybox: fix unexpected indent with tabs
Signed-off-by: Adam Duskett <aduskett@codeblue.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-22 15:49:08 +02:00
Matt Weber
33c72344a8 busybox: preserve ncurses progs/tools
The ncurses package installs a full version of clear and reset(tset)
tools.  Preserve these by disabling the options in the busybox config
file.  This removes the need for ncurses to depend on busybox for solely
ordering of target install.

This commit resolves the following python circular dependency with python.
busybox -> libselinux -> python3 -> ncurses -> busybox

Fixes:
http://autobuild.buildroot.net/results/db1/db1e6f3054092fc5576ccab8e04a3b9d74ca9a8c/

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
[Thomas: minor tweaks.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-14 10:56:08 +02:00
Rahul Bedarkar
af31c309e7 boot, linux, package: use SPDX short identifier for GPLv2/GPLv2+
We want to use SPDX identifier for license strings as much as possible.
SPDX short identifier for GPLv2/GPLv2+ is GPL-2.0/GPL-2.0+.

This change is done by using following command.
find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/\<GPLv2\>/GPL-2.0/g'

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:16:38 +02:00
Jörg Krause
afb585468b busybox: fix mdev.conf
mdev does not set "/dev/snd" and "/dev/input" group and permission
propery, because with commit c3cf1e30a3022453311a7e9fe11d94c7a381640e
(May 2013!) the behavior of mdev has changed.

The device name is now taken directly from the uevent file and does no
longer match the old rule.

Fix the rules for "/dev/snd" and "/dev/input" according to the example
given in [1].

[1] http://lists.busybox.net/pipermail/busybox/2015-February/082297.html

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-03-25 14:54:17 +01:00
Peter Korsgaard
86ee03421f busybox: bump version to 1.26.2
And drop patches now upstream.  Also enable internal glob() handling in ash,
as busybox now errors out if this isn't enabled when building for uClibc
because of bugs in the the glob(3) implementation in uClibc and musl since:

commit 3a4cdf45f928de0af09088bbbb96f60d9ac44e87
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Wed Dec 21 04:13:23 2016 +0100

    ash: error out if ASH_INTERNAL_GLOB is not selected on uClibc

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-01-21 13:55:00 +01:00
Arnout Vandecappelle
8f290a21d0 busybox: add comment that other packages are needed
Inspired on the confusion in [1], we want to warn the user that building
without busybox may not lead to a working system.

[1] https://bugs.busybox.net/show_bug.cgi?id=9526

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-01-20 14:11:15 +11:00
Jörg Krause
8d9937b61b package/busybox: add patch to fix dependency for IFUPDOWN_UDHCPC_CMD_OPTIONS
Upstream commit a8c696bf09d8151323f6e99348c4bc8989f829c8 makes ifup and
ifdown individually selectable, but forgets to update the dependency to
IFUPDOWN_UDHCPC_CMD_OPTIONS, so it is not selectable anymore.

Add a patch which fixes the dependency by checking for IFUP or IFDOWN,
instead of the obsolete IFUPDOWN.

Upstream status: Pending
http://lists.busybox.net/pipermail/busybox/2016-December/085034.html

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-30 22:44:29 +01:00
Jörg Krause
8f55961eed package/busybox: update minimal configuration file
Commit 44a563dbc0 bumps busybox to version
1.26.0, but does not update the minimal configuration file. There is at
least one issue using the old configuration with the newer busybox:

* IFUPDOWN is split into IFUP and IFDOWN in version 1.26.0

Update the minimal configuration file by loading the busybox.config file
and saving it back.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-30 22:44:25 +01:00
Jörg Krause
0de6137d6f package/busybox: update configuration file
Commit 44a563dbc0 bumps busybox to version
1.26.0, but does not update the configuration file. There is at least
one issue using the old configuration with the newer busybox:

* IFUPDOWN is split into IFUP and IFDOWN in version 1.26.0

Update the configuration file by loading the busybox.config file and
saving it back.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-30 22:44:22 +01:00
Waldemar Brodkorb
80fdc67892 busybox: fix modutils compile
Do not use syscall wrappers from uClibc.

Patch submitted upstream:
http://lists.busybox.net/pipermail/busybox/2016-December/085031.html

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-27 10:37:03 +01:00
Peter Korsgaard
325f79bb03 busybox: adjust nommu swaponoff handling for busybox 1.26.0+
Fixes:
http://autobuild.buildroot.net/results/dfe/dfec2c0626ab087325fd869bcbe0b9dc354d788c/

Busybox 1.26.0 gained separate config options for swapon / swapoff:

commit f417ffd88f194bbfd18605882ee242190c1bab34
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Mon Nov 14 17:30:50 2016 +0100

    Make swapon and swapoff individually selectable.

    For example, without swapoff, code shrinks by 277 bytes.

    Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

So adjust busybox.config and the logic to disable these applets for nommu
builds for the new names.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-20 23:21:38 +01:00
Gustavo Zacarias
44a563dbc0 busybox: bump to version 1.26.0
Drop upstream patch.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-20 14:10:03 +01:00
Gilles Chanteperdrix
a8254d32fd busybox: disable build timestamps for reproducible builds
Busybox includes some information about the build environment in its
binary. For BR2_REPRODUCIBLE, remove that information.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-23 22:56:53 +01:00
Michael Walle
a4cbf58f83 busybox: allow the user to set the telnetd options
Source /etc/default/telnet to make it possible to override the telnetd
arguments. For example a user may want to set an alternative port.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-07 22:58:04 +01:00
Gustavo Zacarias
4ed51b3982 busybox: bump to version 1.25.1
Drop upstream patches.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-11 12:17:27 +02:00
Luca Ceresoli
61ed56090c busybox: fix double free in top causing a SIGABRT storm after SIGPIPE
On some platforms the command 'top -n1 | head' goes very often into an
infinite loop of SIGABRT and double free()s.

Fix by applying a patch from upstream Busybox.

For a detailed explanation of the bug, see
http://lists.busybox.net/pipermail/busybox/2016-August/084555.html

Thanks to Yann for the help in finding this bug.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-19 15:55:51 +02:00
Gustavo Zacarias
39750198fc busybox: add upstream fixes for 1.25.0
Add upstream patches to fix gzip (bug #9131 - incorrect compression
levels), ip (route add bug) and ntpd (CVE-2016-6301 - NTP server denial
of service).

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-08-17 15:02:35 +02:00
Yann E. MORIN
781c85eb38 package/busybox: add comment about BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is a bit special. When Busybox is
enabled, it is a Busybox option. When Busybox is not enabled, it is a
stand-alone option, forcibly enabled.

So we can safely 'select' it without ensuring (via a 'depends on' or
another 'select') that Busybox is enabled.

However, the name of this option does not express the fact that it is
safe to select it without checking Busybox, which can lead to a bit of
time-consuming head-scratching.

To avoid future puzzlement from an unsuspecting observer, add a a big
fat comment that this option can be selected without any dependency on
Busybox.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Romain Naour <romain.naour@openwide.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
[Thomas: slightly improve the wording of one of the comment.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-18 23:29:01 +02:00
Andy Shevchenko
b4fc5a180c package/busybox: support spaces in module aliases in mdev
The new change which enabled automatic module loading on boot does not handle
the cases when module alias includes spaces. It prevents modules to be loaded
since script fails:

  % find /sys/ -name modalias | xargs sort -u
  sort: /sys/devices/platform/Fixed: No such file or directory

First alias in question is "platform:Fixed MDIO bus".

Amend the script to support above like cases.

Fixes: 07f46c2b6d ("package/busybox: support automatic module loading with mdev")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-02 13:15:50 +02:00
Andy Shevchenko
567627700a package/busybox: enable ttyUSB[0-9] when using mdev
Some of our systems are using ttyUSB0 devices as a serial console.
Add them to mdev.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-01 22:51:44 +02:00
Adam Duskett
ebcca24c95 libselinux: bump to version 2.5
In addition, if a user is using glibc 2.22, the default CFLAG
D_FILE_OFFSET_BITS=64 will cause a compile error.  This flag is now
removed from the CFLAGS in the make file to ensure that toolchains
compiled against glibc 2.22 will build the new version of the package
properly.

In addition, libselinux now uses fts(), which is not available on musl,
and not provided by our default uClibc configuration. Therefore,
libselinux now depends on glibc, as well as all its reverse
dependencies.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: add glibc dependency for fts().]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-01 11:06:05 +02:00
Gustavo Zacarias
d472a622be busybox: disable nsenter/unshare in default config
These require newer toolchain components. Since they didn't exist in
previous versions no functionality is lost. Fixes:
http://autobuild.buildroot.net/results/b63/b6312626b3938555c4e5a68ad42f6951b02d7760/

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-23 21:09:23 +02:00
Gustavo Zacarias
81cbdbaee8 busybox: bump to version 1.25.0
Also drop upstream patches.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-22 10:32:53 +02:00
Yann E. MORIN
9f4f9c7440 package/busybox: use the generic help rules
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Thomas: don't use a helper.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-07 21:56:34 +02:00
Waldemar Brodkorb
cc72cf2ca6 m68k: fix open issues with qemu coldfire
Enable kernel drivers for networking and add a simple
busybox config with basic network tools.

Add kernel patch from Linux git to fix hush segfaults while
using signal handler.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-11 15:27:15 +02:00
Waldemar Brodkorb
5e1b132495 move busybox-minimal.config to be used by other noMMU targets
Config can be used by other noMMU targets as qemu-system-m68k
with coldfire emulation.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-30 15:28:32 +02:00
Ignacy Gawędzki
d5e143dcfb busybox: Support option 119 in udhcpc default script.
* package/busybox/udhcpc.script: Use $search instead of $domain if
  that is defined.

Note that for this to work, not only has CONFIG_FEATURE_UDHCP_RFC3397
be enabled in Busybox' configuration but also the option has to be
requested using the "-O search" command-line option (one can set it in
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS, for instance).

[Peter: add comment with reference to rfc3359/option 119 for clarity]
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-04-24 20:58:39 +02:00
Gustavo Zacarias
157dc65fb7 busybox: security bump to version 1.24.2
The version bump doesn't inherently fix the security issues, however the
added CVE patches do, which fix:

CVE-2016-2147 - out of bounds write (heap) due to integer underflow in
udhcpc.
CVE-2016-2148 - heap-based buffer overflow in OPTION_6RD parsing.

Drop patches that are upstream as well.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-25 23:36:10 +01:00
Gustavo Zacarias
d1de77a59f busybox: use md5 as default password algorithm
DES is terribly outdated and a security vulnerability.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-23 00:01:35 +01:00
Peter Korsgaard
07f46c2b6d package/busybox: support automatic module loading with mdev
A recently discussed on the mailing list:
http://lists.busybox.net/pipermail/buildroot/2016-February/154189.html

Our mdev configuration currently doesn't handle module loading. Fix that by:

- Telling mdev to run modprobe on hotplug events providing MODALIAS

- Adjust the init script to handle coldplug modalias events (E.G. modules
  for which the devices were already present before mdev was added as the
  hotplug handler). mdev -s should arguable handle this, but it doesn't.

Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-09 23:07:44 +01:00
Nicolas Cavallari
cc2ded05bd busybox: Make S01logging source a default file
The default syslog parameters are to keep only 200-400 KiB of logs,
which is very few if there is a spammy daemon on the system, or a daemon
that fails and then spams errors that hides the original problem.

Make S01logging source a /etc/default/logging file where these
parameters can be overridden.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-09 23:07:31 +01:00
Peter Korsgaard
7a5be2a042 busybox: tweak IPv6/largefile handling
Fixes #8736

When IPv6 and largefile options were removed from Buildroot, the code to
force these options in busybox were still left in.

There's no strong reason to forcefully enable these options (only to disable
options if the system cannot support it like we do for nommu), so instead
enable the options in our default defconfig, allowing people to override
this if they use a custom config.

While we're at it, enable the prefer-ipv4 option so network applets like
ntpd doesn't fail when dual stacked hosts are resolved from a system without
IPv6 support enabled in the kernel.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-04 17:03:58 +01:00
Gustavo Zacarias
d9bc73d494 busybox: add truncate fix patch
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-02-01 07:17:30 +01:00
lothar felten
fb4c041cfb inittab: disable reboot by ctrl-alt-del
Most embedded systems do not have a keyboard.
If a keyboard is attached afterwards (e.g. to an accessible USB host port)
this allows the user to reboot the system by pressing Ctrl-Alt-Del, which
might not be desired.

Signed-off-by: lothar felten <felten@vaxnet.de>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-01-03 23:16:08 +01:00
Arnout Vandecappelle (Essensium/Mind)
63fdab6b4f busybox: add another upstream patch to fix (g)unzip
0002-unzip.patch was added in 69516e0 to fix a segmentation fault in the
gunzip applet.  However, it introduced a new issue that made the unzipping
of some files fail.

Add an upstream patch that fixes this new issue.

Fixes #8501.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Jason Rush <rush0033@hotmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-12-02 23:48:58 +01:00
Gustavo Zacarias
69516e05c8 busybox: add upstream unzip segv patch
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-11-13 15:40:57 +01:00
Gustavo Zacarias
0a425c49c3 busybox: bump to version 1.24.1
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-29 20:04:36 +01:00
Thomas Petazzoni
835777fa55 busybox: fix musl build issues
Musl doesn't implemented wmtp, and its utmp support is not sufficient
to build the latest versions of Busybox, so let's disable wtmp and
utmp support in Busybox for musl toolchains.

We re-use an existing define BUSYBOX_INTERNAL_SHADOW_PASSWORDS that
was used to do some musl-related tweaks to the Busybox configuration
around shadow password functions, and extend it to also do the
utmp/wtmp tweaks. In the process, we rename the define to
BUSYBOX_MUSL_TWEAKS.

Note that BUSYBOX_KCONFIG_FIXUP_CMDS continues to call
BUSYBOX_INTERNAL_SHADOW_PASSWORDS because there is another definition
of this macro under other conditions.

Fixes:

  http://autobuild.buildroot.org/results/b96/b96ffad13bca5e6fbf7ce79538aacbfe27b1eff3/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-18 15:35:40 +02:00
Gustavo Zacarias
80024a76ae busybox: enable fully featured hush shell for nommu
As pointed by Rich Fekler on IRC the basic hush shell is pretty much
useless since it doesn't support if conditionals, loops, functions, case
or even interactive mode.
So enable the full feature-set.
Size delta: +10184 bytes uncompressed for blackfin fdpic.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-15 09:40:20 +02:00
Vicente Olivert Riera
d42ca918cc busybox: bump to version 1.24.0
Disable CONFIG_FEATURE_SYNC_FANCY in the busybox.config because that
option causes build failures for any uClibc based toolchains since it
requires syncfs() support, which doens't exist in uClibc.

This new option has been introduced in 1.24.0, so despite of disabling
it, we are not losing anything that we had before.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-14 11:59:58 +02:00
Maxime Hadjinlian
0f75b2635e package: Replace 'echo -n' by 'printf'
'echo -n' is not a POSIX construct (no flag support), we shoud use
'printf', especially in init script.

This patch was generated by the following command line:
git grep -l 'echo -n' -- `git ls-files | grep -v 'patch'` | xargs sed -i 's/echo -n/printf/'

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-04 00:56:41 +02:00
Luca Ceresoli
246131a593 busybox: inittab: don't redirect output to /dev/null
Several inittab steps are redirected to /dev/null. This means any error or
warning printed by these crucial commands would be hidden from the user.
There is no evident reason to hide this output, so stop doing that.

Suggested by Thomas Petazzoni:
http://lists.busybox.net/pipermail/buildroot/2015-September/139146.html

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-03 15:29:50 +02:00