Re: [PATCH] wfx: prevent underflow in wfx_send_pds()

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

 



Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx> writes:

> On Friday 19 August 2022 07:23:43 CEST Dan Carpenter wrote:
>> This does a "chunk_len - 4" subtraction later when it calls:
>> 
>>         ret = wfx_hif_configuration(wdev, buf + 4, chunk_len - 4);
>> 
>> so check for "chunk_len" is less than 4.
>
> This patch also ensures that buf[4] won't overflow during:
>
>     if (buf[4] != '{' || buf[chunk_len - 1] != '}')
>     	dev_warn(wdev->dev, "PDS:%d: unexpected content\n", chunk_num);
>
>> Fixes: dcbecb497908 ("staging: wfx: allow new PDS format")
>> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
> Reviewed-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>

BTW Jérôme, as you are the driver maintainer you can use Acked-by.

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

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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux