linux 0-day, access root-owned files as an unprivileged user

37 points by dzwdz


sams

Please note that disabling ptrace isn't sufficient, despite the commit message and the function involved: ptrace_may_access is called from all over the place and indeed this PoC doesn't use ptrace.

In terms of mitigations, there's not great options. AFAIK it's really down to:

  1. remove the world executable bit on /usr/lib64/misc/ssh-keysign as a very weak mitigation for this specific PoC only (only do this if you need to go to bed right now and you can't patch your kernel or shutdown the machine) (*);
  2. block pidfd_getfd with eBPF or the like (systemtap would be another option). Not much uses it and there's often a fallback.

I haven't reviewed the PoC, usual caveats apply w/ running random PoCs from the net.

The Qualys advisory hasn't been published yet, they recently said they'd stop doing linux-distros with heavy regret because of the Linux kernel security policy. LLMs being able to go from some fix commit that is possibly suspicious to a PoC most rapidly has made things rough. Otherwise you could get away with waiting a few days in normal times.

Qualys are real legends and it's unfortunate that they don't get a proper moment to announce this themselves now. I'm confident that when it does appear, it'll be excellent though.

(*) openssh is a convenient target for this and not to blame. There will be other (suid) binaries to pick on.

johnklos

This is a Linux issue, not an ssh issue. The title should reflect this.