Skip to content

Commit cf6ca0a

Browse files
jhovoldgregkh
authored andcommitted
USB: serial: keyspan_pda: fix information leak
commit 6bfc8d0 upstream. The write() callback is supposed to return the number of characters accepted or a negative errno. Since the addition of write fifo support the keyspan_pda implementation will however return the number characters submitted to the device if the write urb is not already in use. If this number is larger than the number of characters passed to write(), the line discipline continues writing data from beyond the tty write buffer. Fix the information leak by making sure that keyspan_pda_write_start() returns zero on success as intended. Fixes: 034e38e ("USB: serial: keyspan_pda: add write-fifo support") Cc: stable@vger.kernel.org # 5.11 Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8c29d9c commit cf6ca0a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/serial/keyspan_pda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ static int keyspan_pda_write_start(struct usb_serial_port *port)
518518
if (count == room)
519519
schedule_work(&priv->unthrottle_work);
520520

521-
return count;
521+
return 0;
522522
}
523523

524524
static void keyspan_pda_write_bulk_callback(struct urb *urb)

0 commit comments

Comments
 (0)