Closed Bug 1315936 Opened 8 years ago Closed 8 years ago

Memory error introduced by bug 1287271

Categories

(NSS :: Libraries, defect)

3.27
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KaiE, Assigned: KaiE)

References

Details

Attachments

(1 file)

Bug 1287271 introduced a memory error. If the memory was taken from an arena, calling PORT_Free on it crashes.

    SignatureScheme *schemes;
...
    if (arena) {
        schemes = PORT_ArenaZNewArray(arena, SignatureScheme, max);
    } else {
        schemes = PORT_ZNewArray(SignatureScheme, max);
    }
...
    if (!numSchemes) {
        /* Bug 1295060 - We fall back to defaults if we have no common
         * algorithms.  We should instead avoid signatures. */
        PORT_Free(schemes);
        schemes = NULL;
    }
Attached patch 1315936-v1.patchSplinter Review
Assignee: nobody → kaie
Attachment #8808576 - Flags: review?(martin.thomson)
Attachment #8808576 - Flags: review?(martin.thomson) → review+
https://hg.mozilla.org/projects/nss/rev/6107cdc34be7871cf9fced4de5739bb755ad8e85

This should get fixed in NSS 3.28

If this landed after the branch point, we should land it into the branch, too.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: