diff options
author | Xi Wang <xi.wang@gmail.com> | 2012-04-20 15:49:44 -0500 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-05-14 12:12:27 -0500 |
commit | 76aa542fb90e3e91edb1146d10ca7cf2cae8e7e9 (patch) | |
tree | d01a137e60126d140790c64f1a3994c62792b61e /drivers/block | |
parent | 065a68f9167e20f321a62d044cb2c3024393d455 (diff) | |
download | linux-next-76aa542fb90e3e91edb1146d10ca7cf2cae8e7e9.tar.gz |
ceph: fix bounds check in ceph_decode_need and ceph_encode_need
Given a large n, the bounds check (*p + n > end) can be bypassed due to
pointer wraparound. A safer check is (n > end - *p).
[elder@dreamhost.com: inverted test and renamed ceph_has_room()]
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Alex Elder <elder@dreamhost.com>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions