From: Michael Kerscher <michael-h4kDu0VMPndVshqcic2dkxvVK+yQ3ZXh@public.gmane.org>
To: Steve French <sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Maximilian Engelhardt
<maximilian.engelhardt-k8VSl6tcS6nF41mA0N3lWw@public.gmane.org>
Subject: incomplete FIND_FIRST2 response and resulting cifs behavior
Date: Mon, 08 Dec 2014 01:59:26 +0100 [thread overview]
Message-ID: <5484F7EE.8070309@kerscher-michael.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
Hello,
we found an issue which might be sourced in the cifs module and might
only be triggered in a special case.
Our current situation:
We run a samba-4.1.13 (debian jessie) and in our share are some files
with an iso 8859-1 encoding (e.g. test_ä_foo). There are some errors in
the samba log like
[2014/12/07 20:00:52.353146, 0]
../lib/util/charset/convert_string.c:438(convert_string_talloc_handle)
Conversion error: Illegal multibyte sequence(ä_foo)
This is an issue I will also look into but the problem is, that samba
responds to the FIND_FIRST2 request with an incomplete response. I
attached a pcap with an example which I logged on my client. The
requested directory (public/mytest) contained only a file named
test_ä_foo (in iso 8859-1 encoding) so the response contained the . and
.. directory entries and a file entry which is missing the file name
field at the end of the packet. It just stops at the num links field.
A windows client just shows an empty filename in the explorer.
If mounted on linux with cifs then I see either random characters, some
directory/file names of the parent directory (or other directories) or
ls: reading directory /mnt/tmp/public/mytest: Invalid argument
On repeated calls of ls the filename changes to some other folder names.
E.g if my directory looks like
-> public
- test_file
- test_foo
-> mytest
- test_ä_foo
then $ ls public/mytest might have the following outputs:
$ ls public/mytest
<some_random_chars>
$ ls public/mytest
test_file
$ ls public/mytest
test_file
$ ls public/mytest
test_foo
which is not what I expected (test_ä_foo)
In the attached pcap log you can see a request where there should be
included the directory entries ".", ".." and a file named "test_ä_foo".
If you need more details I'll be happy to provide them.
regards,
Michael
[-- Attachment #2: example.pcapng --]
[-- Type: application/octet-stream, Size: 784 bytes --]
reply other threads:[~2014-12-08 0:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5484F7EE.8070309@kerscher-michael.de \
--to=michael-h4kdu0vmpndvshqcic2dkxvvk+yq3zxh@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=maximilian.engelhardt-k8VSl6tcS6nF41mA0N3lWw@public.gmane.org \
--cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox