Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 23548034: Follow up to serialization validation code (Closed)

Created:
7 years, 3 months ago by sugoi1
Modified:
7 years, 2 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Follow up to serialization validation code 1 ) Added check for bool to make sure is it either 0 or 1 and not garbage 2 ) Added more solid kernel size checks in SkMatrixConvolutionImageFilter 3 ) Make sure array size is validated in SkMergeImageFilter BUG= Committed: http://code.google.com/p/skia/source/detail?r=11925

Patch Set 1 #

Total comments: 6

Patch Set 2 : Simplified readBool() #

Patch Set 3 : Made class specific switch debug only #

Patch Set 4 : Merged in changes from 23021015 #

Total comments: 6

Patch Set 5 : Changed 0xFFFFFFFE for ~1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -7 lines) Patch
src/core/SkValidatingReadBuffer.cpp View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 3 1 chunk +15 lines, -5 lines 0 comments Download
src/effects/SkMergeImageFilter.cpp View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 20 (0 generated)
sugoi1
https://codereview.chromium.org/23548034/diff/1/src/core/SkFlattenableSerialization.cpp File src/core/SkFlattenableSerialization.cpp (right): https://codereview.chromium.org/23548034/diff/1/src/core/SkFlattenableSerialization.cpp#newcode27 src/core/SkFlattenableSerialization.cpp:27: return reader.readFlattenableT<SkFlattenable>(); This isn't adding any security yet here, ...
7 years, 3 months ago (2013-09-13 15:12:05 UTC) #1
reed1
https://codereview.chromium.org/23548034/diff/1/include/core/SkFlattenableBuffers.h File include/core/SkFlattenableBuffers.h (right): https://codereview.chromium.org/23548034/diff/1/include/core/SkFlattenableBuffers.h#newcode115 include/core/SkFlattenableBuffers.h:115: // Use readFlattenableT to enforce a type check on ...
7 years, 3 months ago (2013-09-13 15:18:40 UTC) #2
sugoi1
On 2013/09/13 15:18:40, reed1 wrote: > https://codereview.chromium.org/23548034/diff/1/include/core/SkFlattenableBuffers.h > File include/core/SkFlattenableBuffers.h (right): > > https://codereview.chromium.org/23548034/diff/1/include/core/SkFlattenableBuffers.h#newcode115 > ...
7 years, 3 months ago (2013-09-13 15:26:45 UTC) #3
reed1
On 2013/09/13 15:26:45, sugoi1 wrote: > On 2013/09/13 15:18:40, reed1 wrote: > > > https://codereview.chromium.org/23548034/diff/1/include/core/SkFlattenableBuffers.h ...
7 years, 3 months ago (2013-09-13 15:34:52 UTC) #4
reed1
https://codereview.chromium.org/23548034/diff/1/src/core/SkValidatingReadBuffer.cpp File src/core/SkValidatingReadBuffer.cpp (right): https://codereview.chromium.org/23548034/diff/1/src/core/SkValidatingReadBuffer.cpp#newcode98 src/core/SkValidatingReadBuffer.cpp:98: fError |= !boolPtr || (*boolPtr) & 0xFFFFFFFE; Why are ...
7 years, 3 months ago (2013-09-13 15:42:56 UTC) #5
sugoi1
https://codereview.chromium.org/23548034/diff/1/src/core/SkValidatingReadBuffer.cpp File src/core/SkValidatingReadBuffer.cpp (right): https://codereview.chromium.org/23548034/diff/1/src/core/SkValidatingReadBuffer.cpp#newcode98 src/core/SkValidatingReadBuffer.cpp:98: fError |= !boolPtr || (*boolPtr) & 0xFFFFFFFE; On 2013/09/13 ...
7 years, 3 months ago (2013-09-13 16:53:44 UTC) #6
Stephen White
Since we don't have a fuzzer, IWBN to add unit tests for the different validation ...
7 years, 3 months ago (2013-09-13 16:55:31 UTC) #7
reed1
On 2013/09/13 16:53:44, sugoi1 wrote: > https://codereview.chromium.org/23548034/diff/1/src/core/SkValidatingReadBuffer.cpp > File src/core/SkValidatingReadBuffer.cpp (right): > > https://codereview.chromium.org/23548034/diff/1/src/core/SkValidatingReadBuffer.cpp#newcode98 > ...
7 years, 3 months ago (2013-09-13 17:58:41 UTC) #8
sugoi1
On 2013/09/13 17:58:41, reed1 wrote: > On 2013/09/13 16:53:44, sugoi1 wrote: > > > https://codereview.chromium.org/23548034/diff/1/src/core/SkValidatingReadBuffer.cpp ...
7 years, 3 months ago (2013-09-13 18:04:53 UTC) #9
reed1
On 2013/09/13 18:04:53, sugoi1 wrote: > On 2013/09/13 17:58:41, reed1 wrote: > > On 2013/09/13 ...
7 years, 3 months ago (2013-09-13 18:06:59 UTC) #10
reed1
Most of the changes I did not comment on, since you were replacing a static_cast ...
7 years, 3 months ago (2013-09-13 18:09:11 UTC) #11
sugoi1
On 2013/09/13 18:09:11, reed1 wrote: > Most of the changes I did not comment on, ...
7 years, 3 months ago (2013-09-13 18:23:39 UTC) #12
sugoi1
I made the more costly switch() in SkGPipeRead.cpp debug only, to see if this is ...
7 years, 3 months ago (2013-09-13 20:47:53 UTC) #13
sugoi1
Merged this cl with the serialization cl committed today. Only a few validation tests are ...
7 years, 2 months ago (2013-10-23 17:52:43 UTC) #14
reed1
lgtm w/ suggestion https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp File src/core/SkValidatingReadBuffer.cpp (right): https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp#newcode49 src/core/SkValidatingReadBuffer.cpp:49: if (value & 0xFFFFFFFE) { this ...
7 years, 2 months ago (2013-10-23 17:58:41 UTC) #15
sugoi1
https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp File src/core/SkValidatingReadBuffer.cpp (right): https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp#newcode49 src/core/SkValidatingReadBuffer.cpp:49: if (value & 0xFFFFFFFE) { On 2013/10/23 17:58:42, reed1 ...
7 years, 2 months ago (2013-10-23 18:07:42 UTC) #16
Stephen White
https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp File src/core/SkValidatingReadBuffer.cpp (right): https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp#newcode47 src/core/SkValidatingReadBuffer.cpp:47: uint32_t value = this->readInt(); Not new to this patch, ...
7 years, 2 months ago (2013-10-23 18:09:34 UTC) #17
sugoi1
https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp File src/core/SkValidatingReadBuffer.cpp (right): https://codereview.chromium.org/23548034/diff/22001/src/core/SkValidatingReadBuffer.cpp#newcode47 src/core/SkValidatingReadBuffer.cpp:47: uint32_t value = this->readInt(); On 2013/10/23 18:09:35, Stephen White ...
7 years, 2 months ago (2013-10-23 18:17:08 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/sugoi@chromium.org/23548034/82001
7 years, 2 months ago (2013-10-23 18:21:56 UTC) #19
commit-bot: I haz the power
7 years, 2 months ago (2013-10-23 18:33:20 UTC) #20
Message was sent while issue was closed.
Change committed as 11925

Powered by Google App Engine
This is Rietveld 408576698