Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-2012: Fix SSH connection to FIPS servers which only offer AES GCM #572

Open
wants to merge 1 commit into
base: patch
Choose a base branch
from

Conversation

eugen-keeper
Copy link

  • Added AES GCM ciphers to the FIPS compliant cipher list
  • Added some code to check if the hardcoded FIPS compliant ciphers are really supported by libssh2

@eugen-keeper eugen-keeper marked this pull request as draft January 7, 2025 17:20
@eugen-keeper eugen-keeper marked this pull request as ready for review January 7, 2025 18:55
Copy link
Contributor

@necouchman necouchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me - the only thing that I see is an opportunity for some comments in the new function you implemented - the existing code around that has bits of documentation throughout, so maybe just brush that up a bit in the new code?

src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
src/common-ssh/ssh.c Outdated Show resolved Hide resolved
}
}
guac_mem_free(preferred_algs);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mike-jumper
Copy link
Contributor

mike-jumper commented Jan 9, 2025

@eugen-keeper Please also:

  1. Rebase to remove the merge commit.
  2. Either add context to the commit messages ("Fix a size calculation issue" is a bit vague, for example) or squash them into a single commit. An excellent blog post on this: https://www.codelord.net/2015/03/16/bad-commit-messages-hall-of-shame/

@eugen-keeper eugen-keeper reopened this Jan 9, 2025
@mike-jumper mike-jumper changed the base branch from main to patch January 10, 2025 01:20
Comment on lines +455 to +456
"libssh2 reports that no ciphers/algorithms are supported. This may be a bug in libssh2."
"If the SSH connection fails, it may not be possible to log the cause here.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A space is needed at the end of the first string literal here. Without that, the relevant portion of the resulting string will be libssh2.If and not the intended libssh2. If.

/* Request the list of supported algorithms/cyphers from libssh2. */
const char** supported_algs;
int supported_algs_count =
libssh2_session_supported_algs(session, method_type, &supported_algs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the example at https://libssh2.org/libssh2_session_supported_algs.html, the memory pointed to by supported_algs after a successful call to libssh2_session_supported_algs() must eventually be freed by a call to libssh2_free().

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.

3 participants