[PATCH] staging: rtl8192e: initializing the wep buffer

2019-10-17 Thread Kangjie Lu
The "wep" buffer is not initialized. To avoid memory disclosures, the fix initializes it, as peer functions like rtllib_ccmp_set_key do. Signed-off-by: Kangjie Lu --- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/stagin

[PATCH] vc04_services: vchiq_arm: fix a NULL pointer dereference

2019-03-24 Thread Kangjie Lu
When kzalloc fails, "platform_state->inited = 1" is a NULL pointer dereference. The fix returns VCHIQ_ERROR in case it failed to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 ++ 1 file changed,

[PATCH] greybus: audio_manager: fix a missing check of ida_simple_get

2019-03-13 Thread Kangjie Lu
ida_simple_get could fail. The fix inserts a check for its return value. Signed-off-by: Kangjie Lu --- drivers/staging/greybus/audio_manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/greybus/audio_manager.c b/drivers/staging/greybus/audio_manager.c index

[PATCH v2] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread Kangjie Lu
register_netdev() may fail, so let's check its return value, and if it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/staging/rtl8712/hal_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/st

[PATCH] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread Kangjie Lu
register_netdev() may fail, so let's check its return value, and if it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/staging/rtl8712/hal_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/st

[PATCH] rts5208: fix a missing check of the status of sd_init_power

2018-12-25 Thread Kangjie Lu
sd_init_power() could fail. The fix inserts a check of its status. If it fails, returns STATUS_FAIL. Signed-off-by: Kangjie Lu --- drivers/staging/rts5208/sd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c

[PATCH] rtlwifi: rtl8822b: fix a missing check of alloc_skb

2018-12-22 Thread Kangjie Lu
__netdev_alloc_skb() return NULl when it fails. skb_put() further uses it even when the allocation fails, leading to NULL pointer dereference. The fix inserts a check for the return value of __netdev_alloc_skb(). Signed-off-by: Kangjie Lu --- drivers/staging/rtlwifi/rtl8822be/fw.c | 2 ++ 1

[PATCH] rts5208: fix a missing check of ms read

2018-12-20 Thread Kangjie Lu
ode upon its failure. Signed-off-by: Kangjie Lu --- drivers/staging/rts5208/ms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c index f53adf15c685..03b359ec69e6 100644 --- a/drivers/staging/rts5208/ms.c +++ b/drivers/

[PATCH] rts5208: add a missing check for the status of command sending

2018-12-19 Thread Kangjie Lu
ms_send_cmd() may fail. The fix checks the return value of it, and if it fails, returns the error "STATUS_FAIL" upstream. Signed-off-by: Kangjie Lu --- drivers/staging/rts5208/ms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/ms.c

[PATCH] fix infoleak in wilc_wfi_cfgoperations

2016-05-03 Thread Kangjie Lu
"mac" is an array allocated in stack without being initialized, and will be sent out via "nla_put". The dump_station() is supposed to initialize the mac address; otherwise, sensitive data in kernel stack will be leaked. To fix this, copy the mac address to it. Signe