From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id 188BD2952 for ; Thu, 11 May 2017 18:38:47 +0200 (CEST) Received: by mail-pf0-f177.google.com with SMTP id m17so16431403pfg.3 for ; Thu, 11 May 2017 09:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=Jqr2Q5E2HF1vHiW5CwEwNmnDoM7DsEkvLgpJYJY0ky0=; b=CNNODkqK/WwKIx0D8y13ZvQipM6DQg9m2n/ZTNhYpL6fLemyEG49KuLV2OTYPUGAab kDCkQG9f40tXu5WT2NGG/U7WFJyH+A/+OolnQv2n9FVevbwMP2WA9E+P6dEmhEA8wfIH oTUyVKtc1Cqt+7185hu9uloVCyrC8IwFshASHYa//HeapeSNeHUt/G2RQmWNjViT+8H+ 30n7P/Tckj339fsEkUchn3D649loY/LTt9tJIBr1MoIzFJ2UiCmlgegtdPDpvCVBVQkI zlusij6ctgEYzS/YGyJVDyincM+DMpjQRAoqzzN2UAbyzmbX6LDiOIrPSmO16RKNvHO4 sHfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=Jqr2Q5E2HF1vHiW5CwEwNmnDoM7DsEkvLgpJYJY0ky0=; b=EJTHp98NkX+OBF3xNGeppRvuh94oIuZKR7/38zCsBsoKpqkIz7m9FIg1AJsMwn6BVR SqsrSqcNtB4vRJjbiaAwtOhXOSOfWuIflOZuNXgk1VqvesdLvVR6gF7boGtNf2wLbQnj HUb0wA+H2DjspdfwA8332SUX1IV4vNu0w8/2QBNEq0etkCNZ13gLHUsZujy216wN1Kq/ A6DmRGjxAt0X38BJ/vEw7e7xigxysRSKCA1aGN/5kut6jMwqEfZ6mU6D5TiFq4KWRUuu rFjGo3tegUqikl9EpRRJjpuWK6LnhyNuJKlIDzkdBgjxRURaMYLS1fF1ZarHJR5HLiRb jbvQ== X-Gm-Message-State: AODbwcAA7tL1onMC0+oENE7K3sgfwxezHK/WU4A54eddv+LTT9LR190F nyPcldY8gSF55dOXHWk= X-Received: by 10.98.204.130 with SMTP id j2mr2736pfk.107.1494520726970; Thu, 11 May 2017 09:38:46 -0700 (PDT) Received: from xeon-e3 (76-14-206-252.or.wavecable.com. [76.14.206.252]) by smtp.gmail.com with ESMTPSA id w85sm1017373pfk.62.2017.05.11.09.38.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 May 2017 09:38:46 -0700 (PDT) Date: Thu, 11 May 2017 09:38:39 -0700 From: Stephen Hemminger To: Alejandro Lucero , dev@dpdk.org Message-ID: <20170511093839.7c16ebd0@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] New Coverity defects in VFIO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 16:38:48 -0000 Looks like obvious C array bounds issues... Begin forwarded message: Date: Thu, 11 May 2017 06:32:38 -0700 From: scan-admin@coverity.com To: stephen@networkplumber.org Subject: New Defects reported by Coverity Scan for DPDK Data Plane Development Kit Hi, Please find the latest report on new defect(s) introduced to DPDK Data Plane Development Kit found with Coverity Scan. 4 new defect(s) introduced to DPDK Data Plane Development Kit found with Coverity Scan. 4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 4 of 4 defect(s) ** CID 144558: Parse warnings (PARSE_ERROR) /tmp/auto-config-h.sh.116891.c: 3 in () ________________________________________________________________________________________________________ *** CID 144558: Parse warnings (PARSE_ERROR) /tmp/auto-config-h.sh.116891.c: 3 in () 1 #include 2 >>> CID 144558: Parse warnings (PARSE_ERROR) >>> identifier "TCA_FLOWER_KEY_VLAN_PRIO" is undefined ** CID 144557: Memory - corruptions (OVERRUN) /lib/librte_eal/linuxapp/eal/eal_vfio.c: 207 in vfio_group_device_put() ________________________________________________________________________________________________________ *** CID 144557: Memory - corruptions (OVERRUN) /lib/librte_eal/linuxapp/eal/eal_vfio.c: 207 in vfio_group_device_put() 201 int i; 202 203 i = get_vfio_group_idx(vfio_group_fd); 204 if (i < 0 || i > VFIO_MAX_GROUPS) 205 RTE_LOG(ERR, EAL, " wrong vfio_group index (%d)\n", i); 206 else >>> CID 144557: Memory - corruptions (OVERRUN) >>> Overrunning array "vfio_cfg.vfio_groups" of 64 12-byte elements at element index 64 (byte offset 768) using index "i" (which evaluates to 64). 207 vfio_cfg.vfio_groups[i].devices--; 208 } 209 210 static int 211 vfio_group_device_count(int vfio_group_fd) 212 { ** CID 144556: Memory - illegal accesses (OVERRUN) /lib/librte_eal/linuxapp/eal/eal_vfio.c: 221 in vfio_group_device_count() ________________________________________________________________________________________________________ *** CID 144556: Memory - illegal accesses (OVERRUN) /lib/librte_eal/linuxapp/eal/eal_vfio.c: 221 in vfio_group_device_count() 215 i = get_vfio_group_idx(vfio_group_fd); 216 if (i < 0 || i > VFIO_MAX_GROUPS) { 217 RTE_LOG(ERR, EAL, " wrong vfio_group index (%d)\n", i); 218 return -1; 219 } 220 >>> CID 144556: Memory - illegal accesses (OVERRUN) >>> Overrunning array "vfio_cfg.vfio_groups" of 64 12-byte elements at element index 64 (byte offset 768) using index "i" (which evaluates to 64). 221 return vfio_cfg.vfio_groups[i].devices; 222 } 223 224 int 225 clear_group(int vfio_group_fd) 226 { ** CID 144555: Memory - corruptions (OVERRUN) /lib/librte_eal/linuxapp/eal/eal_vfio.c: 195 in vfio_group_device_get() ________________________________________________________________________________________________________ *** CID 144555: Memory - corruptions (OVERRUN) /lib/librte_eal/linuxapp/eal/eal_vfio.c: 195 in vfio_group_device_get() 189 int i; 190 191 i = get_vfio_group_idx(vfio_group_fd); 192 if (i < 0 || i > VFIO_MAX_GROUPS) 193 RTE_LOG(ERR, EAL, " wrong vfio_group index (%d)\n", i); 194 else >>> CID 144555: Memory - corruptions (OVERRUN) >>> Overrunning array "vfio_cfg.vfio_groups" of 64 12-byte elements at element index 64 (byte offset 768) using index "i" (which evaluates to 64). 195 vfio_cfg.vfio_groups[i].devices++; 196 } 197 198 static void 199 vfio_group_device_put(int vfio_group_fd) 200 { ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRatAu7kfwx-2FEYQLnaewVIzHeicA-2BXVfT6hZ5-2BlQUbOEuO498PDBpm2du3zbqLAIkSYNH-2F4pgPd0yf8CgX5U0jRj_5xu02FVv-2BCbxTLHpBsC0RXI5u3ZIuvswXolnGx3HI6n1gq9Xsuj8K50wQIlWov7yyQRBN8re6yFBwOsnahFZyjQW3aqTA5h9rz-2BI7CfexKV5NFlSm1lW-2Fiif3a6-2Fu7-2Fs613T3n94FacSVILpwmgH4KcYzHtMPdTwJy1kCK02zCViEtNsq-2FCKPHCFx1r4p5UV6Psx61JLzOXw56M2GSEUOPo8sP2PR2MWjeCdy5rfIyU-3D To manage Coverity Scan email notifications for "stephen@networkplumber.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4sKfrkUL5oDv8dgJj5BU3IfRYzaFCVGnOstQOuK3KKCEYrqlxJ2-2FPVogkBzkcq1Dg-2FyXbbLWT-2BUFivnCf-2Ffy5pynld3GGM7zvzbDuODpBlYA-3D_5xu02FVv-2BCbxTLHpBsC0RXI5u3ZIuvswXolnGx3HI6n1gq9Xsuj8K50wQIlWov7yyQRBN8re6yFBwOsnahFZygYSNuU7rrSKQtPVcIi21MDpz6KZwG8nS4KmgXtet9991WL1lHRPs9GRo4zwJ-2Bnb-2FTnQYqob6zFOkhFpJ-2FjhXOQt2JMEhg-2FflJvekTxexy1BKKt-2FaadTS9JcUmvbkxxm73IxfO8iGv39u0aDGpPB0r8-3D