diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-09-22 23:43:46 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-12 11:27:32 +0200 |
| commit | b74a45450f80a56a3aca515dd147bd95b18394bf (patch) | |
| tree | 521debd46dc62411daa88c3067429e9c302600ce /drivers/base/platform.c | |
| parent | e84b4a008365b7edbd842a063ae28d040a98db25 (diff) | |
USB: devio: Don't corrupt user memory
commit fa1ed74eb1c233be6131ec92df21ab46499a15b6 upstream.
The user buffer has "uurb->buffer_length" bytes. If the kernel has more
information than that, we should truncate it instead of writing past
the end of the user's buffer. I added a WARN_ONCE() to help the user
debug the issue.
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/platform.c')
0 files changed, 0 insertions, 0 deletions
