* leaking path in android binder: set_nice
@ 2018-09-25 17:27 Tong Zhang
2018-09-25 17:38 ` Greg KH
2018-09-25 17:52 ` Stephen Smalley
0 siblings, 2 replies; 4+ messages in thread
From: Tong Zhang @ 2018-09-25 17:27 UTC (permalink / raw)
To: linux-security-module
Kernel Version: 4.18.5
Problem Description:
When setting nice value, it is checked by LSM function security_task_setnice().
see kernel/sched/core.c:3972 SYSCALL_DEFINE1(nice, int, increment)
We discovered a leaking path in android binder which allows using binder?s interface to change
a process?s nice value. This path is leaked from being monitored by LSM.
see drivers/android/binder.c:1107 binder_set_nice.
- Tong
^ permalink raw reply [flat|nested] 4+ messages in thread
* leaking path in android binder: set_nice
2018-09-25 17:27 leaking path in android binder: set_nice Tong Zhang
@ 2018-09-25 17:38 ` Greg KH
2018-09-25 17:52 ` Stephen Smalley
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2018-09-25 17:38 UTC (permalink / raw)
To: linux-security-module
On Tue, Sep 25, 2018 at 01:27:11PM -0400, Tong Zhang wrote:
> Kernel Version: 4.18.5
>
> Problem Description:
>
> When setting nice value, it is checked by LSM function security_task_setnice().
> see kernel/sched/core.c:3972 SYSCALL_DEFINE1(nice, int, increment)
>
> We discovered a leaking path in android binder which allows using binder?s interface to change
> a process?s nice value. This path is leaked from being monitored by LSM.
> see drivers/android/binder.c:1107 binder_set_nice.
Can you please submit a patch for this to get the proper credit for
finding and fixing this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* leaking path in android binder: set_nice
2018-09-25 17:27 leaking path in android binder: set_nice Tong Zhang
2018-09-25 17:38 ` Greg KH
@ 2018-09-25 17:52 ` Stephen Smalley
2018-09-26 2:58 ` Theodore Y. Ts'o
1 sibling, 1 reply; 4+ messages in thread
From: Stephen Smalley @ 2018-09-25 17:52 UTC (permalink / raw)
To: linux-security-module
On 09/25/2018 01:27 PM, Tong Zhang wrote:
> Kernel Version: 4.18.5
>
> Problem Description:
>
> When setting nice value, it is checked by LSM function security_task_setnice().
> see kernel/sched/core.c:3972 SYSCALL_DEFINE1(nice, int, increment)
>
> We discovered a leaking path in android binder which allows using binder?s interface to change
> a process?s nice value. This path is leaked from being monitored by LSM.
> see drivers/android/binder.c:1107 binder_set_nice.
Not sure you want to invoke the LSM hook (or at least the same hook)
when binder is performing priority inheritance. There is a difference
between a userspace process switching its own priority and the kernel
binder driver performing it. IIUC, the can_nice() check is more about
honoring RLIMIT_NICE than anything else.
^ permalink raw reply [flat|nested] 4+ messages in thread
* leaking path in android binder: set_nice
2018-09-25 17:52 ` Stephen Smalley
@ 2018-09-26 2:58 ` Theodore Y. Ts'o
0 siblings, 0 replies; 4+ messages in thread
From: Theodore Y. Ts'o @ 2018-09-26 2:58 UTC (permalink / raw)
To: linux-security-module
On Tue, Sep 25, 2018 at 01:52:57PM -0400, Stephen Smalley wrote:
> On 09/25/2018 01:27 PM, Tong Zhang wrote:
> > Kernel Version: 4.18.5
> >
> > Problem Description:
> >
> > When setting nice value, it is checked by LSM function security_task_setnice().
> > see kernel/sched/core.c:3972 SYSCALL_DEFINE1(nice, int, increment)
> >
> > We discovered a leaking path in android binder which allows using binder?s interface to change
> > a process?s nice value. This path is leaked from being monitored by LSM.
> > see drivers/android/binder.c:1107 binder_set_nice.
>
> Not sure you want to invoke the LSM hook (or at least the same hook) when
> binder is performing priority inheritance. There is a difference between a
> userspace process switching its own priority and the kernel binder driver
> performing it. IIUC, the can_nice() check is more about honoring
> RLIMIT_NICE than anything else.
I agree with Stephen; it doesn't make sense to subject the binder PI
mechanism to the LSM hook.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-26 2:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-25 17:27 leaking path in android binder: set_nice Tong Zhang
2018-09-25 17:38 ` Greg KH
2018-09-25 17:52 ` Stephen Smalley
2018-09-26 2:58 ` Theodore Y. Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).