Commit 2b092cf3 authored by David Howells's avatar David Howells Committed by Khalid Elmously

UBUNTU: SAUCE: (efi-lockdown) Lock down TIOCSSERIAL

BugLink: https://bugs.launchpad.net/bugs/1884159

Lock down TIOCSSERIAL as that can be used to change the ioport and irq
settings on a serial port.  This only appears to be an issue for the serial
drivers that use the core serial code.  All other drivers seem to either
ignore attempts to change port/irq or give an error.
Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Jiri Slaby <jslaby@suse.com>
(backported from commit 8d8c1da752c5ea837f1dbe06fa21d4ca891fcd83
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarAndrea Righi <andrea.righi@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 2e38cd83
......@@ -768,6 +768,11 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
new_flags = new_info->flags;
old_custom_divisor = uport->custom_divisor;
if ((change_port || change_irq) && secure_modules()) {
retval = -EPERM;
goto exit;
}
if (!capable(CAP_SYS_ADMIN)) {
retval = -EPERM;
if (change_irq || change_port ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment