HomeFreeBSD

Fix object reclaim when using large dnodes

Description

Fix object reclaim when using large dnodes

Currently, when the receive_object() code wants to reclaim an
object, it always assumes that the dnode is the legacy 512 bytes,
even when the incoming bonus buffer exceeds this length. This
causes a buffer overflow if --enable-debug is not provided and
triggers an ASSERT if it is. This patch resolves this issue and
adds an ASSERT to ensure this can't happen again.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7097
Closes #7433

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Apr 17 2018, 6:13 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Apr 17 2018, 6:13 PM
Parents
rG0c03d21ac99e: assertion in arc_release() during encrypted receive
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGe14a32b1c844: Fix object reclaim when using large dnodes (authored by Tom Caputi <tcaputi@datto.com>).Apr 17 2018, 6:13 PM