mbox

[v2,0/2] check illegal packets

Message ID 20220927071522.3656059-1-kevinx.liu@intel.com (mailing list archive)
Headers

Message

Kevin Liu Sept. 27, 2022, 7:15 a.m. UTC
  Check whether the data packet is illegal of ice and iavf driver.

v2:
Change the scheme, check the data_len and update commit log.

Kevin Liu (2):
  net/iavf: check illegal packets
  net/ice: check illegal packets

 drivers/net/iavf/iavf_rxtx.c |  9 +++++++++
 drivers/net/iavf/iavf_rxtx.h |  2 ++
 drivers/net/ice/ice_rxtx.c   | 11 +++++++++++
 drivers/net/ice/ice_rxtx.h   |  2 ++
 4 files changed, 24 insertions(+)
  

Comments

David Marchand Sept. 18, 2023, 2:42 p.m. UTC | #1
On Tue, Sep 27, 2022 at 9:24 AM Kevin Liu <kevinx.liu@intel.com> wrote:
>
> Check whether the data packet is illegal of ice and iavf driver.
>
> v2:
> Change the scheme, check the data_len and update commit log.
>
> Kevin Liu (2):
>   net/iavf: check illegal packets
>   net/ice: check illegal packets
>
>  drivers/net/iavf/iavf_rxtx.c |  9 +++++++++
>  drivers/net/iavf/iavf_rxtx.h |  2 ++
>  drivers/net/ice/ice_rxtx.c   | 11 +++++++++++
>  drivers/net/ice/ice_rxtx.h   |  2 ++
>  4 files changed, 24 insertions(+)

This series looks wrong to me.

- What happens if the application requests TSO to the nic?
- Checking data_len of a mbuf means only checking the size of the
first segment, so if any limitation applies to the packet size, it
should by checking pkt_len.

I will probably send reverts for the two patches.
  
Kevin Traynor Sept. 18, 2023, 2:51 p.m. UTC | #2
On 18/09/2023 15:42, David Marchand wrote:
> On Tue, Sep 27, 2022 at 9:24 AM Kevin Liu <kevinx.liu@intel.com> wrote:
>>
>> Check whether the data packet is illegal of ice and iavf driver.
>>
>> v2:
>> Change the scheme, check the data_len and update commit log.
>>
>> Kevin Liu (2):
>>    net/iavf: check illegal packets
>>    net/ice: check illegal packets
>>
>>   drivers/net/iavf/iavf_rxtx.c |  9 +++++++++
>>   drivers/net/iavf/iavf_rxtx.h |  2 ++
>>   drivers/net/ice/ice_rxtx.c   | 11 +++++++++++
>>   drivers/net/ice/ice_rxtx.h   |  2 ++
>>   4 files changed, 24 insertions(+)
> 
> This series looks wrong to me.
> 
> - What happens if the application requests TSO to the nic?
> - Checking data_len of a mbuf means only checking the size of the
> first segment, so if any limitation applies to the packet size, it
> should by checking pkt_len.
> 
> I will probably send reverts for the two patches.
> 
> 

there is a fix also that needs to be checked:
688cb2f2c61e ("net/ice: fix scalar Tx path segment")