linux-xiaomi-chiron/drivers/net/wireless
Hui Peng 8b51dc7291 rsi: fix a double free bug in rsi_91x_deinit()
`dev` (struct rsi_91x_usbdev *) field of adapter
(struct rsi_91x_usbdev *) is allocated  and initialized in
`rsi_init_usb_interface`. If any error is detected in information
read from the device side,  `rsi_init_usb_interface` will be
freed. However, in the higher level error handling code in
`rsi_probe`, if error is detected, `rsi_91x_deinit` is called
again, in which `dev` will be freed again, resulting double free.

This patch fixes the double free by removing the free operation on
`dev` in `rsi_init_usb_interface`, because `rsi_91x_deinit` is also
used in `rsi_disconnect`, in that code path, the `dev` field is not
 (and thus needs to be) freed.

This bug was found in v4.19, but is also present in the latest version
of kernel. Fixes CVE-2019-15504.

Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Signed-off-by: Hui Peng <benquike@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-09-03 16:54:48 +03:00
..
admtek
ath
atmel
broadcom
cisco
intel iwlwifi: assign directly to iwl_trans->cfg in QuZ detection 2019-09-03 16:50:59 +03:00
intersil
marvell mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings 2019-09-03 16:50:21 +03:00
mediatek mt76: mt76x0e: disable 5GHz band for MT7630E 2019-09-03 16:49:29 +03:00
quantenna
ralink Revert "rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band" 2019-09-03 16:52:22 +03:00
realtek
rsi rsi: fix a double free bug in rsi_91x_deinit() 2019-09-03 16:54:48 +03:00
st
ti
zydas
Kconfig
mac80211_hwsim.c
mac80211_hwsim.h
Makefile
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c
virt_wifi.c
wl3501.h
wl3501_cs.c