Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-14393

libcurl bug that crashes perl coredump when perl-WWW-Curl's CURLOPT_RESOLVE option is used

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Blocker Blocker
    • None
    • CentOS Stream 9
    • curl
    • None
    • None
    • Moderate
    • sst_cs_plumbers
    • ssg_core_services
    • None
    • None
    • None
    • None
    • None
    • All
    • None

      What were you trying to do that didn't work?

      I didn't see a way to select libcurl for the package with the problem so I selected curl.  The problem is in libcurl and not curl.

      Use libcurl's CURLOPT_RESOLV feature to bypass DNS to check IPs different than DNS resolves to.  I am using the perl-WWW-Curl package by EPEL.  The bug is not in the perl package though but in libcurl itself which is a baseos package.

      The bug was posted awhile ago below.  This is the jist of it though...
      https://github.com/szbalint/WWW-Curl/issues/9

      "The issue only appears in 4.17; 4.16 is OK.

      It was introduced by commit 499baf9, (https://github.com/szbalint/WWW--Curl/commit/499baf9c3689c23dfc49196570fb230076c935de)
      which adds preprocessor conditionals based on whether CURLOPT_RESOLVE is defined:

      +#ifdef CURLOPT_RESOLVE SLIST_RESOLVE, SLIST_RESOLVE, +#endif

      Unfortunately, CURLOPT_RESOLVE is an enum, and NOT a preprocessor macro, so in effect this commit removed support for CURLOPT_RESOLVE, and results in a perl crash if the option is used."

      Please provide the package NVR for which bug is seen:

      How reproducible:

      Every time

      Steps to reproduce

      1. Try to use the CURLOPT_RESOLV feature
      2. The link further above provides example code to replicate the problem.  Any use of setting CURLOPT_RESOLVE causes the crash because of the bug with the change that tried to use preprocessor condition on enums.  That causes the code to not be compiled in by accident.  The previous version 4.16 worked that didn't have that commit.
      3.  

      Expected results

      Use of CURLOPT_RESOLV not crash perl.

      I am hoping that last commit can be removed so that we can use the CURLOPT_RESOLV feature again.

      Actual results

      core dump

            jmigacz@redhat.com Jacek Migacz
            xstatica Adam Gibson (Inactive)
            Jacek Migacz Jacek Migacz
            Daniel Rusek Daniel Rusek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: