Subject: CVE-2021-47401: ipack: ipoctal: fix stack information leak

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

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

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

ipack: ipoctal: fix stack information leak

The tty driver name is used also after registering the driver and must
specifically not be allocated on the stack to avoid leaking information
to user space (or triggering an oops).

Drivers should not try to encode topology information in the tty device
name but this one snuck in through staging without anyone noticing and
another driver has since copied this malpractice.

Fixing the ABI is a separate issue, but this at least plugs the security
hole.

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

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

	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 4.4.286 with commit acb96e782bad
	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 4.9.285 with commit 741ea2670e02
	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 4.14.249 with commit 2725925982dc
	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 4.19.209 with commit 829f13d6079c
	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 5.4.151 with commit 8657158a3b68
	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 5.10.71 with commit 5f6a309a6996
	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 5.14.10 with commit 0a9c36a2e06a
	Issue introduced in 3.5 with commit ba4dc61fe8c5 and fixed in 5.15 with commit a89936cce87d

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-47401
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/ipack/devices/ipoctal.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/acb96e782bad427ca4bb1bd94af660acd1462380
	https://git.kernel.org/stable/c/741ea2670e021350e54f491106bdaa22dc50e6a0
	https://git.kernel.org/stable/c/2725925982dc96a78069cd118ea3d66759bfdad7
	https://git.kernel.org/stable/c/829f13d6079cf7a2465522f39acb43033e9b320d
	https://git.kernel.org/stable/c/8657158a3b68c85234e6da3d8eae33d6183588b7
	https://git.kernel.org/stable/c/5f6a309a699675680df15d9b6d389114515b4426
	https://git.kernel.org/stable/c/0a9c36a2e06a249acbed64e8e0b84637c2ad7575
	https://git.kernel.org/stable/c/a89936cce87d60766a75732a9e7e25c51164f47c