Commit Graph

8544 Commits

Author SHA1 Message Date
djm@openbsd.org 1a6f9d2e24 upstream commit
unbreak DenyUsers; reported by henning@

Upstream-ID: 1c67d4148f5e953c35acdb62e7c08ae8e33f7cb2
2016-11-10 10:33:51 +11:00
djm@openbsd.org 010359b326 upstream commit
Validate address ranges for AllowUser/DenyUsers at
configuration load time and refuse to accept bad ones. It was previously
possible to specify invalid CIDR address ranges (e.g. djm@127.1.2.3/55) and
these would always match.

Thanks to Laurence Parry for a detailed bug report. ok markus (for
a previous diff version)

Upstream-ID: 9dfcdd9672b06e65233ea4434c38226680d40bfb
2016-11-06 16:48:29 +11:00
djm@openbsd.org efb494e81d upstream commit
Improve pkcs11_add_provider() logging: demote some
excessively verbose error()s to debug()s, include PKCS#11 provider name and
slot in log messages where possible. bz#2610, based on patch from Jakub Jelen

Upstream-ID: 3223ef693cfcbff9079edfc7e89f55bf63e1973d
2016-11-06 16:47:43 +11:00
Darren Tucker 5ee3fb5aff Use ptrace(PT_DENY_ATTACH, ..) on OS X. 2016-11-01 08:12:33 +11:00
Damien Miller 315d2a4e67 Unbreak AES-CTR ciphers on old (~0.9.8) OpenSSL
ok dtucker@
2016-10-28 14:34:56 +11:00
Darren Tucker a9ff3950b8 Move OPENSSL_NO_RIPEMD160 to compat.
Move OPENSSL_NO_RIPEMD160 to compat and add ifdefs to mac.c around the
ripemd160 MACs.
2016-10-28 14:26:58 +11:00
Darren Tucker bce5888516 Check if RIPEMD160 is disabled in OpenSSL. 2016-10-28 13:52:31 +11:00
Darren Tucker d924640d4c Skip ssh1 specfic ciphers.
cipher-3des1.c and cipher-bf1.c are specific to sshv1 so don't even try
to compile them when Protocol 1 is not enabled.
2016-10-28 13:38:19 +11:00
jsg@openbsd.org 79d078e7a4 upstream commit
Fix logic in add_local_forward() that inverted a test
when code was refactored out into bind_permitted().  This broke ssh port
forwarding for non-priv ports as a non root user.

ok dtucker@ 'looks good' deraadt@

Upstream-ID: ddb8156ca03cc99997de284ce7777536ff9570c9
2016-10-26 08:52:46 +11:00
dtucker@openbsd.org a903e315de upstream commit
Remove dead breaks, found via opencoverage.net.  ok
deraadt@

