linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ksmbd: Unsupported addition info
@ 2021-11-16 21:44 Oleksandr Natalenko
  2021-11-16 23:03 ` Marios Makassikis
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Oleksandr Natalenko @ 2021-11-16 21:44 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, linux-cifs, linux-kernel

Hello Namjae et al.

With the latest ksmbd from the next branch I have an issue with wife's Windows 
10 laptop while copying/removing files from the network share. On her client it 
looks like copy operation (server -> laptop) reaches 99% and then stalls, and 
on the server side there's this in the kernel log:

```
ksmbd: Unsupported addition info: 0xf)
ksmbd: Unsupported addition info: 0x20)
```

repeated multiple times. I must note that in fact the file gets copied to her 
laptop, but Windows copy dialog just hangs.

Any idea what it could be and how to avoid it? This also happened before (I'm 
a pretty early ksmbd adopter), but I'm reporting it just now because I naïvely 
hoped it would be fixed automagically :). This never happened to me with 
userspace Samba though.

This is my smb.conf:

```
[global]
workgroup = KANAPKA
server string = ksmbd server %v
netbios name = defiant
valid users = __guest

[Shared]
valid users = __guest
path = /mnt/shared
force user = _shared
force group = _shared
browsable = no
writeable = yes
veto files = /lost+found/
```

Appreciate your time and looking forward to your response.

Thanks.

-- 
Oleksandr Natalenko (post-factum)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-16 21:44 ksmbd: Unsupported addition info Oleksandr Natalenko
@ 2021-11-16 23:03 ` Marios Makassikis
  2021-11-16 23:23   ` Oleksandr Natalenko
  2021-11-16 23:36 ` Namjae Jeon
       [not found] ` <CAKYAXd_mf9DFQsyzvow=VC6o4xDOn_nncJeo_7gOyG77WfCNqw@mail.gmail.com>
  2 siblings, 1 reply; 10+ messages in thread
From: Marios Makassikis @ 2021-11-16 23:03 UTC (permalink / raw)
  To: Oleksandr Natalenko
  Cc: Namjae Jeon, Sergey Senozhatsky, Steve French, Hyunchul Lee,
	CIFS, linux-kernel

On Tue, Nov 16, 2021 at 10:44 PM Oleksandr Natalenko
<oleksandr@natalenko.name> wrote:
>
> Hello Namjae et al.
>
> With the latest ksmbd from the next branch I have an issue with wife's Windows
> 10 laptop while copying/removing files from the network share. On her client it
> looks like copy operation (server -> laptop) reaches 99% and then stalls, and
> on the server side there's this in the kernel log:
>
> ```
> ksmbd: Unsupported addition info: 0xf)
> ksmbd: Unsupported addition info: 0x20)
> ```
>
> repeated multiple times. I must note that in fact the file gets copied to her
> laptop, but Windows copy dialog just hangs.
>
> Any idea what it could be and how to avoid it? This also happened before (I'm
> a pretty early ksmbd adopter), but I'm reporting it just now because I naïvely
> hoped it would be fixed automagically :). This never happened to me with
> userspace Samba though.
>
> This is my smb.conf:
>
> ```
> [global]
> workgroup = KANAPKA
> server string = ksmbd server %v
> netbios name = defiant
> valid users = __guest
>
> [Shared]
> valid users = __guest
> path = /mnt/shared
> force user = _shared
> force group = _shared
> browsable = no
> writeable = yes
> veto files = /lost+found/
> ```
>
> Appreciate your time and looking forward to your response.
>
> Thanks.
>

Hello,

This sounds like an issue reported on github a couple of months ago [1].

Can you specify the exact Windows version (+ edition) ?

Are you accessing the share through a network-mapped drive ? If not,
can you try to reproduce it ?

Does this happen with files of any type ? IIRC, the "Unsupported addition info"
message you're seeing is related to Windows requesting some attributes
that are not handled yet by ksmbd. It seems it was added to fix
windows 10 clients
after ACLs support was added [2]. Makes me wonder if Windows doesn't like the
fake response it is getting when it's trying to read the SACLs.

https://github.com/cifsd-team/ksmbd-tools/issues/208
https://github.com/namjaejeon/ksmbd/commit/cb9167856ffca6483

> --
> Oleksandr Natalenko (post-factum)
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-16 23:03 ` Marios Makassikis
@ 2021-11-16 23:23   ` Oleksandr Natalenko
  0 siblings, 0 replies; 10+ messages in thread
From: Oleksandr Natalenko @ 2021-11-16 23:23 UTC (permalink / raw)
  To: Marios Makassikis
  Cc: Namjae Jeon, Sergey Senozhatsky, Steve French, Hyunchul Lee,
	CIFS, linux-kernel

Hello.

Thanks for your response. Please find my answers inline.

On středa 17. listopadu 2021 0:03:34 CET Marios Makassikis wrote:
> On Tue, Nov 16, 2021 at 10:44 PM Oleksandr Natalenko
> 
> <oleksandr@natalenko.name> wrote:
> > Hello Namjae et al.
> > 
> > With the latest ksmbd from the next branch I have an issue with wife's
> > Windows 10 laptop while copying/removing files from the network share. On
> > her client it looks like copy operation (server -> laptop) reaches 99%
> > and then stalls, and on the server side there's this in the kernel log:
> > 
> > ```
> > ksmbd: Unsupported addition info: 0xf)
> > ksmbd: Unsupported addition info: 0x20)
> > ```
> > 
> > repeated multiple times. I must note that in fact the file gets copied to
> > her laptop, but Windows copy dialog just hangs.
> > 
> > Any idea what it could be and how to avoid it? This also happened before
> > (I'm a pretty early ksmbd adopter), but I'm reporting it just now because
> > I naïvely hoped it would be fixed automagically :). This never happened
> > to me with userspace Samba though.
> > 
> > This is my smb.conf:
> > 
> > ```
> > [global]
> > workgroup = KANAPKA
> > server string = ksmbd server %v
> > netbios name = defiant
> > valid users = __guest
> > 
> > [Shared]
> > valid users = __guest
> > path = /mnt/shared
> > force user = _shared
> > force group = _shared
> > browsable = no
> > writeable = yes
> > veto files = /lost+found/
> > ```
> > 
> > Appreciate your time and looking forward to your response.
> 
> This sounds like an issue reported on github a couple of months ago [1].
> 
> Can you specify the exact Windows version (+ edition) ?

It is Windows 10 Pro 21H1 19043.1348

> Are you accessing the share through a network-mapped drive ? If not,
> can you try to reproduce it ?

Yes, the share is "mounted" as a network-mapped drive Z:.

> Does this happen with files of any type ?

I didn't find it depending on a specific file type. Just tried a couple of fresh 
jpgs and xslx, all hung, but another pair of old jpgs went fine instantly, 
although the same message was logged in the kernel log on the server side for 
all the files.

> IIRC, the "Unsupported addition
> info" message you're seeing is related to Windows requesting some
> attributes that are not handled yet by ksmbd. It seems it was added to fix
> windows 10 clients
> after ACLs support was added [2]. Makes me wonder if Windows doesn't like
> the fake response it is getting when it's trying to read the SACLs.

Cannot comment on this since I have no idea how things work or are supposed to 
work, but I'm ready to test patches as well as ksmbd options if there are some 
suggestions.

Thanks you!

> https://github.com/cifsd-team/ksmbd-tools/issues/208
> https://github.com/namjaejeon/ksmbd/commit/cb9167856ffca6483

-- 
Oleksandr Natalenko (post-factum)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-16 21:44 ksmbd: Unsupported addition info Oleksandr Natalenko
  2021-11-16 23:03 ` Marios Makassikis
