Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1110860ybh; Mon, 13 Jul 2020 09:35:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOIZKwavzjfgBn6fpYpNTzEp69sKR7OG3XXl0lvk7GoxEhCAJabKzgphlyF3geYEyXSDOB X-Received: by 2002:aa7:d754:: with SMTP id a20mr206094eds.375.1594658135336; Mon, 13 Jul 2020 09:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594658135; cv=none; d=google.com; s=arc-20160816; b=Ez4vZKMNeIdOyJhoZLPV/nNaH6U7M09tAIGuBsHy1Y/8ITAZFFeQlbibtYTJzchlij VIEku2occRbauml7Jm0D9WUgx5X7tDM+AfT47B0dDq1KVju+lNu09KydFNhLxrv6EN+k EINQq+lmoBpOFdIBWgyrDA3himXcUHva84sDr9dfWU9AcUPNXt2gl0atplbeULb0LygT atUSSFiBKd8BX/ramWoMhIGHQDuSfz+PigVF2+Mgban6gElFsS63YL7kNqIkGJ7QxVwV pxLSiU3qAxEiv2IX7bbY3oYAxQMjU+Y5mhDCa1Xcf+MuxbAV4HBSYdN5R1VoMufDH0kv nIjw== 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=OvYqhPR3ywLRItiGcXvwvSYep0JkZDTcTilUbAMAoyw=; b=VkYSjoM0isiLps51skSYxnzgxLLo/mAPpQLPiMZSdksZNrpACWtGUZxA53vwTQsVeN 3EmmiOBwcwzEWUTOdUeOHJoe6oqBNW3U8QcTZrfOA8rB6WXnjK/kh52try8gs5ZzZpcg 4Xr9iRvMIirbcKIbOTDe2gQxjWWu5wxALj9+5lu6J9i4/1S0W1CXDNQMR0gCTwUuxCm+ xKnAmYKp2C8Ger9G+umo+0E+G+pogOY7r2vnnB0P5nlg+u1PitnU+DoSLIfw0S+7/S6C rOr/bc0Ln6dbW0tNfD9OiVvPefQ8MjHvWceZGT+WJceldMsYi8VxIGGADdC+1Fs/t/Wg UdNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RfxcZguE; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx7si9166647edb.150.2020.07.13.09.35.12; Mon, 13 Jul 2020 09:35:35 -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=@chromium.org header.s=google header.b=RfxcZguE; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730531AbgGMQc1 (ORCPT + 99 others); Mon, 13 Jul 2020 12:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729027AbgGMQc0 (ORCPT ); Mon, 13 Jul 2020 12:32:26 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D28C061755 for ; Mon, 13 Jul 2020 09:32:26 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id d4so6251870pgk.4 for ; Mon, 13 Jul 2020 09:32:26 -0700 (PDT) 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=OvYqhPR3ywLRItiGcXvwvSYep0JkZDTcTilUbAMAoyw=; b=RfxcZguEYvmQmkGRpx7lJye5zT9WILLnEhbhmSKl1AqrLRhxM8y9gtTfzfRDlX66x1 ib5WqIcmnPIZcGPNEo2WD3z8yPHy9dHfH3HyHZ/5ax78GIwr5RwdTEvI3cmy+XiBUw56 uSd9Sl8s4j5CIupRbPAlr9UzPnfN3LEKSlTzY= 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=OvYqhPR3ywLRItiGcXvwvSYep0JkZDTcTilUbAMAoyw=; b=KSwrkX85C+ZjJiBk0syvYQmT9crRldpnp9mnLcl8PpBobz0tKWAk/6mWha2CLS1nYH taW2uqYeyHASpcu1ZMngrRNxrrFjPuRp1F2p/NJY4laIEhE+1NEZrJhhtdnQdwcP5y6c YUX57af4DDvSewdScw65dlOuWgx6+yQZNGpfw4xUL8tuntjJSn7pfu97WoUfFML5kKQT 5z1IE1jHnhHJBEI+5ZSnCFU7UW5FwGcIUGK75sxIIbT5hbgZd38OERgL7DcouovonE7y cvZyoXF98Pi8hJFQ7SCv6J6lWkWoPt6n+YU4yfK/7Uxiab1hgtPe2lM0E2t9Db+TQm8R 66uQ== X-Gm-Message-State: AOAM530EgafI8qoT8DQiJ7CpIR7Vmxt60v29qVN8IiIqqy9QSLunY0l/ tNwfyTd27rPO0FbuEkC9TnwVRg== X-Received: by 2002:a05:6a00:14c1:: with SMTP id w1mr649973pfu.92.1594657946329; Mon, 13 Jul 2020 09:32:26 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x10sm13288052pgp.47.2020.07.13.09.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 09:32:25 -0700 (PDT) Date: Mon, 13 Jul 2020 09:32:24 -0700 From: Kees Cook To: "Alexander A. Klimov" Cc: re.emese@gmail.com, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gcc-plugins: Replace HTTP links with HTTPS ones Message-ID: <202007130932.65FA9A6@keescook> References: <20200713135018.34708-1-grandmaster@al2klimov.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200713135018.34708-1-grandmaster@al2klimov.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 03:50:18PM +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If doesn't contain `\bxmlns\b`: > For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: > If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: > If both the HTTP and HTTPS versions > return 200 OK and serve the same content: > Replace HTTP with HTTPS. > > Signed-off-by: Alexander A. Klimov Thanks! Applied to for-next/gcc-plugins -- Kees Cook