Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4716546iob; Sun, 8 May 2022 23:04:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4J1OwBWk5FOBznnQMZENjrKnKcildHEkP7JjSlYVnkIAIuJZls3bqJHHrFoFWLSzAN9iJ X-Received: by 2002:a05:6a00:e0e:b0:50a:cb86:883c with SMTP id bq14-20020a056a000e0e00b0050acb86883cmr14512665pfb.11.1652076269411; Sun, 08 May 2022 23:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652076269; cv=none; d=google.com; s=arc-20160816; b=okvSVzclX/sHpI5uHuS/rK+cXfNoA9M+J94621Fdy7oUujJtiBBUeyqMwo3Roa1a0C jsKMb7vWJfWEH6Hg4ahzTRB8CmG78AwO20/icnXHQ1rTJM9sBDB0XJS7mTvaQd1Se0AD t9sANGewzPiQlXK0i5UOs0wdnseLDljuh4Bag3lcjObrMERNq5HnRoIQvuLPiS8Tko6X 4bbi2Ioyu9AR2vhjfOr4v0xmRHEyAA3y9TYQkcPhXkcuQAC+1z2Cr5CI3r/SiUOyPUms q1CDesysXbxv+sWHf/ut9AepjL9iAhTDyg6ph1ioP1UQ5QMl6ez/oT+1Fwwj3i/wvx7q I3/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=mAie1k0TKZhyw+yE3PliQwE6fRMeU4JngSPw9vdXfZo=; b=l3S51AFoXEM2Rv3SxOCYq0xbFoyW/fnqjIcYzPU+PX7e+rTEYd8GJFyfElq4WBvkAS VcrhQFPu59BTgfGDJiSLEGTki2RckXnSOv3q5C/yiamhigdOS/yPAnE+R49QRt3/Zd0y HIV6GEOhPOhsp1oSz6l+Xaea1HWEvBb4X/ODTmX2BROlHaNh7Zl8JBO5uAmgYk5gOnkD 3jYv0qzqtvZkpVoLEWy4c3LnXuaAPhY4mzZcp3kGEeAEhQ5jkU5SlELMhmWYNDAYVvJX rUe9KnoK0/MsO6OVzNM0CdT9FxtyNRsl/5Lp4iSbFOSaNLunN8J3efDf106aJtM6Xq3d XdhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fvj9B9xw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 135-20020a63068d000000b0039d8ab23adesi12372895pgg.580.2022.05.08.23.04.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:04:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fvj9B9xw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 299E3163F62; Sun, 8 May 2022 23:04:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390278AbiEFIvP (ORCPT + 99 others); Fri, 6 May 2022 04:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242702AbiEFIvE (ORCPT ); Fri, 6 May 2022 04:51:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1172A580D7; Fri, 6 May 2022 01:47:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2D828B83408; Fri, 6 May 2022 08:47:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 426CEC385A8; Fri, 6 May 2022 08:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651826835; bh=+ufjvO7P96KYb2XbcCIj9uJ7p81LI1Ql3CZxkOp2IaU=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=Fvj9B9xwDSiPeqEcTecehkOah/pHPFo0wISr1GNyf7fNRbmQ8ren8viMRQBOVWYKH uza5c4k+QYCDlJz7Zk9jNMiz+aAp71dtHDBq48jJcmk6NGZ/shsA9k6ogJkhfm9DeP Vs2XUIW1UfQpsoflkv7RZb4IbfVT4Wbqew31JVOhvKWiMzgQSqkKUIqckbAC9mhhAL 1W1lsrUVX0Dk1/f9abAk030teC/FIk4+G+oR1LeMrGRfPYeC9Z4lQCaSlwScXnqzjz djS9RfIn5OaKj7Z8fQ/WkDZqQ7cW4NLp9y4dYKiXrFENCk24KBh9x0+4OMYwqIZgfD lWe61DUP3XbVA== Date: Fri, 6 May 2022 10:47:11 +0200 (CEST) From: Jiri Kosina To: Dongliang Mu cc: Benjamin Tissoires , Dongliang Mu , syzkaller , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] HID: bigben: fix slab-out-of-bounds Write in bigben_probe In-Reply-To: <20220506072425.1121900-1-dzm91@hust.edu.cn> Message-ID: References: <20220506072425.1121900-1-dzm91@hust.edu.cn> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 May 2022, Dongliang Mu wrote: > From: Dongliang Mu > > There is a slab-out-of-bounds Write bug in hid-bigbenff driver. > The problem is the driver assumes the device must have an input but > some malicious devices violate this assumption. > > Fix this by checking hid_device's input is non-empty before its usage. > > Reported-by: syzkaller > Signed-off-by: Dongliang Mu Applied. thanks. -- Jiri Kosina SUSE Labs