]> granicus.if.org Git - zfs/commit
Fix bounds check in zio_crypt_do_objset_hmacs
authorTom Caputi <tcaputi@datto.com>
Thu, 22 Feb 2018 16:50:14 +0000 (11:50 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 22 Feb 2018 16:50:14 +0000 (08:50 -0800)
commitf8478fc2ca8d62f9562a4284426e8d3bd41c0cf0
treee6a7b4597b82719eb1a364b7f93918cd61eeeef4
parent09302a4ca86df2a758c5b883e28b0952cfa31ff7
Fix bounds check in zio_crypt_do_objset_hmacs

The current bounds check in zio_crypt_do_objset_hmacs() does not
properly handle the possible sizes of the objset_phys_t and
can therefore read outside the buffer's memory. If that memory
happened to match what the check was actually looking for, the
objset would fail to be owned, complaining that the MAC was
invalid.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7210
module/zfs/zio_crypt.c