Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311739

Re: [PATCH] usb: fix potential integer overflow in usb_sg_init

From Alan Stern <stern@rowland.harvard.edu>
Newsgroups linux.kernel
Subject Re: [PATCH] usb: fix potential integer overflow in usb_sg_init
Date 2016-01-18 19:40 +0100
Message-ID <qSmSC-4zc-7@gated-at.bofh.it> (permalink)
References <qSltw-3KT-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] usb: fix potential integer overflow in usb_sg_init Insu Yun <wuninsu@gmail.com> - 2016-01-18 18:10 +0100
  Re: [PATCH] usb: fix potential integer overflow in usb_sg_init Alan Stern <stern@rowland.harvard.edu> - 2016-01-18 19:40 +0100

csiph-web