]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic
authorShachar Raindel <raindel@mellanox.com>
Wed, 18 Mar 2015 17:39:08 +0000 (17:39 +0000)
committerRoland Dreier <roland@purestorage.com>
Thu, 2 Apr 2015 16:53:59 +0000 (09:53 -0700)
commitbccf33e6801224d0de57b436ad18208433bf4924
treecb7e513066a2891d400d99a3c60cf4ed577adb5b
parent5c5959bc24fef6e9966a100ec9bab51a97c1682b
IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic

Properly verify that the resulting page aligned end address is larger
than both the start address and the length of the memory area requested.

Both the start and length arguments for ib_umem_get are controlled by
the user. A misbehaving user can provide values which will cause an
integer overflow when calculating the page aligned end address.

This overflow can cause also miscalculation of the number of pages
mapped, and additional logic issues.

Addresses: CVE-2014-8159
Cc: <stable@vger.kernel.org>
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/umem.c