@ 2021-11-16 23:36 ` Namjae Jeon
  2021-11-17  7:00   ` Oleksandr Natalenko
       [not found] ` <CAKYAXd_mf9DFQsyzvow=VC6o4xDOn_nncJeo_7gOyG77WfCNqw@mail.gmail.com>
  2 siblings, 1 reply; 10+ messages in thread
From: Namjae Jeon @ 2021-11-16 23:36 UTC (permalink / raw)
  To: Oleksandr Natalenko
  Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, linux-cifs, linux-kernel

2021-11-17 6:44 GMT+09:00, Oleksandr Natalenko <oleksandr@natalenko.name>:
> Hello Namjae et al.
Hi Oleksandr,
>
> With the latest ksmbd from the next branch I have an issue with wife's
> Windows
> 10 laptop while copying/removing files from the network share. On her client
> it
> looks like copy operation (server -> laptop) reaches 99% and then stalls,
> and
> on the server side there's this in the kernel log:
>
> ```
> ksmbd: Unsupported addition info: 0xf)
> ksmbd: Unsupported addition info: 0x20)
> ```
>
> repeated multiple times. I must note that in fact the file gets copied to
> her
> laptop, but Windows copy dialog just hangs.
>
> Any idea what it could be and how to avoid it? This also happened before
> (I'm
> a pretty early ksmbd adopter), but I'm reporting it just now because I
> naïvely
> hoped it would be fixed automagically :). This never happened to me with
> userspace Samba though.
>
> This is my smb.conf:
>
> ```
> [global]
> workgroup = KANAPKA
> server string = ksmbd server %v
> netbios name = defiant
> valid users = __guest
>
> [Shared]
> valid users = __guest
> path = /mnt/shared
> force user = _shared
> force group = _shared
> browsable = no
> writeable = yes
> veto files = /lost+found/
> ```
>
> Appreciate your time and looking forward to your response.
Thanks for your report, I have seen same symptom before, I thought it
was a windows issue as it is also reproduced against samba. If you
wait for a few minutes, does not the 99% message window close?

Thanks!
>
> Thanks.
>
> --
> Oleksandr Natalenko (post-factum)
>
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-16 23:36 ` Namjae Jeon
@ 2021-11-17  7:00   ` Oleksandr Natalenko
  2021-11-17  9:58     ` Namjae Jeon
  0 siblings, 1 reply; 10+ messages in thread
