-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
MemoryDenyWriteExecute=yes should not affect executables run due to notifications by systemd-udevd #5400
Description
Submission type
- Bug report
- Request for enhancement (RFE)
NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!
systemd version the issue has been seen with
v232
NOTE: Do not submit bug reports about anything but the two most recently released systemd versions upstream!
Used distribution
Debian 9 (stretch)
In case of bug report: Expected behaviour you didn't see
Some executables outside of systemd are no longer run, even though they should be called according to existing rules. This is complicated by the fact that the error shown in the journal is obscure (even with systemd debugging enabled), e.g. systemd-udevd[1510]: Process 'ifmgrctl' failed with exit code 127. This is even though the same example executable 'ifmgrctl' here is run just fine with systemd v215 used for Debian 8.
It turns out that the problem is due to MemoryDenyWriteExecute=yes being set in the default unit file for systemd-udevd.service, with the underlying as yet unresolved issue being due to the way that Golang created this 'ifmgrctl' executable most likely causing a segment mapping issue.
While it would be useful to have a warning message to detect infraction of the W^X check, and while it is easy enough to override MemoryDenyWriteExecute once the problem has been root-caused, for reasons of backwards compatibility, systemd-udevd.service should not inhibit calls to executables outside of systemd.
In case of bug report: Unexpected behaviour you saw
…
In case of bug report: Steps to reproduce the problem
Event notification to Golang-built executable due to systemd rules.