Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update F-Droid Security Issues #233

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

friendly-rabbit-35
Copy link
Contributor

@friendly-rabbit-35 friendly-rabbit-35 commented May 18, 2024

Detailed list of changes

  • Part 1
    • Reword and rearrange the paragraph right before the Q&A section
      • Embed link to PrivSec post on FLOSS Security, specifically the section clarifying the role of source code
    • In the paragraph about F-Droid's lack of quality assurance, embed link to PrivSec post on Badness Enumeration
  • MAJOR CHANGE: Add new section (Part 2) about F-Droid's inclusion policy and its negative effects on developers and end users
    • Add case study on Snikket's F-Droid app
    • Renumber subsequent sections of the post
  • Part 3
    • Embed link to PrivSec post on Choosing your Desktop Linux Distro, specifically the section about release cycles
  • Part 4
    • Update status of F-Droid's index v2 and add link to F-Droid API documentation that mentions index v2
    • MAJOR CHANGE: Add disclaimer that F-Droid's official client and F-Droid Basic now supports unprivileged unattended updates
    • Clarify part about the Play Store's non-use of certificate pinning (closes F-Droid Security Issues: Clarify cert pinning in Play Store #263)
      • The current wording reads as if the Play Store uses this feature, but it does not.
    • MAJOR CHANGE: Add section about F-Droid's infrastructure not following basic network security practices, which @TommyTran732 explained in the main Matrix room and the GrapheneOS Offtopic room
  • Part 5
    • MAJOR CHANGE: Overhaul section about F-Droid clients (inspired by https://github.com/orgs/PrivSec-dev/discussions/190#discussioncomment-7825536)
      • Update the F-Droid section in the Android Tips post to reflect this major change
    • Embed link to GitLab issue in which an F-Droid maintainer states that F-Droid does not have a minimum or target SDK requirement
    • Update the Play Store's target API level requirements and mention that they're refreshed every year
    • MAJOR CHANGE: Reword the first part of the last paragraph (starts with "While it may" in the old version, "Keeping the" in the new version) for increased clarity
  • Part 7
    • Add more specific link to the quoted material from the lead F-Droid developer
    • Move block quote for the run at startup permission for better idea flow
  • Conclusion
    • MAJOR CHANGE: Reword the last sentence of the introductory paragraph for improved clarity
    • In the "Should I Really Care?" section, embed link to PrivSec post on Threat Modeling
    • "Isn't Google evil? Isn't the Play Store spyware?" section
      • Update link about Aurora Store's legacy storage permission so that it points to the master branch of their repository
      • Embed link to section of Aurora Store wiki about invalidation of dummy account sessions to highlight the "concerning" part of the shared accounts feature
  • Meta
    • Modify wording about the non-representation of GrapheneOS in the post
  • Make numerous grammar, wording, and syntax changes for improved clarity
    • MAJOR CHANGE: Switch Part 3 and Part 4 around for better flow of ideas
    • Rearrange several paragraphs for better flow of ideas
    • Append "the" before most instances of "Play Store"
    • In many parts of the post, break up long sentences into shorter ones for either improved readability or increased emphasis on certain points

New To Do

All done!
  • Move section about F-Droid's false sense of security to a more appropriate location
  • Complete the case study of Snikket in the newly created section on F-Droid's inclusion policy

To Do

All done!
  • Introduction
  • Part 1
  • Part 2
  • Part 3
    • Look into the status of F-Droid's privileged extension
    • Look into the status of v2 metadata format wrt F-Droid's index and, if needed, update accordingly
  • Part 4
    • Research third-party F-Droid clients mentioned here
    • Develop comparison between third-party F-Droid clients, the official F-Droid client, and F-Droid Basic
    • Review the paragraph starting with "While it may seem bothersome"
  • Part 5
  • Part 6
  • Conclusion
    • Review the third sentence of the first paragraph and, if needed, reword it for improved clarity
    • Look into status of Aurora Store's account tokens and, if needed, update accordingly
    • Ask about the relevance of the link to a GitHub issue in Signal's repo
  • Meta

Copy link

netlify bot commented May 18, 2024

Deploy Preview for privsec-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a348371
🔍 Latest deploy log https://app.netlify.com/sites/privsec-dev/deploys/66a059b86f268c0008c49435
😎 Deploy Preview https://deploy-preview-233--privsec-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@wj25czxj47bu6q wj25czxj47bu6q added the [c] update existing Existing content updates (beyond trivial fixes) label May 18, 2024
@TommyTran732
Copy link
Member

So far so good

Copy link
Contributor Author

@friendly-rabbit-35 friendly-rabbit-35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the changes to the post are minor, but I would greatly appreciate any feedback on the ones marked as a "MAJOR CHANGE" in the initial comment to make sure that I'm not changing the spirit of the original work.


At the time of writing:
- Android 12 is the oldest Android version that is [receiving security updates](https://endoflife.date/android). (Last updated on May 20, 2024)
- [~80% of the Android devices](https://developer.android.com/about/dashboards) in the world are running **at least** 8.0 "Oreo".
Copy link
Contributor Author

@friendly-rabbit-35 friendly-rabbit-35 May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the second bullet point, accessing platform version information is gated by an account login, so I didn't update this statistic.


If you don't have Play services installed, you can use a third-party Play Store client called **[Aurora Store](https://auroraoss.com/)**. Aurora Store has some issues of its own, and some of them overlap in fact with F-Droid. Aurora Store somehow still requires [the legacy storage permission](https://gitlab.com/AuroraOSS/AuroraStore/-/blob/26f5d4fd558263a89baee4c3cbe1d220913da104/app/src/main/AndroidManifest.xml#L28-32), has yet to [implement certificate pinning](https://gitlab.com/AuroraOSS/AuroraStore/-/issues/697), has been known to sometimes retrieve wrong versions of apps, and [distributed account tokens](https://gitlab.com/AuroraOSS/AuroraStore/-/issues/722) over [cleartext HTTP](https://gitlab.com/AuroraOSS/AuroraStore/-/issues/734) until fairly recently; not that it matters much since tokens were designed to be shared between users, which is already concerning. I'd recommend against using the shared "anonymous" accounts feature: you should make your own throwaway account with minimal information.
If you don't have Play services installed, you can use a third-party Play Store client called **[Aurora Store](https://auroraoss.com/)**. Aurora Store has its own issues, some of which overlap with F-Droid's. Aurora Store somehow still requires [the legacy storage permission](https://gitlab.com/AuroraOSS/AuroraStore/-/blob/master/app/src/main/AndroidManifest.xml?ref_type=heads#L34-36), has yet to [implement certificate pinning](https://gitlab.com/AuroraOSS/AuroraStore/-/issues/697), has been known to sometimes retrieve wrong versions of apps, and [distributed account tokens](https://gitlab.com/AuroraOSS/AuroraStore/-/issues/722) over [cleartext HTTP](https://gitlab.com/AuroraOSS/AuroraStore/-/issues/734) until late 2021. The last issue does not matter much since tokens were designed to be shared between users, which is already [concerning](https://gitlab.com/AuroraOSS/AuroraStore/-/wikis/Anonymous%20Logins#why-do-aurora-store-always-say-session-expired). I recommend against using the shared "anonymous" accounts feature; you should make your own throwaway account with minimal information.

### Looking to the future
Copy link
Contributor Author

@friendly-rabbit-35 friendly-rabbit-35 May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Looking to the future" section ends with this sentence:

It [the GrapheneOS app repository] will serve as a simple, secure, modern app repository, albeit only for a curated list of high-quality apps, some of which will have their own builds (for instance, Signal still uses their original 1024-bits RSA key that has never been rotated since then).

I'm probably being dense here, but could someone explain to me how the GrapheneOS app repo, the bit about Signal, and the linked GitHub issue (not linking it here to avoid unnecessary ping) are related?

Copy link
Contributor Author

@friendly-rabbit-35 friendly-rabbit-35 Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I came across a tweet by the official GrapheneOS account that illuminates the Signal example:

signal-commentary

But the connection between the noted issues about Signal and the future of GrapheneOS's app repo is not clear, at least in this part of the F-Droid article.

@friendly-rabbit-35 friendly-rabbit-35 marked this pull request as ready for review May 20, 2024 22:13
@wj25czxj47bu6q wj25czxj47bu6q self-assigned this May 21, 2024
@wj25czxj47bu6q wj25czxj47bu6q added the [z] wait to merge For internal use by team members label May 21, 2024
@wj25czxj47bu6q wj25czxj47bu6q self-requested a review May 21, 2024 21:49
@friendly-rabbit-35 friendly-rabbit-35 marked this pull request as draft July 9, 2024 01:55
@friendly-rabbit-35 friendly-rabbit-35 marked this pull request as ready for review July 9, 2024 04:45

- Since August 2021, Play Store requires new apps to target at least API level 30.
- Since November 2021, existing apps must at least target API level 30 for updates to be submitted.
Overall, this case study highlights how F-Droid's inclusion policy ultimately harms end users by forcing app developers to adopt potentially decrepit development tools and build processes in service of their regnant FOSS ideology.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I welcome any suggestions for this concluding sentence. I'm not particularly thrilled with the final two words, but I can't think of any good replacements.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

To be fair, they've thought several times about adding certificate pinning to their client [at least for the default repositories](https://gitlab.com/fdroid/fdroidclient/-/issues/105). [Relics of preliminary work](https://gitlab.com/fdroid/fdroidclient/-/blob/1.14-alpha4/app/src/main/java/org/fdroid/fdroid/FDroidCertPins.java) can even be found in their current codebase, but it's unfortunate that they haven't been able to find [any working implementation](https://github.com/f-droid/fdroidclient/commit/7f78b46664981b9b73cadbfdda6391f6fe939c77) so far. Given the overly complex nature of F-Droid, that's largely understandable.
To be fair, the F-Droid team has considered several times about adding certificate pinning to their client [at least for the default repositories](https://gitlab.com/fdroid/fdroidclient/-/issues/105). [Relics of preliminary work](https://gitlab.com/fdroid/fdroidclient/-/blob/1.14-alpha4/app/src/main/java/org/fdroid/fdroid/FDroidCertPins.java) can even be found in their current codebase, but it's unfortunate that they haven't been able to find [any working implementation](https://github.com/f-droid/fdroidclient/commit/7f78b46664981b9b73cadbfdda6391f6fe939c77) so far. Given the overly complex nature of F-Droid, that's largely understandable.

In a situation where TLS certificate pinning cannot be done, though, the next best thing --- or, rather, the most basic thing --- is to have a robust infrastucture for TLS. This means setting up CAA records with account pinning, setting up DNSSEC, and pinning ACME `accounturi` and `validationmethods`. Other basic security practices include enforcing TLS 1.2 and TLS 1.3 and disabling weak ciphers. F-Droid does **none** of these. They do not have CAA records and DNSSEC, and [still support TLS 1.0 and TLS 1.1](https://www.hardenize.com/report/f-droid.org/1721021966#www_tls) with their servers.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I formatted "accounturi" and "validationmethods" as code because they're described as parameters in this RFC: https://datatracker.ietf.org/doc/rfc8657/

Feel free to change it (or anything else in this new section) if it's not correct in this case.

Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
…e placement

Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: friendly-rabbit-35 <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
…(credit to @TommyTran732)

Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Signed-off-by: Friendly Rabbit <169707731+friendly-rabbit-35@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[c] update existing Existing content updates (beyond trivial fixes) [z] wait to merge For internal use by team members
Development

Successfully merging this pull request may close these issues.

F-Droid Security Issues: Clarify cert pinning in Play Store
3 participants