Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp779177imm; Sat, 7 Jul 2018 08:34:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdTJsFhXCFu8Vhx48y9ZLas5M//SAnvhAASD+RBcjRixNZPgpFqFrXTvFK0TGl1cB8hFeEo X-Received: by 2002:a17:902:788e:: with SMTP id q14-v6mr14027938pll.234.1530977640954; Sat, 07 Jul 2018 08:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530977640; cv=none; d=google.com; s=arc-20160816; b=Hzle2piWDQ1Tey6F23a3GvMUXeRCvbKRj7rUdSzwwOXDzzcBd0T/TrSeTsKQOKyiR+ STwN2MoV42YTXo32hqiq7UqCs2CyPjeuNlu4fhckK4yWyvM7xy8ct1zbjFy3boqs1y3/ D53KOTWt4uYGQn8wHC0UkBjM6nKSWhqMG+KZ81ZjV3+mAlLQv/SgpQUD1tnsjWgaDPw2 DV+sk2H5VyEALSXa8SP07fHlFHN86yPDR0HepCZ7pWT1O5qAc+/WAQR74n9tcUozEH+X M4OwjaXe/7bt6k5Q1bis9+LKqrQa4v2L5vA6tJMQQ2hk4bPPwAf5rNE/LRvlKme4gGz4 WNhA== 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:arc-authentication-results; bh=j4OoxID689pycVhEgRErxyM/pY6OVWNxOG3iKuvKrmU=; b=CYcWwCyhzlcDJ1DKHFNmOUB9pjoVXxnqyrj1TNxkEEvsZpbAXkgqkNzUaJov1DwaZC zK/ba3uTu1u6gARhzZbQRum2QpsOlEaG1k6MHwKTlB2LNHVFkRhu/LZr/6CmPVKCBuJL UoCxdQpbyPGBYZg0+i/d2/FVIEQusYnAzNIsw4r3Vz2uBOMjaTJQgKvwyOTQTJfSACEz 8gck6NKop1yjBhhteeFVIvoGxG/U1u5Ddhwf8s65DTfYHOpXQcPsd113uf18sk7Zlv7Q cCvYltMtvwsle/FTHBywnQxfI1crR7JJtxdJXQFFdUWIcM4yLXqya66O2VVN92DbJ0qN NN6w== 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 h3-v6si10414140plb.100.2018.07.07.08.33.45; Sat, 07 Jul 2018 08:34:00 -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 S1753937AbeGGPdB (ORCPT + 99 others); Sat, 7 Jul 2018 11:33:01 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55318 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753572AbeGGPdA (ORCPT ); Sat, 7 Jul 2018 11:33:00 -0400 Received: from localhost (unknown [37.168.185.56]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6A4AEDA4; Sat, 7 Jul 2018 15:32:58 +0000 (UTC) Date: Sat, 7 Jul 2018 17:32:55 +0200 From: Greg Kroah-Hartman To: Dan Carpenter Cc: Tomas Winkler , Alexander Usyskin , Arnd Bergmann , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version() Message-ID: <20180707153255.GA29925@kroah.com> References: <20180704093449.vryluk7khaudstgp@kili.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180704093449.vryluk7khaudstgp@kili.mountain> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 04, 2018 at 12:34:49PM +0300, Dan Carpenter wrote: > 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. > > Fixes: 582ab27a063a ("mei: bus: fix received data size check in NFC fixup") > Signed-off-by: Dan Carpenter Didn't apply to my tree at all :(