Skip to content

harden: variable '(void *) indices' was freed twice in compressMG1.c... - #727

Open
anupamme wants to merge 1 commit into
gallantlab:mainfrom
anupamme:fix-repo-pycortex-double-free-compressmg1
Open

harden: variable '(void *) indices' was freed twice in compressMG1.c...#727
anupamme wants to merge 1 commit into
gallantlab:mainfrom
anupamme:fix-repo-pycortex-double-free-compressmg1

Conversation

@anupamme

Copy link
Copy Markdown

Summary

Harden input handling in OpenCTM-1.0.3/lib/compressMG1.c (flagged by semgrep).

Vulnerability

Field Value
ID c.lang.security.double-free.double-free
Severity HIGH
Scanner semgrep
Rule c.lang.security.double-free.double-free
File OpenCTM-1.0.3/lib/compressMG1.c:188
Assessment Defensive hardening

Description: Variable '(void *) indices' was freed twice. This can lead to undefined behavior.

Threat Model Context

This is a web service - vulnerabilities in request handlers are directly exploitable by remote attackers.

Changes

  • OpenCTM-1.0.3/lib/compressMG1.c

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant