[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87a64nxsm2.wl-tiwai@suse.de>
Date: Sat, 19 Nov 2022 09:20:53 +0100
From: Takashi Iwai <tiwai@...e.de>
To: Kees Cook <keescook@...omium.org>
Cc: Jaroslav Kysela <perex@...ex.cz>,
kernel test robot <lkp@...el.com>,
Takashi Iwai <tiwai@...e.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
alsa-devel@...a-project.org, Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event
On Sat, 19 Nov 2022 00:23:50 +0100,
Kees Cook wrote:
>
> 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@...el.com>
> Link: https://lore.kernel.org/lkml/202211041527.HD8TLSE1-lkp@intel.com
> Cc: Jaroslav Kysela <perex@...ex.cz>
> Cc: Takashi Iwai <tiwai@...e.com>
> Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>
> Cc: alsa-devel@...a-project.org
> Signed-off-by: Kees Cook <keescook@...omium.org>
Thanks, applied.
Takashi
Powered by blists - more mailing lists