lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mpspolnn1wu.fsf@suse.com>
Date:   Tue, 22 Nov 2016 13:18:25 +0100
From:   Aurélien Aptel <aaptel@...e.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        sfrench@...ba.org
Cc:     linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH] SMB2: Fix share type handling

Christophe JAILLET <christophe.jaillet@...adoo.fr> writes:
> Knowing that, with the current code, the SMB2_SHARE_TYPE_PRINT case can
> never trigger and printer share would be interpreted as disk share.

I've checked the SMB2 specs ([MS-SMB2] 3.2.5.5), I can confirm these are
the 3 only options. No upper bits are supposed to be set.

> So, test the ShareType value for equality instead.
>
> While at it, add some { } to fix a small style issue.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Compile-tested only.
>
> The proposed patch changes a bit the semantic as no masking is performed
> anymore. If some upper bits in 'ShareType' are set, it would now be rejected
> instead of silently accepted.

The semantic change is correct. I also think a switch would be more
appropriate. Beside this, Looks Good To Me.

-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