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]
Date:   Fri, 24 Aug 2018 14:53:56 +0000
From:   Roy Pledge <roy.pledge@....com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Leo Li <leoyang.li@....com>
CC:     "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] soc: fsl: qbman: qman: avoid allocating from non
 existing gen_pool

On 8/23/2018 5:36 PM, Alexandre Belloni wrote:
> If the qman driver didn't probe, calling qman_alloc_fqid_range,
> qman_alloc_pool_range or qman_alloc_cgrid_range (as done in dpaa_eth) will
> pass a NULL pointer to gen_pool_alloc, leading to a NULL pointer
> dereference.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>
> ---
>  drivers/soc/fsl/qbman/qman.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
> index ecb22749df0b..8cc015183043 100644
> --- a/drivers/soc/fsl/qbman/qman.c
> +++ b/drivers/soc/fsl/qbman/qman.c
> @@ -2729,6 +2729,9 @@ static int qman_alloc_range(struct gen_pool *p, u32 *result, u32 cnt)
>  {
>  	unsigned long addr;
>  
> +	if (!p)
> +		return -ENODEV;
> +
>  	addr = gen_pool_alloc(p, cnt);
>  	if (!addr)
>  		return -ENOMEM;

Reviewed-by: Roy Pledge <roy.pledge@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