From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E191A0C45; Wed, 16 Jun 2021 05:20:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36DE840140; Wed, 16 Jun 2021 05:20:25 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 90A064003C for ; Wed, 16 Jun 2021 05:20:23 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 5F2C4A0C47; Wed, 16 Jun 2021 05:20:23 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Wed, 16 Jun 2021 03:20:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: other X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zhihongx.peng@intel.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 737] dpdk test_mbuf has heap-buffer-overflow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D737 Bug ID: 737 Summary: dpdk test_mbuf has heap-buffer-overflow Product: DPDK Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: other Assignee: dev@dpdk.org Reporter: zhihongx.peng@intel.com Target Milestone: --- Created attachment 160 --> https://bugs.dpdk.org/attachment.cgi?id=3D160&action=3Dedit asan patch Environment dpdk: 21.05 test patch: 0001-asan-and-asan-gcc-patch.patch Test Setup: 1. git apply 0007-porting-AddressSanitizer-feature-to-DPDK.patch 2. git apply 0001-Solve-gcc-compile-dpdk-asan.patch 3. git apply 0001-Solve-known-bugs.patch 4. CC=3Dgcc meson --werror -Denable_kmods=3DTrue -Dlibdir=3Dlib -Dbuildtype= =3Ddebug -Db_lundef=3Dfalse -Db_sanitize=3Daddress --default-library=3Dstatic x86_64-native-linuxapp-gc 5. ninja -C x86_64-native-linuxapp-gcc -j 110 6. ./x86_64-native-linuxapp-gcc/app/test/dpdk-test -l 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,= 29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,= 55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71 -n 4 --file-prefix=3Ddpdk_7594_20210615194546 7. RTE>>mbuf_autotest 8. expect result no error actual result There are some errors here: =3D=3D32584=3D=3DERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f753fb11078 at pc 0x000000833ec8 bp 0x7ffdf55d4d50 sp 0x7ffdf55d4d40 READ of size 8 at 0x7f753fb11078 thread T0 #0 0x833ec7 in rte_mempool_virt2iova ../lib/mempool/rte_mempool.h:1689 #1 0x86cf19 in test_pktmbuf_ext_shinfo_init_helper ../app/test/test_mbuf.c:= 2366 #2 0x86f282 in test_mbuf ../app/test/test_mbuf.c:2866 #3 0x407a9d in cmd_autotest_parsed ../app/test/commands.c:71 #4 0x1cab035 in cmdline_parse ../lib/cmdline/cmdline_parse.c:290 #5 0x1ca6610 in cmdline_valid_buffer ../lib/cmdline/cmdline.c:26 #6 0x1cb21a8 in rdline_char_in ../lib/cmdline/cmdline_rdline.c:421 #7 0x1ca6e95 in cmdline_in ../lib/cmdline/cmdline.c:149 #8 0x1ca73b8 in cmdline_interact ../lib/cmdline/cmdline.c:223 #9 0x428486 in main ../app/test/test.c:234 #10 0x7f7d4234b492 in __libc_start_main (/lib64/libc.so.6+0x23492) #11 0x4077dd in _start (/root/dpdk/x86_64-native-linuxapp-gcc/app/test/dpdk-test+0x4077dd) Address 0x7f753fb11078 is a wild pointer. SUMMARY: AddressSanitizer: heap-buffer-overflow ../lib/mempool/rte_mempool.h:1689 in rte_mempool_virt2iova Shadow bytes around the buggy address: 0x0fef27f5a1b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fef27f5a1c0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fef27f5a1d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fef27f5a1e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0fef27f5a1f0: fd fd fd fd fd fd fd fd 00 00 00 00 00 00 00 00 =3D>0x0fef27f5a200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa[fa] 0x0fef27f5a210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fef27f5a220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fef27f5a230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fef27f5a240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0fef27f5a250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --=20 You are receiving this mail because: You are the assignee for the bug.=