Skip to content

Upgrade c-ares to 1.19.1#39

Merged
chaitu236 merged 5 commits intoni:nilrt/master/kirkstonefrom
mike-petersen-ni:pick-cve-fix/c-ares
Jun 30, 2023
Merged

Upgrade c-ares to 1.19.1#39
chaitu236 merged 5 commits intoni:nilrt/master/kirkstonefrom
mike-petersen-ni:pick-cve-fix/c-ares

Conversation

@mike-petersen-ni
Copy link

@mike-petersen-ni mike-petersen-ni commented Jun 30, 2023

Testing

  • built
  • reran CVE check for c-ares:
    • verified that it reports CVEs as patched
    • verified that it reports the CVEs previously addressed by individual patch files (CVE-2022-4904, CVE-2023-31130, CVE-2023-32067) are still patched

AB#2435273

@mike-petersen-ni mike-petersen-ni requested a review from a team June 30, 2023 14:09
Copy link

@gratian gratian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship It!

Small nitpick: I think the convention for adding comments about resolved conflicts is to use square brackets '[' instead of '('.
I think it may also be exempt from line wrapping rules but I'm not 100% sure on this part.

@mike-petersen-ni
Copy link
Author

Patch v2: reformat conflict resolution text

Mike Petersen and others added 5 commits June 30, 2023 13:53
This reverts commit 5adcef0.

Signed-off-by: Mike Petersen <mike.petersen@ni.com>
This reverts commit c34b8aa.

Signed-off-by: Mike Petersen <mike.petersen@ni.com>
This reverts commit 092e125.

Signed-off-by: Mike Petersen <mike.petersen@ni.com>
Changelog:
=========
Security:
----------
Low. Stack overflow in ares_set_sortlist() which is used during c-ares initialization and typically provided by an administrator and not an end user.

Changes:
----------
Windows: Drop support for XP and derivatives which greatly cleans up initialization code.
Add ARES_OPT_HOSTS_FILE similar to ARES_OPT_RESOLVCONF for specifying a custom hosts file location.
Add vcpkg installation instructions

Bug fixes:
------------
Fix cross-compilation from Windows to Linux due to CPACK logic.
Fix memory leak in reading /etc/hosts when using localhost fallback.
Fix chain building c-ares when libresolv is already included by another project
File lookup should not immediately abort as there may be other tries due to search criteria.
Asterisks should be allowed in host validation as CNAMEs may reference wildcard domains
AutoTools build system referenced bad STDC_HEADERS macro
Even if one address class returns a failure for ares_getaddrinfo() we should still return the results we have
CMake Windows: DLLs did not include resource file to include versions
CMake: Guard target creation in exported config
Fix ares_getaddrinfo() numerical address resolution with AF_UNSPEC
Apple: fix libresolv configured query times.
Fix tools and help information
Various documentation fixes and cleanups
Add include guards to ares_data.h
c-ares could try to exceed maximum number of iovec entries supported by system
CMake package config generation allow for absolute install paths
Intel compiler fixes
ares_strsplit bugs
The RFC6761 6.3 states localhost subdomains must be offline too.

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 4e35ff8)
Signed-off-by: Mike Petersen <mike.petersen@ni.com>
Changelog:
==========
Security
---------
- CVE-2023-32067. High. 0-byte UDP payload causes Denial of Service [12]
- CVE-2023-31147. Moderate. Insufficient randomness in generation of DNS
query IDs [13]
- CVE-2023-31130. Moderate. Buffer Underwrite in ares_inet_net_pton() [14]
- CVE-2023-31124. Low. AutoTools does not set CARES_RANDOM_FILE during cross
compilation [15]

Bug fixes
----------
- Fix uninitialized memory warning in test [1]
- Turn off IPV6_V6ONLY on Windows to allow IPv4-mapped IPv6 addresses [2]
- ares_getaddrinfo() should allow a port of 0 [3]
- Fix memory leak in ares_send() on error [4]
- Fix comment style in ares_data.h [5]
- Remove unneeded ifdef for Windows [6]
- Fix typo in ares_init_options.3 [7]
- Re-add support for Watcom compiler [8]
- Sync ax_pthread.m4 with upstream [9]
- Windows: Invalid stack variable used out of scope for HOSTS path [10]
- Sync ax_cxx_compile_stdcxx_11.m4 with upstream to fix uclibc support [11]

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 85c7e7b)
Signed-off-by: Mike Petersen <mike.petersen@ni.com>
@mike-petersen-ni
Copy link
Author

Patch v3: restructure commits to first revert CVE patch commits, then cherry-pick upgrades

@chaitu236 chaitu236 merged commit b766f84 into ni:nilrt/master/kirkstone Jun 30, 2023
@mike-petersen-ni mike-petersen-ni deleted the pick-cve-fix/c-ares branch July 10, 2023 13:07
@chaitu236 chaitu236 mentioned this pull request Aug 2, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants