acrn-kernel/sound/core/seq
Kees Cook 05530ef7cf 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>
2022-11-19 09:20:11 +01:00
..
oss ALSA: seq: oss: Fix data-race for max_midi_devs access 2022-08-23 17:00:12 +02:00
Kconfig
Makefile
seq.c
seq_clientmgr.c ALSA: seq: Fix data-race at module auto-loading 2022-08-24 07:59:06 +02:00
seq_clientmgr.h
seq_compat.c
seq_dummy.c ALSA: seq: Fix comments of wrong client number for MIDI Passthrough 2021-07-27 12:53:00 +02:00
seq_fifo.c ALSA: seq: Fix assignment in if condition 2021-06-09 17:30:26 +02:00
seq_fifo.h
seq_info.c
seq_info.h
seq_lock.c
seq_lock.h
seq_memory.c ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event 2022-11-19 09:20:11 +01:00
seq_memory.h
seq_midi.c ALSA: seq: Fix assignment in if condition 2021-06-09 17:30:26 +02:00
seq_midi_emul.c ALSA: Use fallthrough pseudo-keyword 2020-07-09 13:01:29 +02:00
seq_midi_event.c
seq_ports.c ALSA: seq: replace ternary operator with max() 2022-05-17 08:49:42 +02:00
seq_ports.h
seq_prioq.c
seq_prioq.h
seq_queue.c ALSA: seq: Set upper limit of processed events 2021-12-07 17:52:28 +01:00
seq_queue.h ALSA: seq: Use bool for snd_seq_queue internal flags 2020-12-06 09:35:53 +01:00
seq_system.c
seq_system.h
seq_timer.c ALSA: seq: Fix race of snd_seq_timer_open() 2021-06-10 17:21:30 +02:00
seq_timer.h ALSA: seq: Fix concurrent access to queue current tick/time 2020-02-14 15:53:09 +01:00
seq_virmidi.c ALSA: seq: virmidi: Add a drain operation 2022-01-06 16:08:07 +01:00