Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3657542lfb; Mon, 9 May 2022 01:00:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIjc6xZqLPI8tqDYqjp3dv4ZPbEeZFW5Vtffj8TsRujqVcy/h/oksbtiGn5Fu92NLZYTu/ X-Received: by 2002:a63:2bc4:0:b0:3ab:1d76:64db with SMTP id r187-20020a632bc4000000b003ab1d7664dbmr11829388pgr.508.1652083213002; Mon, 09 May 2022 01:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652083212; cv=none; d=google.com; s=arc-20160816; b=Hfszn9XjAa7JYD8GC9bJBf44Kr/1MKCFs9qS5plLARXuBa/niK0Gp/S3tmW4snIIF1 KhIU15JXBFpzxIf0TUJWyi9Qq0E0Dy8K+OQvzvDtPmlXQR1/zvKOkiOqCnZLOccVsRLd mi4DxYFZF/vq2M7SQ/LtX3NWWM64LPuF5G///W5rq6fJNoNMibRlC5A0oChmmpSFVfWp pZyMvmtI3y7nNl6NeiPIGoes7fk3KUGonpWFEATftFvNKbyO54hQILVzQCCdXCJ74drn 1dLGdjrFpO0NRSh+wopz1ZCiF7CwT9rS23X1Vy8g3D2jLqy/5ZtTUBKZk3LwKuuuk4Tw 6Niw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=BaJ2h06KXXGcmCiOujWVj9YsqY+gCox03xbwF+J59pk=; b=pX/JI0U+BjwCO8M/9MtWOY/ff8NE3KXTGLtrSgwaCW17Kcnv053GfMsbSmP8uCWiaE EEjOP0xbR2V63dfgak2YYSE1jRC/pf5njVWja8wTx2YJGYWoXuaHf5AP8ll+ds0y5Kxb vagcH81JQYHx33PhxCCHzrZQdXsC7t5toYI9pr7YbWewBs1I2q35oii5kVxeTRd0bneB EZuNfqiSefT9GnHGxKxFgnxR2bYLtTwNuuWQ+apKEq6OMg+my8aFsVagJMw1Wi36CIkV MMkrQpknRraRQH5aVnCAZAFwNqYPIO+NjbzSxFQRrWJPvkGr0bT6nDhQMzXb6ZhQXYmu 2Y2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cjr.nz header.s=dkim header.b=aFCYhP+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cjr.nz Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m15-20020aa7900f000000b0050d8d2e882bsi12594885pfo.373.2022.05.09.01.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:00:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@cjr.nz header.s=dkim header.b=aFCYhP+c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cjr.nz Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B58AC11E1E4; Mon, 9 May 2022 00:50:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377463AbiEDTTZ (ORCPT + 99 others); Wed, 4 May 2022 15:19:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377580AbiEDTTC (ORCPT ); Wed, 4 May 2022 15:19:02 -0400 Received: from mx.cjr.nz (mx.cjr.nz [51.158.111.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 926B8E00; Wed, 4 May 2022 12:15:14 -0700 (PDT) Received: from authenticated-user (mx.cjr.nz [51.158.111.142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pc) by mx.cjr.nz (Postfix) with ESMTPSA id DF7CD7FC20; Wed, 4 May 2022 19:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cjr.nz; s=dkim; t=1651691712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BaJ2h06KXXGcmCiOujWVj9YsqY+gCox03xbwF+J59pk=; b=aFCYhP+cswBxx9JoRDFisVOh3HsxN4wUo/VKuW+Yng7YEN+XsdcgLKTmNIBO2zieKZbcbC mt0kau+5Iaq75X02EZvR6vd9chC4qLhNoKXDYUyOGxwMGDVE/ttee8Z5fOHcQrUFoYOUyk Ni5Tof75kkDkYAGdh4NmK0VxSy9w7stDWFugwsldDy0+WZZPJ1Q34LLxiISn45AlkzwLh6 dWFyXLllJGvufmPuaaj0GSHLzPt4y2vyii3BPkzt0BroBBOifDZ97odTm0JYe6jhPAu69E jbK8uFIqVQHjPx4DxVsyBj90LusObpkihxl9qpKI98CbKtT12A1wi1yiwlZo3w== From: Paulo Alcantara To: Steven French , Byron Stanoszek , Tom Talpey Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: CIFS regression mounting vers=1.0 NTLMSSP when hostname is too long In-Reply-To: <7dc6c729-73cd-74be-eec7-ac4a0013f60f@samba.org> References: <878rri2i6o.fsf@cjr.nz> <7dc6c729-73cd-74be-eec7-ac4a0013f60f@samba.org> Date: Wed, 04 May 2022 16:15:07 -0300 Message-ID: <87tua51550.fsf@cjr.nz> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, Steven French writes: > makes sense - do you see anything related in the NTLMSSP doc? I'll quote some relevant parts from MS-NLMP which make sense to me: 3.1.5.1.2 Client Receives a CHALLENGE_MESSAGE from the Server ... If the NTLMSSP_NEGOTIATE_VERSION flag is set by the client application, the Version field MUST be set to the current version (section 2.2.2.10), and the Workstation field MUST be set to NbMachineName. 3.2.1.1 Variables Internal to the Protocol ... NbMachineName: A string that indicates the NetBIOS machine name of the server. 2.2.2.1 AV_PAIR ... MsvAvNbComputerName: The server's NetBIOS computer name. The name MUST be in Unicode, and is not null-terminated. This type of information MUST be present in the AV_pair list. and indeed we set NTLMSSP_NEGOTIATE_VERSION in fs/cifs/sess.c:build_ntlmssp_smb3_negotiate_blob(). Unless I didn't miss anything obvious, I think we should be sending NetBIOS name or simply truncate utsname()->nodename to 16 bytes as previously proposed by Byron regardless what protocol version is being used. Tom, what is your opinion on that?