Project

General

Profile

Actions

Bug #15044

closed

SMB should return NT_STATUS_FS_DRIVER_REQUIRED for DFS ioctls when DFS is not supported

Added by Toomas Soome 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
smb - SMB server and client
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
racktop:BSR-10239

Description

Per MS-SMB2 (the SMB spec) if DFS is not supported, the correct return code is NT_STATUS_FS_DRIVER_REQUIRED.
We instead return NT_STATUS_INVALID_DEVICE_REQUEST, which appears to cause some Windows versions to keep trying this request.

While we normally do not disable DFS support, the ability is there, and if DFS is disabled we want it to return the correct error code.


Related issues

Related to illumos gate - Feature #15045: SMB should implement FSCTL_DFS_GET_REFERRALS_EXClosedToomas Soome

Actions
Actions #1

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 2419
Actions #2

Updated by Gordon Ross about 2 months ago

I found a way to get Windows 10 to issue DfsGetReferralsEx with tips from:
https://specifications486.rssing.com/chan-58023329/latest.php
Contrary to the suggestions in BSR-8491 and what MS-SMB2 says about FSCTL codes,
Windows 10 is uhappy with a return code of NT_STATUS_INVALID_DEVICE_REQUEST
for a "DfsGetReferrals" FSCTL, repeating the ioctl call several times and then failing.
Using NT_STATUS_DRIVER_REQUIRED for unknown DFS Ctl codes seems to work.

Actually, the test method described in #15045 should work and is much easier than the above.
Run that test with DFS disabled, look with wireshark. Enable DFS, repeat.

Actions #3

Updated by Gordon Ross about 2 months ago

  • Description updated (diff)
Actions #4

Updated by Gordon Ross about 2 months ago

  • Related to Feature #15045: SMB should implement FSCTL_DFS_GET_REFERRALS_EX added
Actions #5

Updated by Toomas Soome about 2 months ago

  • Status changed from In Progress to Pending RTI
Actions #6

Updated by Electric Monk about 2 months ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit a44ccde211b3554142d11535037f8ef996519c3b

commit  a44ccde211b3554142d11535037f8ef996519c3b
Author: Gordon Ross <gwr@racktopsystems.com>
Date:   2022-10-14T19:56:00.000Z

    15044 SMB should return NT_STATUS_FS_DRIVER_REQUIRED for DFS ioctls when DFS is not supported
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Albert Lee <alee@racktopsystems.com>
    Reviewed-by: Jerry Jelinek <gjelinek@racktopsystems.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
    Reviewed by: Matt Barden <mbarden@tintri.com>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF