From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 58B1F1388C2 for ; Sat, 12 Dec 2015 22:45:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D1642E0894; Sat, 12 Dec 2015 22:45:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1284FE087E for ; Sat, 12 Dec 2015 22:45:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E53DD3406F3 for ; Sat, 12 Dec 2015 22:45:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 96E3ACB1 for ; Sat, 12 Dec 2015 22:45:45 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1449955987.81658ac5842906a286373096691a5f8e3ad6aa2d.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: dumpelf.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 81658ac5842906a286373096691a5f8e3ad6aa2d X-VCS-Branch: master Date: Sat, 12 Dec 2015 22:45:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7a6aa393-74a4-4926-8dad-665e643b0bda X-Archives-Hash: 9bb7405d5db9684a126f20dbfb5e13a1 commit: 81658ac5842906a286373096691a5f8e3ad6aa2d Author: Mike Frysinger gentoo org> AuthorDate: Sat Dec 12 21:33:07 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sat Dec 12 21:33:07 2015 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=81658ac5 dumpelf: handle corrupt dynamic tags URL: https://bugs.gentoo.org/567956 Reported-by: Brian Carpenter gmail.com> dumpelf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dumpelf.c b/dumpelf.c index fe0001b..4675904 100644 --- a/dumpelf.c +++ b/dumpelf.c @@ -138,6 +138,10 @@ static void dumpelf(const char *filename, long file_cnt) Elf ## B ## _Dyn *dyn = elf->vdata + EGET(phdr->p_offset); \ i = 0; \ do { \ + if ((void *)dyn >= elf->data_end - sizeof(*dyn)) { \ + printf(" /* invalid dynamic tags ! */ "); \ + break; \ + } \ dump_dyn(elf, dyn++, i++); \ } while (EGET(dyn->d_tag) != DT_NULL); \ }