From: Paul Mundt <hidden> Date: 2010-11-24 06:26:47
On Sun, Nov 21, 2010 at 08:40:01PM +0300, Vasiliy Kulikov wrote:
(count + p) is not checked for integer overflow. If p < fbmemlength
and count = (size_t)(1 - p) (very big unsigned integer) then
count + p = 1 < fbmemlength and copy_to_user(base_addr+p, buf, count)
overflows base_addr.
Signed-off-by: Vasiliy Kulikov <redacted>
From: Dan Carpenter <hidden> Date: 2010-11-24 06:49:15
On Wed, Nov 24, 2010 at 03:25:58PM +0900, Paul Mundt wrote:
On Sun, Nov 21, 2010 at 08:40:01PM +0300, Vasiliy Kulikov wrote:
quoted
(count + p) is not checked for integer overflow. If p < fbmemlength
and count = (size_t)(1 - p) (very big unsigned integer) then
count + p = 1 < fbmemlength and copy_to_user(base_addr+p, buf, count)
overflows base_addr.
Signed-off-by: Vasiliy Kulikov <redacted>
Applied, thanks.
The patch is harmless, but the integer overflow would actually be caught
in rw_verify_area().
regards,
dan carpenter
From: Paul Mundt <hidden> Date: 2010-11-24 07:00:10
On Wed, Nov 24, 2010 at 09:46:49AM +0300, Dan Carpenter wrote:
On Wed, Nov 24, 2010 at 03:25:58PM +0900, Paul Mundt wrote:
quoted
On Sun, Nov 21, 2010 at 08:40:01PM +0300, Vasiliy Kulikov wrote:
quoted
(count + p) is not checked for integer overflow. If p < fbmemlength
and count = (size_t)(1 - p) (very big unsigned integer) then
count + p = 1 < fbmemlength and copy_to_user(base_addr+p, buf, count)
overflows base_addr.
Signed-off-by: Vasiliy Kulikov <redacted>
Applied, thanks.
The patch is harmless, but the integer overflow would actually be caught
in rw_verify_area().