1. 16 2月, 2014 1 次提交
    • P
      /dev/mem: handle out-of-bounds read/write · 08d2d00b
      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 and return 0 when reading from
      and -EFBIG when writing to an offset that cannot be represented by a
      phys_addr_t.
      
      Note that the conditional is optimized out by the compiler if loff_t
      has the same size as phys_addr_t.
      Signed-off-by: NPetr Tesarik <ptesarik@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      08d2d00b
  2. 15 2月, 2014 9 次提交
  3. 09 2月, 2014 1 次提交
  4. 08 2月, 2014 29 次提交