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-next>] [day] [month] [year] [list]
Date:   Sat, 11 Jan 2020 12:57:11 +0100
From:   Marion & Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Colin King <colin.king@...onical.com>
Cc:     David Miller <davem@...emloft.net>, linux-wireless@...r.kernel.org,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Kernel Janitors <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] ath11k: avoid null pointer dereference when pointer
 band is null

Le 11/01/2020 à 10:50, linmiaohe a écrit :
> Colin Ian King<colin.king@...onical.com>  wrote:
>> From: Colin Ian King<colin.king@...onical.com>
>>
>> In the unlikely event that cap->supported_bands has neither WMI_HOST_WLAN_2G_CAP set or WMI_HOST_WLAN_5G_CAP set then pointer band is null and a null dereference occurs when assigning
>> band->n_iftype_data.  Move the assignment to the if blocks to
>> avoid this.  Cleans up static analysis warnings.
>>
>> Addresses-Coverity: ("Explicit null dereference")
>> Fixes: 9f056ed8ee01 ("ath11k: add HE support")
>> Signed-off-by: Colin Ian King<colin.king@...onical.com>
>> ---
>> drivers/net/wireless/ath/ath11k/mac.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
> It looks fine for me. Thanks.
> Reviewed-by: Miaohe Lin<linmiaohe@...wei.com>
(sorry for incomplete mail and mailing list addresses, my newsreader ate 
them, and I cannot get the list from get_maintainer.pl because my 
(outdated) tree does not have ath11k/...
I've only including the ones in memory of my mail writer.

Please forward if needed)


Hi

Shouldn't there be a

|

- band->n_iftype_data  =  count; at the end of the patch if the assignment is *moved*? Without it, 
'band' (as well as 'count') could be un-initialized, and lead to memory 
corruption. Just my 2c. CJ |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