Commit Graph

1825 Commits

Author SHA1 Message Date
Matt Johnston
b4c30b5e7e Ignore all-zero ed25519 keys in fuzzer-verify 2022-11-09 17:00:18 +08:00
Matt Johnston
561ef41230 Merge egor-duda:sk-authkey-options
Github pull request #172
2022-11-09 16:14:59 +08:00
Matt Johnston
ab6ea4d697 Fix plugin argument
This broke in the re-exec changes, it was altering the argv
argument in-place, but argv was re-used later.

Fixes #194 github issue
2022-11-09 13:14:22 +08:00
Matt Johnston
9d320a73be Merge remote-tracking branch 'refs/remotes/origin/master' 2022-10-31 09:51:00 +08:00
Matt Johnston
f19a0494d7
Merge pull request #190 from mgiacomoli/fix-dbclient-keyboard-interactive-login
Dbclient: keyboard_interactive login method never used
2022-10-27 15:52:02 +08:00
Matt Johnston
ab70167534
Merge pull request #189 from mgiacomoli/utx-typo
Fix utx var typo
2022-10-25 23:48:49 +08:00
Matt Johnston
d1fed8b451
Merge pull request #191 from mgiacomoli/ask-fingerprint-flush-stdin
Dbclient: Flush stdin after fingerprint confirmation
2022-10-25 23:47:45 +08:00
Matt Johnston
5284a3da56
Merge pull request #182 from tuoha/permitopen_authorized_keys
Added permitopen option to authorized_keys
2022-10-25 23:42:41 +08:00
Matt Johnston
f7d306e963 Fix decompression size check
Dropbear's decompression could erroneously exit with
"bad packet, oversized decompressed"
for a valid 32768 byte decompressed payload (an off-by-one error).
It could be triggered particularly with larger SSH window sizes.

This change also simplifies the function by allocating a
single 32kB buffer rather than incrementally increasing the size.
2022-10-25 21:17:56 +08:00
Matt Johnston
86efbae708 Add flags so libtommath builds with -O3
This was the default prior to 2022.82 and makes a significant
difference to performance. Perhaps at a later time
this could be made more configurable.

Discussion in https://github.com/mkj/dropbear/issues/174
2022-10-25 21:12:08 +08:00
Matt Johnston
64e270b6f2 dropbear_lint.sh: Use grep -- 2022-10-24 11:28:47 +08:00
Michele Giacomoli
b36707ba46 Fix comment style 2022-09-19 18:25:26 +02:00
Michele Giacomoli
acf50a4f98 Flush stdin after fingerprint confirmation 2022-09-19 18:09:38 +02:00
Michele Giacomoli
b734e5a423 Resort cli auth method tries 2022-09-19 17:45:55 +02:00
Michele Giacomoli
4c67d03656 Fix utx var typo 2022-09-19 16:50:43 +02:00
Matt Johnston
17e02fe614 Link to dropbear.nl in README 2022-08-04 21:39:28 +08:00
Matt Johnston
e520d035e7
Merge pull request #184 from wulei-student/patch-1
Update dropbear.init
2022-07-22 15:19:51 +08:00
lwu
d48a2ba8b7
Update dropbear.init
need \ ,at the end of the line.
2022-07-22 15:14:27 +08:00
Matt Johnston
7de29c2686 Re-add missing setsid(), missed #ifdef conversion
Fixes: 2a81289 ("Make DEBUG_NOFORK a #if not #ifdef")
Fixes #180 github issue
2022-07-18 15:01:51 +08:00
Tuomas Haikarainen
1e4d64d300 Added permitopen option to authorized_keys
It is now possible to limit local port forwarding to specified
destination(s) by using the permitopen option in authorized_keys.

