2020-03-25 19:55:28

by Gal Ben Haim

[permalink] [raw]
Subject: Memory leak in l2cap_sock_connect

we are experiencing memory leaks in the Bluetooth subsystem,
this is happening in kernel 4.4.x, 4.9.x and 4.14.x, we tried the
Bluetooth subsystem from kernel 4.9.217 to make sure
https://lore.kernel.org/patchwork/patch/1157142/ doesn't solve it.

devices are connected from Bluez v5.50 with experimental flags on via
Adapter.ConnectDevice. we also tried connecting with btmgmt's Add
Device with the same results.

are there any leads on how to fix this? or workarounds?

unreferenced object 0xa592c000 (size 1024):
comm "bluetoothd", pid 464, jiffies 630386 (age 8911.090s)
hex dump (first 32 bytes):
bc c8 27 a9 00 02 00 00 00 00 00 00 f5 46 4a 05 ..'..........FJ.
8d cd 01 d1 c9 3f 95 01 00 00 00 00 00 00 00 00 .....?..........
backtrace:
[<807e8714>] hci_connect_le_scan+0xf0/0x248
[<80806224>] l2cap_chan_connect+0x4b4/0x6ec
[<8080bc88>] l2cap_sock_connect+0xe8/0x184
[<806eca04>] SyS_connect+0x64/0x94
[<80107780>] ret_fast_syscall+0x0/0x3c
[<ffffffff>] 0xffffffff
unreferenced object 0xa58dea00 (size 256):
comm "bluetoothd", pid 464, jiffies 630386 (age 8911.090s)
hex dump (first 32 bytes):
00 c0 92 a5 00 16 8c a4 36 01 00 00 00 00 00 00 ........6.......
00 06 00 00 e0 ff ff ff 18 ea 8d a5 18 ea 8d a5 ................
backtrace:
[<80806378>] l2cap_chan_connect+0x608/0x6ec
[<8080bc88>] l2cap_sock_connect+0xe8/0x184
[<806eca04>] SyS_connect+0x64/0x94
[<80107780>] ret_fast_syscall+0x0/0x3c
[<ffffffff>] 0xffffffff