Skip to content

[openssh] Fix statx() killing sshd-auth on old kernel headers - #13

Open
Michal-Szczepaniak wants to merge 1 commit into
sailfishos:masterfrom
Michal-Szczepaniak:master
Open

Michal-Szczepaniak wants to merge 1 commit into
sailfishos:masterfrom
Michal-Szczepaniak:master

Conversation

@Michal-Szczepaniak

Copy link
Copy Markdown

The seccomp filter's SC_DENY(__NR_statx, EACCES) rule, meant to make glibc's statx()-based fstat() fail gracefully and fall back to the legacy stat syscalls, is guarded by "#ifdef __NR_statx" and silently disappears when built against kernel headers older than 5.1. statx() then falls through to the filter's default action (SECCOMP_RET_KILL) instead, killing sshd-auth outright whenever glibc happens to take the statx() path.

Same fix as the time64 syscalls: define __NR_statx here until the kernel headers get updated.

Mind you this was generated by LLM so please verify because I have no clue what it's talking about :D

The seccomp filter's SC_DENY(__NR_statx, EACCES) rule, meant to make
glibc's statx()-based fstat() fail gracefully and fall back to the
legacy stat syscalls, is guarded by "#ifdef __NR_statx" and silently
disappears when built against kernel headers older than 5.1. statx()
then falls through to the filter's default action (SECCOMP_RET_KILL)
instead, killing sshd-auth outright whenever glibc happens to take
the statx() path.

Same fix as the time64 syscalls: define __NR_statx here until the
kernel headers get updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant