CVE-2022-48629: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: crypto: qcom-rng - ensure buffer for generate is completely filled The generate function in struct rng_alg expects that the destination buffer is completely filled if the function returns 0. qcom_rng_read() can run into a situation where the buffer is partially filled with randomness and the remaining part of the buffer is zeroed since qcom_rng_generate() doesn't check the return value. This issue can be reproduced by running the following from libkcapi: kcapi-rng -b 9000000 > OUTFILE The generated OUTFILE will have three huge sections that contain all zeros, and this is caused by the code where the test 'val & PRNG_STATUS_DATA_AVAIL' fails. Let's fix this issue by ensuring that qcom_rng_read() always returns with a full buffer if the function returns success. Let's also have qcom_rng_generate() return the correct value. Here's some statistics from the ent project (https://www.fourmilab.ch/random/) that shows information about the quality of the generated numbers: $ ent -c qcom-random-before Value Char Occurrences Fraction 0 606748 0.067416 1 33104 0.003678 2 33001 0.003667 ... 253 � 32883 0.003654 254 � 33035 0.003671 255 � 33239 0.003693 Total: 9000000 1.000000 Entropy = 7.811590 bits per byte. Optimum compression would reduce the size of this 9000000 byte file by 2 percent. Chi square distribution for 9000000 samples is 9329962.81, and randomly would exceed this value less than 0.01 percent of the times. Arithmetic mean value of data bytes is 119.3731 (127.5 = random). Monte Carlo value for Pi is 3.197293333 (error 1.77 percent). Serial correlation coefficient is 0.159130 (totally uncorrelated = 0.0). Without this patch, the results of the chi-square test is 0.01%, and the numbers are certainly not random according to ent's project page. The results improve with this patch: $ ent -c qcom-random-after Value Char Occurrences Fraction 0 35432 0.003937 1 35127 0.003903 2 35424 0.003936 ... 253 � 35201 0.003911 254 � 34835 0.003871 255 � 35368 0.003930 Total: 9000000 1.000000 Entropy = 7.999979 bits per byte. Optimum compression would reduce the size of this 9000000 byte file by 0 percent. Chi square distribution for 9000000 samples is 258.77, and randomly would exceed this value 42.24 percent of the times. Arithmetic mean value of data bytes is 127.5006 (127.5 = random). Monte Carlo value for Pi is 3.141277333 (error 0.01 percent). Serial correlation coefficient is 0.000468 (totally uncorrelated = 0.0). This change was tested on a Nexus 5 phone (msm8974 SoC).
AI Analysis
Technical Summary
CVE-2022-48629 is a vulnerability in the Linux kernel's Qualcomm random number generator (qcom-rng) driver. The issue arises because the qcom_rng_read() function does not properly verify that the buffer it fills with random data is completely populated before returning success. Specifically, the generate function in the rng_alg structure expects the destination buffer to be fully filled if it returns 0 (success). However, qcom_rng_generate() can partially fill the buffer with random data and leave the remainder zeroed if a certain status check ('val & PRNG_STATUS_DATA_AVAIL') fails. This results in large sections of the output buffer containing zeros rather than random data, degrading the quality of randomness. This was demonstrated by running the kcapi-rng tool to generate a large random data file, which showed significant zeroed sections and poor entropy statistics before the patch. After the patch, the qcom_rng_generate() function was corrected to return the proper status, and qcom_rng_read() was fixed to ensure the buffer is fully filled before returning success. This leads to significantly improved randomness quality, as confirmed by entropy tests (ent project) showing near-ideal entropy and statistical randomness metrics. The vulnerability affects Linux kernel versions containing the Qualcomm RNG driver code prior to the patch and was tested on devices such as the Nexus 5 (msm8974 SoC). While no known exploits are reported in the wild, the vulnerability could impact any cryptographic operations relying on this RNG source, potentially weakening cryptographic keys or operations that depend on high-quality randomness.
Potential Impact
For European organizations, this vulnerability could have serious implications if they use affected Linux kernel versions on Qualcomm-based hardware platforms, especially embedded systems, mobile devices, or specialized network equipment. The compromised randomness quality could lead to weakened cryptographic keys, predictable session tokens, or other security-critical random values, undermining confidentiality and integrity of communications and stored data. This is particularly critical for sectors relying heavily on cryptography such as finance, healthcare, telecommunications, and government agencies. The impact is more pronounced in environments where the Qualcomm RNG is a primary or significant entropy source. While the vulnerability does not directly cause system crashes or denial of service, the cryptographic weakening could facilitate further attacks such as key recovery or session hijacking. Given the widespread use of Linux in servers and embedded devices across Europe, and the presence of Qualcomm chipsets in many mobile and IoT devices, the threat surface is notable. However, the vulnerability requires the affected RNG driver to be in use, so systems not using Qualcomm RNG or running updated kernels are not impacted.
Mitigation Recommendations
European organizations should prioritize updating Linux kernels to versions that include the patch for CVE-2022-48629. Specifically, ensure that all devices using Qualcomm RNG drivers are running patched kernel versions where qcom_rng_generate() and qcom_rng_read() functions have been corrected. For embedded and mobile devices, coordinate with hardware vendors and OEMs to obtain firmware or OS updates that incorporate the fix. Additionally, organizations should audit their cryptographic modules and RNG sources to verify that they do not rely solely on the Qualcomm RNG or have fallback entropy sources. Implementing additional entropy gathering mechanisms or using hardware RNGs from trusted vendors can mitigate risks. For critical systems, consider performing entropy quality tests on random data outputs to detect anomalies. Monitoring for kernel updates and subscribing to Linux security advisories is essential. Finally, in environments where patching is delayed, cryptographic keys generated during the vulnerable period should be considered potentially compromised and rotated accordingly.
Affected Countries
Germany, France, United Kingdom, Italy, Spain, Netherlands, Sweden, Finland, Poland, Belgium
CVE-2022-48629: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: crypto: qcom-rng - ensure buffer for generate is completely filled The generate function in struct rng_alg expects that the destination buffer is completely filled if the function returns 0. qcom_rng_read() can run into a situation where the buffer is partially filled with randomness and the remaining part of the buffer is zeroed since qcom_rng_generate() doesn't check the return value. This issue can be reproduced by running the following from libkcapi: kcapi-rng -b 9000000 > OUTFILE The generated OUTFILE will have three huge sections that contain all zeros, and this is caused by the code where the test 'val & PRNG_STATUS_DATA_AVAIL' fails. Let's fix this issue by ensuring that qcom_rng_read() always returns with a full buffer if the function returns success. Let's also have qcom_rng_generate() return the correct value. Here's some statistics from the ent project (https://www.fourmilab.ch/random/) that shows information about the quality of the generated numbers: $ ent -c qcom-random-before Value Char Occurrences Fraction 0 606748 0.067416 1 33104 0.003678 2 33001 0.003667 ... 253 � 32883 0.003654 254 � 33035 0.003671 255 � 33239 0.003693 Total: 9000000 1.000000 Entropy = 7.811590 bits per byte. Optimum compression would reduce the size of this 9000000 byte file by 2 percent. Chi square distribution for 9000000 samples is 9329962.81, and randomly would exceed this value less than 0.01 percent of the times. Arithmetic mean value of data bytes is 119.3731 (127.5 = random). Monte Carlo value for Pi is 3.197293333 (error 1.77 percent). Serial correlation coefficient is 0.159130 (totally uncorrelated = 0.0). Without this patch, the results of the chi-square test is 0.01%, and the numbers are certainly not random according to ent's project page. The results improve with this patch: $ ent -c qcom-random-after Value Char Occurrences Fraction 0 35432 0.003937 1 35127 0.003903 2 35424 0.003936 ... 253 � 35201 0.003911 254 � 34835 0.003871 255 � 35368 0.003930 Total: 9000000 1.000000 Entropy = 7.999979 bits per byte. Optimum compression would reduce the size of this 9000000 byte file by 0 percent. Chi square distribution for 9000000 samples is 258.77, and randomly would exceed this value 42.24 percent of the times. Arithmetic mean value of data bytes is 127.5006 (127.5 = random). Monte Carlo value for Pi is 3.141277333 (error 0.01 percent). Serial correlation coefficient is 0.000468 (totally uncorrelated = 0.0). This change was tested on a Nexus 5 phone (msm8974 SoC).
AI-Powered Analysis
Technical Analysis
CVE-2022-48629 is a vulnerability in the Linux kernel's Qualcomm random number generator (qcom-rng) driver. The issue arises because the qcom_rng_read() function does not properly verify that the buffer it fills with random data is completely populated before returning success. Specifically, the generate function in the rng_alg structure expects the destination buffer to be fully filled if it returns 0 (success). However, qcom_rng_generate() can partially fill the buffer with random data and leave the remainder zeroed if a certain status check ('val & PRNG_STATUS_DATA_AVAIL') fails. This results in large sections of the output buffer containing zeros rather than random data, degrading the quality of randomness. This was demonstrated by running the kcapi-rng tool to generate a large random data file, which showed significant zeroed sections and poor entropy statistics before the patch. After the patch, the qcom_rng_generate() function was corrected to return the proper status, and qcom_rng_read() was fixed to ensure the buffer is fully filled before returning success. This leads to significantly improved randomness quality, as confirmed by entropy tests (ent project) showing near-ideal entropy and statistical randomness metrics. The vulnerability affects Linux kernel versions containing the Qualcomm RNG driver code prior to the patch and was tested on devices such as the Nexus 5 (msm8974 SoC). While no known exploits are reported in the wild, the vulnerability could impact any cryptographic operations relying on this RNG source, potentially weakening cryptographic keys or operations that depend on high-quality randomness.
Potential Impact
For European organizations, this vulnerability could have serious implications if they use affected Linux kernel versions on Qualcomm-based hardware platforms, especially embedded systems, mobile devices, or specialized network equipment. The compromised randomness quality could lead to weakened cryptographic keys, predictable session tokens, or other security-critical random values, undermining confidentiality and integrity of communications and stored data. This is particularly critical for sectors relying heavily on cryptography such as finance, healthcare, telecommunications, and government agencies. The impact is more pronounced in environments where the Qualcomm RNG is a primary or significant entropy source. While the vulnerability does not directly cause system crashes or denial of service, the cryptographic weakening could facilitate further attacks such as key recovery or session hijacking. Given the widespread use of Linux in servers and embedded devices across Europe, and the presence of Qualcomm chipsets in many mobile and IoT devices, the threat surface is notable. However, the vulnerability requires the affected RNG driver to be in use, so systems not using Qualcomm RNG or running updated kernels are not impacted.
Mitigation Recommendations
European organizations should prioritize updating Linux kernels to versions that include the patch for CVE-2022-48629. Specifically, ensure that all devices using Qualcomm RNG drivers are running patched kernel versions where qcom_rng_generate() and qcom_rng_read() functions have been corrected. For embedded and mobile devices, coordinate with hardware vendors and OEMs to obtain firmware or OS updates that incorporate the fix. Additionally, organizations should audit their cryptographic modules and RNG sources to verify that they do not rely solely on the Qualcomm RNG or have fallback entropy sources. Implementing additional entropy gathering mechanisms or using hardware RNGs from trusted vendors can mitigate risks. For critical systems, consider performing entropy quality tests on random data outputs to detect anomalies. Monitoring for kernel updates and subscribing to Linux security advisories is essential. Finally, in environments where patching is delayed, cryptographic keys generated during the vulnerable period should be considered potentially compromised and rotated accordingly.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-02-25T13:44:28.315Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d982ec4522896dcbe5cf5
Added to database: 5/21/2025, 9:09:02 AM
Last enriched: 6/30/2025, 5:42:27 PM
Last updated: 7/28/2025, 1:58:56 PM
Views: 10
Related Threats
CVE-2025-8046: CWE-79 Cross-Site Scripting (XSS) in Injection Guard
MediumCVE-2025-7808: CWE-79 Cross-Site Scripting (XSS) in WP Shopify
HighCVE-2025-6790: CWE-352 Cross-Site Request Forgery (CSRF) in Quiz and Survey Master (QSM)
HighCVE-2025-3414: CWE-79 Cross-Site Scripting (XSS) in Structured Content (JSON-LD) #wpsc
HighCVE-2025-8938: Backdoor in TOTOLINK N350R
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.