Date: Wed, 20 May 2026 01:47:05 +0000 From: Alan Somers <asomers@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 57fb48f8e2fc - stable/15 - linuxulator: fix SO_PEERCRED emulation after 1d24638d3e8 Message-ID: <6a0d1299.368a1.74298d9@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=57fb48f8e2fca5f069e9bc3cf080608f602919a9 commit 57fb48f8e2fca5f069e9bc3cf080608f602919a9 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2026-05-16 18:03:49 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2026-05-20 01:28:33 +0000 linuxulator: fix SO_PEERCRED emulation after 1d24638d3e8 For Linux binaries, sopt->sopt_td may be null. And there's also no need to check it, since struct l_ucred has the same layout on 32-bit systems as on 64-bit ones. PR: 295333 Reported by: Miguel Gomes <miguel.dias.gomes@protonmail.com> Fixes: 1d24638d3e8 ("Fix LOCAL_PEERCRED in 32-bit compat mode") Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57032 (cherry picked from commit 4cee16d471d47f4673e4d2c66f7a96d4e6d86ee9) --- sys/kern/uipc_usrreq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 8e8261c9644e..90c13f7e17c4 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2759,7 +2759,9 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt) if (error != 0) break; #ifdef COMPAT_FREEBSD32 - if (SV_PROC_FLAG(sopt->sopt_td->td_proc, SV_ILP32)) { + if (sopt->sopt_td && + SV_PROC_FLAG(sopt->sopt_td->td_proc, SV_ILP32)) + { struct xucred32 xu32 = {}; int i;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a0d1299.368a1.74298d9>
