Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Mar 2018 02:37:08 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331411 - stable/11/sys/dev/drm
Message-ID:  <201803230237.w2N2b8wn080937@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri Mar 23 02:37:08 2018
New Revision: 331411
URL: https://svnweb.freebsd.org/changeset/base/331411

Log:
  MFC r331333: Fix kernel memory disclosure in drm_infobufs
  
  drm_infobufs() has a structure on the stack, fills it out and copies it
  to userland.  There are 2 elements in the struct that are not filled out
  and left uninitialized.  This will leak uninitialized kernel stack data
  to userland.
  
  Submitted by:	Domagoj Stolfa <ds815@cam.ac.uk>
  Reported by:	Ilja Van Sprundel <ivansprundel@ioactive.com>
  Security:	Kernel memory disclosure (798)

Modified:
  stable/11/sys/dev/drm/drm_bufs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/drm/drm_bufs.c
==============================================================================
--- stable/11/sys/dev/drm/drm_bufs.c	Fri Mar 23 02:34:45 2018	(r331410)
+++ stable/11/sys/dev/drm/drm_bufs.c	Fri Mar 23 02:37:08 2018	(r331411)
@@ -935,6 +935,7 @@ int drm_infobufs(struct drm_device *dev, void *data, s
 			if (dma->bufs[i].buf_count) {
 				struct drm_buf_desc from;
 
+				memset(&from, 0, sizeof(from));
 				from.count = dma->bufs[i].buf_count;
 				from.size = dma->bufs[i].buf_size;
 				from.low_mark = dma->bufs[i].freelist.low_mark;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803230237.w2N2b8wn080937>