Bug 2237782 (CVE-2023-4806) - CVE-2023-4806 glibc: potential use-after-free in getaddrinfo()
Summary: CVE-2023-4806 glibc: potential use-after-free in getaddrinfo()
Keywords:
Status: NEW
Alias: CVE-2023-4806
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2238604
Blocks: 2234719
TreeView+ depends on / blocked
 
Reported: 2023-09-06 20:48 UTC by Guilherme de Almeida Suckevicz
Modified: 2025-01-03 08:27 UTC (History)
40 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2023:5495 0 None None None 2023-10-09 01:01:23 UTC
Red Hat Product Errata RHBA-2023:5496 0 None None None 2023-10-09 01:03:10 UTC
Red Hat Product Errata RHBA-2023:5497 0 None None None 2023-10-09 01:11:13 UTC
Red Hat Product Errata RHBA-2023:5498 0 None None None 2023-10-09 01:05:33 UTC
Red Hat Product Errata RHBA-2023:5499 0 None None None 2023-10-09 01:07:26 UTC
Red Hat Product Errata RHBA-2023:5500 0 None None None 2023-10-09 01:09:36 UTC
Red Hat Product Errata RHBA-2023:5501 0 None None None 2023-10-09 01:14:54 UTC
Red Hat Product Errata RHBA-2023:5502 0 None None None 2023-10-09 01:20:37 UTC
Red Hat Product Errata RHBA-2023:5503 0 None None None 2023-10-09 01:11:21 UTC
Red Hat Product Errata RHBA-2023:5504 0 None None None 2023-10-09 01:12:09 UTC
Red Hat Product Errata RHBA-2023:5505 0 None None None 2023-10-09 01:12:28 UTC
Red Hat Product Errata RHBA-2023:5513 0 None None None 2023-10-09 01:27:59 UTC
Red Hat Product Errata RHBA-2023:5514 0 None None None 2023-10-09 01:25:57 UTC
Red Hat Product Errata RHBA-2023:5515 0 None None None 2023-10-09 01:29:33 UTC
Red Hat Product Errata RHBA-2023:5516 0 None None None 2023-10-09 01:32:01 UTC
Red Hat Product Errata RHBA-2023:5518 0 None None None 2023-10-09 09:43:31 UTC
Red Hat Product Errata RHBA-2023:5519 0 None None None 2023-10-09 09:43:22 UTC
Red Hat Product Errata RHBA-2023:5521 0 None None None 2023-10-09 10:03:46 UTC
Red Hat Product Errata RHBA-2023:5522 0 None None None 2023-10-09 09:53:54 UTC
Red Hat Product Errata RHBA-2023:5523 0 None None None 2023-10-09 09:44:52 UTC
Red Hat Product Errata RHBA-2023:5543 0 None None None 2023-10-09 15:55:14 UTC
Red Hat Product Errata RHBA-2023:5550 0 None None None 2023-10-10 09:47:58 UTC
Red Hat Product Errata RHBA-2023:5551 0 None None None 2023-10-10 09:53:42 UTC
Red Hat Product Errata RHBA-2023:5552 0 None None None 2023-10-10 09:54:05 UTC
Red Hat Product Errata RHBA-2023:5553 0 None None None 2023-10-10 10:08:35 UTC
Red Hat Product Errata RHBA-2023:5554 0 None None None 2023-10-10 09:54:01 UTC
Red Hat Product Errata RHBA-2023:5555 0 None None None 2023-10-10 09:54:08 UTC
Red Hat Product Errata RHBA-2023:5556 0 None None None 2023-10-10 09:53:56 UTC
Red Hat Product Errata RHBA-2023:5557 0 None None None 2023-10-10 09:49:12 UTC
Red Hat Product Errata RHBA-2023:5558 0 None None None 2023-10-10 10:15:08 UTC
Red Hat Product Errata RHBA-2023:5559 0 None None None 2023-10-10 09:57:01 UTC
Red Hat Product Errata RHBA-2023:5560 0 None None None 2023-10-10 09:59:05 UTC
Red Hat Product Errata RHBA-2023:5561 0 None None None 2023-10-10 10:00:30 UTC
Red Hat Product Errata RHBA-2023:5567 0 None None None 2023-10-10 10:08:04 UTC
Red Hat Product Errata RHBA-2023:5569 0 None None None 2023-10-10 10:08:10 UTC
Red Hat Product Errata RHBA-2023:5573 0 None None None 2023-10-10 10:04:54 UTC
Red Hat Product Errata RHBA-2023:5577 0 None None None 2023-10-10 10:08:51 UTC
Red Hat Product Errata RHBA-2023:5581 0 None None None 2023-10-10 10:29:20 UTC
Red Hat Product Errata RHBA-2023:5582 0 None None None 2023-10-10 13:42:24 UTC
Red Hat Product Errata RHBA-2023:5584 0 None None None 2023-10-10 13:42:50 UTC
Red Hat Product Errata RHBA-2023:5585 0 None None None 2023-10-10 13:49:57 UTC
Red Hat Product Errata RHBA-2023:5649 0 None None None 2023-10-10 20:16:58 UTC
Red Hat Product Errata RHBA-2023:5650 0 None None None 2023-10-10 20:20:36 UTC
Red Hat Product Errata RHBA-2023:5651 0 None None None 2023-10-10 20:20:54 UTC
Red Hat Product Errata RHBA-2023:5658 0 None None None 2023-10-11 07:43:01 UTC
Red Hat Product Errata RHBA-2023:5659 0 None None None 2023-10-11 08:24:46 UTC
Red Hat Product Errata RHBA-2023:5663 0 None None None 2023-10-11 13:30:57 UTC
Red Hat Product Errata RHBA-2023:5664 0 None None None 2023-10-11 13:44:07 UTC
Red Hat Product Errata RHBA-2023:5665 0 None None None 2023-10-11 13:42:57 UTC
Red Hat Product Errata RHBA-2023:5670 0 None None None 2023-10-12 01:30:34 UTC
Red Hat Product Errata RHBA-2023:5685 0 None None None 2023-10-12 13:21:11 UTC
Red Hat Product Errata RHBA-2023:5702 0 None None None 2023-10-16 01:21:37 UTC
Red Hat Product Errata RHBA-2023:5703 0 None None None 2023-10-16 07:18:23 UTC
Red Hat Product Errata RHBA-2023:5722 0 None None None 2023-10-16 12:20:08 UTC
Red Hat Product Errata RHBA-2023:5723 0 None None None 2023-10-16 12:31:06 UTC
Red Hat Product Errata RHBA-2023:5748 0 None None None 2023-10-16 15:13:42 UTC
Red Hat Product Errata RHBA-2023:5755 0 None None None 2023-10-16 15:10:36 UTC
Red Hat Product Errata RHBA-2023:5757 0 None None None 2023-10-16 15:34:31 UTC
Red Hat Product Errata RHBA-2023:5760 0 None None None 2023-10-17 07:42:50 UTC
Red Hat Product Errata RHBA-2023:5798 0 None None None 2023-10-17 16:08:51 UTC
Red Hat Product Errata RHBA-2023:5910 0 None None None 2023-10-19 09:04:26 UTC
Red Hat Product Errata RHBA-2023:6043 0 None None None 2023-10-23 18:48:07 UTC
Red Hat Product Errata RHBA-2023:6184 0 None None None 2023-10-30 14:09:35 UTC
Red Hat Product Errata RHSA-2023:5453 0 None None None 2023-10-05 13:54:34 UTC
Red Hat Product Errata RHSA-2023:5455 0 None None None 2023-10-05 14:01:21 UTC
Red Hat Product Errata RHSA-2023:7409 0 None None None 2023-11-21 11:42:44 UTC
Sourceware 30843 0 P2 ASSIGNED potential use-after-free in getcanonname (CVE-2023-4806) 2023-09-12 15:33:31 UTC

