浏览代码

busybox: update to 1.36.0

Update busybox to version 1.36.0

* refresh patches (remove the backported upstream fix)
* refresh config

Config refresh:

Refresh commands, run after busybox is first built once:

cd package/utils/busybox/config/
../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0
cd ..
./convert_defaults.pl ../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0/.config > Config-defaults.in

Manual edits needed after config refresh:

* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to
  BUSYBOX_DEFAULT_FEATURE_IPV6

* Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to
  BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)

* Config-defaults.in: OpenWrt logic applied to
  BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917)

* Config-defaults.in: correct the default ports that get reset
  BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT    80
  BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT  23

* config/editors/Config.in: Add USE_GLIBC dependency to
  BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)

* config/shell/Config.in: change at "Options common to all shells" the conditional symbol
  SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH
  (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
  Apparently our script does not see the hidden option while
  prepending config options with "BUSYBOX_CONFIG_" which leads to a
  missed dependency when the options are later evaluated.)

* Edit a few Config.in files by adding quotes to sourced items in
  config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f)

Signed-off-by: Hannu Nyman <[email protected]>
Hannu Nyman 2 年之前
父节点
当前提交
98b09ba250

+ 33 - 0
package/utils/busybox/Config-defaults.in

@@ -208,6 +208,15 @@ config BUSYBOX_DEFAULT_PASSWORD_MINLEN
 config BUSYBOX_DEFAULT_MD5_SMALL
 config BUSYBOX_DEFAULT_MD5_SMALL
 	int
 	int
 	default 1
 	default 1
+config BUSYBOX_DEFAULT_SHA1_SMALL
+	int
+	default 3
+config BUSYBOX_DEFAULT_SHA1_HWACCEL
+	bool
+	default y
+config BUSYBOX_DEFAULT_SHA256_HWACCEL
+	bool
+	default y
 config BUSYBOX_DEFAULT_SHA3_SMALL
 config BUSYBOX_DEFAULT_SHA3_SMALL
 	int
 	int
 	default 1
 	default 1
@@ -298,6 +307,15 @@ config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
 config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
 config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
 	bool
 	bool
 	default n
 	default n
+config BUSYBOX_DEFAULT_LOOP_CONFIGURE
+	bool
+	default n
+config BUSYBOX_DEFAULT_NO_LOOP_CONFIGURE
+	bool
+	default n
+config BUSYBOX_DEFAULT_TRY_LOOP_CONFIGURE
+	bool
+	default y
 config BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ
 config BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ
 	bool
 	bool
 	default n
 	default n
@@ -860,6 +878,9 @@ config BUSYBOX_DEFAULT_TRUNCATE
 	bool
 	bool
 	default y if TARGET_bcm53xx
 	default y if TARGET_bcm53xx
 	default n
 	default n
+config BUSYBOX_DEFAULT_TSORT
+	bool
+	default n
 config BUSYBOX_DEFAULT_TTY
 config BUSYBOX_DEFAULT_TTY
 	bool
 	bool
 	default n
 	default n
@@ -2162,6 +2183,9 @@ config BUSYBOX_DEFAULT_RUNLEVEL
 config BUSYBOX_DEFAULT_RX
 config BUSYBOX_DEFAULT_RX
 	bool
 	bool
 	default n
 	default n
+config BUSYBOX_DEFAULT_SEEDRNG
+	bool
+	default n
 config BUSYBOX_DEFAULT_SETFATTR
 config BUSYBOX_DEFAULT_SETFATTR
 	bool
 	bool
 	default n
 	default n
@@ -2174,6 +2198,9 @@ config BUSYBOX_DEFAULT_STRINGS
 config BUSYBOX_DEFAULT_TIME
 config BUSYBOX_DEFAULT_TIME
 	bool
 	bool
 	default y
 	default y
+config BUSYBOX_DEFAULT_TREE
+	bool
+	default n
 config BUSYBOX_DEFAULT_TS
 config BUSYBOX_DEFAULT_TS
 	bool
 	bool
 	default n
 	default n
@@ -2682,6 +2709,9 @@ config BUSYBOX_DEFAULT_FEATURE_UDHCPC_SANITIZEOPT
 config BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT
 config BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT
 	string
 	string
 	default "/usr/share/udhcpc/default.script"
 	default "/usr/share/udhcpc/default.script"
+config BUSYBOX_DEFAULT_UDHCPC6_DEFAULT_SCRIPT
+	string
+	default ""
 config BUSYBOX_DEFAULT_UDHCPC6
 config BUSYBOX_DEFAULT_UDHCPC6
 	bool
 	bool
 	default n
 	default n
