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]
Date:   Wed, 28 Nov 2018 14:06:51 -0800
From:   Stephen Boyd <sboyd@...nel.org>
To:     David Lechner <david@...hnology.com>,
        Nicholas Mc Guire <hofrat@...dl.org>
Cc:     Sekhar Nori <nsekhar@...com>,
        Michael Turquette <mturquette@...libre.com>,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        Nicholas Mc Guire <hofrat@...dl.org>
Subject: Re: [PATCH] clk: davinci: check for devm_kasprintf() failure

Quoting Nicholas Mc Guire (2018-11-23 09:33:28)
> devm_kasprintf() may return NULL on failure of internal allocation thus
> the assignment to  lpsc->pm_domain.name  is not safe if not checked. On 
> error davinci_lpsc_clk_register() returns a pointer to davinci_lpsc_clk
> which is checked with IS_ERR() so returning ERR_PTR(-ENOMEM) should be 
> fine here.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
> Fixes: c6ed4d734bc7 ("clk: davinci: New driver for davinci PSC clocks")
> ---
> 
> Problem located with experimental coccinelle script
> 
> Patch was compile tested with: davinci_all_defconfig
> 
> Patch is against 4.20-rc3 (localversion-next is next-20181123)

There are a bunch of other allocation issues with this driver so I'd
rather not expend the effort to review the one coccinelle script fix
here and instead I'd like to see the whole fix to this driver. Please
add proper lifetime management for all the allocations in this code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