linux/drivers/android
Christian Brauner da8ddba566 binderfs: respect limit on binder control creation
We currently adhere to the reserved devices limit when creating new
binderfs devices in binderfs instances not located in the inital ipc
namespace. But it is still possible to rob the host instances of their 4
reserved devices by creating the maximum allowed number of devices in a
single binderfs instance located in a non-initial ipc namespace and then
mounting 4 separate binderfs instances in non-initial ipc namespaces. That
happens because the limit is currently not respected for the creation of
the initial binder-control device node. Block this nonsense by performing
the same check in binderfs_binder_ctl_create() that we perform in
binderfs_binder_device_create().

Fixes: 36bdf3cae0 ("binderfs: reserve devices for initial mount")
Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-30 15:23:48 +01:00
..
binder_alloc_selftest.c android: binder: Add global lru shrinker to binder 2017-08-28 16:47:17 +02:00
binder_alloc.c Merge 4.20-rc5 into char-misc-next 2018-12-03 07:56:15 +01:00
binder_alloc.h binder: fix kerneldoc header for struct binder_buffer 2018-12-06 15:44:14 +01:00
binder_internal.h binder: implement binderfs 2018-12-19 09:40:13 +01:00
binder_trace.h binder: use standard functions to allocate fds 2018-09-14 15:22:36 +02:00
binder.c binder: fix CONFIG_ANDROID_BINDER_DEVICES 2019-01-30 15:21:01 +01:00
binderfs.c binderfs: respect limit on binder control creation 2019-01-30 15:23:48 +01:00
Kconfig binder: implement binderfs 2018-12-19 09:40:13 +01:00
Makefile binder: implement binderfs 2018-12-19 09:40:13 +01:00