summaryrefslogtreecommitdiffstats
path: root/lib/crypto/sha1.c
diff options
context:
space:
mode:
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>2023-10-10 20:20:01 +0530
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-10-12 16:40:09 +0300
commitd9f421da6b9287000f8253628d54cf89b0c14da5 (patch)
treeb4eb58c21dff4e5dc37f82cc3500688b1670c811 /lib/crypto/sha1.c
parent5a026767275ef0ba6d7aba37629d9ec638aabb7d (diff)
downloadlinux-stable-d9f421da6b9287000f8253628d54cf89b0c14da5.tar.gz
linux-stable-d9f421da6b9287000f8253628d54cf89b0c14da5.tar.bz2
linux-stable-d9f421da6b9287000f8253628d54cf89b0c14da5.zip
platform/x86/amd/pmc: Use flex array when calling amd_pmc_stb_debugfs_open_v2()
Currently in amd_pmc_stb_debugfs_open_v2() the buffer size is assumed to be fixed and a second call to amd_pmc_stb_debugfs_open_v2() may race with a process holding open another fd. This could change "fsize" to a bigger size causing an out of bounds read. Instead create a struct with a flexarray to solve this. Suggested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20231010145003.139932-1-Shyam-sundar.S-k@amd.com [ij: renamed flex_arr -> stb_data_arr] Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'lib/crypto/sha1.c')
0 files changed, 0 insertions, 0 deletions