Commit 7c8a863
cfg80211: check vendor command doit pointer before use
[ Upstream commit 4052d3d ]
In the case where a vendor command does not implement doit, and has no
flags set, doit would not be validated and a NULL pointer dereference
would occur, for example when invoking the vendor command via iw.
I encountered this while developing new vendor commands. Perhaps in
practice it is advisable to always implement doit along with dumpit,
but it seems reasonable to me to always check doit anyway, not just
when NEED_WDEV.
Signed-off-by: Julian Squires <julian@cipht.net>
Link: https://lore.kernel.org/r/20200706211353.2366470-1-julian@cipht.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 83ea637 commit 7c8a863
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12949 | 12949 | | |
12950 | 12950 | | |
12951 | 12951 | | |
12952 | | - | |
12953 | | - | |
12954 | | - | |
12955 | 12952 | | |
12956 | 12953 | | |
12957 | 12954 | | |
12958 | 12955 | | |
| 12956 | + | |
| 12957 | + | |
| 12958 | + | |
12959 | 12959 | | |
12960 | 12960 | | |
12961 | 12961 | | |
| |||
0 commit comments