From: "G, GurucharanX" <gurucharanx.g@intel.com>
To: Xiaomeng Tong <xiam0nd.tong@gmail.com>,
"Brandeburg, Jesse" <jesse.brandeburg@intel.com>
Cc: "pabeni@redhat.com" <pabeni@redhat.com>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"jeffrey.t.kirsher@intel.com" <jeffrey.t.kirsher@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: RE: [Intel-wired-lan] [PATCH] i40e: i40e_main: fix a missing check on list iterator
Date: Thu, 7 Apr 2022 07:14:28 +0000 [thread overview]
Message-ID: <BYAPR11MB33679D2463F0E8B3833CC64BFCE69@BYAPR11MB3367.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220327063606.7315-1-xiam0nd.tong@gmail.com>
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Xiaomeng Tong
> Sent: Sunday, March 27, 2022 12:06 PM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>
> Cc: pabeni@redhat.com; intel-wired-lan@lists.osuosl.org; linux-
> kernel@vger.kernel.org; stable@vger.kernel.org; Xiaomeng Tong
> <xiam0nd.tong@gmail.com>; jeffrey.t.kirsher@intel.com;
> netdev@vger.kernel.org; kuba@kernel.org; davem@davemloft.net
> Subject: [Intel-wired-lan] [PATCH] i40e: i40e_main: fix a missing check on list
> iterator
>
> The bug is here:
> ret = i40e_add_macvlan_filter(hw, ch->seid, vdev->dev_addr,
> &aq_err);
>
> The list iterator 'ch' will point to a bogus position containing HEAD if the list is
> empty or no element is found. This case must be checked before any use of
> the iterator, otherwise it will lead to a invalid memory access.
>
> To fix this bug, use a new variable 'iter' as the list iterator, while use the origin
> variable 'ch' as a dedicated pointer to point to the found element.
>
> Cc: stable@vger.kernel.org
> Fixes: 1d8d80b4e4ff6 ("i40e: Add macvlan support on i40e")
> Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 27 +++++++++++----------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
prev parent reply other threads:[~2022-04-07 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-27 6:36 Xiaomeng Tong
2022-04-07 7:14 ` G, GurucharanX [this message]
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=BYAPR11MB33679D2463F0E8B3833CC64BFCE69@BYAPR11MB3367.namprd11.prod.outlook.com \
--to=gurucharanx.g@intel.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=xiam0nd.tong@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®