From: David Miller <davem@davemloft.net>
To: baijiaju1990@gmail.com
Cc: isdn@linux-pingi.de, pakki001@umn.edu, tranmanphong@gmail.com,
gregkh@linuxfoundation.org, rfontana@redhat.com,
gustavo@embeddedor.com, tglx@linutronix.de,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain()
Date: Sat, 27 Jul 2019 13:29:59 -0700 (PDT) [thread overview]
Message-ID: <20190727.132959.360971552451713269.davem@davemloft.net> (raw)
In-Reply-To: <20190726082736.8195-1-baijiaju1990@gmail.com>
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Fri, 26 Jul 2019 16:27:36 +0800
> In start_isoc_chain(), usb_alloc_urb() on line 1392 may fail
> and return NULL. At this time, fifo->iso[i].urb is assigned to NULL.
>
> Then, fifo->iso[i].urb is used at some places, such as:
> LINE 1405: fill_isoc_urb(fifo->iso[i].urb, ...)
> urb->number_of_packets = num_packets;
> urb->transfer_flags = URB_ISO_ASAP;
> urb->actual_length = 0;
> urb->interval = interval;
> LINE 1416: fifo->iso[i].urb->...
> LINE 1419: fifo->iso[i].urb->...
>
> Thus, possible null-pointer dereferences may occur.
>
> To fix these bugs, "continue" is added to avoid using fifo->iso[i].urb
> when it is NULL.
>
> These bugs are found by a static analysis tool STCheck written by us.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Applied.
prev parent reply other threads:[~2019-07-27 20:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-26 8:27 [PATCH] isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain() Jia-Ju Bai
2019-07-27 20:29 ` David Miller [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=20190727.132959.360971552451713269.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=baijiaju1990@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo@embeddedor.com \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pakki001@umn.edu \
--cc=rfontana@redhat.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