diff options
author | Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | 2023-10-10 20:20:01 +0530 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-10-12 16:40:09 +0300 |
commit | d9f421da6b9287000f8253628d54cf89b0c14da5 (patch) | |
tree | b4eb58c21dff4e5dc37f82cc3500688b1670c811 /fs/befs | |
parent | 5a026767275ef0ba6d7aba37629d9ec638aabb7d (diff) | |
download | linux-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 'fs/befs')
0 files changed, 0 insertions, 0 deletions