Re: [PATCH 2/2] PM / Sleep: Check the file capability when writing wake lock interface

2018-12-31 Thread Andy Lutomirski
> On Dec 31, 2018, at 5:33 AM, Greg Kroah-Hartman > wrote: > >> On Mon, Dec 31, 2018 at 01:02:35PM +0100, Jann Horn wrote: >> On Mon, Dec 31, 2018 at 11:41 AM Greg Kroah-Hartman >> wrote: >>> On Mon, Dec 31, 2018 at 05:38:51PM +0800, joeyli wrote: Hi Greg, > On Sun, Dec

Re: [PATCH 2/2] PM / Sleep: Check the file capability when writing wake lock interface

2018-12-31 Thread Greg Kroah-Hartman
On Mon, Dec 31, 2018 at 01:02:35PM +0100, Jann Horn wrote: > On Mon, Dec 31, 2018 at 11:41 AM Greg Kroah-Hartman > wrote: > > > > On Mon, Dec 31, 2018 at 05:38:51PM +0800, joeyli wrote: > > > Hi Greg, > > > > > > On Sun, Dec 30, 2018 at 03:48:35PM +0100, Greg Kroah-Hartman wrote: > > > > On Sun, D

Re: [PATCH 2/2] PM / Sleep: Check the file capability when writing wake lock interface

2018-12-31 Thread Jann Horn
On Mon, Dec 31, 2018 at 11:41 AM Greg Kroah-Hartman wrote: > > On Mon, Dec 31, 2018 at 05:38:51PM +0800, joeyli wrote: > > Hi Greg, > > > > On Sun, Dec 30, 2018 at 03:48:35PM +0100, Greg Kroah-Hartman wrote: > > > On Sun, Dec 30, 2018 at 09:28:56PM +0800, Lee, Chun-Yi wrote: > > > > The wake lock/

Re: [PATCH 2/2] PM / Sleep: Check the file capability when writing wake lock interface

2018-12-31 Thread Greg Kroah-Hartman
On Mon, Dec 31, 2018 at 05:38:51PM +0800, joeyli wrote: > Hi Greg, > > On Sun, Dec 30, 2018 at 03:48:35PM +0100, Greg Kroah-Hartman wrote: > > On Sun, Dec 30, 2018 at 09:28:56PM +0800, Lee, Chun-Yi wrote: > > > The wake lock/unlock sysfs interfaces check that the writer must has > > > CAP_BLOCK_SU

Re: [PATCH 2/2] PM / Sleep: Check the file capability when writing wake lock interface

2018-12-31 Thread joeyli
Hi Greg, On Sun, Dec 30, 2018 at 03:48:35PM +0100, Greg Kroah-Hartman wrote: > On Sun, Dec 30, 2018 at 09:28:56PM +0800, Lee, Chun-Yi wrote: > > The wake lock/unlock sysfs interfaces check that the writer must has > > CAP_BLOCK_SUSPEND capability. But the checking logic can be bypassed > > by open

Re: [PATCH 2/2] PM / Sleep: Check the file capability when writing wake lock interface

2018-12-30 Thread Greg Kroah-Hartman
On Sun, Dec 30, 2018 at 09:28:56PM +0800, Lee, Chun-Yi wrote: > The wake lock/unlock sysfs interfaces check that the writer must has > CAP_BLOCK_SUSPEND capability. But the checking logic can be bypassed > by opening sysfs file within an unprivileged process and then writing > the file within a pri

[PATCH 2/2] PM / Sleep: Check the file capability when writing wake lock interface

2018-12-30 Thread Lee, Chun-Yi
The wake lock/unlock sysfs interfaces check that the writer must has CAP_BLOCK_SUSPEND capability. But the checking logic can be bypassed by opening sysfs file within an unprivileged process and then writing the file within a privileged process. The tricking way has been exposed by Andy Lutomirski