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: <B2277FFE-D3B4-4AB3-9443-27549D703886@holtmann.org>
Date:   Mon, 30 Oct 2017 15:49:16 +0100
From:   Marcel Holtmann <marcel@...tmann.org>
To:     =?UTF-8?q?Ronald=20Tschal=C3=A4r?= 
        <ronald@...ovation.ch>
Cc:     "Gustavo F. Padovan" <gustavo@...ovan.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Dean Jenkins <Dean_Jenkins@...tor.com>,
        Lukas Wunner <lukas@...ner.de>,
        "open list:BLUETOOTH DRIVERS" <linux-bluetooth@...r.kernel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Bluetooth: hci_ldisc: Fix another race when closing the
 tty.

Hi Ronald,

> The following race condition still existed:
> 
>         P1                                P2
>  cancel_work_sync()
>                                     hci_uart_tx_wakeup()
>                                     hci_uart_write_work()
>                                     hci_uart_dequeue()
>  clear_bit(HCI_UART_PROTO_READY)
>  hci_unregister_dev(hdev)
>  hci_free_dev(hdev)
>  hu->proto->close(hu)
>  kfree(hu)
>                                     access to hdev and hu
> 
> Cancelling the work after clearing the HCI_UART_PROTO_READY bit avoids
> this as any hci_uart_tx_wakeup() issued after the flag is cleared will
> detect that and not schedule further work.
> 
> Signed-off-by: Ronald Tschalär <ronald@...ovation.ch>
> Cc: Dean Jenkins <Dean_Jenkins@...tor.com>
> Cc: Lukas Wunner <lukas@...ner.de>
> Cc: Marcel Holtmann <marcel@...tmann.org>
> Cc: Gustavo Padovan <gustavo@...ovan.org>
> Cc: Johan Hedberg <johan.hedberg@...il.com>
> ---
> drivers/bluetooth/hci_ldisc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