693 Commits

Author SHA1 Message Date
Josh Soref
08bea0e15d spelling: discrepancy
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:43:12 -04:00
Josh Soref
cb52f3cdb4 spelling: deleterious
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:43:12 -04:00
Josh Soref
306164531f spelling: defining
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:43:12 -04:00
Josh Soref
40ddc4900a spelling: command
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:43:12 -04:00
Josh Soref
32aaacf4e7 spelling: argument
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:43:12 -04:00
Josh Soref
a6a73f4d32 spelling: arbitrary
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:43:12 -04:00
Josh Soref
3d959eb425 spelling: address
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:43:12 -04:00
Josh Soref
b2fd9d9daf spelling: github
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-07-30 01:15:36 -04:00
Yves Rutschle
bb76bc1d31
Merge pull request #382 from oliv3r/add_default_entrypoint
docker: Add proper entrypoint
2023-06-10 19:17:12 +02:00
Yves Rutschle
4a5ccb75b2
Merge pull request #384 from oliv3r/fix/parallel_builds
CI: Do not parallelized container builds
2023-06-10 19:15:39 +02:00
Olliver Schinagl
9dd560493a
container: Drop privileges
A container is best served with the least amount of privileges. This
also ensures we don't have to drop anything later.

This does require running the container with elevated capabilities.

Note, that if for whatever reason, 'root' access within the container is
needed, this can easily be accomplished by running the container with
`docker run --user root:root sslh` for example.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-06-05 22:50:06 +02:00
Olliver Schinagl
db5ed29fa2
docker: Add proper entrypoint
As per docker guidelines [0] a container should always really have a
consistent entrypoint, without having to override it or do special
tricks.

The behavior should be _identical_ as before, but will no longer trigger
errors because sslh doesn't understand certain parameters (/bin/sh
for example being common). Further more, allows a proper entrypoint for
a CI to work easily with the container as well. Allowing for scenario's
such as `apk add git && sslh --foreground` in your sslh image for example.

E.g. `docker run sslh --help` works though with the default
`--foreground` a bit weirdly, as does `docker run sslh
/bin/sh` or `docker run sslh ls`.

[0]: https://github.com/docker-library/official-images#consistency

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-06-05 22:50:06 +02:00
Olliver Schinagl
295dba93b5
docker: Do not foreground by default, this should be a choice
It is weird that when invoking sslh, that it daemonizess in foreground by
default. This should always be a user choice, and if not, it should be a
program default.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-06-05 22:50:06 +02:00
Olliver Schinagl
f23da1fc36 CI: Do not parallelized container builds
Container builds that are parallelized must be 'merged' again
afterwards. Because that makes the pipeline far more complex for a quick
compile job, we might as well just run in sequentially.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-06-05 22:26:30 +02:00
Olliver Schinagl
20764074cb
docker: Improve caching layers
Docker is most efficient if you can 'order' the layers from
least-changing to most changing to improve on cache hits.

