From patchwork Mon Mar 13 15:41:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 6697 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Pb19B3qtrz3wfH for ; Mon, 13 Mar 2023 15:41:34 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Pb1984lrrzyn; Mon, 13 Mar 2023 15:41:32 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Pb1980zJYz2ymV; Mon, 13 Mar 2023 15:41:32 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Pb1970f7Hz2xYM for ; Mon, 13 Mar 2023 15:41:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Pb1961MM7z4b; Mon, 13 Mar 2023 15:41:30 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1678722090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jIAfwU91IsVUVD+ErYow1H1ssYSfy2ELnafdogPtfj4=; b=+CwfaB5cbBq5AlgpuJm7rC7IJ4VrDdqar5mhQe7/bi1gv2GzGbnKZmPqDhiiDwXDClos4k pNnXYEFpiPxKoHCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1678722090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jIAfwU91IsVUVD+ErYow1H1ssYSfy2ELnafdogPtfj4=; b=t1pq6A4u5aAerxWs9tpfl8906sVnOu16Az7xHkc1rVPUQ//bu9kpG+nEXFSXrkZ5HKsF7S QawH3hweOa3/X4EcBpN4/J0djKX6mahCvLGhnHZLcho/+s/dMVF5aee9j30hY2lnFaCBcO UhgZC97sh83oWtGJaFVH6fiyUmyFvoV6PSSUmiHuF6vmpacqyuqnV41l+lYxJmM5M/Zbj+ 8tsq1BTV+icSNMaRpPBLda3JJ/67l5SmcV1twgO8Q7PYBq5KFm4W48kF9U/2XGa2rRk7ZG ZnH+nv5hcE0INe0iOFjSe4tJno/FczBFH34JbVHzRKS7+8GkJdUJLfvs7I9GrA== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] graphviz: Proper harden some binaries Date: Mon, 13 Mar 2023 16:41:23 +0100 Message-Id: <20230313154123.42489-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Use some additional compiler flags, to proper harden them. Signed-off-by: Stefan Schantl --- graphviz/graphviz.nm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/graphviz/graphviz.nm b/graphviz/graphviz.nm index 625c554b2..c5147c5f5 100644 --- a/graphviz/graphviz.nm +++ b/graphviz/graphviz.nm @@ -5,7 +5,7 @@ name = graphviz version = 7.0.4 -release = 1 +release = 2 groups = Development/Tools url = https://gitlab.com/graphviz/graphviz @@ -42,6 +42,32 @@ build ./autogen.sh end + configure_options += \ + --enable-debug + + configure_cmds + # Add some additional C compiler flags to proper harden liblab_gamut. + sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \ + lib/edgepaint/Makefile + + # Add some additional C and C++ compiler flags to proper harden + # the "dot" binaries. + sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \ + cmd/dot/Makefile + sed -i '/^CXXFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \ + cmd/dot/Makefile + + # Add some additional C compiler flags to proper harden the + # "gvpr" binaries. + sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \ + cmd/gvpr/Makefile + + # Add some additional C compiler flags to proper harden the + # tools. + sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \ + cmd/tools/Makefile + end + test make check end