DPDK patches and discussions
 help / color / mirror / Atom feed
* DPDK sanitizer seems cannot detect the overflow issue sometimes
@ 2022-06-29  9:56 halsey.pian
  2022-06-29 14:59 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: halsey.pian @ 2022-06-29  9:56 UTC (permalink / raw)
  To: dev; +Cc: halsey.pian

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-29 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29  9:56 DPDK sanitizer seems cannot detect the overflow issue sometimes halsey.pian
2022-06-29 14:59 ` Stephen Hemminger

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).