CVE-2019-10639: Weak Encryption
A flaw was found in the way the Linux kernel derived the IP ID field from a partial kernel space address returned by a nethashmix() function. A remote user could observe this IP ID field to extract the kernel address bits used to derive its value, which may result in leaking the hash key and potentially defeating KASLR.
Other sources
Linux Kernel could allow a remote attacker to obtain sensitive information, caused by the use of a weak function to generate IP packet IDs. By sniffing the network, an attacker could exploit this vulnerability to obtain hash collisions information to derive the hashing key.
— IBM
The Linux kernel 4.x (starting from 4.1) and 5.x before 5.0.8 allows Information Exposure (partial kernel address disclosure), leading to a KASLR bypass. Specifically, it is possible to extract the KASLR kernel image offset using the IP ID values the kernel produces for connection-less protocols (e.g., UDP and ICMP). When such traffic is sent to multiple destination IP addresses, it is possible to obtain hash collisions (of indices to the counter array) and thereby obtain the hashing key (via enumeration). This key contains enough bits from a kernel address (of a static variable) so when the key is extracted (via enumeration), the offset of the kernel image is exposed. This attack can be carried out remotely, by the attacker forcing the target device to send UDP or ICMP (or certain other) traffic to attacker-controlled IP addresses. Forcing a server to send UDP traffic is trivial if the server is a DNS server. ICMP traffic is trivial if the server answers ICMP Echo requests (ping). For client targets, if the target visits the attacker's web page, then WebRTC or gQUIC can be used to force UDP traffic to attacker-controlled IP addresses. NOTE: this attack against KASLR became viable in 4.1 because IP ID generation was changed to have a dependency on an address associated with a network namespace.
When IP packet fragmentation is ON, IP Identification(ID) field of the IP header is used, during packet reassembly on the destination host, to identify fragments which belong to the same packet. IP ID field is required to be unique and same across all fragments of an IP packet. IP packet fragments are identified by a tuple with following fields
(source address|destination address|protocol|IP-ID)
The Linux kernel derived this IP ID field from partial kernel space address returned by nethashmix() function, which is then used with a hash function to compute the IP ID field.
A remote user could observe this IP ID field to deduce the kernel space address bits used to derive its value. Thus leaking the hash key and potentially defeating KASLR.
Upstream fix: ------------- -> https://git.kernel.org/linus/355b98553789b646ed97ad801a619ff898471b92
Issue introduced by: -------------------- -> https://git.kernel.org/linus/b6a7719aedd7e5c0f2df7641aa47386111682df4 -> https://git.kernel.org/linus/5a352dd0a3aac03b443c94828dfd7144261c8636
— Red Hat
Affected Software
Remediation
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2019-10639?
CVE-2019-10639 has been classified with a moderate severity.
How do I fix CVE-2019-10639?
To fix CVE-2019-10639, update to the appropriate kernel version as specified in the remediation instructions.
Which systems are affected by CVE-2019-10639?
CVE-2019-10639 affects various Linux kernel versions, specifically those prior to 4.20.9 and certain Red Hat kernel versions.
Is there a specific patch for CVE-2019-10639?
Yes, kernel patches have been issued for CVE-2019-10639 in various distributions, including Red Hat and Debian.
Can remote users exploit CVE-2019-10639?
Yes, CVE-2019-10639 allows remote users to potentially exploit the vulnerability to leak hash keys used in the kernel.