From patchwork Mon Oct 3 03:54:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 12997038 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7974BC433FE for ; Mon, 3 Oct 2022 03:54:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229469AbiJCDyz (ORCPT ); Sun, 2 Oct 2022 23:54:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbiJCDyx (ORCPT ); Sun, 2 Oct 2022 23:54:53 -0400 Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A9C1DFD4 for ; Sun, 2 Oct 2022 20:54:51 -0700 (PDT) Received: by mail-vs1-xe34.google.com with SMTP id x124so2027785vsb.13 for ; Sun, 02 Oct 2022 20:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=zUXLzI+Hw4Bl3+pJAmtmgzITf6zZTSbdSsLgK2BKlCI=; b=QO54OzbGrfx45lGU+N6T6CXdH4OFuEQ2SYWKZih8ClgO6Z3u0l+/81zAX9bQTtvu2p 5jbVHuhgxE+WD64FtCHtz/VsTBuX3ulgfz/wbrIFyQgDys8JVsd8WDbx/TYj29B4PBIV OfQ3G2E7RVLgYpvpMQh+zF1NDDhQqLW0N3v/CiuEMT2VyzelKHtYmOlX8ssj3C8ht9qw 6+HwODfhTIksaz1O+zV83D8vFe5LuM2eC17DvMXwahx2VsA3LCCZHcWRhWgWG2/VyG5V 9GfgmUu0M3eckLyiRtIJqeT1CeEZrzxARyrIQwlJoGci0U0qLRHkcAKkcNOAw162Y4nU BKow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=zUXLzI+Hw4Bl3+pJAmtmgzITf6zZTSbdSsLgK2BKlCI=; b=NbO1ZSVGRlQXS8YOzm+xarE/0kbHKEXL2l7LHYcYl0X7K5jeFpsc6U1N1Iv478XMnF BI9WlHPOKpjiX1fqra6oBCQxHu5RXp7L3hwUwApL7TuJza0w6IOAj8qinzzH/X3TKmXK t9mYiqzJG0qoP2bHqXBZNYTenFiEhfCJQQj7Oo6c0KxE3dHBXe5CRU/BLC+DgVRN7CQK IPW55kK6OeH/dIcrVDUI1N6M/7IZzn1avjLotsXTTLI5CvHbjXXTjZebSdTOZCCC0dWE /02TZWnRwYBGg6m4Z4RgqxbUVEtV3TTxjkd9JI5r1Tv7J9GB1njCigqiS63Sn9XU/tYA /W0w== X-Gm-Message-State: ACrzQf0vmpTnW+wNQg1qJ27wPZ62Xxd9wIxPCdI/SJphgl5blMX4oZOd QEFIGBfQelPB2G59tmtxUpJxDBdbJJht0dBiLnE= X-Google-Smtp-Source: AMsMyM7NGjE4aheecK5MJpGmv5SRy0shTOlCinCAXzO1Ed+XdY4USQVT5kOBlliQyiKyZtotFbUUjwUj3Myua7iXJvU= X-Received: by 2002:a67:f2d5:0:b0:3a6:5f77:86b5 with SMTP id a21-20020a67f2d5000000b003a65f7786b5mr1343815vsn.29.1664769290169; Sun, 02 Oct 2022 20:54:50 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Sun, 2 Oct 2022 22:54:39 -0500 Message-ID: Subject: [PATCH][smb311 client] fix oops in smb3_calc_signature To: Enzo Matsumiya , CIFS Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org shash was not being initialized in one place in smb3_calc_signature Suggested-by: Enzo Matsumiya Signed-off-by: Steve French Acked-by: Tom Talpey From 65145a4b3b4435a70c0062af5c6cf225b25e9a5f Mon Sep 17 00:00:00 2001 From: Steve French Date: Sun, 2 Oct 2022 22:09:45 -0500 Subject: [PATCH] fix oops in calculating shash_setkey shash was not being initialized in one place in smb3_calc_signature Suggested-by: Enzo Matsumiya Signed-off-by: Steve French --- fs/cifs/smb2transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c index dfcbcc0b86e4..64e12b0a5a3b 100644 --- a/fs/cifs/smb2transport.c +++ b/fs/cifs/smb2transport.c @@ -535,7 +535,7 @@ smb3_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server, unsigned char *sigptr = smb3_signature; struct kvec *iov = rqst->rq_iov; struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base; - struct shash_desc *shash; + struct shash_desc *shash = NULL; struct smb_rqst drqst; u8 key[SMB3_SIGN_KEY_SIZE]; -- 2.34.1