freebsd-skq/usr.bin
emaste 59381119a4 bspatch: add sanity checks on sizes to avoid integer overflow
Note that this introduces an explicit 2GB limit, but this was already
implicit in variable and function argument types.

This is based on the "non-cryptanalytic attacks against freebsd
update components" anonymous gist. Further refinement is planned.

Reviewed by:	allanjude, cem, kib
Obtained from:	anonymous gist
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7619
2016-09-06 19:00:37 +00:00
..
addr2line elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
alias
apply Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
ar ar: enable reproducible output by default when invoked as 'ar -s' 2016-06-16 21:22:26 +00:00
asa
at Use nitems() from sys/param.h 2016-07-30 06:32:18 +00:00
atm
awk WITH_META_MODE: Fix rebuilding maketab outside of build-tools. 2016-06-14 16:20:05 +00:00
banner
basename Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
bc DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
biff
bluetooth Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
bmake Merge bmake-20160606 2016-06-08 17:51:21 +00:00
brandelf Use standard 'THE AUTHOR' license text 2015-07-31 16:45:42 +00:00
bsdcat DIRDEPS_BUILD: Add some missing dirctories to the build. 2016-08-31 19:30:59 +00:00
bsdiff bspatch: add sanity checks on sizes to avoid integer overflow 2016-09-06 19:00:37 +00:00
bzip2
bzip2recover
c89
c99 Don't claim c99 is a wrapper around gcc; it's a wrapper around the system cc. 2015-07-13 14:13:15 +00:00
caesar Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
calendar Fix TAB replaced with spaces in prev. commit. 2016-08-18 10:18:11 +00:00
cap_mkdb Remove O_SYNC from the options passed to dbmopen(). 2016-02-19 08:42:13 +00:00
catman Instead of ignoring the EEXIST from link(), unconditionally unlink 2016-05-13 05:49:02 +00:00
chat Fix off by one error that overflowed the rep_len array when doing 2016-05-16 19:48:02 +00:00
checknr Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
chkey
chpass Restore the 'beforeinstall' for chpass(1), so files with the 2016-01-28 02:56:30 +00:00
cksum
clang Add clang-format under WITH_CLANG_EXTRAS. 2016-06-17 16:46:58 +00:00
cmp Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
col Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
colcrt
colldef Note that mklocale(1) and colldef(1) are no longer used 2016-04-17 23:02:49 +00:00
colrm
column Fix type mismatches for malloc(3) and Co. 2015-12-29 11:24:41 +00:00
comm Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
compile_et DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
compress
cpio MFV r302003,r302037,r302038,r302056: 2016-06-22 07:49:59 +00:00
cpuset Fix markup for -j in cpuset(1) synopsis 2016-07-29 21:18:20 +00:00
csplit Rename getline with get_line to avoid collision with getline(3) 2016-05-10 11:11:23 +00:00
ctags Rename getline with get_line to avoid collision with getline(3) 2016-05-10 11:11:23 +00:00
ctlstat Bunch of improvements to ctlstat. 2015-09-21 09:37:49 +00:00
cut Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
cxxfilt elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
dc
dirname Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
dpv Bump copyright 2016-01-27 00:03:43 +00:00
drill META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
dtc Improvements to BSD-licensed DTC. 2015-12-29 16:29:42 +00:00
du
ee Create ee(1) package. 2016-02-02 21:04:33 +00:00
elf2aout
elfcopy Use the in-tree sys/elf_common.h 2016-06-05 23:34:19 +00:00
elfdump elfdump: handle STT_SPARC_REGISTER 2016-01-25 04:22:01 +00:00
enigma
env
expand
factor Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
false
fetch Add phttpget(8) .Xr to fetch(1). 2016-03-29 11:56:00 +00:00
file
file2c Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
find Use NULL instead of 0 for pointers. 2016-04-18 07:05:18 +00:00
finger Use NULL instead of 0 for pointers. 2016-04-18 14:44:01 +00:00
fmt fmt(1): for pointers use NULL instead of 0 2016-04-13 01:57:06 +00:00
fold
fortune Avoid buffer overflow when copying the input file name and appending .dat. 2016-05-26 01:33:24 +00:00
from
fstat
fsync
ftp
gcore Mirror r303120 to gcore 2016-07-21 00:53:14 +00:00
gencat Rename getline with get_line to avoid collision with getline(3) 2016-05-10 11:12:31 +00:00
getconf Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs 2016-08-25 17:07:43 +00:00
getent Document getent(1)'s ability to enumerate netgroup members. 2016-06-04 21:34:06 +00:00
getopt use : instead of true... 2015-08-01 17:27:47 +00:00
gprof Use NULL instead of 0 for pointers. 2016-05-16 01:11:02 +00:00
grdc Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
grep Fix a segfault in bsdgrep when parsing the invalid extended regexps "?" 2016-08-02 20:25:22 +00:00
gzip Use printable ASCII instead of octal representation. 2016-08-27 00:56:37 +00:00
head
hesinfo
hexdump Fix a bug that caused nothing to be skipped when skipping exactly the 2016-02-14 14:23:56 +00:00
host
iconv META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
id
ident Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
indent indent(1): have the memset invocation somewhat more canonical. 2016-08-23 15:49:31 +00:00
ipcrm Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
ipcs Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
iscsictl Make the iSCSI parameter negotiation more flexible. 2016-08-25 05:22:53 +00:00
join Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
jot Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
kdump Remove unused prototypes. 2016-08-12 07:52:13 +00:00
keylogin
keylogout
killall
ktrace Add a cross reference to ktrace(2). 2016-03-31 23:57:03 +00:00
ktrdump Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
lam
last Unbreak "last reboot". 2015-07-21 10:52:05 +00:00
lastcomm Fix .../usr.bin/lastcomm/legacy_test:main on i386 2016-07-03 17:52:21 +00:00
ldd Increase size of argv[] array to avoid running off the end. 2016-05-16 16:01:46 +00:00
leave
less - Add support for zip to lesspipe.sh 2016-01-15 23:13:01 +00:00
lessecho
lesskey
lex Use NULL instead of 0 for pointers. 2016-04-19 02:05:32 +00:00
limits Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
locale Use nitems() from sys/param.h. 2016-07-30 07:04:46 +00:00
localedef - Invert calloc(3) argument order. 2016-09-01 15:23:33 +00:00
locate Fix type mismatches for malloc(3) and Co. 2015-12-29 11:24:41 +00:00
lock
lockf
logger
login Use NULL instead of 0. 2016-04-18 05:26:32 +00:00
logins
logname
look Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
lorder lorder: produce locale-independent symbol ordering 2016-07-07 20:50:59 +00:00
lsvfs
lzmainfo
m4 Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
mail mail(1): Minor declaration updates. 2016-07-15 20:27:21 +00:00
makewhatis Fix installation of makewhatis.local(1) since r283777. 2016-02-18 00:26:21 +00:00
man Restore man -t for manpages rendered by mandoc 2015-09-19 16:00:50 +00:00
mandoc Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
mesg
minigzip
ministat Compute the median of the data set as the midpoint between the two middle 2015-11-24 02:30:59 +00:00
mkcsmapper Revert the change from errx/strerror to errc to appease gcc 4.2 2016-07-09 06:52:55 +00:00
mkcsmapper_static META_MODE: Don't rebuild build-tools targets during normal build. 2016-04-14 21:06:10 +00:00
mkdep Replace gcc reference with 'cc' and document the default ${CC}. 2015-10-24 05:16:30 +00:00
mkesdb DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
mkesdb_static META_MODE: Don't rebuild build-tools targets during normal build. 2016-04-14 21:06:10 +00:00
mkfifo
mkimg mkimg(1): minor cleanups with argument order in calloc(3). 2016-07-12 15:46:53 +00:00
mklocale Use strlcpy() instead of strncpy() when copying the encoding value 2016-05-12 08:41:22 +00:00
mkstr
mktemp
mkuzip DIRDEPS_BUILD: Update dependencies. 2016-05-04 03:14:34 +00:00
morse Final step of eliminating the "games" distribution: Merge src/games 2015-10-02 10:08:11 +00:00
msgs Use strlcpy() instead of strncpy() when copying date and subj 2016-05-12 08:55:57 +00:00
mt Add the density code for LTO-7 to libmt and the mt(1) man page. 2016-05-20 19:30:52 +00:00
nc
ncal swprintf() and apparently wcsftime() want the their output buffer size 2016-05-17 05:05:30 +00:00
netstat Fix build without INET6 and with gcc. A function definition was ifdefed 2016-08-27 11:06:06 +00:00
newgrp Remove useless calls to basename(). 2016-05-01 08:22:11 +00:00
newkey Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted 2016-08-30 19:02:15 +00:00
nfsstat DIRDEPS_BUILD: Update dependencies. 2016-08-31 19:30:46 +00:00
nice
nl Remove another occurence of _WITH_GETLINE 2016-07-31 19:02:19 +00:00
nm elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
nohup
numactl Don't repeat the the word 'the' 2016-05-17 12:52:31 +00:00
number Final step of eliminating the "games" distribution: Merge src/games 2015-10-02 10:08:11 +00:00
opieinfo
opiekey
opiepasswd
pagesize
pamtest META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
passwd Restore the 'beforeinstall' for chpass(1), so files with the 2016-01-28 02:56:30 +00:00
paste
patch Adjust a type from r267490. 2016-04-24 04:28:04 +00:00
pathchk Add -P to pathchk usage 2016-07-09 04:56:28 +00:00
perror
pom Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
pr Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
primes Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
printenv
printf Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
procstat Use nitems() from sys/param.h. 2016-07-30 07:15:54 +00:00
protect META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
quota Use MIN() macro from sys/param.h. 2016-04-27 02:13:57 +00:00
random Fix a (false positive?) Argument cannot be negative coverity defect. 2016-06-08 02:14:05 +00:00
rctl Add four new RCTL resources - readbps, readiops, writebps and writeiops, 2016-04-07 04:23:25 +00:00
readelf elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
renice
resizewin Make resizewin.1 manpage use .Fx macro 2016-07-29 21:05:17 +00:00
rev
revoke
rlogin Create a rcmds package. 2016-01-21 17:33:31 +00:00
rpcgen Use nitems() from sys/param.h. 2016-08-16 15:53:05 +00:00
rpcinfo Simplify some overly complex code so that both humans and Coverity 2016-05-13 00:50:53 +00:00
rs Rename getline with get_line to avoid collision with getline(3) 2016-05-10 11:17:36 +00:00
rsh Create a rcmds package. 2016-01-21 17:33:31 +00:00
rup
ruptime Create a rcmds package. 2016-01-21 17:33:31 +00:00
rusers
rwall
rwho Create a rcmds package. 2016-01-21 17:33:31 +00:00
script Directly set the O_CLOEXEC flags via the open(2) attributes 2016-04-16 12:47:23 +00:00
sdiff DIRDEPS_BUILD: Add some missing dirctories to the build. 2016-08-31 19:30:59 +00:00
sed sed(1): Revert r303047 "cleanup" and therefore r303572. 2016-08-02 15:35:53 +00:00
send-pr META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
seq
setchannel META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
shar
showmount Cleanup unnecessary semicolons from utilities we all love. 2016-04-15 22:31:22 +00:00
size elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
smbutil META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
sockstat This patch fixes two bugs: 2016-06-25 12:46:18 +00:00
soelim Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
sort Cleanup unnecessary semicolons from utilities we all love. 2016-04-15 22:31:22 +00:00
split
ssh-copy-id
stat Use MIN() instead of MAX() as the previous syntax was wrote in a weird and 2016-04-26 00:29:00 +00:00
stdbuf
strings elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree 2016-04-21 12:58:29 +00:00
su
svn Update from subversion 1.9.2 to 1.9.4. 2016-04-30 10:35:42 +00:00
systat Use nitems() from sys/param.h. 2016-08-16 15:52:10 +00:00
tabs
tail
talk User NULL instead of 0 for pointers. 2016-04-18 07:14:01 +00:00
tar DIRDEPS_BUILD: Update dependencies. 2016-08-31 19:30:46 +00:00
tcopy
tee
telnet
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
tftp Use MIN() macro from sys/param.h. 2016-04-27 02:34:25 +00:00
time
timeout Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
tip Don't hide build commands. 2015-09-18 21:01:52 +00:00
top Add a toggle to display the approximate amount of swap used by each 2016-09-05 08:27:04 +00:00
touch
tput
tr Optimize [Cc]flag case: don't repeatedly add the last character of 2016-07-14 09:26:53 +00:00
true
truncate Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
truss Import the new automatically generated system call table for CloudABI. 2016-08-19 17:49:35 +00:00
tset
tsort
tty tty: Use proper definition of exit status code and stdin macro 2016-08-16 14:15:09 +00:00
ul Do not truncate lines longer than 512 chars. 2016-07-11 08:05:46 +00:00
uname
unexpand
unifdef Avoid -Wmissing-initializer 2015-12-03 14:32:54 +00:00
uniq Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
units Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
unvis
unzip - Match directory extraction message with Infozip [1] 2016-01-15 23:04:36 +00:00
usbhidaction Store PID after becoming a daemon() and not before to ensure the 2015-09-28 07:23:05 +00:00
usbhidctl
users
uudecode Rename getline with get_line to avoid collision with getline(3) 2016-05-10 11:12:31 +00:00
uuencode Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
vacation DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
vgrind Remove disconnected directory RETEST. 2015-12-04 05:00:51 +00:00
vi DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools. 2016-05-09 22:21:09 +00:00
vis
vmstat Use MIN() macro from sys/param.h. 2016-04-22 03:46:57 +00:00
vtfontcvt vtfontcvt: support .hex fonts with characters beyond the Unicode BMP 2016-03-15 21:32:46 +00:00
w When -n is specified, don't make bogus DNS queries. Instead, 2016-09-02 18:28:14 +00:00
wall Revert r286144 leaving the original fix to the buffer overflow. 2015-08-04 02:56:31 +00:00
wc Add more text to explain --libxo flag. 2015-12-01 19:18:53 +00:00
what
whereis usr.bin: minor spelling fixes on comments. 2016-05-01 16:13:05 +00:00
which
who
whois Send whois queries for gov.uk names to JANET. 2016-05-25 13:09:06 +00:00
write
xargs Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
xinstall DIRDEPS_BUILD: Add some missing dirctories to the build. 2016-08-31 19:30:59 +00:00
xlint Fix with external GCC after r300886. 2016-05-29 01:15:15 +00:00
xo Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
xstr Cleanup unnecessary semicolons from utilities we all love. 2016-04-15 22:31:22 +00:00
xz
xzdec
yacc Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
yes
ypcat Rename YP to NIS in the manpages. 2015-09-03 07:18:52 +00:00
ypmatch Rename YP to NIS in the manpages. 2015-09-03 07:18:52 +00:00
ypwhich Rename YP to NIS in the manpages. 2015-09-03 07:18:52 +00:00
Makefile users: don't build when we don't have a C++ toolchain 2016-08-31 21:12:50 +00:00
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.inc
Makefile.powerpc
Makefile.sparc64