CVE-2023-31147

Public on 2023-05-23
Modified on 2024-02-07
Description
Insufficient randomness in generation of DNS query IDs

When /dev/urandom or RtlGenRandom() are unavailable, c-ares uses rand() to generate random numbers used for DNS query ids. This is not a CSPRNG, and it is also not seeded by srand() so will generate predictable output.
Input from the random number generator is fed into a non-compilant RC4 implementation and may not be as strong as the original RC4 implementation.
No attempt is made to look for modern OS-provided CSPRNGs like arc4random() that is widely available.
Severity
Medium severity
Medium
See what this means
CVSS v3 Base Score
5.9
See breakdown

Affected Packages

Platform Package Release Date Advisory Status
Amazon Linux 1 c-ares Pending Fix
Amazon Linux 2 - Core c-ares 2024-10-02 ALAS2-2024-2646 Fixed
Amazon Linux 2023 c-ares 2023-06-07 ALAS2023-2023-198 Fixed
Amazon Linux 2 - Ecs Extra ecs-service-connect-agent 2023-09-25 ALAS2ECS-2023-007 Fixed
Amazon Linux 2023 ecs-service-connect-agent 2023-09-20 ALAS2023-2023-344 Fixed

CVSS Scores

Score Type Score Vector
Amazon Linux CVSSv3 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD CVSSv3 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N