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: <6d826865-b296-627c-3f83-e0a18263de7a@huaweicloud.com>
Date: Thu, 18 Apr 2024 17:07:54 +0800
From: Li Nan <linan666@...weicloud.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: richard@....at, miquel.raynal@...tlin.com, vigneshr@...com,
 linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linan122@...wei.com, yukuai3@...wei.com, yi.zhang@...wei.com,
 houtao1@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH v2] ubi: block: fix memleak in ubiblock_create()

Hi, dan,

在 2024/4/15 14:33, Dan Carpenter 写道:
> On Fri, Dec 08, 2023 at 03:46:29PM +0800, linan666@...weicloud.com wrote:
>> From: Li Nan <linan122@...wei.com>
>>
>> If idr_alloc() fails, dev->gd will be put after goto out_cleanup_disk in
>> ubiblock_create(), but dev->gd has not been assigned yet at this time, and
>> 'gd' will not be put anymore. Fix it by putting 'gd' directly.
>>
> 
> There is another invalid reference to dev->gd if blk_mq_alloc_tag_set()
> fails.
> 
> 	dev_err(disk_to_dev(dev->gd), "blk_mq_alloc_tag_set failed");
>                              ^^^^^^^
> 

You are really very careful! I will fix it later.

> regards,
> dan carpenter

-- 
Thanks,
Nan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