Skip to content

Potential Integer Overflow vulnerability in src/ctjhai/minimum-weight.c #57

Description

@KSB21ST

Hi,
It seems that there exists a potential integer overflow. Please find the following description:

  1. M->cols can be an arbitrary large number

    if ( fscanf(fptr, "%d %d %d\n", &M->rows, &M->cols, &M->q) < 0 ) {

  2. Call to malloc with the large integer can cause a memory allocation with an overflowed size

    M->m[i] = (unsigned int *)malloc(M->cols * sizeof(unsigned int));

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions