Comment 9 for bug 1048203

Revision history for this message
In , Siddhesh (siddhesh) wrote :

Fixed in master:

commit 303e567a8062200dc06acde7c76fc34679f08d8f
Author: Siddhesh Poyarekar <email address hidden>
Date: Mon Sep 23 11:24:30 2013 +0530

    Check for integer overflow in cache size computation in strcoll

    strcoll is implemented using a cache for indices and weights of
    collation sequences in the strings so that subsequent passes do not
    have to search through collation data again. For very large string
    inputs, the cache size computation could overflow. In such a case,
    use the fallback function that does not cache indices and weights of
    collation sequences.

    Fixes CVE-2012-4412.

commit 141f3a77fe4f1b59b0afa9bf6909cd2000448883
Author: Siddhesh Poyarekar <email address hidden>
Date: Mon Sep 23 11:20:02 2013 +0530

    Fall back to non-cached sequence traversal and comparison on malloc fail

    strcoll currently falls back to alloca if malloc fails, resulting in a
    possible stack overflow. This patch implements sequence traversal and
    comparison without caching indices and rules.

    Fixes CVE-2012-4424.