From: Oleksandr Natalenko @ 2021-11-17  7:00 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, linux-cifs, linux-kernel

Hello.

On středa 17. listopadu 2021 0:36:53 CET Namjae Jeon wrote:
> 2021-11-17 6:44 GMT+09:00, Oleksandr Natalenko <oleksandr@natalenko.name>:
> > With the latest ksmbd from the next branch I have an issue with wife's
> > Windows
> > 10 laptop while copying/removing files from the network share. On her
> > client it
> > looks like copy operation (server -> laptop) reaches 99% and then stalls,
> > and
> > on the server side there's this in the kernel log:
> > 
> > ```
> > ksmbd: Unsupported addition info: 0xf)
> > ksmbd: Unsupported addition info: 0x20)
> > ```
> > 
> > repeated multiple times. I must note that in fact the file gets copied to
> > her
> > laptop, but Windows copy dialog just hangs.
> > 
> > Any idea what it could be and how to avoid it? This also happened before
> > (I'm
> > a pretty early ksmbd adopter), but I'm reporting it just now because I
> > naïvely
> > hoped it would be fixed automagically :). This never happened to me with
> > userspace Samba though.
> > 
> > This is my smb.conf:
> > 
> > ```
> > [global]
> > workgroup = KANAPKA
> > server string = ksmbd server %v
> > netbios name = defiant
> > valid users = __guest
> > 
> > [Shared]
> > valid users = __guest
> > path = /mnt/shared
> > force user = _shared
> > force group = _shared
> > browsable = no
> > writeable = yes
> > veto files = /lost+found/
> > ```
> > 
> > Appreciate your time and looking forward to your response.
> 
> Thanks for your report, I have seen same symptom before, I thought it
> was a windows issue as it is also reproduced against samba. If you
> wait for a few minutes, does not the 99% message window close?

Eventually it does close on its own in a minute or so. Also, it may close 
after clicking the "X" (close) button, but not instantly.

-- 
Oleksandr Natalenko (post-factum)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-17  7:00   ` Oleksandr Natalenko
@ 2021-11-17  9:58     ` Namjae Jeon
  2021-11-17 14:17       ` Oleksandr Natalenko
  2021-11-17 17:25       ` Jeremy Allison
  0 siblings, 2 replies; 10+ messages in thread
From: Namjae Jeon @ 2021-11-17  9:58 UTC (permalink / raw)
  To: Oleksandr Natalenko
  Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, linux-cifs, linux-kernel

2021-11-17 16:00 GMT+09:00, Oleksandr Natalenko <oleksandr@natalenko.name>:
> Hello.
>
> On středa 17. listopadu 2021 0:36:53 CET Namjae Jeon wrote:
>> 2021-11-17 6:44 GMT+09:00, Oleksandr Natalenko
>> <oleksandr@natalenko.name>:
>> > With the latest ksmbd from the next branch I have an issue with wife's
>> > Windows
>> > 10 laptop while copying/removing files from the network share. On her
>> > client it
>> > looks like copy operation (server -> laptop) reaches 99% and then
>> > stalls,
>> > and
>> > on the server side there's this in the kernel log:
>> >
>> > ```
>> > ksmbd: Unsupported addition info: 0xf)
>> > ksmbd: Unsupported addition info: 0x20)
>> > ```
>> >
>> > repeated multiple times. I must note that in fact the file gets copied
>> > to
>> > her
>> > laptop, but Windows copy dialog just hangs.
>> >
>> > Any idea what it could be and how to avoid it? This also happened
>> > before
>> > (I'm
>> > a pretty early ksmbd adopter), but I'm reporting it just now because I
>> > naïvely
>> > hoped it would be fixed automagically :). This never happened to me
>> > with
>> > userspace Samba though.
>> >
>> > This is my smb.conf:
>> >
>> > ```
>> > [global]
>> > workgroup = KANAPKA
>> > server string = ksmbd server %v
>> > netbios name = defiant
>> > valid users = __guest
>> >
>> > [Shared]
>> > valid users = __guest
>> > path = /mnt/shared
>> > force user = _shared
>> > force group = _shared
>> > browsable = no
>> > writeable = yes
>> > veto files = /lost+found/
>> > ```
>> >
>> > Appreciate your time and looking forward to your response.
>>
>> Thanks for your report, I have seen same symptom before, I thought it
>> was a windows issue as it is also reproduced against samba. If you
>> wait for a few minutes, does not the 99% message window close?
>
> Eventually it does close on its own in a minute or so. Also, it may close
> after clicking the "X" (close) button, but not instantly.
As I remember, The X button will delete the file you copied. Could you
please give me packet dump(tcpdump) on problem situation ? and It
would be nice to give a dump also for a successful copy. I will try to
compare the two.

