All of lore.kernel.org
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <intel-wired-lan@lists.osuosl.org>
Subject: Re: [PATCH net-next v2 08/14] iavf: temporary rename of IAVF_MAX_REQ_QUEUES to IAVF_MAX_REQ_QUEUES_VCV1
Date: Tue, 13 Oct 2026 15:27:29 +0200	[thread overview]
Message-ID: <e79ead5e-3851-43fe-847c-10f368f206cb@intel.com> (raw)
In-Reply-To: <sashiko-outbox-166503@kernel.org>

On 10/10/26 2:16 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] net: iavf: missing bounds check on num_vsis causes out-of-bounds write
> --
> 
> commit 96fe4c02ff0c0cd29e48e38845a6fbbedd204284
> Author: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> 
> iavf: temporary rename of IAVF_MAX_REQ_QUEUES to IAVF_MAX_REQ_QUEUES_VCV1
> 
> Rename IAVF_MAX_REQ_QUEUES to IAVF_MAX_REQ_QUEUES_VCV1, in preparation for
> the next patch that will extend the max to 256, using old value of 16 for
> the "v1" variant of virtchnl opcodes.
> 
>> diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
>> --- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
>> +++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
>> @@ -268,19 +268,19 @@ int iavf_send_vf_ptp_caps_msg(struct iavf_adapter *adapter)
>>    **/
>>   static void iavf_validate_num_queues(struct iavf_adapter *adapter)
>>   {
>> -	if (adapter->vf_res->num_queue_pairs > IAVF_MAX_REQ_QUEUES) {
>> +	if (adapter->vf_res->num_queue_pairs > IAVF_MAX_REQ_QUEUES_VCV1) {
>>   		struct virtchnl_vsi_resource *vsi_res;
>>   		int i;
>>   
>>   		dev_info(&adapter->pdev->dev, "Received %d queues, but can only have a max of %d\n",
>>   			 adapter->vf_res->num_queue_pairs,
>> -			 IAVF_MAX_REQ_QUEUES);
>> +			 IAVF_MAX_REQ_QUEUES_VCV1);
>>   		dev_info(&adapter->pdev->dev, "Fixing by reducing queues to %d\n",
>> -			 IAVF_MAX_REQ_QUEUES);
>> -		adapter->vf_res->num_queue_pairs = IAVF_MAX_REQ_QUEUES;
>> +			 IAVF_MAX_REQ_QUEUES_VCV1);
>> +		adapter->vf_res->num_queue_pairs = IAVF_MAX_REQ_QUEUES_VCV1;
>>   		for (i = 0; i < adapter->vf_res->num_vsis; i++) {
>>   			vsi_res = &adapter->vf_res->vsi_res[i];
>> -			vsi_res->num_queue_pairs = IAVF_MAX_REQ_QUEUES;
>> +			vsi_res->num_queue_pairs = IAVF_MAX_REQ_QUEUES_VCV1;
> 
> [Severity: High]
> Can a maliciously large num_vsis value from the PF cause an out-of-bounds
> write here?
> 
> In iavf_get_vf_config(), the message from the PF is copied into
> adapter->vf_res without validating num_vsis against the allocation
> size:

this is both pre-existing and we should trust PF, will ignore

  reply	other threads:[~2026-10-13 13:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 12:04 [PATCH net-next v2 00/14] devlink, mlx5, iavf, ice: XLVF for iavf Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 01/14] devlink, mlx5: add init/fini ops for shared devlink Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 02/14] ice: use shared devlink to store ice_adapters instead of custom xarray Przemek Kitszel
2026-10-10 12:16   ` sashiko-bot
2026-10-13 12:57     ` Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 03/14] ice: add VF queue ena/dis helper functions Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 04/14] ice: add helpers for Global RSS LUT alloc, free, vsi_update Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 05/14] ice: rename ICE_MAX_RSS_QS_PER_VF to ICE_MAX_QS_PER_VF_VCV1 Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 06/14] ice: bump to 256qs for VF Przemek Kitszel
2026-10-10 12:16   ` sashiko-bot
2026-10-13 13:46     ` Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 07/14] iavf: extend iavf_configure_queues() to support more queues Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 08/14] iavf: temporary rename of IAVF_MAX_REQ_QUEUES to IAVF_MAX_REQ_QUEUES_VCV1 Przemek Kitszel
2026-10-10 12:16   ` sashiko-bot
2026-10-13 13:27     ` Przemek Kitszel [this message]
2026-10-09 12:04 ` [PATCH net-next v2 09/14] iavf: increase max number of queues to 256 Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 10/14] iavf: use new opcodes to request more than 16 queues Przemek Kitszel
2026-10-10 12:16   ` sashiko-bot
2026-10-09 12:04 ` [PATCH net-next v2 11/14] ice: introduce handling of virtchnl LARGE VF opcodes Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 12/14] devlink: give user option to allocate resources Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 13/14] ice: represent RSS LUTs as devlink resources Przemek Kitszel
2026-10-10 12:16   ` sashiko-bot
2026-10-13 13:49     ` Przemek Kitszel
2026-10-09 12:04 ` [PATCH net-next v2 14/14] ice: support up to 256 VF queues Przemek Kitszel
2026-10-10 12:16   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e79ead5e-3851-43fe-847c-10f368f206cb@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.