@@ -3012,6 +3042,9 @@ config BUSYBOX_DEFAULT_ASH_PRINTF
 config BUSYBOX_DEFAULT_ASH_TEST
 config BUSYBOX_DEFAULT_ASH_TEST
 	bool
 	bool
 	default y
 	default y
+config BUSYBOX_DEFAULT_ASH_SLEEP
+	bool
+	default n
 config BUSYBOX_DEFAULT_ASH_HELP
 config BUSYBOX_DEFAULT_ASH_HELP
 	bool
 	bool
 	default n
 	default n

+ 3 - 3
package/utils/busybox/Makefile

@@ -5,14 +5,14 @@
 include $(TOPDIR)/rules.mk
 include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=busybox
 PKG_NAME:=busybox
-PKG_VERSION:=1.35.0
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=1.36.0
+PKG_RELEASE:=1
 PKG_FLAGS:=essential
 PKG_FLAGS:=essential
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.busybox.net/downloads \
 PKG_SOURCE_URL:=https://www.busybox.net/downloads \
 		http://sources.buildroot.net
 		http://sources.buildroot.net
-PKG_HASH:=faeeb244c35a348a334f4a59e44626ee870fb07b6884d68c10ae8bc19f83a694
+PKG_HASH:=542750c8af7cb2630e201780b4f99f3dcceeb06f505b479ec68241c1e6af61a5
 
 
 PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam
 PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam
 PKG_BUILD_PARALLEL:=1
 PKG_BUILD_PARALLEL:=1

+ 6 - 1
package/utils/busybox/config/coreutils/Config.in

@@ -653,7 +653,7 @@ config BUSYBOX_CONFIG_SORT
 	sort is used to sort lines of text in specified files.
 	sort is used to sort lines of text in specified files.
 
 
 config BUSYBOX_CONFIG_FEATURE_SORT_BIG
 config BUSYBOX_CONFIG_FEATURE_SORT_BIG
-	bool "Full SuSv3 compliant sort (support -ktcbdfiogM)"
+	bool "Full SuSv3 compliant sort (support -ktcbdfioghM)"
 	default BUSYBOX_DEFAULT_FEATURE_SORT_BIG
 	default BUSYBOX_DEFAULT_FEATURE_SORT_BIG
 	depends on BUSYBOX_CONFIG_SORT
 	depends on BUSYBOX_CONFIG_SORT
 	help
 	help
@@ -851,6 +851,11 @@ config BUSYBOX_CONFIG_TRUNCATE
 	help
 	help
 	truncate truncates files to a given size. If a file does
 	truncate truncates files to a given size. If a file does
 	not exist, it is created unless told otherwise.
 	not exist, it is created unless told otherwise.
+config BUSYBOX_CONFIG_TSORT
+	bool "tsort (0.7 kb)"
+	default BUSYBOX_DEFAULT_TSORT
+	help
+	tsort performs a topological sort.
 config BUSYBOX_CONFIG_TTY
 config BUSYBOX_CONFIG_TTY
 	bool "tty (3.6 kb)"
 	bool "tty (3.6 kb)"
 	default BUSYBOX_DEFAULT_TTY
 	default BUSYBOX_DEFAULT_TTY

+ 55 - 7
package/utils/busybox/config/libbb/Config.in

@@ -98,21 +98,47 @@ config BUSYBOX_CONFIG_MD5_SMALL
 	default BUSYBOX_DEFAULT_MD5_SMALL  # all "fast or small" options default to small
 	default BUSYBOX_DEFAULT_MD5_SMALL  # all "fast or small" options default to small
 	range 0 3
 	range 0 3
 	help
 	help
-	Trade binary size versus speed for the md5sum algorithm.
+	Trade binary size versus speed for the md5 algorithm.
 	Approximate values running uClibc and hashing
 	Approximate values running uClibc and hashing
 	linux-2.4.4.tar.bz2 were:
 	linux-2.4.4.tar.bz2 were:
