<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/cifs, branch v3.1</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[CIFS] Fix first time message on mount, ntlmv2 upgrade delayed to 3.2</title>
<updated>2011-10-08T01:17:56+00:00</updated>
<author>
<name>Steve French</name>
<email>sfrench@us.ibm.com</email>
</author>
<published>2011-10-07T04:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9d1e397b7bafe843564eab26ed3f682637159c6c'/>
<id>9d1e397b7bafe843564eab26ed3f682637159c6c</id>
<content type='text'>
Microsoft has a bug with ntlmv2 that requires use of ntlmssp, but
we didn't get the required information on when/how to use ntlmssp to
old (but once very popular) legacy servers (various NT4 fixpacks
for example) until too late to merge for 3.1.  Will upgrade
to NTLMv2 in NTLMSSP in 3.2

Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Microsoft has a bug with ntlmv2 that requires use of ntlmssp, but
we didn't get the required information on when/how to use ntlmssp to
old (but once very popular) legacy servers (various NT4 fixpacks
for example) until too late to merge for 3.1.  Will upgrade
to NTLMv2 in NTLMSSP in 3.2

Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cifs: Fix broken sec=ntlmv2/i sec option (try #2)</title>
<updated>2011-09-20T02:16:58+00:00</updated>
<author>
<name>Shirish Pargaonkar</name>
<email>shirishpargaonkar@gmail.com</email>
</author>
<published>2011-08-25T04:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cfbd6f84c2e26c13ded16b6bb0871edb7d75974f'/>
<id>cfbd6f84c2e26c13ded16b6bb0871edb7d75974f</id>
<content type='text'>
Fix sec=ntlmv2/i authentication option during mount of Samba shares.

cifs client was coding ntlmv2 response incorrectly.
All that is needed in temp as specified in MS-NLMP seciton 3.3.2

"Define ComputeResponse(NegFlg, ResponseKeyNT, ResponseKeyLM,
CHALLENGE_MESSAGE.ServerChallenge, ClientChallenge, Time, ServerName)

as
Set temp to ConcatenationOf(Responserversion, HiResponserversion,
Z(6), Time, ClientChallenge, Z(4), ServerName, Z(4)"

is MsvAvNbDomainName.

For sec=ntlmsspi, build_av_pair is not used, a blob is plucked from
type 2 response sent by the server to use in authentication.

I tested sec=ntlmv2/i and sec=ntlmssp/i mount options against
Samba (3.6) and Windows - XP, 2003 Server and 7.
They all worked.

Signed-off-by: Shirish Pargaonkar &lt;shirishpargaonkar@gmail.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix sec=ntlmv2/i authentication option during mount of Samba shares.

cifs client was coding ntlmv2 response incorrectly.
All that is needed in temp as specified in MS-NLMP seciton 3.3.2

"Define ComputeResponse(NegFlg, ResponseKeyNT, ResponseKeyLM,
CHALLENGE_MESSAGE.ServerChallenge, ClientChallenge, Time, ServerName)

