Skip to contentSkip to conversation

CRED: Fix check_unsafe_exec()

PATCH Joe Malicki 2 participants 3 messages Mar 17, 2009 – Mar 19, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 3830454.11106421237315019351.JavaMail.root@ouachita

#1 lore raw
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 did

not

Quoted 3 lines
Quoted 2 lines

fix Joe's problem, and we don't yet know whether addressing the files->count issue 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->count check from exec.c. Joe, did you manage to try your testing with my original patch plus that files->count check removed from 2.6.28's unsafe_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

#2 lore raw
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 did

not

Quoted 3 lines
Quoted 2 lines

fix Joe's problem, and we don't yet know whether addressing the files->count issue 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->count check from exec.c. Joe, did you manage to try your testing with my original patch plus that files->count check removed from 2.6.28's unsafe_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

#3 lore raw
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->count check from exec.c. Joe, did you manage to try your testing with my original patch plus that files->count check removed from 2.6.28's unsafe_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->count check.

Oh good, thanks Joe, I was hoping that would be the case.

Quoted 3 lines

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).

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