Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp950665imm; Tue, 3 Jul 2018 02:56:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIwlrnx22iMlJzKtlXYHabNls1We3HMwGzyLmvWX+NJLe9LBR+84+lsc8ta9hmCeayET9Hh X-Received: by 2002:a65:6645:: with SMTP id z5-v6mr24639811pgv.71.1530611809769; Tue, 03 Jul 2018 02:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530611809; cv=none; d=google.com; s=arc-20160816; b=Ti23s0KoyQmfykOKM8UnnBqF5Gc/f0AnFbA5y7o1JUaVTFDdKkNnVW79SOFkjxQ8s1 gc3efDxGnMxLx0Pmocb5aCB2v54FyRzhahzBFk1nnNVL3XC3QU2qmP2CGXATwi53qJKQ kHyOUv5WN7m1eUN9lg6hCU3v1to+ycU5pMatzzwq3/0ByvwINZ+YDW4dTHdQbpm2+dlf cAclVdrU/GkQwi9cSl+hVkwlh+k7JbBAgvVFkfl7S/JpqZZccYllRN6sAoW6kX56eZER YoZ0JBWboRdO4CGsen1rnFNOoTTGil/3RQiYflwc0+nMsmqurJMFmcsuoFY5gU+MgTBi x0iQ== 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 :arc-authentication-results; bh=7+QwzOX9IrzRb+fR9+AtPCX1GDQzC0/4YLuZACL66KA=; b=b/rb62IMiWXK5/LvojQumrTJYYW671/y6G/0S9lQbqmSAfm9cwj7azfla6QmMSK9+S EBRKII7FT7syw2RK8/a+dJJh3hxP96ZTFNw83GGq+CCt83+Y+/0jQErZQVfIfe7BoV7u gDhrDITWBQQbbTmyzg8sqhTJyQFB8fX9OFQJcjeQaU0P2d220TeF55YKui8D+zkFNN0s xRnrCkyNdRP7nroxsbCED7R78sod2q0yXygY9QWxlLc0RZ3Nf0SzocH3JlTt9JioW/TE ENZwUnvfjDMyBcJDtHgwyYVRDkqYlcEd2y+l7dlBdH+3G665LlFSOc5hmB+oIq3br4Qy zNdg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2-v6si655524pgv.575.2018.07.03.02.56.34; Tue, 03 Jul 2018 02:56:49 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933578AbeGCJzw (ORCPT + 99 others); Tue, 3 Jul 2018 05:55:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:39502 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932517AbeGCJzu (ORCPT ); Tue, 3 Jul 2018 05:55:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 69006ADC1; Tue, 3 Jul 2018 09:55:49 +0000 (UTC) Date: Tue, 3 Jul 2018 11:55:48 +0200 (CEST) From: Jiri Kosina To: Benjamin Tissoires cc: Daniel Rosenberg , "open list:HID CORE LAYER" , lkml , kernel-team@android.com, "3.8+" Subject: Re: [PATCH] HID: debug: check length before copy_to_user() In-Reply-To: Message-ID: References: <20180702235937.111619-1-drosen@google.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 Tue, 3 Jul 2018, Benjamin Tissoires wrote: > > If our length is greater than the size of the buffer, we > > overflow the buffer > > > > Signed-off-by: Daniel Rosenberg > > Cc: stable@vger.kernel.org > > --- > > Looks good: > Reviewed-by: Benjamin Tissoires Indeed, thanks a lot for fixing this. Now queued, I'll push it for 4.18. -- Jiri Kosina SUSE Labs