From: Phong Tran <tranmanphong@gmail.com>
To: benjamin.tissoires@redhat.com
Cc: syzbot+1234691fec1b8ceba8b1@syzkaller.appspotmail.com,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: [Linux-kernel-mentees] [PATCH] HID: hid-lg4ff: Fix uninit-value set_autocenter_default
Date: Tue, 5 Nov 2019 21:18:07 +0700 [thread overview]
Message-ID: <20191105141807.27054-1-tranmanphong@gmail.com> (raw)
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 <tranmanphong@gmail.com>
---
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
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
WARNING: multiple messages have this Message-ID (diff)
From: Phong Tran <tranmanphong@gmail.com>
To: benjamin.tissoires@redhat.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org,
Phong Tran <tranmanphong@gmail.com>,
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 [thread overview]
Message-ID: <20191105141807.27054-1-tranmanphong@gmail.com> (raw)
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 <tranmanphong@gmail.com>
---
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
next reply other threads:[~2019-11-05 14:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 14:18 Phong Tran [this message]
2019-11-05 14:18 ` [PATCH] HID: hid-lg4ff: Fix uninit-value set_autocenter_default Phong Tran
2019-11-18 9:43 ` [Linux-kernel-mentees] " Benjamin Tissoires
2019-11-18 9:43 ` Benjamin Tissoires
2019-11-19 13:29 ` [Linux-kernel-mentees] " Phong Tran
2019-11-19 13:29 ` Phong Tran
2019-11-25 15:14 ` [Linux-kernel-mentees] " Benjamin Tissoires
2019-11-25 15:14 ` Benjamin Tissoires
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191105141807.27054-1-tranmanphong@gmail.com \
--to=tranmanphong@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+1234691fec1b8ceba8b1@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.