
Tinyproxy में गंभीर use-after-free भेद्यता खोजी गई
हम आतंकवादी समूह हमास द्वारा बंधक बनाए गए सभी नागरिकों की सुरक्षित वापसी की मांग करते हैं। हम तब तक आराम नहीं करेंगे जब तक हर बंधक को रिहा नहीं किया जाता और वह सुरक्षित घर नहीं लौटता। आप उन्हें वापस लाने में मदद कर सकते हैं। https://stories.bringthemhomenow.net/
🚨 गंभीर भेद्यता चेतावनी 🚨
🔍 CVE-2023-49606 Tinyproxy में खोजी गई एक गंभीर use-after-free भेद्यता है, जो एक हल्का HTTP/S प्रॉक्सी सर्वर है। यह दोष Tinyproxy के संस्करण 1.11.1 और 1.10.0 में HTTP कनेक्शन हेडर के प्रबंधन में मौजूद है। यह भेद्यता संभावित सेवा अस्वीकार (DoS) हमलों की अनुमति देती है और, विशिष्ट परिस्थितियों में, दूरस्थ कोड निष्पादन (RCE) का कारण बन सकती है।
📈 CVSS स्कोर: 9.8 (गंभीर)
यह भेद्यता HTTP हेडर संभालते समय मेमोरी के अनुचित प्रबंधन से उत्पन्न होती है। http-message.c में स्रोत कोड HTTP हेडर के लिए मेमोरी ऑपरेशन संभालता है, जिसमें आवंटन (allocation), पुनःआवंटन (reallocation), और विमोचन (deallocation) शामिल हैं। यह समस्या संभवतः मेमोरी पुनःआवंटन और उसके बाद मुक्त की गई मेमोरी तक पहुंच के संदर्भ में उत्पन्न होती है, जिसे सही ढंग से null नहीं किया गया है।
यहाँ http-message.c से प्रासंगिक कोड का एक अंश है:
/* Function to add headers to the HTTP message structure */
void http_message_add_headers(http_message_t *msg, const char **headers, unsigned int num_headers) {
const char **new_headers;
unsigned int i;
if (headers == NULL) {
return;
}
// Check if there is enough space, if not, reallocate
if (msg->headers.used + num_headers > msg->headers.total) {
new_headers = (const char **) safecalloc (msg->headers.total * 2, sizeof(char *));
if (new_headers == NULL) {
return; // Allocation failed, potential for use-after-free if not handled
}
// Copy existing headers to the new array
for (i = 0; i != msg->headers.used; ++i) {
new_headers[i] = msg->headers.strings[i];
}
safefree(msg->headers.strings); // Free old array
msg->headers.strings = new_headers; // Danger if old pointers are used post this point
msg->headers.total *= 2;
}
// Add new headers to the structure
for (i = 0; i != num_headers; ++i) {
msg->headers.strings[i + msg->headers.used] = headers[i];
}
msg->headers.used += num_headers;
}