Description
In self-confine mode, the seccomp profile blocks the creat syscall (85), causing programs that use it (e.g. GNU tar when writing archives) to die with SIGSYS (exit code 159). openat with O_CREAT works fine, so this is specific to the legacy creat syscall.
Environment
- finSAFE 0.9.34 (personal CLI, install.sh)
- Linux 6.8.0-124-generic, x86_64, Ubuntu 24.04
Steps to reproduce
- Policy (self-confine, network: host, workspace writable):
schema_version: 1
kind: local-wrapper
program_mode: interactive
...
filesystem:
read_only_paths: [/usr]
read_write_paths: [/root/workspace, /dev/null]
- Run tar:
finsafe --policy policy.yaml self-confine -- tar cf /root/workspace/t.tar /usr/bin/true
- Result:
Bad system call (core dumped), exit code 159.
Root cause
Minimal C reproducer:
int fd = creat("/root/workspace/creat-test.txt", 0644); // → SIGSYS (159)
vs the working equivalent:
int fd = open("/root/workspace/openat-test.txt", O_CREAT|O_WRONLY|O_TRUNC, 0644); // works
auditd confirms the blocked syscall (with --audit, tar completes successfully):
type=SECCOMP ... comm="tar" syscall=85 (creat)
Expected
creat should behave like openat(O_CREAT) (allow when the target path is writable). Blocking the legacy creat syscall with SIGSYS breaks common tools — tar fails silently when creating archives.
Impact
tar cf fails inside self-confine sandboxes (silently — no error message, just exit 159)
- Any other tool using
creat() directly is affected
Description
In
self-confinemode, the seccomp profile blocks thecreatsyscall (85), causing programs that use it (e.g. GNU tar when writing archives) to die with SIGSYS (exit code 159).openatwithO_CREATworks fine, so this is specific to the legacycreatsyscall.Environment
Steps to reproduce
Bad system call (core dumped), exit code 159.Root cause
Minimal C reproducer:
vs the working equivalent:
auditd confirms the blocked syscall (with
--audit, tar completes successfully):Expected
creatshould behave likeopenat(O_CREAT)(allow when the target path is writable). Blocking the legacycreatsyscall with SIGSYS breaks common tools — tar fails silently when creating archives.Impact
tar cffails inside self-confine sandboxes (silently — no error message, just exit 159)creat()directly is affected