From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by sourceware.org (Postfix) with ESMTPS id D11E4385803B for ; Thu, 18 Nov 2021 20:01:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D11E4385803B Received: by mail-ua1-x92b.google.com with SMTP id w23so16357493uao.5 for ; Thu, 18 Nov 2021 12:01:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=WpQNFnfL3TbQn6A/gYVLatS8DcCcFCYp2UdHV8IpdTY=; b=GJx3m3JhDABerK5AW8wL5T/lrPLcOE2UJ2JRc9ZRrpMQJ7lXazGD/wuPnG2HUViRId +pnXDwuMMyiskSvIxF1HmWUD4IXVMTIqGZ2zpybLOAow/syww+OF7L0gSlySNsMMsYu6 EgFy8JNIik8lHOgQ6rCElwzaeQgZ6BIc/tXKMwNKv819wi/8MY3bd/RDeTxj2Ptcn6u4 Fo92ez3OJNMHfBrWiAf82ZeQikHS5BGI6/13uM8dEt9NWHWQyovVSeSSzo82UlJxErlf MY/+r7tpG9jgLhNYUqvuqMXJaQhGcsI1fN5Gb13is2HNHtNtIxCnjrtWToXM9sCTjCPV PArw== X-Gm-Message-State: AOAM533t8N7Z8yX6grtkFJFuAelDt4wycbF7JsBsDwi8Yq25c9vmGCcZ A/nqTM11qCMzFUq4qyNKrusysOjXB+9FOg== X-Google-Smtp-Source: ABdhPJzyYHa/Jk+7QUmkQctuGalUm6lxsUUshPOX8C6lg8WMjpbZe5uQcCXWwUQ/fbm3AMshL/j/3w== X-Received: by 2002:ab0:7399:: with SMTP id l25mr40259254uap.120.1637265661493; Thu, 18 Nov 2021 12:01:01 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:66dc:202f:4b8d:b771:d283? ([2804:431:c7ca:66dc:202f:4b8d:b771:d283]) by smtp.gmail.com with ESMTPSA id w2sm492561vsw.29.2021.11.18.12.01.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Nov 2021 12:01:01 -0800 (PST) Message-ID: Date: Thu, 18 Nov 2021 17:00:59 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [RFC] elf: Add elf checks for main executable Content-Language: en-US To: "H.J. Lu" Cc: GNU C Library , Florian Weimer References: <20211118195547.3362263-1-adhemerval.zanella@linaro.org> From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2021 20:01:05 -0000 On 18/11/2021 16:58, H.J. Lu wrote: > On Thu, Nov 18, 2021 at 11:55 AM Adhemerval Zanella > wrote: >> >> The ELF header integrity check is only done on open_verify(), i.e, >> for objects explicitly loaded. For main executable (issued with >> execve() for the binary) only kernel checks are done, which does >> not check EI_ABIVERSION. > > I believe the EI_ABIVERSION check on the executable should be > done in kernel, not in glibc, so that static PIE can be checked easily. My understanding is EI_ABIVERSION is purely a userland information, kernel should not act uppon it.