]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-windows-smb-fidp-scp-race-20090212
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 12 Feb 2009 21:45:00 +0000 (21:45 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 12 Feb 2009 21:45:00 +0000 (21:45 +0000)
commit55f05917e63bbdb2fef9a0eab932177b878349b2
treecc9140655fe63e750e97b5213fe620e370126021
parentcc092d7bfe2fe0674e7ba6eb438938374ff9114e
DEVEL15-windows-smb-fidp-scp-race-20090212

LICENSE MIT
FIXES 124293

As evident in a crash dump, there is a race surrounding access to the
scp field of the smb_fid_t object.  Not all access was protected by
the smb_fid_t mx and the cm_scache_t object was not always being
reference counted within the accessing function.

This patch ensures that all initial references to the scp object
are performed under the smb_fid_t mx mutex and that the cm_scache_t
is prevented from being recycled by obtaining a local reference.

Finally, CM_ERROR_BADFD is returned as an error if a request begins
after the smb_fid_t scp field has already been cleared by a smb_CloseFID()
call as part of a concurrent request.

(cherry picked from commit 8e3b67b9537097928b4fc13844db09d429ac9bed)
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c