{"id":"UBUNTU-CVE-2022-4904","details":"A flaw was found in the c-ares package. The ares_set_sortlist is missing checks about the validity of the input string, which allows a possible arbitrary length stack overflow. This issue may cause a denial of service or a limited impact on confidentiality and integrity.","modified":"2026-04-22T15:56:00.500813Z","published":"2023-02-15T00:00:00Z","related":["USN-5907-1"],"upstream":["CVE-2022-4904"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-4904"},{"type":"REPORT","url":"https://access.redhat.com/security/cve/CVE-2022-4904"},{"type":"REPORT","url":"https://github.com/c-ares/c-ares/pull/497"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5907-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-4904"}],"affected":[{"package":{"name":"c-ares","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/c-ares@1.10.0-3ubuntu0.2+esm3?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.0-2","1.10.0-3","1.10.0-3ubuntu0.1","1.10.0-3ubuntu0.2","1.10.0-3ubuntu0.2+esm1","1.10.0-3ubuntu0.2+esm2","1.10.0-3ubuntu0.2+esm3"],"ecosystem_specific":{"binaries":[{"binary_version":"1.10.0-3ubuntu0.2+esm3","binary_name":"libc-ares2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-4904.json"}},{"package":{"name":"c-ares","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/c-ares@1.14.0-1ubuntu0.2?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.14.0-1ubuntu0.2"}]}],"versions":["1.13.0-2","1.13.0-3","1.14.0-1","1.14.0-1ubuntu0.1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"1.14.0-1ubuntu0.2","binary_name":"libc-ares2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-4904.json"}},{"package":{"name":"c-ares","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/c-ares@1.15.0-1ubuntu0.2?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.15.0-1ubuntu0.2"}]}],"versions":["1.15.0-1build1","1.15.0-1ubuntu0.1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libc-ares2","binary_version":"1.15.0-1ubuntu0.2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-4904.json"}},{"package":{"name":"c-ares","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/c-ares@1.18.1-1ubuntu0.22.04.1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.18.1-1ubuntu0.22.04.1"}]}],"versions":["1.17.1-1ubuntu1","1.18.1-1","1.18.1-1build1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libc-ares2","binary_version":"1.18.1-1ubuntu0.22.04.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-4904.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H"},{"type":"Ubuntu","score":"medium"}]}