]> granicus.if.org Git - curl/log
curl
8 years agokrb5: avoid realloc(0)
Daniel Stenberg [Wed, 28 Sep 2016 10:56:02 +0000 (12:56 +0200)]
krb5: avoid realloc(0)

If the requested size is zero, bail out with error instead of doing a
realloc() that would cause a double-free: realloc(0) acts as a free()
and then there's a second free in the cleanup path.

CVE-2016-8619

Bug: https://curl.haxx.se/docs/adv_20161102E.html
Reported-by: Cure53
8 years agoaprintf: detect wrap-around when growing allocation
Daniel Stenberg [Wed, 28 Sep 2016 08:15:34 +0000 (10:15 +0200)]
aprintf: detect wrap-around when growing allocation

On 32bit systems we could otherwise wrap around after 2GB and allocate 0
bytes and crash.

CVE-2016-8618

Bug: https://curl.haxx.se/docs/adv_20161102D.html
Reported-by: Cure53
8 years agorange: reject char globs with missing end like '[L-]'
Daniel Stenberg [Tue, 4 Oct 2016 15:25:09 +0000 (17:25 +0200)]
range: reject char globs with missing end like '[L-]'

... which previously would lead to out of boundary reads.

Reported-by: Luật Nguyễn
8 years agoglob_next_url: make sure to stay within the given output buffer
Daniel Stenberg [Mon, 3 Oct 2016 16:23:22 +0000 (18:23 +0200)]
glob_next_url: make sure to stay within the given output buffer

8 years agorange: prevent negative end number in a glob range
Daniel Stenberg [Mon, 3 Oct 2016 15:27:16 +0000 (17:27 +0200)]
range: prevent negative end number in a glob range

CVE-2016-8620

Bug: https://curl.haxx.se/docs/adv_20161102F.html
Reported-by: Luật Nguyễn
8 years agoparsedate: handle cut off numbers better
Daniel Stenberg [Tue, 4 Oct 2016 14:59:38 +0000 (16:59 +0200)]
parsedate: handle cut off numbers better

... and don't read outside of the given buffer!

CVE-2016-8621

bug: https://curl.haxx.se/docs/adv_20161102G.html
Reported-by: Luật Nguyễn
8 years agoescape: avoid using curl_easy_unescape() internally
Daniel Stenberg [Sat, 8 Oct 2016 09:21:38 +0000 (11:21 +0200)]
escape: avoid using curl_easy_unescape() internally

Since the internal Curl_urldecode() function has a better API.

8 years agounescape: avoid integer overflow
Daniel Stenberg [Tue, 4 Oct 2016 16:56:45 +0000 (18:56 +0200)]
unescape: avoid integer overflow

CVE-2016-8622

Bug: https://curl.haxx.se/docs/adv_20161102H.html
Reported-by: Cure53
8 years agocookies: getlist() now holds deep copies of all cookies
Daniel Stenberg [Tue, 4 Oct 2016 21:26:13 +0000 (23:26 +0200)]
cookies: getlist() now holds deep copies of all cookies

Previously it only held references to them, which was reckless as the
thread lock was released so the cookies could get modified by other
handles that share the same cookie jar over the share interface.

CVE-2016-8623

Bug: https://curl.haxx.se/docs/adv_20161102I.html
Reported-by: Cure53
8 years agoTODO: remove IDNA2008
Daniel Stenberg [Mon, 24 Oct 2016 12:26:38 +0000 (14:26 +0200)]
TODO: remove IDNA2008

8 years agoidn: switch to libidn2 use and IDNA2008 support
Daniel Stenberg [Wed, 12 Oct 2016 07:01:06 +0000 (09:01 +0200)]
idn: switch to libidn2 use and IDNA2008 support

CVE-2016-8625

Bug: https://curl.haxx.se/docs/adv_20161102K.html
Reported-by: Christian Heimes
8 years agotest1246: verify URL parsing with host name ending with '#'
Daniel Stenberg [Mon, 10 Oct 2016 22:54:51 +0000 (00:54 +0200)]
test1246: verify URL parsing with host name ending with '#'

8 years agourlparse: accept '#' as end of host name
Daniel Stenberg [Mon, 10 Oct 2016 22:48:35 +0000 (00:48 +0200)]
urlparse: accept '#' as end of host name

'http://example.com#@127.0.0.1/x.txt' equals a request to example.com
for the '/' document with the rest of the URL being a fragment.

CVE-2016-8624

Bug: https://curl.haxx.se/docs/adv_20161102J.html
Reported-by: Fernando Muñoz
8 years agoINTERNALS: better markdown (follow-up)
Jay Satiro [Mon, 31 Oct 2016 04:38:27 +0000 (00:38 -0400)]
INTERNALS: better markdown (follow-up)

- Wrap more words with underscores in backticks.

Follow-up to 13f4913.

