mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 03:40:04 +00:00
tty: amiserial: fix TIOCSSERIAL permission check
commit 1d31a831cc
upstream.
Changing the port closing_wait parameter is a privileged operation.
Add the missing check to TIOCSSERIAL so that -EPERM is returned in case
an unprivileged user tries to change the closing-wait setting.
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210407102334.32361-9-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e503d7bc7b
commit
edce324120
1 changed files with 1 additions and 0 deletions
|
@ -1032,6 +1032,7 @@ static int set_serial_info(struct tty_struct *tty, struct serial_struct *ss)
|
|||
if (!serial_isroot()) {
|
||||
if ((ss->baud_base != state->baud_base) ||
|
||||
(ss->close_delay != port->close_delay) ||
|
||||
(ss->closing_wait != port->closing_wait) ||
|
||||
(ss->xmit_fifo_size != state->xmit_fifo_size) ||
|
||||
((ss->flags & ~ASYNC_USR_MASK) !=
|
||||
(port->flags & ~ASYNC_USR_MASK))) {
|
||||
|
|
Loading…
Reference in a new issue