Resolves #181
2022-07-12 10:35:00 +03:00
Matt Johnston
a7e3b06b04 Remove unused MAX_IP_LEN 2022-06-27 14:36:04 +08:00
Matt Johnston
808bc392a0
Merge pull request #175 from k-kurematsu/fix_errmsg
Fix misleading error message
2022-06-21 17:18:06 +08:00
k-kurematsu
e03abf0d1a
Fix misleading error message
As per the message, even if I deleted the write permission(chmod -007), but an error occurred.
It's a source of confusion, so fix the message.
2022-06-21 17:58:12 +09:00
Egor Duda
62ea53c1e5
Implement no-touch-required and verify-requred for authorized_keys file 2022-06-11 19:17:40 +03:00
Matt Johnston
544f28a051 Fix MAX_UNAUTH_CLIENTS regression
Since re-exec change in 2022.82 Dropbear count
treat authenticated sessions towards the unauthenticated
session limit. This is fixed by passing the childpipe FD
through to the re-execed process.
2022-06-08 21:26:20 +08:00
Matt Johnston
f2318d831b
Merge github #169
Fix compilation when disabling pubkey authentication (DROPBEAR_SVR_PUBKEY_AUTH)
2022-05-31 09:48:17 +08:00
MaxMougg
1622c80be4
Fix indentations 2022-05-30 11:28:17 -04:00
MaxMougg
c77d02bb11
Update svr-chansession for build issue
Following issue "Compilation error when disabling pubkey authentication (DROPBEAR_SVR_PUBKEY_AUTH)" from davidbernard04, code is modified to take in account that requesting information from method "ses.authstate.pubkey_info" isn't possible since the method is disabled when DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT value is 0.
2022-05-30 11:01:16 -04:00
Matt Johnston
50c6e8d3c3 Remove codeql 2022-05-24 09:49:10 +08:00
Matt Johnston
258f6127b4 Remove flawfinder.
It's too noisy, lacks context
2022-05-24 09:36:44 +08:00
Matt Johnston
b81c81c047
Add flawfinder action 2022-05-23 16:32:11 +08:00
Matt Johnston
3c3e4f6e6b
Create codeql-analysis.yml
Experiment whether codeql works
2022-05-23 16:31:13 +08:00
Matt Johnston
46654cda85 Increase build.yml DEFAULT_IDLE_TIMEOUT 2022-04-28 10:43:56 +08:00
Matt Johnston
72d8cae7a4 Test linking for hardening options
Some options depend on correct library support.
2022-04-26 22:04:38 +08:00
Matt Johnston
2e0a16c334 Avoid UNAUTH_CLOSE_DELAY when testing
Seeing if this fixes test failures
2022-04-26 17:12:15 +08:00
Matt Johnston
c4a0304b3f Add a test for off-by-default compile options
This would have caught broken x11 (gh #156)
2022-04-23 22:54:39 +08:00
Matt Johnston
46106f71ab Fix build warning with DEBUG_TRACE
TRACE() code only gets used above DROPBEAR_VERBOSE_LEVEL
2022-04-23 22:44:23 +08:00
Matt Johnston
0292aacdf0 Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY 2022-04-23 22:33:31 +08:00
Matt Johnston
b8669b063b Bump version to 2022.82 2022-04-01 14:43:27 +08:00
Matt Johnston
c6e2d50310 Fix -q to hide the banner
Got lost merging the DEBUG/TRACE level patch
2022-04-01 14:33:27 +08:00
Matt Johnston
dd305c1533 Fix IPv6 address parsing for dbclient -b
Now can correctly handle '-b [ipv6address]:port'

Code is shared with dropbear -p, though they handle colon-less arguments
differently
2022-04-01 14:13:52 +08:00
Matt Johnston
7894254afa Allow dbclient -J to be used with multihop
Based on a patch from Hans Harder.

This also tidies formatting and un-needed parts
2022-04-01 12:17:02 +08:00
Matt Johnston
ac2433cb8d Add m_snprintf() that won't return negative 2022-04-01 12:10:48 +08:00
Matt Johnston
552385280a Fix extra default -i arguments for multihop
When multihop executes dbclient it should only add -i arguments
from the original commandline, not the default id_dropbear key.
Otherwise multiple -i arguments keep getting added which
results in servers disconnecting with too many auth attempts
2022-04-01 11:56:10 +08:00
Matt Johnston
c93103746e dbclient print remote fingerprint with -v 2022-04-01 11:21:34 +08:00
Matt Johnston
abb577fcba Write CHANGES since last release 2022-03-30 23:18:00 +08:00
Raphael Hertzog
0e042476a0 Add /usr/sbin and /sbin to default root PATH
When dropbear is used in a very restricted environment (such as in a
initrd), the default user shell is often also very restricted
and doesn't take care of setting the PATH so the user ends up
with the PATH set by dropbear. Unfortunately, dropbear always
sets "/usr/bin:/bin" as default PATH even for the root user
which should have /usr/sbin and /sbin too.

For a concrete instance of this problem, see the "Remote Unlocking"
section in this tutorial: https://paxswill.com/blog/2013/11/04/encrypted-raspberry-pi/

It speaks of a bug in the initramfs script because it's written "blkid"
instead of "/sbin/blkid"... this is just because the scripts from the
initramfs do not expect to have a PATH without the sbin directories and
because dropbear is not setting the PATH appropriately for the root user.

I'm thus suggesting to use the attached patch to fix this misbehaviour (I
did not test it, but it's easy enough). It might seem anecdotic but
multiple Kali users have been bitten by this.

From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903403
2022-03-30 23:13:34 +08:00
Matt Johnston
0fc4e35c94 Update to latest config.guess and config.sub 2022-03-30 21:42:23 +08:00
Matt Johnston
9007a80616 Handle ecdsa-sk flags, reject no-touch
For the time being Dropbear will only allow SK auth with default
parameters, user-presence needs to be set.
In future handling of authorized_keys option "no-touch-required" can be
added.
This code would also be refactored to share between ecdsa and ed25519
once I get hardware/emulation to test ed25519.
2022-03-30 21:06:15 +08:00
Matt Johnston
ecc85f91e6 Fix declaration after statement
Caught by just-added c89 build
2022-03-30 14:32:49 +08:00