Bug 294879 - [Linuxulator]: need to implement missing setfsuid & setfsgid
Summary: [Linuxulator]: need to implement missing setfsuid & setfsgid
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 16.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Pouria Mousavizadeh Tehrani
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-29 18:50 UTC by Ricardo Branco
Modified: 2026-05-01 12:02 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Branco 2026-04-29 18:50:15 UTC
When running podman I end up with these message in dmesg:

[2311.541519] linux: jid 2 pid 13028 (bash): syscall setfsuid not implemented
[2311.547043] linux: jid 2 pid 13028 (bash): syscall setfsgid not implemented

To reproduce:
doas podman run --rm -it --os linux docker.io/library/debian

Will submit a fix.
Comment 1 commit-hook freebsd_committer freebsd_triage 2026-05-01 11:59:59 UTC
A commit in branch main references this bug:

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

commit f4ae41b7ea5efb8381a5df234b3f5e1f7569f9b0
Author:     Ricardo Branco <rbranco@suse.de>
AuthorDate: 2026-04-29 18:27:22 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-05-01 11:52:37 +0000

    linux: Implement setfsuid(2) and setfsgid(2) as no-ops

    These system calls exist to decouple the Linux filesystem credentials
    from the effective credentials, avoiding signal exposure during
    privilege transitions.
    The signal permission model that motivated this was revised
    in Linux 2.0, making these syscalls obsolete for new applications.

    Implement both syscalls as no-ops that return the current effective
    UID/GID as the previous filesystem UID/GID.
    Linux returns the previous filesystem UID/GID for these syscalls
    with no error indication.

    Same for the equivalent setfsuid16() & setfsgid16() system calls.

    Signed-off-by:  Ricardo Branco <rbranco@suse.de>
    PR:             294879
    Reviewed by:    kib, pouria
    Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2175

 sys/compat/linux/linux_dummy.c |  2 --
 sys/compat/linux/linux_misc.c  | 26 ++++++++++++++++++++++++++
 sys/compat/linux/linux_uid16.c | 16 ++++++++++++++--
 3 files changed, 40 insertions(+), 4 deletions(-)