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  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]
Date:   Sun, 31 May 2020 18:42:59 +0800 (GMT+08:00)
From:   dinghao.liu@....edu.cn
To:     "Markus Elfring" <Markus.Elfring@....de>
Cc:     dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Ben Skeggs" <bskeggs@...hat.com>,
        "David Airlie" <airlied@...ux.ie>, "Kangjie Lu" <kjlu@....edu>
Subject: Re: Re: drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()

> > If gk20a_clk_ctor() never returns such an error code,
> > we may need not to release this clock object.
> 
> Would you like to achieve complete exception handling
> also for this function implementation?
> 

It seems that it's possible to get -ENOMEM from gk20a_clk_ctor().
The call chain is as follows:
gk20a_clk_ctor() <- nvkm_clk_ctor() <- nvkm_notify_init()

When nvkm_notify_init() returns -ENOMEM, all of its callers (and 
callers of callers) will be influenced if there is a failed
kzalloc inside which. 

In this case, maybe we should check the return value of 
gk20a_clk_ctor() and release clk if it returns -ENOMEM. 
And many other functions also have the same issue (e.g.,
gm20b_clk_new_speedo0). Do you have any idea about this 
problem?

Regards,
Dinghao

Powered by blists - more mailing lists