smack: fix bug: unprivileged task can create labels
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 38416e53936ecf896948fdeffc36b76979117952 · < 64aa81250171b6bb6803e97ea7a5d73bfa061f6e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smack: fix bug: unprivileged task can create labels
If an unprivileged task is allowed to relabel itself (/smack/relabel-self is not empty), it can freely create new labels by writing their names into own /proc/PID/attr/smack/current
This occurs because do_setattr() imports the provided label in advance, before checking "relabel-self" list.
This change ensures that the "relabel-self" list is checked before importing the label.
From the CVE record · Linux
The Linux kernel's Smack implementation lets an unprivileged task create new labels if it is allowed to relabel itself. A local task can do this by writing a label name to its own /proc/PID/attr/smack/current; the relabel-self list is checked only after the label is imported.
Administrators running Linux kernels with Smack and a nonempty /smack/relabel-self should check their systems; affected versions are not specified.