From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19347 invoked from network); 10 Jun 2020 10:44:19 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 10 Jun 2020 10:44:19 -0000 Received: (qmail 30619 invoked by uid 550); 10 Jun 2020 10:44:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 30598 invoked from network); 10 Jun 2020 10:44:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=megOx3fVcxVX8XnKtuRVmEQj7iNOYIPs99RMmhUj+O0=; b=AavWBH1aAesij5jtmdK/2yhDHuNSWg85CVpVDwxYuqomTT4r3i2CLnyohrgMfGpnsA u9y7LR4NOksCKH2CsbuEKVDmX6fls3qYNUfuluPAsYDcdpXQuOqUbEBOoCLx9PFkgZS8 uh1GeWjBXRBEKUSkLhtSC9sphrjMQ60lFfHNX7bYLL3e/gwhm0o/YRT2IYp851ovCp4p DL/SfD6MzmvaF+v7Bl43yqxrQc9jr8cR+mQuHGE/tDp6ZXWBpRgNxFcFg6ecng+05kXH zBRs5eYLJdjclUXJotTqMza4RXZpkPJBruZUkzbzJtxWAEXygWZGfo7zts3i4CH56K4p YuKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=megOx3fVcxVX8XnKtuRVmEQj7iNOYIPs99RMmhUj+O0=; b=i6QmkfJp9R1pC0ZPNmMYi+lEuELfX4YAEHTt0/gBCNzsHNn5SqCtM8prueQLYMG8JW pWPo8jcUaIa9uOJI5l0kbKcBDvBmLx8C+ukfqE7tSg2/JR94WJEO16kR3MeXycTlggOh 9kqh0u8CkQ+8rxMWqhGm6EYIKV5Dxa8t1VwFdLfzUp/6hqV/XwNUUvbaNo/aXgHmIfc2 JR+dYLWz+pCOeca+JTaejLZH4nt8GVpxMbE/pUD+J5biNNwi8Ahi5Am+ZOG5FJv2zDWG DolEB1TZf6lpSa+vabSNKao6rXBPgX4zHW1FMiKDGcCv/7Xz2fGQDDyv8mxrm4XsIGB1 Us1Q== X-Gm-Message-State: AOAM531pYGwQGkl5la63tBtnQiTyTWlouoN+T4lupo1cjysIhZXIKiG1 ZXHUNOtRlc7c0u69kvbO28H2RuB0aAdotwdVRp4= X-Google-Smtp-Source: ABdhPJyadH8GL4WZ+HX/UiVeokgswxZILTBagK4V89xtKmIR9Eo4I2nEPks5gyM77rECQ08XuUUEAMbXABAO6gkkE1Q= X-Received: by 2002:a92:de48:: with SMTP id e8mr2307890ilr.249.1591785845379; Wed, 10 Jun 2020 03:44:05 -0700 (PDT) MIME-Version: 1.0 References: <20200610103102.GF871552@port70.net> In-Reply-To: <20200610103102.GF871552@port70.net> From: Norbert Lange Date: Wed, 10 Jun 2020 12:43:54 +0200 Message-ID: To: Norbert Lange , musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] Mark stack as non-executable in asm Am Mi., 10. Juni 2020 um 12:31 Uhr schrieb Szabolcs Nagy : > > * Norbert Lange [2020-06-10 11:24:04 +0200]: > > I did borrow some assembler files to avoid having to link against > > (any) libc. That was for building a DSO, ultimately loaded via glibc. > > The effect was that glibc did change the protection of all stacks to > > be executable. > > > > Would you consider adding the line [1] > > .section .note.GNU-stack, "", %progbits > > to assembly files? > > > > I know this is not a musl bug, and I can easily add the lines myself. > > musl build system (just like other libcs i know of) > pass -noexecstack to the assembler so if you build > the asm files as part of libc the object files should > have the marking, if you build outside of libc i > think it's your responsibility to add the note > (either to the asm or via the -Wa,-noexecstack flag) > > readelf -lW libfoo.so | grep GNU_STACK > > is one way to verify that everything has the note. Yeah easy to do, just may take a lot time till you figure out why just sometimes your app gets its stack remapped. I understand your position, the aim was to safe other people such trouble. Norbert