gilles [Sat, 19 Apr 2014 17:04:42 +0000 (17:04 +0000)]
knf
gilles [Sat, 19 Apr 2014 17:03:42 +0000 (17:03 +0000)]
add a missing strlcpy() check in MAIL FROM's DSN parameters parsing, the
truncation would lead to a failure later in the code path but we can fail
earlier with a nice enhanced status code
jsing [Sat, 19 Apr 2014 17:03:41 +0000 (17:03 +0000)]
More KNF.
gilles [Sat, 19 Apr 2014 16:56:34 +0000 (16:56 +0000)]
(void) cast strlcpy() calls that cannot truncate (copies between buffers of
same size with a truncation check on the initial buffer)
gilles [Sat, 19 Apr 2014 16:55:15 +0000 (16:55 +0000)]
certs are looked up by hostname, the size of the buffer should use the
max hostname len, not max pathname len as before
gilles [Sat, 19 Apr 2014 16:52:20 +0000 (16:52 +0000)]
(void) cast a strlcpy() that cannot truncate because lka.c ensures the
reply will fit in the buffer before returning the answer
rpe [Sat, 19 Apr 2014 16:50:52 +0000 (16:50 +0000)]
Simplify things by using the return code of ask_yn() directly instead
of looking in resp. No need to specify 'no' as default answer. It's
the default for ask_yn() anyway.
OK krw@ halex@
jsing [Sat, 19 Apr 2014 16:50:47 +0000 (16:50 +0000)]
More KNF.
jmc [Sat, 19 Apr 2014 16:50:46 +0000 (16:50 +0000)]
tweak previous;
gilles [Sat, 19 Apr 2014 16:50:28 +0000 (16:50 +0000)]
(void) cast strlcpy() that cannot truncate, dns.c ensures the reply will
fit in the buffer before returning the answer
henning [Sat, 19 Apr 2014 16:49:13 +0000 (16:49 +0000)]
stop "advertising" disabling pmtud and window size increasing
very rarely if ever needed any more. we should not trick people into
thinking they are impoving sth doing so, it's rather the opposite
these days.
ok claudio
jmc [Sat, 19 Apr 2014 16:48:41 +0000 (16:48 +0000)]
need to escape %U, since it is used in Re/Rs blocks;
deraadt [Sat, 19 Apr 2014 16:48:06 +0000 (16:48 +0000)]
sync
jmc [Sat, 19 Apr 2014 16:46:32 +0000 (16:46 +0000)]
zap trailing whitespace;
deraadt [Sat, 19 Apr 2014 16:46:08 +0000 (16:46 +0000)]
remove the openssl_fdset wrapper, and a variety of VMS'ism's like
crazy (void *) casts all over the place
ok beck jsing
gilles [Sat, 19 Apr 2014 16:44:01 +0000 (16:44 +0000)]
(void) cast strlcpy() calls that cannot truncate or where the source data
has a length check right before the copy
jsing [Sat, 19 Apr 2014 16:42:26 +0000 (16:42 +0000)]
KNF.
deraadt [Sat, 19 Apr 2014 16:38:04 +0000 (16:38 +0000)]
Remove a gethostbyname() cache layer. The internet works better these
days. Initially fixed this, but Ted asked for it to die.
deraadt [Sat, 19 Apr 2014 16:31:51 +0000 (16:31 +0000)]
ReadFile() and GetStdHandle() are not very POSIX.
ok beck jsing
gilles [Sat, 19 Apr 2014 16:26:23 +0000 (16:26 +0000)]
(void) cast a snprintf() call that cannot truncate
logan [Sat, 19 Apr 2014 16:20:08 +0000 (16:20 +0000)]
Add missing description for IPv6 mtudisctimeout sysctl and
rework the wording for both IPv4 and IPv6.
OK from sthen@, henning@ and claudio@
mlarkin [Sat, 19 Apr 2014 16:19:07 +0000 (16:19 +0000)]
Dead stores in subr_hibernate.c
deraadt [Sat, 19 Apr 2014 16:18:22 +0000 (16:18 +0000)]
truncation check some snprintf calls (over-cautiously in case)
ok jsing beck
tedu [Sat, 19 Apr 2014 16:12:39 +0000 (16:12 +0000)]
can't actually do this. cause unknown.
henning [Sat, 19 Apr 2014 16:08:14 +0000 (16:08 +0000)]
bye bye
henning [Sat, 19 Apr 2014 16:07:09 +0000 (16:07 +0000)]
use "!received-on any" to absolutely ensure that we're not forwarding
carp, rpc or nfs traffic in the initial ruleset active during network
startup for a short time (or a much longer time if /etc/pf.conf is
screwed up). ok phessler
henning [Sat, 19 Apr 2014 16:02:17 +0000 (16:02 +0000)]
disgusting altq compat hack goes away
henning [Sat, 19 Apr 2014 16:01:36 +0000 (16:01 +0000)]
altq includes are gone
yes, we normally leave this for theo, but this triggered my final
"any altq bits left" check and I had to wait for a build anyway...
henning [Sat, 19 Apr 2014 15:58:56 +0000 (15:58 +0000)]
stop installing altq includes
henning [Sat, 19 Apr 2014 15:58:12 +0000 (15:58 +0000)]
now that if_snd is a proper ifqueue, this cast dies
henning [Sat, 19 Apr 2014 15:57:25 +0000 (15:57 +0000)]
ifnet's if_snd becomes a regular ifqueue instead of ifaltq, the need to
keep ifqueue and ifaltq in sync is gone and thus the comment obsolete,
and finally there is no more need to include if_altq.h either
henning [Sat, 19 Apr 2014 15:54:39 +0000 (15:54 +0000)]
minus altq tentacles, plus missing IF_DROP here as well
claudio [Sat, 19 Apr 2014 15:43:17 +0000 (15:43 +0000)]
Try to be clear why struct mrt_config nodes are allocated and
assigned to struct mrt pointers. I may need to rethink this later
but lets hope this does not confuse more people and analyzers.
beck [Sat, 19 Apr 2014 15:37:35 +0000 (15:37 +0000)]
Fix some serious pointer-arithmatic-magic-number-unchecked-return eyebleed
that I stumbled into here and got stuck with. If modern society can get past
selling daughters for cows, surely we can decide to write modern C code in
an "application" that is probably 3 lines of shell/python/cgi away from
talking to the internet in a lot of places.. (This file still needs a lot
more love though)
"oh god yuck" deraadt@
ok tedu@
jsing [Sat, 19 Apr 2014 15:30:17 +0000 (15:30 +0000)]
KNF.
deraadt [Sat, 19 Apr 2014 15:29:35 +0000 (15:29 +0000)]
sync
deraadt [Sat, 19 Apr 2014 15:27:10 +0000 (15:27 +0000)]
Repair some indent to be more KNF, and break instead of fallthrough to
default which does break
tedu [Sat, 19 Apr 2014 15:19:20 +0000 (15:19 +0000)]
one small tweak to avoid ever going off the end of a string.
tedu [Sat, 19 Apr 2014 15:17:59 +0000 (15:17 +0000)]
improved checking for invalid hashes. from solar designer
tedu [Sat, 19 Apr 2014 14:58:50 +0000 (14:58 +0000)]
Once great men lived here... giants... gods... once, but long ago.
tedu [Sat, 19 Apr 2014 14:56:17 +0000 (14:56 +0000)]
the valkyries have come for rsh as well
tedu [Sat, 19 Apr 2014 14:53:48 +0000 (14:53 +0000)]
Delete futile calls to RAND_seed. ok djm
henning [Sat, 19 Apr 2014 14:47:51 +0000 (14:47 +0000)]
sigh, another driver fiddling with altq outside #ifdef ALTQ
henning [Sat, 19 Apr 2014 14:39:26 +0000 (14:39 +0000)]
kill altq bits here as well
gilles [Sat, 19 Apr 2014 14:37:45 +0000 (14:37 +0000)]
(void) cast strlcpy() call that uses truncation as part of its parsing
logic to extract at most sizeof buf - 1 bytes from source
jsing [Sat, 19 Apr 2014 14:36:35 +0000 (14:36 +0000)]
More KNF.
gilles [Sat, 19 Apr 2014 14:32:03 +0000 (14:32 +0000)]
(void) cast a strlcpy that cannot truncate
gilles [Sat, 19 Apr 2014 14:27:29 +0000 (14:27 +0000)]
(void) cast strlcpy/strlcat/snprintf calls that cannot truncate
henning [Sat, 19 Apr 2014 14:22:32 +0000 (14:22 +0000)]
remove altq bits here, too
(i was convinced i committed that yesterday already, hrm)
gilles [Sat, 19 Apr 2014 14:21:26 +0000 (14:21 +0000)]
(void) cast strlcpy() calls that cannot truncate
gilles [Sat, 19 Apr 2014 14:19:17 +0000 (14:19 +0000)]
(void) cast strlcat() and snprintf() that cannot truncate
be a bit more strict with an strlcat() truncation by causing it to fail in
table_create() instead of later in parse.y - in both cases, this would
cause smtpd to fatal() at startup if a table has a config file too large
gilles [Sat, 19 Apr 2014 14:11:55 +0000 (14:11 +0000)]
(void) cast strlcpy() calls that cannot truncate
gilles [Sat, 19 Apr 2014 14:09:19 +0000 (14:09 +0000)]
(void) cast a snprintf() call that can't possibly truncate unless we
suddenly supported a cipher with a name that's > 200 bytes long ...
... in which case harmless truncation would occur and we'd have to
readjust our buffer
florian [Sat, 19 Apr 2014 14:06:10 +0000 (14:06 +0000)]
Fix display of destination IP when host is an IP address.
Pointed out by and OK benno@
gilles [Sat, 19 Apr 2014 14:00:45 +0000 (14:00 +0000)]
(void) cast snprintf calls that cannot truncate
gilles [Sat, 19 Apr 2014 13:57:17 +0000 (13:57 +0000)]
(void) cast a strlcpy() that cannot truncate
(void) cast a few snprintf()/strlcat() that cannot truncate and that would
be harmless if they could
gilles [Sat, 19 Apr 2014 13:52:49 +0000 (13:52 +0000)]
(cast) void two strlcpy() and a snprintf() that cannot truncate
gilles [Sat, 19 Apr 2014 13:51:24 +0000 (13:51 +0000)]
(void) cast strlcpy/strlcat/snprintf calls that cannot truncate (and would
be harmless in this case if they could)
deraadt [Sat, 19 Apr 2014 13:51:05 +0000 (13:51 +0000)]
kill a stray \
gilles [Sat, 19 Apr 2014 13:48:57 +0000 (13:48 +0000)]
(void) cast strlcpy/strlcat/snprintf that cannot truncate
gilles [Sat, 19 Apr 2014 13:40:24 +0000 (13:40 +0000)]
(void) cast strlcpy() and snprintf() that cannot truncate
gilles [Sat, 19 Apr 2014 13:35:51 +0000 (13:35 +0000)]
(void) cast snprintf() and strlcat() calls that cannot truncate
gilles [Sat, 19 Apr 2014 13:32:07 +0000 (13:32 +0000)]
(void) cast strlcpy() / strlcat() / snprintf() that cannot truncate
(void) cast a few calls that are ok to truncate because they are not used
in anything critical / unsafe, but just to make some debug/info logs a bit
more informative
guenther [Sat, 19 Apr 2014 13:31:24 +0000 (13:31 +0000)]
Lacking a proof that--for this implementation--exposure of Montgomery
multiplication or RSA blinding parameters doesn't permit retroactive
timing analysis of the secrets, we'll do the stupidly cheap thing and
cleanse them before freeing them.
ok deraadt@
jsing [Sat, 19 Apr 2014 13:29:11 +0000 (13:29 +0000)]
More KNF.
gilles [Sat, 19 Apr 2014 13:18:14 +0000 (13:18 +0000)]
(void) cast some strlcat() calls that cannot truncate
add a few fatalx() calls at places where it shouldn't fail, we'll assess
which one may be relaxed later as this code is not finished nor plugged
yet.
deraadt [Sat, 19 Apr 2014 13:13:01 +0000 (13:13 +0000)]
Remove hacky workaround for Cray T3E.
ok guenther
jsing [Sat, 19 Apr 2014 13:11:41 +0000 (13:11 +0000)]
More KNF.
deraadt [Sat, 19 Apr 2014 13:09:11 +0000 (13:09 +0000)]
oops, typo got into change
gilles [Sat, 19 Apr 2014 13:07:56 +0000 (13:07 +0000)]
add missing checks to strlcpy() when copying envelope "destination" buffer
to the mda delivery buffer. we should never hit these unless we mistakenly
change the value of a define, better be safe than sorry.
(void) cast strlcpy/strlcat that cannot truncate or that we know and want
to truncate rather than lose (informative data not used by smtpd but
intended to help the human reading the log)
henning [Sat, 19 Apr 2014 12:59:53 +0000 (12:59 +0000)]
shrink pf by 445 lines.
while there, get rid of the altq ioctls and assciated now obsolete code
gilles [Sat, 19 Apr 2014 12:55:23 +0000 (12:55 +0000)]
when receiving mail for user+tag@ and maildir is setup, we create a .tag
subdirectory in the maildir, add missing check to strlcat() so that if path
with .tag exceeds SMTPD_MAXPATHLEN we fail instead of creating a .tag dir
that's truncated.
(void) cast strlcpy()/strlcat() that cannot truncate
jsing [Sat, 19 Apr 2014 12:51:01 +0000 (12:51 +0000)]
More KNF.
gilles [Sat, 19 Apr 2014 12:48:54 +0000 (12:48 +0000)]
(void) cast strlcat(), they can't truncate
gilles [Sat, 19 Apr 2014 12:43:19 +0000 (12:43 +0000)]
unchecked strlcat() call in expand_to_text() may cause aliases expansion to
fail later, make it fail early.
(void) cast other calls, they are detected and handled correctly later
logan [Sat, 19 Apr 2014 12:42:50 +0000 (12:42 +0000)]
Add missing man page descriptions for the following IPv6 sysctls:
-maxdynroutes
-maxifprefixes
-maxifdefrouters
-neighborgcthresh
OK from sthen@, claudio@ and henning@
deraadt [Sat, 19 Apr 2014 12:36:03 +0000 (12:36 +0000)]
malloc + strlcpy -> strdup
gilles [Sat, 19 Apr 2014 12:30:54 +0000 (12:30 +0000)]
(void) cast strlcpy(), it cannot truncate
(void) cast strlcat(), they are detected and handled later
henning [Sat, 19 Apr 2014 12:27:59 +0000 (12:27 +0000)]
remove the altq enable/attach and disable/detach bits
henning [Sat, 19 Apr 2014 12:27:06 +0000 (12:27 +0000)]
bye bye altq bits
gilles [Sat, 19 Apr 2014 12:26:15 +0000 (12:26 +0000)]
(void) cast this strlcpy(), it cannot truncate
henning [Sat, 19 Apr 2014 12:25:03 +0000 (12:25 +0000)]
another questionable "optimization": de used tulip_ifstart_one instead
of tulip_ifstart if the sendqueue was empty, but only if altq wasn't
compiled in (i. e., that's a _compile time_ decision and not based on
wether altq was actually used).
just use tulip_ifstart all the time, as before in our regular kernels.
kill tulip_ifstart_one completely.
makes sense to sthen
deraadt [Sat, 19 Apr 2014 12:22:37 +0000 (12:22 +0000)]
unifdef ENOTDIR, everyone has it
henning [Sat, 19 Apr 2014 12:18:35 +0000 (12:18 +0000)]
remove very questionable altq "optimization" - claudio and I can't
convince ourselves that that was right to begin with. anyway, begone.
henning [Sat, 19 Apr 2014 12:12:02 +0000 (12:12 +0000)]
all I wanted to do is removing the altq special casing, but then it turned
out the entire codepath is unreachable. glad I'm not our ppp maintainer, he
has work to do.
kill that unreachable code, with & ok claudio
henning [Sat, 19 Apr 2014 12:08:10 +0000 (12:08 +0000)]
remove altq special casing.
big WTF regarding the fastq use there while verifying w/ claudio, but
that's for the ppp maintainer and unrelated
kettenis [Sat, 19 Apr 2014 11:53:42 +0000 (11:53 +0000)]
Don't panic if we're trying to disestablish an MSI but the hardware is gone.
tested by & ok mlarkin@
guenther [Sat, 19 Apr 2014 11:43:07 +0000 (11:43 +0000)]
We'll interpret a (void) cast on snprintf() to mean it's been verified that
truncation is either desirable, not an issue, or is detected and handled later
ok deraadt@
gilles [Sat, 19 Apr 2014 11:41:49 +0000 (11:41 +0000)]
these strlcpy can't truncate, the copy is from a buffer to a buffer of same
size and the first buffer handles the truncation already
henning [Sat, 19 Apr 2014 11:38:13 +0000 (11:38 +0000)]
bye bye
gilles [Sat, 19 Apr 2014 11:31:06 +0000 (11:31 +0000)]
cast (void) this strlcpy(), it can't fail copying a small constant string
into a much larger buffer
deraadt [Sat, 19 Apr 2014 11:30:40 +0000 (11:30 +0000)]
Use somewhat harsher language and better examples; demonstrate that
non-dangerous use functions is difficult.
ok guenther
gilles [Sat, 19 Apr 2014 11:29:06 +0000 (11:29 +0000)]
when copying socket path, check that we didnt truncate it which would cause
the following connect() to fail.
henning [Sat, 19 Apr 2014 11:26:10 +0000 (11:26 +0000)]
the altq versions of the IFQ_* macros can finally go. chances of this
file becoming readable increase.
deraadt [Sat, 19 Apr 2014 11:21:15 +0000 (11:21 +0000)]
Demonstrate correct usage of snprintf (regarding overflow detection)
ok guenther
guenther [Sat, 19 Apr 2014 11:18:01 +0000 (11:18 +0000)]
Split inet(3) into three pages by decade: 1980s -> inet_lnaof(3),
1990s -> inet_addr(3), 2000s and beyond -> inet_ntop(3).
ok tedu@ (who also noted the timeline) deraadt@ jmc@
gilles [Sat, 19 Apr 2014 11:17:14 +0000 (11:17 +0000)]
it's ok for strlcpy to fail here though it can't, cast void
deraadt [Sat, 19 Apr 2014 11:15:37 +0000 (11:15 +0000)]
egd is gone
henning [Sat, 19 Apr 2014 11:01:37 +0000 (11:01 +0000)]
/*
* altq for loop is just for debugging.
* only used when called for loop interface (not for
* a simplex interface).
*/
bye bye!
guenther [Sat, 19 Apr 2014 10:59:54 +0000 (10:59 +0000)]
The internal ssl2_* functions and variables are gone