8 years agoINTERNALS: better markdown
Daniel Stenberg [Sun, 30 Oct 2016 22:45:25 +0000 (23:45 +0100)]
INTERNALS: better markdown

words with underscore need to be within `these`

Bug: https://github.com/curl/curl-www/issues/19
Reported-by : Jay Satiro

8 years agomk-ca-bundle.vbs: Fix UTF-8 output
Jay Satiro [Sun, 30 Oct 2016 05:01:29 +0000 (01:01 -0400)]
mk-ca-bundle.vbs: Fix UTF-8 output

- Change initial message box to mention delay when downloading/parsing.

Since there is no progress meter it was somewhat unexpected that after
choosing a filename nothing appears to happen, when actually the cert
data is in the process of being downloaded and parsed.

- Warn if OpenSSL is not present.

- Use a UTF-8 stream to make the ca-bundle data.

- Save the UTF-8 ca-bundle stream as binary so that no BOM is added.

---

This is a follow-up to d2c6d15 which switched mk-ca-bundle.vbs output to
ANSI due to corrupt UTF-8 output, now fixed.

This change completes making the default certificate bundle output of
mk-ca-bundle.vbs as close as possible to that of mk-ca-bundle.pl, which
should make it easier to review any difference between their output.

Ref: https://github.com/curl/curl/pull/1012

8 years agoBINDINGS: converted to markdown
Daniel Stenberg [Fri, 28 Oct 2016 07:46:49 +0000 (09:46 +0200)]
BINDINGS: converted to markdown

To make it render better on the web site, at the price of it becoming
slightly less readable as text.

8 years agoCURLMOPT_MAX_PIPELINE_LENGTH.3: Clarify it's not for HTTP/2
Jay Satiro [Fri, 28 Oct 2016 03:15:12 +0000 (23:15 -0400)]
CURLMOPT_MAX_PIPELINE_LENGTH.3: Clarify it's not for HTTP/2

- Clarify that this option is only for HTTP/1.1 pipelining.

Bug: https://github.com/curl/curl/issues/1059
Reported-by: Jeroen Ooms
Assisted-by: Daniel Stenberg
8 years agoKNOWN_BUGS: HTTP/2 server push enabled when no pushes can be accepted
Daniel Stenberg [Thu, 27 Oct 2016 21:47:59 +0000 (23:47 +0200)]
KNOWN_BUGS: HTTP/2 server push enabled when no pushes can be accepted

Closes #927

8 years agoKNOWN_BUGS: c-ares deviates from stock resolver on http://1346569778
Daniel Stenberg [Thu, 27 Oct 2016 21:45:58 +0000 (23:45 +0200)]
KNOWN_BUGS: c-ares deviates from stock resolver on http://1346569778

Closes #893

8 years agoconfigure.in: Fix test syntax
Michael Osipov [Thu, 27 Oct 2016 11:39:37 +0000 (13:39 +0200)]
configure.in: Fix test syntax

Some versions of test allow == for equality, but others (such as the HP-UX
version) do not.  Use a single = for correctness.

Error output:
checking for monotonic clock_gettime... ./configure[20445]: ==: A test command parameter is not valid.

8 years agoSECURITY: minor updates
Daniel Stenberg [Thu, 27 Oct 2016 08:21:52 +0000 (10:21 +0200)]
SECURITY: minor updates

- we allow the security push up to 48 hours before the release

- add a mention about possible pre-notifications

- lower case the 'curl-security' title

8 years agodocs: fix req->data in multi-uv example
Andrei Sedoi [Thu, 27 Oct 2016 06:43:04 +0000 (06:43 +0000)]
docs: fix req->data in multi-uv example

Closes #1088

8 years agombedtls: stop using deprecated include file
Daniel Stenberg [Wed, 26 Oct 2016 21:38:04 +0000 (23:38 +0200)]
mbedtls: stop using deprecated include file

Reported-by: wyattoday
Fixes #1087

8 years agonss: fix tight loop in non-blocking TLS handhsake over proxy
Martin Frodl [Mon, 24 Oct 2016 15:44:45 +0000 (17:44 +0200)]
nss: fix tight loop in non-blocking TLS handhsake over proxy

... in case the handshake completes before entering
CURLM_STATE_PROTOCONNECT

Bug: https://bugzilla.redhat.com/1388162

8 years agomk-ca-bundle: Update the vbscript version
Jay Satiro [Tue, 25 Oct 2016 07:17:26 +0000 (03:17 -0400)]
mk-ca-bundle: Update the vbscript version

Bring the VBScript version more in line with the perl version:

- Change timestamp to UTC.

- Change URL retrieval to HTTPS-only by default.

- Comment out the options that disabled SSL cert checking by default.

- Assume OpenSSL is present, get SHA256. And add a flag to toggle it.

- Fix cert issuer name output.

