DPDK patches and discussions
 help / color / mirror / Atom feed
From: "halsey.pian@longsys.com" <halsey.pian@longsys.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "halsey.pian@longsys.com" <halsey.pian@longsys.com>
Subject: DPDK sanitizer seems cannot detect the overflow issue sometimes
Date: Wed, 29 Jun 2022 09:56:03 +0000	[thread overview]
Message-ID: <95F5C09B652250489A8640C2D0DF5BD0BF99503E@lsex.goodwill-ic.com> (raw)

Dear All,

I would try to detect the illegal memory access issues in my App based on DPDK, so I add some codes based on several overflow scenario to check if it is detected in DPDK standalone project.

It seems that DPDK santizer cannot find the overflow issue below,

I add some code into examples/helloworld/main.c as below,

char*p = (char*)rte_zmalloc(NULL, 9, 4096);

if(p != NULL)
{
	p = p + 32;
	*p = 'A‘  // should be overflow here
}

But there is no any sanitzer output after dpdk-helloworld exit.

BTW, DPDK sanitzer can detect the overflow below,


char*p = (char*)rte_zmalloc(NULL, 9, 4096);

if(p != NULL)
{
	p[9] = 'A‘  // can be detected
}

Unfortunately, DPDK cannot detect the overflow when update the code to below,
	p[32] = 'A' // cannot be detected


Version: DPDK 21.11.1
OS: Fedora 32
Build: meson setup -Dbuildtype=debug -Db_lundef=false -Db_sanitize=address -Dexamples=hellowowrld build

Is it a known issue? I am confused with this. 
Could you provide some info? Thanks.

Best Regards
Halsey Pian


             reply	other threads:[~2022-06-29  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29  9:56 halsey.pian [this message]
2022-06-29 14:59 ` Stephen Hemminger

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=95F5C09B652250489A8640C2D0DF5BD0BF99503E@lsex.goodwill-ic.com \
    --to=halsey.pian@longsys.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).