2022-05-24 22:27:56

by Stephen Hemminger

[permalink] [raw]
Subject: Re: [PATCH-stable] Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name}

On Tue, 24 May 2022 13:55:57 -0700
Luiz Augusto von Dentz <[email protected]> wrote:

> Here is a tentative fix, I do wonder though why you were trying to set
> the name directly and not using the likes of bluetoothctl/btmgmt?
> bluetoothd don't seem to bother setting a shortname so it is probably
> not reproducible with it but btmgmt does:

Not me. I just forward reports from bugzilla.
Any networking related bug reports end up going to me, and I filter/forward them.


2022-05-25 12:29:56

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH-stable] Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name}

Hi Stephen,

On Tue, May 24, 2022 at 2:21 PM Stephen Hemminger
<[email protected]> wrote:
>
> On Tue, 24 May 2022 13:55:57 -0700
> Luiz Augusto von Dentz <[email protected]> wrote:
>
> > Here is a tentative fix, I do wonder though why you were trying to set
> > the name directly and not using the likes of bluetoothctl/btmgmt?
> > bluetoothd don't seem to bother setting a shortname so it is probably
> > not reproducible with it but btmgmt does:
>
> Not me. I just forward reports from bugzilla.
> Any networking related bug reports end up going to me, and I filter/forward them.

Sorry, I guess we should forward this to Tom then.

--
Luiz Augusto von Dentz

2022-05-25 23:57:52

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH-stable] Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name}

Hi Tom,

On Tue, May 24, 2022 at 4:42 PM Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi Stephen,
>
> On Tue, May 24, 2022 at 2:21 PM Stephen Hemminger
> <[email protected]> wrote:
> >
> > On Tue, 24 May 2022 13:55:57 -0700
> > Luiz Augusto von Dentz <[email protected]> wrote:
> >
> > > Here is a tentative fix, I do wonder though why you were trying to set
> > > the name directly and not using the likes of bluetoothctl/btmgmt?
> > > bluetoothd don't seem to bother setting a shortname so it is probably
> > > not reproducible with it but btmgmt does:
> >
> > Not me. I just forward reports from bugzilla.
> > Any networking related bug reports end up going to me, and I filter/forward them.
>
> Sorry, I guess we should forward this to Tom then.

Could you please check if the following change does fix the problem:

https://patchwork.kernel.org/project/bluetooth/patch/[email protected]/


--
Luiz Augusto von Dentz

2022-05-27 12:46:26

by Tom Unbehau

[permalink] [raw]
Subject: Re: [PATCH-stable] Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name}

Sending this mail again due to HTML mails not being allowed.

Hi Luiz,

The patch did not fix my issue. The issue described in the bugzilla ticket was an error
in the mgmt.c module. I do not see any direct correlation between your patch and the error i am encountering.
I have tried your patch on mainline (5.18) and got the same strlen bug when executing the example
program I have attached to the bugzilla ticket.

I think strlen in the mgmt.c module needs to be replaced by strnlen.
I have attached a patch with these changes to this mail. After applying this patch the
error could not be reproduced for me.

However, I am not sure, if the changes you have made in the eir.c module are also prudent and could fix
similar issues (I am not familiar with this).

Regards,
Tom Unbehau


Attachments:
btfix2.patch (725.00 B)
btfix2.patch