The cert issuer output is now ansi, converted from UTF-8. Prior to this
it was corrupt UTF-8. It turns out though we can work with UTF-8 the
FSO object that writes ca-bundle can't write UTF-8, so there will have
to be some alternative if UTF-8 is needed (like an ADODB.Stream).

- Disable the certificate text info feature.

The certificate text info doesn't work properly with any recent OpenSSL.

8 years agoTODO: indent code to make it render properly
Daniel Stenberg [Mon, 24 Oct 2016 12:03:08 +0000 (14:03 +0200)]
TODO: indent code to make it render properly

8 years agoTODO: Remove the generated include file
Daniel Stenberg [Mon, 24 Oct 2016 11:38:29 +0000 (13:38 +0200)]
TODO: Remove the generated include file

8 years agoTODO: add "--retry should resume"
Daniel Stenberg [Mon, 24 Oct 2016 09:56:26 +0000 (11:56 +0200)]
TODO: add "--retry should resume"

See #1084

8 years agomk-ca-bundle.1: document -k
Daniel Stenberg [Mon, 24 Oct 2016 08:24:27 +0000 (10:24 +0200)]
mk-ca-bundle.1: document -k

Brought in 1ad2bdcf110266c. Now does HTTPS by default and needs -k to
fall back to plain HTTP.

8 years agomk-ca-bundle: Change URL retrieval to HTTPS-only by default
Jay Satiro [Thu, 15 Sep 2016 06:26:56 +0000 (02:26 -0400)]
mk-ca-bundle: Change URL retrieval to HTTPS-only by default

- Change all predefined Mozilla URLs to HTTPS (Gregory Szorc).

- New option -k to allow URLs other than HTTPS and enable HTTP fallback.

Prior to this change the default URL retrieval mode was to fall back to
HTTP if HTTPS didn't work.

Reported-by: Gregory Szorc
Closes #1012

8 years agoRELEASE-NOTES: synced with 50ee3aaf1a9b22d
Daniel Stenberg [Mon, 24 Oct 2016 06:03:07 +0000 (08:03 +0200)]
RELEASE-NOTES: synced with 50ee3aaf1a9b22d

8 years agoINSTALL.md: Updated minimum file sizes for 7.50.3
Dan Fandrich [Sun, 23 Oct 2016 20:42:19 +0000 (22:42 +0200)]
INSTALL.md: Updated minimum file sizes for 7.50.3

8 years agomulti: force connections to get closed in close_all_connections
Daniel Stenberg [Fri, 21 Oct 2016 09:03:10 +0000 (11:03 +0200)]
multi: force connections to get closed in close_all_connections

Several independent reports on infinite loops hanging in the
close_all_connections() function when closing a multi handle, can be
fixed by first marking the connection to get closed before calling
Curl_disconnect.

This is more fixing-the-symptom rather than the underlying problem
though.

Bug: https://curl.haxx.se/mail/lib-2016-10/0011.html
Bug: https://curl.haxx.se/mail/lib-2016-10/0059.html

Reported-by: Dan Fandrich, Valentin David, Miloš Ljumović
8 years agocurl_multi_remove_handle: fix a double-free
Anders Bakken [Thu, 20 Oct 2016 16:37:05 +0000 (09:37 -0700)]
curl_multi_remove_handle: fix a double-free

In short the easy handle needs to be disconnected from its connection at
this point since the connection still is serving other easy handles.

In our app we can reliably reproduce a crash in our http2 stress test
that is fixed by this change. I can't easily reproduce the same test in
a small example.

This is the gdb/asan output:

==11785==ERROR: AddressSanitizer: heap-use-after-free on address 0xe9f4fb80 at pc 0x09f41f19 bp 0xf27be688 sp 0xf27be67c
READ of size 4 at 0xe9f4fb80 thread T13 (RESOURCE_HTTP)
    #0 0x9f41f18 in curl_multi_remove_handle /path/to/source/3rdparty/curl/lib/multi.c:666

0xe9f4fb80 is located 0 bytes inside of 1128-byte region [0xe9f4fb80,0xe9f4ffe8)
freed by thread T13 (RESOURCE_HTTP) here:
    #0 0xf7b1b5c2 in __interceptor_free /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_malloc_linux.cc:45
    #1 0x9f7862d in conn_free /path/to/source/3rdparty/curl/lib/url.c:2808
    #2 0x9f78c6a in Curl_disconnect /path/to/source/3rdparty/curl/lib/url.c:2876
    #3 0x9f41b09 in multi_done /path/to/source/3rdparty/curl/lib/multi.c:615
    #4 0x9f48017 in multi_runsingle /path/to/source/3rdparty/curl/lib/multi.c:1896
    #5 0x9f490f1 in curl_multi_perform /path/to/source/3rdparty/curl/lib/multi.c:2123
    #6 0x9c4443c in perform /path/to/source/src/net/resourcemanager/ResourceManagerCurlThread.cpp:854
    #7 0x9c445e0 in ...
    #8 0x9c4cf1d in ...
    #9 0xa2be6b5 in ...
    #10 0xf7aa5780 in asan_thread_start /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_interceptors.cc:226
    #11 0xf4d3a16d in __clone (/lib/i386-linux-gnu/libc.so.6+0xe716d)

