mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Greg Tulli <greg.iforce@gmail.com>,
	syzbot <syzbot+4dd880c1184280378821@syzkaller.appspotmail.com>,
	syzkaller-bugs@googlegroups.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, glider@google.com
Subject: Re: [PATCH] Input: iforce - invert valid length check when fetching device IDs
Date: Mon, 7 Nov 2022 10:29:23 -0800	[thread overview]
Message-ID: <Y2lOg/xnjxNt+vUi@google.com> (raw)
In-Reply-To: <531fb432-7396-ad37-ecba-3e42e7f56d5c@I-love.SAKURA.ne.jp>

On Mon, Nov 07, 2022 at 07:47:15PM +0900, Tetsuo Handa wrote:
> syzbot is reporting uninitialized value at iforce_init_device() [1], for
> commit 6ac0aec6b0a6 ("Input: iforce - allow callers supply data buffer
> when fetching device IDs") is checking that valid length is shorter than
> bytes to read. Since iforce_get_id_packet() stores valid length when
> returning 0, the caller needs to check that valid length is longer than or
> equals to bytes to read.
> 
> Link: https://syzkaller.appspot.com/bug?extid=4dd880c1184280378821 [1]
> Reported-by: syzbot <syzbot+4dd880c1184280378821@syzkaller.appspotmail.com>
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Fixes: 6ac0aec6b0a6 ("Input: iforce - allow callers supply data buffer when fetching device IDs")

Applied, thank you.

-- 
Dmitry

      reply	other threads:[~2022-11-07 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07  9:43 [syzbot] KMSAN: uninit-value in iforce_init_device (2) syzbot
2022-11-07 10:47 ` [PATCH] Input: iforce - invert valid length check when fetching device IDs Tetsuo Handa
2022-11-07 18:29   ` Dmitry Torokhov [this message]

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=Y2lOg/xnjxNt+vUi@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=glider@google.com \
    --cc=greg.iforce@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=syzbot+4dd880c1184280378821@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®