selinux: use sk blob accessor in socket permission helpers
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 |
|
|
6.18.307.0.77.1In the Linux kernel, the following vulnerability has been resolved:
selinux: use sk blob accessor in socket permission helpers
SELinux socket state lives in the composite LSM socket blob.
sock_has_perm() and nlmsg_sock_has_extended_perms() currently dereference sk->sk_security directly, which assumes the SELinux socket blob is at offset zero.
In stacked configurations that assumption does not hold. If another LSM allocates socket blob storage before SELinux, these helpers may read the wrong blob and feed invalid SID and class values into AVC checks.
Use selinux_sock() instead of accessing sk->sk_security directly.
From the CVE record · Linux
SELinux socket permission helpers in the Linux kernel can read the wrong socket security data when another LSM allocates socket blob storage before SELinux. This can feed invalid security identifiers and class values into permission checks. The input does not specify attacker access requirements or user interaction.
Teams running Linux kernels with SELinux in stacked LSM configurations should check their versions; affected versions are not specified.