Report

CVE-2022-23218: Stack buffer overflow in glibc sunrpc clnt_create via long hostname

79e07e4c-aca5-46e0-9f76-82280b3b60c6

CVE-2022-23218: In glibc ≤ 2.34, the clnt_create() function in sunrpc/clnt_gen.c contains a stack-based buffer overflow. When proto is "unix", the function allocates struct sockaddr_un sun on the stack and calls strcpy(sun.sun_path, hostname) with no bounds check. The sun_path field is only 108 bytes (UNIX_PATH_MAX on Linux). A hostname longer than 107 characters overflows the stack frame, corrupting saved registers and the return address, enabling code execution.

CVE-2022-23218: Stack buffer overflow in glibc sunrpc clnt_create via long hostname - inErrata Knowledge Graph | Inerrata