lp://staging/busybox

Created by Jelmer Vernooij and last modified
Get this branch:
bzr branch lp://staging/busybox

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
VCS imports
Project:
BusyBox
Status:
Development

Import details

Import Status: Suspended

This branch is an import of the HEAD branch of the Git repository at git://busybox.net/busybox.git.

Last successful import was .

Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 25 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 30 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 30 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-2 and finished taking 25 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 30 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 20 seconds — see the log

Recent revisions

17715. By Russ Dill

udhcp: Avoid leaking uninitialized/stale data

I noticed a commit in connman:

"gdhcp: Avoid leaking stack data via unitiialized variable" [1]

Since gdhcp is just BusyBox udhcp with the serial numbers filed off, I
checked if BusyBox udhcp has a related issue.

The issue is that the get_option logic assumes any data within the
memory area of the buffer is "valid". This reduces the complexity of the
function at the cost of reading past the end of the actually received
data in the case of specially crafted packets. This is not a problem
for the udhcp_recv_kernel_packet data path as the entire memory
area is zeroed. However, d4/d6_recv_raw_packet does not zero the
memory.

Note that a related commit [2] is not required as we are zeroing
any data that can be read by the get_option function.

[1] https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
[2] https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=58d397ba74873384aee449690a9070bacd5676fa

function old new delta
d4_recv_raw_packet 484 497 +13
d6_recv_raw_packet 216 228 +12
.rodata 105390 105381 -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 25/-9) Total: 16 bytes

Signed-off-by: Russ Dill <email address hidden>
Cc: Colin Wee <email address hidden>
Cc: Denys Vlasenko <email address hidden>
Signed-off-by: Denys Vlasenko <email address hidden>

17714. By Vda-linux

syslogd: fix breakage caused by "daemonize _after_ init" change

function old new delta
syslogd_init 1007 1140 +133
create_socket 143 - -143
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 133/-143) Total: -10 bytes

Signed-off-by: Denys Vlasenko <email address hidden>

17713. By Vda-linux

awk: implement -E; do not reorder -f and -e

function old new delta
awk_main 843 891 +48
next_input_file 243 261 +18
packed_usage 34631 34638 +7
.rodata 105391 105390 -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 73/-1) Total: 72 bytes

Signed-off-by: Denys Vlasenko <email address hidden>

17712. By Nero <email address hidden>

install: Fix chown resetting suid/sgid bits from chmod

Since Linux 2.2.13, chown(2) resets the suid/gid bits for all users.
This patch changes the ordering so that chmod gets called after chown.

This behavior follows GNU coreutils.

Signed-off-by: Nero <email address hidden>
Signed-off-by: Denys Vlasenko <email address hidden>

17711. By Vda-linux

sleep: fix "sleep -- ARGS"

function old new delta
sleep_main 116 119 +3
printf_main 860 837 -23
single_argv 50 25 -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 3/-48) Total: -45 bytes

Signed-off-by: Denys Vlasenko <email address hidden>

17710. By Ron Yorston <email address hidden>

tsort: avoid use-after-free

When the input data contained a cycle it was possible for tsort to
attempt to access freed nodes. This sometimes resulted in the
test case 'echo a b b a | tsort' crashing.

Don't free nodes when they're removed from the graph.

function old new delta
tsort_main 621 596 -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-25) Total: -25 bytes

Signed-off-by: Ron Yorston <email address hidden>
Signed-off-by: Denys Vlasenko <email address hidden>

17709. By zhuyan <email address hidden>

ash: initialize basepf.buf in ash

When I planned to print the command in read_line_input, I found that after
the system started, the command printed for the first time was always
garbled.

After analysis, it is found that in the init() function of ash, the
variable basepf.buf is not initialized after applying for memory, resulting
in garbled initial data. Then assign it to the global variable
g_parsefile->buf in ash.c, and then pass g_parsefile->buf to the parameter
command of the function read_line_input in the function preadfd(), and
finally cause it to be garbled when the command is printed by
read_line_input.

The call stack is as follows:
 #0 read_line_input (st=0xb6fff220, prompt=0xb6ffc910 "\\[\\033[32m\\]\\h \\w\\[\\033[m\\] \\$ ", command=command@entry=0xb6ffc230 "P\325\377\266P\325\377\266", maxsize=maxsize@entry=1024) at libbb/lineedit.c:2461
 #1 0x0043ef8c in preadfd () at shell/ash.c:10812
 #2 preadbuffer () at shell/ash.c:10914
 #3 pgetc () at shell/ash.c:10997
 #4 0x00440c20 in pgetc_eatbnl () at shell/ash.c:11039
 #5 0x00440cbc in xxreadtoken () at shell/ash.c:13157
 #6 0x00440f40 in readtoken () at shell/ash.c:13268
 #7 0x00441234 in list (nlflag=nlflag@entry=1) at shell/ash.c:11782
 #8 0x004420e8 in parsecmd (interact=<optimized out>) at shell/ash.c:13344
 #9 0x00442c34 in cmdloop (top=top@entry=1) at shell/ash.c:13549
 #10 0x00444e4c in ash_main (argc=<optimized out>, argv=0x444e4c <ash_main+1328>) at shell/ash.c:14747
 #11 0x00407954 in run_applet_no_and_exit (applet_no=9, name=<optimized out>, argv=0xbefffd34) at libbb/appletlib.c:1024
 #12 0x00407b68 in run_applet_and_exit (name=0xbefffe56 "ash", argv=0x9) at libbb/appletlib.c:1047
 #13 0x00407f88 in main (argc=<optimized out>, argv=0xbefffd34) at libbb/appletlib.c:1181

Fixes: 82dd14a510ca ("ash: use CONFIG_FEATURE_EDITING_MAX_LEN")

Signed-off-by: zhuyan <email address hidden>
Signed-off-by: Denys Vlasenko <email address hidden>

17708. By Vda-linux

libbb: rename source files, no code changes

Signed-off-by: Denys Vlasenko <email address hidden>

17707. By Vda-linux

introduce and use exitcode_t

function old new delta
strings_main 422 420 -2
setfattr_main 175 173 -2
brctl_main 1548 1546 -2
makedevs_main 979 975 -4
rev_main 337 332 -5
getfattr_main 307 302 -5
cut_main 1201 1196 -5
cksum_main 398 393 -5
umount_main 573 565 -8
ln_main 516 508 -8
expand_main 660 652 -8
df_main 1068 1060 -8
renice_main 346 332 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/13 up/down: 0/-76) Total: -76 bytes

Signed-off-by: Denys Vlasenko <email address hidden>

17706. By Vda-linux

getfattr: fix "getfattr NOTEXIST" - now prints error msg

function old new delta
getfattr_main 309 307 -2
.rodata 105395 105391 -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6) Total: -6 bytes

Signed-off-by: Denys Vlasenko <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers

No subscribers.