From rodrigc@crodrigues.org  Wed Mar 30 07:35:05 2005
Return-Path: <rodrigc@crodrigues.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 7F34616A4CE; Wed, 30 Mar 2005 07:35:05 +0000 (GMT)
Received: from sccrmhc14.comcast.net (sccrmhc14.comcast.net [204.127.202.59])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id CD64543D39; Wed, 30 Mar 2005 07:35:04 +0000 (GMT)
	(envelope-from rodrigc@crodrigues.org)
Received: from h00609772adf0.ne.client2.attbi.com ([66.30.114.143])
          by comcast.net (sccrmhc14) with ESMTP
          id <2005033007350301400dlihve>; Wed, 30 Mar 2005 07:35:04 +0000
Received: from h00609772adf0.ne.client2.attbi.com (localhost.127.in-addr.arpa [127.0.0.1])
	by h00609772adf0.ne.client2.attbi.com (8.13.3/8.13.1) with ESMTP id j2U7Z32Y033845;
	Wed, 30 Mar 2005 02:35:04 -0500 (EST)
	(envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com)
Received: (from rodrigc@localhost)
	by h00609772adf0.ne.client2.attbi.com (8.13.3/8.13.1/Submit) id j2U7Z3e8033844;
	Wed, 30 Mar 2005 02:35:03 -0500 (EST)
	(envelope-from rodrigc)
Message-Id: <200503300735.j2U7Z3e8033844@h00609772adf0.ne.client2.attbi.com>
Date: Wed, 30 Mar 2005 02:35:03 -0500 (EST)
From: Craig Rodrigues <rodrigc@crodrigues.org>
Reply-To: Craig Rodrigues <rodrigc@crodrigues.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Robert Watson <rwatson@freebsd.org>,
	Alexander Kabaev <kan@freebsd.org>
Subject: uiovcnt not initialized for exattr_get and extattr_list
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         79357
>Category:       kern
>Synopsis:       [patch] uiovcnt not initialized for exattr_get and extattr_list
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rodrigc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 30 07:40:01 GMT 2005
>Closed-Date:    Wed Jun 08 13:26:34 GMT 2005
>Last-Modified:  Wed Jun 08 13:26:34 GMT 2005
>Originator:     Craig Rodrigues
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD dibbler.crodrigues.org 6.0-CURRENT FreeBSD 6.0-CURRENT #28: Sat Mar 26 13:25:05 EST 2005 rodrigc@dibbler.crodrigues.org:/opt/home/rodrigc/xfs/xfs_kernel/sys/i386/compile/XFS_KERNEL i386


	
>Description:
	This one is for rwatson to look at.  The iovcnt is not
	initialized in a few system calls related to extended attributes.
>How-To-Repeat:
	
>Fix:

--- sys/kern/vfs_syscalls.c.orig	Tue Mar 29 23:32:21 2005
+++ sys/kern/vfs_syscalls.c	Tue Mar 29 23:33:39 2005
@@ -4505,6 +4505,7 @@
 		aiov.iov_base = data;
 		aiov.iov_len = nbytes;
 		auio.uio_iov = &aiov;
+		auio.uio_iovcnt = 1;
 		auio.uio_offset = 0;
 		if (nbytes > INT_MAX) {
 			error = EINVAL;
@@ -4791,6 +4792,7 @@
 		aiov.iov_base = data;
 		aiov.iov_len = nbytes;
 		auio.uio_iov = &aiov;
+		auio.uio_iovcnt = 1;
 		auio.uio_offset = 0;
 		if (nbytes > INT_MAX) {
 			error = EINVAL;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rwatson 
Responsible-Changed-By: arved 
Responsible-Changed-When: Mon Jun 6 17:18:53 GMT 2005 
Responsible-Changed-Why:  
Submitter wants patch to be handled by rwatson 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79357 
Responsible-Changed-From-To: rwatson->rodrigc 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Tue Jun 7 18:10:22 GMT 2005 
Responsible-Changed-Why:  
Chowning back to Craig since this patch looks good and is ready for 
commit. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=79357 
State-Changed-From-To: open->closed 
State-Changed-By: rodrigc 
State-Changed-When: Wed Jun 8 13:26:18 GMT 2005 
State-Changed-Why:  
Committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79357 
>Unformatted:
