]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <sasha.levin@oracle.com>
Thu, 23 Apr 2015 18:58:25 +0000 (14:58 -0400)
commit9b233a2fb7823cbbf0adeaf50586cef471da6bc7
tree70877f4d46bcb3fc7c1c7381a98061176e758486
parentb3d55b2f8587c96f82878b984383390509dd9a05
IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic

[ Upstream commit 8494057ab5e40df590ef6ef7d66324d3ae33356b ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/infiniband/core/umem.c