CVE-2015-10088 (published 2023-03-05T05:15Z)

A vulnerability, which was classified as critical, was found in ayttm up to 0.5.0.89. This affects the function http_connect in the library libproxy/proxy.c. The manipulation leads to format string. It is possible to initiate the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. The patch is named 40e04680018614a7d2b68566b261b061a0597046. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-222267.

CVSS v3 base score: 8.1, HIGH (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-134
cwe_name: Use of Externally-Controlled Format String
description: The product uses a function that accepts a format string as an argument, but the format string originates from an external source.
extended_description: 
            When an attacker can modify an externally-controlled format string, this can lead to buffer overflows, denial of service, or data representation problems.
            It should be noted that in some circumstances, such as internationalization, the set of format strings is externally controlled by design. If the source of these format strings is trusted (e.g. only contained in library files that are only modifiable by the system administrator), then the external control might not itself pose a vulnerability.
         
         

Fix information:
repo_url: https://github.com/ayttm/ayttm
commit_details: repo_url: https://github.com/ayttm/ayttm
author: Philip Tellis
author_date: 2015-08-24 12:53:46-04:00
msg: Fix format string vulnerability

Reported by Kapil Anand on ayttm-users:
https://sourceforge.net/p/ayttm/mailman/message/34397158/

This patch does the following two things:

1. Makes sure debug_print is only used in DEBUG mode and not in non-DEBUG mode
2. Since debug_print is basically printf, we don't really need to first
   snprintf into a buffer and then print the buffer.
3. We no longer need debug_buff
repository: repo_url: https://github.com/ayttm/ayttm
repo_name: ayttm/ayttm
description: Universal Instant Messenger
repo_language: C
owner: ayttm
file_changes: filename: proxy.c
change_type: ModificationType.MODIFY
diff: @@ -294,7 +294,6 @@ int http_connect(int sockfd, const char *host, int port, AyProxyData *proxy)
 	char cmd[512];
 	char *inputline = NULL;
 	char *proxy_auth = NULL;
-	char debug_buff[512];
 	int remaining = sizeof(cmd) - 1;
 
 	remaining -= snprintf(cmd, sizeof(cmd), "CONNECT %s:%d HTTP/1.1\r\n", host, port);
@@ -309,17 +308,15 @@ int http_connect(int sockfd, const char *host, int port, AyProxyData *proxy)
 		remaining -= 2;
 	}
 	strncat(cmd, "\r\n", remaining);
-#ifndef DEBUG
-	snprintf(debug_buff, sizeof(debug_buff), "<%s>\n", cmd);
-	debug_print(debug_buff);
+#ifdef DEBUG
+	debug_print("<%s>\n", cmd);
 #endif
 	if (send(sockfd, cmd, strlen(cmd), 0) < 0)
 		return AY_CONNECTION_REFUSED;
 	if (ay_recv_line(sockfd, &inputline) < 0)
 		return AY_CONNECTION_REFUSED;
-#ifndef DEBUG
-	snprintf(debug_buff, sizeof(debug_buff), "<%s>\n", inputline);
-	debug_print(debug_buff);
+#ifdef DEBUG
+	debug_print("<%s>\n", inputline);
 #endif
 	if (!strstr(inputline, "200")) {
 		/* Check if proxy authorization needed */
@@ -344,9 +341,8 @@ int http_connect(int sockfd, const char *host, int port, AyProxyData *proxy)
 		if (ay_recv_line(sockfd, &inputline) < 0) {
 			return AY_CONNECTION_REFUSED;
 		}
-#ifndef DEBUG
-		snprintf(debug_buff, sizeof(debug_buff), "<%s>\n", inputline);
-		debug_print(debug_buff);
+#ifdef DEBUG
+		debug_print("<%s>\n", inputline);
 #endif
 	}
 	free(inputline);

programming_language: C