lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] IB/qib: Validate ->show()/store() callbacks before calling them
On Thu, Nov 07, 2019 at 08:50:25AM +0530, Viresh Kumar wrote:
> The permissions of the read-only or write-only sysfs files can be
> changed (as root) and the user can then try to read a write-only file or
> write to a read-only file which will lead to kernel crash here.
>
> Protect against that by always validating the show/store callbacks.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/infiniband/hw/qib/qib_sysfs.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

\
 
 \ /
  Last update: 2019-11-07 08:16    [W:0.034 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site