cfg80211: fix callback type mismatches in wext-compat
authorSami Tolvanen <samitolvanen@google.com>
Tue, 17 Nov 2020 20:59:02 +0000 (12:59 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 11 Dec 2020 11:50:27 +0000 (12:50 +0100)
commit32fc4a9ad56f8260025ac766548d625509cc879f
tree8312cd3fe677ba3eb1cc8223eb71dafb2bffe5a5
parentc7ed0e683ddbfb9349b6c25dbca3e1c8d76f5b87
cfg80211: fix callback type mismatches in wext-compat

Instead of casting callback functions to type iw_handler, which trips
indirect call checking with Clang's Control-Flow Integrity (CFI), add
stub functions with the correct function type for the callbacks.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201117205902.405316-1-samitolvanen@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/wext-compat.c