svn commit: r322321 - head/sys/kern

Gleb Smirnoff glebius at FreeBSD.org
Wed Aug 9 17:48:39 UTC 2017


Author: glebius
Date: Wed Aug  9 17:48:38 2017
New Revision: 322321
URL: https://svnweb.freebsd.org/changeset/base/322321

Log:
  Plug uninitialized stack variable leak in sendfile(2).
  
  Reported by:	Ilja Van Sprundel <ivansprundel ioactive.com>
  Submitted by:	Domagoj Stolfa <domagoj.stolfa gmail.com>
  MFC after:	1 week
  Security:	uninitialized stack variable leak

Modified:
  head/sys/kern/kern_sendfile.c

Modified: head/sys/kern/kern_sendfile.c
==============================================================================
--- head/sys/kern/kern_sendfile.c	Wed Aug  9 17:32:39 2017	(r322320)
+++ head/sys/kern/kern_sendfile.c	Wed Aug  9 17:48:38 2017	(r322321)
@@ -945,6 +945,7 @@ sendfile(struct thread *td, struct sendfile_args *uap,
 	if (uap->offset < 0)
 		return (EINVAL);
 
+	sbytes = 0;
 	hdr_uio = trl_uio = NULL;
 
 	if (uap->hdtr != NULL) {


More information about the svn-src-all mailing list