Re: [PATCH 5.4 0/3] Bluetooth: L2CAP: Fix accepting connection request for invalid SPSM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/12/2022 19:07, Greg KH wrote:
On Sun, Dec 04, 2022 at 01:24:33AM +0300, Cengiz Can wrote:
Hello,

commit 711f8c3fb3db ("Bluetooth: L2CAP: Fix accepting connection request for
invalid SPSM") did not apply to 5.4-stable tree previously.

One of the notable dependencies is commit 15f02b910562 ("Bluetooth: L2CAP:
Add initial code for Enhanced Credit Based Mode") and that doesn't apply to
5.4-stable either due to a mismatch on `l2cap_sock_setsockopt_old` in
l2cap_sock.c.

And that commit does not seem relevant for stable backports at all as it
is a new feature.  If all you really want to do is fix the "bug", why
not just take half of commit 711f8c3fb3db, i.e. the half that actually
matters in this kernel tree?

That sounds reasonable and it actually was my first attempt.

However I was not sure if that would be enough to mitigate all possible execution paths. Since your earlier (possibly automated) message[1] listed possible dependencies and I wanted to play it safe.

[1]: https://lore.kernel.org/all/1667811208314@xxxxxxxxx/

Why wouldn't that just work for all of the older kernels?  I'll go do
that now as it seems like it will solve the issue,

Please do. Thanks!

if people could actually test it (hint, why didn't you cc: the bluetooth
developers here?)

For my patchset I ran basic communication tests with l2test (from bluez).

```
$ l2test -I 2000 -r
l2test[1492]: Waiting for connection on psm 4113 ...
l2test[1494]: Connect from 00:11:22:33:44:55 (bredr, psm 4113, dcid 64)
l2test[1494]: Local device 66:77:88:99:AA:BB (bredr, psm 4113, scid 64)
l2test[1494]: Options [imtu 2000, omtu 672, flush_to 65535, mode 0, handle 1, class 0x6c010c, priority 0, rcvbuf 212992]
l2test[1494]: Receiving ...
```

And you are absolutely right. I forgot to CC bluetooth devs. That's my bad. Sorry for that.

Thank you for the constructive feedback.


thanks,

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux