-
Notifications
You must be signed in to change notification settings - Fork 9
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
TclCurl curl::versioninfo core dump, buffer overflow in curlVersion() #25
Comments
We ran into this other seemingly unrelated problem: curl/curl#10830 For us, the fix for that was to rebuild the stock Ubuntu 22.04.3 LTS curl source packages "--with-libssh2 --without-libssh". In other words, no changes to the source code, just switching the curl library to use ssh-2 instead of ssh-1. Surprisingly, doing that ALSO made the TclCurl curl::versioninfo crash above go away! Now curl::versioninfo works normally again. |
did you build your TclCurl from source, or was it a binary install? |
All binary installs, the stock binary packages from Ubuntu 22.04.03 on x86-64. That's what crashed on curl::version. Later, we rebuilt the Ubuntu curl source package using the different configure option, which coincidentally made the crash go away. That did not touch the TclCurl package at all, but of course changed the Curl library, which TclCurl uses. Maybe that means the original Ubuntu binary package build was bad in some way. Or maybe there's a real bug that's still in there somewhere, but hidden somehow by our switch from libssh to libssh2. I don't know, I'm just guessing. |
My question was specifically about the origin of your TclCurl, not libcurl. ABI differences are probably the cause if TclCurl was compiled against one version of libcurl, and then the libcurl was changed or replaced with a different version or binary distribution (without recompiling TclCurl). |
ALL our packages were stock binary packages from Ubuntu, including TclCurl. TclCurl still is. The only thing we changed was rebuilding the Curl source package with different configure options, which, surprisingly, made the crash go away. |
I believe this was caused by a
The associated PR has a fix to eliminate that fixed-size buffer. |
With tclcurl in Ubuntu 22.04.03 LTS, simply calling curl::version immediately core dumps, with a buffer overflow in __vsprintf_internal and curlVersion. Stack trace and other details below. This did not happen in earlier versions of Ubuntu, neither 20.04 nor 18.04. I have not tested on any other systems.
This is a really easy bug to reproduce with TclCurl, but I do not know whether the real problem is in TclCurl, libcurl, or something specific to how Ubuntu or Debian builds those libraries. I looked for Ubuntu and Debian tclcurl bug trackers, and could not find any that seem to actually be in use, instead of abandoned and ignored. Thus I'm reporting it here.
Reproduce the problem:
More info on the software versions where the crash occurred:
The text was updated successfully, but these errors were encountered: