]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ipack: ipoctal: fix stack information leak
authorJohan Hovold <johan@kernel.org>
Fri, 17 Sep 2021 11:46:17 +0000 (13:46 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 08:12:50 +0000 (09:12 +0100)
commit9d6904f2d19b3cf728ac0958901b03b25eb70c9a
tree7d8ac23f12fad1b48dabb6c87689f7d2859e9ca4
parent98e58114bf789604f081ea79b905066de74b8cb0
ipack: ipoctal: fix stack information leak

BugLink: https://bugs.launchpad.net/bugs/1947888
commit a89936cce87d60766a75732a9e7e25c51164f47c upstream.

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.

Fixes: ba4dc61fe8c5 ("Staging: ipack: add support for IP-OCTAL mezzanine board")
Cc: stable@vger.kernel.org # 3.5
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210917114622.5412-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/ipack/devices/ipoctal.c