CVE Database›Document archive›CVE-2022-49832

CVE-2022-49832

kernel: pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map

Loading…

Severity

Moderate

Red Hat Product Security

4.1

CVSS 3.1

Review impact separately from score.

Published · May 1, 2025

Updated · June 30, 2026

Description

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.

Statement

A local denial-of-service vulnerability exists in the Linux kernel's pin control subsystem. When kasprintf() fails due to memory exhaustion, the returned NULL pointer is not checked, resulting in a NULL pointer dereference during a subsequent call to strcmp(). This issue can be triggered by a local attacker who manages to exhaust kernel memory (kmalloc failure) in a context where pinctrl_dt_to_map() is executed — such as via device-tree based driver initialization. Privileges Required is High, because requires control over kernel memory allocation environment or device-tree context (e.g., during module loading or crafted devicetree blob).

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 4.1
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H

CWE not specified