Page MenuHomeFreeBSD

jaildesc: Lock prison pointer when filling kinfo
ClosedPublic

Authored by yura.tkachenko_gmail.com on Mon, Oct 5, 11:06 PM.

Details

Summary

jaildesc_fill_kinfo() reads jd_prison without jd_lock. The field is
documented as protected by that lock, and prison cleanup clears it
under the lock. File descriptor export can run concurrently with jail
removal, leaving this read unsynchronized.

Hold jd_lock while obtaining the JID, as jaildesc_stat() does.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jamie added a subscriber: jamie.

I don't see you on the committer list - do you want me to commit this for you?

This revision is now accepted and ready to land.Mon, Oct 5, 11:31 PM

I don't see you on the committer list - do you want me to commit this for you?

It would be great if you could commit it. Yes, I am not on the committer list - cannot add myself there.