From owner-cvs-src-old@FreeBSD.ORG Sun Mar 22 13:42:56 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4979B1065680 for ; Sun, 22 Mar 2009 13:42:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 371EC8FC18 for ; Sun, 22 Mar 2009 13:42:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n2MDguOm033753 for ; Sun, 22 Mar 2009 13:42:56 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n2MDguq0033752 for cvs-src-old@freebsd.org; Sun, 22 Mar 2009 13:42:56 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200903221342.n2MDguq0033752@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Sun, 22 Mar 2009 13:42:41 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern imgact_elf.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2009 13:42:56 -0000 kib 2009-03-22 13:42:41 UTC FreeBSD src repository Modified files: sys/kern imgact_elf.c Log: SVN rev 190264 on 2009-03-22 13:42:41Z by kib Fix several issues with parsing the notes for ELF objects. Badly formed ELF note may cause the caclulated pointer to the next note to point both after the note region, that was checked in the code, but also to point before the region, that was not checked [1]. Remember the first note location in note0 and leap out if the note is not between note0 and note_end. In the similar way, badly formed note may cause infinite loop by pointing next note into the same or previous note. Guard against this by limiting amount of loop iterations by arbitrary choosen big number. For clarity, check the calculated note alignment in each iteration. Reported by: Chris Palmer [1] PR: kern/132886 Reviewed and tested by: dchagin MFC after: 3 days Revision Changes Path 1.196 +5 -5 src/sys/kern/imgact_elf.c