mtpd: add getrandom(2) to seccomp policy
Coredumps for mtpd show that we're dying with:
Program terminated with signal SIGSYS, Bad system call.
The syscall is getrandom().
getrandom() was introduced in the 3.17 kernel:
https://lwn.net/Articles/605828/
commit c6e9d6f38894798696f23c8084ca7edbf16ee895
Author: Theodore Ts'o <tytso@mit.edu>
Date: Thu Jul 17 04:13:05 2014 -0400
random: introduce getrandom(2) system call
and apparently is getting picked up by udev now [1].
Add it to the seccomp policies to avoid this crash.
[1] Introduced in udev-217:
https://github.com/systemd/systemd/commit/539618a0ddc2dc7f0fbe28de2ae0e07b34c81e60
commit 539618a0ddc2dc7f0fbe28de2ae0e07b34c81e60
Author: Lennart Poettering <lennart@poettering.net>
Date: Wed Oct 29 17:06:32 2014 +0100
util: make use of the new getrandom() syscall if it is available when needing entropy
Doesn't require an fd, and could be a bit faster, so let's make use of
it, if it is available.
I guess this happened with our udev 208 -> 225 upgrade.
BUG=chromium:686802
TEST=check for mtpd crashes on startup
Change-Id: I52ec8e7bd66373f9c7201242f26b453dfd0351e1
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/435555
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
3 files changed