From cabbc53f8f32054101a766915832b39147006937 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 18 Aug 2026 16:31:00 -0700 Subject: [PATCH] Keep a rekey out of the mem-IO test harnesses Filling the reply queue sends enough to cross a lowered highwater mark. The rekey that fires sends a KEXINIT the 256-byte mem buffer cannot hold. - Disable the highwater; a bigger buffer only moves the cliff. - Both harnesses, since the buffer is the same size on each. --- tests/regress.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/regress.c b/tests/regress.c index 3b83ad15..4703f9e5 100644 --- a/tests/regress.c +++ b/tests/regress.c @@ -418,6 +418,9 @@ static void InitChannelOpenHarnessClient(ChannelOpenHarness* harness, MemIoInit(&harness->io, in, inSz, harness->out, sizeof(harness->out)); wolfSSH_SetIOReadCtx(harness->ssh, &harness->io); wolfSSH_SetIOWriteCtx(harness->ssh, &harness->io); + /* A rekey cannot fit the 256-byte mem buffer, so keep a build-time + * DEFAULT_HIGHWATER_MARK from firing one mid-test. */ + AssertIntEQ(wolfSSH_SetHighwater(harness->ssh, 0), WS_SUCCESS); harness->ssh->connectState = CONNECT_SERVER_USERAUTH_ACCEPT_DONE; } #endif /* WOLFSSH_FWD && !NO_WOLFSSH_CLIENT */ @@ -444,6 +447,9 @@ static void InitChannelOpenHarness(ChannelOpenHarness* harness, MemIoInit(&harness->io, in, inSz, harness->out, sizeof(harness->out)); wolfSSH_SetIOReadCtx(harness->ssh, &harness->io); wolfSSH_SetIOWriteCtx(harness->ssh, &harness->io); + /* A rekey cannot fit the 256-byte mem buffer, so keep a build-time + * DEFAULT_HIGHWATER_MARK from firing one mid-test. */ + AssertIntEQ(wolfSSH_SetHighwater(harness->ssh, 0), WS_SUCCESS); harness->ssh->acceptState = ACCEPT_SERVER_USERAUTH_SENT; }