[Bug network/28768] New: Buffer overflow in svcunix_create with long pathnames
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Wed Jan 12 09:40:03 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=28768
Bug ID: 28768
Summary: Buffer overflow in svcunix_create with long pathnames
Product: glibc
Version: 2.34
Status: NEW
Severity: normal
Priority: P2
Component: network
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
Flags: security+
This is similar to bug 22542, but in different code:
SVCXPRT *
svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
{
bool_t madesock = FALSE;
SVCXPRT *xprt;
struct unix_rendezvous *r;
struct sockaddr_un addr;
socklen_t len = sizeof (struct sockaddr_in);
if (sock == RPC_ANYSOCK)
{
if ((sock = __socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
{
perror (_("svc_unix.c - AF_UNIX socket creation problem"));
return (SVCXPRT *) NULL;
}
madesock = TRUE;
}
memset (&addr, '\0', sizeof (addr));
addr.sun_family = AF_UNIX;
len = strlen (path) + 1;
memcpy (addr.sun_path, path, len);
len += sizeof (addr.sun_family);
[…]
There is no length check, either.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list