Thanks!
>
> --
> Oleksandr Natalenko (post-factum)
>
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-17  9:58     ` Namjae Jeon
@ 2021-11-17 14:17       ` Oleksandr Natalenko
  2021-11-17 17:25       ` Jeremy Allison
  1 sibling, 0 replies; 10+ messages in thread
From: Oleksandr Natalenko @ 2021-11-17 14:17 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, linux-cifs, linux-kernel

Hello.

On středa 17. listopadu 2021 10:58:50 CET Namjae Jeon wrote:
> 2021-11-17 16:00 GMT+09:00, Oleksandr Natalenko <oleksandr@natalenko.name>:
> > On středa 17. listopadu 2021 0:36:53 CET Namjae Jeon wrote:
> >> 2021-11-17 6:44 GMT+09:00, Oleksandr Natalenko
> >> 
> >> <oleksandr@natalenko.name>:
> >> > With the latest ksmbd from the next branch I have an issue with wife's
> >> > Windows
> >> > 10 laptop while copying/removing files from the network share. On her
> >> > client it
> >> > looks like copy operation (server -> laptop) reaches 99% and then
> >> > stalls,
> >> > and
> >> > on the server side there's this in the kernel log:
> >> > 
> >> > ```
> >> > ksmbd: Unsupported addition info: 0xf)
> >> > ksmbd: Unsupported addition info: 0x20)
> >> > ```
> >> > 
> >> > repeated multiple times. I must note that in fact the file gets copied
> >> > to
> >> > her
> >> > laptop, but Windows copy dialog just hangs.
> >> > 
> >> > Any idea what it could be and how to avoid it? This also happened
> >> > before
> >> > (I'm
> >> > a pretty early ksmbd adopter), but I'm reporting it just now because I
> >> > naïvely
> >> > hoped it would be fixed automagically :). This never happened to me
> >> > with
> >> > userspace Samba though.
> >> > 
> >> > This is my smb.conf:
> >> > 
> >> > ```
> >> > [global]
> >> > workgroup = KANAPKA
> >> > server string = ksmbd server %v
> >> > netbios name = defiant
> >> > valid users = __guest
> >> > 
> >> > [Shared]
> >> > valid users = __guest
> >> > path = /mnt/shared
> >> > force user = _shared
> >> > force group = _shared
> >> > browsable = no
> >> > writeable = yes
> >> > veto files = /lost+found/
> >> > ```
> >> > 
> >> > Appreciate your time and looking forward to your response.
> >> 
> >> Thanks for your report, I have seen same symptom before, I thought it
> >> was a windows issue as it is also reproduced against samba. If you
> >> wait for a few minutes, does not the 99% message window close?
> > 
> > Eventually it does close on its own in a minute or so. Also, it may close
> > after clicking the "X" (close) button, but not instantly.
> 
> As I remember, The X button will delete the file you copied.

In my case the file is not deleted. So, probably, it is already copied, but 
Windows wants something extra from the share.

> Could you
> please give me packet dump(tcpdump) on problem situation ? and It
> would be nice to give a dump also for a successful copy. I will try to
> compare the two.

Sure.

OK one: [1]

Non-OK one: [2]

Thank you.

[1] https://natalenko.name/myfiles/misc/ksmbd-ok.pcap.gz
[2] https://natalenko.name/myfiles/misc/ksmbd-stalled.pcap.gz

-- 
Oleksandr Natalenko (post-factum)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-17  9:58     ` Namjae Jeon
  2021-11-17 14:17       ` Oleksandr Natalenko
@ 2021-11-17 17:25       ` Jeremy Allison
  2021-11-18  0:31         ` Namjae Jeon
  1 sibling, 1 reply; 10+ messages in thread
From: Jeremy Allison @ 2021-11-17 17:25 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: Oleksandr Natalenko, Sergey Senozhatsky, Steve French,
	Hyunchul Lee, linux-cifs, linux-kernel

On Wed, Nov 17, 2021 at 06:58:50PM +0900, Namjae Jeon wrote:
>2021-11-17 16:00 GMT+09:00, Oleksandr Natalenko <oleksandr@natalenko.name>:
>> Hello.
>>
>> On středa 17. listopadu 2021 0:36:53 CET Namjae Jeon wrote:
>>> 2021-11-17 6:44 GMT+09:00, Oleksandr Natalenko
>>> <oleksandr@natalenko.name>:
>>> > With the latest ksmbd from the next branch I have an issue with wife's
>>> > Windows
>>> > 10 laptop while copying/removing files from the network share. On her
>>> > client it
>>> > looks like copy operation (server -> laptop) reaches 99% and then
>>> > stalls,
>>> > and
>>> > on the server side there's this in the kernel log:
>>> >
>>> > ```
>>> > ksmbd: Unsupported addition info: 0xf)
>>> > ksmbd: Unsupported addition info: 0x20)

