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]
Message-ID: <BN3PR0301MB0897817BBE72CE6A33A1DE728E480@BN3PR0301MB0897.namprd03.prod.outlook.com>
Date:   Mon, 11 Mar 2019 07:30:31 +0000
From:   "Hennerich, Michael" <Michael.Hennerich@...log.com>
To:     Kangjie Lu <kjlu@....edu>
CC:     "pakki001@....edu" <pakki001@....edu>,
        Alexander Aring <alex.aring@...il.com>,
        Stefan Schmidt <stefan@...enfreihafen.org>,
        "David S. Miller" <davem@...emloft.net>,
        "linux-wpan@...r.kernel.org" <linux-wpan@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net: ieee802154: fix a potential NULL pointer dereference



> -----Original Message-----
> From: Kangjie Lu [mailto:kjlu@....edu]
> Sent: Montag, 11. März 2019 08:25
> To: kjlu@....edu
> Cc: pakki001@....edu; Hennerich, Michael <Michael.Hennerich@...log.com>; Alexander Aring <alex.aring@...il.com>; Stefan
> Schmidt <stefan@...enfreihafen.org>; David S. Miller <davem@...emloft.net>; linux-wpan@...r.kernel.org;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] net: ieee802154: fix a potential NULL pointer dereference
> 
> In case alloc_ordered_workqueue fails, the fix releases
> sources and returns -ENOMEM to avoid NULL pointer dereference.
> 
> Signed-off-by: Kangjie Lu <kjlu@....edu>

Acked-by: Michael Hennerich <michael.hennerich@...log.com>

> ---
>  drivers/net/ieee802154/adf7242.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c
> index cd1d8faccca5..cd6b95e673a5 100644
> --- a/drivers/net/ieee802154/adf7242.c
> +++ b/drivers/net/ieee802154/adf7242.c
> @@ -1268,6 +1268,10 @@ static int adf7242_probe(struct spi_device *spi)
>         INIT_DELAYED_WORK(&lp->work, adf7242_rx_cal_work);
>         lp->wqueue = alloc_ordered_workqueue(dev_name(&spi->dev),
>                                              WQ_MEM_RECLAIM);
> +       if (unlikely(!lp->wqueue)) {
> +               ret = -ENOMEM;
> +               goto err_hw_init;
> +       }
> 
>         ret = adf7242_hw_init(lp);
>         if (ret)
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