linux_dsm_epyc7002/drivers/net/wireless/ath
Hui Peng 39d170b3cb ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe()
The `ar_usb` field of `ath6kl_usb_pipe_usb_pipe` objects
are initialized to point to the containing `ath6kl_usb` object
according to endpoint descriptors read from the device side, as shown
below in `ath6kl_usb_setup_pipe_resources`:

for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
	endpoint = &iface_desc->endpoint[i].desc;

	// get the address from endpoint descriptor
	pipe_num = ath6kl_usb_get_logical_pipe_num(ar_usb,
						endpoint->bEndpointAddress,
						&urbcount);
	......
	// select the pipe object
	pipe = &ar_usb->pipes[pipe_num];

	// initialize the ar_usb field
	pipe->ar_usb = ar_usb;
}

The driver assumes that the addresses reported in endpoint
descriptors from device side  to be complete. If a device is
malicious and does not report complete addresses, it may trigger
NULL-ptr-deref `ath6kl_usb_alloc_urb_from_pipe` and
`ath6kl_usb_free_urb_to_pipe`.

This patch fixes the bug by preventing potential NULL-ptr-deref
(CVE-2019-15098).

Signed-off-by: Hui Peng <benquike@gmail.com>
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-09-04 09:23:26 +03:00
..
ar5523 ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
ath5k ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
ath6kl ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe() 2019-09-04 09:23:26 +03:00
ath9k ath9k: dynack: set ackto to max timeout in ath_dynack_reset 2019-09-04 09:15:31 +03:00
ath10k mac80211: pass the vif to cancel_remain_on_channel 2019-07-26 13:08:28 +02:00
carl9170 carl9170: remove set but not used variable 'udev' 2019-09-04 09:09:34 +03:00
wcn36xx wcn36xx: use dynamic allocation for large variables 2019-09-04 09:22:26 +03:00
wil6210 wil6210: Delete an unnecessary kfree() call in wil_tid_ampdu_rx_alloc() 2019-09-04 09:07:29 +03:00
ath.h
debug.c
dfs_pattern_detector.c ath: DFS JP domain W56 fixed pulse type 3 RADAR detection 2019-04-29 17:58:51 +03:00
dfs_pattern_detector.h
dfs_pri_detector.c
dfs_pri_detector.h
hw.c
Kconfig ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
key.c
main.c
Makefile ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
reg.h
regd_common.h ath: regd: add extra US coutry codes 2019-02-07 17:02:19 +02:00
regd.c
regd.h ath: drop duplicated define 2019-04-29 17:55:53 +03:00
spectral_common.h
trace.c
trace.h