Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: fix the bssid in mp_start_test()

We recently moved "bssid" off the stack, and allocated it with kmalloc()
instead. Unfortunately, this one line was overlooked so it will copy
random data into the &tgt_network->network instead of the data we want.

Fixes: 0b18e5fe6008 ("staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the heap")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YJ6IrfkbdaTHgpEv@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
e2a02710 d8218b0d

+1 -1
+1 -1
drivers/staging/rtl8712/rtl871x_mp_ioctl.c
··· 197 197 /* 3 3. join pseudo AdHoc */ 198 198 tgt_network->join_res = 1; 199 199 tgt_network->aid = psta->aid = 1; 200 - memcpy(&tgt_network->network, &bssid, length); 200 + memcpy(&tgt_network->network, bssid, length); 201 201 _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); 202 202 r8712_os_indicate_connect(padapter); 203 203 /* Set to LINKED STATE for MP TRX Testing */