Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 15:37:18 +0000 (UTC)
From:      "Jonathan T. Looney" <jtl@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: r293318 - stable/10/sys/kern
Message-ID:  <201601071537.u07FbIF9040769@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jtl
Date: Thu Jan  7 15:37:17 2016
New Revision: 293318
URL: https://svnweb.freebsd.org/changeset/base/293318

Log:
  MFC r292676:
  
  Only allow one PT_INTERP ELF program header. This also fixes a potential
  memory leak for interp_buf.

Modified:
  stable/10/sys/kern/imgact_elf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/imgact_elf.c
==============================================================================
--- stable/10/sys/kern/imgact_elf.c	Thu Jan  7 14:52:32 2016	(r293317)
+++ stable/10/sys/kern/imgact_elf.c	Thu Jan  7 15:37:17 2016	(r293318)
@@ -783,6 +783,11 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 				error = ENOEXEC;
 				goto ret;
 			}
+			if (interp != NULL) {
+				uprintf("Multiple PT_INTERP headers\n");
+				error = ENOEXEC;
+				goto ret;
+			}
 			interp_name_len = phdr[i].p_filesz;
 			if (phdr[i].p_offset > PAGE_SIZE ||
 			    interp_name_len > PAGE_SIZE - phdr[i].p_offset) {



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