From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: pkshih@realtek.com, kvalo@codeaurora.org, davem@davemloft.net
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [BUG] rtlwifi: Resource leaks in error handling code of rtl_pci_probe()
Date: Tue, 14 May 2019 20:55:31 +0800 [thread overview]
Message-ID: <508009c2-6ebf-6c11-1f52-ef488c70ce32@gmail.com> (raw)
In rtl_pci_probe(), rtl_pci_init() allocates some resources, such as:
_rtl_pci_init_trx_ring
_rtl_pci_init_rx_ring
_rtl_pci_init_rx_ring
pci_zalloc_consistent() -- resource
_rtl_pci_init_one_rxdesc
dev_alloc_skb() -- resource
_rtl_pci_init_trx_ring
_rtl_pci_init_tx_ring
pci_zalloc_consistent() -- resource
When ieee80211_register_hw() or rtl_pci_intr_mode_decide() fails, these
resources are not released in error handling code.
A possible fix is to call rtl_pci_deinit() in error handling code, but I
am not sure whether this is correct.
Thus, I only report the bugs.
These bugs are found by a runtime fuzzing tool named FIZZER written by us.
Best wishes,
Jia-Ju Bai
reply other threads:[~2019-05-14 12:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=508009c2-6ebf-6c11-1f52-ef488c70ce32@gmail.com \
--to=baijiaju1990@gmail.com \
--cc=davem@davemloft.net \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pkshih@realtek.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