kern/79357: uiovcnt not initialized for exattr_get and extattr_list

Craig Rodrigues rodrigc at crodrigues.org
Tue Mar 29 23:40:02 PST 2005


>Number:         79357
>Category:       kern
>Synopsis:       uiovcnt not initialized for exattr_get and extattr_list
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 30 07:40:01 GMT 2005
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list