Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp638757imm; Thu, 13 Sep 2018 05:37:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYpnqA4kOFb0b6jGHo62AjuXhla3ybLR9ZLJ5Rh79/mP0OGeezssO1QAeztKtM3Y/Nae+7j X-Received: by 2002:a17:902:127:: with SMTP id 36-v6mr7291011plb.178.1536842273897; Thu, 13 Sep 2018 05:37:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536842273; cv=none; d=google.com; s=arc-20160816; b=NkZWNXpv39FiIf0pgJpqGxp8nwNf4hrQWyhKFlGhxBoMO/xQ6+1eO1EXESEBRVEXWh tl4BfpUjSPUslmAbR9afVek6AExmAXJB1lZpba7c2mjiJj0h8tIvkGSigm4OlRPNaq5n 8nbR2wulj7Wv+xFobPHzmnrR/3uObwB/A2NIWxEaIDotYqVvjsyldkIbLowTbd+ijdRS 3o1m6EITxKAWnGU8JQKxiVX4bco0/3Ngn1E3+jFC6gccgWUB1L0xnu5k2GG4oCpxDW4j nzISXOD9CXs2vSeBDz+1TEbESE2Rh8BWKJ+BcAFoUURBObucbsSQYfWoz9tkkMJLtoCG 0KsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UIeMK5jr3LgPX95Y7sagT/xs5NtBykSFrOwj+t5d9xI=; b=gQYgdlEOcOMSikCON8QbPc0C/ATqV+t3Vx8FY3Pdp4tVV6LAnBhkOXsBsadyg9BnZ1 RvQyikO/NeokEtjj8bMUFrflZGqEGon8VL/OwWYwB8C1VgRuR+HsIi6kzvjV4J6s5tcg OvedN7ybbHjN8zfjJvKiCczObQwnB77bZ44pFn2X3AgDrAs3FC8LSybGIE3UyrAK2cyK W+7SuRqq5x3eE7X4B8T6a+1XAtLUMUmF/cKDB3XCG4k2BvB4GjNfGItbVlr1TPvfF0Is o8+el4Glzr6E7xvCQbGRaVG+FDjhshLwCQSLcod4GDlD1nFA2If1l3A5j14E2h9q1mrg MyqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7-v6si3708242pfm.217.2018.09.13.05.37.38; Thu, 13 Sep 2018 05:37:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727365AbeIMRpN (ORCPT + 99 others); Thu, 13 Sep 2018 13:45:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46086 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbeIMRpN (ORCPT ); Thu, 13 Sep 2018 13:45:13 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2AC3ACB7; Thu, 13 Sep 2018 12:35:55 +0000 (UTC) Date: Thu, 13 Sep 2018 14:35:53 +0200 From: Greg Kroah-Hartman To: Tomas Winkler Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Dan Carpenter , stable@vger.kernel.org Subject: Re: [char-misc v4.4.y 2/2] mei: bus: type promotion bug in mei_nfc_if_version() Message-ID: <20180913123553.GJ2268@kroah.com> References: <20180903224304.15989-1-tomas.winkler@intel.com> <20180903224304.15989-2-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180903224304.15989-2-tomas.winkler@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 04, 2018 at 01:43:04AM +0300, Tomas Winkler wrote: > From: Dan Carpenter > > commit b40b3e9358fbafff6a4ba0f4b9658f6617146f9c upstream > > We accidentally removed the check for negative returns > without considering the issue of type promotion. > The "if_version_length" variable is type size_t so if __mei_cl_recv() > returns a negative then "bytes_recv" is type promoted > to a high positive value and treated as success. > > Cc: # 4.4 I also need a version of this patch for 4.18.y, 4.14.y, and 4.9.y before I will consider adding it to 4.4.y, as we do not want anyone to ever get a regression moving to a new kernel. thanks, greg k-h