diff options
author | Kees Cook <keescook@chromium.org> | 2022-11-19 02:23:50 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-11-19 11:20:11 +0300 |
commit | 05530ef7cf7c7d700f6753f058999b1b5099a026 (patch) | |
tree | b4f0e3f1dbc81ac8fc2c224eaf33a3596a759caa /sound/soc/sunxi/Makefile | |
parent | 1abfd71ee8f3ed99c5d0df5d9843a360541d6808 (diff) | |
download | linux-05530ef7cf7c7d700f6753f058999b1b5099a026.tar.xz |
ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),
indirect call targets are validated against the expected function
pointer prototype to make sure the call target is valid to help mitigate
ROP attacks. If they are not identical, there is a failure at run time,
which manifests as either a kernel panic or thread getting killed.
seq_copy_in_user() and seq_copy_in_kernel() did not have prototypes
matching snd_seq_dump_func_t. Adjust this and remove the casts. There
are not resulting binary output differences.
This was found as a result of Clang's new -Wcast-function-type-strict
flag, which is more sensitive than the simpler -Wcast-function-type,
which only checks for type width mismatches.
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/lkml/202211041527.HD8TLSE1-lkp@intel.com
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221118232346.never.380-kees@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/sunxi/Makefile')
0 files changed, 0 insertions, 0 deletions