Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1559881
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 0/4] make call_usermodehelper a bit more "safe" |
| Date | 2017-01-16 17:50 +0100 |
| Message-ID | <t0iDL-30L-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hi all, Here's a second cut at my attempt to make call_usermodehelper a bit more "safe". It includes some patches from my previous series, and one new one. In all, this is a much smaller patchset, with better functionality in the end. The issue is that if you end up getting write access to kernel memory, if you change the string '/sbin/hotplug' to point to '/home/hacked/my_binary', then the next uevent that the system makes will call this binary instead of the "trusted" one. This series addresses this issue by doing two different things. The first 2 patches move a lot of existing call_usermodehelper binaries to read-only memory, preventing them from being able to be changed at all. The last patch introduces a new configuration option, STATIC_USERMODEHELPER. This option routes all call_usermodehelper() calls to a single userspace binary. That binary can then filter/mediate/blacklist/whitelist/whatever the "real" usermodehelper binaries and call them as needed (it determines the real one by looking at the first argument.) The location of this new binary can be set with the STATIC_USERMODEHELPER_PATH configuration option. If the user wants call_usermodehelper() to be disabled entirely, STATIC_USERMODEHELPER_PATH can be set to "", which will cause all call_usermodehelper() calls to do nothing, but return successful. Many thanks to the reviewers of the last patch series for their hints on how to mark strings properly to live in read-only memory always, and to Neil Brown for the idea of STATIC_USERMODEHELPER. If there are no complaints about these patches, I'll take them through my driver-core tree. thanks, greg k-h
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 0/4] make call_usermodehelper a bit more "safe" Greg KH <gregkh@linuxfoundation.org> - 2017-01-16 17:50 +0100
[PATCH 2/3] Make static usermode helper binaries constant Greg KH <gregkh@linuxfoundation.org> - 2017-01-16 18:00 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant "J. Bruce Fields" <bfields@fieldses.org> - 2017-01-16 22:30 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant Greg KH <gregkh@linuxfoundation.org> - 2017-01-17 08:20 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant "J. Bruce Fields" <bfields@fieldses.org> - 2017-01-17 16:20 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant Greg KH <gregkh@linuxfoundation.org> - 2017-01-17 16:30 +0100
Re: [kernel-hardening] Re: [PATCH 2/3] Make static usermode helper binaries constant Greg KH <gregkh@linuxfoundation.org> - 2017-01-19 13:10 +0100
Re: [kernel-hardening] Re: [PATCH 2/3] Make static usermode helper binaries constant "J. Bruce Fields" <bfields@fieldses.org> - 2017-01-19 17:30 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant Jeff Layton <jlayton@poochiereds.net> - 2017-01-17 16:50 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant Greg KH <gregkh@linuxfoundation.org> - 2017-01-17 17:00 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant Jeff Layton <jlayton@poochiereds.net> - 2017-01-17 17:10 +0100
Re: [PATCH 2/3] Make static usermode helper binaries constant Greg KH <gregkh@linuxfoundation.org> - 2017-01-17 17:20 +0100
[PATCH 1/3] kmod: make usermodehelper path a const string Greg KH <gregkh@linuxfoundation.org> - 2017-01-16 18:00 +0100
Re: [PATCH 0/4] make call_usermodehelper a bit more "safe" Greg KH <gregkh@linuxfoundation.org> - 2017-01-16 18:00 +0100
[PATCH 3/3] Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper() Greg KH <gregkh@linuxfoundation.org> - 2017-01-16 18:00 +0100
Re: [PATCH 3/3] Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper() Jeff Layton <jlayton@poochiereds.net> - 2017-01-17 17:30 +0100
Re: [PATCH 3/3] Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper() Greg KH <gregkh@linuxfoundation.org> - 2017-01-17 17:40 +0100
Re: [PATCH 3/3] Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper() Jeff Layton <jlayton@poochiereds.net> - 2017-01-17 18:00 +0100
Re: [PATCH 0/4] make call_usermodehelper a bit more "safe" Kees Cook <keescook@chromium.org> - 2017-01-17 18:30 +0100
csiph-web