previously allocated by thread T13 (RESOURCE_HTTP) here:
    #0 0xf7b1ba27 in __interceptor_calloc /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_malloc_linux.cc:70
    #1 0x9f7dfa6 in allocate_conn /path/to/source/3rdparty/curl/lib/url.c:3904
    #2 0x9f88ca0 in create_conn /path/to/source/3rdparty/curl/lib/url.c:5797
    #3 0x9f8c928 in Curl_connect /path/to/source/3rdparty/curl/lib/url.c:6438
    #4 0x9f45a8c in multi_runsingle /path/to/source/3rdparty/curl/lib/multi.c:1411
    #5 0x9f490f1 in curl_multi_perform /path/to/source/3rdparty/curl/lib/multi.c:2123
    #6 0x9c4443c in perform /path/to/source/src/net/resourcemanager/ResourceManagerCurlThread.cpp:854
    #7 0x9c445e0 in ...
    #8 0x9c4cf1d in ...
    #9 0xa2be6b5 in ...
    #10 0xf7aa5780 in asan_thread_start /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_interceptors.cc:226
    #11 0xf4d3a16d in __clone (/lib/i386-linux-gnu/libc.so.6+0xe716d)

SUMMARY: AddressSanitizer: heap-use-after-free /path/to/source/3rdparty/curl/lib/multi.c:666 in curl_multi_remove_handle
Shadow bytes around the buggy address:
  0x3d3e9f20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9f30: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9f40: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9f50: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa
  0x3d3e9f60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x3d3e9f70:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9f80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9f90: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9fa0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9fb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x3d3e9fc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==11785==ABORTING

Thread 14 "RESOURCE_HTTP" received signal SIGABRT, Aborted.
[Switching to Thread 0xf27bfb40 (LWP 12324)]
0xf7fd8be9 in __kernel_vsyscall ()
 (gdb) bt
 #0  0xf7fd8be9 in __kernel_vsyscall ()
 #1  0xf4c7ee89 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
 #2  0xf4c803e7 in __GI_abort () at abort.c:89
 #3  0xf7b2ef2e in __sanitizer::Abort () at /opt/toolchain/src/gcc-6.2.0/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc:122
 #4  0xf7b262fa in __sanitizer::Die () at /opt/toolchain/src/gcc-6.2.0/libsanitizer/sanitizer_common/sanitizer_common.cc:145
 #5  0xf7b21ab3 in __asan::ScopedInErrorReport::~ScopedInErrorReport (this=0xf27be171, __in_chrg=<optimized out>) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_report.cc:689
 #6  0xf7b214a5 in __asan::ReportGenericError (pc=166993689, bp=4068206216, sp=4068206204, addr=3925146496, is_write=false, access_size=4, exp=0, fatal=true) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_report.cc:1074
 #7  0xf7b21fce in __asan::__asan_report_load4 (addr=3925146496) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_rtl.cc:129
 #8  0x09f41f19 in curl_multi_remove_handle (multi=0xf3406080, data=0xde582400) at /path/to/source3rdparty/curl/lib/multi.c:666
 #9  0x09f6b277 in Curl_close (data=0xde582400) at /path/to/source3rdparty/curl/lib/url.c:415
 #10 0x09f3354e in curl_easy_cleanup (data=0xde582400) at /path/to/source3rdparty/curl/lib/easy.c:860
 #11 0x09c6de3f in ...
 #12 0x09c378c5 in ...
 #13 0x09c48133 in ...
 #14 0x09c4d092 in ...
 #15 0x0a2be6b6 in ...
 #16 0xf7aa5781 in asan_thread_start (arg=0xf2d22938) at /opt/toolchain/src/gcc-6.2.0/libsanitizer/asan/asan_interceptors.cc:226
 #17 0xf5de52b5 in start_thread (arg=0xf27bfb40) at pthread_create.c:333
 #18 0xf4d3a16e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114

Fixes #1083

8 years agotestcurl.1: fix the URL to the autobuild summary
Daniel Stenberg [Sat, 22 Oct 2016 13:15:34 +0000 (15:15 +0200)]
testcurl.1: fix the URL to the autobuild summary

8 years agotestcurl.1: update URLs
Daniel Stenberg [Sat, 22 Oct 2016 12:57:20 +0000 (14:57 +0200)]
testcurl.1: update URLs

8 years agoINSTALL: converted to markdown => INSTALL.md
Daniel Stenberg [Fri, 21 Oct 2016 13:55:24 +0000 (15:55 +0200)]
INSTALL: converted to markdown => INSTALL.md

