Skip to contentSkip to conversation

CVE-2023-54319: pinctrl: at91-pio4: check return value of devm_kasprintf()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 30, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

pinctrl: at91-pio4: check return value of devm_kasprintf()

devm_kasprintf() returns a pointer to dynamically allocated memory. Pointer could be NULL in case allocation fails. Check pointer validity. Identified with coccinelle (kmerr.cocci script).

Depends-on: 1c4e5c470a56 ("pinctrl: at91: use devm_kasprintf() to avoid potential leaks")
Depends-on: 5a8f9cf269e8 ("pinctrl: at91-pio4: use proper format specifier for unsigned int")

The Linux kernel CVE team has assigned CVE-2023-54319 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 4.14.322 with commit 8d788f2ba830d6d32499b198c526d577c590eedf
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 4.19.291 with commit 3e8ce1d5a1a9d758b359e5c426543957f35991f8
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 5.4.251 with commit aa3932eb07392d626486428e2ffddc660658e22a
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 5.10.188 with commit f3c7b95c9991dab02e616fc251b6c3516e0bd0ac
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 5.15.121 with commit 0a95dd17a73b7603818ad7c46c99d757232be331
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 6.1.39 with commit 0af388fce352ed2ab383fd5d1a08db551ca15c38
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 6.3.13 with commit 5bfd577cc728270d6cd7af6c652a1e7661f25487
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 6.4.4 with commit 8a1fa202f47f39680a4305af744f499a324f8a03
	Issue introduced in 4.4 with commit 776180848b574c9c01217fa958f10843ffce584f and fixed in 6.5 with commit f6fd5d4ff8ca0b24cee1af4130bcb1fa96b61aa0

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2023-54319

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/pinctrl/pinctrl-at91-pio4.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/8d788f2ba830d6d32499b198c526d577c590eedf
	https://git.kernel.org/stable/c/3e8ce1d5a1a9d758b359e5c426543957f35991f8
	https://git.kernel.org/stable/c/aa3932eb07392d626486428e2ffddc660658e22a
	https://git.kernel.org/stable/c/f3c7b95c9991dab02e616fc251b6c3516e0bd0ac
	https://git.kernel.org/stable/c/0a95dd17a73b7603818ad7c46c99d757232be331
	https://git.kernel.org/stable/c/0af388fce352ed2ab383fd5d1a08db551ca15c38
	https://git.kernel.org/stable/c/5bfd577cc728270d6cd7af6c652a1e7661f25487
	https://git.kernel.org/stable/c/8a1fa202f47f39680a4305af744f499a324f8a03
	https://git.kernel.org/stable/c/f6fd5d4ff8ca0b24cee1af4130bcb1fa96b61aa0