Subject: CVE-2021-47207: ALSA: gus: fix null pointer dereference on pointer block

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

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

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

ALSA: gus: fix null pointer dereference on pointer block

The pointer block return from snd_gf1_dma_next_block could be
null, so there is a potential null pointer dereference issue.
Fix this by adding a null check before dereference.

The Linux kernel CVE team has assigned CVE-2021-47207 to this issue.

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

	Fixed in 4.4.293 with commit 3e28e083dcdf
	Fixed in 4.9.291 with commit cb09c760c201
	Fixed in 4.14.256 with commit 542fa721594a
	Fixed in 4.19.218 with commit ab4c1ebc40f6
	Fixed in 5.4.162 with commit c6d2cefdd05c
	Fixed in 5.10.82 with commit 1ac6cd87d8dd
	Fixed in 5.15.5 with commit 16721797dcef
	Fixed in 5.16 with commit a0d21bb32794

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-2021-47207
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/isa/gus/gus_dma.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/3e28e083dcdf03a18a083f8a47b6bb6b1604b5be
	https://git.kernel.org/stable/c/cb09c760c201f82df83babc92a5ffea0a01807fc
	https://git.kernel.org/stable/c/542fa721594a02d2aee0370a764d306ef48d030c
	https://git.kernel.org/stable/c/ab4c1ebc40f699f48346f634d7b72b9c5193f315
	https://git.kernel.org/stable/c/c6d2cefdd05c4810c416fb8d384b5c377bd977bc
	https://git.kernel.org/stable/c/1ac6cd87d8ddd36c43620f82c4d65b058f725f0f
	https://git.kernel.org/stable/c/16721797dcef2c7c030ffe73a07f39a65f9323c3
	https://git.kernel.org/stable/c/a0d21bb3279476c777434c40d969ea88ca64f9aa