-	value               user times (sec)  text size (386)
-	0 (fastest)         1.1                6144
-	1                   1.4                5392
-	2                   3.0                5088
-	3 (smallest)        5.1                4912
+	value           user times (sec)  text size (386)
+	0 (fastest)     1.1               6144
+	1               1.4               5392
+	2               3.0               5088
+	3 (smallest)    5.1               4912
+
+config BUSYBOX_CONFIG_SHA1_SMALL
+	int "SHA1: Trade bytes for speed (0:fast, 3:slow)"
+	default BUSYBOX_DEFAULT_SHA1_SMALL  # all "fast or small" options default to small
+	range 0 3
+	help
+	Trade binary size versus speed for the sha1 algorithm.
+	With FEATURE_COPYBUF_KB=64:
+	                throughput MB/s   size of sha1_process_block64
+	value           486  x86-64       486   x86-64
+	0               440  485          3481  3502
+	1               265  265           641   696
+	2,3             220  210           342   364
+
+config BUSYBOX_CONFIG_SHA1_HWACCEL
+	bool "SHA1: Use hardware accelerated instructions if possible"
+	default BUSYBOX_DEFAULT_SHA1_HWACCEL
+	help
+	On x86, this adds ~590 bytes of code. Throughput
+	is about twice as fast as fully-unrolled generic code.
+
+config BUSYBOX_CONFIG_SHA256_HWACCEL
+	bool "SHA256: Use hardware accelerated instructions if possible"
+	default BUSYBOX_DEFAULT_SHA256_HWACCEL
+	help
+	On x86, this adds ~1k bytes of code.
 
 
 config BUSYBOX_CONFIG_SHA3_SMALL
 config BUSYBOX_CONFIG_SHA3_SMALL
 	int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
 	int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
 	default BUSYBOX_DEFAULT_SHA3_SMALL  # all "fast or small" options default to small
 	default BUSYBOX_DEFAULT_SHA3_SMALL  # all "fast or small" options default to small
 	range 0 1
 	range 0 1
 	help
 	help
-	Trade binary size versus speed for the sha3sum algorithm.
+	Trade binary size versus speed for the sha3 algorithm.
 	SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
 	SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
 	64-bit x86: +270 bytes of code, 45% faster
 	64-bit x86: +270 bytes of code, 45% faster
 	32-bit x86: +450 bytes of code, 75% faster
 	32-bit x86: +450 bytes of code, 75% faster
@@ -399,3 +425,25 @@ config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
 	For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
 	For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
 	at shell prompt will list file named 0xff (single char name
 	at shell prompt will list file named 0xff (single char name
 	with char value 255), not file named '?'.
 	with char value 255), not file named '?'.
+
+choice
+	prompt "Use LOOP_CONFIGURE for losetup and loop mounts"
+	default BUSYBOX_CONFIG_TRY_LOOP_CONFIGURE
+	help
+	LOOP_CONFIGURE is added to Linux 5.8
+	https://lwn.net/Articles/820408/
+	This allows userspace to completely setup a loop device with a single
+	ioctl, removing the in-between state where the device can be partially
+	configured - eg the loop device has a backing file associated with it,
+	but is reading from the wrong offset.
+
+config BUSYBOX_CONFIG_LOOP_CONFIGURE
+	bool "use LOOP_CONFIGURE, needs kernel >= 5.8"
+
+config BUSYBOX_CONFIG_NO_LOOP_CONFIGURE
+	bool "use LOOP_SET_FD + LOOP_SET_STATUS"
+
+config BUSYBOX_CONFIG_TRY_LOOP_CONFIGURE
+	bool "try LOOP_CONFIGURE, fall back to LOOP_SET_FD + LOOP_SET_STATUS"
+
+endchoice

+ 12 - 0
package/utils/busybox/config/miscutils/Config.in

@@ -704,6 +704,13 @@ config BUSYBOX_CONFIG_RX
 	default BUSYBOX_DEFAULT_RX
 	default BUSYBOX_DEFAULT_RX
 	help
 	help
 	Receive files using the Xmodem protocol.
 	Receive files using the Xmodem protocol.
+config BUSYBOX_CONFIG_SEEDRNG
+	bool "seedrng (1.3 kb)"
+	default BUSYBOX_DEFAULT_SEEDRNG
+	help
+	Seed the kernel RNG from seed files, meant to be called
+	once during startup, once during shutdown, and optionally
+	at some periodic interval in between.
 config BUSYBOX_CONFIG_SETFATTR
 config BUSYBOX_CONFIG_SETFATTR
 	bool "setfattr (3.7 kb)"
 	bool "setfattr (3.7 kb)"
 	default BUSYBOX_DEFAULT_SETFATTR
 	default BUSYBOX_DEFAULT_SETFATTR
@@ -727,6 +734,11 @@ config BUSYBOX_CONFIG_TIME
 	The time command runs the specified program with the given arguments.
 	The time command runs the specified program with the given arguments.
 	When the command finishes, time writes a message to standard output
 	When the command finishes, time writes a message to standard output
 	giving timing statistics about this program run.
 	giving timing statistics about this program run.
