All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Max.Stepanov@intel.com
Cc: linux-wireless@vger.kernel.org
Subject: re: mac80211: add generic cipher scheme support
Date: Tue, 8 Jul 2014 16:43:12 +0300	[thread overview]
Message-ID: <20140708134312.GA6538@mwanda> (raw)

Hello Max Stepanov,

This is a semi-automatic email about new static checker warnings.

The patch 2475b1cc0d52: "mac80211: add generic cipher scheme support" 
from Mar 24, 2013, leads to the following Smatch complaint:

net/mac80211/rx.c:1551 ieee80211_rx_h_decrypt()
	 error: we previously assumed 'rx->sta' could be null (see line 1401)

net/mac80211/rx.c
  1400	
  1401		if (rx->sta) {
                    ^^^^^^^
Many places in this function assume that ->sta can be NULL.

  1402			int keyid = rx->sta->ptk_idx;
  1403	
  1404			if (ieee80211_has_protected(fc) && rx->sta->cipher_scheme) {
  1405				cs = rx->sta->cipher_scheme;
  1406				keyid = iwl80211_get_cs_keyid(cs, rx->skb);

[ snip ]

  1547		case WLAN_CIPHER_SUITE_AES_CMAC:
  1548			result = ieee80211_crypto_aes_cmac_decrypt(rx);
  1549			break;
  1550		default:
  1551			result = ieee80211_crypto_hw_decrypt(rx);
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But if it's NULL here then we will Oops.

  1552		}
  1553	

regards,
dan carpenter

             reply	other threads:[~2014-07-08 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 13:43 Dan Carpenter [this message]
2014-07-08 14:31 ` mac80211: add generic cipher scheme support Stepanov, Max
  -- strict thread matches above, loose matches on Subject: below --
2013-12-03 16:37 Dan Carpenter
2013-12-04 13:07 ` Stepanov, Max
2013-12-04 13:19   ` Dan Carpenter
2013-12-04 13:30     ` Stepanov, Max

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=20140708134312.GA6538@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Max.Stepanov@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /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.