Namjae, looks like your code is handling the
following flags in query security descriptor:

         if (addition_info & ~(OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO |
                               PROTECTED_DACL_SECINFO |
                               UNPROTECTED_DACL_SECINFO)) {
                 pr_err("Unsupported addition info: 0x%x)\n",
                        addition_info);

 From the Samba code we have (the names are pretty
similar):

         /* security_descriptor->type bits */
         typedef [public,bitmap16bit] bitmap {
                 SEC_DESC_OWNER_DEFAULTED        = 0x0001,
                 SEC_DESC_GROUP_DEFAULTED        = 0x0002,
                 SEC_DESC_DACL_PRESENT           = 0x0004,
                 SEC_DESC_DACL_DEFAULTED         = 0x0008,
                 SEC_DESC_SACL_PRESENT           = 0x0010,
                 SEC_DESC_SACL_DEFAULTED         = 0x0020,
                 SEC_DESC_DACL_TRUSTED           = 0x0040,
                 SEC_DESC_SERVER_SECURITY        = 0x0080,
                 SEC_DESC_DACL_AUTO_INHERIT_REQ  = 0x0100,
                 SEC_DESC_SACL_AUTO_INHERIT_REQ  = 0x0200,
                 SEC_DESC_DACL_AUTO_INHERITED    = 0x0400,
                 SEC_DESC_SACL_AUTO_INHERITED    = 0x0800,
                 SEC_DESC_DACL_PROTECTED         = 0x1000,
                 SEC_DESC_SACL_PROTECTED         = 0x2000,
                 SEC_DESC_RM_CONTROL_VALID       = 0x4000,
                 SEC_DESC_SELF_RELATIVE          = 0x8000
         } security_descriptor_type;

0xF == (SEC_DESC_OWNER_DEFAULTED|SEC_DESC_GROUP_DEFAULTED|SEC_DESC_DACL_PRESENT|SEC_DESC_DACL_DEFAULTED)

and:

0x20 == SEC_DESC_SACL_DEFAULTED

Looks like you need to handle these bits.

Hope this helps,

Jeremy.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ksmbd: Unsupported addition info
  2021-11-17 17:25       ` Jeremy Allison
@ 2021-11-18  0:31         ` Namjae Jeon
  0 siblings, 0 replies; 10+ messages in thread
From: Namjae Jeon @ 2021-11-18  0:31 UTC (permalink / raw)
  To: Jeremy Allison
  Cc: Oleksandr Natalenko, Sergey Senozhatsky, Steve French,
	Hyunchul Lee, linux-cifs, linux-kernel

2021-11-18 2:25 GMT+09:00, Jeremy Allison <jra@samba.org>:
> On Wed, Nov 17, 2021 at 06:58:50PM +0900, Namjae Jeon wrote:
>>2021-11-17 16:00 GMT+09:00, Oleksandr Natalenko
>> <oleksandr@natalenko.name>:
>>> Hello.
>>>
>>> On středa 17. listopadu 2021 0:36:53 CET Namjae Jeon wrote:
>>>> 2021-11-17 6:44 GMT+09:00, Oleksandr Natalenko
>>>> <oleksandr@natalenko.name>:
>>>> > With the latest ksmbd from the next branch I have an issue with
>>>> > wife's
>>>> > Windows
>>>> > 10 laptop while copying/removing files from the network share. On her
>>>> > client it
>>>> > looks like copy operation (server -> laptop) reaches 99% and then
>>>> > stalls,
>>>> > and
>>>> > on the server side there's this in the kernel log:
>>>> >
>>>> > ```
>>>> > ksmbd: Unsupported addition info: 0xf)
>>>> > ksmbd: Unsupported addition info: 0x20)
>
Hi Jeremy,
> Namjae, looks like your code is handling the
> following flags in query security descriptor:
>
>          if (addition_info & ~(OWNER_SECINFO | GROUP_SECINFO | DACL_SECINFO
> |
>                                PROTECTED_DACL_SECINFO |
>                                UNPROTECTED_DACL_SECINFO)) {
>                  pr_err("Unsupported addition info: 0x%x)\n",
>                         addition_info);
>
>  From the Samba code we have (the names are pretty
> similar):
>
>          /* security_descriptor->type bits */
>          typedef [public,bitmap16bit] bitmap {
>                  SEC_DESC_OWNER_DEFAULTED        = 0x0001,
>                  SEC_DESC_GROUP_DEFAULTED        = 0x0002,
>                  SEC_DESC_DACL_PRESENT           = 0x0004,
>                  SEC_DESC_DACL_DEFAULTED         = 0x0008,
>                  SEC_DESC_SACL_PRESENT           = 0x0010,
>                  SEC_DESC_SACL_DEFAULTED         = 0x0020,
>                  SEC_DESC_DACL_TRUSTED           = 0x0040,
>                  SEC_DESC_SERVER_SECURITY        = 0x0080,
>                  SEC_DESC_DACL_AUTO_INHERIT_REQ  = 0x0100,
>                  SEC_DESC_SACL_AUTO_INHERIT_REQ  = 0x0200,
>                  SEC_DESC_DACL_AUTO_INHERITED    = 0x0400,
>                  SEC_DESC_SACL_AUTO_INHERITED    = 0x0800,
>                  SEC_DESC_DACL_PROTECTED         = 0x1000,
>                  SEC_DESC_SACL_PROTECTED         = 0x2000,
>                  SEC_DESC_RM_CONTROL_VALID       = 0x4000,
>                  SEC_DESC_SELF_RELATIVE          = 0x8000
>          } security_descriptor_type;
>
> 0xF ==
> (SEC_DESC_OWNER_DEFAULTED|SEC_DESC_GROUP_DEFAULTED|SEC_DESC_DACL_PRESENT|SEC_DESC_DACL_DEFAULTED)
>
> and:
>
> 0x20 == SEC_DESC_SACL_DEFAULTED
>
> Looks like you need to handle these bits.
>
> Hope this helps,
Let me check it. Thanks for your mail:)
>
> Jeremy.
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Test Request] Re: ksmbd: Unsupported addition info
       [not found]     ` <5892347.VCoq2IW8ci@natalenko.name>
@ 2021-11-21 11:26       ` Namjae Jeon
  0 siblings, 0 replies; 10+ messages in thread
From: Namjae Jeon @ 2021-11-21 11:26 UTC (permalink / raw)
  To: Oleksandr Natalenko
  Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, linux-cifs, linux-kernel

2021-11-21 18:11 GMT+09:00, Oleksandr Natalenko <oleksandr@natalenko.name>:
> Hello.
>
> On neděle 21. listopadu 2021 2:27:12 CET Namjae Jeon wrote:
>> I attached the patch to fix this issue.
>> You need to apply this patch to ksmbd-tools.
>>
>> Please check if your issue is fixed or not. :)
>
> I can confirm that with patched ksmbd-tools the issue is fixed. Thanks!
>
> As applicable,
>
> Reported-by: Olha Cherevyk <olha.cherevyk@gmail.com>
> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
The problem was fixed in an unexpected place. :)
I can not fix this issue without your help.
Really thank you very much!

I will add your tags to the patch.

Thanks again!
>
>> 2021-11-21 9:18 GMT+09:00, Namjae Jeon <linkinjeon@kernel.org>:
>> > I have reproduced this issue!
>> > If you change share name from "Shared" to "shared", problem is improved
>> > ?
>> > Please try it after rebooting your windows PC.
>> >
>> > 2021-11-21 8:41 GMT+09:00, Namjae Jeon <linkinjeon@kernel.org>:
>> >> I have attached one more patch.
>> >>
>> >> Please apply it on the top of previous patches :)
>> >>
>> >> 2021-11-21 8:14 GMT+09:00, Oleksandr Natalenko
>> >>
>> >> <oleksandr@natalenko.name>:
>> >>> On sobota 20. listopadu 2021 23:51:39 CET Namjae Jeon wrote:
>> >>>> Thanks for your test and help:)
>> >>>> I have attached 2 patches. you can apply them on the top of previous
>> >>>> patch. please don't revert previous patches.
>> >>>>
>> >>>> no need to send tcpdump, please just check if problem is improved or
>> >>>> not.
>> >>>
>> >>> The issue is still there after applying new 3 patches on top of old 3
>> >>> patches.
>> >>>
>> >>> Just in case, I've also collected the dump: [1].
>> >>>
>> >>> [1] https://natalenko.name/myfiles/misc/ksmbd-4.pcap.gz
>> >>>
>> >>>> 2021-11-20 23:50 GMT+09:00, Oleksandr Natalenko
>> >>>>
>> >>>> <oleksandr@natalenko.name>:
>> >>>> > On sobota 20. listopadu 2021 14:07:45 CET Namjae Jeon wrote:
>> >>>> >> I probably found why default stream is not included in response.
>> >>>> >> Please revert previous patches and apply attached patches.
>> >>>> >>
>> >>>> >> no need to check print log. if problem is still reproduced,
>> >>>> >> please
>> >>>> >> give me a tcpdump one more.
>> >>>> >
>> >>>> > Still no luck. The traffic dump is here: [1].
>> >>>> >
>> >>>> > The only difference I've noticed is that in those "Unsupported
>> >>>> > addition
>> >>>> > info"
>> >>>> > messages there's 0x20 only, and 0xf has disappeared.
>> >>>> >
>> >>>> > [1] https://natalenko.name/myfiles/misc/ksmbd-3.pcap.gz
>> >>>> >
>> >>>> >> 2021-11-20 21:46 GMT+09:00, Oleksandr Natalenko
>> >>>> >>
>> >>>> >> <oleksandr@natalenko.name>:
>> >>>> >> > On sobota 20. listopadu 2021 1:46:16 CET Namjae Jeon wrote:
>> >>>> >> >> >> >  1. ksmbd get stream info doesn't include default stream.
>> >>>> >> >>
>> >>>> >> >> ksmbd doesn't still include default stream(::DATA) in get
>> >>>> >> >> stream
>> >>>> >> >> info
>> >>>> >> >> response. very stranged..
>> >>>> >> >>
>> >>>> >> >> So I attached test patch that added print info in mail. Could
>> >>>> >> >> you
>> >>>> >> >> please check it and share print info to me ?
>> >>>> >> >
>> >>>> >> > Do I need to apply this patch only, or some previous patches
>> >>>> >> > have
>> >>>> >> > to
>> >>>> >> > be
>> >>>> >> > applied as well? If I apply this patch only, there's no extra
>> >>>> >> > info
>> >>>> >> > printed
>> >>>> >> > in
>> >>>> >> > the kernel log when I copy files from the share.
>> >>>> >> >
>> >>>> >> >> 2021-11-20 7:41 GMT+09:00, Oleksandr Natalenko
>> >>>> >> >>
>> >>>> >> >> <oleksandr@natalenko.name>:
>> >>>> >> >> > On pátek 19. listopadu 2021 11:29:35 CET Namjae Jeon wrote:
>> >>>> >> >> >> Could you please give a tcpdump me after applying attached
>> >>>> >> >> >> patch
>> >>>> >> >> >> ?
>> >>>> >> >> >
>> >>>> >> >> > It's here: [1]. The problem is still there with the patch
>> >>>> >> >> > you've
>> >>>> >> >> > sent
>> >>>> >> >> > me
>> >>>> >> >> > recently.
>> >>>> >> >> >
>> >>>> >> >> > [1] https://natalenko.name/myfiles/misc/ksmbd-2.pcap.gz
>> >>>> >> >> >
>> >>>> >> >> >> 2021-11-19 10:48 GMT+09:00, Namjae Jeon
>> >>>> >> >> >>
>> >>>> >> >> >> <linkinjeon@kernel.org>:
>> >>>> >> >> >> > Really thanks for your help!
>> >>>> >> >> >> >
>> >>>> >> >> >> > I found two difference.
>> >>>> >> >> >> >
>> >>>> >> >> >> >  1. ksmbd get stream info doesn't include default stream.
>> >>>> >> >> >> >  2. samba return access denied error if addtion_info
>> >>>> >> >> >> > contain
>> >>>> >> >> >> >
>> >>>> >> >> >> > SACL_SECINFO.
>> >>>> >> >> >> >
>> >>>> >> >> >> > Could you please check attached patch ?
>> >>>> >> >> >> >
>> >>>> >> >> >> > 2021-11-19 8:10 GMT+09:00, Oleksandr Natalenko
>> >>>> >> >> >> >
>> >>>> >> >> >> > <oleksandr@natalenko.name>:
>> >>>> >> >> >> >> On čtvrtek 18. listopadu 2021 21:00:52 CET you wrote:
>> >>>> >> >> >> >>> Thank you for your test!
>> >>>> >> >> >> >>>
>> >>>> >> >> >> >>> Could you please give me a tcpdump against samba ?
>> >>>> >> >> >> >>> I would like to find any clue at that.
>> >>>> >> >> >> >>
>> >>>> >> >> >> >> Sure [3].
>> >>>> >> >> >> >>
>> >>>> >> >> >> >> [3] https://natalenko.name/myfiles/misc/samba.pcap.gz
>> >>>> >> >> >> >>
>> >>>> >> >> >> >>> 2021-11-18 22:33 GMT+09:00, Oleksandr Natalenko
>> >>>> >> >> >> >>>
>> >>>> >> >> >> >>> <oleksandr@natalenko.name>:
>> >>>> >> >> >> >>> > On čtvrtek 18. listopadu 2021 14:26:44 CET Oleksandr
>> >>>> >> >> >> >>> > Natalenko
>> >>>> >> >> >> >>> >
>> >>>> >> >> >> >>> > wrote:
>> >>>> >> >> >> >>> >> On čtvrtek 18. listopadu 2021 13:53:53 CET Namjae
>> >>>> >> >> >> >>> >> Jeon
>> >>>> >> >> >> >>> >>
>> >>>> >> >> >> >>> >> wrote:
>> >>>> >> >> >> >>> >> > I am trying to reproduce this issue on my setup.
>> >>>> >> >> >> >>> >> > can't..
>> >>>> >> >> >> >>> >> >
>> >>>> >> >> >> >>> >> > Could you please check attached patch again ?
>> >>>> >> >> >> >>> >> > I remove AdditionalInformation flags check code
>> >>>> >> >> >> >>> >> > not
>> >>>> >> >> >> >>> >> > to
>> >>>> >> >> >> >>> >> > happen
>> >>>> >> >> >> >>> >> > "Unsupported addition info" error message.
>> >>>> >> >> >> >>> >>
>> >>>> >> >> >> >>> >> No luck, sorry, the issue is still there. The
>> >>>> >> >> >> >>> >> messages
>> >>>> >> >> >> >>> >> are
>> >>>> >> >> >> >>> >> gone
>> >>>> >> >> >> >>> >> from
>> >>>> >> >> >> >>> >> the
>> >>>> >> >> >> >>> >> kernel log on the server side though (as expected),
>> >>>> >> >> >> >>> >> but
>> >>>> >> >> >> >>> >> apparently
>> >>>> >> >> >> >>> >> those
>> >>>> >> >> >> >>> >> are
>> >>>> >> >> >> >>> >> not directly related to the issue.
>> >>>> >> >> >> >>> >
>> >>>> >> >> >> >>> > And just to be on the safe side, I've re-tested it
>> >>>> >> >> >> >>> > with
>> >>>> >> >> >> >>> > Samba,
>> >>>> >> >> >> >>> > and
>> >>>> >> >> >> >>> > with
>> >>>> >> >> >> >>> > Samba
>> >>>> >> >> >> >>> > it just works.
>> >>>> >> >> >> >>> >
>> >>>> >> >> >> >>> > For reference, my Samba config is:
>> >>>> >> >> >> >>> >
>> >>>> >> >> >> >>> > ```
>> >>>> >> >> >> >>> > [global]
>> >>>> >> >> >> >>> > workgroup = WORKGROUP
>> >>>> >> >> >> >>> > server string = Samba Server %v
>> >>>> >> >> >> >>> > netbios name = defiant
>> >>>> >> >> >> >>> > name resolve order = host
>> >>>> >> >> >> >>> > domain master = no
>> >>>> >> >> >> >>> > load printers = no
>> >>>> >> >> >> >>> > show add printer wizard = no
>> >>>> >> >> >> >>> > printing = bsd
>> >>>> >> >> >> >>> > printcap name = /dev/null
>> >>>> >> >> >> >>> > disable spoolss = yes
>> >>>> >> >> >> >>> > socket options = TCP_NODELAY SO_KEEPALIVE
>> >>>> >> >> >> >>> > valid users = __guest
>> >>>> >> >> >> >>> >
>> >>>> >> >> >> >>> > [Shared]
>> >>>> >> >> >> >>> > path = /mnt/shared
>> >>>> >> >> >> >>> > force user = _shared
>> >>>> >> >> >> >>> > force group = _shared
>> >>>> >> >> >> >>> > browsable = no
>> >>>> >> >> >> >>> > writeable = yes
>> >>>> >> >> >> >>> > veto files = /lost+found/
>> >>>> >> >> >> >>> > ```
>> >>>> >> >> >> >>> >
>> >>>> >> >> >> >>> > I fail to see any substantial difference here, so the
>> >>>> >> >> >> >>> > issue
>> >>>> >> >> >> >>> > must
>> >>>> >> >> >> >>> > be
>> >>>> >> >> >> >>> > hidden
>> >>>> >> >> >> >>> > somewhere inside ksmbd.
>> >>>> >> >> >> >>> >
>> >>>> >> >> >> >>> > I'm still open for further testing, of course!
>
> --
> Oleksandr Natalenko (post-factum)
>
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-21 11:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 21:44 ksmbd: Unsupported addition info Oleksandr Natalenko
2021-11-16 23:03 ` Marios Makassikis
2021-11-16 23:23   ` Oleksandr Natalenko
2021-11-16 23:36 ` Namjae Jeon
2021-11-17  7:00   ` Oleksandr Natalenko
2021-11-17  9:58     ` Namjae Jeon
2021-11-17 14:17       ` Oleksandr Natalenko
2021-11-17 17:25       ` Jeremy Allison
2021-11-18  0:31         ` Namjae Jeon
     [not found] ` <CAKYAXd_mf9DFQsyzvow=VC6o4xDOn_nncJeo_7gOyG77WfCNqw@mail.gmail.com>
     [not found]   ` <CAKYAXd-bi-pgFurDF3dfQ0dSZjT0KEDSWK7FtwN5V-Z+FkVgoQ@mail.gmail.com>
     [not found]     ` <5892347.VCoq2IW8ci@natalenko.name>
2021-11-21 11:26       ` [Test Request] " Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).