]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
tty: mxser: fix TIOCSSERIAL permission check
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:23:32 +0000 (12:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 15:22:07 +0000 (17:22 +0200)
commitb91cfb2573aeb5ab426fc3c35bcfe9e0d2a7ecbc
treede429538ba2ccfcaf6dcf262356ba186a52d89ec
parentbe6cf583d24dfe87324dd2830d90fc056e0a6648
tty: mxser: fix TIOCSSERIAL permission check

Changing the port type and closing_wait parameter are privileged
operations so make sure to return -EPERM if a regular user tries to
change them.

Note that the closing_wait parameter would not actually have been
changed but the return value did not indicate that.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210407102334.32361-15-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c