News for hackers. Stuff that matters.
Re:Facebook scans system libraries on Android and uploads th... by mirimir on Friday August 30, 2019 @12:56PM (#20840323)
How the bloody hell is it permitted for apps to be uploading system files?

This wouldn't be possible in Linux, right?

Basically, this is malware.

Edit: Thanks, all. So OK, I get that it's possible, because apps have read and execute permissions for all libraries that they use.

But it's not common for apps to upload system files, right?

Re:Facebook scans system libraries on Android and uploads th... by prongletown on Friday August 30, 2019 @12:57PM (#20840342)
>This wouldn't be possible in Linux, right?

If you have read access, then yes. Conventional desktop and server linux distributions would allow this behavior. As does android. Good luck using dylibs without it, anyways.

Since the android market is so fragmented and customized, this probably saves them from having to buy lots of phones when diagnosing crashes.

The knee-jerk reaction is to feel uncomfortable but these are system files, shipped with the phone, that are accessible to anyone who purchases the phone. This saves FB the trouble of spending $200 every time a new OS update comes out. Personally, with that knowledge, I don't have a problem with this - however, I have a ton of problems with other stuff FB does so I'm happy to keep not using their service.

Re:Facebook scans system libraries on Android and uploads th... by _bxg1 on Friday August 30, 2019 @03:00PM (#20841536)
> If you have read access, then yes. Conventional desktop and server linux distributions would allow this behavior.

The difference is in people's expectations of mobile vs. desktop apps. You'd never install untrusted software on your desktop, but mobile OSes provide the sense that software is isolated. In Android, that's mostly an illusion.

Re:Facebook scans system libraries on Android and uploads th... by feanaro on Friday August 30, 2019 @03:36PM (#20841836)
I feel like users install untrusted software on the desktop all the time and it's called closed source software.

It's not like Facebook is some small, unknown malware peddler so that its software should be considered "untrusted". If anything, it's untrusted because it's coming from a scummy company and opaque (due to being closed source).

Re:Facebook scans system libraries on Android and uploads th... by _bxg1 on Friday August 30, 2019 @04:17PM (#20842250)
You're right that it being from Facebook makes things a little different. At the same time, I've never needed to install a native desktop app from Facebook and I'd have some suspicion about doing so if such a thing existed, for exactly this reason.
Re:Facebook scans system libraries on Android and uploads th... by usr1106 on Friday August 30, 2019 @11:36PM (#20844479)
> The difference is in people's expectations of mobile vs. desktop apps. You'd never install untrusted software on your desktop

I knew many Linux desktop users who had installed the Slack client back in the days we used Slack at work. Myself I have installed Skype. Not that I find Skype particularly good, but sometimes I need to communicate with people who have no clue about software freedom.

So, yes the number of "untrusted apps" is significantly lower on a (Linux) desktop, but "you'd never install" is an incorrect characterization.

Re:Facebook scans system libraries on Android and uploads th... by djsumdog on Friday August 30, 2019 @01:03PM (#20840403)
They could download the stock roms from the major manufacturers, only ship the hashes, and match up library versions that way.
Re:Facebook scans system libraries on Android and uploads th... by prongletown on Friday August 30, 2019 @01:10PM (#20840464)
I'm not making a moral judgement (FB is a big yikes), just technical. They'd have to:

- build lists of every phone, including carrier variant and internal revisions (pretty common!), to make sure they could be sure they had a complete library

- rely on the manufacturer to publicly post the ROM (cheaper mfg wont do this) (or somehow retrieve the URL from the update mechanism, said URL not easily accessible from userspace)

- handle the multiple different packaging mechanisms that android phones, especially older versions use (Google has gone a long way in remediating this but FB has to support billions of devices that don't adhere to best practices).

- For ROM packages that are encrypted, they'd need to acquire the keys from real devices.

- and they still would not have visibility into non-posted firmware, such as factory versions with day 1 upgrades (aka many many devices)

OR

- grab the files and send 'em

Re:Facebook scans system libraries on Android and uploads th... by MauranKilom on Friday August 30, 2019 @02:54PM (#20841479)
1. Uploading files from the user phone to their servers is straight up copyright violation in plenty of cases.

2. I have doubts that you need copies of all kinds of system libraries to debug that crash. They won't help you debug a crash dump (assuming they don't have debug symbols left in for some reason). They generally won't help you reproduce the crash unless you actually know reproduction steps - it wouldn't surprise me if they tracked every user action, but I doubt they do - so it takes many of those crashes to even start debugging. At that point you probably know precisely which library you need and can obtain it legally.

That said, I agree that uploading the files themselves is not necessary to fingerprint users (the hashes would totally suffice). Unless they do the uploading as a cover-up story, which doesn't make much sense either.

Re:Facebook scans system libraries on Android and uploads th... by shuckles on Friday August 30, 2019 @02:17PM (#20841082)
At the very least, the privacy-respecting solution would be to upload hashes and only upload libraries once some critical mass of users had reported the hash along with a bug. Even then, you would only upload the files themselves from some capped number of users.
Re:Facebook scans system libraries on Android and uploads th... by janekm on Saturday August 31, 2019 @01:53AM (#20844828)
That makes no difference from a privacy point of view but would be more respectful of people’s bandwidth limits.
Re:Facebook scans system libraries on Android and uploads th... by shuckles on Saturday August 31, 2019 @03:03AM (#20845003)
Yes it does. At the very least, people running custom libraries that nobody else does would never upload data.
Re:Facebook scans system libraries on Android and uploads th... by austinheap on Friday August 30, 2019 @01:15PM (#20840506)
But...what about my pitchfork? The knee-jerk reaction to every Facebook blog spam entirely diminishes the harm they've done to nations around the world.
Re:Facebook scans system libraries on Android and uploads th... by vvanders on Friday August 30, 2019 @01:53PM (#20840859)
Yeah sorry, they could send ro.build.fingerprint instead if they really wanted to know what version of builds and devices out there are causing issues.

I can see this as an opt-in but not as a silent, default behavior.

Re:Facebook scans system libraries on Android and uploads th... by tripzilch on Monday September 02, 2019 @03:43PM (#20861367)
> This saves FB the trouble of spending $200 every time a new OS update comes out.

So it is piracy.

Re:Facebook scans system libraries on Android and uploads th... by djsumdog on Friday August 30, 2019 @01:02PM (#20840386)
Well Android does have a Linux kernel. The permissions happen at different layers within Android, as apps are run on their VM (Dalvik byte code). The /system partition is read-only on Android, but I don't /think/ you'd need any special permissions to read most of the system partition. The data partition is what's protected.

I mean, an application has to be able to read standard libraries to function, right? Same with any traditional Linux distro and /lib, /usr/lib. Really tight Apparmor or SELinux profiles can lock this down a bit.

Re:Facebook scans system libraries on Android and uploads th... by gnfurlong on Sunday September 01, 2019 @01:18PM (#20853402)
Regarding apparmor/selinux, who creates/audits those profiles to make sure each application only has access to exactly the libraries it needs? It probably defeats the purpose if it's the app authors. Similarly, who validates that these profiles don't break functionality for any device/os version? I could see this being an option for power users who are willing to collaborate on creating the profiles and deal with fixing the occasional incomplete profile. I'm not sure how feasible it'd be as a solution for your typical user though.
Re:Facebook scans system libraries on Android and uploads th... by sharpneli on Friday August 30, 2019 @01:00PM (#20840365)
You need read access to actually use them. Even if some file system trickery would be made to prevent it so that you couldn't fopen it, the actual binary code will be in memory accessible for your app, because it has to be there in order to run.
Re:Facebook scans system libraries on Android and uploads th... by saagarjha on Friday August 30, 2019 @01:10PM (#20840466)
Stupid idea: --X the pages for the library.
Re:Facebook scans system libraries on Android and uploads th... by gruez on Friday August 30, 2019 @01:21PM (#20840560)
That would only work for the .text section. Other sections like .data, .rodata, and .bss need read access because they contain data required for the library to function (global variables, vtables, constants, etc.).
Re:Facebook scans system libraries on Android and uploads th... by saagarjha on Friday August 30, 2019 @01:30PM (#20840632)
I'm not sure if Android allows for multiple mappings of the same page, but I could see something where global variables that are internal to the library are accessible only through a mapping that is known only to the binary itself (possibly by hardcoding it into instructions inside .text?) API needs to be exposed, of course, but ideally that would be the same across different implementations of a library.
Re:Facebook scans system libraries on Android and uploads th... by AnIdiotOnTheNet on Friday August 30, 2019 @03:05PM (#20841578)
What problem are you actually trying to solve though? System libraries are not secrets, there really isn't any good reason we should go through these hoops to prevent reading them.
Re:Facebook scans system libraries on Android and uploads th... by saagarjha on Friday August 30, 2019 @03:10PM (#20841620)
They contain identifying information.
Re:Facebook scans system libraries on Android and uploads th... by AnIdiotOnTheNet on Friday August 30, 2019 @03:22PM (#20841729)
...system libraries contain identifying information? Is this some alternate usage of the word "system library" I wasn't previously aware of? I'm assuming, and haven't read anything to the contrary, that these are just dynamically linked code libraries what have been a pretty big part of how OSs work for decades.

Therefore, I can only conclude that the identifying information is which precises system libraries are installed on any given machine. Any solution to this problem other than "have fewer system libraries and don't change them as often" is adding far more complexity to computing than it will ever be worth, and computing already has enough of such "for the security gods!" solutions.

Re:Facebook scans system libraries on Android and uploads th... by saagarjha on Friday August 30, 2019 @03:27PM (#20841768)
> I'm assuming, and haven't read anything to the contrary, that these are just dynamically linked code libraries what have been a pretty big part of how OSs work for decades.

Yes, we're talking about the same thing.

> Therefore, I can only conclude that the identifying information is which precises system libraries are installed on any given machine.

Specifically, it provides very detailed information about your hardware revision, OS version, security patch level, which is generally something that forms part of most fingerprinting suites. Now, I'm not saying that we can solve this problem easily–but I do think it's important to recognize the privacy implications that uploading them can entail.

Re:Facebook scans system libraries on Android and uploads th... by AnIdiotOnTheNet on Friday August 30, 2019 @03:35PM (#20841826)
Ok, so let's say you've solved this problem tomorrow. You've just made it impossible for an application to know which OS version, security patch level, and hardware revision it is running on, meaning it can't do anything like dynamically adjust itself depending on features (or bugs) it will know are available or not. It also can't submit any of this in crash reports, so fixing bugs that occur in rare combinations of hardware and software is now much more problematic.

All to prevent... what? If you log into Facebook, which is presumably why you have the application, then it already knows who you are. Not to mention the hundreds of other ways to fingerprint you.

Re:Facebook scans system libraries on Android and uploads th... by mirimir on Friday August 30, 2019 @06:26PM (#20843288)
There are situations where different people use the same machine to access Facebook. And indeed, where they also (foolishly, I know) expect that Facebook will preserve mutual privacy. Partners. Parents and children. Siblings.

So Facebook, if it's relying on hardware/software fingerprinting, might compromise multiple users to each other.

Re:Facebook scans system libraries on Android and uploads th... by anticensor on Friday August 30, 2019 @04:26PM (#20842349)
Does hardware allow that?
Re:Facebook scans system libraries on Android and uploads th... by sharpneli on Saturday August 31, 2019 @02:22AM (#20844886)
Not really.

Whereas the execute flag on a page allows one to only load data from there but not jump there is nothing that allows one to execute code while preventing mov.

Re:Facebook scans system libraries on Android and uploads th... by mindslight on Friday August 30, 2019 @05:11PM (#20842744)
System libraries are trivially readable, but "Linux" escapes this problem by not setting itself up as a playground for malicious actors alongside personal use. The Android model is basically to give a shell account to anyone for asking, while trying to protect the privacy of the sysadmin.