tftp: Set an upper bound on the amount of data transfered by tftp.
When loading a payload, make sure we don't write beyond the end of the area
we're loading into.
BUG=chromium:270851
TEST=Built and netbooted on link. Set the maximum size too low purposefully to
make sure it was caught.
BRANCH=None
Change-Id: Icb6f9d47f9e9c31a44c48d1544b3d688aec01d6c
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/65508
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
3 files changed