Upstream-ID: ad9cc655829d67fad219762810770787ba913069
2016-10-26 08:52:46 +11:00
Darren Tucker b4e96b4c9b Use !=NULL instead of >0 for getdefaultproj.
getdefaultproj() returns a pointer so test it for NULL inequality
instead of >0.  Fixes compiler warning and is more correct.  Patch from
David Binderman.
2016-10-26 08:43:25 +11:00
dtucker@openbsd.org 1c4ef0b808 upstream commit
Factor out "can bind to low ports" check into its own function.  This will
make it easier for Portable to support platforms with permissions models
other than uid==0 (eg bz#2625).  ok djm@, "doesn't offend me too much"
deraadt@.

Upstream-ID: 86213df4183e92b8f189a6d2dac858c994bfface
2016-10-24 10:42:57 +11:00
dtucker@openbsd.org 0b9ee623d5 upstream commit
When tearing down ControlMaster connecctions, don't
pollute stderr when LogLevel=quiet.  Patch from Tim Kuijsten via tech@.

Upstream-ID: d9b3a68b2a7c2f2fc7f74678e29a4618d55ceced
2016-10-24 10:42:57 +11:00
Darren Tucker 09e6a7d835 Wrap stdint.h include in ifdef. 2016-10-24 09:06:18 +11:00
Darren Tucker 08d9e9516e Fix formatting. 2016-10-21 09:46:46 +11:00
Darren Tucker 461f50e7ab Update links to https.
www.openssh.com now supports https and ftp.openbsd.org no longer
supports ftp.  Make all links to these https.
2016-10-21 06:55:58 +11:00
Darren Tucker dd4e7212a6 Update host key generation examples.
Remove ssh1 host key generation, add ssh-keygen -A
2016-10-21 06:48:46 +11:00
Darren Tucker 6d49ae8263 Update links.
Make links to openssh.com HTTPS now that it's supported, point release
notes link to the HTML release notes page, and update a couple of other
links and bits of text.
2016-10-21 05:22:55 +11:00
Darren Tucker fe0d1ca6ac Remote channels .orig and .rej files.
These files were incorrectly added during an OpenBSD sync.
2016-10-20 03:42:09 +11:00
dtucker@openbsd.org 246aa842a4 upstream commit
Remove channel_input_port_forward_request(); the only caller
was the recently-removed SSH1 server code so it's now dead code.  ok markus@

Upstream-ID: 05453983230a1f439562535fec2818f63f297af9
2016-10-19 07:16:01 +11:00
millert@openbsd.org 2c6697c443 upstream commit
Install a signal handler for tty-generated signals and
wait for the ssh child to suspend before suspending sftp.  This lets ssh
restore the terminal mode as needed when it is suspended at the password
prompt.  OK dtucker@

Upstream-ID: a31c1f42aa3e2985dcc91e46e6a17bd22e372d69
2016-10-19 03:30:04 +11:00
jmc@openbsd.org fd2a8f1033 upstream commit
various formatting fixes, specifically removing Dq;

Upstream-ID: 81e85df2b8e474f5f93d66e61d9a4419ce87347c
2016-10-19 03:30:04 +11:00
Darren Tucker 8f866d8a57 Import readpassphrase.c rev 1.26.
Author: miller@openbsd.org:
Avoid generate SIGTTOU when restoring the terminal mode.  If we get
SIGTTOU it means the process is not in the foreground process group
which, in most cases, means that the shell has taken control of the tty.
Requiring the user the fg the process in this case doesn't make sense
and can result in both SIGTSTP and SIGTTOU being sent which can lead to
the process being suspended again immediately after being brought into
the foreground.
2016-10-19 03:26:09 +11:00
Darren Tucker f901440cc8 Import readpassphrase.c rev 1.25.
Wrap <readpassphrase.h> so internal calls go direct and
readpassphrase is weak.

(DEF_WEAK is a no-op in portable.)
2016-10-19 03:23:16 +11:00
Darren Tucker 032147b695 Move DEF_WEAK into defines.h.
As well pull in more recent changes from OpenBSD these will start to
arrive so put it where the definition is shared.
2016-10-15 05:51:12 +11:00
Darren Tucker e0259a82dd Remove do_pam_set_tty which is dead code.
The callers of do_pam_set_tty were removed in 2008, so this is now dead
code.  bz#2604, pointed out by jjelen at redhat.com.
2016-10-15 04:34:46 +11:00
Damien Miller ca04de83f2 unbreak principals-command test
Undo inconsistetly updated variable name.
2016-10-13 18:55:25 +11:00
djm@openbsd.org 1723ec92eb upstream commit
fix the KEX fuzzer - the previous method of obtaining the
packet contents was broken. This now uses the new per-packet input hook, so
it sees exact post-decrypt packets and doesn't have to pass packet integrity
checks. ok markus@

Upstream-Regress-ID: 402fb6ffabd97de590e8e57b25788949dce8d2fd
2016-10-13 18:55:25 +11:00
natano@openbsd.org 09f997893f upstream commit
Move USER out of the way to unbreak the BUILDUSER
mechanism. ok tb

Upstream-Regress-ID: 74ab9687417dd071d62316eaadd20ddad1d5af3c
2016-10-13 18:55:25 +11:00
bluhm@openbsd.org 3049a012c4 upstream commit
In ssh tests set REGRESS_FAIL_EARLY with ?= so that the
environment can change it. OK djm@

Upstream-Regress-ID: 77bcb50e47b68c7209c7f0a5a020d73761e5143b
2016-10-13 18:55:25 +11:00
djm@openbsd.org 39af7b444d upstream commit
Add a per-packet input hook that is called with the
decrypted packet contents. This will be used for fuzzing; ok markus@

Upstream-ID: a3221cee6b1725dd4ae1dd2c13841b4784cb75dc
2016-10-13 18:55:25 +11:00
markus@openbsd.org ec165c392c upstream commit
Unregister the KEXINIT handler after message has been
received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed. Reported by
shilei-c at 360.cn

Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
2016-10-13 18:55:25 +11:00
Darren Tucker 29d4031939 Import rev 1.24 from OpenBSD.
revision 1.24
date: 2013/11/24 23:51:29;  author: deraadt;  state: Exp;  lines: +4 -4;
most obvious unsigned char casts for ctype
ok jca krw ingo
2016-10-13 04:07:20 +11:00
Darren Tucker 12069e5622 Import rev 1.23 from OpenBSD. Fixes bz#2619.
revision 1.23
date: 2010/05/14 13:30:34;  author: millert;  state: Exp;  lines: +41 -39;
Defer installing signal handlers until echo is disabled so that we
get suspended normally when not the foreground process.  Fix potential
infinite loop when restoring terminal settings if process is in the
background when restore occurs.  OK miod@
2016-10-13 04:04:44 +11:00
Darren Tucker 7508d83eff If we don't have TCSASOFT, define it to zero.
This makes it a no-op when we use it below, which allows us to re-sync
those lines with the upstream and make future updates easier.
2016-10-13 03:53:51 +11:00
jmc@openbsd.org aae4dbd4c0 upstream commit
tidy up the formatting in this file. more specifically,
replace .Dq, which looks appalling, with .Cm, where appropriate;

Upstream-ID: ff8e90aa0343d9bb56f40a535e148607973cc738
2016-10-10 14:27:12 +11:00
djm@openbsd.org a571dbcc7b upstream commit
add a comment about implicitly-expected checks to
sshkey_ec_validate_public()

Upstream-ID: 74a7f71c28f7c13a50f89fc78e7863b9cd61713f
2016-10-06 06:00:43 +11:00
djm@openbsd.org 2f78a2a698 upstream commit
fix some -Wpointer-sign warnings in the new mux proxy; ok
markus@

Upstream-ID: b1ba7b3769fbc6b7f526792a215b0197f5e55dfd
2016-10-01 07:07:58 +10:00
bluhm@openbsd.org ca71c36645 upstream commit
Add a makefile rule to create the ssh library when
regress needs it.  This allows to run the ssh regression tests without doing
a "make build" before. Discussed with dtucker@ and djm@; OK djm@

Upstream-Regress-ID: ce489bd53afcd471225a125b4b94565d4717c025
2016-10-01 06:44:43 +10:00
bluhm@openbsd.org ce44c970f9 upstream commit
Allow to run ssh regression tests as root.  If the user
is already root, the test should not expect that SUDO is set.  If ssh needs
another user, use sudo or doas to switch from root if necessary. OK dtucker@

Upstream-Regress-ID: b464e55185ac4303529e3e6927db41683aaeace2
2016-10-01 06:44:00 +10:00
markus@openbsd.org 8d05784785 upstream commit
ssh proxy mux mode (-O proxy; idea from Simon Tatham): - mux
client speaks the ssh-packet protocol directly over unix-domain socket. - mux
server acts as a proxy, translates channel IDs and relays to the server. - no
filedescriptor passing necessary. - combined with unix-domain forwarding it's
even possible to run mux client   and server on different machines. feedback
& ok djm@

Upstream-ID: 666a2fb79f58e5c50e246265fb2b9251e505c25b
2016-10-01 02:45:10 +10:00
djm@openbsd.org b7689155f3 upstream commit
put back some pre-auth zlib bits that I shouldn't have
removed - they are still used by the client. Spotted by naddy@

Upstream-ID: 80919468056031037d56a1f5b261c164a6f90dc2
2016-09-29 08:18:39 +10:00
djm@openbsd.org 4577adead6 upstream commit
restore pre-auth compression support in the client -- the
previous commit was intended to remove it from the server only.

remove a few server-side pre-auth compression bits that escaped

adjust wording of Compression directive in sshd_config(5)

pointed out by naddy@ ok markus@

Upstream-ID: d23696ed72a228dacd4839dd9f2dec424ba2016b
2016-09-29 06:54:50 +10:00
jmc@openbsd.org 80d1c963b4 upstream commit
use a separate TOKENS section, as we've done for
sshd_config(5); help/ok djm

Upstream-ID: 640e32b5e4838e4363738cdec955084b3579481d
2016-09-29 06:54:50 +10:00
Damien Miller 1cfd5c06ef Remove portability support for mmap
We no longer need to wrap/replace mmap for portability now that
pre-auth compression has been removed from OpenSSH.
2016-09-29 03:19:23 +10:00
djm@openbsd.org 0082fba4ef upstream commit
Remove support for pre-authentication compression. Doing
compression early in the protocol probably seemed reasonable in the 1990s,
but today it's clearly a bad idea in terms of both cryptography (cf. multiple
compression oracle attacks in TLS) and attack surface.

