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: <1b6326fa-69b3-0ef0-2927-60f6fbd6ce28@csgroup.eu>
Date:   Mon, 9 Jan 2023 15:49:23 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Ekaterina Esina <eesina@...ralinux.ru>,
        Zhao Qiang <qiang.zhao@....com>
CC:     "lvc-project@...uxtesting.org" <lvc-project@...uxtesting.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH] net-wan: Add check for NULL for utdm in ucc_hdlc_probe



Le 23/12/2022 à 15:32, Ekaterina Esina a écrit :
> [Vous ne recevez pas souvent de courriers de eesina@...ralinux.ru. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
> 
> If uhdlc_priv_tsa != 1 then utdm is not initialized.
> And if ret != NULL then goto undo_uhdlc_init, where utdm is dereferenced.
> Same if dev == NULL.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Ekaterina Esina <eesina@...ralinux.ru>
> ---
>   drivers/net/wan/fsl_ucc_hdlc.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
> index 22edea6ca4b8..2ddb0f71e648 100644
> --- a/drivers/net/wan/fsl_ucc_hdlc.c
> +++ b/drivers/net/wan/fsl_ucc_hdlc.c
> @@ -1243,7 +1243,9 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
>   free_dev:
>          free_netdev(dev);
>   undo_uhdlc_init:
> -       iounmap(utdm->siram);
> +       if (utdm != NULL) {
> +               iounmap(utdm->siram);
> +       }

If utdm being NULL is a problem here, isn't it also a problem in the 
iounmap below ?


>   unmap_si_regs:
>          iounmap(utdm->si_regs);
>   free_utdm:
> --
> 2.30.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