From: Muhammad Usama Anjum <musamaanjum@gmail.com>
To: scan-admin@coverity.com, colin.king@canonical.com,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: musamaanjum@gmail.com
Subject: Re: New Defects reported by Coverity Scan for linux-next weekly scan
Date: Fri, 09 Apr 2021 19:04:41 +0500 [thread overview]
Message-ID: <772123d6be10ec8d299a605029ef95003a1513ec.camel@gmail.com> (raw)
In-Reply-To: <606f39c2c377f_1aed562adb26462f5449492@prd-scan-dashboard-0.mail>
On Thu, 2021-04-08 at 17:13 +0000, scan-admin@coverity.com wrote:
> ** CID 1503714: (DEADCODE)
> /drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: 367 in wpa_set_auth_algs()
> /drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: 357 in wpa_set_auth_algs()
>
>
> ________________________________________________________________________________________________________
> *** CID 1503714: (DEADCODE)
> /drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: 367 in wpa_set_auth_algs()
> 361 padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
> 362
> 363 padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeShared;
> 364 padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Shared;
> 365 } else if (value & WLAN_AUTH_OPEN) {
> 366 /* padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; */
> > > > CID 1503714: (DEADCODE)
> > > > Execution cannot reach this statement: "if (padapter->securitypriv....".
> 367 if (padapter->securitypriv.ndisauthtype < Ndis802_11AuthModeWPAPSK) {
> 368 padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen;
> 369 padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
> 370 }
> 371 } else {
> 372 ret = -EINVAL;
> /drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: 357 in wpa_set_auth_algs()
> 351 static int wpa_set_auth_algs(struct net_device *dev, u32 value)
> 352 {
> 353 struct adapter *padapter = rtw_netdev_priv(dev);
> 354 int ret = 0;
> 355
> 356 if ((value & WLAN_AUTH_SHARED_KEY) && (value & WLAN_AUTH_OPEN)) {
The value of WLAN_AUTH_OPEN macro is 0 and it is being treated as if
is a bit number. Two conditions in this function never execute. It
seems like a crucial bug. Anyone looking into it?
> > > > CID 1503714: (DEADCODE)
> > > > Execution cannot reach this statement: "padapter->securitypriv.ndis...".
> 357 padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
> 358 padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeAutoSwitch;
> 359 padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_Auto;
> 360 } else if (value & WLAN_AUTH_SHARED_KEY) {
> 361 padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
> 362
>
> ** CID 1487894: Null pointer dereferences (FORWARD_NULL)
> /net/ipv6/route.c: 5209 in ip6_route_multipath_add()
next parent reply other threads:[~2021-04-09 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <606f39c2c377f_1aed562adb26462f5449492@prd-scan-dashboard-0.mail>
2021-04-09 14:04 ` Muhammad Usama Anjum [this message]
[not found] <60c8c255db7df_c93642aabada739a0965bf@prd-scan-dashboard-0.mail>
2021-06-17 0:22 ` New Defects reported by Coverity Scan for linux-next weekly scan Darrick J. Wong
[not found] <628e23acb5243_17eb1f2acf4460f9a8777f8@prd-scan-dashboard-0.mail>
[not found] ` <CAH2r5mtR7kRcCw=iUo+PGg8G=r-1EkdnP=in_DneEWG+HxYAsg@mail.gmail.com>
2022-05-26 5:00 ` Steve French
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=772123d6be10ec8d299a605029ef95003a1513ec.camel@gmail.com \
--to=musamaanjum@gmail.com \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scan-admin@coverity.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.