HNHacker News
TopNewBestAskShowJobs

altfredd

357 karma · joined March 26, 2018

submissionscomments
altfredd··on VPN service for hosting public-facing services on non-hosting ISP circuits
Possession of an IPv6 address does not automatically imply that your ISP allows incoming connection to your ports.
altfredd··on ZombieLoad: Cross Privilege-Boundary Data Leakage on Intel CPUs
It have always been known how to exploit them. But doing so used to be slower and there have been fewer opportunities for attacks. OS kernels used to have Big Locks (AFAIK, OpenBSD still does), that significantly deterred programs from messing with kernel code and CPU caches.

Things have changed a lot since then: OS kernels became faster by eliminating a lot of unnecessary (?) cross-process overhead; browser makers made a number of potentially problematic decisions ("let's allow Javascript to create CPU threads — what could possibly go wrong?"); Linux kernel developers made few potentially problematic decisions ("let's allow unprivileged processes to invoke arbitrary BPF bytecode — that worked for Java, so what could possibly go wrong?")

A lot of small security lapses added up until it became viable to use CPU flaws to actually target ordinary users. To add insult to injury, certain corporations started spreading myth, that well-known insecure practices — such as knowingly running local software from questionable authors — are "safe enough" for general population. Topic web page even talks about running untrusted Android software, as if Android had some kind of impenetrable security boundary around untrusted apps.

altfredd··on Google launches new “portal” HTML element
> Google will not be able to receive any events/messages unless they're sent by not-google.com

Exactly: the integration requires cooperation from both websites, and there is zero reasons, why child website would want to cooperate. Unlike, say, using Google Analytics, letting user leave you via <portal> tag is against website's best interests.

altfredd··on Google launches new “portal” HTML element
If portals really were iframes, there would be no reason to create them.

Google is completely open about their intentions. Citation from https://github.com/WICG/portals/blob/master/key-scenarios.md:

> After being activated, a portal opened by the news aggregator will now receive the input events. This means that it will have to co-operate with the news aggregator in order to maintain the desired user experience.

Why exactly does it _have_ to cooperate? And _how_ can it cooperate? Will it be enough to include a script from parent domain? Will analytics be part of "desired user experience"? Will parent domain ban a site from it's index for trying to "break out"?

It is essentially impossible to build relationships of mutual trust to the point when one website can freely embed another... unless one party has overwhelming power advantage. Who is the target auditory of <portal>? What "news aggregator" has enough leverage to make pages switch back to it as told to? If such "aggregator" existed, I would not trust it to make web browsers or dictate, how they should work.

altfredd··on Google launches new “portal” HTML element
> IE6 gave us XMLHttpRequest because they wanted it to build Outlook for the web. That seems like it turned out ok.

That depends on one's definition of "ok". I don't think that modern web is ok.

altfredd··on Google launches new “portal” HTML element
> In what way loading a site on a portal would be different to loading it on the main window?

The difference is made crystal-clear in the draft [1]:

> Every browsing context has a portal state, which may be "none" (the default), "portal" or "orphaned"... "orphaned": top-level browsing contexts which have run activate but have not (yet) been adopted

In other words, the original google.com document will be kept active in background (in "orphaned" state) and the child document can continue to interact with it by using Javascript after "adopting" it (at which point roles reverse and google.com becomes child document itself).

In theory the specification allows child document to ignore parent and let browser close it, completing transition. It also allows to perform graceful switching between child and parent, keeping each in control as long as it remains top document.

In practice, child portals will run Javascript, written by Google, and will be subject to Google's complete discretion. The distinction between first-party and third-party scripts will be erased, effectively letting Google run analytics on third-party domain, and send results back from it's own domain via Javascript proxy.

[1]: https://wicg.github.io/portals/

altfredd··on Engineered phages help teenager with antibiotic-resistant infection
> Phage therapy is a blind spot for Western medicine. It's a new category of drug

It is a branch of traditional medicine, approximately 100000 years old and counting.

