Re: [PATCH] staging: android: vsoc: fix copy_from_user overrun

2019-04-15 Thread Dan Carpenter
On Mon, Apr 15, 2019 at 09:32:44AM +0300, Dan Carpenter wrote: > On Sun, Apr 14, 2019 at 05:37:26PM +0200, Vincent Stehlé wrote: > > The `np->permission' structure is smaller than the `np' structure but > > sizeof(*np) worth of data is copied in there. Fix the size passed to > > copy_from_user()

Re: [PATCH] staging: android: vsoc: fix copy_from_user overrun

2019-04-15 Thread Dan Carpenter
On Sun, Apr 14, 2019 at 05:37:26PM +0200, Vincent Stehlé wrote: > The `np->permission' structure is smaller than the `np' structure but > sizeof(*np) worth of data is copied in there. Fix the size passed to > copy_from_user() to avoid overrun. > > Fixes: 3d2ec9dcd5539d42 ("staging: Android: Add

[PATCH] staging: android: vsoc: fix copy_from_user overrun

2019-04-14 Thread Vincent Stehlé
The `np->permission' structure is smaller than the `np' structure but sizeof(*np) worth of data is copied in there. Fix the size passed to copy_from_user() to avoid overrun. Fixes: 3d2ec9dcd5539d42 ("staging: Android: Add 'vsoc' driver for cuttlefish.") Signed-off-by: Vincent Stehlé Cc: Greg