Moreover, to support it across privilege-separation zlib needed
the assistance of a complex shared-memory manager that made the
required attack surface considerably larger.

Prompted by Guido Vranken pointing out a compiler-elided security
check in the shared memory manager found by Stack
(http://css.csail.mit.edu/stack/); ok deraadt@ markus@

NB. pre-auth authentication has been disabled by default in sshd
for >10 years.

Upstream-ID: 32af9771788d45a0779693b41d06ec199d849caf
2016-09-29 03:11:32 +10:00
djm@openbsd.org 27c3a9c2ae upstream commit
Avoid a theoretical signed integer overflow should
BN_num_bytes() ever violate its manpage and return a negative value. Improve
order of tests to avoid confusing increasingly pedantic compilers.

Reported by Guido Vranken from stack (css.csail.mit.edu/stack)
unstable optimisation analyser output.  ok deraadt@

Upstream-ID: f8508c830c86d8f36c113985e52bf8eedae23505
2016-09-29 03:09:50 +10:00
Damien Miller 8663e51c80 fix mdoc2man.awk formatting for top-level lists
Reported by Glenn Golden
Diagnosis and fix from Ingo Schwarze
2016-09-28 07:40:33 +10:00
djm@openbsd.org b97739dc21 upstream commit
missing bit from previous commit

Upstream-ID: 438d5ed6338b28b46e822eb13eee448aca31df37
2016-09-24 05:39:37 +10:00
jmc@openbsd.org de6a175a99 upstream commit
organise the token stuff into a separate section; ok
markus for an earlier version of the diff ok/tweaks djm

Upstream-ID: 81a6daa506a4a5af985fce7cf9e59699156527c8
2016-09-24 05:39:37 +10:00