CRED: Fix check_unsafe_exec()
Quoted 10 lines · ----- "Hugh Dickins
Quoted 5 lines · David Howells
Quoted 3 lines · Hugh Dickins
We do. See the original thread. It's here at
http://lkml.org/lkml/2009/2/26/233
and appended below for convenience. We do know that patch didnot
Quoted 3 lines
Quoted 2 lines
fix Joe's problem, and we don't yet know whether addressing the
files->countissue will actually fix it, but I'm hopeful.
Quoted 8 lines
Quoted 1 line
Looks reasonable.
Thanks for taking a look.
Yes, I'm inclined to go with that, and removing the
files->countcheck fromexec.c. Joe, did you manage to try your testing with my original patch plus thatfiles->countcheck removed from 2.6.28'sunsafe_exec()?
Sorry for not responding earlier.
I still got one failure with this new patch. I added some printks to illuminate exactly why it's failing when it fails to setuid, but of course, since adding the printks I haven't reproduced yet.
Very weird...
Thanks,
Joe
Quoted 6 lines
Since Joe's bug has been around forever (if it is what we think it is), I'm disinclined to rush the fix - something nice to add to -stable, rather than needing to squeeze into 2.6.29.
Hugh
Quoted 21 lines · ----- "Joe Malicki
Quoted 10 lines · ----- "Hugh Dickins
Quoted 5 lines · David Howells
Quoted 3 lines · Hugh Dickins
We do. See the original thread. It's here at
http://lkml.org/lkml/2009/2/26/233
and appended below for convenience. We do know that patch didnot
Quoted 3 lines
Quoted 2 lines
fix Joe's problem, and we don't yet know whether addressing the
files->countissue will actually fix it, but I'm hopeful.Quoted 8 lines
Quoted 1 line
Looks reasonable.
Thanks for taking a look.
Yes, I'm inclined to go with that, and removing the
files->countcheck fromexec.c. Joe, did you manage to try your testing with my original patch plus thatfiles->countcheck removed from 2.6.28'sunsafe_exec()?
Quoted 6 lines
Sorry for not responding earlier.
I still got one failure with this new patch. I added some printks to illuminate exactly why it's failing when it fails to setuid, but of course, since adding the printks I haven't reproduced yet.
My tests were accidentally run without removing the files->count check.
The printks confirmed the failure case was the files->count check, and removing the files->check has worked thus far (though I can't be sure until after a day or two has gone by given how infrequent it is).
Thanks!
Joe
Quoted 7 lines · Joe Malicki
Quoted 6 lines · ----- "Joe Malicki
Quoted 4 lines · ----- "Hugh Dickins
Yes, I'm inclined to go with that, and removing the
files->countcheck fromexec.c. Joe, did you manage to try your testing with my original patch plus thatfiles->countcheck removed from 2.6.28'sunsafe_exec()?
Quoted 7 lines
Quoted 5 lines
Sorry for not responding earlier.
I still got one failure with this new patch. I added some printks to illuminate exactly why it's failing when it fails to setuid, but of course, since adding the printks I haven't reproduced yet.
My tests were accidentally run without removing the
files->countcheck.
Oh good, thanks Joe, I was hoping that would be the case.
Quoted 3 lines
The printks confirmed the failure case was the
files->countcheck, and removing thefiles->checkhas worked thus far (though I can't be sure until after a day or two has gone by given how infrequent it is).
Okay, unless we hear bad news from you later, I'll post the set of three patches (removing the files->count check, then my original fs->count one, plus David's comment) in a day or two, adding a few more Ccs.
Hugh