futex: Use correct exit on failure from futex_hash_allocate_default()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
futex: Use correct exit on failure from futex_hash_allocate_default()
copy_process() uses the wrong error exit path from futex_hash_allocate_default(). After exiting from futex_hash_allocate_default(), neither tasklist_lock nor siglock has been acquired. The exit label bad_fork_core_free unlocks both of these locks which is wrong.
The next exit label, bad_fork_cancel_cgroup, is the correct exit. sched_cgroup_fork() did not allocate any resources that need to freed.
Use bad_fork_cancel_cgroup on error exit from futex_hash_allocate_default().
From the CVE record · Linux
The Linux kernel takes the wrong error path if futex_hash_allocate_default() fails during process creation, attempting to unlock two locks it does not hold. This can occur during a local process-creation attempt; the input does not specify a resulting attacker capability or whether privileges are required.
Engineers running Linux kernels should check their versions against the vendor advisory; affected versions are not specified in the input.