Skip to content
Commit 2b3174c9 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman
Browse files

n_gsm: Use array_index_nospec() with index that comes from userspace

dc.channel used for indexing comes directly from copy_from_user(). Use
array_index_nospec() to mitigate speculative side-channel.

Link: https://lore.kernel.org/linux-serial/64306d13.ONswMlyWlVKLGkKR%25lkp@intel.com/


Cc: stable <stable@kernel.org>
Fixes: afe3154b ("tty: n_gsm: add ioctl for DLC config via ldisc handle")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarDaniel Starke <daniel.starke@siemens.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230411164532.64175-1-ilpo.jarvinen@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f91cf1a3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment