From patchwork Wed Aug 20 10:39:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namjae Jeon X-Patchwork-Id: 4748911 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8A4CFC0338 for ; Wed, 20 Aug 2014 10:40:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D466A2015E for ; Wed, 20 Aug 2014 10:40:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 029C320179 for ; Wed, 20 Aug 2014 10:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751926AbaHTKjn (ORCPT ); Wed, 20 Aug 2014 06:39:43 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:15200 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbaHTKjm (ORCPT ); Wed, 20 Aug 2014 06:39:42 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NAL007ZIPM59PD0@mailout1.samsung.com> for linux-cifs@vger.kernel.org; Wed, 20 Aug 2014 19:39:41 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.116]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 0B.00.19786.DEA74F35; Wed, 20 Aug 2014 19:39:41 +0900 (KST) X-AuditID: cbfee68e-b7fab6d000004d4a-c3-53f47aed107b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B6.1E.05196.DEA74F35; Wed, 20 Aug 2014 19:39:41 +0900 (KST) Received: from DONAMJAEJEO06 ([10.88.104.63]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NAL00249PM5ZJ00@mmp1.samsung.com>; Wed, 20 Aug 2014 19:39:41 +0900 (KST) From: Namjae Jeon To: 'Steve French' Cc: 'Shirish Pargaonkar' , 'Pavel Shilovsky' , linux-cifs@vger.kernel.org, Ashish Sangwan Subject: [PATCH 6/7] cifs: fix a possible use of uninit variable in SMB2_sess_setup Date: Wed, 20 Aug 2014 19:39:41 +0900 Message-id: <003901cfbc63$0cb24e70$2616eb50$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac+8Yt6QPW6h+9crQC29lYKtQDm+Ag== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRmVeSWpSXmKPExsWyRsSkRPdt1Zdgg31nZC2WTrzEbPHi/y5m i3N7WS1ezGlgtHjz4jCbA6vHzll32T3m7upj9OjbsorR4/MmuQCWKC6blNSczLLUIn27BK6M c/0z2Qp2slW83/KHsYFxCWsXIyeHhICJxOSl35ggbDGJC/fWs4HYQgJLGSUe/y3oYuQAq7nc 4tHFyAUUXsQose35BxYI5y+jRM/BG2wgRWwC2hJ/toiC9IoIqEt8Xv6XGcRmFljBKPHolwmI LSwQKtF1aQsjiM0ioCrx+cQaMJtXwFJi/9sbrBC2oMSPyfdYIHq1JNbvPM4EYctLbF7zlhni TgWJHWdfM0Ls0pPoWfAcql5EYt+Ld4wQNdvYJXp3GEDsEpD4NvkQC8QvshKbDkCNkZQ4uOIG ywRGsVlINs9CsnkWks2zkGxYwMiyilE0tSC5oDgpvchIrzgxt7g0L10vOT93EyMw0k7/e9a3 g/HmAetDjMlA6ycyS4km5wMjNa8k3tDYzMjC1MT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re6 lZKPicY5XV0haJokv2bVlhuzj9zx3/MsbUX2v2yjP/ePbP787+zab+InvTqEvKbtUs37kv7d QomlOCPRUIu5qDgRAOKxHLv7AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In case of error, goto ssetup_exit can be hit and we could end up using uninitialized value of resp_buftype Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/cifs/smb2pdu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index a40f492..ab366e5 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -531,7 +531,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, struct smb2_sess_setup_rsp *rsp = NULL; struct kvec iov[2]; int rc = 0; - int resp_buftype; + int resp_buftype = CIFS_NO_BUFFER; __le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */ struct TCP_Server_Info *server = ses->server; u16 blob_length = 0;