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: <20190311091607.GC3310@redhat.com>
Date:   Mon, 11 Mar 2019 10:16:08 +0100
From:   Stanislaw Gruszka <sgruszka@...hat.com>
To:     Kangjie Lu <kjlu@....edu>
Cc:     pakki001@....edu, Kalle Valo <kvalo@...eaurora.org>,
        "David S. Miller" <davem@...emloft.net>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: iwlegacy: fix potential NULL pointer dereferences

On Mon, Mar 11, 2019 at 02:37:57AM -0500, Kangjie Lu wrote:
> In case create_singlethread_workqueue fails, the fix immediately
> return to avoid NULL pointer dereferences.
> 
> Signed-off-by: Kangjie Lu <kjlu@....edu>
> ---
>  drivers/net/wireless/intel/iwlegacy/3945-mac.c | 2 ++
>  drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> index 271977f7fbb0..d23ee2ca0c8e 100644
> --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> @@ -3403,6 +3403,8 @@ static void
>  il3945_setup_deferred_work(struct il_priv *il)
>  {
>  	il->workqueue = create_singlethread_workqueue(DRV_NAME);
> +	if (!il->workqueue)
> +		return;

This is not full fix since we will crash later without setup various
structures in il3945_setup_deferred_work. The driver is pretty
much legacy and worked for decade (or maybe more) without NULL
dereference of il->workqueue. I do not see need to fix _potential_
problems as fix can introduce more harm than good.

Stanislaw 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