Also heavily edited for content. Removed lots of old cruft that we added
like 10+ years ago that is likely incorrect by now.

Also removed INSTALL.devcpp for same reason.

8 years agoconfigure: Check for other variants of the -m*os*-version-min flags
Martin Storsjo [Thu, 20 Oct 2016 10:16:10 +0000 (13:16 +0300)]
configure: Check for other variants of the -m*os*-version-min flags

In addition to -miphoneos-version-min, the same version can be set
using -mios-version-min. And for WatchOS and TvOS, there's
-mwatchos-version-min and -mtvos-version-min.

8 years agoconfigure: set min version flags for builds on mac
Daniel Stenberg [Wed, 19 Oct 2016 12:36:32 +0000 (14:36 +0200)]
configure: set min version flags for builds on mac

This helps building binaries that can work on multiple macOS versions.

Help-by: Martin Storsjö
Fixes #1069

8 years agocurl_multi_add_handle: set timeouts in closure handles
Daniel Stenberg [Tue, 18 Oct 2016 15:32:01 +0000 (17:32 +0200)]
curl_multi_add_handle: set timeouts in closure handles

The closure handle only ever has default timeouts set. To improve the
state somewhat we clone the timeouts from each added handle so that the
closure handle always has the same timeouts as the most recently added
easy handle.

Fixes #739

8 years agoconfigure/CURL_CHECK_FUNC_POLL: disable poll completely on mac
Daniel Stenberg [Tue, 18 Oct 2016 20:42:53 +0000 (22:42 +0200)]
configure/CURL_CHECK_FUNC_POLL: disable poll completely on mac

... so that the same libcurl build easier can run on any version.

Follow-up to issue #1057

8 years agoRELEASE-NOTES: synced with f36f8c14551efc6772
Daniel Stenberg [Tue, 18 Oct 2016 15:17:54 +0000 (17:17 +0200)]
RELEASE-NOTES: synced with f36f8c14551efc6772

8 years agotest14xx: fixed --libcurl output tests again after 8e8afa82cbb
Daniel Stenberg [Tue, 18 Oct 2016 12:10:59 +0000 (14:10 +0200)]
test14xx: fixed --libcurl output tests again after 8e8afa82cbb

8 years agos/cURL/curl
Daniel Stenberg [Tue, 18 Oct 2016 11:59:54 +0000 (13:59 +0200)]
s/cURL/curl

The tool was never called cURL, only the project. But even so, we have
more and more over time switched to just use lower case.

8 years agopolarssl: indented code, removed unused variables
Daniel Stenberg [Tue, 18 Oct 2016 11:27:37 +0000 (13:27 +0200)]
polarssl: indented code, removed unused variables

8 years agopolarssl: reduce #ifdef madness with a macro
Daniel Stenberg [Tue, 18 Oct 2016 11:17:05 +0000 (13:17 +0200)]
polarssl: reduce #ifdef madness with a macro

8 years agopolarssl: fix unaligned SSL session-id lock
Daniel Stenberg [Tue, 18 Oct 2016 11:11:55 +0000 (13:11 +0200)]
polarssl: fix unaligned SSL session-id lock

8 years agoCurl_polarsslthreadlock_thread_setup: clear array at init
Daniel Stenberg [Tue, 18 Oct 2016 11:05:43 +0000 (13:05 +0200)]
Curl_polarsslthreadlock_thread_setup: clear array at init

... since if it fails to init the entire array and then tries to clean
it up, it would attempt to work on an uninitialized pointer.

8 years agocurl: set INTERLEAVEDATA too
Daniel Stenberg [Tue, 18 Oct 2016 10:09:56 +0000 (12:09 +0200)]
curl: set INTERLEAVEDATA too

As otherwise the callback could be called with a NULL pointer when RTSP
data is provided.

8 years agogopher: properly return error for poll failures
Daniel Stenberg [Tue, 18 Oct 2016 09:12:03 +0000 (11:12 +0200)]
gopher: properly return error for poll failures

8 years agoselect: switch to macros in uppercase
Daniel Stenberg [Tue, 18 Oct 2016 08:58:58 +0000 (10:58 +0200)]
select: switch to macros in uppercase

Curl_select_ready() was the former API that was replaced with
Curl_select_check() a while back and the former arg setup was provided
with a define (in order to leave existing code unmodified).

Now we instead offer SOCKET_READABLE and SOCKET_WRITABLE for the most
common shortcuts where only one socket is checked. They're also more
visibly macros.

8 years agoselect: use more proper macro-looking names
Daniel Stenberg [Tue, 18 Oct 2016 07:46:10 +0000 (09:46 +0200)]
select: use more proper macro-looking names

... so that it becomes more obvious in the code what is what. Also added
a typecast for one of the calculations.

8 years agoCurl_socket_check: add extra check to avoid integer overflow
Daniel Stenberg [Tue, 18 Oct 2016 07:45:34 +0000 (09:45 +0200)]
Curl_socket_check: add extra check to avoid integer overflow

