Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1174315ybg; Wed, 29 Jul 2020 07:39:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVAyuNua5g+pqULuZhXw8QYo2c4PL8+14mZ4yUyrGwOWpZJb0hfLaRrE5o/fJ/MLa2LWKy X-Received: by 2002:a17:906:d159:: with SMTP id br25mr20020425ejb.16.1596033549240; Wed, 29 Jul 2020 07:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596033549; cv=none; d=google.com; s=arc-20160816; b=ZGn3z2Nowh+6JuUm+Y/Hja4i7D5TTln4mN9KSEEW2n9Z+N7HcTMfO7EPbqYmWRuv2g 28VkZE2K1rb99dJwefQThbPpI9shCg4gHbKP9UsJ6GMBbBKUiKElt+eyhN5xNOjGVcxy mUUdWUk7xpMs49oTixPicpLaYfcs1hPlNtdlVB7Uj4br1/xB/vpX1Ozlzq4869WuQXTE MP6P6QjnVQnkowrvBAYpKzycw6h3NMWqTTdFj5ZVPyIqSQV6EdBg7DNwSjdNUkzN1spB nUOcifFQlHuQREHV5wLRnxC1CYXGRvN9NAuNFdjTmKDBkk04OeIFTEBsQzE5cGSrxMHi j4tQ== 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:dkim-signature; bh=rO/cn8lSL/k1UwcwgfqEWwmSiV10mpaOIq5H049wwYI=; b=kJiHqbt9PchJJb+GlmtwGOc60U7APOF33a45w6WHKOZwdCLpvCAlzQgQsNkLICLlly 3RI3BZxGcqTpr30sW8eyV38wtdctFFegS38DRraWu2rSZFfKXy1FedwhlNQs5sTHbeT0 HuApVEIRKhJVji4ebfqXgapXwegBG8tzRWmTWI4qHo3W/KG0H95ue0JDrrkGKk16k6XW puE5y02w+7DfRVRAUz+qE0TvyNtrHhH1itulhuhN+KlLNq3rn2pv5SGn5l63nMLNVYPD DcTwZvFrNK+2NURpl/lyCeu1Co7aMtV4pTnOky6Gr9aUHvelALHPrPhADa8RoPsUsCvp OQkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=gG3zm+Jf; 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 a9si1259724ejf.124.2020.07.29.07.38.47; Wed, 29 Jul 2020 07:39:09 -0700 (PDT) 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=gG3zm+Jf; 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 S1726858AbgG2Ofl (ORCPT + 99 others); Wed, 29 Jul 2020 10:35:41 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:58274 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbgG2Ofl (ORCPT ); Wed, 29 Jul 2020 10:35:41 -0400 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 06TEVfEO135564; Wed, 29 Jul 2020 14:35:33 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=rO/cn8lSL/k1UwcwgfqEWwmSiV10mpaOIq5H049wwYI=; b=gG3zm+JfQzzuSKqgJ0l4/XFKicqJn0T2rdEKZEjmkrGBNGhMvqhdHRRrp5L0pi4HQsou /NiqhMNr3n9TXDPZZfROzPE+r0UM5gJWmggouQ8vAeCyfZaMYtHyFD0E7ekT0u2UeCOG Ywt/e9q78IVgEeSPVq0+ARrdgBMHH/eHl0hMdxDFdJJY3pqEKNzRkgw0oEXqrXVE6AYI 0TPC/A2fhj2RQSV2S1HUxFy4bN57+y35UNxMJDrIb/YJ4cPCm6lIKlcN4wB6UndlMXfo /j9yspUzhBHf+xIW5CpYiE3AeP2RZcN7f+MMsqm8jkLT0r6ad5YL/fJVyKYJeCFgVwd3 kw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 32hu1jdyug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Jul 2020 14:35:33 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06TESkit099523; Wed, 29 Jul 2020 14:35:33 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 32hu5vuqet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Jul 2020 14:35:33 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 06TEZWcc017066; Wed, 29 Jul 2020 14:35:32 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 29 Jul 2020 07:35:31 -0700 Date: Wed, 29 Jul 2020 17:35:22 +0300 From: Dan Carpenter To: Peilin Ye Cc: Jiri Kosina , Benjamin Tissoires , Greg Kroah-Hartman , syzkaller-bugs@googlegroups.com, linux-kernel-mentees@lists.linuxfoundation.org, linux-usb@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH v2 RESEND] usbhid: Fix slab-out-of-bounds write in hiddev_ioctl_usage() Message-ID: <20200729143522.GB5493@kadam> References: <20200718231218.170730-1-yepeilin.cs@gmail.com> <20200729113712.8097-1-yepeilin.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200729113712.8097-1-yepeilin.cs@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9696 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxscore=0 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007290098 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9696 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxscore=0 impostorscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007290098 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 29, 2020 at 07:37:12AM -0400, Peilin Ye wrote: > `uref->usage_index` is not always being properly checked, causing > hiddev_ioctl_usage() to go out of bounds under some cases. Fix it. > > Reported-by: syzbot+34ee1b45d88571c2fa8b@syzkaller.appspotmail.com > Link: https://syzkaller.appspot.com/bug?id=f2aebe90b8c56806b050a20b36f51ed6acabe802 > Reviewed-by: Dan Carpenter > Signed-off-by: Peilin Ye > --- > Change in v2: > - Add the same check for the `HIDIOCGUSAGE` case. (Suggested by > Dan Carpenter ) Why are you resending this? regards, dan carpenter