| Issue 38845: | Out of bounds array read in FTP network transaction | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Hi, I've found an out-of-bounds array indexing bug in the current version of Google Chrome (4.1.249.1036). Please find attached a detailed description of the bug. Tobias Klein
,
Mar 21, 2010
able to reproduce browser crash on chrome trunk version 5.0.359.0. looking more into it.
Status: Started
Owner: infe...@chromium.org
,
Mar 21, 2010
Thanks Tobias for this bug. I have prepared the patch and just testing it.
Summary: Out of bounds array read in FTP network transaction
,
Mar 21, 2010
I've not tried reproducing. A few questions: 1) Is this indeed a browser process crash (chrome dies completely) or a renderer process crash (sad tab only)? If so, why are we not parsing inside the renderer? 2) What does "line.erase(-1);" do? Could an attacker do more than crash the process? Depending on the answers to these questions, this could range from Sec-Critical to Sec- None...
,
Mar 21, 2010
hey BJ, here are the answers :) 1) it is a browser process crash as i get the "Whoa ! Chrome has crashed" crash. as i understand the network layer processing occurs in browser process and not in our renderer sandbox, but i might be wrong here.. 2) the crash occurs because of out of array read at previous line[line.length() - 1]. i dont see the program ever processing the next next line.erase(-1).
,
Mar 21, 2010
Inferno -- how do production builds of Linux and Mac behave, out of curiousity?
,
Mar 21, 2010
Oh, and in terms of severity of current production builds -- it's luckily low because Windows does runtime checking of STL indexes even in optimized builds.
Labels: SecSeverity-Low Mstone-4.1
,
Mar 21, 2010
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=42204
------------------------------------------------------------------------
r42204 | inferno@chromium.org | 2010-03-21 17:36:31 -0700 (Sun, 21 Mar 2010) | 4 lines
Changed paths:
M http://src.chromium.org/viewvc/chrome/trunk/src/net/ftp/ftp_network_transaction.cc?r1=42204&r2=42203
Fix the out-of-bounds array read in the ftp response.
BUG=38845
TEST=Pass a ftp server response having two double quotes with no character in between and verify no browser crash happens.
Review URL: http://codereview.chromium.org/1082008
------------------------------------------------------------------------
,
Mar 21, 2010
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=42205
------------------------------------------------------------------------
r42205 | inferno@chromium.org | 2010-03-21 17:59:31 -0700 (Sun, 21 Mar 2010) | 7 lines
Changed paths:
M http://src.chromium.org/viewvc/chrome/branches/249/src/net/ftp/ftp_network_transaction.cc?r1=42205&r2=42204
Merge 42204 - Fix the outofbounds array read in the ftp response.
BUG=38845
TEST=Pass a ftp server response having two double quotes with no character in between and verify no browser crash happens.
Review URL: http://codereview.chromium.org/1082008
TBR=inferno@chromium.org
Review URL: http://codereview.chromium.org/1133007
------------------------------------------------------------------------
,
Mar 21, 2010
Fix merged to 4.1. Results for Mac and Linux builds Chrome 5.0.307.11 beta on Mac OS X - No Crash Chrome 5.0.353.0 on ubuntu linux - No Crash
Status: FixUnreleased
,
Mar 22, 2010
Re: comment #5 1) Is there a need for this to happen in the browser? Can we move it to the renderer as a mitigation? 2) Can you prove that it will never hit that line? Assuming that the memory immediately in front of the "line" variable can contain any value and that this value may be attacker controlled or at least influenced, I'd like to know what happens when you execute "line.erase(1)" on an empty line. We have to either rule out exploitability or assume it can be exploited... I'll see if I can debug this now.
,
Mar 22, 2010
Nevermind: I did not read comment #7 :) So, this ALWAYS causes a browser crash because the index (-1) is invalid, which triggers an int 3. It's a DoS.
,
Mar 22, 2010
I'd still like to know why we are parsing this in the browser - is there any reason why we cannot do this parsing in the renderer?
,
Mar 22, 2010
This is a network stack question. We're parsing the directory listing in the renderer because it's just downloaded by the network stack, and we can process it later, after closing the connection to the server. However, parsing the control socket responses directly influences the next actions taken by the network transaction. Doing that in the renderer doesn't sound like a good idea, because we don't trust the renderer. On the other hand, there was an idea to run the network stack out-of-process. This may be applicable here.
Cc: phajdan...@chromium.org
Labels: -Area-Undefined Area-Internals Internals-Network
,
Mar 22, 2010
Ok, that makes sense. It's good to keep the renderer away from the network layer. It's also a good idea to keep the processing of network data outside the browser process. Is there an open feature request for moving HTTP/FTP/other network response processing out-of-process?
,
Mar 22, 2010
I think we don't have such bug, but maybe I just failed to find it. Darin or Wan-Teh should know for sure.
,
Mar 22, 2010
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=42238
------------------------------------------------------------------------
r42238 | inferno@chromium.org | 2010-03-22 11:27:02 -0700 (Mon, 22 Mar 2010) | 5 lines
Changed paths:
M http://src.chromium.org/viewvc/chrome/trunk/src/net/ftp/ftp_network_transaction_unittest.cc?r1=42238&r2=42237
Add unit test to check for zero length dir in FTP PWD response.
BUG=38845
TEST=FtpNetworkTransactionTest.ZeroLengthDirInPWD
Review URL: http://codereview.chromium.org/1166001
------------------------------------------------------------------------
,
Mar 23, 2010
Hi Tobias -- thanks for the report! We will release the fix shortly and credit you as "Tobias Klein" unless we hear otherwise.
,
Mar 23, 2010
Hi, could you please use "Tobias Klein (www.trapkit.de)"? Thanks!
,
Mar 27, 2010
(No comment was entered for this change.)
Cc: anan...@chromium.org kr...@chromium.org
,
Mar 30, 2010
Verified with Google Chrome 4.1.249.1045 (Official Build 42898) and it doesn't crash.
,
Mar 30, 2010
(No comment was entered for this change.)
Cc: srikan...@chromium.org
,
Mar 31, 2010
Verified fixed on Google Chrome 5.0.365.0 (Official Build 43016) unknown WebKit 533.3 V8 2.2.0
,
Mar 31, 2010
http://googlechromereleases.blogspot.com/2010/03/stable-update-disable-translate.html Releasing... adding credit to http://sites.google.com/a/chromium.org/dev/Home/chromium-security Thanks again Tobias!
Status: Fixed
Labels: -Restrict-View-SecurityTeam
,
Apr 2, 2010
Sorry to bug people, hope this isn't a stupid question: Why don't the Mac and Linux versions crash? What do they do differently?
,
Apr 2, 2010
@ljseltzer: check out comment 7. windows does runtime stl index checking, so it crashes when it detects that. mac and linux happily keep processing.
,
Mar 21, 2011
(No comment was entered for this change.)
Labels: Type-Security
,
Oct 4, 2011
Batch update.
Labels: SecImpacts-Stable
|
||||||||||
| ► Sign in to add a comment | |||||||||||
8.0 KB View Download