af_unix: read UNIX_DIAG_VFS data under unix_state_lock
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5f7b0569460b7d8d01ca776430a00505a68b7584 · < 900a4e0910e98b8caef117d5df00471fa438dcf9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
af_unix: read UNIX_DIAG_VFS data under unix_state_lock
Exact UNIX diag lookups hold a reference to the socket, but not to u->path. Meanwhile, unix_release_sock() clears u->path under unix_state_lock() and drops the path reference after unlocking.
Read the inode and device numbers for UNIX_DIAG_VFS while holding unix_state_lock(), then emit the netlink attribute after dropping the lock.
This keeps the VFS data stable while the reply is being built.
From the CVE record · Linux
Exact UNIX diagnostic lookups retain a socket reference but not a reference to its path. Concurrent socket release can clear the path while diagnostic code reads VFS data, creating a race; the input does not specify attacker access requirements or a demonstrated exploit outcome.
Engineers running the Linux kernel should check their affected versions; the input does not identify specific versions.