crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a680b1832ced3b5fa7c93484248fd221ea0d614b · < 16287397ec5c08aa58db6acf7dbc55470d78087d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ
The commit referenced in the Fixes tag removed the 'break' from the else branch in qcom_rng_read(), causing an infinite loop whenever 'max' is not a multiple of WORD_SZ. This can be reproduced e.g. by running:
kcapi-rng -b 67 >/dev/null
There are many ways to fix this without adding back the 'break', but they all seem more awkward than simply adding it back, so do just that.
Tested on a machine with Qualcomm Amberwing processor.
From the CVE record · Linux
The Linux kernel’s qcom-rng driver can enter an infinite loop when a read request size is not a multiple of WORD_SZ. A local request can trigger the loop; the input does not specify authentication requirements.
Anyone running a Linux kernel with the affected qcom-rng driver should check their version; affected versions are not specified.