-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Use heap after free in libcurl linked with Schannel #10309
Labels
Comments
Does this reproduce on the ver. 7.87.0? Your version is over two years old and
we've fixed over 2100 bugs since then.
|
@dfandrich It's an issue of libcurl v7.87.0. It was a typo in the initial post, then I edited it. |
@sergio-nsk thanks for the details. I can now understand what happens here and it seems indeed the same cause as in #10273. Working on a fix. |
icing
added a commit
to icing/curl
that referenced
this issue
Jan 17, 2023
…ng the `connectdata` instance since this may get free'ed on connection reuse. Refs curl#10309, curl#10273.
@icing I have tried the fix. It seems to fix the issue. Great job, thank you. Hope to get a corrective release 7.87.1 soon. |
bch
pushed a commit
to bch/curl
that referenced
this issue
Jul 19, 2023
- Copy the hostname and dispname to ssl_connect_data. Use a copy instead of referencing the `connectdata` instance since this may get free'ed on connection reuse. Reported-by: Stefan Talpalaru Reported-by: sergio-nsk@users.noreply.github.com Fixes curl#10273 Fixes curl#10309 Closes curl#10310
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From here, in
multi_runsingle()
on the line curl/lib/multi.c:1934,host.rawalloc
is freed:Curl_safefree(existing->host.rawalloc);
Later in the same function
multi_runsingle()
on the line curl/lib/multi.c:2469, it callsschannel_shutdown()
on the line curl/lib/vtls/schannel.c:2505 that accessesconnssl->hostname
that definitely points to somewhere inside the freed memory.This seems to be similar to the issue #10273
cUrl version
libcurl v7.87.0
operating system
Windows 10, Windows 11
The text was updated successfully, but these errors were encountered: