Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Aug 2026 02:36:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        emulation@FreeBSD.org
Subject:   [Bug 295333] linuxulator: page fault handling SO_PEERCRED
Message-ID:  <bug-295333-4077-fGXMupAl0N@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-295333-4077@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295333

--- Comment #15 from commit-hook@FreeBSD.org ---
A commit in branch stable/14 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=66c61a685c73aacf92aa0ecdadeff5f38332d669

commit 66c61a685c73aacf92aa0ecdadeff5f38332d669
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-04-27 23:46:53 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2026-08-05 02:23:12 +0000

    Fix LOCAL_PEERCRED in 32-bit compat mode

    Previously the cr_pid field would be incorrectly copied to userland, due
    to a size mismatch between the structure as defined in 32-bit vs 64-bit
    builds.  Fix it by converting the structure before copying it to
    userland.

    PR:             294833
    Sponsored by:   ConnectWise
    Reviewed by:    emaste
    Differential Revision: https://reviews.freebsd.org/D56675

    (cherry picked from commit 1d24638d3e8875e4b99a4b5e39f4241e37221b3d)

    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 | 23 +++++++++++++++++++++--
 sys/sys/ucred.h        | 11 +++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-295333-4077-fGXMupAl0N>