Commit Graph

8709 Commits

Author SHA1 Message Date
Damien Miller
775f8a23f2 tighten PAM monitor calls
only allow kbd-interactive ones when that authentication method is
enabled. Prompted by Solar Designer
2016-08-31 10:48:07 +10:00
djm@openbsd.org
7fd0ea8a1d upstream commit
restrict monitor auth calls to be allowed only when their
respective authentication methods are enabled in the configuration.

prompted by Solar Designer; ok markus dtucker

Upstream-ID: 6eb3f89332b3546d41d6dbf5a8e6ff920142b553
2016-08-31 10:37:09 +10:00
Damien Miller
b38b95f5bc Tighten monitor state-machine flow for PAM calls
(attack surface reduction)
2016-08-29 11:49:16 +10:00
djm@openbsd.org
dc664d1bd0 upstream commit
fix uninitialised optlen in getsockopt() call; harmless
on Unix/BSD but potentially crashy on Cygwin. Reported by James Slepicka ok
deraadt@

Upstream-ID: 1987ccee508ba5b18f016c85100d7ac3f70ff965
2016-08-29 11:20:45 +10:00
guenther@openbsd.org
5bcc1e2769 upstream commit
Pull in <sys/time.h> for struct timeval

ok deraadt@

Upstream-ID: ae34525485a173bccd61ac8eefeb91c57e3b7df6
2016-08-29 11:20:28 +10:00
guenther@openbsd.org
fa4a4c96b1 upstream commit
Pull in <stdlib.h> for NULL

ok deraadt@

Upstream-ID: 7baa6a0f1e049bb3682522b4b95a26c866bfc043
2016-08-29 11:20:28 +10:00
djm@openbsd.org
ae363d74cc upstream commit
add a sIgnore opcode that silently ignores options and
use it to suppress noisy deprecation warnings for the Protocol directive.

req henning, ok markus

Upstream-ID: 9fe040aca3d6ff393f6f7e60045cdd821dc4cbe0
2016-08-29 11:20:28 +10:00
djm@openbsd.org
a94c603066 upstream commit
remove superfluous NOTREACHED comment

Upstream-ID: a7485c1f1be618e8c9e38fd9be46c13b2d03b90c
2016-08-29 11:20:28 +10:00
otto@openbsd.org
fc041c4714 upstream commit
fix previous, a condition was modified incorrectly; ok
markus@ deraadt@

Upstream-ID: c443e339768e7ed396dff3bb55f693e7d3641453
2016-08-29 11:20:28 +10:00
djm@openbsd.org
23555eb13a upstream commit
downgrade an error() to a debug2() to match similar cases
in addr_match_list()

Upstream-ID: 07c3d53e357214153d9d08f234411e0d1a3d6f5c
2016-08-29 11:17:08 +10:00
djm@openbsd.org
a39627134f upstream commit
remove Protocol directive from client/server configs that
causes spammy deprecation warnings

hardcode SSH_PROTOCOLS=2, since that's all we support on the server
now (the client still may support both, so it could get confused)

Upstream-Regress-ID: c16662c631af51633f9fd06aca552a70535de181
2016-08-23 16:38:10 +10:00
Damien Miller
6ee4f1c01e hook match and utf8 unittests up to Makefile 2016-08-23 16:33:48 +10:00
djm@openbsd.org
114efe2bc0 upstream commit
add tests for matching functions

Upstream-Regress-ID: 0869d4f5c5d627c583c6a929d69c17d5dd65882c
2016-08-23 15:18:57 +10:00
Damien Miller
857568d2ac removing UseLogin bits from configure.ac 2016-08-23 14:32:37 +10:00
djm@openbsd.org
cc182d01ce upstream commit
fix negated address matching where the address list
consists of a single negated match, e.g. "Match addr !192.20.0.1"

Report and patch from Jakub Jelen. bz#2397 ok dtucker@

Upstream-ID: 01dcac3f3e6ca47518cf293e31c73597a4bb40d8
2016-08-23 14:29:08 +10:00
djm@openbsd.org
4067ec8a4c upstream commit
fix matching for pattern lists that contain a single
negated match, e.g. "Host !example"

report and patch from Robin Becker. bz#1918 ok dtucker@

