Page MenuHomeFreeBSD

Use execve(2) instead of fexecve(2).
AbandonedPublic

Authored by crest_freebsd_rlwinm.de on Tue, Apr 28, 5:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 8, 11:32 AM
Unknown Object (File)
Fri, May 8, 10:36 AM
Unknown Object (File)
Wed, May 6, 10:16 AM
Unknown Object (File)
Wed, May 6, 8:43 AM
Unknown Object (File)
Sun, May 3, 8:04 PM
Unknown Object (File)
Fri, May 1, 9:25 AM
Unknown Object (File)
Thu, Apr 30, 9:59 AM
Subscribers

Details

Reviewers
None
Summary

The dynamic jail.conf is probably a (shell) script.
In that case fexecve(2) will result in kernel running
the interpreter with the script as argument e.g. /dev/fd/$n.
This only works if /dev/fd was mounted with the non-default "nodup"
option, because the kernel doesn't honor O_RDONLY | O_EXEC
and instead opens the file (description) with just FEXEC.

See PR #294780

Event: Wiesbaden Hackathon 202604

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72621
Build 69504: arc lint + arc unit