Search Linux Wireless

Re: [PATCH] wifi: libertas: use variable-size data in assoc req/resp cmd

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

 



Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes:

> On Fri, 2022-05-27 at 14:43 +0300, Kalle Valo wrote:
>> Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes:
>> 
>> > From: Johannes Berg <johannes.berg@xxxxxxxxx>
>> > 
>> > The firmware has a 512 limit here, but we use less, so gcc
>> > starts complaining about it:
>> > 
>> > drivers/net/wireless/marvell/libertas/cfg.c:1198:63: warning: array subscript ‘struct cmd_ds_802_11_associate_response[0]’ is partly outside array bounds of ‘unsigned char[203]’ [-Warray-bounds]
>> >  1198 |                       "aid 0x%04x\n", status, le16_to_cpu(resp->statuscode),
>> >       |                                                               ^~
>> > 
>> > Since we size the command and response buffer per our needs
>> > and not per the firmware maximum, change to a variable size
>> > data array and put the 512 only into a comment.
>> > 
>> > In the end, that's actually what the code always wanted, and
>> > it simplifies the code that used to subtract the fixed size
>> > buffer size in two places.
>> > 
>> > Reported-by: Jakub Kicinski <kuba@xxxxxxxxxx>
>> > Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
>> 
>> Can we now remove the no-array-bounds hack from libertas?
>> 
>
> I think Jakub said he dropped it from the patches?

Ah, indeed. I missed that, sorry for the noise.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux