Closed
Bug 162409
Opened 23 years ago
Closed 23 years ago
Can trick layout history into filling <input type=file> with text from <input type=text> using key collision
Categories
(Core :: Security, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: jruderman, Assigned: john)
References
Details
(Keywords: csectype-disclosure, sec-high, Whiteboard: [adt2 RTM] [FIX])
Attachments
(3 files, 2 obsolete files)
1.31 KB,
text/html
|
Details | |
2.99 KB,
patch
|
sicking
:
review+
john
:
superreview+
john
:
approval+
|
Details | Diff | Splinter Review |
1.51 KB,
text/html
|
Details |
Layout history uses keys that look like this to refill forms in session history:
Tagname>InputName>InputType>FormName>IndexInForm
InputName and FormName can contain the > character, so it is possible to trick
layout history into filling the contents of a text field into a file-upload
field. This allows an attacker to upload a file if he knows its filename.
Reporter | ||
Comment 1•23 years ago
|
||
I'm working on a better demo.
Reporter | ||
Updated•23 years ago
|
Reporter | ||
Comment 2•23 years ago
|
||
Thanks to jesus_X and grok for writing the server side of this demo.
Attachment #95035 -
Attachment is obsolete: true
Assignee | ||
Comment 3•23 years ago
|
||
This fixes the problem by putting all developer-controlled elements *after*
non-developer-controlled elements like type in the key. Because the key is
used only to match, if the first part (containing the type) does not match the
entire key cannot match. And since none of the things inserted can be
controlled directly by the developer, there is no chance of messing up that
crucial part.
This has been tested against http://www.johnkeiser.com/cgi-bin/mozform.pl (to
ensure no regressions), Bugzilla bug entry and attachment pages, and the
enclosed testcase.
Assignee | ||
Comment 4•23 years ago
|
||
Universal diff of previous patch.
Attachment #95073 -
Attachment is obsolete: true
Assignee | ||
Comment 5•23 years ago
|
||
sicking, bz, reviews?
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [FIX]
![]() |
||
Comment 6•23 years ago
|
||
Comment on attachment 95074 [details] [diff] [review]
Patch -u
sr=bzbarsky
Attachment #95074 -
Flags: superreview+
Comment on attachment 95074 [details] [diff] [review]
Patch -u
r=sicking
Attachment #95074 -
Flags: superreview+ → review+
It might be worth adding some comment to make sure that noone changes this
again. IE something about that author-data should be last so that it can't
tamper with the type.
Assignee | ||
Comment 9•23 years ago
|
||
I actually considered that but figured people watching the checkin would notice;
it would be nice to make this checkin seem as benign as humanly possible given
the horrifying scope of the exploit.
Comment 10•23 years ago
|
||
Marking as ADT2 RTM, until we can discuss the severity and discoverability of
this one with jesse and mitch.
Assignee | ||
Comment 11•23 years ago
|
||
Fix checked in to trunk. Leaving open until we decide what else to do with it.
Assignee | ||
Comment 12•23 years ago
|
||
Comment on attachment 95074 [details] [diff] [review]
Patch -u
a=asa for 1.0.x (asa gave approval just now)
Attachment #95074 -
Flags: superreview+
Attachment #95074 -
Flags: approval+
Assignee | ||
Updated•23 years ago
|
Keywords: mozilla1.0.1+
Assignee | ||
Comment 13•23 years ago
|
||
Checked in on 1.1 branch.
Assignee | ||
Comment 14•23 years ago
|
||
Comment 15•23 years ago
|
||
Tested on Linux with the following:
1. Netscape 7.0 PR1
2. Patch build based on 8/13 trunk build
Using the testcase created in comment 14, clicked on the button 'Make me upload
/etc/passwd'.
Results:
In Netscape 7.0PR1 contents of file were returned.
With patch build, contents of file were NOT returned.
Comment 16•23 years ago
|
||
adding adt1.0.1+. Please check this in tonight.
Comment 17•23 years ago
|
||
jkeiser: Did we not check this into the 1.0 branch? Ia sk because there is no
"fixed1.0.1" marking in the keywords, nor did I see a comment saying this was
checked into the 1.0 branch, after Scott provided ADT approval. Pls advise ...
Comment 18•23 years ago
|
||
According to bonsai, this was checked in last night, so marking fixed1.0.1
Keywords: fixed1.0.1
Assignee | ||
Comment 19•23 years ago
|
||
Yes, sorry, things got hectic last night. It should be in this morning's builds.
This is all the builds I am concerned with, resolving fixed.
We need to notify the embedders we know about so that they can pick up this fix.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 20•23 years ago
|
||
bsharma: bindu, pls verify this as fixed on the 1.0 branch and the trunk.
Comment 21•23 years ago
|
||
Verified on 2002-08-14-trunk build on Win 2000.
Loaded test cases in comment #1, #2, #3.
All of them give either error or exception in the JS console.
Status: RESOLVED → VERIFIED
Comment 22•23 years ago
|
||
Verified on 2002-08-15-branch build on Win 2000.
Loaded comment #1, #2 and #3 and all of them gave the appropriate error messages.
Keywords: fixed1.0.1 → verified1.0.1
Updated•22 years ago
|
Group: security?
Updated•22 years ago
|
Group: security?
Updated•22 years ago
|
Group: security
Reporter | ||
Updated•12 years ago
|
Keywords: csec-disclosure,
sec-high
You need to log in
before you can comment on or make changes to this bug.
Description
•