#1029176 dhcpcd: "Main" process killed by systemd

#1029176#5
Date:
2023-01-18 21:17:19 UTC
From:
To:
Dear Maintainer,

Since the most recent update I'm no longer able to use dhcpcd. I'm not
sure if there's an interaction with systemd and/or seccomp.

dhcpcd is killed after an audit event regarding syscall #318:

2023-01-18T09:05:44.299064+01:00 zbox kernel: [10110.299013] audit: type=1326 audit(1674029144.292:13): \
    auid=4294967295 uid=120 gid=65534 ses=4294967295 subj=unconfined pid=16134 \
    comm="dhcpcd" exe="/usr/sbin/dhcpcd" sig=31 arch=c000003e syscall=318 compat=0 ip=0x7fec5af9a045 code=0x0

According to /usr/include/x86_64-linux-gnu/asm/unistd_64.h, this syscall
number is getrandom(), which should be allowed by the @system-service
SystemCallFilter in /lib/systemd/system/dhcpcd.service. Disabling the
SystemCallFilter or changing it to @known doesn't improve the situation.

This is a complete syslog extract showing one failed start of dhcpcd:

2023-01-18T09:05:44.284259+01:00 zbox dhcpcd[16132]: dhcpcd-9.4.1 starting
2023-01-18T09:05:44.285906+01:00 zbox dhcpcd[16135]: dev: loaded udev
2023-01-18T09:05:44.286005+01:00 zbox dhcpcd[16135]: ps_dropprivs: chroot: /usr/lib/dhcpcd: Operation not permitted
2023-01-18T09:05:44.286278+01:00 zbox dhcpcd[16132]: ps_dropprivs: chroot: /usr/lib/dhcpcd: Operation not permitted
2023-01-18T09:05:44.286351+01:00 zbox dhcpcd[16132]: ps_dropprivs: chroot: /usr/lib/dhcpcd: Operation not permitted
2023-01-18T09:05:44.286400+01:00 zbox dhcpcd[16135]: ps_dropprivs: chroot: /usr/lib/dhcpcd: Operation not permitted
2023-01-18T09:05:44.286459+01:00 zbox dhcpcd[16135]: DUID 00:04:03:00:02:00:04:00:05:00:00:06:00:07:00:08:00:09
2023-01-18T09:05:44.296952+01:00 zbox dhcpcd[16135]: eth0: IAID 2e:4e:fe:b6
2023-01-18T09:05:44.297026+01:00 zbox dhcpcd[16135]: ps_ctl_listen: read: Success
2023-01-18T09:05:44.297081+01:00 zbox dhcpcd[16135]: ps_ctl_recv: read: Success
2023-01-18T09:05:44.297172+01:00 zbox systemd[1]: dhcpcd.service: Main process exited, code=killed, status=31/SYS
2023-01-18T09:05:44.299064+01:00 zbox kernel: [10110.299013] audit: type=1326 audit(1674029144.292:13): \
    auid=4294967295 uid=120 gid=65534 ses=4294967295 subj=unconfined pid=16134 \
    comm="dhcpcd" exe="/usr/sbin/dhcpcd" sig=31 arch=c000003e syscall=318 compat=0 ip=0x7fec5af9a045 code=0x0
2023-01-18T09:06:55.943107+01:00 zbox dhcpcd[16135]: ps_sendcmdmsg: Connection refused
2023-01-18T09:06:55.943407+01:00 zbox dhcpcd[16135]: ps_inet_recvra: Connection refused
2023-01-18T09:07:14.369135+01:00 zbox systemd[1]: dhcpcd.service: State 'stop-sigterm' timed out. Killing.
2023-01-18T09:07:14.369676+01:00 zbox systemd[1]: dhcpcd.service: Killing process 16135 (dhcpcd) with signal SIGKILL.
2023-01-18T09:07:14.371498+01:00 zbox systemd[1]: dhcpcd.service: Failed with result 'signal'.

My workaround was to install udhcpc from busybox, but this package
doesn't provide IPv6 connectivity.

Thanks,

Beat Bolli

#1029176#8
Date:
2023-01-19 15:35:07 UTC
From:
To:
Greetings,

Something tells me that both of you have encountered the same bug.

We've just pushed dhcpcd 9.4.1-14 into unstable. Can you please check
whether that fixes it?

Martin-Éric

#1029176#13
Date:
2023-01-19 20:22:45 UTC
From:
To:
Yes, I assumed so, too.

Indeed, this new version works.

Thanks!

Beat

#1029176#16
Date:
2023-01-19 20:22:45 UTC
From:
To:
Yes, I assumed so, too.

Indeed, this new version works.

Thanks!

Beat

#1029176#21
Date:
2023-01-20 15:11:35 UTC
From:
To:
Marking FIXED as of 9.4.1-14 . I'll wait until it has trickled down to
Testing before closing.

Martin-Éric

#1029176#26
Date:
2023-01-20 19:59:38 UTC
From:
To:
Hello all,

The same for me - it works and thanks!

Greetings

        Helge

#1029176#29
Date:
2023-01-20 19:59:38 UTC
From:
To:
Hello all,

The same for me - it works and thanks!

Greetings

        Helge

#1029176#34
Date:
2023-01-22 05:40:49 UTC
From:
To:
On Fri, Jan 20, 2023 at 5:11 PM Martin-Éric Racine <martin-eric.racine@iki.fi> wrote:

Closing.

Martin-Éric