lkml.org 
[lkml]   [2016]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: fix potential integer overflow in usb_sg_init
On Mon, 18 Jan 2016, Insu Yun wrote:

> If nents value is sufficient large, e.g 0x40000000,
> then it can overflow size in kmalloc and heap overflow happesns.
> Therefore nents value needs to be checked to prevent overflow.

I don't see why. You seem to be assuming that failure with -EINVAL is
better than failure with a heap overflow. I disagree; a heap overflow
provides more debugging information to help locate the reason for the
underlying problem.

Alan Stern


\
 
 \ /
  Last update: 2016-01-18 20:01    [W:0.057 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site