Description Guilherme de Almeida Suckevicz 2023-09-06 20:48:11 UTC
In an extremely rare situation, the getaddrinfo function in glibc may access memory that has already been freed, resulting in an application crash.

This issue is only exploitable when a NSS module implements only the _nss_*_gethostbyname2_r hook without implementing the _nss_*_gethostbyname3_r hook. There are no known modules that are implemented in this way.

In addition to that condition, the resolved name should return a large number of IPv6 as well as IPv4 and the call to the getaddrinfo function should have AF_INET6 with AI_CANONNAME, AI_ALL and AI_V4MAPPED as flags.

Reference:
https://sourceware.org/bugzilla/show_bug.cgi?id=30843

Comment 5 Guilherme de Almeida Suckevicz 2023-09-12 18:12:13 UTC
Created glibc tracking bugs for this issue:

Affects: fedora-all [bug 2238604]

Comment 6 Siddhesh Poyarekar 2023-09-14 10:31:42 UTC
(In reply to Guilherme de Almeida Suckevicz from comment #0)
> In an extremely rare situation, the getaddrinfo function in glibc may access
> memory that has already been freed, resulting in an application crash.
> 
> This issue is only exploitable when a NSS module implements only the
> _nss_*_gethostbyname2_r hook without implementing the
> _nss_*_gethostbyname3_r hook. There are no known modules that are
> implemented in this way.

A clarification on this: the NSS module needs to do *all* of the following to expose the vulnerability:

1) Implement _nss_*_gethostbyname2_r hook
2) implement _nss_*_getcanonname_r hook
3) NOT implement _nss_*_gethostbyname3_r hook

The samba wins module for example satisfies 1) and 3) but not 2) thus eliminating it as a possible vector for this vulnerability.

Comment 11 errata-xmlrpc 2023-10-05 13:54:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:5453 https://access.redhat.com/errata/RHSA-2023:5453

Comment 12 errata-xmlrpc 2023-10-05 14:01:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:5455 https://access.redhat.com/errata/RHSA-2023:5455

Comment 14 errata-xmlrpc 2023-11-21 11:42:42 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2023:7409 https://access.redhat.com/errata/RHSA-2023:7409


Note You need to log in before you can comment on or make changes to this bug.