Re: leaking path in android binder: set_nice
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
Re: leaking path in android binder: set_nice
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
Re: leaking path in android binder: set_nice
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.
Re: leaking path in android binder: set_nice
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.
Re: leaking path in android binder: set_nice
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
Re: leaking path in android binder: set_nice
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
leaking path in android binder: set_nice
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
leaking path in android binder: set_nice
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