From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: A couple of questions and concerns about Emacs network security Date: Mon, 09 Jul 2018 18:35:45 +0200 Message-ID: <878t6kl63i.fsf@gmail.com> References: <83o9g2uhju.fsf@gnu.org> <20180705115826.73c1d95e@jabberwock.cb.piermont.com> <878t6lom8g.fsf@mouse.gnus.org> <87pnzxn4kw.fsf@mouse.gnus.org> <87fu0tmxfs.fsf@mouse.gnus.org> <83va9pha36.fsf@gnu.org> <83tvp9h9dv.fsf@gnu.org> <87y3ellggt.fsf@mouse.gnus.org> <83sh4th84d.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1531154037 24413 195.159.176.226 (9 Jul 2018 16:33:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2018 16:33:57 +0000 (UTC) Cc: Eli Zaretskii , Lars Ingebrigtsen , Emacs-Devel devel To: Jimmy Yuen Ho Wong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 09 18:33:52 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcZ6l-0006BZ-B8 for ged-emacs-devel@m.gmane.org; Mon, 09 Jul 2018 18:33:51 +0200 Original-Received: from localhost ([::1]:43298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcZ8s-0001wN-BA for ged-emacs-devel@m.gmane.org; Mon, 09 Jul 2018 12:36:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcZ8j-0001wI-T0 for emacs-devel@gnu.org; Mon, 09 Jul 2018 12:35:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcZ8f-00024S-4d for emacs-devel@gnu.org; Mon, 09 Jul 2018 12:35:53 -0400 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:38427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcZ8e-00023D-U0; Mon, 09 Jul 2018 12:35:49 -0400 Original-Received: by mail-ed1-x52a.google.com with SMTP id a5-v6so14411330edt.5; Mon, 09 Jul 2018 09:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=JODZTyjAGBK3LU/yk5sd620tN2UZbT3sCXMDKa0Lp+A=; b=swyNZLFFlpzcGLytVgTaqeDSy9nkPJLVsoBETWtx26r+VKjFf+40XDmJTWOMPd8O4G sWH4Hxy0kzKLdgypOEN7Mbvgen4YEYac8/ryX2datJKn2ChFG6OwruEBhwDC8cbtg94O fD/o8jHyjIWV8DnfJsnWj0AFi/42LkJAg7QFctQrbDQ2hHA7fU06e0qOPDHtnl1t8bAo uvAaGNMlOcLGQ0GBgJ+YvMP3bif7zF4gxwXtz9tKfw1JkjQkwB5UmTvrQSR7XCNiigU0 El+e/hLYhxRVkhahp9k6XtJgksJbDmp/7Kd7Tlodeb/Mvv1cDD1mhW+D2ZWGPyvUwLvf Dvcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :mail-followup-to:mail-copies-to:gmane-reply-to-list:date:message-id :mime-version:content-transfer-encoding; bh=JODZTyjAGBK3LU/yk5sd620tN2UZbT3sCXMDKa0Lp+A=; b=nDA3D4l4KCs3toIfCpgmwxrJrp9oX7WC7TGzJQmvFP7S08xc93TSF+eEy+3Vfa+5tL Iav8FUovp0pb8in7nBzj1Vj4Xmzou9yCVRUTI2WG8HG6BM59AeGGdu1s+cZn1/jWmrw1 OJccwfGPZxMs17Fi9+kwMnKsQmYDGrA0T6jvelScr7fFwgbuTWLr8cEoQd056pdFmpzC sS71cIBSyUU1PpdkSFzTLOKNOWsZ70BptVFAb9pHPKsnBFp4Wd0yn0p1iPWD+59di9No L+7ZLhjMu3fuGJE9uTjBs6WKgTJq5Cj5BWZZPwkmBLLaJBsPqfd+f5tlSjfoPnGq3DZM KSHQ== X-Gm-Message-State: APt69E3dQdMHYGVVT+kmR6rK/XO7SOTZvrJtG6Gzy9dhZlW9FqTpGRG4 TfkWNzDMELgWDVEe12H1EEWOBcPbyNU= X-Google-Smtp-Source: AAOMgpf9nMRixr3QJuv4VGhAGwzJDvPUq7R4+O61me5/q9GpTuKheNoof8++wn+wY5kaczpLcG7VPQ== X-Received: by 2002:a50:fd93:: with SMTP id o19-v6mr19066512edt.73.1531154147435; Mon, 09 Jul 2018 09:35:47 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id b9-v6sm5501709edk.28.2018.07.09.09.35.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 09:35:46 -0700 (PDT) In-Reply-To: (Jimmy Yuen Ho Wong's message of "Mon, 9 Jul 2018 16:29:25 +0100") Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::52a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227156 Archived-At: Jimmy Yuen Ho Wong writes: >> >> > Users aren't supposed to care about that variable, anyway, since the N= SM >> > warns about less than 1024 bits... >> >> Yes, but what if GnuTLS bumps the default to more than that? And even >> if not, I think I might like to know how far below 1024 I'm going to >> be if I allow the connection. > > I've surfaced the DH_PRIME_UNACCEPTABLE error from the handshake to > the Lisp side here. > https://github.com/wyuenho/emacs/commit/6c00758175b227338005533b27999435b= 33528d5 > > I'm don't like this change to much. It's full of exceptions in the C > code, and you still can't get the prime bits the server sent over, > because gnutls_dh_get_prime_bits() only returns a prime bit if an > actual DH key exchange was done. Since the handshake failed early as > soon as the client found out the prime bits are too low, ciphers, mac > and all the rest were not negotiated, so they are all NULL. You do at > least get a warning that lets you know the prime bit is too low tho, > and you can still proceed with this connection tho, but it wouldn't be > very useful. Since the handshake failed, the result will be a plain > HTTP request to an HTTPS port, of which the server will typically > return with an HTTP 400. I=CA=BCd much rather we hard fail the connection here than proceed without TLS. > Perhaps it's simply better to let the user know that they can (setq > gnutls-log-level 1) to log out the actual GnuTLS error message (which > is still just prime bits too low without specifying a number) Yes, that sounds like a good idea. Robert