apparmor: fix race in unix socket mediation when peer_path is used
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.407.1.57.2In the Linux kernel, the following vulnerability has been resolved:
apparmor: fix race in unix socket mediation when peer_path is used
The holding a reference to the peer_sk is not enough to ensure access to the peer sk path. Accessing the path outside of the state lock allows for a race with unix_release_sock(). Fix this by taking the state lock and getting a reference to the path under lock.
Ideally for connected sockets we would cache this information so we don't have to take the lock here. But for now just fix the race.
From the CVE record · Linux
AppArmor's Unix socket mediation can access a peer socket path outside the state lock, allowing a race with socket release. The input does not establish what an attacker could do or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with AppArmor should check their kernel vendor's advisory; affected versions are not specified.