Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 04:52:27 +0000 (UTC)
From:      Don Lewis <truckman@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r300451 - stable/10/usr.sbin/rpc.lockd
Message-ID:  <201605230452.u4N4qRmG077903@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: truckman
Date: Mon May 23 04:52:27 2016
New Revision: 300451
URL: https://svnweb.freebsd.org/changeset/base/300451

Log:
  MFC r299897
  
  NULL releasedfl after calling deallocate_file_lock() which frees it
  to avoid a use-after-free error in the debuglog() call at the top
  of the loop.
  
  Reported by:	Coverity
  CID:		1006080

Modified:
  stable/10/usr.sbin/rpc.lockd/lockd_lock.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/rpc.lockd/lockd_lock.c
==============================================================================
--- stable/10/usr.sbin/rpc.lockd/lockd_lock.c	Mon May 23 04:50:01 2016	(r300450)
+++ stable/10/usr.sbin/rpc.lockd/lockd_lock.c	Mon May 23 04:52:27 2016	(r300451)
@@ -1600,6 +1600,7 @@ unlock_partialfilelock(const struct file
 				 */
 
 				deallocate_file_lock(releasedfl);
+				releasedfl = NULL;
 			}
 		}
 



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