|
|
Created:
4 years, 4 months ago by groby-ooo-7-16 Modified:
4 years, 3 months ago CC:
chromium-reviews, groby+spellwatch_chromium.org, rlp+watch_chromium.org, rouslan+spell_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[Hunspell Fuzzer] Restrict fuzzer data to valid UTF8
Hunspell cannot handle invalid UTF8. Chrome makes sure that all
data is in valid UTF8 - this CL enforces the same for the fuzzer.
BUG=none
R=mmoroz@chromium.org
Committed: https://crrev.com/5d6411a1a10652b1a3d9ced8d744f7e427918805
Cr-Commit-Position: refs/heads/master@{#414878}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Add DEPS #Patch Set 3 : Clearly, adding a dependency is HARD. #
Messages
Total messages: 41 (21 generated)
LGTM Thank you groby@ for adding this and for fixing the typo as well :)
The CQ bit was checked by mmoroz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by inferno@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
kcc@chromium.org changed reviewers: + kcc@chromium.org
https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... File third_party/hunspell/fuzz/hunspell_fuzzer.cc (right): https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... third_party/hunspell/fuzz/hunspell_fuzzer.cc:25: // Chromium does - convert to UTF16, and back to UTF8. Valid UTF8 guaranteed. Where is the guarantee that Chromium always does that?
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_clobber_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
On 2016/08/18 21:52:12, kcc2 wrote: > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > File third_party/hunspell/fuzz/hunspell_fuzzer.cc (right): > > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > third_party/hunspell/fuzz/hunspell_fuzzer.cc:25: // Chromium does - convert to > UTF16, and back to UTF8. Valid UTF8 guaranteed. > Where is the guarantee that Chromium always does that? There is none, except for engineers making sure they actually feed valid data to third-party APIs. I honestly wouldn't know how to guarantee APIs are always used correctly - if you do, I'm happy to take suggestions. Ultimately, Hunspell is fundamentally broken with invalid UTF8 (i.e valid UTF8 is a necessary precondition for using hunspell, otherwise behavior is undefined). Having a fuzzer that uses invalid UTF8 just proves that point, but doesn't help in any way discovering meaningful bugs. We're not going to make all of hunspell deal with invalid encodings. If you'd like to be more diligent, you could add a fuzzer for HunspellEngine in Chromium instead, which is the only valid entry point. (Which also can't guaranteed, but it'd be at least odd to add a second one)
On 2016/08/18 22:11:14, groby wrote: > On 2016/08/18 21:52:12, kcc2 wrote: > > > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > > File third_party/hunspell/fuzz/hunspell_fuzzer.cc (right): > > > > > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > > third_party/hunspell/fuzz/hunspell_fuzzer.cc:25: // Chromium does - convert to > > UTF16, and back to UTF8. Valid UTF8 guaranteed. > > Where is the guarantee that Chromium always does that? > > There is none, except for engineers making sure they actually feed valid data to > third-party APIs. I honestly wouldn't know how to guarantee APIs are always used > correctly - if you do, I'm happy to take suggestions. > > Ultimately, Hunspell is fundamentally broken with invalid UTF8 (i.e valid UTF8 > is a necessary precondition for using hunspell, otherwise behavior is > undefined). Having a fuzzer that uses invalid UTF8 just proves that point, but > doesn't help in any way discovering meaningful bugs. We're not going to make all > of hunspell deal with invalid encodings. > > If you'd like to be more diligent, you could add a fuzzer for HunspellEngine in > Chromium instead, which is the only valid entry point. (Which also can't > guaranteed, but it'd be at least odd to add a second one) Also: Can't land yet - dependency chains are broken :( I'll investigate when I'm back in office (Fri or Mon). Likely, we only need to allow base/ dependency for the fuzzer subdir, but I don't know if we're OK with that.
On 2016/08/18 22:11:14, groby wrote: > On 2016/08/18 21:52:12, kcc2 wrote: > > > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > > File third_party/hunspell/fuzz/hunspell_fuzzer.cc (right): > > > > > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > > third_party/hunspell/fuzz/hunspell_fuzzer.cc:25: // Chromium does - convert to > > UTF16, and back to UTF8. Valid UTF8 guaranteed. > > Where is the guarantee that Chromium always does that? > > There is none, except for engineers making sure they actually feed valid data to > third-party APIs. I honestly wouldn't know how to guarantee APIs are always used > correctly - if you do, I'm happy to take suggestions. I would suspect that you can restrict the usage of hunspell to a single entry point in chromium (with some GN magic) and then only fuzz that entry point. > > Ultimately, Hunspell is fundamentally broken with invalid UTF8 (i.e valid UTF8 > is a necessary precondition for using hunspell, otherwise behavior is > undefined). Having a fuzzer that uses invalid UTF8 just proves that point, but > doesn't help in any way discovering meaningful bugs. We're not going to make all > of hunspell deal with invalid encodings. > > If you'd like to be more diligent, you could add a fuzzer for HunspellEngine in > Chromium instead, which is the only valid entry point. (Which also can't > guaranteed, but it'd be at least odd to add a second one) Precisely! That would make A LOT of sense, yes!
On 2016/08/18 22:15:00, kcc2 wrote: > On 2016/08/18 22:11:14, groby wrote: > > On 2016/08/18 21:52:12, kcc2 wrote: > > > > > > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > > > File third_party/hunspell/fuzz/hunspell_fuzzer.cc (right): > > > > > > > > > https://codereview.chromium.org/2223603002/diff/1/third_party/hunspell/fuzz/h... > > > third_party/hunspell/fuzz/hunspell_fuzzer.cc:25: // Chromium does - convert > to > > > UTF16, and back to UTF8. Valid UTF8 guaranteed. > > > Where is the guarantee that Chromium always does that? > > > > There is none, except for engineers making sure they actually feed valid data > to > > third-party APIs. I honestly wouldn't know how to guarantee APIs are always > used > > correctly - if you do, I'm happy to take suggestions. > > I would suspect that you can restrict the usage of hunspell to a single entry > point > in chromium (with some GN magic) and then only fuzz that entry point. > > > > > Ultimately, Hunspell is fundamentally broken with invalid UTF8 (i.e valid UTF8 > > is a necessary precondition for using hunspell, otherwise behavior is > > undefined). Having a fuzzer that uses invalid UTF8 just proves that point, but > > doesn't help in any way discovering meaningful bugs. We're not going to make > all > > of hunspell deal with invalid encodings. > > > > If you'd like to be more diligent, you could add a fuzzer for HunspellEngine > in > > Chromium instead, which is the only valid entry point. (Which also can't > > guaranteed, but it'd be at least odd to add a second one) > > Precisely! That would make A LOT of sense, yes! I don't think I currently have the bandwidth to do that. Anybody on your team to help out?
> I don't think I currently have the bandwidth to do that. Anybody on your team to > help out? Not on my team (Mike is OOO, I am not even Chromium committer, haven't seen this code before). Maybe someone wants to do it as a part of the fuzzathon? https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/MAiBRTllPuI In general, my goal is not to write fuzzers for every part of Google software myself, but to encourage code owners to do that (scales much better :)
The CQ bit was checked by groby@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-ge...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by groby@chromium.org to run a CQ dry run
Description was changed from ========== [Hunspell Fuzzer] Restrict fuzzer data to valid UTF8 Hunspell cannot handle invalid UTF8. Chrome makes sure that all data is in valid UTF8 - this CL enforces the same for the fuzzer. BUG=none R=mmoroz@chromium.org ========== to ========== [Hunspell Fuzzer] Restrict fuzzer data to valid UTF8 Hunspell cannot handle invalid UTF8. Chrome makes sure that all data is in valid UTF8 - this CL enforces the same for the fuzzer. BUG=none R=mmoroz@chromium.org ==========
groby@chromium.org changed reviewers: + thestig@chromium.org
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
+thestig for base/ approval to DEPSify them. inferno/kcc2: Are you OK w/ this landing?
lgtm It's better to have this fuzz target fixed this way than to have it broken.
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-ge...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by groby@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by groby@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mmoroz@chromium.org, thestig@chromium.org, kcc@chromium.org Link to the patchset: https://codereview.chromium.org/2223603002/#ps40001 (title: "Clearly, adding a dependency is HARD.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [Hunspell Fuzzer] Restrict fuzzer data to valid UTF8 Hunspell cannot handle invalid UTF8. Chrome makes sure that all data is in valid UTF8 - this CL enforces the same for the fuzzer. BUG=none R=mmoroz@chromium.org ========== to ========== [Hunspell Fuzzer] Restrict fuzzer data to valid UTF8 Hunspell cannot handle invalid UTF8. Chrome makes sure that all data is in valid UTF8 - this CL enforces the same for the fuzzer. BUG=none R=mmoroz@chromium.org ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== [Hunspell Fuzzer] Restrict fuzzer data to valid UTF8 Hunspell cannot handle invalid UTF8. Chrome makes sure that all data is in valid UTF8 - this CL enforces the same for the fuzzer. BUG=none R=mmoroz@chromium.org ========== to ========== [Hunspell Fuzzer] Restrict fuzzer data to valid UTF8 Hunspell cannot handle invalid UTF8. Chrome makes sure that all data is in valid UTF8 - this CL enforces the same for the fuzzer. BUG=none R=mmoroz@chromium.org Committed: https://crrev.com/5d6411a1a10652b1a3d9ced8d744f7e427918805 Cr-Commit-Position: refs/heads/master@{#414878} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/5d6411a1a10652b1a3d9ced8d744f7e427918805 Cr-Commit-Position: refs/heads/master@{#414878} |