nsIDNSService broken for AAAA records/IPv6 addresses

RESOLVED FIXED in mozilla20

Status

()

Core
Networking: DNS
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dagger.bugzilla, Assigned: Josh Aas)

Tracking

({regression})

Trunk
mozilla20
x86
Windows Server 2003
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 696601 [details]
Scratchpad script to reproduce

The attached script, if run in a chrome Scratchpad, is supposed to show "::1, 127.0.0.1", but it returns "NS_ERROR_FAILURE, 127.0.0.1" as of the 2012-12-25 Nightly build. If you change "localhost" to, e.g. "www.he.net", it will return NS_ERROR_FAILURE in place of any v6 address.

(nsIHttpChannelInternal.remoteAddress is showing a likely-related problem: it returns a random piece of memory instead of a v6 address/NS_ERROR_FAILURE. It returns addresses normally if they are v4.)

The regression range is d348dbf1dab4 to dc2abccc2adb, which includes Bug 807678.

According to Bug 825404, this is breaking connections to v6-enabled sites for users with both IPv6 and NoScript.
(Reporter)

Updated

5 years ago
Blocks: 807678, 825404
Attachment #696601 - Attachment mime type: application/octet-stream → text/plain
confirming with build 20121230095218
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
(Assignee)

Updated

5 years ago
Assignee: nobody → joshmoz
(Assignee)

Comment 2

5 years ago
The problem is that our DNS code assumes the length for an IPv6 string buffer should be 46 on all platforms. Windows expects a buffer size of 65 for some reason I can't imagine. That being the case, a buffer length check fails when trying to produce an IPv6 string and produces the error here. Patch coming up.
(Assignee)

Comment 3

5 years ago
Created attachment 696722 [details] [diff] [review]
fix v1.0
Attachment #696722 - Flags: review?(sworkman)
Attachment #696722 - Flags: review?(sworkman) → review+
Comment on attachment 696722 [details] [diff] [review]
fix v1.0

Review of attachment 696722 [details] [diff] [review]:
-----------------------------------------------------------------

steve's review on dns files is ok by me.
(Assignee)

Comment 5

5 years ago
pushed to mozilla-inbound

https://hg.mozilla.org/integration/mozilla-inbound/rev/dcadc9aabc43

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/dcadc9aabc43
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.