diff mbox

Problem with connecting to SMB server in 3.9.11 kernel.

Message ID CADT32eL4na+eduUmmWKHe5usN+S2aN+mCUQqU5j8RHaq-3ZVwQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shirish Pargaonkar Jan. 27, 2014, 6:07 a.m. UTC
Can you try this patch and see if it works?


On Sat, Jan 18, 2014 at 11:17 AM, Ben Greear <greearb@candelatech.com> wrote:
> Hello!
>
> A customer reported problems connecting our CIFS traffic generation test
> gear to their SMB server.
> We are using the 3.9.11+ kernel, and though it is patched, we do not have
> any
> patches to cifs.
>
> The OS is Fedora 14, 64-bit.
>
> A similar system on Fedora 14, with a 3.7.10+ kernel was working, but when
> we tried the 3.7.10+ kernel on the broken machine, it also failed to work.
> So, it could be the SMB server itself is having issues.  (In the 3.7.10+
> failure,
> the server just failed to respond after "Setup andX Request AUTH message",
> though we
> did get the TCP ack so it looks like the message was received by the
> server.)
>
> I'm attaching a capture taken on the SMB server.
>
> From looking at this page:
>
> http://msdn.microsoft.com/en-us/library/ff469913.aspx
>
> It appears the problem (STATUS_UNSUCCESSFUL) is:
>
> "The size of the extended attribute list is not correct. Check the
> EaErrorOffset field for the
> address of the SMB_GEA structure at which the error was detected."
>
> I did not see anything about extended attribute list in the capture, but if
> someone else
> with more knowledge could take a look and see if they notice any problems I
> would be grateful.
>
> Thanks!
> Ben
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Ben Greear Feb. 3, 2014, 5:54 p.m. UTC | #1
On 01/26/2014 10:07 PM, Shirish Pargaonkar wrote:
> Can you try this patch and see if it works?

We have verified that this works in our test systems.
We are just passing user=foo,password=bar in our
mount options, so hopefully that is sufficient to exercise this
code?

Thanks,
Ben

> diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
> index e87387d..ac14d71 100644
> --- a/fs/cifs/sess.c
> +++ b/fs/cifs/sess.c
> @@ -450,9 +450,8 @@ int build_ntlmssp_auth_blob(unsigned char *pbuffer,
>         sec_blob->WorkstationName.MaximumLength = 0;
>         tmp += 2;
> 
> -       if (((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) ||
> -               (ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_EXTENDED_SEC))
> -                       && !calc_seckey(ses)) {
> +       if ((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) &&
> +                       !calc_seckey(ses)) {
>                 memcpy(tmp, ses->ntlmssp->ciphertext, CIFS_CPHTXT_SIZE);
>                 sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - pbuffer);
>                 sec_blob->SessionKey.Length = cpu_to_le16(CIFS_CPHTXT_SIZE);
Steve French Feb. 3, 2014, 5:59 p.m. UTC | #2
username=foo is preferred

On Mon, Feb 3, 2014 at 11:54 AM, Ben Greear <greearb@candelatech.com> wrote:
> On 01/26/2014 10:07 PM, Shirish Pargaonkar wrote:
>> Can you try this patch and see if it works?
>
> We have verified that this works in our test systems.
> We are just passing user=foo,password=bar in our
> mount options, so hopefully that is sufficient to exercise this
> code?
>
> Thanks,
> Ben
>
>> diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
>> index e87387d..ac14d71 100644
>> --- a/fs/cifs/sess.c
>> +++ b/fs/cifs/sess.c
>> @@ -450,9 +450,8 @@ int build_ntlmssp_auth_blob(unsigned char *pbuffer,
>>         sec_blob->WorkstationName.MaximumLength = 0;
>>         tmp += 2;
>>
>> -       if (((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) ||
>> -               (ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_EXTENDED_SEC))
>> -                       && !calc_seckey(ses)) {
>> +       if ((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) &&
>> +                       !calc_seckey(ses)) {
>>                 memcpy(tmp, ses->ntlmssp->ciphertext, CIFS_CPHTXT_SIZE);
>>                 sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - pbuffer);
>>                 sec_blob->SessionKey.Length = cpu_to_le16(CIFS_CPHTXT_SIZE);
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shirish Pargaonkar Feb. 3, 2014, 6:51 p.m. UTC | #3
Thanks. Will post a patch on the mailing list.

Regards,

Shirish

On Mon, Feb 3, 2014 at 11:54 AM, Ben Greear <greearb@candelatech.com> wrote:
> On 01/26/2014 10:07 PM, Shirish Pargaonkar wrote:
>> Can you try this patch and see if it works?
>
> We have verified that this works in our test systems.
> We are just passing user=foo,password=bar in our
> mount options, so hopefully that is sufficient to exercise this
> code?
>
> Thanks,
> Ben
>
>> diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
>> index e87387d..ac14d71 100644
>> --- a/fs/cifs/sess.c
>> +++ b/fs/cifs/sess.c
>> @@ -450,9 +450,8 @@ int build_ntlmssp_auth_blob(unsigned char *pbuffer,
>>         sec_blob->WorkstationName.MaximumLength = 0;
>>         tmp += 2;
>>
>> -       if (((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) ||
>> -               (ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_EXTENDED_SEC))
>> -                       && !calc_seckey(ses)) {
>> +       if ((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) &&
>> +                       !calc_seckey(ses)) {
>>                 memcpy(tmp, ses->ntlmssp->ciphertext, CIFS_CPHTXT_SIZE);
>>                 sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - pbuffer);
>>                 sec_blob->SessionKey.Length = cpu_to_le16(CIFS_CPHTXT_SIZE);
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index e87387d..ac14d71 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -450,9 +450,8 @@  int build_ntlmssp_auth_blob(unsigned char *pbuffer,
        sec_blob->WorkstationName.MaximumLength = 0;
        tmp += 2;

-       if (((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) ||
-               (ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_EXTENDED_SEC))
-                       && !calc_seckey(ses)) {
+       if ((ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_KEY_XCH) &&
+                       !calc_seckey(ses)) {
                memcpy(tmp, ses->ntlmssp->ciphertext, CIFS_CPHTXT_SIZE);
                sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - pbuffer);
                sec_blob->SessionKey.Length = cpu_to_le16(CIFS_CPHTXT_SIZE);