[0/2] Avoid some crashes when loading separate debuginfo
Message ID | cover.1636120354.git.fweimer@redhat.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46878385841F for <patchwork@sourceware.org>; Fri, 5 Nov 2021 14:00:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46878385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1636120852; bh=4yBibrMGU1esDJ4YjudGsgRieEo9NDVb50iWLoisIvs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jkoerbao8OEVb4o846m8ph8U7NyYhfSQujWKxVnTXP8sSS6NjVAF06nRrtD7PcBQX 6Uibzma110I7eBqkXwfXd4yjYrzoKAXEV7SBYv/91OFFWZiXbI+WVXGIRqzMRd8CuD U5FXGnoYJhPUs/PrV3qrer1iD+dTwANFz5cv8OKg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 875413858411 for <libc-alpha@sourceware.org>; Fri, 5 Nov 2021 14:00:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 875413858411 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-268-E46LE7_ZO7K-M5AhKKUOOQ-1; Fri, 05 Nov 2021 10:00:25 -0400 X-MC-Unique: E46LE7_ZO7K-M5AhKKUOOQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0DB328024F5 for <libc-alpha@sourceware.org>; Fri, 5 Nov 2021 13:59:11 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 692EB100164A for <libc-alpha@sourceware.org>; Fri, 5 Nov 2021 13:59:10 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 0/2] Avoid some crashes when loading separate debuginfo X-From-Line: 27f078539ae2a5b390705ac6fa1a7437ae8ce97c Mon Sep 17 00:00:00 2001 Message-Id: <cover.1636120354.git.fweimer@redhat.com> Date: Fri, 05 Nov 2021 14:59:08 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Florian Weimer <fweimer@redhat.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Message
Florian Weimer
Nov. 5, 2021, 1:59 p.m. UTC
This mini-series adds a small check to detect invalid LOAD segments. Tested on i686-linux-gnu, x86_64-linux-gnu. Built with build-many-glibcs.py. Florian Weimer (2): Use sysdeps/posix/dl-fileid.h as the generic and only implementation elf: Detect PT_LOAD segments that extend beyond EOF and refuse loading elf/dl-load.c | 78 +++++++++++++++++++++---------------- sysdeps/generic/dl-fileid.h | 35 ++++++++++------- sysdeps/posix/dl-fileid.h | 50 ------------------------ 3 files changed, 65 insertions(+), 98 deletions(-) delete mode 100644 sysdeps/posix/dl-fileid.h base-commit: ff012870b2c02a62598c04daa1e54632e020fd7d