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] [day] [month] [year] [list]
Message-Id: <CB134419-019E-4B55-A1F6-E3361BD581C4@holtmann.org>
Date:   Sat, 6 Jul 2019 12:49:14 +0200
From:   Marcel Holtmann <marcel@...tmann.org>
To:     Myungho Jung <mhjungk@...il.com>
Cc:     Johan Hedberg <johan.hedberg@...il.com>,
        linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH v3 2/2] Bluetooth: hci_ldisc: Add NULL check for
 tiocmget() and tiocmset() in hci_uart_set_flow_control()

Hi Myungho,

> tiocmget() or tiocmset() operations are optional. Just return from
> hci_uart_set_flow_control() if tiocmget() or tiocmset() operation is
> NULL.
> 
> Fixes: 2a973dfada2b ("hci_uart: Add new line discipline enhancements")
> Cc: <stable@...r.kernel.org> # 4.2
> Signed-off-by: Myungho Jung <mhjungk@...il.com>
> ---
> Changes in v2:
>  - Remove braces in if statment
> 
> Changes in v3:
>  - Split into 2 patches
>  - Add stable CC and fixes tags
> 
> drivers/bluetooth/hci_ldisc.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
> index fbf7b4df23ab..cb31c2d8d826 100644
> --- a/drivers/bluetooth/hci_ldisc.c
> +++ b/drivers/bluetooth/hci_ldisc.c
> @@ -314,6 +314,10 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
> 		return;
> 	}
> 
> +	/* tiocmget() and tiocmset() operations are optional */
> +	if (!tty->driver->ops->tiocmget || !tty->driver->ops->tiocmset)
> +		return;
> +

lets just fail setting the line discipline if these ops are not available.  Doing some silent ignoring is not going to help.

Regards

Marcel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