lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151016124733.GA4801@e103592.cambridge.arm.com>
Date:	Fri, 16 Oct 2015 13:48:03 +0100
From:	Dave Martin <Dave.Martin@....com>
To:	Timur Tabi <timur@...eaurora.org>
Cc:	Greg Kroah-Hartman <greg@...ah.com>,
	Russell King <linux@....linux.org.uk>,
	Linus Walleij <linus.walleij@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: amba-pl011: fix incorrect integer size in
 pl011_fifo_to_tty()

On Wed, Oct 07, 2015 at 03:27:16PM -0500, Timur Tabi wrote:
> The UART_DUMMY_DR_RX status bit is equal to (1 << 16), so a u16 is too small
> to hold that value.  The result is that UART_DUMMY_DR_RX is never passed
> to uart_insert_char().  This means that we're always accepting characters,
> even when CREAD (in termios) is not set.
> 
> Signed-off-by: Timur Tabi <timur@...eaurora.org>
> ---
>  drivers/tty/serial/amba-pl011.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index fd27e98..899a771 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -191,8 +191,8 @@ struct uart_amba_port {
>   */
>  static int pl011_fifo_to_tty(struct uart_amba_port *uap)
>  {
> -	u16 status, ch;
> -	unsigned int flag, max_count = 256;
> +	u16 status;
> +	unsigned int ch, flag, max_count = 256;
>  	int fifotaken = 0;

FWIW,

Reviewed-by: Dave Martin <Dave.Martin@....com>

I guess this tells us something about how often !CREAD is used...

Cheers
---Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