OSDN Git Service

nl80211: Check for the required netlink attribute presence
authorHao Chen <flank3rsky@gmail.com>
Wed, 3 Jan 2018 03:00:31 +0000 (11:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Mar 2018 09:24:34 +0000 (10:24 +0100)
commitc38bd3a9fe11720425771392edc0370cd0db0049
treebde477606b2d796681dfb0f07b8010bd67de3216
parentd66a35c2a1fa519467e9406be41451e997bbd2d1
nl80211: Check for the required netlink attribute presence

[ Upstream commit 3ea15452ee85754f70f3b9fa1f23165ef2e77ba7 ]

nl80211_nan_add_func() does not check if the required attribute
NL80211_NAN_FUNC_FOLLOW_UP_DEST is present when processing
NL80211_CMD_ADD_NAN_FUNCTION request. This request can be issued
by users with CAP_NET_ADMIN privilege and may result in NULL dereference
and a system crash. Add a check for the required attribute presence.

Signed-off-by: Hao Chen <flank3rsky@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/nl80211.c