linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tranmanphong@gmail.com
Cc: kstewart@linuxfoundation.org, linux-usb@vger.kernel.org,
	hslester96@gmail.com, linux-kernel@vger.kernel.org,
	syzbot+7dc7c28d4577bbe55b10@syzkaller.appspotmail.com,
	syzkaller-bugs@googlegroups.com, glider@google.com,
	netdev@vger.kernel.org, tglx@linutronix.de,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [PATCH] usb: asix: Fix uninit-value in asix_mdio_write
Date: Thu, 07 Nov 2019 15:21:18 -0800 (PST)	[thread overview]
Message-ID: <20191107.152118.922830217121663373.davem@davemloft.net> (raw)
In-Reply-To: <20191107004404.23707-1-tranmanphong@gmail.com>

From: Phong Tran <tranmanphong@gmail.com>
Date: Thu,  7 Nov 2019 07:44:04 +0700

> The local variables use without initilization value.
> This fixes the syzbot report.
> 
> Reported-by: syzbot+7dc7c28d4577bbe55b10@syzkaller.appspotmail.com
> 
> Test result:
> 
> https://groups.google.com/d/msg/syzkaller-bugs/3H_n05x_sPU/sUoHhxgAAgAJ
> 
> Signed-off-by: Phong Tran <tranmanphong@gmail.com>

There are several more situations in this file where the data blob passed
to asix_read_cmd() is read without pre-initialization not checking the
return value from asix_read_cmd().

So, syzbot can see some of them but not all of them, yet all of them
are buggy and should be fixed.

These kinds of patches drive me absolutely crazy :-)

Really, one of two things needs to happen, either asix_read_cmd() clears
the incoming buffer unconditionally, or these call sites strictly must
check the return value always before accessing the buffer after the call.

I'm not applying this, sorry.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2019-11-07 23:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0000000000009763320594f993ee@google.com>
2019-11-07  0:44 ` [Linux-kernel-mentees] [PATCH] usb: asix: Fix uninit-value in asix_mdio_write Phong Tran
2019-11-07 23:21   ` David Miller [this message]
2019-11-10 14:07     ` [Linux-kernel-mentees] [[Patch V2]] usb: asix: cleanup the buffer in asix_read_cmd Phong Tran
2019-11-10 14:11     ` [Linux-kernel-mentees] [PATCH] usb: asix: Fix uninit-value in asix_mdio_write Phong Tran

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=20191107.152118.922830217121663373.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=glider@google.com \
    --cc=hslester96@gmail.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+7dc7c28d4577bbe55b10@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=tranmanphong@gmail.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;
as well as URLs for NNTP newsgroup(s).