clk: zynq: Prevent null pointer dereference caused by kmalloc failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0ee52b157b8ed88550ddd6291e54bb4bfabde364 · < 7938e9ce39d6779d2f85d822cc930f73420e54a6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
clk: zynq: Prevent null pointer dereference caused by kmalloc failure
The kmalloc() in zynq_clk_setup() will return null if the physical memory has run out. As a result, if we use snprintf() to write data to the null address, the null pointer dereference bug will happen.
This patch uses a stack variable to replace the kmalloc().
From the CVE record · Linux
The Linux kernel's Zynq clock setup can dereference a null pointer if kmalloc() fails because physical memory has run out. The input does not establish whether an attacker can trigger this condition or specify any access or user-interaction requirements.
Engineers running the Linux kernel should check whether their version includes the Zynq clock setup fix; affected versions were not provided.