Re: [PATCH 1/2] USB: yurex: Fix buffer over-read in yurex_write()

2018-08-16 Thread Ben Hutchings
On Thu, 2018-08-16 at 04:15 +0200, Jann Horn wrote: > On Wed, Aug 15, 2018 at 10:44 PM Ben Hutchings > wrote: [...] > > @@ -446,6 +446,7 @@ static ssize_t yurex_write(struct file *file, const > > char __user *user_buffer, > > retval = -EFAULT; > > goto error; > >  

Re: [PATCH 1/2] USB: yurex: Fix buffer over-read in yurex_write()

2018-08-15 Thread Jann Horn
On Wed, Aug 15, 2018 at 10:44 PM Ben Hutchings wrote: > > If the written data starts with a digit, yurex_write() tries to parse > it as an integer using simple_strtoull(). This requires a null- > terminator, and currently there's no guarantee that there is one. Oh, good catch. > (The sample

[PATCH 1/2] USB: yurex: Fix buffer over-read in yurex_write()

2018-08-15 Thread Ben Hutchings
If the written data starts with a digit, yurex_write() tries to parse it as an integer using simple_strtoull(). This requires a null- terminator, and currently there's no guarantee that there is one. (The sample program at