"Western medicine" ignores phage therapy, because growing a bunch of mud in a bowl does not bring anyone 10000% cuts. Cultivating phages still requires labor and equipment, and can be quite profitable, just not 10000% profitable, — because pretty much anyone can do it.

altfredd··on For Better Computing, Liberate CPUs from Garbage Collection
>> we have a giant for loop that iterates over all of memory over and over and over

> How is that not how garbage collectors work?... I'm assuming we're talking about a standard, generational mark-and-sweep gc

GCs do not scan "all memory", but small fraction of memory. In case of generational GC the scanned fraction of memory is (usually) limited to single generation. Even without generational approach scanning heap itself is frequently avoided in favor of scanning separate data structure with highly compressed representation of object set.

GCs do not generally iterate over memory just because they can. They either reclaim space for new allocations, move things around to reduce fragmentation or fire periodically in response to increased allocation rate. If your program does not make allocations, it may never incur a GC at all.

The grandparent comment makes it sound like garbage collection is a simple effort, conducted solely by distinct GC code ("giant for loop"). This is often not the case: for example, JVM may generate additional memory barriers in any code, that uses references (exact nature and purpose of memory barriers depends on GC being used [1]). Augmenting the code with those barriers allows GC to operate more efficiently and quickly: achieve smaller pauses, scan less memory, collect memory for some threads without disturbing others.

[1]: https://shipilev.net/jvm/diy-gc/#_barriers

altfredd··on Css-only-chat: A truly monstrous async web chat using no JS on the front end
I don't care about goals (or competency level) of browser makers. But it is hard to deny, that they are repeating the same mistakes Sun committed in late 90's with browser applets. They don't learn.
altfredd··on Css-only-chat: A truly monstrous async web chat using no JS on the front end
> the idea that one can look at a modern browser, which are some of the most complex software packages being developed, and think "clearly these people don't know how to add an 'origin' column to a SQLite database", well, it boggles the mind

It boggles my mind too. Imagine, what would have happened, if those small Javascript snippets, used mainly to add cute visual effects to pages, could check if some image from different site is already in browser cache by performing cross-site HTTP requests... That would allow completely new dimension of spying on web users!

Fortunately, browser developers are some of the most competent people in the word. They would never give web pages too much power by letting them start CPU threads, use OpenGL, allocate arbitrary amount of memory or read your battery level to set exorbitant taxi tariffs for people in a pinch. Browsers are well-designed and highly secure, because they are being updated with security fixes every day, sometimes even multiple times a day.

altfredd··on Css-only-chat: A truly monstrous async web chat using no JS on the front end
You seem to be confused about meaning of "CSS tracking". Detecting that user clicks on the link, that you have shown him, is harmless — as demonstrated by Google, a website can always track it's own outgoing requests by replacing all it's outgoing links with redirects. This is inherent part of hypertext.

The infamous "a:visited" tracking didn't simply track your visits from Google — it tracked all your visits across entire Internet. Browser vendors are bunch of lazy hacks, who can't even implement per-site link history (just like they failed to implement per-site cookies). All "a:visited" states are source from single SQLite database, that stores your full web history. THAT is the "CSS Tracking", because it can tell a page about visits from completely different domains. Instead of separating your web history per-domain those <censored> have crippled :visited selector in several undocumented ways.

altfredd··on Css-only-chat: A truly monstrous async web chat using no JS on the front end
What exactly do you want to block here? The user clicked a form control, the form control sent a request to server. It is no different from clicking a link.

You know, that HTTP allows websites to "track" you each time you visit them, right? The horror!

altfredd··on Css-only-chat: A truly monstrous async web chat using no JS on the front end
> tl;dr css hover selectors that change the background image don't actually cause the browser to GET the specified background image until you hover over it

This specific page uses :active, not :hover, so it is really no different from a web form, that performs web request each time you press a submit button. It just does not reload a page.

altfredd··on Tell HN: Archive.is inaccessible via Cloudflare DNS (1.1.1.1)
> That assumes that the nameserver and the actual server are run by the same party which quite often is not the case.

