CVE-2023-3961: Samba: smbd allows client access to unix domain sockets on the file system as root
A path traversal vulnerability was identified in Samba when processing client pipe names connecting to Unix domain sockets within a private directory. Samba typically uses this mechanism to connect SMB clients to remote procedure call (RPC) services like SAMR LSA or SPOOLSS, which Samba initiates on demand. However, due to inadequate sanitization of incoming client pipe names, allowing a client to send a pipe name containing Unix directory traversal characters (../). This could result in SMB clients connecting as root to Unix domain sockets outside the private directory. If an attacker or client managed to send a pipe name resolving to an external service using an existing Unix domain socket, it could potentially lead to unauthorized access to the service and consequential adverse events, including compromise or service crashes.
Other sources
Samba internally connects client pipe names to unix domain sockets within a private directory, allowing clients to connect to services listening on those sockets. However, insufficient sanitization was done on the incoming client pipe names, allowing SMB clients to connect as root to existing unix domain sockets on the file system, meaning if a client could send a pipe name that resolved to an external service using an existing unix domain socket, the client would be able to connect to it without filesystem permissions restricting access.
https://bugzilla.samba.org/showbug.cgi?id=15422
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is CVE-2023-3961?
CVE-2023-3961 is a vulnerability in Samba that allows client access to Unix domain sockets on the file system as root.
What is the severity of CVE-2023-3961?
The severity of CVE-2023-3961 is critical with a CVSS score of 9.8.
How does CVE-2023-3961 affect Samba?
CVE-2023-3961 affects Samba versions up to and exclusive of 4.19.1, 4.18.8, and 4.17.12.
How do I fix CVE-2023-3961 in Samba?
To fix CVE-2023-3961 in Samba, update to version 4.19.1, 4.18.8, or 4.17.12.
Are there any references for CVE-2023-3961?
Yes, you can find more information about CVE-2023-3961 at the following references: [Bugzilla - Samba](https://bugzilla.samba.org/show_bug.cgi?id=15422), [Samba Security](https://www.samba.org/samba/security/CVE-2023-3961.html), and [Bugzilla - Red Hat](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2243228).