Skip to contentSkip to conversation

CVE-2022-49241: ASoC: atmel: Fix error handling in sam9x5_wm8731_driver_probe

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

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

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

ASoC: atmel: Fix error handling in sam9x5_wm8731_driver_probe

The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done.

This function only calls of_node_put() in the regular path. And it will cause refcount leak in error path.

The Linux kernel CVE team has assigned CVE-2022-49241 to this issue.

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

	Issue introduced in 3.12 with commit fdbcb3cba54b29a37dfe42acdc0e72c543e0807d and fixed in 5.10.110 with commit 90ac679aa6a01841da90ec5a4aaa4b5e0badddf0
	Issue introduced in 3.12 with commit fdbcb3cba54b29a37dfe42acdc0e72c543e0807d and fixed in 5.15.33 with commit f589063b585ac6dd2081bde6c145411cf48d8d92
	Issue introduced in 3.12 with commit fdbcb3cba54b29a37dfe42acdc0e72c543e0807d and fixed in 5.16.19 with commit 14228225091a0854b1de23e5b4fe8bdeeca9683b
	Issue introduced in 3.12 with commit fdbcb3cba54b29a37dfe42acdc0e72c543e0807d and fixed in 5.17.2 with commit f43ad5dc43240289f4cf13c16cc506f4f7087931
	Issue introduced in 3.12 with commit fdbcb3cba54b29a37dfe42acdc0e72c543e0807d and fixed in 5.18 with commit 740dc3e846537c3743da98bf106f376023fd085c

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-2022-49241

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:

	sound/soc/atmel/sam9x5_wm8731.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/90ac679aa6a01841da90ec5a4aaa4b5e0badddf0
	https://git.kernel.org/stable/c/f589063b585ac6dd2081bde6c145411cf48d8d92
	https://git.kernel.org/stable/c/14228225091a0854b1de23e5b4fe8bdeeca9683b
	https://git.kernel.org/stable/c/f43ad5dc43240289f4cf13c16cc506f4f7087931
	https://git.kernel.org/stable/c/740dc3e846537c3743da98bf106f376023fd085c