Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp43942ybt; Tue, 23 Jun 2020 14:53:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUcYVIJWWWUwSMcMvHn2vOqXTrYWJ/OMW7pI6cxGgGysChISMOBFhbSY23vh5v3nm4MFw3 X-Received: by 2002:a17:906:6a4f:: with SMTP id n15mr12776057ejs.378.1592949209582; Tue, 23 Jun 2020 14:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592949209; cv=none; d=google.com; s=arc-20160816; b=VT9VtCDF/D69AsDgn8JPi4e1Ts9weK9B4EEfTsD8EmaiLzqPhAZF5yD2xSuJGpDefZ +jCv0oqdS4KAK4Cm/wPuCt06lo8plEztuQNQH7TqbX3G2wR/TzgLETnY/OH2DgrvkUcM 7AB/0rPf/jjJrC+EyUW6cYPbyii3kEsOKHssUCPLRKGfS6FCZEUDZ4JRIFryEuQsgkYM FU7lidmwuMGgoPkM7n4DT4VQn8PGZ9vWFXgRAcVg8UFWYpRDwjMknxYC4IYfYw6khZTa Ho/cQZJZ9dc644qJwjnWpkjIHmDoeCGSflcNtVsiM265xqNVDHrrMJqqkYx69iLGyIYZ f/Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=suGZrNrDj7Adau/CI2R6KqtvMJT93s3LDs+c/oNZKS4=; b=xBJ1feLTJicPuyTA4Pe3c31W+EoMRiX1EjAU9IRPiifAf1SMFhftS5bpT5OtRRq2BO Ol9lXeDxw41It40hue4HJFuq2m3F19CtLriTIoNy3zxHeqXUhAUQOGIpsgRqOsusuOaN 0j81hx/uVdwPeZYW2qvq1kAfTA145i8hzj/krxKuwob1Cl/TcczUiwcaFWPswiaaUWGc FfAa3HcfAGiBJXhgPNwx9XtNXkcINkG/1hD1BgC1IIcKFyY1HW9dM3O0W6GVsJ60E8Sl II2/7/OK7mKpliHQtK371xxi3n85J6us/fTm8n+NwNKYs428TGgDrivevsVBV4DSFra5 2YFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PCY1Cunk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si5123730edy.149.2020.06.23.14.53.05; Tue, 23 Jun 2020 14:53:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PCY1Cunk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387590AbgFWVut (ORCPT + 99 others); Tue, 23 Jun 2020 17:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387455AbgFWVur (ORCPT ); Tue, 23 Jun 2020 17:50:47 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68871C061573 for ; Tue, 23 Jun 2020 14:50:46 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id j18so258307wmi.3 for ; Tue, 23 Jun 2020 14:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=suGZrNrDj7Adau/CI2R6KqtvMJT93s3LDs+c/oNZKS4=; b=PCY1CunkWft59s2Br320d2hsHrdBYpCr51bzncnRqHhamHb620CBD8eqNB3fIkaYVF 19YShfEfno3uzDDYEEFjfmWHwmnkNSX8TSmJqPOXZ0ZDNWY9hq6i/A2gvtV6PNEXh7yl 2QeUPX6krZsOQ6eG0eM6VPz9AIvPE2WoN2nfDSEn/l8f0x+y59u3KjE29Ab0Imq+F7xu g1N6wS+1jwoxlVDQKpuG8VjbPxUu8xPTcPhYN9Ao9lmi5EE42TdOpKJI3AUaeDepFJYK 6JhuuHwwWk3roxKFOafS2xwWTdW3JZQPdHN2JccVJ24QHADMoArguoxmQN3xqJUutM/+ CWIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=suGZrNrDj7Adau/CI2R6KqtvMJT93s3LDs+c/oNZKS4=; b=oCSsLWPvh3+v98FQ1eDKzX4bmr6ekv00uvHoOJwhVseePYzke/5Ryu8tZG4upqZamQ 445Rqise0EYjqQA3rztqadkDSoblDuP3IsufZnhH6XthaGR2j8uSTU1f6Me7Ni9ZSSQT 1xb7Cp9OrDXVF/+bkxgc8ToPMMZHUNpXAxKTloC8Y3zqJV9rbo2+chABdaOQ3X6NPsot wBwYllyASmmoe96CnboUkNnpQLNlMfOqz7X/56IcqR9AGKPmjqs1bipD94emqe0fdxKS Mlh+eZyzhsJ8brZPVbvjnfXpUfBhXfm+WFO/E9viqwIobQSUpwVGdkQxAAE6S4uVuBLA vngg== X-Gm-Message-State: AOAM531O0I1WuvR1+MYZPuQ0f5Nl4oEqe8wPwv3dUQEl3pI71bXvOBUl cug/DkTnsHeYXtlhCX5oEg== X-Received: by 2002:a05:600c:2116:: with SMTP id u22mr11585848wml.82.1592949045101; Tue, 23 Jun 2020 14:50:45 -0700 (PDT) Received: from localhost.localdomain ([46.53.253.162]) by smtp.gmail.com with ESMTPSA id k185sm2156332wmk.47.2020.06.23.14.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 14:50:44 -0700 (PDT) Date: Wed, 24 Jun 2020 00:50:42 +0300 From: Alexey Dobriyan To: Christian Kujau Cc: Kees Cook , Andrew Morton , Willy Tarreau , Dan Carpenter , linux-kernel@vger.kernel.org Subject: Re: process '/usr/bin/rsync' started with executable stack Message-ID: <20200623215042.GA43266@localhost.localdomain> References: <202006231131.AD0A7F5F@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 02:33:50PM -0700, Christian Kujau wrote: > On Tue, 23 Jun 2020, Kees Cook wrote: > > > $ checksec --format=json --extended --file=`which rsync` | jq > > > { > > > "/usr/bin/rsync": { > > > "relro": "full", > > > "canary": "yes", > > > "nx": "no", > > ^^^^^^^^^^^^^^^^^^ > > > > It is, indeed, marked executable, it seems. What distro is this? > > Arch Linux (x86-64) with 5.6.5.a-1-hardened[0], running in a Xen DomU. BTW this bug was exactly the one described in the changelog: compiling assembly brings executable stack by default: $ git-show 73faaab26d7db19ae6e04396a6e9d6372ed8e4ad commit 73faaab26d7db19ae6e04396a6e9d6372ed8e4ad Pass --noexecstack to assembler. --- a/Makefile.in +++ b/Makefile.in @@ -135,7 +135,7 @@ simd-checksum-x86_64.o: simd-checksum-x86_64.cpp $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp lib/md5-asm-x86_64.o: lib/md5-asm-x86_64.S config.h lib/md-defines.h - $(CC) -I. -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S + $(CC) -I. -Wa,--noexecstack -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S