Re: [PATCH 2/2] platform/x86: int1092: Fix info leak in parse_package()
From: Ilpo Järvinen
Date: Tue Jul 21 2026 - 12:42:35 EST
On Mon, 13 Jul 2026, Abdun Nihaal wrote:
> Sashiko reports a possible information leak due to a non-zeroized
> memory allocation for device_mode_info. Fix that by switching to use
> devm_kcalloc() for allocation.
Hi,
Please also explain here through which path the information is leaked to
permanently record it into commit itself.
You can mostly base it on Sashiko's findings but please avoid making it
too verbose (AI tends to be overly verbose about trivialities).
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://sashiko.dev/#/patchset/20260710052806.100107-1-nihaal%40cse.iitm.ac.in
> Signed-off-by: Abdun Nihaal <nihaal@xxxxxxxxxxxxxx>
--
i.
> ---
> Newly added in v3
> ---
> drivers/platform/x86/intel/int1092/intel_sar.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/int1092/intel_sar.c b/drivers/platform/x86/intel/int1092/intel_sar.c
> index 7263114f0b3d..f506155f35d4 100644
> --- a/drivers/platform/x86/intel/int1092/intel_sar.c
> +++ b/drivers/platform/x86/intel/int1092/intel_sar.c
> @@ -91,10 +91,10 @@ static acpi_status parse_package(struct wwan_sar_context *context, union acpi_ob
> item->package.count <= data->total_dev_mode)
> return AE_ERROR;
>
> - data->device_mode_info = devm_kmalloc_array(&context->sar_device->dev,
> - data->total_dev_mode,
> - sizeof(*data->device_mode_info),
> - GFP_KERNEL);
> + data->device_mode_info = devm_kcalloc(&context->sar_device->dev,
> + data->total_dev_mode,
> + sizeof(*data->device_mode_info),
> + GFP_KERNEL);
> if (!data->device_mode_info)
> return AE_ERROR;
>
>
>