CVE-2023-31130: Buffer Underwrite in ares_inet_net_pton()

Published May 24, 2023
·
Updated

aresinetnetpton() is vulnerable to a buffer underflow for certain ipv6 addresses, in particular "0::00:00:00/2" was found to cause an issue. C-ares only uses this function internally for configuration purposes which would require an administrator to configure such an address via aressetsortlist().

CVE-2023-31130. Moderate. Buffer Underwrite in aresinetnetpton() (https://github.com/c-ares/c-ares/security/advisories/GHSA-x6mf-cxr9-8q6v)

Other sources

c-ares could provide weaker than expected security, caused by a buffer underflow in aresinetnetpton(). A remote attacker could exploit this vulnerability to launch further attacks on the system.

IBM

c-ares is an asynchronous resolver library. aresinetnetpton() is vulnerable to a buffer underflow for certain ipv6 addresses, in particular "0::00:00:00/2" was found to cause an issue. C-ares only uses this function internally for configuration purposes which would require an administrator to configure such an address via aressetsortlist(). However, users may externally use aresinetnetpton() for other purposes and thus be vulnerable to more severe issues. This issue has been fixed in 1.19.1.

Ubuntu

Affected Software

24 affected componentsFixes available
ubuntu/c-ares<1.14.0-1ubuntu0.2+
1.14.0-1ubuntu0.2+
ubuntu/c-ares<1.10.0-3ubuntu0.2+
1.10.0-3ubuntu0.2+
ubuntu/c-ares<1.19.1, <1.18.1-3
1.19.11.18.1-3
ubuntu/c-ares<1.15.0-1ubuntu0.3
1.15.0-1ubuntu0.3
ubuntu/c-ares<1.18.1-1ubuntu0.22.04.2
1.18.1-1ubuntu0.22.04.2
ubuntu/c-ares<1.18.1-1ubuntu0.22.10.2
1.18.1-1ubuntu0.22.10.2
ubuntu/c-ares<1.18.1-2ubuntu0.1
1.18.1-2ubuntu0.1
debian/c-ares<=1.14.0-1+deb10u1
1.14.0-1+deb10u41.17.1-1+deb11u31.18.1-31.26.0-1
IBM Cognos Analytics<=12.0.0-12.0.3
IBM Cognos Analytics<=11.2.0-11.2.4 FP4
C-ares Project C-ares<1.19.1
Fedoraproject Fedora=37
Fedoraproject Fedora=38
Debian Debian Linux=10.0
Debian Debian Linux=11.0
Microsoft azl3 grpc 1.42.0-7
Microsoft cbl2 c-ares 1.19.1-1
Microsoft azl3 grpc 1.62.0-2
Microsoft cbl2 nodejs18 18.17.1-2
Microsoft cm1 c-ares 1.19.1-1
Microsoft cbl2 fluent-bit 2.1.10-1
Microsoft cbl2 python-gevent 21.1.2-3
Microsoft cbl2 nodejs 16.20.1-2
Microsoft cbl2 grpc 1.42.0-11

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.14.0-1ubuntu0.2+
  2. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.10.0-3ubuntu0.2+
  3. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.19.1Fixed in 1.18.1-3
  4. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.15.0-1ubuntu0.3
  5. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.18.1-1ubuntu0.22.04.2
  6. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.18.1-1ubuntu0.22.10.2
  7. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.18.1-2ubuntu0.1
  8. Upgrade

    Upgrade debian/c-ares to a version that resolves this vulnerability.

    Fixed in 1.14.0-1+deb10u4Fixed in 1.17.1-1+deb11u3Fixed in 1.18.1-3Fixed in 1.26.0-1
  9. Upgrade

    Upgrade c-ares to a version that resolves this vulnerability.

    Fixed in 1.19.1
  10. Upgrade

    Upgrade debian/c-ares to a version that resolves this vulnerability.

    Fixed in 1.14.0-1+deb10u4
  11. Upgrade

    Upgrade debian/c-ares to a version that resolves this vulnerability.

    Fixed in 1.17.1-1+deb11u3
  12. Upgrade

    Upgrade debian/c-ares to a version that resolves this vulnerability.

    Fixed in 1.18.1-3
  13. Upgrade

    Upgrade debian/c-ares to a version that resolves this vulnerability.

    Fixed in 1.26.0-1
  14. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.19.1
  15. Upgrade

    Upgrade ubuntu/c-ares to a version that resolves this vulnerability.

    Fixed in 1.18.1-3
  16. Configuration

    Do not configure the IPv6 address '0::00:00:00/2' (or other untrusted IPv6 sortlist entries) via ares_set_sortlist(); avoid adding untrusted values to sortlist.

    c-ares (ares_set_sortlist) sortlist entries = avoid adding '0::00:00:00/2' or other untrusted IPv6 addresses
  17. Configuration

    Avoid calling ares_inet_net_pton() with untrusted or externally-supplied input; validate or sanitize IPv6 inputs before use.

    c-ares (ares_inet_net_pton) usage on untrusted input = do not use on untrusted input
  18. Operational

    Inspect configurations and code for use of ares_set_sortlist() and ares_inet_net_pton(); remove or sanitize any entries like '0::00:00:00/2'. After remediation, apply the appropriate package updates listed above for your distribution.

Event History

May 24, 2023
Data Sourced
via Red Hat·03:56 AM
DescriptionSeverityAffected Software
May 25, 2023
CVE Published
via Ubuntu·12:00 AM
CVE Published
via MITRE·09:45 PM
Data Sourced
via MITRE·09:45 PM
DescriptionSeverityWeakness
May 30, 2023
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Jan 12, 2024
Data Sourced
via Launchpad·12:18 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this issue?

The vulnerability ID for this issue is CVE-2023-31130.

2

What is the severity level of CVE-2023-31130?

The severity level of CVE-2023-31130 is medium.

3

What is the affected software?

The affected software includes c-ares versions up to and including 1.19.1, Fedora 37 and 38, and various versions of Ubuntu and Debian packages.

4

What is the description of CVE-2023-31130?

CVE-2023-31130 is a vulnerability in c-ares library that allows a buffer underflow for certain IPv6 addresses.

5

How can I fix CVE-2023-31130?

To fix CVE-2023-31130, update to a version of c-ares that is not affected by this vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203