12601 Commits

Author SHA1 Message Date
Tess Gauthier
1bead19d5a
[WIP] add codeql task to CI (#640)
* add codeql task to CI

* add var to enable codeQL

* create scheduled pipeline for codeql runs

* set codeql cadence to run daily

* revert ci.yml changes
2022-12-02 17:16:53 -05:00
Vivian Thiebaut
706441cbd0
Handle some codeQL warnings and errors (#645)
* Handle com codeql warnings and errors

* Handle additional codeql errors and warnings

* Add comment to changes made on upstream code

Co-authored-by: Tess Gauthier <tgauth@bu.edu>

* Fix diplicated return statement

Co-authored-by: Tess Gauthier <tgauth@bu.edu>
2022-12-02 13:59:24 -05:00
Tess Gauthier
76af8559d9
additional codeql fixes (#644)
* first pass at some codeql fixes

* address review feedback
2022-12-02 13:35:38 -05:00
Darren Tucker
5796bf8ca9
Restore ssh-agent permissions on exit.
...enough that subsequent builds can overwrite ssh-agent if necessary.
2022-12-02 11:55:08 +11:00
dtucker@openbsd.org
ccf5a13868
upstream: Clean up ssh-add and ssh-agent logs.
OpenBSD-Regress-ID: 9eda8e4c3714d7f943ab2e73ed58a233bd29cd2c
2022-12-02 11:51:18 +11:00
dtucker@openbsd.org
7a8b40cf6a
upstream: Log output of ssh-agent and ssh-add
This should  make debugging easier.

OpenBSD-Regress-ID: 5974b02651f428d7e1079b41304c498ca7e306c8
2022-12-02 11:51:02 +11:00
Vivian Thiebaut
28387feffb
Update version to 9.1.0.0 (#643) 2022-12-01 12:36:56 -05:00
Vivian Thiebaut
a6bacec020
Upgrade dependency versions (#641)
* Add flags to not overwrite libressl functions

* Add libcrypto.dll to folders of failing unittests

* Add libcrypto.dll to folders of all unit tests

* Add comment before new HAVE definitions on config.h.vs

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update LibreSSL version to 3.6.1

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>
2022-12-01 10:08:18 -05:00
Tess Gauthier
11e2996573
address codeQL warnings (#598)
* codeql fixes

* fix type mismatches

* fix pointers in w32_time methods

* fixes for codeQL warnings

* modify checks for codeql warnings

* add comments for codeql suppressions

* additional codeql fixes and suppressions

* add codeql fixes

* add comments for codeql

* add comments for codeql

* switch from debug to error log messages

* fix another merge conflict

fix line endings in gss-sspi.c

* add null check in channels.c

* address PR feedback

* address additional review feedback

* add CodeQL comments to common code

* fix unittest-win32compat

* fix unit test

* address review feedback

* remove suppression
2022-11-30 11:57:01 -05:00
dtucker@openbsd.org
4a1805d532
upstream: Add void to client_repledge args to fix compiler warning. ok djm@
OpenBSD-Commit-ID: 7e964a641ce4a0a0a11f047953b29929d7a4b866
2022-11-30 12:16:14 +11:00
djm@openbsd.org
815c470493
upstream: tighten pledge(2) after session establishment
feedback, ok & testing in snaps deraadt@

OpenBSD-Commit-ID: aecf4d49d28586dfbcc74328d9333398fef9eb58
2022-11-30 12:16:10 +11:00
djm@openbsd.org
f7cebbbf40
upstream: New EnableEscapeCommandline ssh_config(5) option
This option (default "no") controls whether the ~C escape is available.
Turning it off by default means we will soon be able to use a stricter
default pledge(2) in the client.

feedback deraadt@ dtucker@; tested in snaps for a while

OpenBSD-Commit-ID: 7e277595d60acb8263118dcb66554472257b387a
2022-11-30 12:16:08 +11:00
mbuhl@openbsd.org
d323f7ecf5
upstream: In channel_request_remote_forwarding the parameters for
permission_set_add are leaked as they are also duplicated in the call. Found
by CodeChecker. ok djm

OpenBSD-Commit-ID: 4aef50fa9be7c0b138188814c8fe3dccc196f61e
2022-11-30 12:13:55 +11:00
Darren Tucker
62cc33e6ee
Use -fzero-call-used-regs=used on clang 15.
clang 15 seems to have a problem with -fzero-call-used-reg=all which
causes spurious "incorrect signature" failures with ED25519.  On those
versions, use -fzero-call-used-regs=used instead.  (We may add exceptions
later if specific versions prove to be OK).  Also move the GCC version
check to match.

Initial investigation by Daniel Pouzzner (douzzer at mega nu), workaround
suggested by Bill Wendling (morbo at google com).  bz#3475, ok djm@
2022-11-30 11:45:07 +11:00
Darren Tucker
f84b9cffd5
Skip unit tests on slow riscv64 hardware. 2022-11-28 22:39:25 +11:00
Darren Tucker
9f2747e0be
Rework how selfhosted tests interact with runners.
Previously there was one runner per test target (mostly VMs).  This had
a few limitations:
 - multiple tests that ran on the same target (eg multiple build
   configs) were serialized on availability or that runner.
 - it needed manual balancing of VMs over host machines.

To address this, make VMs that use ephemeral disks (ie most of them)
all use a pool of runners with the "libvirt" label.  This requires that
we distinguish between "host" and "target" for those.  Native runners
and VMs with persistent disks (eg the constantly-updated snapshot ones)
specify the same host and target.

This should improve test throughput.
2022-11-28 22:39:08 +11:00
Darren Tucker
d664ddaec8
Run vmstartup from temp dir.
This will allow us to create ephemeral disk images per-runner.
2022-11-27 12:19:37 +11:00
Darren Tucker
0fa16e952b
Make "config" in matrix singular and pass in env.
This will allow the startup scripts to adapt their behaviour based on
the type and config.
2022-11-27 12:14:00 +11:00
Darren Tucker
e8857043af
Add "libvirt" label to dfly30. 2022-11-27 11:45:43 +11:00
Darren Tucker
9775473d84
Rename "os" in matrix to "target".
This is in preparation to distinguish this from the host that the runner
runs on in case where they are separate (eg VMs).
2022-11-27 11:20:35 +11:00
Darren Tucker
04fd00ceff
Remove unused self-hosted test targets. 2022-11-27 09:23:04 +11:00
Darren Tucker
c9d9fcad2a
Remove explicit "default" test config argument.
Not specifying the test config implicitly selects default args.
2022-11-27 09:16:15 +11:00
Darren Tucker
15a01cf15f
Add fallback for old platforms w/out MAP_ANON. 2022-11-23 13:24:53 +11:00
Darren Tucker
6b9bbbfe8b
If we haven't found it yet, recheck for sys/stat.h.
On some very old platforms, sys/stat.h needs sys/types.h, however
autoconf 2.71's AC_CHECK_INCLUDES_DEFAULT checks for them in the
opposite order, which in combination with modern autoconf's
"present but cannot be compiled" behaviour causes it to not be
detected.
2022-11-23 13:24:50 +11:00
Paul Higinbotham
ed6ba5aa88
Enable AzDO CI compliance template (#639)
* Enable AzDO CI compliance template

* Add compliance results report upload.

* Fix typo
2022-11-18 14:53:49 -08:00
Tess Gauthier
9e804c3e76
remove deprecated appveyor files (#638) 2022-11-17 15:40:32 -05:00
Vivian Thiebaut
e1432f00dd
Fix CI Failures caused by moving from WindowsPowerShell to PowerShell 7
Fix CI Failures
2022-11-16 12:26:43 -05:00
Vivian Thiebaut
127afa01f4 Fix typos 2022-11-16 10:37:16 -05:00
Vivian Thiebaut
4e1aee3a97 remove typo 2022-11-16 10:32:11 -05:00
Vivian Thiebaut
f574496b3f
Apply suggestions from code review
Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>
2022-11-16 10:30:21 -05:00
Vivian Thiebaut
806eb63576 Enable all tests 2022-11-15 15:29:31 -05:00
Vivian Thiebaut
fea0542d1f Run SSH and ShellHost tests 2022-11-15 15:00:13 -05:00
Vivian Thiebaut
47e734c1fb Fix SSH tests 2022-11-15 14:25:48 -05:00
Vivian Thiebaut
c5b985c66f Only run the failing tests 2022-11-15 11:16:14 -05:00
Vivian Thiebaut
3c19f2aa0e Change the way current platform is checked to use True automatic variable 2022-11-14 16:50:56 -05:00
Paul Higinbotham
d9a9b3ce88
Add AzDevOps CI implementations (#631)
* Fix yaml indentation

* More format fixes

* Temporarily remove compliance reference

* Fix test job

* Fix job name

* Update image pool

* Add build results copy

* Fix build copy typo

* Param fix

* Fix build artifact download

* Remove unneeded dir from install

* Fix Pester version comaptible with tests

* Fix unit tests

* Fix unit test location

* Fix unit test path

* Disable Bash tests

* Fix testpassed

* Re-enable CygWin bash tests

* Fix cygwin check error

* Typo

* Debug bash tests

* Save config.h from build for bash tests

* Fix config.h copy

* Change test clean up

* Allow some tests to run after others fail

* Reinstate Invoke-AzDOBuild

* Fix syntax errors

* Restore opensshtestinfo

* Fix typo

* Upload bash test results

* Debug bash tests 1

* Debug 2

* Remove debug code

* Fix test path error

* Set Pester version to 3.4.6 for AppVeyor runs
2022-11-14 13:14:50 -08:00
Tess Gauthier
5124f3dcd4
Fix install path check (#633)
* update check for openssh directory in PATH

* add closing parentheses
2022-11-11 12:41:10 -05:00
Darren Tucker
8926956f22
Add dfly62 test target. 2022-11-11 11:25:37 +11:00
dtucker@openbsd.org
650de7ecd3
upstream: Handle dynamic remote port forwarding in escape commandline's
-R processing. bz#3499, ok djm@

OpenBSD-Commit-ID: 194ee4cfe7ed0e2b8ad0727f493c798a50454208
2022-11-11 11:24:46 +11:00
Darren Tucker
5372db7e79
Remove seed passing over reexec.
This was added for the benefit of platforms using ssh-rand-helper to
prevent a delay on each connection as sshd reseeded itself.

ssh-random-helper is long gone, and since the re-exec happens before the
chroot the re-execed sshd can reseed itself normally. ok djm@
2022-11-10 12:44:51 +11:00
Darren Tucker
ca98d3f8c6
Skip reexec test on OpenSSL 1.1.1 specifically.
OpenSSL 1.1.1 has a bug in its RNG that breaks reexec fallback, so skip
that test.  See bz#3483 for details.
2022-11-09 20:59:20 +11:00
dtucker@openbsd.org
5ec4ebc254
upstream: Fix typo in fatal error message.
Patch from vapier at chromium.org.

OpenBSD-Commit-ID: 8a0c164a6a25eef0eedfc30df95bfa27644e35cf
2022-11-09 20:43:58 +11:00
dtucker@openbsd.org
e6abafe9a6
upstream: Remove errant colon and simplify format
string in error messages. Patch from vapier at chromium.org.

OpenBSD-Commit-ID: fc28466ebc7b74e0072331947a89bdd239c160d3
2022-11-09 20:43:35 +11:00
djm@openbsd.org
db2027a687
upstream: rename client_global_hostkeys_private_confirm() to
client_global_hostkeys_prove_confirm(), as it handles the
"hostkeys-prove00@openssh.com" message; no functional change

OpenBSD-Commit-ID: 31e09bd3cca6eed26855b88fb8beed18e9bd026d
2022-11-09 20:43:16 +11:00
djm@openbsd.org
1c2be7c200
upstream: typo in comment
OpenBSD-Commit-ID: 39c58f41e0f32d1ff31731fa6f5bbbc3ad25084a
2022-11-09 20:41:32 +11:00
Darren Tucker
cf1a9852d7
Defer seed_rng until after closefrom call.
seed_rng will initialize OpenSSL, and some engine providers (eg Intel's
QAT) will open descriptors for their own use.  bz#3483, patch from
joel.d.schuetze at intel.com, ok djm@
2022-11-09 09:23:47 +11:00
Darren Tucker
dffa644801
Fix comment text. From emaste at freebsd.org. 2022-11-09 08:27:47 +11:00
Vivian Thiebaut
f2ee7ea5fa
Merge pull request #616 from ago-shi/test
Fix not to assign null to strstr function
2022-11-08 15:47:09 -05:00
Pierre Ossman
d9df5689c2
Avoid assuming layout of fd_set
POSIX doesn't specify the internal layout of the fd_set object, so let's
not assume it is just a bit mask. This increases compatibility with
systems that have a different layout.

The assumption is also worthless as we already refuse to use file
descriptors over FD_SETSIZE anyway. Meaning that the default size of
fd_set is quite sufficient.
2022-11-08 19:33:47 +11:00
Darren Tucker
419aa8a312
Shutdown any VM before trying to check out repo.
In the case where the previous run did not clean up, the checkout will
fail as it'll leave a stale mount.
2022-11-08 12:42:52 +11:00