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>] [day] [month] [year] [list]
Date:   Sun, 16 Aug 2020 16:13:49 +0800
From:   Fox Chen <foxhlchen@...il.com>
To:     Marcel Holtmann <marcel@...tmann.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>
Subject: HCI_EV_PHY_LINK_COMPLETE in net/bluetooth/hci_event.c

Dear all,

I have a question about

static void hci_phy_link_complete_evt(struct hci_dev *hdev,
struct sk_buff *skb)
-- HCI_EV_PHY_LINK_COMPLETE event packet handler in hci_even.c:4940

if (ev->status) {
        hci_conn_del(hcon);                 <--------------
        hci_dev_unlock(hdev);
        return;
}

Is it correct to del hcon here?? Because later on, when we close the
socket fd, socket_close will call sco_chan_del which will eventually
call hci_conn_drop. With hcon already deleted by this handler, it will
crash.

This bug is reported by syzbot in
https://syzkaller.appspot.com/bug?id=57e98513afbe427bbd65ac295130bcf5bc860dd8

I'm trying to fix that, but I don't know the design nature of
HCI_EV_PHY_LINK_COMPLETE. Will this scenario happen in real life?? Can
I remove hci_conn_del(hcon) here (I tested it, which fixes this bug)
??


Thanks,
Fox

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