as
Set temp to ConcatenationOf(Responserversion, HiResponserversion,
Z(6), Time, ClientChallenge, Z(4), ServerName, Z(4)"

is MsvAvNbDomainName.

For sec=ntlmsspi, build_av_pair is not used, a blob is plucked from
type 2 response sent by the server to use in authentication.

I tested sec=ntlmv2/i and sec=ntlmssp/i mount options against
Samba (3.6) and Windows - XP, 2003 Server and 7.
They all worked.

Signed-off-by: Shirish Pargaonkar &lt;shirishpargaonkar@gmail.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the conflict between rwpidforward and rw mount options</title>
<updated>2011-09-20T02:16:20+00:00</updated>
<author>
<name>Steve French</name>
<email>sfrench@us.ibm.com</email>
</author>
<published>2011-08-29T18:54:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c9c7fa0064f4afe1d040e72f24c2256dd8ac402d'/>
<id>c9c7fa0064f4afe1d040e72f24c2256dd8ac402d</id>
<content type='text'>
Both these options are started with "rw" - that's why the first one
isn't switched on even if it is specified. Fix this by adding a length
check for "rw" option check.

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Pavel Shilovsky &lt;piastry@etersoft.ru&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both these options are started with "rw" - that's why the first one
isn't switched on even if it is specified. Fix this by adding a length
check for "rw" option check.

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Pavel Shilovsky &lt;piastry@etersoft.ru&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CIFS: Fix ERR_PTR dereference in cifs_get_root</title>
<updated>2011-09-20T02:15:03+00:00</updated>
<author>
<name>Pavel Shilovsky</name>
<email>piastryyy@gmail.com</email>
</author>
<published>2011-08-21T15:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5b980b01212199833ee8023770fa4cbf1b85e9f4'/>
<id>5b980b01212199833ee8023770fa4cbf1b85e9f4</id>
<content type='text'>
move it to the beginning of the loop.

Signed-off-by: Pavel Shilovsky &lt;piastryyy@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
move it to the beginning of the loop.

Signed-off-by: Pavel Shilovsky &lt;piastryyy@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cifs: fix possible memory corruption in CIFSFindNext</title>
<updated>2011-09-20T02:14:40+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2011-08-23T11:21:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9438fabb73eb48055b58b89fc51e0bc4db22fabd'/>
<id>9438fabb73eb48055b58b89fc51e0bc4db22fabd</id>
<content type='text'>
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.

If the server sends a very large value for this, then that value could
look negative when converted to a signed int. That would make that
value pass the PATH_MAX check later in CIFSFindNext. The name_len would
then be used as a length value for a memcpy. It would then be treated
as unsigned again, and the memcpy scribbles over a ton of memory.

Fix this by making the name_len an unsigned value in CIFSFindNext.

Cc: &lt;stable@kernel.org&gt;
Reported-by: Darren Lavender &lt;dcl@hppine99.gbr.hp.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.

If the server sends a very large value for this, then that value could
look negative when converted to a signed int. That would make that
value pass the PATH_MAX check later in CIFSFindNext. The name_len would
then be used as a length value for a memcpy. It would then be treated
as unsigned again, and the memcpy scribbles over a ton of memory.

Fix this by making the name_len an unsigned value in CIFSFindNext.

Cc: &lt;stable@kernel.org&gt;
Reported-by: Darren Lavender &lt;dcl@hppine99.gbr.hp.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update cifs version to 1.75</title>
<updated>2011-08-18T16:55:10+00:00</updated>
<author>
<name>Steve French</name>
<email>sfrench@us.ibm.com</email>
</author>
<published>2011-08-18T04:44:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=04c05b4a68c0ab0d6bb41c710a646e56f62a70a3'/>
<id>04c05b4a68c0ab0d6bb41c710a646e56f62a70a3</id>
<content type='text'>
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CIFS] possible memory corruption on mount</title>
<updated>2011-08-18T16:53:02+00:00</updated>
<author>
<name>Steve French</name>
<email>sfrench@us.ibm.com</email>
</author>
<published>2011-08-18T04:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=13589c437daf4c8e429b3236c0b923de1c9420d8'/>
<id>13589c437daf4c8e429b3236c0b923de1c9420d8</id>
<content type='text'>
CIFS cleanup_volume_info_contents() looks like having a memory
corruption problem.
When UNCip is set to "&amp;vol-&gt;UNC[2]" in cifs_parse_mount_options(), it
should not be kfree()-ed in cleanup_volume_info_contents().

Introduced in commit b946845a9dc523c759cae2b6a0f6827486c3221a

Signed-off-by: J.R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
CC: Stable &lt;stable@kernel.org&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CIFS cleanup_volume_info_contents() looks like having a memory
corruption problem.
When UNCip is set to "&amp;vol-&gt;UNC[2]" in cifs_parse_mount_options(), it
should not be kfree()-ed in cleanup_volume_info_contents().

Introduced in commit b946845a9dc523c759cae2b6a0f6827486c3221a

Signed-off-by: J.R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
CC: Stable &lt;stable@kernel.org&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cifs: demote cERROR in build_path_from_dentry to cFYI</title>
<updated>2011-08-16T13:07:24+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2011-08-08T15:50:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fa71f447065f676157ba6a2c121ba419818fc559'/>
<id>fa71f447065f676157ba6a2c121ba419818fc559</id>
<content type='text'>
Running the cthon tests on a recent kernel caused this message to pop
occasionally:

    CIFS VFS: did not end path lookup where expected namelen is 0

Some added debugging showed that namelen and dfsplen were both 0 when
this occurred. That means that the read_seqretry returned true.

Assuming that the comment inside the if statement is true, this should
be harmless and just means that we raced with a rename. If that is the
case, then there's no need for alarm and we can demote this to cFYI.

While we're at it, print the dfsplen too so that we can see what
happened here if the message pops during debugging.

Cc: stable@kernel.org
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Running the cthon tests on a recent kernel caused this message to pop
occasionally:

    CIFS VFS: did not end path lookup where expected namelen is 0

Some added debugging showed that namelen and dfsplen were both 0 when
this occurred. That means that the read_seqretry returned true.

Assuming that the comment inside the if statement is true, this should
be harmless and just means that we raced with a rename. If that is the
case, then there's no need for alarm and we can demote this to cFYI.

While we're at it, print the dfsplen too so that we can see what
happened here if the message pops during debugging.

