From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62990: 30.0.50; UDP server closes connection upon receiving an empty packet Date: Wed, 26 Apr 2023 15:24:03 +0300 Message-ID: <83jzxyu90c.fsf@gnu.org> References: <87wn21br45.fsf@gmail.com> <87ttx49yg0.fsf@gmail.com> <87354nt37h.fsf@gmail.com> <83v8hjszp3.fsf@gnu.org> <87ttx3rkwm.fsf@gmail.com> <83pm7rszbc.fsf@gnu.org> <87o7nasw4a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9682"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62990@debbugs.gnu.org, mail@vasilij.de To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 26 14:25:43 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1preDO-0002Ky-WC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Apr 2023 14:25:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1preCp-0007hU-Rq; Wed, 26 Apr 2023 08:25:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1preCk-0007go-Hj for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 08:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1preCk-0007Tj-7p for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 08:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1preCk-0001By-3t for bug-gnu-emacs@gnu.org; Wed, 26 Apr 2023 08:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Apr 2023 12:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62990 X-GNU-PR-Package: emacs Original-Received: via spool by 62990-submit@debbugs.gnu.org id=B62990.16825118524516 (code B ref 62990); Wed, 26 Apr 2023 12:25:02 +0000 Original-Received: (at 62990) by debbugs.gnu.org; 26 Apr 2023 12:24:12 +0000 Original-Received: from localhost ([127.0.0.1]:54453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1preBw-0001Am-0c for submit@debbugs.gnu.org; Wed, 26 Apr 2023 08:24:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1preBs-0001AV-Dh for 62990@debbugs.gnu.org; Wed, 26 Apr 2023 08:24:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1preBl-0007NP-Pe; Wed, 26 Apr 2023 08:24:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZzDxWwmlVWrIBqHK+v/y8qjGFvZ6ivsR56CRtOg/xNs=; b=WO+39USgEOFy4P290IeH foIhKG9KgrkRDiUcLzmLwg8CkQwwgmtETKuwaDAjQ0JBEuQFdeR94PYKSRZqOHb9VOYUaB97Fxmbt HCyqcKilRmhz0o6I2pmo0ldPK8CN7d5cOh0a1QpUIOldUc1rWbUvbSss3z1NKRJBIlXBstzhbSCx3 3jqp6zCwCOEzzLpDYN2jA6+gXyNpXe2yDmA1f4rGxff0QvDWsjKMtYlvxwsiFsK3qmAi56yD0xOPM 1fSeoT30ilGd0Fv3GL7IUqmpNCCcfqefAKWRHg0aMFYUHlAKhh6IRcv2sc4L4mx06JB+usiSYHSIF qJUfHOuBEOrKMQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1preBJ-0006Fx-Q5; Wed, 26 Apr 2023 08:23:48 -0400 In-Reply-To: <87o7nasw4a.fsf@gmail.com> (message from Robert Pluim on Wed, 26 Apr 2023 13:47:49 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260672 Archived-At: > From: Robert Pluim > Cc: 62990@debbugs.gnu.org, mail@vasilij.de > Date: Wed, 26 Apr 2023 13:47:49 +0200 > > >>>>> On Wed, 26 Apr 2023 13:38:47 +0300, Eli Zaretskii said: > > >> From: Robert Pluim > >> Cc: 62990@debbugs.gnu.org, mail@vasilij.de > >> Date: Wed, 26 Apr 2023 12:35:21 +0200 > >> > >> >>>>> On Wed, 26 Apr 2023 13:30:32 +0300, Eli Zaretskii said: > >> > Eli> Do we want some variable to get back the old behavior, in case some > Eli> application out there depends on that? > >> > >> For which one? > > Eli> The 2nd one. > > I guess we could, but if the application asks us to send an empty > packet we should do it. I didn't say that the default behavior should be that, I just asked whether it is conceivable that someone, somewhere could actually rely on the semi-buggy behavior, whereby empty packets aren't sent? > >> Does it help if I say that [1] is a security fix? 😜 > > Eli> No. But it will help if you convince me that it's a bug-fix. > > It transforms this: > > recvfrom(5, "hello", 4096, 0, {sa_family=AF_INET, sin_port=htons(56845), sin_addr=inet_addr("127.0.0.1")}, [16]) = 5 > Received string (5): "hello" > recvfrom(5, "", 4096, 0, {sa_family=AF_INET, sin_port=htons(56845), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0 > Received event: "connection broken by remote peer > > into this: > > recvfrom(5, "hello", 4096, 0, {sa_family=AF_INET, sin_port=htons(55486), sin_addr=inet_addr("127.0.0.1")}, [16]) = 5 > Received string (5): "hello" > recvfrom(5, "", 4096, 0, {sa_family=AF_INET, sin_port=htons(55486), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0 > recvfrom(5, "world", 4096, 0, {sa_family=AF_INET, sin_port=htons(55486), sin_addr=inet_addr("127.0.0.1")}, [16]) = 5 > Received string (5): "world" > > ie the UDP process is still running and can still receive messages And no one could ever expect that? IOW, is this behavior obviously wrong?