From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7802FC43381 for ; Thu, 14 Feb 2019 17:46:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 319B3222DA for ; Thu, 14 Feb 2019 17:46:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437664AbfBNRqT (ORCPT ); Thu, 14 Feb 2019 12:46:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394905AbfBNRqR (ORCPT ); Thu, 14 Feb 2019 12:46:17 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52A74A402F; Thu, 14 Feb 2019 17:46:17 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.152]) by smtp.corp.redhat.com (Postfix) with SMTP id 760E260BEC; Thu, 14 Feb 2019 17:46:15 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 14 Feb 2019 18:46:15 +0100 (CET) Date: Thu, 14 Feb 2019 18:46:13 +0100 From: Oleg Nesterov To: Kees Cook Cc: Linus Torvalds , Samuel Dionne-Riel , Richard Weinberger , Graham Christensen , Michal Hocko , Andrew Morton , LKML Subject: Re: [PATCH v2] exec: load_script: Allow interpreter argument truncation Message-ID: <20190214174612.GB8150@redhat.com> References: <20190214164331.GA33450@beast> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190214164331.GA33450@beast> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 14 Feb 2019 17:46:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/14, Kees Cook wrote: > > v2: > - fix 1-byte-too-early-bail-out in truncation detection (Oleg) > - add Samuel's "tested" tag Looks correct... but you know, I'll try to read this patch again tomorrow after sleep. And I can't believe this code can't be simplified... but let me repeat that I tried and failed. Oleg.