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] [thread-next>] [day] [month] [year] [list]
Message-ID: <45ae7332-074e-cb76-2674-7431fc58b886@gmail.com>
Date:   Mon, 23 May 2022 09:55:13 +0800
From:   Hangyu Hua <hbh25y@...il.com>
To:     alexander.shishkin@...ux.intel.com, mcoquelin.stm32@...il.com,
        alexandre.torgue@...s.st.com, gregkh@...uxfoundation.org,
        mathieu.poirier@...aro.org
Cc:     linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwtracing: stm: fix possible double free in
 stm_register_device()

Gentel ping.

On 2022/5/5 09:29, Hangyu Hua wrote:
> Ping
> 
> On 2022/4/18 16:16, Hangyu Hua wrote:
>> put_device() will call stm_device_release() to free stm when
>> stm_register_device() fails. So there is no need to call vfree() again.
>>
>> Fix this by adding a return after put_device().
>>
>> Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System 
>> Trace Module devices")
>> Signed-off-by: Hangyu Hua <hbh25y@...il.com>
>> ---
>>   drivers/hwtracing/stm/core.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
>> index 2712e699ba08..403b4f41bb1b 100644
>> --- a/drivers/hwtracing/stm/core.c
>> +++ b/drivers/hwtracing/stm/core.c
>> @@ -915,6 +915,7 @@ int stm_register_device(struct device *parent, 
>> struct stm_data *stm_data,
>>       /* matches device_initialize() above */
>>       put_device(&stm->dev);
>> +    return err;
>>   err_free:
>>       vfree(stm);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