Cc: stable@kernel.org
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cifs: Do not set cifs/ntfs acl using a file handle (try #4)</title>
<updated>2011-08-11T18:23:45+00:00</updated>
<author>
<name>Shirish Pargaonkar</name>
<email>shirishpargaonkar@gmail.com</email>
</author>
<published>2011-08-09T19:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e22906c564c2f9c73ee4621ef3b93fe374539f00'/>
<id>e22906c564c2f9c73ee4621ef3b93fe374539f00</id>
<content type='text'>
Set security descriptor using path name instead of a file handle.
We can't be sure that the file handle has adequate permission to
set a security descriptor (to modify DACL).

Function set_cifs_acl_by_fid() has been removed since we can't be
sure how a file was opened for writing, a valid request can fail
if the file was not opened with two above mentioned permissions.
We could have opted to add on WRITE_DAC and WRITE_OWNER permissions
to file opens and then use that file handle but adding addtional
permissions such as WRITE_DAC and WRITE_OWNER could cause an
any open to fail.

And it was incorrect to look for read file handle to set a
security descriptor anyway.

Signed-off-by: Shirish Pargaonkar &lt;shirishpargaonkar@gmail.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set security descriptor using path name instead of a file handle.
We can't be sure that the file handle has adequate permission to
set a security descriptor (to modify DACL).

Function set_cifs_acl_by_fid() has been removed since we can't be
sure how a file was opened for writing, a valid request can fail
if the file was not opened with two above mentioned permissions.
We could have opted to add on WRITE_DAC and WRITE_OWNER permissions
to file opens and then use that file handle but adding addtional
permissions such as WRITE_DAC and WRITE_OWNER could cause an
any open to fail.

And it was incorrect to look for read file handle to set a
security descriptor anyway.

Signed-off-by: Shirish Pargaonkar &lt;shirishpargaonkar@gmail.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[CIFS] Cleanup use of CONFIG_CIFS_STATS2 ifdef to make transport routines more readable</title>
<updated>2011-08-11T18:23:45+00:00</updated>
<author>
<name>Steve French</name>
<email>sfrench@us.ibm.com</email>
</author>
<published>2011-08-09T18:44:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=789e66612367f9975d704c9e4990025cbbbb45ec'/>
<id>789e66612367f9975d704c9e4990025cbbbb45ec</id>
<content type='text'>
Christoph had requested that the stats related code (in
CONFIG_CIFS_STATS2) be moved into helpers to make code flow more
readable.   This patch should help.   For example the following
section from transport.c

                       spin_unlock(&amp;GlobalMid_Lock);
                       atomic_inc(&amp;ses-&gt;server-&gt;num_waiters);
                       wait_event(ses-&gt;server-&gt;request_q,
                                  atomic_read(&amp;ses-&gt;server-&gt;inFlight)
                                    &lt; cifs_max_pending);
                       atomic_dec(&amp;ses-&gt;server-&gt;num_waiters);
                       spin_lock(&amp;GlobalMid_Lock);

becomes simpler (with the patch below):
                       spin_unlock(&amp;GlobalMid_Lock);
                       cifs_num_waiters_inc(server);
                       wait_event(server-&gt;request_q,
                                  atomic_read(&amp;server-&gt;inFlight)
                                    &lt; cifs_max_pending);
                       cifs_num_waiters_dec(server);
                       spin_lock(&amp;GlobalMid_Lock);

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
CC: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
Reviewed-by: Pavel Shilovsky &lt;piastry@etersoft.ru&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Christoph had requested that the stats related code (in
CONFIG_CIFS_STATS2) be moved into helpers to make code flow more
readable.   This patch should help.   For example the following
section from transport.c

                       spin_unlock(&amp;GlobalMid_Lock);
                       atomic_inc(&amp;ses-&gt;server-&gt;num_waiters);
                       wait_event(ses-&gt;server-&gt;request_q,
                                  atomic_read(&amp;ses-&gt;server-&gt;inFlight)
                                    &lt; cifs_max_pending);
                       atomic_dec(&amp;ses-&gt;server-&gt;num_waiters);
                       spin_lock(&amp;GlobalMid_Lock);

becomes simpler (with the patch below):
                       spin_unlock(&amp;GlobalMid_Lock);
                       cifs_num_waiters_inc(server);
                       wait_event(server-&gt;request_q,
                                  atomic_read(&amp;server-&gt;inFlight)
                                    &lt; cifs_max_pending);
                       cifs_num_waiters_dec(server);
                       spin_lock(&amp;GlobalMid_Lock);

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
CC: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
Reviewed-by: Pavel Shilovsky &lt;piastry@etersoft.ru&gt;
</pre>
</div>
</content>
</entry>
</feed>
