pinctrl: ralink: Check for null return of devm_kcalloc
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a86854d0c599b3202307abceb68feee4d7061578 · < c3b821e8e406d5650e587b7ac624ac24e9b780a8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: ralink: Check for null return of devm_kcalloc
Because of the possible failure of the allocation, data->domains might be NULL pointer and will cause the dereference of the NULL pointer later. Therefore, it might be better to check it and directly return -ENOMEM without releasing data manually if fails, because the comment of the devm_kmalloc() says "Memory allocated with this function is automatically freed on driver detach.".
From the CVE record · Linux
The Linux kernel’s ralink pinctrl driver can dereference a null pointer if an allocation for data->domains fails. The input does not establish whether an attacker can trigger the failure or specify access or user-interaction requirements.
Engineers running Linux kernels with the ralink pinctrl driver should check their versions; affected versions are not specified.