[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190809145123.GC16262@kroah.com>
Date: Fri, 9 Aug 2019 16:51:23 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Hridya Valsaraju <hridya@...gle.com>
Cc: Arve Hjønnevåg <arve@...roid.com>,
Todd Kjos <tkjos@...roid.com>,
Martijn Coenen <maco@...roid.com>,
Joel Fernandes <joel@...lfernandes.org>,
Christian Brauner <christian@...uner.io>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
kernel-team@...roid.com,
Christian Brauner <christian.brauner@...ntu.com>
Subject: Re: [PATCH v3 2/2] binder: Validate the default binderfs device
names.
On Thu, Aug 08, 2019 at 03:27:26PM -0700, Hridya Valsaraju wrote:
> Length of a binderfs device name cannot exceed BINDERFS_MAX_NAME.
> This patch adds a check in binderfs_init() to ensure the same
> for the default binder devices that will be created in every
> binderfs instance.
>
> Co-developed-by: Christian Brauner <christian.brauner@...ntu.com>
> Signed-off-by: Christian Brauner <christian.brauner@...ntu.com>
> Signed-off-by: Hridya Valsaraju <hridya@...gle.com>
> ---
> drivers/android/binderfs.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> index aee46dd1be91..55c5adb87585 100644
> --- a/drivers/android/binderfs.c
> +++ b/drivers/android/binderfs.c
> @@ -570,6 +570,18 @@ static struct file_system_type binder_fs_type = {
> int __init init_binderfs(void)
> {
> int ret;
> + const char *name;
> + size_t len;
> +
> + /* Verify that the default binderfs device names are valid. */
> + name = binder_devices_param;
> + for (len = strcspn(name, ","); len > 0; len = strcspn(name, ",")) {
> + if (len > BINDERFS_MAX_NAME)
> + return -E2BIG;
> + name += len;
> + if (*name == ',')
> + name++;
> + }
Shouldn't this be a bugfix separate from patch 1/2?
And shouldn't it be backported to older kernels that currently have this
issue?
thanks,
greg k-h
Powered by blists - more mailing lists