8 years agomaketgz: make it support "only" generating version info
Daniel Stenberg [Mon, 10 Oct 2016 12:11:44 +0000 (14:11 +0200)]
maketgz: make it support "only" generating version info

... to allow you to update the local repository with the given version
number data.

8 years agourl: skip to-be-closed connections when pipelining (follow-up)
Jay Satiro [Mon, 17 Oct 2016 06:44:39 +0000 (02:44 -0400)]
url: skip to-be-closed connections when pipelining (follow-up)

- Change back behavior so that pipelining is considered possible for
connections that have not yet reached the protocol level.

This is a follow-up to e5f0b1a which had changed the behavior of
checking if pipelining is possible to ignore connections that had
'bits.close' set. Connections that have not yet reached the protocol
level also have that bit set, and we need to consider pipelining
possible on those connections.

8 years agoHTTP2: mention the tool's limited support
Daniel Stenberg [Mon, 17 Oct 2016 06:01:44 +0000 (08:01 +0200)]
HTTP2: mention the tool's limited support

8 years agoRELEASE-NOTES: synced with a1a5cd04877fd6fd
Daniel Stenberg [Sun, 16 Oct 2016 11:31:42 +0000 (13:31 +0200)]
RELEASE-NOTES: synced with a1a5cd04877fd6fd

8 years agocurl: do not set CURLOPT_SSLENGINEDEFAULT automatically
David Woodhouse [Tue, 23 Aug 2016 10:46:23 +0000 (11:46 +0100)]
curl: do not set CURLOPT_SSLENGINEDEFAULT automatically

There were bugs in the PKCS#11 engine, and fixing them triggers bugs in
OpenSSL. Just don't get involved; there's no need to be making the
engine methods the default anyway.

https://github.com/OpenSC/libp11/pull/108
https://github.com/openssl/openssl/pull/1639

Merges #1042

8 years agoKNOWN_BUGS: two more existing problems
Daniel Stenberg [Sun, 16 Oct 2016 10:54:59 +0000 (12:54 +0200)]
KNOWN_BUGS: two more existing problems

8 years agowin: fix Universal Windows Platform build
Marcel Raad [Sat, 1 Oct 2016 15:55:37 +0000 (17:55 +0200)]
win: fix Universal Windows Platform build

This fixes a merge error in commit 7f3df80 caused by commit 332e8d6.

Additionally, this changes Curl_verify_windows_version for Windows App
builds to assume to always be running on the target Windows version.
There seems to be no way to determine the Windows version from a
UWP app. Neither GetVersion(Ex), nor VerifyVersionInfo, nor the
Version Helper functions are supported.

Bug: https://github.com/curl/curl/pull/820#issuecomment-250889878
Reported-by: Paul Joyce
Closes https://github.com/curl/curl/pull/1048

8 years agoKNOWN_BUGS: minor formatting edit
Daniel Stenberg [Sun, 16 Oct 2016 09:53:54 +0000 (11:53 +0200)]
KNOWN_BUGS: minor formatting edit

8 years agourl: skip to-be-closed connections when pipelining
Rider Linden [Fri, 19 Feb 2016 19:18:33 +0000 (11:18 -0800)]
url: skip to-be-closed connections when pipelining

No longer attempt to use "doomed" to-be-closed connections when
pipelining. Prior to this change connections marked for deletion (e.g.
timeout) would be erroneously used, resulting in sporadic crashes.

As originally reported and fixed by Carlo Wood (origin unknown).

Bug: https://github.com/curl/curl/issues/627
Reported-by: Rider Linden
Closes https://github.com/curl/curl/pull/1075
Participation-by: nopjmp@users.noreply.github.com
8 years agovtls: only re-use session-ids using the same scheme
Daniel Stenberg [Mon, 10 Oct 2016 14:47:54 +0000 (16:47 +0200)]
vtls: only re-use session-ids using the same scheme

To make it harder to do cross-protocol mistakes

8 years agodist: add missing cmake modules to the tarball
Torben Dannhauer [Tue, 11 Oct 2016 10:08:31 +0000 (12:08 +0200)]
dist: add missing cmake modules to the tarball

Closes https://github.com/curl/curl/pull/1070

8 years agoconfigure: detect the broken poll() in macOS 10.12
Daniel Stenberg [Tue, 11 Oct 2016 09:04:06 +0000 (11:04 +0200)]
configure: detect the broken poll() in macOS 10.12

Fixes #1057

8 years agodist: remove PDF and HTML converted docs from the releases
Daniel Stenberg [Mon, 10 Oct 2016 06:42:26 +0000 (08:42 +0200)]
dist: remove PDF and HTML converted docs from the releases

8 years agocmake: add nghttp2 support
Remo E [Thu, 21 Jul 2016 09:28:54 +0000 (11:28 +0200)]
cmake: add nghttp2 support

