From 933cd2a72fe948d782661a6efc7410d5ffaa2b00 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Wed, 18 Apr 2018 11:28:15 -0700 Subject: [PATCH] qcacld-3.0: Avoid info leak in hdd_driver_rxfilter_comand_handler In hdd_driver_rxfilter_comand_handler(), when kstrtou8() fails to parse the input string, the value of an uninitialized @type local is logged. To avoid leaking stack memory, avoid logging the value of @type if the parsing fails. Change-Id: I46b21cdb138927b3edc406014450447c58a0d977 CRs-Fixed: 2221085 --- core/hdd/src/wlan_hdd_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index c019f99592..10320605ed 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -6194,7 +6194,7 @@ static int hdd_driver_rxfilter_comand_handler(uint8_t *command, value = command + 13; ret = kstrtou8(value, 10, &type); if (ret < 0) { - hdd_err("kstrtou8 failed invalid input value %d", type); + hdd_err("kstrtou8 failed invalid input value"); return -EINVAL; }