A null session leak is caused by the GetFileAttributes function on Windows XP clients

Support for Windows XP has ended

Microsoft ended support for Windows XP on April 8, 2014. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

This article was previously published under Q325929
This article has been archived. It is offered "as is" and will no longer be updated.
Microsoft Windows NT 4.0-based servers may show many null sessions when those servers are accessed by Windows XP-based clients. You can see the null sessions by typing net session at a command prompt on a Windows NT 4.0-based server.

Also, when you use Windows Explorer to delete a read-only file that is located on an IBM OS/2 Warp4-based server with the HPFS file system, the file may not be deleted and you do not receive any notification that the file-deletion process did not work. Note that this problem does not occur if you click to clear the Display delete confirmation dialog check box in the Recycle Bin Properties dialog box.

This problem may be triggered by services that are running in the Local System context on the Windows XP-based clients. The problem occurs if these services make calls to the GetFileAttributes Win32 function to obtain information about a share on a Windows NT 4.0-based server when the Windows XP-based client views the share in Windows Explorer.
When the null-sessions problem occurs, the Windows XP-based client combines a "Session Setup And X" Server Message Block (SMB) request and a "Tree Connect and X" SMB request into a single SMB request. If this combined request does not succeed, Windows XP does not test to determine which of the two requests did not succeed. Instead, Windows XP always assumes that the "Session Setup And X" request did not succeed, and that no cleanup is required.

If the "Session Setup And X" request succeeds but the "Tree Connect And X" request does not succeed (for example, when a service that is running under the Local System context tries to access a share on the Windows NT 4.0-based server), the client should send a logoff request to remove the session that was created by the "Session Setup And X" request.

Service pack information

To resolve this problem, obtain the latest service pack for Windows XP. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
322389 How to obtain the latest Windows XP service pack

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Windows XP, 32-bit original release versions
   Date         Time   Version      Size     File name   ----------------------------------------------------   16-Aug-2002  21:43  5.1.2600.56  391,936  Mrxsmb.sys
Windows XP with Service Pack 1 (SP1), 32-bit versions
   Date         Time   Version            Size    File name   --------------------------------------------------------------   22-Sep-2002  04:04  5.1.2600.1123     392,576  Mrxsmb.sys				
Windows XP Professional 64-Bit Edition (Itanium) with SP1
   Date         Time   Version            Size    File name   --------------------------------------------------------------   22-Sep-2002  06:22  5.1.2600.1123   1,236,736  Mrxsmb.sys				

This hotfix modifies Windows XP to send the two requests separately. Therefore, if the "Session Setup And X" request succeeds but the "Tree Connect And X" request does not succeed, a logoff request is sent to close the session that was created by the "Session Setup And X" request and to prevent the null-session leak.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This problem was first corrected in Windows XP Service Pack 2.

Article ID: 325929 - Last Review: 02/27/2014 21:14:10 - Revision: 3.2

Microsoft Windows XP Home Edition, Microsoft Windows XP Home Edition SP1, Microsoft Windows XP Professional, Microsoft Windows XP Professional SP1, Microsoft Windows XP Professional 64-Bit Edition (Itanium)

  • kbnosurvey kbarchive kbautohotfix kbhotfixserver kbqfe kbwinxppresp2fix kbwinxpsp2fix kbbug kbfix kbqfe KB325929