From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXRzT-0002kZ-Jq for qemu-devel@nongnu.org; Mon, 16 Mar 2015 06:11:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXRzP-0005ZX-Ig for qemu-devel@nongnu.org; Mon, 16 Mar 2015 06:11:19 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:53960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXRzO-0005Yh-Uk for qemu-devel@nongnu.org; Mon, 16 Mar 2015 06:11:15 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Mar 2015 15:41:12 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 6D53E3940057 for ; Mon, 16 Mar 2015 15:41:09 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2GAB40P15073316 for ; Mon, 16 Mar 2015 15:41:04 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2GAB3bu024599 for ; Mon, 16 Mar 2015 15:41:03 +0530 From: "Aneesh Kumar K.V" Date: Mon, 16 Mar 2015 15:39:40 +0530 Message-Id: <1426500583-15712-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com> In-Reply-To: <1426500583-15712-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1426500583-15712-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 3/6] hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws, peter.maydell@linaro.org Cc: "Aneesh Kumar K.V" , Shannon Zhao , qemu-devel@nongnu.org, Shannon Zhao From: Shannon Zhao It's detected by coverity. Fix out-of-bounds access of the function mp_dacl_listxattr. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-posix-acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c index 803d9d94f3b8..09dad071e487 100644 --- a/hw/9pfs/virtio-9p-posix-acl.c +++ b/hw/9pfs/virtio-9p-posix-acl.c @@ -114,7 +114,7 @@ static ssize_t mp_dacl_listxattr(FsContext *ctx, const char *path, } /* len includes the trailing NUL */ - memcpy(value, ACL_ACCESS, len); + memcpy(value, ACL_DEFAULT, len); return 0; } -- 2.1.0