diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-08-29 12:06:20 +0200 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-08-31 08:31:46 +0200 |
| commit | fee337529da2d2b386b241812e176852bd5d4c4c (patch) | |
| tree | d7911fd541ad2a7c7d0a6eaa41ada4441f59ca04 /src/irmd/oap/srv.c | |
| parent | 7f6c35ba7a55503495c6b70cbd77dc0fc8a321c5 (diff) | |
| download | ouroboros-fee337529da2d2b386b241812e176852bd5d4c4c.tar.gz ouroboros-fee337529da2d2b386b241812e176852bd5d4c4c.zip | |
irmd: Reject client encap without configured KEX
A client asking for client-side encapsulation against a server that
has no kex= configured left scfg->x.str NULL, crashing the handshake
inside strstr().
Client encapsulation decapsulates with the server's configured static
key, so a server without the configured key exchange cannot serve the
request.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/oap/srv.c')
| -rw-r--r-- | src/irmd/oap/srv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/irmd/oap/srv.c b/src/irmd/oap/srv.c index d78fc8d4..f78e0874 100644 --- a/src/irmd/oap/srv.c +++ b/src/irmd/oap/srv.c @@ -363,6 +363,10 @@ int do_server_kex(const struct name_info * info, scfg->x.str); return -ECRYPT; } + } else if (!IS_KEX_ALGO_SET(scfg)) { + /* Client encap decaps with the configured static key */ + log_err_id(id, "Client encap without configured KEX."); + return -ECRYPT; } /* Dispatch based on algorithm type */ |
