Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp292018imu; Mon, 10 Dec 2018 22:05:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/XckAwDp4xfIOVoHZkDFKUbwYqoc/sr955jdZBFe4RMrcZrKaYQC2DPj1opcHFQ6yFZWauA X-Received: by 2002:a17:902:6b83:: with SMTP id p3mr14753824plk.118.1544508336312; Mon, 10 Dec 2018 22:05:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544508336; cv=none; d=google.com; s=arc-20160816; b=i7CaKJGyLzXaJMQ5d0EXJ5KpKojzKyGTmtwRKIm/XzC9LNI9oKsE/k6AWJOIs2XPPz mE/8R7qXRq3HkIyNcZyyoD8nfmOgr+IdVbGBgZgz6C1nmL1uou+HzTPMvqBK+7Ucecdy rZ5cOkw2SP+a4B+43QXMgt25WK0hbB/pzr7IEFoQT/jnINXaDv8Lrv42ITZWKV+6vtR+ a0omUjFiJLKgaPpDq2KFpU2LwtSo7I6aJiZSKXIUw3wfi3ZL8e3Qm+Pt8FhpUDA959L8 W3+FgbJJjGYjnsipBlhNehk9puMY4JaGAt1Zxx/ZyVmH5O1TJMfKMDfPH5tAxxxQ46y8 Gl5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=onSinKt4vHFY2PXf3qv7SsFyU5tMjA7sZ8OnauZn7T8=; b=EXiHShZeDhFib7euqR3W3y84pfTbt82Q49vm9+/tLVVi1TepDLQP78RBZXEKZxBs9K 5LWu4jxFTXiBcfQXR+nBvrSmqiQVtHf5l0LYI7uAZQnjXxsT5iWfRYNKCBlnLGjwAYvQ h3Cb48pYxte0xbPDyxYnwMlc9Mzr/49TD3yLKN9Otmlb8ZBOnz4DvuJ6q1M1BrZ+Mxq5 bRDH1SS+q7JDw1DNJFjPw1btqc8zE0vryl8xwVjUqXIkH/+50CW4Yp71n3tJdGZbasxn h3EN5zaQTNZzxR6fmwBlsyn3Fnt8QcGrm2ncHRljNB3yFobc3DhIy8ClQQG1fYQfKehy yd2w== 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 i69si11583817pgd.71.2018.12.10.22.05.21; Mon, 10 Dec 2018 22:05:36 -0800 (PST) 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 S1729036AbeLKGBJ (ORCPT + 99 others); Tue, 11 Dec 2018 01:01:09 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:53784 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727352AbeLKGBI (ORCPT ); Tue, 11 Dec 2018 01:01:08 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 328331000B09D; Mon, 10 Dec 2018 22:01:08 -0800 (PST) Date: Mon, 10 Dec 2018 22:01:07 -0800 (PST) Message-Id: <20181210.220107.751606140724107779.davem@davemloft.net> To: yuehaibing@huawei.com Cc: h.morris@cascoda.com, alex.aring@gmail.com, stefan@datenfreihafen.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-wpan@vger.kernel.org Subject: Re: [PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done From: David Miller In-Reply-To: <20181211031339.21048-1-yuehaibing@huawei.com> References: <20181211031339.21048-1-yuehaibing@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 10 Dec 2018 22:01:08 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing Date: Tue, 11 Dec 2018 11:13:39 +0800 > gcc warning this: > > drivers/net/ieee802154/ca8210.c:730:10: warning: > comparison is always false due to limited range of data type [-Wtype-limits] > > 'len' is u8 type, we get it from buf[1] adding 2, which can overflow. > This patch change the type of 'len' to unsigned int to avoid this,also fix > the gcc warning. > > Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") > Signed-off-by: YueHaibing WPAN maintainers, I am assuming that as maintainers you will be picking this up and sending it to me.