You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org> on 2017/08/22 01:05:49 UTC

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Thomas Tauber-Marshall has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/7769

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................

IMPALA-5798: ASAN use-after-poison in Parquet decoder

In ParquetLevelDecoder::Init() for RLE encoding, we read the metadata
size and advance the data buffer past it. If the metadata size is
corrupted, it can cause us to incorrectly read past the end of the
buffer.

This patch checks that the metadata size is less than the total size
of the buffer, and returns an error if it isn't.

Testing:
- Ran test_scanners_fuzz.py under ASAN for a few hours without hitting
  the use-after-poison.

Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
---
M be/src/exec/parquet-column-readers.cc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/7769/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7769/1//COMMIT_MSG
Commit Message:

Line 18: - Ran test_scanners_fuzz.py under ASAN for a few hours without hitting
Were you able to easily reproduce without your fix?


-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Alex Behm (Code Review)" <ge...@cloudera.org>.
Alex Behm has posted comments on this change.

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................


Patch Set 2: Code-Review+1

-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................


Patch Set 2: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................


Patch Set 2: Verified+1

-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................


IMPALA-5798: ASAN use-after-poison in Parquet decoder

In ParquetLevelDecoder::Init() for RLE encoding, we read the metadata
size and advance the data buffer past it. If the metadata size is
corrupted, it can cause us to incorrectly read past the end of the
buffer.

This patch checks that the metadata size is less than the total size
of the buffer, and returns an error if it isn't.

Testing:
- Ran test_scanners_fuzz.py under ASAN 500 times without hitting the
  use-after-poison (previously it would usually hit in < 100 runs).

Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Reviewed-on: http://gerrit.cloudera.org:8080/7769
Reviewed-by: Alex Behm <al...@cloudera.com>
Reviewed-by: Matthew Jacobs <mj...@cloudera.com>
Tested-by: Impala Public Jenkins
---
M be/src/exec/parquet-column-readers.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Impala Public Jenkins: Verified
  Matthew Jacobs: Looks good to me, approved
  Alex Behm: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change.

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/1135/

-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Thomas Tauber-Marshall has posted comments on this change.

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7769/1//COMMIT_MSG
Commit Message:

Line 18: - Ran test_scanners_fuzz.py under ASAN 500 times without hitting the
> Were you able to easily reproduce without your fix?
Yes.


-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-5798: ASAN use-after-poison in Parquet decoder

Posted by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org>.
Thomas Tauber-Marshall has uploaded a new patch set (#2).

Change subject: IMPALA-5798: ASAN use-after-poison in Parquet decoder
......................................................................

IMPALA-5798: ASAN use-after-poison in Parquet decoder

In ParquetLevelDecoder::Init() for RLE encoding, we read the metadata
size and advance the data buffer past it. If the metadata size is
corrupted, it can cause us to incorrectly read past the end of the
buffer.

This patch checks that the metadata size is less than the total size
of the buffer, and returns an error if it isn't.

Testing:
- Ran test_scanners_fuzz.py under ASAN 500 times without hitting the
  use-after-poison (previously it would usually hit in < 100 runs).

Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
---
M be/src/exec/parquet-column-readers.cc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/69/7769/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7769
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3f3d0d998f7581c7c935d98fde886f145efd61a8
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Alex Behm <al...@cloudera.com>