[Webkit-unassigned] [Bug 54877] New: chrome.dll!WebCore::HTMLAreaElement::setFocus ReadAV at NULL (2f8e4496f8ea69da13971f5fddd09753)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 21 06:06:22 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=54877
Summary: chrome.dll!WebCore::HTMLAreaElement::setFocus
ReadAV at NULL (2f8e4496f8ea69da13971f5fddd09753)
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P1
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: skylined at chromium.org
CC: eric at webkit.org
Created an attachment (id=83154)
--> (https://bugs.webkit.org/attachment.cgi?id=83154&action=review)
Repro
Chromium: http://code.google.com/p/chromium/issues/detail?id=73650
"area" elements can be focussed if they are a link. They can be made a link by setting a "href" attribute to a non-null value. If an area element is focussed, the code checks if its parent element is a "map" element, without verifying if it has a parent element. By creating an area element, setting the href attribute and calling its focus method, we can cause the code to deref a NULL pointer, crashing the renderer.
http://codesearch.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/html/HTMLAreaElement.h&q=HTMLAreaElement&exact_package=chromium&sa=N&cd=1&ct=rc&l=36
class HTMLAreaElement : public HTMLAnchorElement {
<snip>
http://codesearch.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/html/HTMLAnchorElement.cpp&q=HTMLAnchorElement::supportsFocus&exact_package=chromium&sa=N&cd=1&ct=rc&l=73
bool HTMLAnchorElement::supportsFocus() const
{
<snip>
return isLink() || HTMLElement::supportsFocus();
http://codesearch.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/html/HTMLAreaElement.cpp&q=HTMLAreaElement::setFocus&exact_package=chromium&sa=N&cd=1&ct=rc&l=199
void HTMLAreaElement::setFocus(bool shouldBeFocused)
{
<snip>
HTMLImageElement* imageElement = this->imageElement();
http://codesearch.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/html/HTMLAreaElement.cpp&q=HTMLAreaElement::imageElement&exact_package=chromium&sa=N&cd=1&ct=rc&l=175
HTMLImageElement* HTMLAreaElement::imageElement() const
{
Node* mapElement = parentNode(); /// Might return NULL
if (!mapElement->hasTagName(mapTag)) /// Might deref NULL => KaB00m
<snip>
id: chrome.dll!WebCore::HTMLAreaElement::setFocus ReadAV at NULL (2f8e4496f8ea69da13971f5fddd09753)
description: Attempt to read from unallocated NULL pointer+0x24 in chrome.dll!WebCore::HTMLAreaElement::setFocus
application: Chromium 11.0.679.0
stack: chrome.dll!WebCore::HTMLAreaElement::setFocus
chrome.dll!WebCore::Document::setFocusedNode
chrome.dll!WebCore::FocusController::setFocusedNode
chrome.dll!WebCore::Element::focus
chrome.dll!WebCore::ElementInternal::focusCallback
chrome.dll!v8::internal::HandleApiCallHelper<...>
chrome.dll!v8::internal::Builtin_HandleApiCall
chrome.dll!v8::internal::Invoke
chrome.dll!v8::internal::Execution::Call
...
Repro:
<script>
oArea = document.createElement('area');
oArea.href = 0;
oArea.focus();
</script>
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list