From nobody Fri Aug 15 12:11:12 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4c3LZs5FvGz650bR for ; Fri, 15 Aug 2025 12:12:21 +0000 (UTC) (envelope-from henryk.paluch@pickering.cz) Received: from pgw.pickering.cz (mail.pickering.cz [81.200.56.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3LZr692cz3ft4 for ; Fri, 15 Aug 2025 12:12:20 +0000 (UTC) (envelope-from henryk.paluch@pickering.cz) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=pickering.cz header.s=pmg.pickering.cz header.b=1XBiXmBh; dkim=pass header.d=pickering.cz header.s=001B6668-20D8-11EE-95F6-B514B69B4328 header.b=2iyvBxqO; spf=pass (mx1.freebsd.org: domain of henryk.paluch@pickering.cz designates 81.200.56.74 as permitted sender) smtp.mailfrom=henryk.paluch@pickering.cz; dmarc=pass (policy=quarantine) header.from=pickering.cz Received: from pgw.pickering.cz (localhost.localdomain [127.0.0.1]) by pgw.pickering.cz (Proxmox) with ESMTP id D6697814F7 for ; Fri, 15 Aug 2025 14:12:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pickering.cz; h= cc:content-transfer-encoding:content-type:content-type:date:from :from:in-reply-to:message-id:mime-version:references:reply-to :subject:subject:to:to; s=pmg.pickering.cz; bh=JQIOz/lYgJqQhMn1Q LqcPx7lzKsDsqfAjIn4+mzLuYQ=; b=1XBiXmBhkm8EA5cY2Y/VX7bQgwhIE2DKJ qRyaU8H3tkVqGzbadPEnjh81JX2a56N5Kbk3q2osg5m2DxDuE/eZLfrhvCJyz4nZ 2rslEV5y/Am82PWlFe7+nM3ZL0zRtmMivasoAhtwegKmT6kd1R4m/KkdZZ6JuEqS UVlm935/jOoDvIrfAxPoMnyIkhYDXea2WtB/2y8WWSqZjfQ9UH/Jx39URRafpKbu HbXw0v/52DwsOpGD8gmPSJsH36f5tVpzutCq3s7jnkKuwzSPbpnkv+a7IBghfFS3 C/g73APlfjPHx7azgWkBAlaxPoYA3Q77L/tlBVOomYAC8TA2SHbhA== Received: from mail.pickering.cz (unknown [192.168.10.2]) by pgw.pickering.cz (Proxmox) with ESMTPS id B53FD816FE for ; Fri, 15 Aug 2025 14:12:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.pickering.cz (Postfix) with ESMTP id CF9F21AC5FB4 for ; Fri, 15 Aug 2025 14:11:17 +0200 (CEST) Received: from mail.pickering.cz ([127.0.0.1]) by localhost (mail.pickering.cz [127.0.0.1]) (amavis, port 10032) with ESMTP id L6A4XYh10fbE for ; Fri, 15 Aug 2025 14:11:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.pickering.cz (Postfix) with ESMTP id E47B11AC5FB6 for ; Fri, 15 Aug 2025 14:11:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.pickering.cz E47B11AC5FB6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pickering.cz; s=001B6668-20D8-11EE-95F6-B514B69B4328; t=1755259872; bh=JQIOz/lYgJqQhMn1QLqcPx7lzKsDsqfAjIn4+mzLuYQ=; h=Date:From:To:Message-ID:MIME-Version; b=2iyvBxqO5sRbpT/Zq2aHoed2J7uURLOUvQ3ry0WPYdlS8h2+NNUeCVqcWiYS1QlLn PQ0O1AxxDYKR6Fv8sV5VuUZoutESaAiMOop9FOWM6d+4hxayeGoFYyqZSXd5s71siJ DbL3urIzvG40MMDbq4YeWD8h5ntrR8wS9kEVUGchwLYaomOzIMzwouFKfFDl0Z+3/r m8j1J16LOXgm4IGWrVrPvkwsxS2otQ77Ju/80HdVjfYfIhIP/TdhvpOcd4dGcn93HY K4e6L8/i17smMHDRNbahgYWJYDCfNvYR51S4dEc5e8gvCdYwzaHOnpWXVensiVSrMX XiT9xprKjlc6A== Received: from mail.pickering.cz ([127.0.0.1]) by localhost (mail.pickering.cz [127.0.0.1]) (amavis, port 10026) with ESMTP id o-DYYfi-8GJO for ; Fri, 15 Aug 2025 14:11:12 +0200 (CEST) Received: from mail.pickering.cz (localhost [127.0.0.1]) by mail.pickering.cz (Postfix) with ESMTP id AB5E91AC5FB4 for ; Fri, 15 Aug 2025 14:11:12 +0200 (CEST) Date: Fri, 15 Aug 2025 14:11:12 +0200 (CEST) From: Henryk Paluch To: freebsd-current Message-ID: <1546719498.15536396.1755259872619.JavaMail.zimbra@pickering.cz> In-Reply-To: <595365288.15536127.1755259580702.JavaMail.zimbra@pickering.cz> References: <595365288.15536127.1755259580702.JavaMail.zimbra@pickering.cz> Subject: Re: sshd-session (sshd on conect) crashes with signal 6 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thread-Topic: sshd-session (sshd on conect) crashes with signal 6 Thread-Index: 6ROEIZdLF1e7MnnaVY0QpCuGPOSbFsStf/0L X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[pickering.cz,quarantine]; R_DKIM_ALLOW(-0.20)[pickering.cz:s=pmg.pickering.cz,pickering.cz:s=001B6668-20D8-11EE-95F6-B514B69B4328]; R_SPF_ALLOW(-0.20)[+mx:c]; MIME_GOOD(-0.10)[text/plain]; DKIM_TRACE(0.00)[pickering.cz:+]; ASN(0.00)[asn:41046, ipnet:81.200.56.0/21, country:CZ]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_HELO_LOCALHOST(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-current@FreeBSD.org]; RCVD_COUNT_SEVEN(0.00)[7] X-Rspamd-Queue-Id: 4c3LZr692cz3ft4 X-Spamd-Bar: --- Addendum - source code listing: /usr/src/crypto/openssh/uidswap.c:134 grep -n . /usr/src/crypto/openssh/uidswap.c | fgrep -A 10 -B 10 134: 124: fatal("setgroups: %.100s", strerror(errno)); 125:#ifndef SAVED_IDS_WORK_WITH_SETEUID 126: /* Propagate the privileged gid to all of our gids. */ 127:#ifdef __FreeBSD__ 128: /* 129: * FreeBSD traditionally includes the egid as the first element. If we 130: * use getegid() here then we effectively propagate user_groups[0], 131: * which is probably pw->pw_gid. Fix it to work as intended by using 132: * the egid we already have stashed off. 133: */ // here it crashes: 134: assert(saved_egroupslen > 0); 135: if (setgid(saved_egroups[0]) == -1) 136: debug("setgid %u: %.100s", (u_int) saved_egroups[0], strerror(errno)); 137:#else 138: if (setgid(getegid()) == -1) 139: debug("setgid %u: %.100s", (u_int) getegid(), strerror(errno)); 140:#endif 141: /* Propagate the privileged uid to all of our uids. */ 142: if (setuid(geteuid()) == -1) 143: debug("setuid %u: %.100s", (u_int) geteuid(), strerror(errno)); 144:#endif /* SAVED_IDS_WORK_WITH_SETEUID */ ----- Original Message ----- > From: "henryk paluch" > To: "freebsd-current" > Sent: Friday, August 15, 2025 2:06:20 PM > Subject: sshd-session (sshd on conect) crashes with signal 6 > Hello! > > After one week following current I recently started experiencing > sshd-session crashes on 2 machines running latest 15.0-PRERELEASE (git Main > branch). > > Anytime I try to SSH login to my 15.0-PRERELASE, sshd crashes on sshd-sesson > subprocess with: > > pid 1217 (sshd-session), jid 0, uid 0: exited on signal 6 > > More details: > > gdb /usr/libexec/sshd-session /sshd-session.core > > Core was generated by `sshd-session: ansible [priv]'. > Program terminated with signal SIGABRT, Aborted. > Sent by thr_kill() from pid 15843 and user 0. > #0 thr_kill () at thr_kill.S:4 > warning: Source file is more recent than executable. > 4 RSYSCALL(thr_kill) > (gdb) bt > #0 thr_kill () at thr_kill.S:4 > #1 0x000019ceda634fa4 in __raise (s=s@entry=6) at > /usr/src/lib/libc/gen/raise.c:48 > #2 0x000019ceda6e52a9 in abort () at /usr/src/lib/libc/stdlib/abort.c:61 > #3 0x000019ceda617d51 in __assert (func=, file=, > line=line@entry=134, > failedexpr=) at /usr/src/lib/libc/gen/assert.c:47 > #4 0x000019c6b21029c3 in temporarily_use_uid (pw=pw@entry=0x3c3261215280) at > /usr/src/crypto/openssh/uidswap.c:134 > #5 0x000019c6b20e8517 in user_key_allowed2 (pw=0x3c3261215280, > key=0x3c32612e5820, > file=0x3c3261233e30 "/home/ansible/.ssh/authorized_keys", > remote_ip=0x3c3261212da0 "192.168.122.1", > remote_host=0x3c3261212dd0 "192.168.122.1", authoptsp=0x19ced2ed0590) at > /usr/src/crypto/openssh/auth2-pubkey.c:599 > #6 user_key_allowed (ssh=ssh@entry=0x3c32612f4000, pw=0x3c3261215280, > key=0x3c32612e5820, auth_attempt=, > authoptsp=authoptsp@entry=0x19ced2ed0688) at > /usr/src/crypto/openssh/auth2-pubkey.c:783 > #7 0x000019c6b20ed99d in mm_answer_keyallowed (ssh=0x3c32612f4000, sock=7, > m=0x3c3261214d40) > at /usr/src/crypto/openssh/monitor.c:1205 > #8 0x000019c6b20f034d in monitor_read (ssh=ssh@entry=0x3c32612f4000, > pmonitor=pmonitor@entry=0x3c32612c4cc0, > ent=0x19c6b210a720 , pent=pent@entry=0x19ced2ed0758) > at /usr/src/crypto/openssh/monitor.c:523 > #9 0x000019c6b20efdf2 in monitor_child_preauth (ssh=ssh@entry=0x3c32612f4000, > pmonitor=0x3c32612c4cc0) > at /usr/src/crypto/openssh/monitor.c:298 > #10 0x000019c6b20cac27 in privsep_preauth (ssh=ssh@entry=0x3c32612f4000) at > /usr/src/crypto/openssh/sshd-session.c:353 > #11 0x000019c6b20c9e3b in main (ac=2, av=) at > /usr/src/crypto/openssh/sshd-session.c:1322 > (gdb) q > > > Encountered on 2 machines: > > Machine 1 "fbsd-next": > > uname -v -> FreeBSD 15.0-PRERELEASE #1 main-n279622-c992ac621327: Fri Aug > 15 12:55:01 CEST 2025 > root@fbsd-next:/usr/obj/usr/src/amd64.amd64/sys/GENERIC > freebsd-version -> 15.0-PRERELEASE > uname -UK -> 1500060 1500060 > git branch -v -> * main c992ac621327 ipheth(4): Add CDC-NCM support for RX > git describe -> vendor/NetBSD/bmake/20250804-302114-gc992ac621327 > > > (Machine 2 is currently rebuilding): > > git branch -v -> * main 5205b32de3fb libc: Drop incorrect qsort optimization > git describe -> vendor/NetBSD/bmake/20250804-302115-g5205b32de3fb > > Is anybody else experiencing same problem? > > Best regards > --Henryk Paluch