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: <YDJbSgqTpBpIsbVB@kroah.com>
Date:   Sun, 21 Feb 2021 14:08:26 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Atul Gopinathan <atulgopinathan@...il.com>
Cc:     tiwai@...e.de, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, gustavo@...eddedor.com
Subject: Re: [PATCH 2/2] staging: rtl8192e: Change state information from u16
 to u8

On Sat, Feb 20, 2021 at 11:51:55PM +0530, Atul Gopinathan wrote:
> The "CcxRmState" field in struct "rtllib_network" is defined
> as a u16 array of size 2 (so, 4 bytes in total).
> 
> But the operations performed on this array throughout the code
> base (in rtl8192e/) are all in byte size 2 indicating that this
> array's type was defined wrongly.
> 
> There are two situation were u16 type of this field could yield
> incorrect behaviour:
> 
> 1. In rtllib_rx.c:1970:
> memcpy(network->CcxRmState, &info_element->data[4], 2);
> 
> Here last 2 bytes (index 4 and 5) from the info_element->data[]
> array are meant to be copied into CcxRmState[].
> Note that "data" array here is an array of type u8.
> 
> 2. In function "update_network()" in staging/rtl8192e/rtllib_rx.c:
> memcpy(dst->CcxRmState, src->CcxRmState, 2);
> 
> Here again, only 2 bytes are copied from the source state to
> destination state.
> 
> There are no instances of "CcxRmState" requiring u16 data type.
> Here is the output of "grep -IRn 'CcxRmState'" on the rtl8192e/
> directory for reviewing:
> 
> rtllib_rx.c:1970:			memcpy(network->CcxRmState, &info_element->data[4], 2);
> rtllib_rx.c:1971:			if (network->CcxRmState[0] != 0)
> rtllib_rx.c:1975:			network->MBssidMask = network->CcxRmState[1] & 0x07;
> rtllib_rx.c:2520:	memcpy(dst->CcxRmState, src->CcxRmState, 2);
> rtllib.h:1108:	u8	CcxRmState[2];

You just changed the logic in line 1975 in that file, right?  Are you
_SURE_ that is ok?  Do you have a device to test this on?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