pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 57291ce295c0aca738dd284c4a9c591c09ebee71 · < 97e5b508e96176f1a73888ed89df396d7041bfcb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map
Here is the BUG report by KASAN about null pointer dereference:
BUG: KASAN: null-ptr-deref in strcmp+0x2e/0x50 Read of size 1 at addr 0000000000000000 by task python3/2640 Call Trace: strcmp __of_find_property of_find_property pinctrl_dt_to_map
kasprintf() would return NULL pointer when kmalloc() fail to allocate. So directly return ENOMEM, if kasprintf() return NULL pointer.
From the CVE record · Linux
The Linux kernel’s pinctrl devicetree code can dereference a null pointer if a memory allocation fails in pinctrl_dt_to_map. The input does not establish how an attacker could trigger the failure or whether access or user interaction is required.
Engineers running the Linux kernel should check their kernel versions; affected versions are not specified in the input.