Skip to content

Fix error handling in fill_default_options#649

Open
ZoltanFridrich wants to merge 1 commit intoopenssh:masterfrom
ZoltanFridrich:zfridric_fix_fill_default_options
Open

Fix error handling in fill_default_options#649
ZoltanFridrich wants to merge 1 commit intoopenssh:masterfrom
ZoltanFridrich:zfridric_fix_fill_default_options

Conversation

@ZoltanFridrich
Copy link
Copy Markdown

@ZoltanFridrich ZoltanFridrich commented Apr 2, 2026

Found during a bug investigation in CentOS 10 where our downstream patch removes kex algorithm in FIPS mode but ignores the error when encountered in kex_names_valid on purpose. This propagated the error further eventually hitting an error in fill_default_options but instead of exiting, the error is ignored and ssh keeps running in broken state.

This seems to be a bug in upstream code where ret is never set in fill_default_options even when error is encountered.
Looking at the history the r variable was introduced in commit 1b9dd4a where the error was fatal. Then in commit 43026da the error handling was moved outside of the function. The commit introduced ret variable which is never assigned into. This makes the function always return 0, even on error.

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
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