Cloudflare can check if nameserver and the actual server are run by different parties, and if so omit subnet information from EDNS response. It is not hard to implement — Google and OpenDNS used to require manual whitelisting to receive EDNS subnet responses (not sure if they still do).

Cloudflare's CDN leaks user's full online identity to Google via reCaptcha, especially when you use Tor. Maybe they should ask Google to be satisfied with client's subnet too?

altfredd··on Tell HN: Archive.is inaccessible via Cloudflare DNS (1.1.1.1)
Cloudflare uses "privacy" and "caring about users" as excuses to sabotage competing CDNs (including whatever CDN is used by archive.is).

Most recursive DNS severs on Internet can be categorized in two groups: local DNS servers, offered by Internet providers to their users, and enormous "generic" DNS like Google's 8.8.8.8. When someone makes a DNS request to those servers, they will in turn forward it to DNS servers of web page you are requesting. Content Delivery Networks use DNS to determine, which server should serve your request: if your DNS request arrived from Africa, CDN's DNS server will return IP in Africa. Of course, _users_ don't send DNS requests to CDN's server — recursive DNS servers do. In the past almost everyone used DNS, offered by their Internet provider, — CDN's had to use GeoIP or even static lists of providers to determine origin of that request. When world-wide DNS servers like Google's 8.8.8.8 started to gain popularity, that approach was broken, so EDNS was developed.

Cloudflare is a CDN. They are selling their CDN services for money. At the same time they are encouraging end users to use free DNS server, that does not support EDNS on purpose (they admit so on their website). In effect they are creating a situation, when competing CDNs are at disadvantage and can't determine, what country user comes from. Cloudflare itself does not suffer from that disadvantage, because they control both 1.1.1.1 and DNS, used by their clients' websites.

altfredd··on Negotiations Failed: How Oracle Killed Java EE
> So how is this "JVM world" escaping the grip of Oracle?

Why would you? What is the point of "escaping"? It is like asking, "how would Go world escape the grip of Google?" — no one cares to, because nobody asks Oracle for permission to make software for JVM.

Java EE has been in maintenance mode for a long time, but Spring and Dropwizard are alive and well despite that. Incidentally, Nginx Unit has recently implemented Servlet spec — a cornerstone of JEE! — but they are stuck at it's initial version, without asynchronous Servlet support. Maybe Oracle should give Nginx a couple of decades to catch up before drafting next JEE version...

altfredd··on Negotiations Failed: How Oracle Killed Java EE
> Too little too late, and I highly doubt that (5-year-old) Valhalla will deliver even one of the promised features (value types) in the next 3 years

I never understood the purpose of Valhalla. They should just introduce a 128-bit scalar type and call it a day. Nobody actually cares about automagically storing value types in HashMap — all interested parties (HFT, computing) have already written dedicated collection libraries for working with primitives, and those libraries have little in common with object-based ones.

> LLVM and webassembly are eating JVM's cake

pffft, hahahaha, no they don't.

JVM and LLVM don't even share same market niche — one is a feature-complete runtime, another is a "make-your-own-language" build kit. Webassembly? What webassembly?

altfredd··on All extensions disabled due to expiration of intermediate signing cert
This is a very bizarre justification for an obvious bug. Code-signing does not work that way anywhere else — neither in Android, nor on iOS, Windows or any other common platform.

There is a possibility that Mozilla implemented their backwards code-signing model on purpose — for example, it allows them to oust unwanted extensions without explicitly recalling their certificates. But personally I think that they just didn't give the matter enough thought.

altfredd··on All extensions disabled due to expiration of intermediate signing cert
Fortunately, it is no longer necessary to run malicious software on user computers. With latest "advancements" in Firefox security everyone can publish malware directly in Firefox addon center [1]. No review needed!

"We accidentally uploaded all your HTTP requests to our servers, but we will definitely fix that in next addon version!~"

[1]: https://arstechnica.com/?post_type=post&p=1340459

altfredd··on Use mmap with care
> The glibc people literally think that nobody should be using signals. That's their objection, not anything you've talked about.

