Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2200991pxa; Mon, 17 Aug 2020 03:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyznwWk9JZXczSUUorHrj6O6o91sZ3Vl7JAiw/6YrnlB3Se/K0ukaWlDu5LS2jkdbVlfCX+ X-Received: by 2002:a17:906:8595:: with SMTP id v21mr15044544ejx.347.1597661632034; Mon, 17 Aug 2020 03:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597661632; cv=none; d=google.com; s=arc-20160816; b=I8sHl4RifEZF7xRV/9aAJmFMZlexGPBCr9p1fm/R3R4lnfgjn+uYwIJOR8eblyUHBz NoBRMm1Ln2OijwiQMCQ4tZ3UcozAtQyfXbapOa/tlnAT4MZSvoQwMjNgzIyFe5u660QC I11X9z2Rxc598Nn4jMb6oRrkYWVJbCo5Uf08F/mdRiKT2UtAms2fQ0T1vwrDmkJNTqiS 2fzxmLD51LU5lTHT6BhJjNCjiqRSpAU6cumq7Jyz2Z9Lt0fOzim6iEwVD16MJcLSrKCt 44zj7dYXeG2Eftc5tRgzeOWy3d6ZLXUSKotS224ffdEH/65iNliTr0XhzoqC9kS5+uq3 +g/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=MMvxNg6TGgaYxfrerYsIlPaI9/cqgpShVU2Cx//VW9w=; b=PKibeqdBP4k1aRrphzdtHFIMmU2d3NB0L+Mb4fLIiuEbBapAgQjS+P2mCLvVj5eyvb lvgo7dl5ozguUf2DDlt5NnZclVwbV4rYbxyGk+hy6i+pg8ikgogWiIrTpeopeP4/LxMn NeWpERbOONdROCahPdb7r4D6Ba/KYvpT/krXoqVG+M4erICdo4Qqey3yEyNi09ctqAAb l9TeHV0KQ0RA+Ajkz0LaXvTZCuDJ5xTjpZPjxm9XP05U7gh1n7G9vgXDBWYcOQNz0GJE R6RB8s9Bt5EBq/HZQ4oOWDIZCLVsrET9Qa/UHnfXWw46b0kEmAyFO7ThVcLU31nMRPnW PgGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zgDDLsZC; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si10693693edq.487.2020.08.17.03.53.28; Mon, 17 Aug 2020 03:53:52 -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=@kernel.org header.s=default header.b=zgDDLsZC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727930AbgHQKVp (ORCPT + 99 others); Mon, 17 Aug 2020 06:21:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:53776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbgHQKVo (ORCPT ); Mon, 17 Aug 2020 06:21:44 -0400 Received: from pobox.suse.cz (nat1.prg.suse.com [195.250.132.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 004132078A; Mon, 17 Aug 2020 10:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597659704; bh=ovtTW2fCfcjd32QufVbUkaQHW26qGINnQJXinpGHiU8=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=zgDDLsZChMNRGx0G1LVTQMnzzPd6AUnV6kVFSIf1/2Ru0+ZBP5khL9w7417w94J0s bdmHmULUaaVykYETE0nrGpeGWYEUm6L3Nkbeyn2xBy3USAG0BBdiLfPUiNM1in1Pv9 qkPUI9iYQZHpf116y4niqlpZwIsadmypTk/nchtM= Date: Mon, 17 Aug 2020 12:21:41 +0200 (CEST) From: Jiri Kosina To: Peilin Ye cc: Benjamin Tissoires , Dan Carpenter , 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() In-Reply-To: <20200729113712.8097-1-yepeilin.cs@gmail.com> Message-ID: References: <20200718231218.170730-1-yepeilin.cs@gmail.com> <20200729113712.8097-1-yepeilin.cs@gmail.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Jul 2020, 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 ) Applied, thanks. -- Jiri Kosina SUSE Labs