[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210903080617.GA1957@kadam>
Date: Fri, 3 Sep 2021 11:06:17 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Todd Kjos <tkjos@...gle.com>
Cc: Martijn Coenen <maco@...roid.com>,
"open list:ANDROID DRIVERS" <devel@...verdev.osuosl.org>,
Greg KH <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>,
stable <stable@...r.kernel.org>,
Arve Hjønnevåg <arve@...roid.com>,
Martijn Coenen <maco@...gle.com>,
Joel Fernandes <joel@...lfernandes.org>,
kernel-team@...roid.com, Christian Brauner <christian@...uner.io>
Subject: Re: [PATCH] binder: make sure fd closes complete
On Thu, Sep 02, 2021 at 08:35:35AM -0700, Todd Kjos wrote:
> On Tue, Aug 31, 2021 at 12:24 AM Martijn Coenen <maco@...roid.com> wrote:
> >
> > On Mon, Aug 30, 2021 at 9:51 PM 'Todd Kjos' via kernel-team
> > <kernel-team@...roid.com> wrote:
> > >
> > > During BC_FREE_BUFFER processing, the BINDER_TYPE_FDA object
> > > cleanup may close 1 or more fds. The close operations are
> > > completed using the task work mechanism -- which means the thread
> > > needs to return to userspace or the file object may never be
> > > dereferenced -- which can lead to hung processes.
> > >
> > > Force the binder thread back to userspace if an fd is closed during
> > > BC_FREE_BUFFER handling.
> > >
> > > Signed-off-by: Todd Kjos <tkjos@...gle.com>
> > Reviewed-by: Martijn Coenen <maco@...roid.com>
>
> Please also add to stable releases 5.4 and later.
It would be better if this had a fixes tag so we knew which is the first
buggy commit.
There was a long Project Zero article about the Bad Binder exploit
because commit f5cb779ba163 ("ANDROID: binder: remove waitqueue when
thread exits.") was marked as # 4.14 but it didn't have a Fixes tag and
the actual buggy commit was in 4.9.
regards,
dan carpenter
Powered by blists - more mailing lists