Upstream-ID: 05a0cb323ea4bc20e98db099b42c067bfb9ea1ea
2016-08-23 14:29:07 +10:00
djm@openbsd.org
83b581862a upstream commit
remove UseLogin option and support for having /bin/login
manage login sessions; ok deraadt markus dtucker

Upstream-ID: bea7213fbf158efab7e602d9d844fba4837d2712
2016-08-23 14:29:07 +10:00
naddy@openbsd.org
ffe6549c2f upstream commit
Catch up with the SSH1 code removal and delete all
mention of protocol 1 particularities, key files and formats, command line
options, and configuration keywords from the server documentation and
examples.  ok jmc@

Upstream-ID: 850328854675b4b6a0d4a90f0b4a9dd9ca4e905f
2016-08-23 13:28:30 +10:00
naddy@openbsd.org
c38ea63489 upstream commit
Remove more SSH1 server code: * Drop sshd's -k option. *
Retire configuration keywords that only apply to protocol 1, as well as   the
"protocol" keyword. * Remove some related vestiges of protocol 1 support.

ok markus@

Upstream-ID: 9402f82886de917779db12f8ee3f03d4decc244d
2016-08-23 13:28:30 +10:00
Darren Tucker
33ba55d9e3 Only check for prctl once. 2016-08-17 16:26:04 +10:00
Darren Tucker
976ba8a8fd Fix typo. 2016-08-17 15:33:10 +10:00
Darren Tucker
9abf84c25f Correct LDFLAGS for clang example.
--with-ldflags isn't used until after the -ftrapv test, so mention
LDFLAGS instead for now.
2016-08-17 14:25:43 +10:00
Darren Tucker
1e8013a17f Remove obsolete CVS $Id from source files.
Since -portable switched to git the CVS $Id tags are no longer being
updated and are becoming increasingly misleading.  Remove them.
2016-08-17 14:08:42 +10:00
Darren Tucker
adab758242 Remove now-obsolete CVS $Id tags from text files.
Since -portable switched to git, the CVS $Id tags are no longer being
updated and are becoming increasingly misleading.  Remove them.
2016-08-17 13:40:58 +10:00
Darren Tucker
560c006854 Add a section for compiler specifics.
Add a section for compiler specifics and document the runtime requirements
for clang's integer sanitization.
2016-08-17 13:38:30 +10:00
Darren Tucker
a8fc0f42e1 Test multiplying two long long ints.
When using clang with -ftrapv or -sanitize=integer the tests would pass
but linking would fail with "undefined reference to __mulodi4".
Explicitly test for this before enabling -trapv.
2016-08-17 13:35:43 +10:00
Damien Miller
a1cc637e7e add a --with-login-program configure argument
Saves messing around with LOGIN_PROGRAM env var, which come
packaging environments make hard to do during configure phase.
2016-08-16 14:47:34 +10:00
Damien Miller
8bd81e1596 add --with-pam-service to specify PAM service name
Saves messing around with CFLAGS to do it.
2016-08-16 13:37:26 +10:00
Damien Miller
74433a19bb fix false positives when compiled with msan
Our explicit_bzero successfully confused clang -fsanitize-memory
in to thinking that memset is never called to initialise memory.
Ensure that it is called in a way that the compiler recognises.
2016-08-16 13:37:26 +10:00
markus@openbsd.org
6cb6dcffe1 upstream commit
remove ssh1 server code; ok djm@

Upstream-ID: c24c0c32c49b91740d5a94ae914fb1898ea5f534
2016-08-14 11:19:14 +10:00
jca@openbsd.org
42d47adc5a upstream commit
Use 2001:db8::/32, the official IPv6 subnet for
configuration examples.

This makes the IPv6 example consistent with IPv4, and removes a dubious
mention of a 6bone subnet.

ok sthen@ millert@

Upstream-ID: b027f3d0e0073419a132fd1bf002e8089b233634
2016-08-14 11:19:14 +10:00
dtucker@openbsd.org
b61f53c0c3 upstream commit
Update moduli file.