+config BUSYBOX_CONFIG_TREE
+	bool "tree (0.6 kb)"
+	default BUSYBOX_DEFAULT_TREE
+	help
+	List files and directories in a tree structure.
 config BUSYBOX_CONFIG_TS
 config BUSYBOX_CONFIG_TS
 	bool "ts (450 bytes)"
 	bool "ts (450 bytes)"
 	default BUSYBOX_DEFAULT_TS
 	default BUSYBOX_DEFAULT_TS

+ 6 - 1
package/utils/busybox/config/networking/udhcp/Config.in

@@ -93,12 +93,17 @@ config BUSYBOX_CONFIG_FEATURE_UDHCPC_SANITIZEOPT
 config BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT
 config BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT
 	string "Absolute path to config script"
 	string "Absolute path to config script"
 	default BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT
 	default BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT
-	depends on BUSYBOX_CONFIG_UDHCPC || BUSYBOX_CONFIG_UDHCPC6
+	depends on BUSYBOX_CONFIG_UDHCPC
 	help
 	help
 	This script is called after udhcpc receives an answer. See
 	This script is called after udhcpc receives an answer. See
 	examples/udhcp for a working example. Normally it is safe
 	examples/udhcp for a working example. Normally it is safe
 	to leave this untouched.
 	to leave this untouched.
 
 
+config BUSYBOX_CONFIG_UDHCPC6_DEFAULT_SCRIPT
+	string "Absolute path to config script for IPv6"
+	default BUSYBOX_DEFAULT_UDHCPC6_DEFAULT_SCRIPT
+	depends on BUSYBOX_CONFIG_UDHCPC6
+
 # udhcpc6 config is inserted here:
 # udhcpc6 config is inserted here:
 config BUSYBOX_CONFIG_UDHCPC6
 config BUSYBOX_CONFIG_UDHCPC6
 	bool "udhcpc6 (21 kb)"
 	bool "udhcpc6 (21 kb)"

+ 5 - 0
package/utils/busybox/config/shell/Config.in

@@ -201,6 +201,11 @@ config BUSYBOX_CONFIG_ASH_TEST
 	default BUSYBOX_DEFAULT_ASH_TEST
 	default BUSYBOX_DEFAULT_ASH_TEST
 	depends on BUSYBOX_CONFIG_SHELL_ASH
 	depends on BUSYBOX_CONFIG_SHELL_ASH
 
 
+config BUSYBOX_CONFIG_ASH_SLEEP
+	bool "sleep builtin"
+	default BUSYBOX_DEFAULT_ASH_SLEEP
+	depends on BUSYBOX_CONFIG_SHELL_ASH
+
 config BUSYBOX_CONFIG_ASH_HELP
 config BUSYBOX_CONFIG_ASH_HELP
 	bool "help builtin"
 	bool "help builtin"
 	default BUSYBOX_DEFAULT_ASH_HELP
 	default BUSYBOX_DEFAULT_ASH_HELP

+ 0 - 42
package/utils/busybox/patches/001-CVE-2022-30065-awk-fix-use-after-free.patch

@@ -1,42 +0,0 @@
-From e63d7cdfdac78c6fd27e9e63150335767592b85e Mon Sep 17 00:00:00 2001
-From: Natanael Copa <[email protected]>
-Date: Fri, 17 Jun 2022 17:45:34 +0200
-Subject: awk: fix use after free (CVE-2022-30065)
-
-fixes https://bugs.busybox.net/show_bug.cgi?id=14781
-
-function                                             old     new   delta
-evaluate                                            3343    3357     +14
-
-Signed-off-by: Natanael Copa <[email protected]>
-Signed-off-by: Denys Vlasenko <[email protected]>
----
- editors/awk.c       | 3 +++
- testsuite/awk.tests | 6 ++++++
- 2 files changed, 9 insertions(+)
-
---- a/editors/awk.c
-+++ b/editors/awk.c
-@@ -3114,6 +3114,9 @@ static var *evaluate(node *op, var *res)
- 
- 		case XC( OC_MOVE ):
- 			debug_printf_eval("MOVE\n");
-+			/* make sure that we never return a temp var */
-+			if (L.v == TMPVAR0)
-+				L.v = res;
- 			/* if source is a temporary string, jusk relink it to dest */
- 			if (R.v == TMPVAR1
- 			 && !(R.v->type & VF_NUMBER)
---- a/testsuite/awk.tests
-+++ b/testsuite/awk.tests
-@@ -469,4 +469,10 @@ testing 'awk printf %% prints one %' \
- 	"%\n" \
- 	'' ''
- 
-+testing 'awk assign while test' \
-+	"awk '\$1==\$1=\"foo\" {print \$1}'" \
-+	"foo\n" \
-+	"" \
-+	"foo"
-+
- exit $FAILCOUNT