I don't believe, that everyone holds that opinion. Even if they did, the world does not revolve around Red Hat's team, — there are still kernel mail lists and other venues for discussion. But if proposed improvements aren't well thought-out, would anyone there back them up?

In my opinion, async-signal safety in itself is much bigger problem than robust registration of signals. The later is mostly solved by chaining signal handlers, while former is mostly unsolved (and keeps getting worse). Proliferation of new libraries and async-signal unsafe conventions. People keep using printf() in signal handlers. Occurrences of fork() in multi-threaded apps. Still no async-signal safe malloc() (some Googlers tried, but the idea didn't get much traction). And then you come and propose new interface for registering signals handlers, and say that "It’s okay for two functions can be async-signal-unsafe". If your proposed API is async-signal unsafe, how would it deal with signals arriving during dispatch of signal handler list?

altfredd··on Use mmap with care
> It's possible to do much better than sigaction(2). I wrote up a detailed proposal for improvement in [1].

Thanks for interesting read. That said, I can see why glibc people didn't appreciate the proposal.

The first part of article doesn't mention async-signal safety at all. Second part papers over async-signal safety, as if it were a non-issue. There are some dangerous-sounding paragraphs too:

> It’s occasionally useful to longjmp out of a signal handler. It’s reasonable to want to return non-locally from a shared signal handler too --- that is, to resume program execution after SIGNAL_CONTINUE_EXECUTION in a different state from the state the program had when we entered the shared signal handler. Since the signal system probably wants to maintain some kind of state to track its progress through its shared signal handler list, a plain longjmp out of a shared signal handler will likely leave the system in an unspecified state.

Are you sure, that we should worry about "signal system maintaining some kind of state"? Not about rest of application being in completely unspecified state?!!

The article proposes a primitive system for setting signal priorities, but stops at a half-baked solution. There is a mention of banning longjmp, but individual handlers still can bail via SIGNAL_CONTINUE_EXECUTION. What if I want my handler to always run regardless of registration order?

The proposal does not offer a way to retrieve a list of already installed handlers, which makes that part of it even worse than existing Posix signal API.

The proposed API does not address challenges of using signals in multi-threading programs.

The article mentions, that signal handlers can't be reliably unloaded, but proposed API does not address it.

Overall the proposed interface brings little to the table, does not work well alongside with existing sigaction() API and creates false illusion, that signal handlers are safe and ok to use. I imagine, that if it had more technical "meat" — more like robust mutexes or FD_CLOEXEC ­— it would have seen a lot more constructive discussion and less hostility from glibc maintainers.

altfredd··on Two Cathay Pacific captains lose eyesight during flights
> The idea that fume events are somehow linked to mass exposure to a neurotoxin that the FAA and every other major government are suppressing information about is a conspiracy theory.

Alternatively, there is no conspiracy, and every major government simply ignores dangers of aviation jet fumes. Sort of how everyone was sure, that invisible radiation is near-harmless and that radium dials are safe to use, until suddenly they weren't.

altfredd··on Former Mozilla exec: Google has sabotaged Firefox for years
It does not matter, what they are spending those money on. In fact, spending them on development only made things worse.

As soon as Mozilla started relying on Google's money, they were doomed. Now they are staffed by lots of well-paid US developers, and have to continue taking Google's deals to pay the wages.

altfredd··on Hacking Google ReCAPTCHA v3 Using Reinforcement Learning
If you want to simply limit amount of unwanted traffic, implement conventional image captcha with some minor twist. State-of-art bots do not (yet) have a human-like AI, so you will be safe(r) until someone adapts all existing bots to solve your modification.

If you want to hinder determined (but inept) adversary, impose reverse time limit: make your captcha a bit complex and deny answers, that arrive too fast. Legit users will spend a bit of time to solve captcha. Machine-learning-driven bots will blaze it. In addition to measuring speed of filling captchas you can measure amount of user time spent on other actions on your site — in process making your bot detector increasingly similar to Google's reCAPTCHA.

In general look for behaviors, distinguishing legitimate users from malicious. Hint: having Google account might or might not indicate a legitimate user, but it is probably more efficient to ask users for it directly than in roundabout way by using reCAPTCHA.

altfredd··on 58 Bytes of CSS to look great nearly everywhere
Smartphones tune down brightness in power saving mode (and so do e-ink books). Most websites are barely legible under those conditions, because web designers have been so heavily corrupted by backlight.
altfredd··on 2.7M Americans Still Get Netflix DVDs in the Mail
Ah, right. The "that guy did it" excuse.

If they aren't legally obliged to purchase "broadcasting right" from "members", they can always stop doing so.

If they ARE legally obliged (or forced by corporate mob, depending on your preferences) to engage in the rent-seeking, their budget founding should be permanently set to zero.

altfredd··on Apple Cancels AirPower Product
There are less complaints about 2018 model. They didn't really fix it.

If my (non-Apple) laptop is anything to go by, the keyboards with that crappy low-rise design have average life expectancy of one year. The 2018 modification will not get clogged with dust until the end of 2019, at which point people will be complaining about it too.

altfredd··on The Death of External Storage: Where's Google?
Unless the type of your file is unknown to system. Like, say, a new music format.
altfredd··on The Death of External Storage: Where's Google?
Privacy? What??!

Each time your app opens and reads a file, the application on other side of ContentProvider can monitor user activity down to number of bytes read. Each time you open a directory, that action can be noted. If anything, that sounds like a privacy nightmare, and will undoubtedly be exploited.

altfredd··on The Death of External Storage: Where's Google?
This is a very alarming move.

Google's external storage ContentProvider is terrible: slow, buggy and lacks a number of basic features. It does not work as replacement of existing file managers, since it does not properly support searching and it's performance is abysmal, compared to using filesystem directly.

AFAIK, there is still no proper support for selecting a file by extension: https://stackoverflow.com/questions/45573171 — if your file extension isn't in Android MIME database, this is it for you. The mime-filters for file extensions are completely broken: https://stackoverflow.com/a/31028507/1643723. It is possible to work around that in file manager application (by using queryIntentActivities with different, modified Uri), but built-in Storage Access Framework file browser does no such thing.

MediaStorage used to have tons of crippling bugs. Wrongly reported file sizes, delayed file addition, files, filled with zeroes... Some were fixed in preparation for Android Q release, but I doubt, that all of them did. MediaScanner is abhorrent by design.

The options for flexible content generation are still bad. Prior to Android P you had to use pipes, which resulted in non-seekable files. ProxyFileDescriptorCallback remedied some issues of that approach, but it does not support FUSE interruption events — https://issuetracker.google.com/issues/38444582: if you open a buggy FUSE descriptor, your app gets STUCK (and closing the opened descriptor from another thread won't not unblock you!) In effect, using files from other applications can now hang your app (it could before too, but only during ContentProvider#open() stage, now read() is broken too). The bug is trivial to fix, but there is still no fix 3 Android versions later.

Google Drive is a great example, how NOT to mesh OS development and app developer interests. Google Drive does not properly implement Google's own DocumentProvider API — in effect, forcing third-party app developers to use it's proprietary web API. That's great for Google (vendor lock-in and all), but not exactly great for third-party apps, because the DocumentProvider API is effectively not cared about (see ProxyFileDescriptorCallback fiasco above). If one extrapolates this behavior to future Android development... imagine, that INTERNET permission is abolished, and you have to use Google's proprietary API for every single thing. Want to download a file? Use Google Downloads (tm) API in Google Services (the system DownloadsProvider will of course be broken as usual). Want to send analytics? Google Services! Crash reporting? Firebase. Communications? Cloud messaging. p2p file exchange? Too bad for you, — that kind of advanced functionality will likely require Chrome OS!

The extrapolation above may sound overly pessimistic until you realize, that Android developers already made great many steps in that direction. Half of OS functionality is locked behind "system"-level APIs, that aren't accessible to ordinary apps, ever. But Google Services can of course continue to use them! As Mark said in his article, “the writing was on the wall”, although a lot of people (himself included) don't want to fully accept it.

← PreviousPage 5 of 6Next →