diff options
author | 2023-10-10 20:20:01 +0530 | |
---|---|---|
committer | 2023-10-12 16:40:09 +0300 | |
commit | d9f421da6b9287000f8253628d54cf89b0c14da5 (patch) | |
tree | b4eb58c21dff4e5dc37f82cc3500688b1670c811 /drivers/platform/x86/wmi.c | |
parent | platform/x86: asus-wireless: Replace open coded acpi_match_acpi_device() (diff) | |
download | wireguard-linux-d9f421da6b9287000f8253628d54cf89b0c14da5.tar.xz wireguard-linux-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 'drivers/platform/x86/wmi.c')
0 files changed, 0 insertions, 0 deletions