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=-3.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS 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 B5C47C43387 for ; Sat, 22 Dec 2018 23:37:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FD2A20578 for ; Sat, 22 Dec 2018 23:37:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393018AbeLVXhm (ORCPT ); Sat, 22 Dec 2018 18:37:42 -0500 Received: from gateway31.websitewelcome.com ([192.185.144.80]:11488 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391188AbeLVXhm (ORCPT ); Sat, 22 Dec 2018 18:37:42 -0500 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 1A3981C22F for ; Sat, 22 Dec 2018 17:37:41 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id aqpxg3H5fdnCeaqpxgCWf8; Sat, 22 Dec 2018 17:37:41 -0600 X-Authority-Reason: nr=8 Received: from [189.250.106.44] (port=44658 helo=[192.168.1.76]) by gator4166.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gaqps-00152Q-Cx; Sat, 22 Dec 2018 17:37:40 -0600 Subject: Re: [PATCH] nfc: af_nfc: Fix Spectre v1 vulnerability To: David Miller Cc: sameo@linux.intel.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181221214753.GA2799@embeddedor> <20181222.150946.778308321544627589.davem@davemloft.net> From: "Gustavo A. R. Silva" Message-ID: Date: Sat, 22 Dec 2018 17:37:35 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181222.150946.778308321544627589.davem@davemloft.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.106.44 X-Source-L: No X-Exim-ID: 1gaqps-00152Q-Cx X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.1.76]) [189.250.106.44]:44658 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 5 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/22/18 5:09 PM, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Fri, 21 Dec 2018 15:47:53 -0600 > >> proto is indirectly controlled by user-space, hence leading to >> a potential exploitation of the Spectre variant 1 vulnerability. >> >> This issue was detected with the help of Smatch: >> >> net/nfc/af_nfc.c:42 nfc_sock_create() warn: potential spectre issue 'proto_tab' [w] (local cap) >> >> Fix this by sanitizing proto before using it to index proto_tab. >> >> Notice that given that speculation windows are large, the policy is >> to kill the speculation on the first load and not worry if it can be >> completed with a dependent load/store [1]. >> >> [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 >> >> Signed-off-by: Gustavo A. R. Silva > > I'll take this directly, and queued up for -stable. > Dave, I wonder if you can take this one too: https://lore.kernel.org/lkml/20181221212229.GA32635@embeddedor/ It's pretty similar to the af_nfc one. Thanks -- Gustavo