mirror of git://sourceware.org/git/glibc.git
CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542)
Processing an overlong pathname in the sunrpc clnt_create function
results in a stack-based buffer overflow.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit 226b46770c)
This commit is contained in:
parent
f10e992e8d
commit
4653cd9e36
5
NEWS
5
NEWS
|
|
@ -19,10 +19,15 @@ Security related changes:
|
|||
issue when using a notification type of SIGEV_THREAD and a thread
|
||||
attribute with a non-default affinity mask.
|
||||
|
||||
CVE-2022-23219: Passing an overlong file name to the clnt_create
|
||||
legacy function could result in a stack-based buffer overflow when
|
||||
using the "unix" protocol. Reported by Martin Sebor.
|
||||
|
||||
The following bugs are resolved with this release:
|
||||
|
||||
[15271] dlfcn function failure after dlmopen terminates process
|
||||
[18435] pthread_once hangs when init routine throws an exception
|
||||
[22542] CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix"
|
||||
[23462] Static binary with dynamic string tokens ($LIB, $PLATFORM, $ORIGIN)
|
||||
crashes
|
||||
[27304] pthread_cond_destroy does not pass private flag to futex system calls
|
||||
|
|
|
|||
|
|
@ -57,9 +57,13 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
|
|||
|
||||
if (strcmp (proto, "unix") == 0)
|
||||
{
|
||||
memset ((char *)&sun, 0, sizeof (sun));
|
||||
sun.sun_family = AF_UNIX;
|
||||
strcpy (sun.sun_path, hostname);
|
||||
if (__sockaddr_un_set (&sun, hostname) < 0)
|
||||
{
|
||||
struct rpc_createerr *ce = &get_rpc_createerr ();
|
||||
ce->cf_stat = RPC_SYSTEMERROR;
|
||||
ce->cf_error.re_errno = errno;
|
||||
return NULL;
|
||||
}
|
||||
sock = RPC_ANYSOCK;
|
||||
client = clntunix_create (&sun, prog, vers, &sock, 0, 0);
|
||||
if (client == NULL)
|
||||
|
|
|
|||
Loading…
Reference in New Issue