While here, change ADD to COPY as add is really intended to download
external packages, as well as installing sslh into a proper location.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-06-05 22:05:24 +02:00
Yves Rutschle
7b7c9231b0
Merge pull request #383 from oliv3r/dev/pipeline
docker: Automatically build and push container
2023-06-05 20:53:35 +02:00
Olliver Schinagl
397f672248
docker: Automatically build and push container
The current sslh container works fine, but needs to be created manually
and locally by the user. Instead, let the pipeline do the dirty work and
push it to this repo's own registry.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2023-06-05 17:09:50 +02:00
Yves Rutschle
3707c5b8a6 fix file descriptor leak if bind_peer fails 2023-05-13 23:18:07 +02:00
Yves Rutschle
5666a1bb9d die if fd is not in cnx, which should be impossible (current behaviour results in illegal array dereferencing, which is worse) 2023-05-13 23:11:03 +02:00
Yves Rutschle
7b9c7f0fb2 check accept() return value 2023-05-13 23:00:26 +02:00
Yves Rutschle
eec2446723 fix error messages 2023-05-13 22:57:08 +02:00
Yves Rutschle
d29c9524bd fix unbalance of va_start/va_end 2023-05-13 22:51:04 +02:00
Yves Rutschle
db4ae0ef9d fix potential memory leak if the second malloc fails 2023-05-13 22:40:53 +02:00
Yves Rutschle
ee48dae8c5 fix potential file descriptor leak if set_nonblock () fails 2023-05-13 22:36:21 +02:00
Yves Rutschle
842f6b0473 Add mention of QUIC example (fix #376) 2023-02-19 17:24:51 +01:00
Yves Rutschle
1f64a71cde fix out-of-bounds read in sslh-ev (fix #368) 2023-01-08 22:50:56 +01:00
Yves Rutschle
00fc8e5d95 fix off-by-one error 2023-01-08 22:50:10 +01:00
Yves Rutschle
b9602ab98b removed obsolete max_fd tracker 2023-01-08 22:32:17 +01:00
Yves Rutschle
486f8a0090 removed obsolete comments 2023-01-08 21:58:50 +01:00
Yves Rutschle
3a1ac6c8d7 add protocol name that was missing in previous commit 2023-01-08 17:45:50 +01:00
Yves Rutschle
9dc3e3ce56 connection loss before it is logged resulted in logging uninitialised characters 2023-01-08 17:31:05 +01:00
Yves Rűtschlé
40c616e94c downgrade TLS error to info (fix #367) v2.0-rc2 2022-11-20 18:26:20 +01:00
Yves Rűtschlé
555717e345 defensive programming in case connections get tidied while there is activity on both file descriptors (fix #355) 2022-11-09 17:48:14 +01:00
Yves Rűtschlé
02573eb44b only process write events if file descriptor has not been tidied (may fix #355) 2022-11-03 17:23:49 +01:00
Yves Rűtschlé
d166b8977c document test script dependency 2022-11-03 09:32:47 +01:00
Yves Rűtschlé
4c3b52dda5 Merge branch 'master' of https://github.com/yrutschle/sslh 2022-10-29 22:31:35 +02:00
Yves Rűtschlé
c981ae9853 update log format to actually catch ssh bruteforcing (fix #359) 2022-10-29 22:31:24 +02:00
Yves Rutschle
8a0de7b628
Merge pull request #362 from exussum12/patch-1
Fix typo
2022-10-21 18:08:45 +02:00
Yves Rutschle
5154630fe0
Merge pull request #365 from iamdoubz/master
Update make clean to remove ev builds
2022-10-21 18:07:11 +02:00
iamdoubz
63d5ecddca
Update make clean to remove ev builds 2022-10-20 12:04:02 -05:00
Scott Dutton
e412811ff1
Update config.md 2022-10-16 00:19:21 +01:00
Yves Rutschle
7e3f723699
Merge pull request #356 from utoni/fix/watcher-unitialised-value
Fixes unitialised memory access as seen in issue #355.
2022-09-22 21:10:12 +02:00
Toni Uhlig
a1db2e8a92
Fixes unitialised memory access as seen in issue #355.
==1391== Conditional jump or move depends on uninitialised value(s)
==1391==    at 0x10E92F: watchers_add_read (sslh-select.c:67)
==1391==    by 0x10E92F: watchers_init (sslh-select.c:59)
==1391==    by 0x10E92F: main_loop (sslh-select.c:134)
==1391==    by 0x10DB6D: main (sslh-main.c:285)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-09-22 11:47:03 +02:00
Yves Rűtschlé
72c743e1e1 acknowledges akappner 2022-09-11 22:15:14 +02:00
Yves Rűtschlé
5cba44f5fa Add built-in MSRDP support 2022-09-11 21:51:06 +02:00
Yves Rutschle
9a36854ed3
Merge pull request #353 from utoni/fix/possible-format-str-exploit
fix possible format str vuln
2022-09-11 21:15:51 +02:00
Toni Uhlig
b19f8a6046
fix possible format string exploit if packet dumping enabled
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-09-10 12:53:57 +02:00
Yves Rutschle
bb685f8467
Merge pull request #344 from utoni/improve/makefile-ar
Makefile generates libsslh.a useable for other projects e.g. fuzzer.
2022-09-07 19:11:44 +02:00
Yves Rűtschlé
f418ae6128 added wireguard command-line setting 2022-09-04 18:48:17 +02:00
Yves Rutschle
a6df18527c
Merge pull request #345 from utoni/add/wireguard
add wireguard probe
2022-09-04 18:30:09 +02:00