diff options
author | Johan Hovold <johan@kernel.org> | 2021-04-07 12:23:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-14 09:44:10 +0200 |
commit | edce324120965a5bd3e55323fba96140a50c9f55 (patch) | |
tree | 39e566e40485670fd8cc1048ab9ec12bed5f3f37 /drivers/tty | |
parent | e503d7bc7bfeb4d807caba7035e127393ee7e8d4 (diff) | |
download | linux-stable-edce324120965a5bd3e55323fba96140a50c9f55.tar.gz linux-stable-edce324120965a5bd3e55323fba96140a50c9f55.tar.bz2 linux-stable-edce324120965a5bd3e55323fba96140a50c9f55.zip |
tty: amiserial: fix TIOCSSERIAL permission check
commit 1d31a831cc04f5f942de3e7d91edaa52310d3c99 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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/amiserial.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 8330fd809a05..34d6ef75c95c 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c @@ -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))) { |