Closes #922

8 years agoresolve: add error message when resolving using SIGALRM
Andreas Streichardt [Mon, 10 Oct 2016 11:08:24 +0000 (13:08 +0200)]
resolve: add error message when resolving using SIGALRM

Closes #1066

8 years agoGIT-INFO: remove the Mac 10.1-specific details
Daniel Stenberg [Mon, 10 Oct 2016 08:29:19 +0000 (10:29 +0200)]
GIT-INFO: remove the Mac 10.1-specific details

There shouldn't be many devs out there anymore using such outdated macOS
versions. And it removes the dead link.

Closes #1049

8 years agoRELEASE-NOTES: spellfix
Daniel Stenberg [Mon, 10 Oct 2016 06:14:28 +0000 (08:14 +0200)]
RELEASE-NOTES: spellfix

8 years agoRELEASE-NOTES: synced with 82720490628cb53a
Daniel Stenberg [Mon, 10 Oct 2016 06:13:01 +0000 (08:13 +0200)]
RELEASE-NOTES: synced with 82720490628cb53a

5 more fixes, 2 more contributors

8 years agosmb: properly check incoming packet boundaries
Tobias Stoeckmann [Mon, 3 Oct 2016 19:48:31 +0000 (21:48 +0200)]
smb: properly check incoming packet boundaries

Not all reply messages were properly checked for their lengths, which
made it possible to access uninitialized memory (but this does not lead
to out of boundary accesses).

Closes #1052

8 years agotest557: verify printf() with 128 and 129 arguments
Daniel Stenberg [Sat, 8 Oct 2016 18:47:44 +0000 (20:47 +0200)]
test557: verify printf() with 128 and 129 arguments

8 years agomprintf: return error on too many arguments
Daniel Stenberg [Sat, 8 Oct 2016 18:47:04 +0000 (20:47 +0200)]
mprintf: return error on too many arguments

128 arguments should be enough for everyone

8 years agoftp: fix Curl_ftpsendf()
Daniel Stenberg [Sat, 8 Oct 2016 11:39:29 +0000 (13:39 +0200)]
ftp: fix Curl_ftpsendf()

... it no longer takes printf() arguments since it was only really taken
advantage by one user and it was not written and used in a safe
way. Thus the 'f' is removed from the function name and the proto is
changed.

Although the current code wouldn't end up in badness, it was a risk that
future changes could end up springf()ing too large data or passing in a
format string inadvertently.

8 years agoformpost: avoid silent snprintf() truncation
Daniel Stenberg [Sat, 8 Oct 2016 10:50:42 +0000 (12:50 +0200)]
formpost: avoid silent snprintf() truncation

The previous use of snprintf() could make libcurl silently truncate some
input data and not report that back on overly large input, which could
make data get sent over the network in a bad format.

Example:

 $ curl --form 'a=b' -H "Content-Type: $(perl -e 'print "A"x4100')"

8 years agoTODO: build: Enable PIE and RELRO by default
Daniel Stenberg [Sat, 8 Oct 2016 10:17:26 +0000 (12:17 +0200)]
TODO: build: Enable PIE and RELRO by default

8 years agoTODO: Support better than MD5 hostkey hash (for ssh)
Daniel Stenberg [Sat, 8 Oct 2016 09:51:21 +0000 (11:51 +0200)]
TODO: Support better than MD5 hostkey hash (for ssh)

