From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756716AbcECWO2 (ORCPT ); Tue, 3 May 2016 18:14:28 -0400 Received: from mail-yw0-f176.google.com ([209.85.161.176]:36791 "EHLO mail-yw0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756181AbcECWO1 (ORCPT ); Tue, 3 May 2016 18:14:27 -0400 From: Kangjie Lu X-Google-Original-From: Kangjie Lu To: johnny.kim@atmel.com Cc: austin.shin@atmel.com, chris.park@atmel.com, tony.cho@atmel.com, glen.lee@atmel.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, taesoo@gatech.edu, insu@gatech.edu, csong84@gatech.edu, Kangjie Lu Subject: [PATCH] fix infoleak in wilc_wfi_cfgoperations Date: Tue, 3 May 2016 18:17:28 -0400 Message-Id: <1462313848-7858-1-git-send-email-kjlu@gatech.edu> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "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, initialize it with memset or fill it with meaningful mac address. Signed-off-by: Kangjie Lu --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 448a5c8..44c1356 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1797,6 +1797,7 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev, wilc_get_rssi(vif, &sinfo->signal); + memset(mac, 0, ETH_ALEN); return 0; } -- 1.9.1