Re: [PATCH] /dev/mem: handle out-of-bounds read/write

2014-04-01 Thread Greg Kroah-Hartman
On Tue, Apr 01, 2014 at 11:29:30AM +0200, Petr Tesarik wrote: > On Thu, 30 Jan 2014 07:04:07 -0800 > Greg Kroah-Hartman wrote: > > > On Thu, Jan 30, 2014 at 03:03:32PM +0100, Petr Tesarik wrote: > > > On Thu, 30 Jan 2014 05:28:27 -0800 > > > Greg Kroah-Hartman wrote: > > > > > > > On Thu, Jan 3

Re: [PATCH] /dev/mem: handle out-of-bounds read/write

2014-04-01 Thread Petr Tesarik
On Thu, 30 Jan 2014 07:04:07 -0800 Greg Kroah-Hartman wrote: > On Thu, Jan 30, 2014 at 03:03:32PM +0100, Petr Tesarik wrote: > > On Thu, 30 Jan 2014 05:28:27 -0800 > > Greg Kroah-Hartman wrote: > > > > > On Thu, Jan 30, 2014 at 09:48:02AM +0100, Petr Tesarik wrote: > > > > The loff_t type may b

Re: [PATCH] /dev/mem: handle out-of-bounds read/write

2014-01-30 Thread Greg Kroah-Hartman
On Thu, Jan 30, 2014 at 03:03:32PM +0100, Petr Tesarik wrote: > On Thu, 30 Jan 2014 05:28:27 -0800 > Greg Kroah-Hartman wrote: > > > On Thu, Jan 30, 2014 at 09:48:02AM +0100, Petr Tesarik wrote: > > > The loff_t type may be wider than phys_addr_t (e.g. on 32-bit systems). > > > Consequently, the

Re: [PATCH] /dev/mem: handle out-of-bounds read/write

2014-01-30 Thread Petr Tesarik
On Thu, 30 Jan 2014 05:28:27 -0800 Greg Kroah-Hartman wrote: > On Thu, Jan 30, 2014 at 09:48:02AM +0100, Petr Tesarik wrote: > > The loff_t type may be wider than phys_addr_t (e.g. on 32-bit systems). > > Consequently, the file offset may be truncated in the assignment. > > Currently, /dev/mem wr

Re: [PATCH] /dev/mem: handle out-of-bounds read/write

2014-01-30 Thread Greg Kroah-Hartman
On Thu, Jan 30, 2014 at 09:48:02AM +0100, Petr Tesarik wrote: > The loff_t type may be wider than phys_addr_t (e.g. on 32-bit systems). > Consequently, the file offset may be truncated in the assignment. > Currently, /dev/mem wraps around, which may cause applications to read > or write incorrect r

[PATCH] /dev/mem: handle out-of-bounds read/write

2014-01-30 Thread Petr Tesarik
The loff_t type may be wider than phys_addr_t (e.g. on 32-bit systems). Consequently, the file offset may be truncated in the assignment. Currently, /dev/mem wraps around, which may cause applications to read or write incorrect regions of memory by accident. Let's follow POSIX file semantics here