lkml.org 
[lkml]   [2021]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 008/530] tty: amiserial: fix TIOCSSERIAL permission check
    Date
    From: Johan Hovold <johan@kernel.org>

    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 | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/tty/amiserial.c
    +++ b/drivers/tty/amiserial.c
    @@ -970,6 +970,7 @@ static int set_serial_info(struct tty_st
    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))) {

    \
     
     \ /
      Last update: 2021-05-12 17:31    [W:2.259 / U:1.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site