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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAVpQUCqiTUQM6gfFE_qps19vcsE12QsMifzqPc19M_2arWtsQ@mail.gmail.com>
Date: Wed, 22 Oct 2025 00:22:14 -0700
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Sunday Adelodun <adelodunolaoluwa@...oo.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, 
	pabeni@...hat.com, horms@...nel.org, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, skhan@...uxfoundation.org, 
	david.hunter.linux@...il.com
Subject: Re: [PATCH v2] net: unix: remove outdated BSD behavior comment in unix_release_sock()

On Tue, Oct 21, 2025 at 12:59 PM Sunday Adelodun
<adelodunolaoluwa@...oo.com> wrote:
>
> Remove the long-standing comment in unix_release_sock() that described a
> behavioral difference between Linux and BSD regarding when ECONNRESET is
> sent to connected UNIX sockets upon closure.
>
> As confirmed by testing on macOS (similar to BSD behavior), ECONNRESET

I tested on FreeBSD and the behaviour was the same with macOS.

---8<---
$ qemu-system-x86_64 -drive file=FreeBSD-14.3-RELEASE-amd64.qcow2 \
-enable-kvm -cpu host -serial mon:stdio -nographic
...
root@...ebsd:~ # uname -r
14.3-RELEASE
root@...ebsd:~ # python a.py
test 1
b'hello'
b''
test 2
b''
b''
test 3
[Errno 54] Connection reset by peer
---8<---

> is only observed for SOCK_DGRAM sockets, not for SOCK_STREAM. Meanwhile,
> Linux already returns ECONNRESET in cases where a socket is closed with
> unread data or is not yet accept()ed. This means the previous comment no
> longer accurately describes current behavior and is misleading.
>
> Suggested-by: Kuniyuki Iwashima <kuniyu@...gle.com>
> Signed-off-by: Sunday Adelodun <adelodunolaoluwa@...oo.com>

The comment is outdated anyway, so

Link: https://lore.kernel.org/netdev/20251018235325.897059-1-kuniyu@google.com/
Reviewed-by: Kuniyuki Iwashima <kuniyu@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