linux/drivers/staging/rtl8712
Dan Carpenter 22c971db7d staging: rtl8712: uninitialized memory in read_bbreg_hdl()
Colin King reported a bug in read_bbreg_hdl():

	memcpy(pcmd->rsp, (u8 *)&val, pcmd->rspsz);

The problem is that "val" is uninitialized.

This code is obviously not useful, but so far as I can tell
"pcmd->cmdcode" is never GEN_CMD_CODE(_Read_BBREG) so it's not harmful
either.  For now the easiest fix is to just call r8712_free_cmd_obj()
and return.

Fixes: 2865d42c78 ("staging: r8712u: Add the new driver to the mainline kernel")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-21 08:32:57 +01:00
..
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
TODO staging: refresh TODO for rtl8712 2016-03-22 22:22:13 -04:00
basic_types.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
drv_types.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
ethernet.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
hal_init.c staging: rtl8712: fix CamelCase in fw_priv struct 2018-11-07 12:35:10 +01:00
ieee80211.c staging: rtl8712: clean up various indentation and coding style issues 2019-01-15 16:08:36 +01:00
ieee80211.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
mlme_linux.c staging: rtl8712: Fix possible buffer overrun 2018-12-05 09:56:09 +01:00
mlme_osdep.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
mp_custom_oid.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
os_intfs.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
osdep_intf.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
osdep_service.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
recv_linux.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
recv_osdep.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_cmd.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_cmd.h Staging: rtl8712: fix small typo 2018-11-07 13:07:26 +01:00
rtl871x_debug.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_eeprom.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_eeprom.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_event.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_ht.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_io.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_io.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtl871x_ioctl_linux.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_ioctl_rtl.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_ioctl_rtl.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_ioctl_set.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_ioctl_set.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_led.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_mlme.c staging: rtl8712: clean up various indentation and coding style issues 2019-01-15 16:08:36 +01:00
rtl871x_mlme.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_mp.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_mp.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_mp_ioctl.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_mp_ioctl.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_mp_phy_regdef.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtl871x_pwrctrl.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_pwrctrl.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_recv.c staging: rtl8712: Fix indentation issue 2019-02-28 08:45:28 +01:00
rtl871x_recv.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtl871x_rf.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_security.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_security.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_sta_mgt.c staging: rtl8712: clean up various indentation and coding style issues 2019-01-15 16:08:36 +01:00
rtl871x_wlan_sme.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl871x_xmit.c staging: rtl8712: clean up various indentation and coding style issues 2019-01-15 16:08:36 +01:00
rtl871x_xmit.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_cmd.c staging: rtl8712: uninitialized memory in read_bbreg_hdl() 2019-03-21 08:32:57 +01:00
rtl8712_cmd.h staging: rtl8712: uninitialized memory in read_bbreg_hdl() 2019-03-21 08:32:57 +01:00
rtl8712_cmdctrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_cmdctrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_debugctrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_debugctrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_edcasetting_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_edcasetting_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_efuse.c staging: rtl8712: drop pointless static qualifier in r8712_efuse_pg_packet_write() 2019-01-22 11:32:36 +01:00
rtl8712_efuse.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtl8712_event.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_fifoctrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_fifoctrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_gp_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_gp_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_hal.h staging: rtl8712: fix CamelCase in fw_priv struct 2018-11-07 12:35:10 +01:00
rtl8712_interrupt_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_io.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_led.c staging: rtl8712: clean up various indentation and coding style issues 2019-01-15 16:08:36 +01:00
rtl8712_macsetting_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_macsetting_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_powersave_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_powersave_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_ratectrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_ratectrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_recv.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_recv.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_security_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_spec.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_syscfg_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_syscfg_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_timectrl_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_timectrl_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_wmac_bitdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_wmac_regdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_xmit.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
rtl8712_xmit.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
sta_info.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
usb_halinit.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
usb_intf.c staging: rtl8712u: Fix suspend and resume callbacks 2019-01-15 16:11:50 +01:00
usb_ops.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
usb_ops.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
usb_ops_linux.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
usb_osintf.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
wifi.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
wlan_bssdef.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
xmit_linux.c staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00
xmit_osdep.h staging: rtl8712: add SPDX identifiers 2018-10-03 11:36:09 -07:00