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

Issue 2943793002: [CrOS Tether] Fix a buffer overflow issue caught by the ASAN bots. (Closed)

Created:
3 years, 6 months ago by Kyle Horimoto
Modified:
3 years, 6 months ago
Reviewers:
Lei Zhang
CC:
chromium-reviews, jlklein+watch-tether_chromium.org, tengs+watch-tether_chromium.org, hansberry+watch-tether_chromium.org, jhawkins+watch-tether_chromium.org, oshima+watch_chromium.org, lesliewatkins+watch-tether_chromium.org, khorimoto+watch-tether_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[CrOS Tether] Fix a buffer overflow issue caught by the ASAN bots. The issue is that memcpy() was used to copy (N+1) bytes from a source that was N bytes to a destination that was (N+1) bytes. The fix is only copying N bytes. BUG=672263, 734225 Review-Url: https://codereview.chromium.org/2943793002 Cr-Commit-Position: refs/heads/master@{#480235} Committed: https://chromium.googlesource.com/chromium/src/+/04f2b90690644acc3c81bdd98ab7f379eddb10b7

Patch Set 1 #

Total comments: 2

Patch Set 2 : thestig@ comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chromeos/components/tether/ble_scanner.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (6 generated)
Kyle Horimoto
I believe this fix works, but I'm not sure how to test this manually. Lei, ...
3 years, 6 months ago (2017-06-16 22:36:41 UTC) #2
Kyle Horimoto
On 2017/06/16 22:36:41, Kyle Horimoto wrote: > I believe this fix works, but I'm not ...
3 years, 6 months ago (2017-06-16 22:47:29 UTC) #3
Lei Zhang
In the CL description: '\0' character is also called the NUL character or NUL terminator. ...
3 years, 6 months ago (2017-06-16 22:52:46 UTC) #4
Lei Zhang
https://codereview.chromium.org/2943793002/diff/1/chromeos/components/tether/ble_scanner.cc File chromeos/components/tether/ble_scanner.cc (right): https://codereview.chromium.org/2943793002/diff/1/chromeos/components/tether/ble_scanner.cc#newcode232 chromeos/components/tether/ble_scanner.cc:232: string_contents_ptr[service_data->size()] = '\0'; Do you actually need to NUL-terminate ...
3 years, 6 months ago (2017-06-16 22:57:37 UTC) #5
Kyle Horimoto
>In the CL description: > >'\0' character is also called the NUL character or NUL ...
3 years, 6 months ago (2017-06-16 23:05:04 UTC) #7
Lei Zhang
lgtm
3 years, 6 months ago (2017-06-16 23:11:50 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2943793002/20001
3 years, 6 months ago (2017-06-16 23:12:41 UTC) #11
commit-bot: I haz the power
3 years, 6 months ago (2017-06-17 00:13:49 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/04f2b90690644acc3c81bdd98ab7...

Powered by Google App Engine
This is Rietveld 408576698