Re: [PATCH net v3 5/6] usbnet: ipheth: refactor NCM datagram loop, fix DPE OoB read

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

 



On 11/24/24 00:54, Foster Snowhill wrote:
> Introduce an rx_error label to reduce repetitions in the header signature
> checks.
> 
> Store wDatagramIndex and wDatagramLength after endianness conversion to
> avoid repeated le16_to_cpu() calls.
> 
> Rewrite the loop to return on a null trailing DPE, which is required
> by the CDC NCM spec. In case it is missing, fall through to rx_error.
> 
> Fix an out-of-bounds DPE read, limit the number of processed DPEs to
> the amount that fits into the fixed-size NDP16 header.

It looks like this patch is doing 2 quite unrelated things, please split
it in 2 separate patch:

patch 1 refactors the code introducing the rx_error label
patch 2 fixes the out-of-bounds

Thanks,

Paolo





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux