DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Singh, Jasvinder" <jasvinder.singh@intel.com>
To: "Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/softnic: fix illegal memory access
Date: Mon, 16 Jul 2018 20:28:54 +0000	[thread overview]
Message-ID: <54CBAA185211B4429112C315DA58FF6D335D8C27@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <54CBAA185211B4429112C315DA58FF6D335D8B6F@IRSMSX103.ger.corp.intel.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Singh, Jasvinder
> Sent: Monday, July 16, 2018 6:26 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/softnic: fix illegal memory access
> 
> 
> 
> > -----Original Message-----
> > From: Dumitrescu, Cristian
> > Sent: Monday, July 16, 2018 5:04 PM
> > To: Singh, Jasvinder <jasvinder.singh@intel.com>; dev@dpdk.org
> > Subject: RE: [PATCH] net/softnic: fix illegal memory access
> >
> >
> >
> > > -----Original Message-----
> > > From: Singh, Jasvinder
> > > Sent: Monday, July 16, 2018 1:42 PM
> > > To: dev@dpdk.org
> > > Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> > > Subject: [PATCH] net/softnic: fix illegal memory access
> > >
> > > Fix pointer dereferencing and read after free (USE_AFTER_FREE).
> > >
> > > Coverity issue: 302867
> > > Fixes: bef50bcb1c47 ("net/softnic: implement start and stop")
> > >
> > > Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> > > ---
> > >  drivers/net/softnic/rte_eth_softnic_swq.c | 8 ++++++--
> > >  1 file changed, 6 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/softnic/rte_eth_softnic_swq.c
> > > b/drivers/net/softnic/rte_eth_softnic_swq.c
> > > index 1944fbb..604a2cc 100644
> > > --- a/drivers/net/softnic/rte_eth_softnic_swq.c
> > > +++ b/drivers/net/softnic/rte_eth_softnic_swq.c
> > > @@ -36,9 +36,13 @@ softnic_swq_free(struct pmd_internals *p)  void
> > > softnic_softnic_swq_free_keep_rxq_txq(struct pmd_internals *p)  {
> > > -	struct softnic_swq *swq;
> > > +	for ( ; ; ) {
> > > +		struct softnic_swq *swq;
> > > +
> > > +		swq = TAILQ_FIRST(&p->swq_list);
> > > +		if (swq == NULL)
> > > +			break;
> > >
> > > -	TAILQ_FOREACH(swq, &p->swq_list, node) {
> > >  		if ((strncmp(swq->name, "RXQ", strlen("RXQ")) == 0) ||
> > >  			(strncmp(swq->name, "TXQ", strlen("TXQ")) == 0))
> > >  			continue;
> > > --
 <snip>

Self NACK. Fix is incorrect. The infinite loop will never break due to non-empty swq_list.
 

      reply	other threads:[~2018-07-16 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 12:41 Jasvinder Singh
2018-07-16 16:04 ` Dumitrescu, Cristian
2018-07-16 17:25   ` Singh, Jasvinder
2018-07-16 20:28     ` Singh, Jasvinder [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=54CBAA185211B4429112C315DA58FF6D335D8C27@IRSMSX103.ger.corp.intel.com \
    --to=jasvinder.singh@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).