this post was submitted on 08 Aug 2024
75 points (98.7% liked)

Technology

37585 readers
305 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
top 17 comments
sorted by: hot top controversial new old
[–] dan@upvote.au 50 points 1 month ago* (last edited 1 month ago) (3 children)

Seems like a TCP/IP stack issue rather than a browser issue... 0.0.0.0 is not supposed to be a valid address (in fact, no IPv4 address with 0 as the first octet is a valid destination IP). The network stack should be dropping those packets.

0.0.0.0 is only valid in a few use cases. When listening for connections, it means "listen on all IPs". This is a placeholder that the OS handles - it doesn't literally use that IP. Also, it's used as the source address for packets where the system doesn't have an IP yet (eg for DHCP). That's it.

[–] drwho@beehaw.org 20 points 1 month ago (1 children)

I'm inclined to agree. This looks like a misunderstanding of RFC 5735.

[–] dan@upvote.au 15 points 1 month ago* (last edited 1 month ago) (1 children)

From that RFC:

0.0.0.0/8 - Addresses in this block refer to source hosts on "this"
network.  Address 0.0.0.0/32 may be used as a source address for this
host on this network; other addresses within 0.0.0.0/8 may be used to
refer to specified hosts on this network ([RFC1122], Section
3.2.1.3).

(note that it only says "source address")

which was based on RFC 1122, which states:

We now summarize the important special cases for Class A, B,
and C IP addresses, using the following notation for an IP
address:

    { <Network-number>, <Host-number> }

or
    { <Network-number>, <Subnet-number>, <Host-number> }

...

(a)  { 0, 0 }

This host on this network.  MUST NOT be sent, except as
a source address as part of an initialization procedure
by which the host learns its own IP address.

See also Section 3.3.6 for a non-standard use of {0,0}.

(section 3.3.6 just talks about it being a legacy IP for broadcasts - I don't think that even works any more)

[–] drwho@beehaw.org 1 points 1 month ago (1 children)

Okay, I see where I went wrong. Thank you.

I don't think 0.0.0.0 works for broadcasts anymore, either - I think those get filtered by default these days.

[–] dan@upvote.au 2 points 1 month ago

I wasn't disagreeing with you :) or at least I think I wasn't. I was just quoting the RFC you linked to.

[–] AndrasKrigare@beehaw.org 4 points 1 month ago

Yeah, I just did a quick test in Python to do a tcp connection to "0.0.0.0" and it made a loopback connection, instead of returning an error as I would have expected.

[–] TehPers@beehaw.org 3 points 1 month ago* (last edited 1 month ago) (1 children)

While I agree, it makes connecting to localhost as easy as http://0:8080/ (for port 8080, but omit for port 80).

I worry that changing this will cause more CVEs like the octal IP addresses incident.

Edit: looks like it's only being blocked for outgoing requests from websites, which seems like it'll have a much more reasonable impact.

Edit 2: skimming through these PRs, at least for WebKit, I don't see tests for shorthand IPs like 0 (and no Apple device to test with). What are the chances they missed those..?

[–] dan@upvote.au 6 points 1 month ago* (last edited 1 month ago)

it makes connecting to localhost as easy as http://0:8080/ (for port 8080, but omit for port 80).

The thing is that it's not supposed to work, so it's essentially relying on undefined behaviour. Typing [::1]:8080 is nearly as easy.

skimming through these PRs, at least for WebKit, I don't see tests for shorthand IPs like 0 (and no Apple device to test with). What are the chances they missed those..?

I haven't seen the PRs, but IP comparison should really be using the binary form of the IPv4 address (a 32-bit number), not the human-friendly form.

[–] tyler@programming.dev 26 points 1 month ago (3 children)

The article literally doesn’t explain the vulnerability at all.

[–] floofloof@lemmy.ca 26 points 1 month ago* (last edited 1 month ago) (1 children)

It keeps promising to, then goes off into more ChatGPT-style rambling. It's a bad article. This one is more informative:

https://www.oligo.security/blog/0-0-0-0-day-exploiting-localhost-apis-from-the-browser

[–] Kissaki@beehaw.org 16 points 1 month ago* (last edited 1 month ago)

notably

Windows is not impacted by this issue.

quoting the main, critical part:

  1. Under public domain (.com), the browser sent the request to 0.0.0.0.
  2. The dummy server is listening on 127.0.0.1 (only on the loopback interface, not on all network interfaces).
  3. The server on localhost receives the request, processes it, and sends the response.
  4. The browser blocks the response content from propagating to Javascript due to CORS.

This means public websites can access any open port on your host, without the ability to see the response.

[–] biscuitswalrus@aussie.zone 9 points 1 month ago

I ended up reading it on bleeping computer since the linked site looks like an auto tldr bot saved 50% of the words. The important 50% was discarded.

https://www.bleepingcomputer.com/news/security/18-year-old-security-flaw-in-firefox-and-chrome-exploited-in-attacks/

[–] drwho@beehaw.org 8 points 1 month ago (1 children)

Everybody who could explain it well is at Hacker Summer Camp right now.

I didn't realize DEFCON was this weekend already, but this is a solid point 😂

[–] Boomkop3@reddthat.com 4 points 1 month ago

Welp, I guess sandboxing a browser that has a sandbox might still be a good idea

[–] sirico@feddit.uk 4 points 1 month ago

hunter2 Wow it works!

[–] ssm@lemmy.sdf.org 1 points 1 month ago* (last edited 1 month ago)

Yes! Another huge win for links2gang !links2@lemmy.sdf.org