linux_dsm_epyc7002/drivers/net/wireless/ath/ath6kl
Jia-Ju Bai 0e7bf23e49 ath6kl: Fix a possible null-pointer dereference in ath6kl_htc_mbox_create()
In ath6kl_htc_mbox_create(), when kzalloc() on line 2855 fails,
target->dev is assigned to NULL, and ath6kl_htc_mbox_cleanup(target) is
called on line 2885.

In ath6kl_htc_mbox_cleanup(), target->dev is used on line 2895:
    ath6kl_hif_cleanup_scatter(target->dev->ar);

Thus, a null-pointer dereference may occur.

To fix this bug, kfree(target) is called and NULL is returned when
kzalloc() on line 2855 fails.

This bug is found by a static analysis tool STCheck written by us.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-09-04 09:21:19 +03:00
..
bmi.c ath6kl: replace GFP_ATOMIC with GFP_KERNEL in ath6kl_bmi_init() 2018-07-31 10:48:45 +03:00
bmi.h
cfg80211.c net: ipv4: provide __rcu annotation for ifa_list 2019-06-02 18:08:36 -07:00
cfg80211.h
common.h ath6kl: add ath6kl_ prefix to crypto_type 2018-12-13 09:58:52 +01:00
core.c ath6kl: add ability to set debug uart baud rate 2016-04-26 14:57:44 +03:00
core.h ath6kl: fix ath6kl_data_tx()'s return type 2018-04-27 14:34:32 +03:00
debug.c ath6kl: debug: Use struct_size() helper 2019-04-29 17:43:35 +03:00
debug.h ath6kl: add __printf verification to ath6kl_dbg 2017-04-13 15:43:39 +03:00
hif-ops.h
hif.c ath6kl: enable firmware crash dumps on the AR6004 2016-09-09 15:12:59 +03:00
hif.h
htc_mbox.c ath6kl: Fix a possible null-pointer dereference in ath6kl_htc_mbox_create() 2019-09-04 09:21:19 +03:00
htc_pipe.c ath6kl: remove redundant check of status != 0 2019-04-29 17:50:10 +03:00
htc-ops.h
htc.h
init.c wireless: remove unneeded semicolon 2019-02-01 14:25:41 +02:00
Kconfig ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
main.c ath6kl: Mark expected switch fall-through 2018-11-05 13:22:13 +02:00
Makefile
recovery.c timer: Remove init_timer_deferrable() in favor of timer_setup() 2017-10-05 15:01:18 +02:00
sdio.c ath6kl: add support for Dell Wireless 1537 2018-06-13 14:42:54 +03:00
target.h
testmode.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
testmode.h
trace.c
trace.h ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
txrx.c ath6kl: remove redundant variables netlen, orig_buf, orig_len, dropped and stats 2018-07-30 20:57:05 +03:00
usb.c ath6kl: constify usb_device_id 2017-08-11 16:59:01 +03:00
wmi.c ath6kl: add some bounds checking 2019-04-29 17:49:16 +03:00
wmi.h ath6kl: add ath6kl_ prefix to crypto_type 2018-12-13 09:58:52 +01:00