Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1222495pxb; Fri, 26 Feb 2021 05:51:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2qBgoZ0YT14vLpLkdepr4IKGhdfiZ0TscGZcRoNdza7UP3VHK6BNMbIpjnTFGWF2AodwS X-Received: by 2002:a17:906:2bc2:: with SMTP id n2mr3389480ejg.381.1614347461358; Fri, 26 Feb 2021 05:51:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614347461; cv=none; d=google.com; s=arc-20160816; b=VZ5PPboKW+/s7J3Hs16tRYAhwISmJTSO1g63mLe3GY8E2eqBPOhH9gPo2m6cQCpb+M VePxHr5ppFMyww2ouxbRdBadKFKQBxhr/+AYFpYmMWEInAP/QKNRZSHYH+S8e2iDZNCn warCuf/LB93t1lfYx6OUIV2YvK3qWeAqB2VYm5bBJLkO9a5WmYg8FuBVKXzFFkGHger9 HcbJ4eiKGtbiVyDXimfmkoz4CzyWTrDmRbGxm5+sfmQYnDnzStBHewWudv7kgRZPf9M3 7Gb01rQK00o5xy/B2yBAlBlH3KGcfeP2JBzWWS6GW/GPFdfAYGcZHKpedvOTUbxmi9dt Q07w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=j6X7aMhyeHbfwWugkaYf+5JqZcw2yDe6NCV7HeplKdQ=; b=wT/4zk6znq4j6k62R6VxNm9TNuRWdSGRkCOMn/SHS45/FGoAuNn/pSM6h9DPXToNPe BRc0uDfhgZ17IPb3qStz5lmtIg3R+GobYCBnkq8DOxUBGMu076EHsNPtMTV+RawXUrVW IPevzTu0N5ufl/PW7G/K5EPeWYhQ42+9Pqnu1QveGPkz1WWuYMiuXRF1RyyV+/yvdHCY WxdaXY3EELp8hhq03Z7Hqq2AYyA/aTPbht7d0cHGjr/+AZA9CzmPsZtgxMkKSaEqW1tS rbWbTDz4IrcdG072wLLpq7DFi4Nja3Kopn0CYvieQgPKBG2eQ/HYoOkMAVec9x8lvkrc VP6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=E1QpblCl; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs7si6193342ejc.349.2021.02.26.05.50.38; Fri, 26 Feb 2021 05:51:01 -0800 (PST) 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=@oracle.com header.s=corp-2020-01-29 header.b=E1QpblCl; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbhBZNtv (ORCPT + 99 others); Fri, 26 Feb 2021 08:49:51 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:49596 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbhBZNtt (ORCPT ); Fri, 26 Feb 2021 08:49:49 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 11QDi6n3015652; Fri, 26 Feb 2021 13:49:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=j6X7aMhyeHbfwWugkaYf+5JqZcw2yDe6NCV7HeplKdQ=; b=E1QpblCl7irow6XTW5uqj4HwchxIlK8N2anfQalhxXhznagUaHus4kiHwYqJqdbjVSVR rrT0an+xGCzd0MhR+g38rrFhpNspp05zFIOk7GfPvieHEg2CQIeVZTRNYzWFheqPlK8x 5YfJ1+FWLk6YK7oNjdNOxW7B7zVdcpBgi333voF8kGMQPXVKDJkZvZj83ZR01AYUTJkR Xjd+PLIUfn5ZrvowT/a5tY30MB1ATyT3nOZ4Rwju/ZxL1dOqASbpVV8dIvtgWocEDDL6 0OC+MKmGD1wbTulL5m26mI39Fxr9MCAKW19qye497banR+QUzkZa/M/LDb7zJ0znE0BY Zg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 36xqkf9g50-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Feb 2021 13:49:04 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 11QDilsK005186; Fri, 26 Feb 2021 13:49:02 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 36ucb3e032-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Feb 2021 13:49:02 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 11QDn1Oe004149; Fri, 26 Feb 2021 13:49:01 GMT Received: from kadam (/102.36.221.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 26 Feb 2021 05:49:01 -0800 Date: Fri, 26 Feb 2021 16:48:55 +0300 From: Dan Carpenter To: Lee Gibson Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan Message-ID: <20210226134855.GB2087@kadam> References: <20210226132725.401813-1-leegib@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226132725.401813-1-leegib@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-IMR: 1 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9906 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102260106 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9906 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 suspectscore=0 impostorscore=0 phishscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102260106 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 01:27:25PM +0000, Lee Gibson wrote: > Function _rtl92e_wx_set_scan calls memcpy without checking the length. > A user could control that length and trigger a buffer overflow. > Fix by checking the length is within the maximum allowed size. > > Changes in v2: > Changed to use min_t as per useful suggestions This kind of information is supposed to go below the --- cut off line > > Signed-off-by: Lee Gibson > --- ^^^ here. regards, dan carpenter