Hello,

Since glibc 2.43 exports openat2, gnulib's openat2 module no longer
replaces it. GNU tar's extraction (the CVE-2025-45582 fix, which opens
with RESOLVE_BENEATH) then calls glibc's wrapper directly, and that
wrapper has no ENOSYS fallback.

systemd answers openat2 with ENOSYS on purpose, expecting callers to
fall back to openat: its RestrictSUIDSGID= seccomp filter cannot
inspect struct open_how. systemd implies that setting for every
DynamicUser= unit and refuses to lift it (systemd commit fb736873 kept
the rule for security reasons).

Result: tar -x fails with "Cannot open: Function not implemented" for
every entry in any such service on Ubuntu 26.04 (tar
1.35+dfsg-4ubuntu0.4, glibc 2.43, systemd 259). The same tar
built against glibc 2.39, which uses gnulib's replacement, works.

Reproducer:

  systemd-run --wait --pipe -p DynamicUser=yes -p StateDirectory=t \
    --working-directory=/var/lib/t sh -c \
    'mkdir -p s/d && echo hi > s/d/f && tar -C s -cf a.tar d && mkdir o && tar 
-C o -xf a.tar'

Suggested fix: keep the emulation fallback on ENOSYS even when libc
provides openat2, for example by always wrapping it on Linux.

Thanks,
Molnx


Reply via email to