Re: [GIT PULL] Please pull exec fix for v5.7
From: Linus Torvalds
Date: Tue May 26 2020 - 15:09:43 EST
On Tue, May 26, 2020 at 11:42 AM Eric W. Biederman
> While working on my exec cleanups I found a bug in exec that winds
> up miscomputing the ambient credentials during exec. Andy appears
> as to credentials are computed for both the script and the interpreter.
Can you rephrase that?
I tried to figure out what you were trying to say, and I can't. I
suspect a whole line or two is missing, or you were re-writing that
thing and stopped in the middle or something.
I'm also somewhat confused by your placement of that
new->cap_ambient = old->cap_ambient;
which doesn't seem to make a lot of sense. It's before the code even
checks that the old ambient is valid, which I guess doesn't really
matter (an error is an error, and the newly set state will not be used
in that case), but aside from that it's just in an odd place.
It's not near any other code that affects the new capabilities.
Wouldn't it have made more sense to do this where we then clear
cap_ambient if it's a setid binary?
So this pull just confuses me for a couple of reasons - I'm not saying
it's wrong, but at a minimum I'd like to get a merge message that
makes more sense..