8 years agotests: Fix a small typo in the tests README (#1060)
Daniel Gustafsson [Sat, 8 Oct 2016 09:39:12 +0000 (11:39 +0200)]
tests: Fix a small typo in the tests README (#1060)

The subdirectory for logs in tests/ is named log/ without an 's'
at the end.

8 years agoTODO: Introduce --fail-fast to exit on first transfer fail
Daniel Stenberg [Thu, 6 Oct 2016 15:45:06 +0000 (17:45 +0200)]
TODO: Introduce --fail-fast to exit on first transfer fail

See #1054

8 years agoTODO: Leave secure cookies alone
Daniel Stenberg [Thu, 6 Oct 2016 07:40:47 +0000 (09:40 +0200)]
TODO: Leave secure cookies alone

8 years agoCURLOPT_DEBUGFUNCTION.3: unused argument warning (#1056)
Rainer Müller [Thu, 6 Oct 2016 06:06:13 +0000 (08:06 +0200)]
CURLOPT_DEBUGFUNCTION.3: unused argument warning (#1056)

The 'userp' argument is unused in this example code.

8 years agoTODO: TCP Fast Open for windows
Daniel Stenberg [Wed, 5 Oct 2016 09:50:50 +0000 (11:50 +0200)]
TODO: TCP Fast Open for windows

8 years agoRELEASE-NOTES: synced with 8fd2a754f0de
Daniel Stenberg [Tue, 4 Oct 2016 21:50:24 +0000 (23:50 +0200)]
RELEASE-NOTES: synced with 8fd2a754f0de

8 years agoCURLOPT_KEEP_SENDING_ON_ERROR.3: mention when it is added
Daniel Stenberg [Tue, 4 Oct 2016 21:46:45 +0000 (23:46 +0200)]
CURLOPT_KEEP_SENDING_ON_ERROR.3: mention when it is added

8 years agomemdup: use 'void *' as return and source type
Daniel Stenberg [Tue, 4 Oct 2016 21:18:52 +0000 (23:18 +0200)]
memdup: use 'void *' as return and source type

8 years agoTODO: Add easy argument to formpost functions
Daniel Stenberg [Tue, 4 Oct 2016 16:34:31 +0000 (18:34 +0200)]
TODO: Add easy argument to formpost functions

8 years agoformpost: trying to attach a directory no longer crashes
Daniel Stenberg [Tue, 4 Oct 2016 07:13:02 +0000 (09:13 +0200)]
formpost: trying to attach a directory no longer crashes

The error path would previously add a freed entry to the linked list.

Reported-by: Toby Peterson
Fixes #1053

8 years agocookies: same domain handling changed to match browser behavior
Sergei Kuzmin [Mon, 3 Oct 2016 04:34:59 +0000 (21:34 -0700)]
cookies: same domain handling changed to match browser behavior

Cokie with the same domain but different tailmatching property are now
considered different and do not replace each other.  If header contains
following lines then two cookies will be set: Set-Cookie: foo=bar;
domain=.foo.com; expires=Thu Mar 3 GMT 8:56:27 2033 Set-Cookie: foo=baz;
domain=foo.com; expires=Thu Mar 3 GMT 8:56:27 2033

This matches Chrome, Opera, Safari, and Firefox behavior. When sending
stored tokens to foo.com Chrome, Opera, Firefox store send them in the
stored order, while Safari pre-sort the cookies.

Closes #1050

8 years agoFAQ: Fix typos in section 5.14 (#1047)
Stephen Brokenshire [Sat, 1 Oct 2016 15:36:50 +0000 (16:36 +0100)]
FAQ: Fix typos in section 5.14 (#1047)

Type required for YourClass::func C++ function (using size_t in line
with the documentation for CURLOPT_WRITEFUNCTION) and missing second
colon when specifying the static function for CURLOPT_WRITEFUNCTION.

8 years agoKNOWN_BUGS: Fix typos in section 5.8.
Sebastian Mundry [Fri, 30 Sep 2016 18:34:21 +0000 (20:34 +0200)]
KNOWN_BUGS: Fix typos in section 5.8.

Closes #1046

8 years agoCONTRIBUTE.md: Fix typo in 'About pull requests' section. (#1045)
mundry [Fri, 30 Sep 2016 18:49:48 +0000 (20:49 +0200)]
CONTRIBUTE.md: Fix typo in 'About pull requests' section. (#1045)

8 years agocurl.1: --trace supports % for sending to stderr!
Daniel Stenberg [Fri, 30 Sep 2016 15:14:39 +0000 (17:14 +0200)]
curl.1: --trace supports % for sending to stderr!

8 years agoKNOWN_BUGS: 5.8 configure finding libs in wrong directory
Daniel Stenberg [Mon, 26 Sep 2016 09:44:00 +0000 (11:44 +0200)]
KNOWN_BUGS: 5.8 configure finding libs in wrong directory

8 years agoconfigure: Fixed builds with libssh2 in a custom location
Dan Fandrich [Sat, 24 Sep 2016 06:52:01 +0000 (08:52 +0200)]
configure: Fixed builds with libssh2 in a custom location

A libssh2 library in the standard system location was being used in
preference to the desired one while linking.

8 years agoSECURITY: remove the top ascii logo
Daniel Stenberg [Fri, 23 Sep 2016 20:11:55 +0000 (22:11 +0200)]
SECURITY: remove the top ascii logo

8 years agoNew libcurl option to keep sending on error
Michael Kaufmann [Thu, 22 Sep 2016 20:15:13 +0000 (22:15 +0200)]
New libcurl option to keep sending on error

Add the new option CURLOPT_KEEP_SENDING_ON_ERROR to control whether
sending the request body shall be completed when the server responds
early with an error status code.

This is suitable for manual NTLM authentication.

Reviewed-by: Jay Satiro
Closes https://github.com/curl/curl/pull/904

8 years agonss: add chacha20-poly1305 cipher suites if supported by NSS
Kamil Dudka [Mon, 19 Sep 2016 15:45:53 +0000 (17:45 +0200)]
nss: add chacha20-poly1305 cipher suites if supported by NSS

8 years agonss: add cipher suites using SHA384 if supported by NSS
Kamil Dudka [Mon, 19 Sep 2016 15:38:23 +0000 (17:38 +0200)]
nss: add cipher suites using SHA384 if supported by NSS