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

--- Comment #11 from [email protected] ---
A commit in branch stable/15 references this bug:

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

commit c35bb8ba898482920bf9b57967a9a11f98a89c81
Author:     Jan Bramkamp <[email protected]>
AuthorDate: 2026-05-06 23:28:53 +0000
Commit:     Kyle Evans <[email protected]>
CommitDate: 2026-05-07 17:26:18 +0000

    jail: avoid leaking jail config fds to exec.* hooks

    The jail(8) command must not leave parsed configuration files open
    since the file descriptors will be leaked to child processes
    including the untrusted exec.start or exec.stop hooks.

    While fopen() doesn't provide direct access to O_CLOEXEC, it does
    provide access to FD_CLOEXEC via "e" in the mode string which
    provides the desired defense in depth against leaking file descriptors
    into exec.* hooks since those always execve() into a shell.

    Jail configuration is potentially sensitive and some hooks execute from
    within the jail context, leaving some opening for the jail to exfiltrate
    information about the host environment.

    (Commit message wordsmithed by kevans)

    PR:             295052
    Reviewed by:    kevans

    (cherry picked from commit 276d9b88a9e6fd6fd90e57c36444756ad297d2ab)

 usr.sbin/jail/config.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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

Reply via email to