Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp837752ybx; Tue, 5 Nov 2019 06:22:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzsY02lIE3nfi19FXtiFWtooh/2SdTo3QB1wqDtTwOt8+LVCFvN3/eDG3W1gN7OR4Q8JNbi X-Received: by 2002:aa7:cd54:: with SMTP id v20mr10635520edw.203.1572963769942; Tue, 05 Nov 2019 06:22:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572963769; cv=none; d=google.com; s=arc-20160816; b=XnDseHNfYGwbBP5w5iXaaB+Vqjk0rxjahcEaasqaze1o2Bq30ZTD2G8kx1X9xUXkdi cFHwTul+duapFiPxCe6kflifk08d0KWCq3allXJAJD4h4x+WP+pVsjUgCyEgkp2HSuw4 P88C1KovOgOgeWkuDpc85Bkk2FrjUT2N8sAll4zqjL51/YcJAdKaB9AFEEn9+rcIQBiy SoL3qdc0bdx3r7hPuygUg5yKimoSrq6ex6oK6QO0Qw8CkgOpQ+JGtFfT40mLg0lqAC4m eSYAOZWrG5nNn6fvVXGKkINhqhyz6lP3PwRLKm7svZhduxIUnU9ZoL52BbKCRUJ0tqcC e1Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4Z2WSsWHskG0Pcep27ldnUGqnlUWbGBs3tUsEl7VTNg=; b=ue/8DLaTe9O7x0s4BlBzTMyJUnGE8JQtUnpZkMKQFHes5hxDJmGTS+WCWkE3VqNGM4 x+s3iliEq4bP4jhO6JHmIWREYGdqJVQUQ50kuXaDpjAZdk7MpB9zD67ZQdaI9o8pSMu5 BMWRQS5k99Dmgbm1HrsgZLIvrIHfA41HwSbjUG1ddri8SFvEmP+5HPBAeVQsd9TURSXh g83SVWexvtTDzqd++itPc+FjeGHotz+e7TOYabblTaP2LOgxgcK0WlvZVoocp+FBmsCT ct0j0U9CL/iYomOh5uuDtFu6CTGUUt96gceN2TbImcMdyAg0HMEVK9AIqsaybG6WDJio W4vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Grx+b/45"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1si4715419ejr.320.2019.11.05.06.22.25; Tue, 05 Nov 2019 06:22:49 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Grx+b/45"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730899AbfKEOSW (ORCPT + 99 others); Tue, 5 Nov 2019 09:18:22 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43387 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbfKEOSW (ORCPT ); Tue, 5 Nov 2019 09:18:22 -0500 Received: by mail-pg1-f195.google.com with SMTP id l24so14280279pgh.10; Tue, 05 Nov 2019 06:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4Z2WSsWHskG0Pcep27ldnUGqnlUWbGBs3tUsEl7VTNg=; b=Grx+b/45s85SXtn0Wr6DjrCIJnGZQ8Pa9I2baoFxnu+f7l2EbvIp9SsOOLmjQpD3Ly rmM2j1e7nzhVQpQSC3+l0VpPuyuMxN3y2O3CyiA6ICyiCwmGx2Jj03Qla/tCIqKNlJhZ t8qzUtlsqD/2I5Llc5ZdtqAQxiXD4C7e++Jv3GfFjTvo8MAEoQr44xPAMZq3hg78562W rgYGWg3ho9xmzhU6b6SnVAAi2APSUv+H4LTUWdOJP0k87AsGyzjCHkDzKNCRzxkNxCgc Wrv1yCwManKRlctajUcMItls6VjNDsmHUElDluD+lT9U/NkniNgONe4xFWjW0qH9mVxV hF7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4Z2WSsWHskG0Pcep27ldnUGqnlUWbGBs3tUsEl7VTNg=; b=bZEFDqqfIZsUooPAbr2VngQxQhh9XdptlhVIG8BMzgK+cEvAJlcy92duV3ptrRAAPi zFdX37pYXhc1Y/N90NqRBc8LDwlVYelEEuU/U7mv23UnYv5OHwcBgMmTCvGCqS9uzlGF dCVZsllWHcX3JOEO2ksjJ1Qkry/yaw6FzQMobG+PBxc8cHy3gpdDAlBIT0rANbf51V0o glxBD/qdpwuHbiI13BgswaFrNZpGCuzoOuBtmhJda2Wes0qEJDlvQermNspwM9odQgJs sD9HlGPiQHlbmACKfMV9Fks6ZwasWWOQ4B52TzJkFUkmdFysF6sNgOaJhH6ppQFVMBQA 8f4w== X-Gm-Message-State: APjAAAVZezUSAEFyCkOFMffMykxmnuVP53cEaJU096FHAgRdE5p7E1QS SFW8qxcCQSB0tkaO4Jjt6jQ= X-Received: by 2002:a62:8010:: with SMTP id j16mr38341159pfd.249.1572963501755; Tue, 05 Nov 2019 06:18:21 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:3f8f:27cb:abb4:d0bd:49cb]) by smtp.gmail.com with ESMTPSA id w2sm25246691pgm.18.2019.11.05.06.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2019 06:18:20 -0800 (PST) From: Phong Tran To: benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Phong Tran , syzbot+1234691fec1b8ceba8b1@syzkaller.appspotmail.com Subject: [PATCH] HID: hid-lg4ff: Fix uninit-value set_autocenter_default Date: Tue, 5 Nov 2019 21:18:07 +0700 Message-Id: <20191105141807.27054-1-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org syzbot found a problem using of uinit pointer in lg4ff_set_autocenter_default(). Reported-by: syzbot+1234691fec1b8ceba8b1@syzkaller.appspotmail.com Tested by syzbot: https://groups.google.com/d/msg/syzkaller-bugs/ApnMLW6sfKE/Qq0bIHGEAQAJ Signed-off-by: Phong Tran --- drivers/hid/hid-lg4ff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c index 5e6a0cef2a06..44dfd08b0c32 100644 --- a/drivers/hid/hid-lg4ff.c +++ b/drivers/hid/hid-lg4ff.c @@ -468,10 +468,10 @@ static int lg4ff_play(struct input_dev *dev, void *data, struct ff_effect *effec static void lg4ff_set_autocenter_default(struct input_dev *dev, u16 magnitude) { struct hid_device *hid = input_get_drvdata(dev); - s32 *value; + s32 *value = NULL; u32 expand_a, expand_b; - struct lg4ff_device_entry *entry; - struct lg_drv_data *drv_data; + struct lg4ff_device_entry *entry = NULL; + struct lg_drv_data *drv_data = NULL; unsigned long flags; drv_data = hid_get_drvdata(hid); -- 2.20.1