summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: run clar with verbosityethomson/ci_026Edward Thomson2018-09-221-1/+1
|
* examples: network: fix Win32 linking errors due to getlinePatrick Steinhardt2018-09-221-2/+39
| | | | | | | | | | | | The getline(3) function call is not part of ISO C and, most importantly, it is not implemented on Microsoft Windows platforms. As our networking example code makes use of getline, this breaks builds on MSVC and MinGW. As this code wasn't built prior to the previous commit, this was never noticed. Fix the error by instead implementing a `readline` function, which simply reads the password from stdin until it reads a newline character.
* ci: rename vsts to azure-pipelinesEdward Thomson2018-09-225-7/+7
|
* ci: use templates for VSTS buildsEdward Thomson2018-09-224-88/+97
| | | | | Our build YAML is becoming unweildly and full of copy-pasta. Simplify with templates.
* ci: explicitly run in the build directoryEdward Thomson2018-09-221-0/+13
| | | | | Explicitly run from the build directory, not the source. (I was mistaken about the default working directory for VSTS agents.)
* online::clone: free url and username before resettingEdward Thomson2018-09-221-4/+10
| | | | | Before resetting the url and username, ensure that we free them in case they were set by environment variables.
* ci: only run the exact named testEdward Thomson2018-09-221-1/+1
| | | | | | | Our CI test system invokes ctest with the name of the given tests it wishes to invoke. ctest (with the `-R` flag) treats this name as a regular expression. Provide anchors in the regular expression to avoid matching additional tests in this search.
* smart subtransport: free url when resetting streamEdward Thomson2018-09-221-0/+5
| | | | Free the url field when resetting the stream to avoid leaking it.
* push tests: deeply free the specsEdward Thomson2018-09-221-1/+1
| | | | Don't just free the spec vector, also free the specs themselves.
* push tests: deeply free the push statusEdward Thomson2018-09-221-2/+6
| | | | | Don't just free the push status structure, actually free the strings that were strdup'd into the struct as well.
* ci: use newer valgrind suppressionEdward Thomson2018-09-221-0/+25
|
* README: remove travisEdward Thomson2018-09-221-1/+0
|
* ci: remove travisEdward Thomson2018-09-221-92/+0
|
* readme: remove appveyor build badgeEdward Thomson2018-09-221-2/+2
|
* ci: remove appveyorEdward Thomson2018-09-221-44/+0
|
* ci: run VSTS builds on master and maint branchesEdward Thomson2018-09-221-0/+4
|
* ci: run coverity from a nightly VSTS buildEdward Thomson2018-09-221-0/+22
|
* ci: run coverity from travis's cronEdward Thomson2018-09-222-19/+13
| | | | | | Instead of trying to run coverity builds during the regular PR process, run them during a regularly scheduled cron process. These only need to run nightly, so it makes sense to bring them out of the PR process.
* winhttp: retry erroneously failing requestsEdward Thomson2018-09-221-14/+18
| | | | | | | | | | Early Windows TLS 1.2 implementations have an issue during key exchange with OpenSSL implementations that cause negotiation to fail with the error "the buffer supplied to a function was too small." This is a transient error on the connection, so when that error is received, retry up to 5 times to create a connection to the remote server before actually giving up.
* ci: remove unused old ci scriptsEdward Thomson2018-09-222-99/+0
|
* ci: move travis to the new scriptsEdward Thomson2018-09-225-17/+39
|
* ci: move appveyor to new scriptsEdward Thomson2018-09-222-56/+27
|
* ci: use a single setup script for mingwEdward Thomson2018-09-223-26/+13
|
* ci: use docker containers from libgit2 accountEdward Thomson2018-09-221-4/+4
|
* ci: perform clang builds on LinuxEdward Thomson2018-09-223-11/+15
|
* ci: dissociate test from leaks processEdward Thomson2018-09-221-1/+1
| | | | | | The leaks process is not good about handling children. Ensure that its child is `nohup`ed so that the grandparent shell won't wait for it to exit.
* ci: some additional debuggingEdward Thomson2018-09-221-7/+8
|
* ci: enable leak checking on osxEdward Thomson2018-09-223-0/+5
|
* ci: msvc leak-checkingEdward Thomson2018-09-222-5/+4
|
* ci: xcode leaks leak-checkingEdward Thomson2018-09-221-0/+4
|
* buf tests: allocate a smaller size for the oomEdward Thomson2018-09-221-3/+15
| | | | | | | | | | | On Linux (where we run valgrind) allocate a smaller buffer, but still an insanely large size. This will cause malloc to fail but will not cause valgrind to report a likely error with a negative-sized malloc. Keep the original buffer size on non-Linux platforms: this is well-tested on them and changing it may be problematic. On macOS, for example, using the new size causes `malloc` to print a warning to stderr.
* ci: valgrind leak-checkingEdward Thomson2018-09-222-9/+36
|
* ci: introduce vsts buildsEdward Thomson2018-09-222-0/+135
|
* ci: scripts to setup mingw build environmentEdward Thomson2018-09-222-0/+40
|
* ci: set up a macos hostEdward Thomson2018-09-221-0/+6
| | | | Script to set up dependencies on a macOS build system.
* ci: setup a linux hostEdward Thomson2018-09-221-0/+8
| | | | Sets up a linux host to prepare for a build.
* ci: improved flexibility for citest.shEdward Thomson2018-09-221-48/+82
| | | | Refactor citest.sh to enable local testing by developers.
* ci: refactor unix ci build/test scriptsEdward Thomson2018-09-222-0/+149
|
* ci: move tests into citest.ps1Edward Thomson2018-09-212-11/+55
| | | | Add citest.ps1 PowerShell script to run the tests.
* ci: Windows PowerShell build scriptEdward Thomson2018-09-211-0/+42
|
* Merge pull request #4757 from pks-t/pks/v0.26.6v0.26.6Patrick Steinhardt2018-08-064-4/+26
|\ | | | | Release v0.26.6
| * version: bump to v0.26.6Patrick Steinhardt2018-08-061-2/+2
| |
| * CHANGELOG.md: document security release v0.26.6Patrick Steinhardt2018-08-061-0/+15
| |
| * smart_pkt: fix potential OOB-read when processing ng packetPatrick Steinhardt2018-08-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSS-fuzz has reported a potential out-of-bounds read when processing a "ng" smart packet: ==1==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6310000249c0 at pc 0x000000493a92 bp 0x7ffddc882cd0 sp 0x7ffddc882480 READ of size 65529 at 0x6310000249c0 thread T0 SCARINESS: 26 (multi-byte-read-heap-buffer-overflow) #0 0x493a91 in __interceptor_strchr.part.35 /src/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:673 #1 0x813960 in ng_pkt libgit2/src/transports/smart_pkt.c:320:14 #2 0x810f79 in git_pkt_parse_line libgit2/src/transports/smart_pkt.c:478:9 #3 0x82c3c9 in git_smart__store_refs libgit2/src/transports/smart_protocol.c:47:12 #4 0x6373a2 in git_smart__connect libgit2/src/transports/smart.c:251:15 #5 0x57688f in git_remote_connect libgit2/src/remote.c:708:15 #6 0x52e59b in LLVMFuzzerTestOneInput /src/download_refs_fuzzer.cc:145:9 #7 0x52ef3f in ExecuteFilesOnyByOne(int, char**) /src/libfuzzer/afl/afl_driver.cpp:301:5 #8 0x52f4ee in main /src/libfuzzer/afl/afl_driver.cpp:339:12 #9 0x7f6c910db82f in __libc_start_main /build/glibc-Cl5G7W/glibc-2.23/csu/libc-start.c:291 #10 0x41d518 in _start When parsing an "ng" packet, we keep track of both the current position as well as the remaining length of the packet itself. But instead of taking care not to exceed the length, we pass the current pointer's position to `strchr`, which will search for a certain character until hitting NUL. It is thus possible to create a crafted packet which doesn't contain a NUL byte to trigger an out-of-bounds read. Fix the issue by instead using `memchr`, passing the remaining length as restriction. Furthermore, verify that we actually have enough bytes left to produce a match at all. OSS-Fuzz-Issue: 9406
| * travis: force usage of Xcode 8.3 imagePatrick Steinhardt2018-08-061-0/+1
|/ | | | | | | | Travis has upgraded the default Xcode images from 8.3 to 9.4 on 31st July 2018, including an upgrade to macOS 10.13. Unfortunately, this breaks our CI builds on our maintenance branches. As we do not want to include mayor changes to fix the integration right now, we force use of the old Xcode 8.3 images.
* Merge pull request #4718 from pks-t/pks/v0.26.5v0.26.5Patrick Steinhardt2018-07-095-30/+77
|\ | | | | Release v0.26.5
| * version: bump to v0.26.5Patrick Steinhardt2018-07-051-2/+2
| |
| * CHANGELOG: add release notes for v0.26.5Patrick Steinhardt2018-07-051-0/+23
| |
| * delta: fix overflow when computing limitPatrick Steinhardt2018-07-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking whether a delta base offset and length fit into the base we have in memory already, we can trigger an overflow which breaks the check. This would subsequently result in us reading memory from out of bounds of the base. The issue is easily fixed by checking for overflow when adding `off` and `len`, thus guaranteeting that we are never indexing beyond `base_len`. This corresponds to the git patch 8960844a7 (check patch_delta bounds more carefully, 2006-04-07), which adds these overflow checks. Reported-by: Riccardo Schirone <rschiron@redhat.com>
| * delta: fix out-of-bounds read of deltaPatrick Steinhardt2018-07-052-8/+19
| | | | | | | | | | | | | | | | | | | | | | When computing the offset and length of the delta base, we repeatedly increment the `delta` pointer without checking whether we have advanced past its end already, which can thus result in an out-of-bounds read. Fix this by repeatedly checking whether we have reached the end. Add a test which would cause Valgrind to produce an error. Reported-by: Riccardo Schirone <rschiron@redhat.com> Test-provided-by: Riccardo Schirone <rschiron@redhat.com>