forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 61
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
8.6 upgrade #106
Merged
Merged
8.6 upgrade #106
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We were restoring the wrong thing CPPFLAGS (we used CFLAGS) for any platform that doesn't have localtime_r.
POSIX says "=" is string comparison and some shells (eg HP-UX) will complain about "==".
report the type because it is ambiguous as to whether it referred to the known or new host key. bz3216; ok dtucker@ OpenBSD-Commit-ID: 2d5ce4a83dbcf44e340a572e361decad8aab7bad
and provider/slot information in debug output. OpenBSD-Commit-ID: 969a089575d0166a9a364a9901bb6a8d9b8a1431
privsep process. No longer copy entire struct w/ pointer addresses, but pass remaining scalar fields explicitly, Prompted by Yuichiro NAITO, feedback Thorsten Glaser; ok dtucker@ OpenBSD-Commit-ID: 9925df75a56732c43f3663e70dd15ff413ab3e53
TCP connect. The connection phase of the SSH session is time-sensitive (due to server side login grace periods) and is frequently interactive (e.g. entering passwords). The ultimate interactive/bulk TOS/DSCP will be set after authentication completes. ok dtucker@ OpenBSD-Commit-ID: f31ab10d9233363a6d2c9996007083ba43a093f1
provide a better error message if it's not correct. Prompted by bz#2879, ok djm@ jmc@ OpenBSD-Commit-ID: 484178a173e92230fb1803fb4f206d61f7b58005
searched-for characters; from zhongjubin@huawei.com OpenBSD-Commit-ID: e6f57de1d4a4d25f8db2d44e8d58d847e247a4fe
OpenBSD-Commit-ID: ddfebbca03ca0e14e00bbad9d35f94b99655d032
similar to what we already do for sshd_config. bz#2320, with & ok djm@ OpenBSD-Commit-ID: bdbf9fc5bc72b1a14266f5f61723ed57307a6db4
OpenBSD-Commit-ID: ece25680ec637fdf20502721ccb0276691df5384
OpenBSD-Commit-ID: 43a026c9571dd779ec148de1829cf5a6b6651905
OpenBSD-Commit-ID: 2c3969c74966d4ccdfeff5e5f0df0791919aef50
OpenBSD-Commit-ID: 0e913b542c3764b100b1571fdb0d0e5cc086fe97
OpenBSD-Commit-ID: 42cb285d94789cefe6608db89c63040ab0a80fa0
Jakub Jelen OpenBSD-Commit-ID: fdeb1aae1f6149b193f12cd2af158f948c514a2a
OpenBSD-Commit-ID: 5c1048468813107baa872f5ee33ba51623630e01
fix some (one-off) memory leaks; ok markus@ OpenBSD-Commit-ID: 91c6aec57b0e7aae9190de188e9fe8933aad5ec5
consolidate the common arguments into a single struct and pass that around instead of using a bunch of globals. ok markus@ OpenBSD-Commit-ID: 035e6d7ca9145ad504f6af5a021943f1958cd19b
OpenBSD-Commit-ID: 0b3833c2cb985453ecca1d76803ebb8f3b736a11
ok markus@ OpenBSD-Commit-ID: 91689e14a4fc6c270e265a32d1c8faba63a45755
Add load_hostkeys_file() and hostkeys_foreach_file() that accept a FILE* argument instead of opening the file directly. Original load_hostkeys() and hostkeys_foreach() are implemented using these new interfaces. Add a u_int note field to the hostkey_entry and hostkey_foreach_line structs that is passed directly from the load_hostkeys() and hostkeys_foreach() call. This is a lightweight way to annotate results between different invocations of load_hostkeys(). ok markus@ OpenBSD-Commit-ID: 6ff6db13ec9ee4edfa658b2c38baad0f505d8c20
OpenBSD-Commit-ID: c46d515eac94a35a1d50d5fd71c4b1ca53334b48
markus@ OpenBSD-Commit-ID: e8d14a09cda3f1dc55df08f8a4889beff74e68b0
log.c calls match_pattern_list() OpenBSD-Regress-ID: f7c95c76b150d0aeb00a67858b9579b7d1b2db74
OpenBSD-Regress-ID: dcb468514f32da49a446372453497dc6eeafdbf3
pointing out my error (parse_ssh_uri() can return -1/0/1, that I missed). Reported by Raf Czlonka via bugs@ ok tb@ OpenBSD-Commit-ID: a2991a3794bcaf1ca2b025212cce11cdb5f6b7d6
bz#3292 OpenBSD-Commit-ID: e9535cd9966eb2e69e73d1ede1f44905c30310bd
Even split in two, the Valgrind tests take by far the longest to run, so split them four ways to further increase parallelism.
This groups the portable-specific changes together and makes it a little more likely that patches will apply cleanly.
elapsed time in seconds of each test. This depends on "date +%s" which is not specified by POSIX but is commonly implemented. OpenBSD-Regress-ID: ec3c8c19ff49b2192116a0a646ee7c9b944e8a9c
Reduces diff vs OpenBSD and makes it more likely diffs will apply cleanly.
The warn() function is only used in one place in portable and does not exist upstream. Upgrade the only instance it's used to fail() (the privsep/sandbox+proxyconnect, from back when that was new) and remove the now-unused function.
In -portable, defines.h ensures that these are defined, so redefining potentially causes a warning. We don't just delete it to make any future code syncs a little but easier. bz#3293.
Run a separate build for the unit tests under Valgrind. They take long enough that running in parallel with the other Valgrind tests helps.
At least the Valgrind unit tests uses $OBJ.
Normally the regress tests would create it, but running the unit tests on their own would fail because the directory did not exist.
Compatibility with Wayland requires that we use the gdk_seat_grab() API for grabbing mouse/keyboard, however these API don't exist in Gtk+2. This branches gnome-ssk-askpass2.c => gnome-ssk-askpass3.c and makes the changes to use the gdk_seat_grab() instead of grabbing mouse/focus separately via GDK. In the future, we can also use the branched file to avoid some API that has been soft-deprecated in GTK+3, e.g. gtk_widget_modify_fg
openssh-8.5 introduced a regression that would cause sshd to exit because of transient read errors on the network socket (e.g. EINTR, EAGAIN). Reported by balu.gajjala AT gmail.com via bz3297
ok djm@ OpenBSD-Commit-ID: 85ae5c063845c410283cbdce685515dcd19479fa
OpenBSD-Commit-ID: b5f3e133c846127ec114812248bc17eff07c3e19
baentsch
referenced
this pull request
Jun 16, 2021
* Initial commit of PQC integration into the 8.x branch. * Used macros to define OQS functions, identified areas to templatize, renamed frodo to frodokem. * Added frodokem L3 and L5 to test these levels, now ready for templating. * Cleaned-up some commits * Used KEM shared key directly vs. hashing it (as done in hybrid case). * Added PQ-only dilithium2 auth * Fixed hybrid auth. * Enabled more PQ auth alg through macro defs, enabled dilithium3/4 * Clean up fixme comments * Some fixes to get most tests working on Linux. * OpenSSH now builds on macOS (note that Picnic is unsupported). * Adding templating for key-exchanges. * Added sanity check test script. * Added templating for signatures. * Improved testing. * Added CircleCI config. * Bugfix. * Typo. * Updated README. * Template refactoring. * Refactored kexoqs.c. * Refactored kexoqsecdh.c * Added OQS default KEM. * Refactored ssh-oqs.c * Added OQS default sig. * Another spot needed templating. * Some templating for regress/. * Wrapping up. * Readme fix. Co-authored-by: Christian Paquin <cpaquin@microsoft.com>
It's a big merge to review. Are there any manual changes, or is it just a clean rebase? |
Mostly I followed https://github.com/open-quantum-safe/openssh/wiki/Instructions-for-merging-upstream-code but there were conflicts I needed to resolve. All pertaining to a change of algorithm/name to |
dstebila
approved these changes
Jun 17, 2021
geedo0
added a commit
to geedo0/openssh
that referenced
this pull request
Jun 24, 2024
This is a first pass at resolving all of the merge conflicts between the current tip of `OQS-v8` and the `V_9_7_P1` tag in upstream OpenSSH. The merge strategy here differs a bit from previous upstream merges (e.g. PR open-quantum-safe#106 and PR open-quantum-safe#121) where all of the changes were squashed and incorporated into a single commit and applied to the trunk. This is a more typical `git merge` in that we retain both parents and their commit histories. This will make future merges more straightforward by allowing git to notice the shared history and avoid marking these merged commits as conflicting changes. Here's the git-foo used to script the merge and handle the false positives from the "squash merges". ``` oqs_tip=OQS-v8 openssh_release=V_9_7_P1 git merge ${openssh_release} base=`git merge-base ${oqs_tip} ${openssh_release}` for f in `git diff --name-only --diff-filter=U`; do # This fetches all of the commits which touched the file since the merge base # Filter out the two commits for the 8.6 and 8.9 merges since they are technically already incorporated conflicts=$(git log --oneline ${base}..${oqs_tip} -- $f | ggrep -v -P '(1f58edd|f058d3168)') # Check if we have no OQS-OpenSSH conflicts specific if [[ -z ${conflicts} ]]; then echo "$f has no conflicts" # Resolve the conflict by taking the upstream version of the file git checkout --theirs -- $f git add $f else echo "$f has conflicts" echo ${conflicts} # Send all of the OQS diffs to a file to help resolve the merge conflicts for c in `echo ${conflicts} | cut -d ' ' -f1`; do git show $c -- $f >> ~/conflicting_diffs.t done fi done ``` For the remaining conflicts, I went through each file one-by-one with this pseudo-algorithm: 1. Incorporate all changes from both sides that have no direct conflicts. 2. Look for OQS specific changes with conflicts and apply them as-appropriate. 3. Take the upstream version for any remaining conflicts. Callouts from this process: - `sshkey.c` and `sshkey.h` experienced a major refactor upstream that impacted how OQS modified these files. I simply took the upstream versions for now and plan to address the conflict properly in a separate PR. - Kept `README.md` as-is from OQS and applied changes to `README.original.md`. - Took `.depend` from upstream, will update in a subsequent commit. - `version.h` retained the 2022-01 datestamp from OQS, will update this when we're ready to stage a release. - In `ssh-keygen.c` the `OQS_TEMPLATE_FRAGMENT_PRINT_RESOURCE_RECORDS_START` template changed to accept two additional arguments `opts` and `nopts`. I added these in manually for now. To self-check I did the following: - Test build by running `build_openssh.sh` and finding compiler errors. - Run `git diff HEAD V_9_7_P1` to highlight all the changes and assert that all changes were introduced by OQS alone. This last process flagged a handful of issues. Mostly around duplicated code blocks from taking them from previous upstream merges and this current merge and git not noticing it. With that out of the way, I'm reasonably confident that this PR is pretty close to upstream v9.7 with only the changes from OQS applied to it. So after all that, what's working so far? `build_openssh.sh` will build the project but fail to install with some error about unknown key types. What's next? - Properly handle the merge conflicts in `sshkey.(c|h)`. - Regenerate `.depend`. - Fix the impacted OQS templates and regenerate the source. - Cut a new `OQS-v9` branch and update `version.h`.
Merged
geedo0
added a commit
to geedo0/openssh
that referenced
this pull request
Jul 9, 2024
This is a first pass at resolving all of the merge conflicts between the current tip of `OQS-v8` and the `V_9_7_P1` tag in upstream OpenSSH. The merge strategy here differs a bit from previous upstream merges (e.g. PR open-quantum-safe#106 and PR open-quantum-safe#121) where all of the changes were squashed and incorporated into a single commit and applied to the trunk. This is a more typical `git merge` in that we retain both parents and their commit histories. This will make future merges more straightforward by allowing git to notice the shared history and avoid marking these merged commits as conflicting changes. Here's the git-foo used to script the merge and handle the false positives from the "squash merges". ``` oqs_tip=OQS-v8 openssh_release=V_9_7_P1 git merge ${openssh_release} base=`git merge-base ${oqs_tip} ${openssh_release}` for f in `git diff --name-only --diff-filter=U`; do # This fetches all of the commits which touched the file since the merge base # Filter out the two commits for the 8.6 and 8.9 merges since they are technically already incorporated conflicts=$(git log --oneline ${base}..${oqs_tip} -- $f | ggrep -v -P '(1f58edd|f058d3168)') # Check if we have no OQS-OpenSSH conflicts specific if [[ -z ${conflicts} ]]; then echo "$f has no conflicts" # Resolve the conflict by taking the upstream version of the file git checkout --theirs -- $f git add $f else echo "$f has conflicts" echo ${conflicts} # Send all of the OQS diffs to a file to help resolve the merge conflicts for c in `echo ${conflicts} | cut -d ' ' -f1`; do git show $c -- $f >> ~/conflicting_diffs.t done fi done ``` For the remaining conflicts, I went through each file one-by-one with this pseudo-algorithm: 1. Incorporate all changes from both sides that have no direct conflicts. 2. Look for OQS specific changes with conflicts and apply them as-appropriate. 3. Take the upstream version for any remaining conflicts. Callouts from this process: - `sshkey.c` and `sshkey.h` experienced a major refactor upstream that impacted how OQS modified these files. I simply took the upstream versions for now and plan to address the conflict properly in a separate PR. - Kept `README.md` as-is from OQS and applied changes to `README.original.md`. - Took `.depend` from upstream, will update in a subsequent commit. - `version.h` retained the 2022-01 datestamp from OQS, will update this when we're ready to stage a release. - In `ssh-keygen.c` the `OQS_TEMPLATE_FRAGMENT_PRINT_RESOURCE_RECORDS_START` template changed to accept two additional arguments `opts` and `nopts`. I added these in manually for now. To self-check I did the following: - Test build by running `build_openssh.sh` and finding compiler errors. - Run `git diff HEAD V_9_7_P1` to highlight all the changes and assert that all changes were introduced by OQS alone. This last process flagged a handful of issues. Mostly around duplicated code blocks from taking them from previous upstream merges and this current merge and git not noticing it. With that out of the way, I'm reasonably confident that this PR is pretty close to upstream v9.7 with only the changes from OQS applied to it. So after all that, what's working so far? `build_openssh.sh` will build the project but fail to install with some error about unknown key types. What's next? - Properly handle the merge conflicts in `sshkey.(c|h)`. - Regenerate `.depend`. - Fix the impacted OQS templates and regenerate the source. - Cut a new `OQS-v9` branch and update `version.h`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.