Bug 2265713 (CVE-2024-25629)

Summary: CVE-2024-25629 c-ares: Out of bounds read in ares__read_line()
Product: [Other] Security Response Reporter: Patrick Del Bello <pdelbell>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: atikhono, gsuckevi, hhorak, jorton, nodejs-maint, saroy
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: c-ares 1.27.0 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in c-ares where the ares__read_line() is used to parse local configuration files such as /etc/resolv.conf, /etc/nsswitch.conf, the HOSTALIASES file, and if using a c-ares version prior to 1.22.0, the /etc/hosts file. If the configuration files have an embedded NULL character as the first character in a new line, it can attempt to read memory before the start of the given buffer, which may result in a crash.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2265714, 2265715    
Bug Blocks: 2265712    

Description Patrick Del Bello 2024-02-23 19:03:45 UTC
c-ares is a C library for asynchronous DNS requests. `ares__read_line()` is used to parse local configuration files such as `/etc/resolv.conf`, `/etc/nsswitch.conf`, the `HOSTALIASES` file, and if using a c-ares version prior to 1.27.0, the `/etc/hosts` file. If any of these configuration files has an embedded `NULL` character as the first character in a new line, it can lead to attempting to read memory prior to the start of the given buffer which may result in a crash. This issue is fixed in c-ares 1.27.0. No known workarounds exist.

https://github.com/c-ares/c-ares/commit/a804c04ddc8245fc8adf0e92368709639125e183
https://github.com/c-ares/c-ares/security/advisories/GHSA-mg26-v6qh-x48q

Comment 1 Patrick Del Bello 2024-02-23 19:05:40 UTC
Created c-ares tracking bugs for this issue:

Affects: fedora-all [bug 2265714]

Comment 12 errata-xmlrpc 2024-05-09 06:18:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:2779 https://access.redhat.com/errata/RHSA-2024:2779

Comment 13 errata-xmlrpc 2024-05-09 06:20:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:2778 https://access.redhat.com/errata/RHSA-2024:2778

Comment 14 errata-xmlrpc 2024-05-09 06:21:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:2780 https://access.redhat.com/errata/RHSA-2024:2780

Comment 15 errata-xmlrpc 2024-05-15 11:28:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:2853 https://access.redhat.com/errata/RHSA-2024:2853

Comment 16 errata-xmlrpc 2024-05-20 02:06:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:2910 https://access.redhat.com/errata/RHSA-2024:2910

Comment 18 errata-xmlrpc 2024-06-11 19:25:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:3842 https://access.redhat.com/errata/RHSA-2024:3842

Comment 19 errata-xmlrpc 2024-07-02 15:24:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:4249 https://access.redhat.com/errata/RHSA-2024:4249

Comment 20 errata-xmlrpc 2024-07-16 12:44:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:4559 https://access.redhat.com/errata/RHSA-2024:4559

Comment 21 errata-xmlrpc 2024-07-23 08:35:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2024:4721 https://access.redhat.com/errata/RHSA-2024:4721