sonny, (edited )
@sonny@floss.social avatar

Anyone in my network interested in research and prototype network portal for Flatpak?

In the long run we are interested in:

• Give more control to users over app network access
• Allow apps that need network access to be considered “Safe”

We expect something like unsharing the network namespace and a bridge on the host for permissions / monitoring.

Boost welcome :boost_love:

1/2 🧵

#FediHire #Flatpak #Flathub #Linux #Snap #containers #Docker #freedesktop #Ubuntu #Fedora

sonny,
@sonny@floss.social avatar

Requirements

• System programming (C)
• relevant network technologies
• ideally Linux container technologies
• Good communication skills

It would be a contracting gig, and you'll be joining a great team:

https://foundation.gnome.org/2023/11/09/gnome-recognized-as-public-interest-infrastructure/

Send resume/portfolio to stf@gnome.org

2/2 🧵

astro,
@astro@c3d2.social avatar

@sonny But Rust is growing in GNOME

sonny,
@sonny@floss.social avatar

@astro Flatpak, bubblewrap and the portals are written in C.

I'm not against writing the prototype in Rust but being comfortable with C is a requirement for the project.

pid_eins,
@pid_eins@mastodon.social avatar

@sonny and i think a dns angle matters. I.e. local name resolution (i.e. via mdns and search domains) should be more privileged than resolving fqdns.

Impl. idea: define an xattr on cgroups that app sandbox reads and resolved reads and honours.

wjt,
@wjt@mastodon.me.uk avatar

@sonny I feel the need to say that I think dubbing needing network access (a thing that most apps need and have no alternative to) "probably safe" in the first place is a mistake that could be easily resolved without any meaningful reduction in user security by just not considering network access in the safety tile.

sonny,
@sonny@floss.social avatar

@wjt

I disagree

• network can be used to talk to services on the host
• network is the only thing needed to scam people, see recent Snap crypto scam events
• some network usage are illegal in certain regions (ex bittorrent)

But more importantly, if we mark it as safe now, that's it, we lose the leverage to ever get something better than broad and uncontrolled network access or encourage apps to work offline first.

Valentin,

@sonny @wjt where is BitTorrent illegal?

sonny,
@sonny@floss.social avatar

@Valentin @wjt

I was referring to torrenting (uploading) copyrighted material. And the fact that you can receive a fine after having used an app.

It might not be clear to users that's what an app is doing, see Popcorn Time.

wjt,
@wjt@mastodon.me.uk avatar

@sonny

Real cryptocurrency apps need at least as much network access as scam ones. Why would telling a user that what they think is a real cryptocurrency app needs to connect to the internet help them to detect that it will scam them?

sonny,
@sonny@floss.social avatar

@wjt

I can imagine something like a dialog

"Crypto wallet wants to communicate with xfever4ever.xz" yes/no

We can put some educational info in the dialog. We can put a big red flag warning if the domain is on a malware list etc

wjt,
@wjt@mastodon.me.uk avatar

@sonny I think you are overestimating how much interest most people have in reading a domain name and guessing whether it is safe in order to use an app, rather than clicking through; and the ability of any human to determine whether e.g. d1anzknqnc1kmb.cloudfront.net is a safe domain to talk to. (That's the CDN that served Endless OS images for many years.)

It's an interesting R&D project but I would really like to see some user research on the intended flows to go with it.

sonny,
@sonny@floss.social avatar

@wjt research is part of the project

Note that Chrome and Firefox do exactly that with malware domain.

sonny,
@sonny@floss.social avatar

@wjt the portal could also be used for parental control where privacy/security requirement is a whole other paradigm

popey,
@popey@mastodon.social avatar

@sonny @wjt FWIW the big one (as a snap) first made a connection to a completely legitimate currency api before it did the nefarious stuff. Plus, the later ones were just web wrappers so the actual connections to dodgy places (beyond the host of html and css) came from the web host.

sonny,
@sonny@floss.social avatar

@popey @wjt

Good to know 👍

I don't want to focus too much on that case in the conversation.

It's a solved one for us by acknowledging that completely unrestricted network access is unsafe and doing manual reviews.

The way forward is how to consider apps with network needs as safe. Building a portal/API will bring a reasonable compromise.

As always, we'll make sure to share whatever we come up with.

jamesh,
@jamesh@aus.social avatar

@popey @sonny @wjt Also, presumably a cryptocurrency scam app could steal the user's funds by talking to the same network hosts as a legitimate app would.

How do you distinguish network traffic representing a transaction the user wanted to make from network traffic representing a transaction the user didn't want to make?

sonny,
@sonny@floss.social avatar
astro,
@astro@c3d2.social avatar

@sonny A bridge is very dependent on host config. Maybe this can be done with eBPF as well.

sonny,
@sonny@floss.social avatar

@astro I don't know too much about eBPF but in general it's smart for us poor desktop enthusiasts to bet on technologies used by big tech in the server/cloud space 👍

pothos,

@sonny @astro With bpf cgroup socket egress/ingress filters one can have fine-grained firewall rules. A PoC filter would just do "on/off", and then advance into protocol, port, address filtering (HTTP parsing is not really needed). Interesting would be a portal design that works with unmodified apps by detecting packet drops due to initial policy, and then open a dialog to let a ingress/egress connection through (but the app could also ask upfront (fine/coarse-grained).

pid_eins,
@pid_eins@mastodon.social avatar

@pothos @sonny @astro i wonder if VRF wouldnt be a better fit to tackle the problem than simply an app fw. I.e. i am pretty sure its more about routing than about firewalling. After all it probably should also consider captive portal network state as a separate state for each app. The tool for logging into captive portal stuff should get access to a wlan before other apps get it and such.

I'd really recommend checking what android/chromeos do for this as homework before settling on a model.

grimmy,
@grimmy@mastodon.social avatar

@sonny is this going to cover any traversal stuff too? We have a library we started for this but haven't gotten too far with as we have a lot to do ahead of it. But we also need to know things like all ip addresses for the machine and remote addresses too.

sonny,
@sonny@floss.social avatar

@grimmy

Are you asking if the bridge would take care of NAT traversal for apps?

That's an interesting idea, but it's not in scope for now.

grimmy,
@grimmy@mastodon.social avatar

@sonny Yeah asking that and like what else with the bridge entail. In other words, is it even possible for Pidgin to get marked as safe as we need to be able to connect to any/all network, plus peers, etc. :)

sonny, (edited )
@sonny@floss.social avatar

@grimmy

Sorry I don't know yet 😅

grimmy,
@grimmy@mastodon.social avatar

@sonny fair enough :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • JUstTest
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • megavids
  • lostlight
  • All magazines