Vulnerable Systems:
* Ubuntu Ubuntu Linux 11.04 powerpc
* Ubuntu Ubuntu Linux 11.04 i386
* Ubuntu Ubuntu Linux 11.04 ARM
* Ubuntu Ubuntu Linux 11.04 amd64
* Ubuntu Ubuntu Linux 10.04 sparc
* Ubuntu Ubuntu Linux 10.04 powerpc
* Ubuntu Ubuntu Linux 10.04 i386
* Ubuntu Ubuntu Linux 10.04 ARM
* Ubuntu Ubuntu Linux 10.04 amd64
keyctl_session_to_parent(task) sets ->replacement_session_keyring, it should be processed and cleared by key_replace_session_keyring().
However, this task can fork before it notices TIF_NOTIFY_RESUME and the new child gets the bogus ->replacement_session_keyring copied by dup_task_struct(). This is obviously wrong and, if nothing else, this
leads to put_cred(already_freed_cred).
This causes the following panic on ppc64:
Kernel panic - not syncing: CRED: put_cred_rcu() sees c0000001f41a4480 with usage -1
Because powerpc does not, currently, call key_replace_session_keyring() from the TIF_NOTIFY_RESUME handler. i386, x86_64, s390 and ia64 all do call the keyrings code and so the attack window is much smaller - though still present.
An unprivileged local user could use this flaw to crash the system.