• # Risible !

    Posté par  (Mastodon) . Évalué à 5 (+2/-0).

    J'en ai pris un au hasard pour essayer de comprendre… Voici le code qui est censé montrer une faille dans libcurl:

    /*
     * VERIFIED Cookie Stack Buffer Overflow PoC for cURL
     * Status: ✅ CONFIRMED with AddressSanitizer
     * Compile: gcc -fsanitize=address -g -o exact_poc exact_vulnerability_poc.c -lcurl
     * Run: ASAN_OPTIONS="abort_on_error=1" ./exact_poc
     */
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <curl/curl.h>
    
    void trigger_exact_overflow() {
        char huge_cookie[8192];  // Exact size from ASAN report
    
        // Fill buffer completely (no null terminator)
        memset(huge_cookie, 'A', sizeof(huge_cookie));
        // Don't add null terminator - this creates overflow condition
    
        printf("🚨 Calling strlen() on buffer without null terminator...\n");
    
        // THIS TRIGGERS THE EXACT ASAN ERROR:
        // READ of size 8198 beyond 8192-byte buffer
        size_t overflow_len = strlen(huge_cookie);  // VULNERABLE
    
        printf("strlen() returned: %zu bytes\n", overflow_len);
    }
    
    int main() {
        printf("Cookie Stack Buffer Overflow PoC\n");
        trigger_exact_overflow();
        return 0;
    }

    … il n'appelle même pas libcurl !

    En théorie, la théorie et la pratique c'est pareil. En pratique c'est pas vrai.

  • # Risible !

    Posté par  (Mastodon) . Évalué à 3 (+0/-0).

    J'en ai pris un au hasard pour essayer de comprendre… Voici le code qui est censé montrer une faille dans libcurl:

    /*
     * VERIFIED Cookie Stack Buffer Overflow PoC for cURL
     * Status: ✅ CONFIRMED with AddressSanitizer
     * Compile: gcc -fsanitize=address -g -o exact_poc exact_vulnerability_poc.c -lcurl
     * Run: ASAN_OPTIONS="abort_on_error=1" ./exact_poc
     */
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <curl/curl.h>
    
    void trigger_exact_overflow() {
        char huge_cookie[8192];  // Exact size from ASAN report
    
        // Fill buffer completely (no null terminator)
        memset(huge_cookie, 'A', sizeof(huge_cookie));
        // Don't add null terminator - this creates overflow condition
    
        printf("🚨 Calling strlen() on buffer without null terminator...\n");
    
        // THIS TRIGGERS THE EXACT ASAN ERROR:
        // READ of size 8198 beyond 8192-byte buffer
        size_t overflow_len = strlen(huge_cookie);  // VULNERABLE
    
        printf("strlen() returned: %zu bytes\n", overflow_len);
    }
    
    int main() {
        printf("Cookie Stack Buffer Overflow PoC\n");
        trigger_exact_overflow();
        return 0;
    }

    … il n'appelle même pas libcurl !

    En théorie, la théorie et la pratique c'est pareil. En pratique c'est pas vrai.

Envoyer un commentaire

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.