Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhcpcd crashes with SIGSYS with latest Ferdora 41 glibc #421

Closed
sshambar opened this issue Dec 5, 2024 · 3 comments
Closed

dhcpcd crashes with SIGSYS with latest Ferdora 41 glibc #421

sshambar opened this issue Dec 5, 2024 · 3 comments
Labels

Comments

@sshambar
Copy link
Contributor

sshambar commented Dec 5, 2024

The latest patch to glibc 2.40 in Fedora 41 has added a vDSO getrandom() user-space implementation, ref:

The new patch calls internal_signal_block_all() in vgetrandom_get_state(), which attempts to call syscall rt_sigprocmask, and seccomp denies it leading to a crash:

dhcpcd terminated abnormally with signal 31/SYS
        #0  0x00007ffff7dd8521 getrandom_vdso (libc.so.6 + 0x1d521)
        #1  0x00007ffff7dd5f01 __GI___arc4random_buf.part.0 (libc.so.6 + 0x1af0>
        #2  0x00007ffff7dd6107 arc4random (libc.so.6 + 0x1b107)
        #3  0x00007ffff7dd6164 arc4random_uniform (libc.so.6 + 0x1b164)
        #4  0x000000000042a133 n/a (/home/devel/work/dhcpcd/src/dhcpcd + 0x2a13>
        ELF object binary architecture: AMD x86-64

Adding a simple patch to allow the syscall appears to fix the crash:

--- a/src/privsep-linux.c
+++ b/src/privsep-linux.c
@@ -349,6 +349,9 @@ static struct sock_filter ps_seccomp_filter[] = {
 #ifdef __NR_getrandom
        SECCOMP_ALLOW(__NR_getrandom),
 #endif
+#ifdef __NR_rt_sigprocmask
+       SECCOMP_ALLOW(__NR_rt_sigprocmask),
+#endif
 #ifdef __NR_getsockopt
        /* For route socket overflow */
        SECCOMP_ALLOW_ARG(__NR_getsockopt, 1, SOL_SOCKET),
@rsmarples
Copy link
Member

Thanks for the patch!

Hopefully this also fixes #410 and maybe #405

@sshambar
Copy link
Contributor Author

sshambar commented Dec 7, 2024

Thanks for the patch!
Anytime! - probably should have just submitted a patch to make your life easier :)

Hopefully this also fixes #410 and maybe #405
Appears likely to fix 410, but I think 405 may be something else...

@rsmarples
Copy link
Member

I do strive for the easy life :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants