lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <09d934d5-b5a3-4a6d-a565-e3f70e7a9d55@oracle.com>
Date: Fri, 17 May 2024 20:14:46 +0530
From: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To: srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Zhang Rui <rui.zhang@...el.com>, platform-driver-x86@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc: dan.carpenter@...aro.org, kernel-janitors@...r.kernel.org,
        error27@...il.com
Subject: Re: [PATCH] platform/x86: ISST: fix use-after-free in
 tpmi_sst_dev_remove()

On 17/05/24 20:03, srinivas pandruvada wrote:
> On Fri, 2024-05-17 at 07:31 -0700, srinivas pandruvada wrote:
>> On Tue, 2024-05-14 at 02:26 -0700, Harshit Mogalapalli wrote:
>>> In tpmi_sst_dev_remove(), tpmi_sst is dereferenced after being
>>> freed.
>>> Fix this by reordering the kfree() post the dereference.
>>>
>>> Fixes: 9d1d36268f3d ("platform/x86: ISST: Support partitioned
>>> systems")
>>> Signed-off-by: Harshit Mogalapalli
>>> <harshit.m.mogalapalli@...cle.com>
>> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
>>
> I realized the line length is 127 chars in commit description.
> Please fix that and run checkpatch.pl before posting again.
> 

Thanks for the ACK.

Sorry I usually run checkpatch.pl, but somehow missed noticing the 
error. Will send it with the commit message fixup.

Thanks,
Harshit
> Thanks,
> Srinivas
> 
>>> ---
>>> This is found by smatch and only compile tested.
>>> ---
>>>   drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git
>>> a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
>>> b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
>>> index 7bac7841ff0a..7fa360073f6e 100644
>>> --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
>>> +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
>>> @@ -1610,8 +1610,8 @@ void tpmi_sst_dev_remove(struct
>>> auxiliary_device *auxdev)
>>>          tpmi_sst->partition_mask_current &= ~BIT(plat_info-
>>>> partition);
>>>          /* Free the package instance when the all partitions are
>>> removed */
>>>          if (!tpmi_sst->partition_mask_current) {
>>> -               kfree(tpmi_sst);
>>>                  isst_common.sst_inst[tpmi_sst->package_id] = NULL;
>>> +               kfree(tpmi_sst);
>>>          }
>>>          mutex_unlock(&isst_tpmi_dev_lock);
>>>   }
>>
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