<!DOCTYPE html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div><br></div><div>On Wed, Oct 16, 2019, at 12:53, Thomas Guillem wrote:<br></div><blockquote type="cite" id="qt"><div><br></div><div>On Wed, Oct 16, 2019, at 12:01, Rémi Denis-Courmont wrote:<br></div><blockquote id="qt-qt" type="cite"><div>Hi,<br></div><div><br></div><div>There is already a vulnerability if there is an MITM. The point is that this patch adds a second vulnerability by using SMB1 even without an MITM.<br></div><div><br></div><div>Downgrading is also going to damage performance that already sucks badly enough with SMB inputs.<br></div><div><br></div><div>And sorry but I do draw a line with backward or bug compatibility hacks. If they break or damage functionality where the hack would not be needed, then it's wrong.<br></div></blockquote><div><br></div><div>We had lot of SMB2 issues for quite some time, I never wanted to put libdsm in high priority to quickly fix thoses issues. I did my best to solve lot of libsmb2 issues that was preventing users to access any SMB servers. But the issue I'm now facing is not solvable via libsmb2.<br></div><div><br></div><div>I agree that SMBv1 should never be put in high priority. On the other hand, we got a lot of angry custumers that are insulting us daily because of that.<br></div></blockquote><div><br></div><div>users, to be correct. I never saw any client or customer complaining about SMB1 shares or even suggesting to change the protocols priority.<br></div><div><br></div><blockquote type="cite" id="qt"><div>cf. <a href="https://aka.ms/stillneedssmb1">https://aka.ms/stillneedssmb1</a> sadly, smb1 is still used.<br></div><div><br></div><div>What I'm now proposing: add an option in VLC-Android and VLC-ios to enable SMBv1 compat mode. We will explain in that option that users should not do that and change their SMB servers instead.<br></div><div><br></div><div>Do you agree with that ?<br></div></blockquote><div><br></div><div><div><div>By option, you mean a settings option, or a dialog pop up that appears anytime VLC is using the SMB1 protocol ?<br></div><div>Either is fine to me, but I am not sure this is a mobile-only issue: shouldn't linux distribution users also have the choice ?<br></div><div><br></div><div>Regards,<br></div></div><div><div><br></div></div><div id="sig66622160"><div class="signature">-- <br></div><div class="signature">Simon Latapie<br></div><div class="signature"><a href="mailto:garf@videolabs.io">garf@videolabs.io</a><br></div><div class="signature">+33 1 84 17 56 63<br></div><div><br></div></div></div><blockquote type="cite" id="qt"><blockquote id="qt-qt" type="cite"><div><br></div><div class="qt-qt-gmail_quote"><div>Le 16 octobre 2019 12:08:21 GMT+03:00, Simon Latapie <garf@videolan.org> a écrit :<br></div><blockquote class="qt-qt-gmail_quote" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div><br></div><div>On Wed, Oct 16, 2019, at 10:41, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt-qt-qt"><div>Hi,<br></div><div><br></div><div>A downgrade occurs if two SMB2 capable nodes end up using SMB1 between them. The classic attack is for an active MITM to block the SMB2 transactions, but with this patch the attacker needs not even be an MITM, just an eavesdropper.<br></div></blockquote><div><br></div><div><div><div>This is a generic man-in-the-middle scenario, yes. But I really doubt this changes anything in VLC case: man-in-the-middle is a matter of trust, and VLC does not verify the server identity, either with SMB1 or SMB2 protocol (I am not even sure this is possible in most of the cases - aka without an AD/kerberos infrastructure). So a man-in-the-middle attack can be achieved, in SMB1 or SMB2.<br></div><div><br></div><div>Do not get me wrong: I think SMB1 is a protocol that *must* be avoided at all cost when publishing a share service. The problem is a lot of VLC users seems to use old operating systems or NAS.<br></div><div><br></div><div>I just have difficulties to see how this can be blamed to VLC.<br></div><div><br></div><div>Regards,<br></div><div><br></div><div class="qt-qt-signature">-- <br></div><div class="qt-qt-signature">Simon Latapie<br></div><div class="qt-qt-signature"><a href="mailto:garf@videolan.org">garf@videolan.org</a><br></div><div class="qt-qt-signature"><div><br></div></div><div><br></div></div></div><blockquote type="cite" id="qt-qt-qt"><div class="qt-qt-qt-gmail_quote"><div>Le 16 octobre 2019 10:02:54 GMT+03:00, Simon Latapie <garf@videolabs.io> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-qt-qt-gmail_quote"><div>Hello,<br></div><div><br></div><div>can you explain a bit more about a downgrade attack scenario ? This does not look obvious to me.<br></div><div>Downgrade attacks are usually either a problem for the server (so not VLC), or an service spoof, which does not seem to be relevant here (the patch is not modifying the server selection/address).<br></div><div><br></div><div>Regards,<br></div><div><br></div><div id="qt-qt-qt-sig66622160"><div class="qt-qt-qt-signature">-- <br></div><div class="qt-qt-qt-signature">Simon Latapie<br></div><div class="qt-qt-qt-signature">garf@videolabs.io<br></div><div class="qt-qt-qt-signature">+33 1 84 17 56 63<br></div><div class="qt-qt-qt-signature"><br></div></div><div><br></div><div><br></div><div>On Tue, Oct 15, 2019, at 17:19, Rémi Denis-Courmont wrote:<br></div><blockquote id="qt-qt-qt-qt" type="cite"><div>Hi,<br></div><div><br></div><div>Looks like an obvious downgrade attack to me. You're waiting for a CVE if you merge this patch.<br></div><div><br></div><div class="qt-qt-qt-qt-gmail_quote"><div>Le 15 octobre 2019 16:41:17 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote class="qt-qt-qt-qt-gmail_quote" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><pre class="qt-qt-qt-qt-k9mail"><div>Some samba servers (on Windows 7) implement both SMB2 and SMB1. The problem is<br></div><div>that the SMB2 part is not configured like the SMB1 one. Only SMB1 seems to<br></div><div>reflect the user configuration (using Windows Settings, not anything<br></div><div>complicated like via powershell/regedit).<br></div><div><br></div><div>If we try to connect to such server via libsmb2, the server will return a<br></div><div>SMB2_STATUS_ACCESS_DENIED (0xC0000022) status. Our libsmb2 module will then ask<br></div><div>the user for credentials via a dialog. The problem is that no credentials will<br></div><div>ever work since only the SMB1 part is configured.<br></div><div><br></div><div>I tried to differentiate (via wireshark) the negotiation between such server<br></div><div>and an other working SMB2 server but could not find anything that could tell us<br></div><div>that this ACCESS_DENIED status should be ignored on this specific server (in<br></div><div>order to fallback to libdsm).<br></div><div><br></div><div>The only possible fix is to try libdsm first. VLC will then favor the SMB1<br></div><div>protocol over SMB 2&3.<br></div><div><br></div><div>NB1: libsmb2 is backported to VLC 3.0 for iOS and Android ports. These ports<br></div><div>are beta-testing SMB 2&3 support on mobile.<br></div><div><br></div><div>NB2: We get a lot of angry mail/reviews about SMB1 support broken, I don't<br></div><div>think we can drop SMB1 (even if I would love to).<br></div><div><br></div><div>NB3: We can't drop libsmb2 either for the same reason (we got a *lot* of<br></div><div>requests to support it).<hr> modules/access/dsm/access.c | 17 ++++++++++-------<br></div><div> modules/access/smb2.c | 14 +++++++-------<br></div><div> 2 files changed, 17 insertions(+), 14 deletions(-)<br></div><div><br></div><div>diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c<br></div><div>index 776925c9eeb..186a567a72c 100644<br></div><div>--- a/modules/access/dsm/access.c<br></div><div>+++ b/modules/access/dsm/access.c<br></div><div>@@ -69,7 +69,7 @@ vlc_module_begin ()<br></div><div> set_shortname( "dsm" )<br></div><div> set_description( N_("libdsm SMB input") )<br></div><div> set_help(BDSM_HELP)<br></div><div>- set_capability( "access", 20 )<br></div><div>+ set_capability( "access", 22 )<br></div><div> set_category( CAT_INPUT )<br></div><div> set_subcategory( SUBCAT_INPUT_ACCESS )<br></div><div> add_string( "smb-user", NULL, SMB_USER_TEXT, SMB_USER_LONGTEXT, false )<br></div><div>@@ -343,12 +343,6 @@ static int login( stream_t *p_access )<br></div><div> <br></div><div> if( connect_err == EACCES )<br></div><div> {<br></div><div>- if (var_Type(p_access, "smb-dialog-failed") != 0)<br></div><div>- {<br></div><div>- /* A higher priority smb module (likely smb2) already requested<br></div><div>- * credentials to the users. It is useless to request it again. */<br></div><div>- goto error;<br></div><div>- }<br></div><div> while( connect_err == EACCES<br></div><div> && vlc_credential_get( &credential, p_access, "smb-user", "smb-pwd",<br></div><div> SMB_LOGIN_DIALOG_TITLE,<br></div><div>@@ -365,6 +359,15 @@ static int login( stream_t *p_access )<br></div><div> if( connect_err != 0 )<br></div><div> {<br></div><div> msg_Err( p_access, "Unable to login" );<br></div><div>+<br></div><div>+ if (credential.i_get_order == GET_FROM_DIALOG)<br></div><div>+ {<br></div><div>+ /* Tell other smb modules (likely smb2) that we already<br></div><div>+ * requested credential to the users and that it it useless to<br></div><div>+ * try again. This avoid to show 2 login dialogs for the same<br></div><div>+ * access. */<br></div><div>+ var_Create(p_access, "smb-dialog-failed", VLC_VAR_VOID);<br></div><div>+ }<br></div><div> goto error;<br></div><div> }<br></div><div> }<br></div><div>diff --git a/modules/access/smb2.c b/modules/access/smb2.c<br></div><div>index 923e6d57e04..7f9b614d006 100644<br></div><div>--- a/modules/access/smb2.c<br></div><div>+++ b/modules/access/smb2.c<br></div><div>@@ -664,6 +664,13 @@ Open(vlc_object_t *p_obj)<br></div><div> NULL);<br></div><div> ret = vlc_smb2_open_share(access, smb2_url, &credential);<br></div><div> <br></div><div>+ if (ret == -1 && var_Type(access, "smb-dialog-failed"))<br></div><div>+ {<br></div><div>+ /* A higher priority smb module (likely dsm) already requested<br></div><div>+ * credentials to the users. It is useless to request it again. */<br></div><div>+ goto error;<br></div><div>+ }<br></div><div>+<br></div><div> while (ret == -1<br></div><div> && (!sys->error_status || VLC_SMB2_STATUS_DENIED(sys->error_status))<br></div><div> && vlc_credential_get(&credential, access, "smb-user", "smb-pwd",<br></div><div>@@ -683,13 +690,6 @@ Open(vlc_object_t *p_obj)<br></div><div> if (error && *error)<br></div><div> vlc_dialog_display_error(access,<br></div><div> _("SMB2 operation failed"), "%s", error);<br></div><div>- if (credential.i_get_order == GET_FROM_DIALOG)<br></div><div>- {<br></div><div>- /* Tell other smb modules (likely dsm) that we already requested<br></div><div>- * credential to the users and that it it useless to try again.<br></div><div>- * This avoid to show 2 login dialogs for the same access. */<br></div><div>- var_Create(access, "smb-dialog-failed", VLC_VAR_VOID);<br></div><div>- }<br></div><div> goto error;<br></div><div> } <br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>