Re: [PATCH v3 4/7] can: Add Nuvoton NCT6694 CAN support

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

 



On 16/12/2024 at 15:58, Ming Yu wrote:
> Dear Vincent,
> 
> Thank you for your comments,
> 
> Vincent Mailhol <mailhol.vincent@xxxxxxxxxx> 於 2024年12月11日 週三 下午11:25寫道:

(...)

>>>> +     cf->len = xmit->dlc;
>>>
>>> what does xmit->dlc contain? The DLC or the length?
>>
>> +1
>>
>> Also, do not trust the device data. Even if SPI attacks are less
>> common, make sure to sanitize this length.
>>
>>   cf->len = canfd_sanitize_len(xmit->dlc);
>>
>> Or
>>
>>   cf->len = canfd_sanitize_len(xmit->dlc);
>>
>> if xmit->dlc is in fact a DLC.
>>
> 
> Excuse me, the xmit->dlc is actual data length.
> Does it need to be fixed?

Yes, name is xmit->len. DLC has a different meaning.


Yours sincerely,
Vincent Mailhol





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux