Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79AADC4332F for ; Tue, 7 Dec 2021 02:05:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236502AbhLGCI2 (ORCPT ); Mon, 6 Dec 2021 21:08:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231245AbhLGCI2 (ORCPT ); Mon, 6 Dec 2021 21:08:28 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A3D8C061746 for ; Mon, 6 Dec 2021 18:04:58 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id j11so12264487pgs.2 for ; Mon, 06 Dec 2021 18:04:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zXn+x6PjdC00rwvRf+3OxJFKpI6ggoGfZlhaFuosZ8c=; b=GuSxN5uVJ9+WJ2iyh1JIFGQbXut/l2v2ypgv+dneHZFLf/s3lDtFO6XiM44xUnLO1T lKinbTGi6CA9ot0MaE+HnJqfbGfBeISO+l2PDatV442RW/I6KMOC+W98BVX8/2h9yv+5 RLAKzV6pJVhT52YDwnpbv1VaeTkvg7BeaZNzo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zXn+x6PjdC00rwvRf+3OxJFKpI6ggoGfZlhaFuosZ8c=; b=tmFdwq8HSE+mzzOAMZWSlqzJPLF2g0JMla4xsUcsdzHrICLVluu5AQfoCYnrkuA22a lEWjsFRcA664oZCdZMkbw1C+6RfBVVAdLA8ai1iwa5JXDFiix5M8+6aL45nzR2mhiM+V wz5HjLZMN7s83M0eG3t6LgH73fqVIDZ3sqflMT5df2jLx5E6y5Szn/UuCiI0ttQWWF3O 19S/coxmU4xY/BerBCM0416quAMPWu5P4t93iWbWr2UHRYkRzWBp0A7KEcZvjjXjFnUk EJNoDLjN1ZX6UcZWFrV3EdSCiAA8DxCaj39UypbJZ+4DGOA0W+LTDMyInanTm+M/97Kh p9hw== X-Gm-Message-State: AOAM530hud92/8vWlib7uCti4yAdzi3XJT8elEnM+AC1SE0xMPh9oqRA Y7SUaB/fFcOALPDisfKAy/NGNQ== X-Google-Smtp-Source: ABdhPJzrx4Qt1TFkMbPfKuTpvu9+Jlgy2hTOryqedenVkWnW8IAs+2d8ehAQCi7OTneU/9GiEz8pRw== X-Received: by 2002:a63:1950:: with SMTP id 16mr22562347pgz.422.1638842697962; Mon, 06 Dec 2021 18:04:57 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y8sm14047067pfi.56.2021.12.06.18.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Dec 2021 18:04:57 -0800 (PST) Date: Mon, 6 Dec 2021 18:04:56 -0800 From: Kees Cook To: Lukas Bulwahn Cc: Akira Kawata , Alexey Dobriyan , Alexander Viro , Eric Biederman , Andrew Morton , linux-fsdevel , Linux Kernel Mailing List , kernel-janitors Subject: Re: Unused local variable load_addr in load_elf_binary() Message-ID: <202112061804.5185ACABD@keescook> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 06, 2021 at 04:46:01PM +0100, Lukas Bulwahn wrote: > Dear Akira-san, > > With commit 0c9333606e30 ("fs/binfmt_elf: Fix AT_PHDR for unusual ELF > files"), you have changed load_elf_binary() in ./fs/binfmt_elf.c in a > way such that the local variable load_addr in load_elf_binary() is not > used anymore. EEk! yeah, this totally broke ELF randomization. this needs to be entirely reverted. -- Kees Cook