CVE-2022-49538: ALSA: jack: Access input_dev under mutex
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ALSA: jack: Access input_dev under mutex
It is possible when using ASoC that input_dev is unregistered while calling snd_jack_report, which causes NULL pointer dereference. In order to prevent this serialize access to input_dev using mutex lock.
The Linux kernel CVE team has assigned CVE-2022-49538 to this issue.
Affected and fixed versions
===========================
Fixed in 4.9.318 with commit 74bab3bcf422593c582e47130aa8eb41ebb2dc09 Fixed in 4.14.283 with commit 8487a88136d54a1a4d3f26f1399685db648ab879 Fixed in 4.19.247 with commit c093b62c40027c21d649c5534ad7aa3605a99b00 Fixed in 5.4.198 with commit f68bed124c7699e23ffb4ce4fcc84671e9193cde Fixed in 5.10.121 with commit e2b8681769f6e205382f026b907d28aa5ec9d59a Fixed in 5.15.46 with commit 5cc6f623f4818c7d7e9e966a45ebf324901ca9c5 Fixed in 5.17.14 with commit 9e6a73b0c0f2014eb89249fb1640c5a3d58221c4 Fixed in 5.18.3 with commit 582aea6084cc59fec881204f026816d1219f2348 Fixed in 5.19 with commit 1b6a6fc5280e97559287b61eade2d4b363e836f2
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-49538
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:
include/sound/jack.h
sound/core/jack.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/74bab3bcf422593c582e47130aa8eb41ebb2dc09 https://git.kernel.org/stable/c/8487a88136d54a1a4d3f26f1399685db648ab879 https://git.kernel.org/stable/c/c093b62c40027c21d649c5534ad7aa3605a99b00 https://git.kernel.org/stable/c/f68bed124c7699e23ffb4ce4fcc84671e9193cde https://git.kernel.org/stable/c/e2b8681769f6e205382f026b907d28aa5ec9d59a https://git.kernel.org/stable/c/5cc6f623f4818c7d7e9e966a45ebf324901ca9c5 https://git.kernel.org/stable/c/9e6a73b0c0f2014eb89249fb1640c5a3d58221c4 https://git.kernel.org/stable/c/582aea6084cc59fec881204f026816d1219f2348 https://git.kernel.org/stable/c/1b6a6fc5280e97559287b61eade2d4b363e836f2