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-next>] [day] [month] [year] [list]
Message-Id: <20200804093937.772961-1-coiby.xu@gmail.com>
Date:   Tue,  4 Aug 2020 17:39:37 +0800
From:   Coiby Xu <coiby.xu@...il.com>
To:     linux-bluetooth@...r.kernel.org
Cc:     linux-kernel-mentees@...ts.linuxfoundation.org,
        syzbot+fadfba6a911f6bf71842@...kaller.appspotmail.com,
        Marcel Holtmann <marcel@...tmann.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev@...r.kernel.org (open list:NETWORKING [GENERAL]),
        linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] Bluetooth: Initialize the TX queue lock when creating struct l2cap_chan in 6LOWPAN

When L2CAP channel is destroyed by hci_unregister_dev, it will
acquire the spin lock of the (struct l2cap_chan *)->tx_q list to
delete all the buffers. But sometimes when hci_unregister_dev is
being called, this lock may have not bee initialized. Initialize
the TX queue lock when creating struct l2cap_chan in 6LOWPAN to fix
this problem.

Reported-by: syzbot+fadfba6a911f6bf71842@...kaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=fadfba6a911f6bf71842
Signed-off-by: Coiby Xu <coiby.xu@...il.com>
---
 net/bluetooth/6lowpan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index bb55d92691b0..713c618a73df 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -651,6 +651,7 @@ static struct l2cap_chan *chan_create(void)
 
 	l2cap_chan_set_defaults(chan);
 
+	skb_queue_head_init(&chan->tx_q);
 	chan->chan_type = L2CAP_CHAN_CONN_ORIENTED;
 	chan->mode = L2CAP_MODE_LE_FLOWCTL;
 	chan->imtu = 1280;
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