]> bbs.cooldavid.org Git - net-next-2.6.git/commit
mac80211: fix possible null-pointer de-reference
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 8 Oct 2010 20:27:07 +0000 (22:27 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Oct 2010 19:04:20 +0000 (15:04 -0400)
commitd12c74528e3065c90df70fbc06ec6ffd6e804738
tree623743ffa8899178b4cb4cfe7c831918f6727e74
parent7109ca5c80a0bb94378ebd7f8bb6d00edb5e6fba
mac80211: fix possible null-pointer de-reference

This patch not only fixes a null-pointer de-reference
that would be triggered by a PLINK_OPEN frame with mis-
matching/incompatible mesh configuration, but also
responds correctly to non-compatible PLINK_OPEN frames
by generating a PLINK_CLOSE with the right reason code.

The original bug was detected by smatch.
( http://repo.or.cz/w/smatch.git )

net/mac80211/mesh_plink.c +574 mesh_rx_plink_frame(168)
error: we previously assumed 'sta' could be null.

Cc: <stable@kernel.org>
Reviewed-and-Tested-by: Steve deRosier <steve@cozybit.com>
Reviewed-and-Tested-by: Javier Cardona <javier@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh_plink.c