mjg59,
@mjg59@nondeterministic.computer avatar

Amazingly, https://github.com/mjg59/linux/tree/restrict_path_traversal actually seems to roughly work as expected do I attempt to upstream or not

lanodan,
@lanodan@queer.hacktivis.me avatar

@mjg59 Interesting, that said I'm not sure if this one would have much of an effect as a lot of path resolution works entirely in userspace.
See the output of strace realpath ../../../../../../etc/passwd for example, so I guess it would also need changes in something like standard libraries.

nogweii,
@nogweii@nogweii.net avatar

@mjg59 I'm surprised that it wasn't a thing already! Seems like an obvious win for a bunch of situations. I'd love to turn that on for a bunch of daemons, seems very reasonable to me.

jamesh,
@jamesh@aus.social avatar

@nogweii @mjg59 The openat2() system call seems to be the current attempt to solve the problem (e.g. with the RESOLVE_BENEATH or RESOLVE_IN_ROOT flags). Of course, that only helps if you control all the places files might be opened, which probably won't be the case if you use any libraries.

mjg59,
@mjg59@nondeterministic.computer avatar

@jamesh @nogweii yeah this is intended as a band aid for existing projects

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