]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: amiserial: fix TIOCSSERIAL permission check
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:23:26 +0000 (12:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:22 +0000 (10:49 +0200)
commitb0731f49df79a384b055a10635d7b0ca34cfb82c
treeced9566212763140f6472b0ed225797faa20e899
parentc130d12bc371afcd767a0b0af0022b90383bcc86
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>
drivers/tty/amiserial.c