This repository was archived by the owner on Nov 17, 2023. It is now read-only.
[MXNET-969] Fix buffer overflow in RNNOp#12603
Merged
marcoabreu merged 2 commits intoapache:masterfrom Sep 21, 2018
Merged
Conversation
Co-authored-by: Sina Md <mdsina@amazon.com>
dcfa65a to
7e91550
Compare
Contributor
Author
|
@mxnet-label-bot can you please add label [pr-awaiting-review] |
Contributor
|
Adding some relevant folks: @apeforest @samskalicky @anirudh2290 |
apeforest
reviewed
Sep 20, 2018
9750480 to
9189bcf
Compare
9189bcf to
e89deca
Compare
7 tasks
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fixes an buffer overflow detected by ASAN. Fix is required before we can merge ASAN checks widely into our CI.
Co-authored-by: Sina Md mdsina@amazon.com
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
ASAN Summary
Buffer overflow in RNNOp::Backward(..)
SUMMARY: AddressSanitizer: heap-buffer-overflow /work/mxnet/src/operator/./rnn-inl.h:555 in mxnet::op::RNNOp::Backward(mxnet::OpContext const&, std::vector<mxnet::TBlob, std::allocatormxnet::TBlob > const&, std::vector<mxnet::TBlob, std::allocatormxnet::TBlob > const&, std::vector<mxnet::TBlob, std::allocatormxnet::TBlob > const&, std::vector<mxnet::OpReqType, std::allocatormxnet::OpReqType > const&, std::vector<mxnet::TBlob, std::allocatormxnet::TBlob > const&, std::vector<mxnet::TBlob, std::allocatormxnet::TBlob > const&)
Shadow bytes around the buggy address:
0x0c048001b850: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x0c048001b860: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x0c048001b870: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x0c048001b880: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x0c048001b890: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
=>0x0c048001b8a0: fa fa fd fa fa fa 00[04]fa fa fa fa fa fa fa fa
0x0c048001b8b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c048001b8c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c048001b8d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c048001b8e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c048001b8f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==91==ABORTING
Full output will be attached in work log.
Testing Done:
Verified locally this fixes the issue. Will integrate test coverage for this type of error into CI at a future date for all Python tests.