Upstream-ID: 6da9a37f74aef9f9cc639004345ad893cad582d8
2016-08-14 11:19:14 +10:00
Darren Tucker
f217d9bd42 Import updated moduli. 2016-08-11 11:42:48 +10:00
dtucker@openbsd.org
67dca60fbb upstream commit
Improve error message for overlong ControlPath.  ok markus@
djm@

Upstream-ID: aed374e2e88dd3eb41390003e5303d0089861eb5
2016-08-09 09:33:23 +10:00
djm@openbsd.org
4706c1d8c1 upstream commit
small refactor of cipher.c: make ciphercontext opaque to
callers feedback and ok markus@

Upstream-ID: 094849f8be68c3bdad2c0f3dee551ecf7be87f6f
2016-08-09 09:06:52 +10:00
dtucker@openbsd.org
e600348a7a upstream commit
Fix bug introduced in rev 1.467 which causes
"buffer_get_bignum_ret: incomplete message" errors when built with WITH_SSH1
and run such that no Protocol 1 ephemeral host key is generated (eg "Protocol
2", no SSH1 host key supplied).  Reported by rainer.laatsch at t-online.de,
ok deraadt@

Upstream-ID: aa6b132da5c325523aed7989cc5a320497c919dc
2016-08-03 15:39:28 +10:00
djm@openbsd.org
d7e7348e72 upstream commit
better bounds check on iovcnt (we only ever use fixed,
positive values)

Upstream-ID: 9baa6eb5cd6e30c9dc7398e5fe853721a3a5bdee
2016-08-03 15:38:43 +10:00
Darren Tucker
5faa52d295 Use tabs consistently inside "case $host". 2016-08-02 15:22:40 +10:00
Darren Tucker
20e5e8ba9c Explicitly test for broken strnvis.
NetBSD added an strnvis and unfortunately made it incompatible with the
existing one in OpenBSD and Linux's libbsd (the former having existed
for over ten years). Despite this incompatibility being reported during
development (see http://gnats.netbsd.org/44977) they still shipped it.
Even more unfortunately FreeBSD and later MacOS picked up this incompatible
implementation.  Try to detect this mess, and assume the only safe option
if we're cross compiling.

OpenBSD 2.9 (2001): strnvis(char *dst, const char *src, size_t dlen, int flag);
NetBSD 6.0 (2012):  strnvis(char *dst, size_t dlen, const char *src, int flag);

ok djm@
2016-08-02 12:16:34 +10:00
Damien Miller
b0b48beab1 update recommended autoconf version 2016-08-02 11:06:23 +10:00
Damien Miller
23902e31df update config.guess and config.sub to current
upstream commit 562f3512b3911ba0c77a7f68214881d1f241f46e
2016-08-02 10:48:04 +10:00
Darren Tucker
dd1031b78b Replace spaces with tabs.
Mechanically replace spaces with tabs in compat files not synced with
OpenBSD.
2016-08-02 10:01:52 +10:00
Darren Tucker
c20dccb561 Strip trailing whitespace.
Mechanically strip trailing whitespace on files not synced with OpenBSD
(or in the case of bsd-snprint.c, rsync).
2016-08-02 09:44:25 +10:00
Darren Tucker
30f9bd1c09 Repair $OpenBSD markers. 2016-08-02 09:06:27 +10:00
Darren Tucker
9715d4ad4b Repair $OpenBSD marker. 2016-08-02 09:02:42 +10:00
Tim Rice
cf3e0be7f5 modified: configure.ac opensshd.init.in
Skip generating missing RSA1 key on startup unless ssh1 support is enabled.
Spotted by Jean-Pierre Radley
2016-08-01 14:31:52 -07:00
Damien Miller
99522ba7ec define _OPENBSD_SOURCE for reallocarray on NetBSD
Report by and debugged with Hisashi T Fujinaka, dtucker nailed
the problem (lack of prototype causing return type confusion).
2016-07-28 08:54:27 +10:00
Damien Miller
3e1e076550 KNF 2016-07-27 08:25:42 +10:00
Damien Miller
d99ee9c4e5 Linux auditing also needs packet.h 2016-07-27 08:25:23 +10:00
Damien Miller
393bd381a4 fix auditing on Linux
get_remote_ipaddr() was replaced with ssh_remote_ipaddr()
2016-07-27 08:18:05 +10:00