CVE-2022-50719: ALSA: line6: fix stack overflow in line6_midi_transmit
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ALSA: line6: fix stack overflow in line6_midi_transmit
Correctly calculate available space including the size of the chunk buffer. This fixes a buffer overflow when multiple MIDI sysex messages are sent to a PODxt device.
The Linux kernel CVE team has assigned CVE-2022-50719 to this issue.
Affected and fixed versions
===========================
Fixed in 4.9.337 with commit b026af92b2cea907c780f7168c730c816cd33311 Fixed in 4.14.303 with commit 49cb7737e733013ec86aa77ed2e19b94a68eaa05 Fixed in 4.19.270 with commit 0c76087449ee4ed45a88b10017d02c6694caedb1 Fixed in 5.4.229 with commit 25e8c6ecb46843a955f254b8f0d77894e4a53dc4 Fixed in 5.10.163 with commit 66f359ad66d49f75d39ac729f9114dabf90b81bb Fixed in 5.15.87 with commit 0c9118e381ff538874e00fd4e66a768273c150fb Fixed in 6.0.17 with commit 61e4be4a60cc6de723f8c574ddbcb3025eb44cac Fixed in 6.1.3 with commit 389d34c2a8b52acc351fd932ed4bea41fee5a39b Fixed in 6.2 with commit b8800d324abb50160560c636bfafe2c81001b66c
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-50719
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/usb/line6/midi.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/b026af92b2cea907c780f7168c730c816cd33311 https://git.kernel.org/stable/c/49cb7737e733013ec86aa77ed2e19b94a68eaa05 https://git.kernel.org/stable/c/0c76087449ee4ed45a88b10017d02c6694caedb1 https://git.kernel.org/stable/c/25e8c6ecb46843a955f254b8f0d77894e4a53dc4 https://git.kernel.org/stable/c/66f359ad66d49f75d39ac729f9114dabf90b81bb https://git.kernel.org/stable/c/0c9118e381ff538874e00fd4e66a768273c150fb https://git.kernel.org/stable/c/61e4be4a60cc6de723f8c574ddbcb3025eb44cac https://git.kernel.org/stable/c/389d34c2a8b52acc351fd932ed4bea41fee5a39b https://git.kernel.org/stable/c/b8800d324abb50160560c636bfafe2c81001b66c