Skip to content

MaxStartups parsing fix and refactor#648

Open
xypiie wants to merge 2 commits intoopenssh:masterfrom
xypiie:master
Open

MaxStartups parsing fix and refactor#648
xypiie wants to merge 2 commits intoopenssh:masterfrom
xypiie:master

Conversation

@xypiie
Copy link
Copy Markdown

@xypiie xypiie commented Mar 31, 2026

The commit 683d0ab introduced a conversion issue, which converted
"MaxStartups 3" into "10:30:3". This is wrong, as value1 > value3 and
it causes side effects leading to crash of sshd when MaxStartups
functionality is triggered with this error:
"error: mm_reap: child terminated by signal 15"

Please find fix proposal and a proposal for refactoring the parsing part to be more robust against such issues.

Peter Kaestle added 2 commits March 31, 2026 09:09
The commit 683d0ab introduced a conversion issue, which converted
"MaxStartups 3" into "10:30:3".  This is wrong, as value1 > value3 and
it causes side effects leading to crash of sshd when Maxstartups
functionality is triggered with this error:
"error: mm_reap: child terminated by signal 15"

This commit reverts to previous behavior.

Fixes:
683d0ab (upstream: Make MaxStartups and PerSourceNetBlockSize first-match-wins, 2025-09-01)
Reducing the amount of nested if statements and combining all
plausibility checks to one place.
This improves readability and simplifies the code for easier
maintenance.
@xypiie xypiie changed the title MaxStartups parsing fix + refactor MaxStartups parsing fix and refactor Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant