Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Integer Overflow in lrslib.c #8

Open
KSB21ST opened this issue Sep 3, 2021 · 1 comment
Open

Potential Integer Overflow in lrslib.c #8

KSB21ST opened this issue Sep 3, 2021 · 1 comment

Comments

@KSB21ST
Copy link

KSB21ST commented Sep 3, 2021

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

  1. nlinearity can be an arbitrary large number

    lrslib/lrslib.c

    Line 4247 in 784a793

    if(fscanf (lrs_ifp, "%ld", &nlinearity)==EOF )

  2. Call to calloc with the large number can cause a memory allocation with an overflowed size

    lrslib/lrslib.c

    Line 4258 in 784a793

    Q->linearity = (long int*) CALLOC ((nlinearity + 1), sizeof (long));

    lrslib/lrslib.h

    Line 163 in 784a793

    #define CALLOC(n,s) xcalloc(n,s,__LINE__,__FILE__)

    lrslib/lrsgmp.c

    Line 435 in 784a793

    tmp = calloc (n, s);

@mkoeppe
Copy link
Owner

mkoeppe commented Sep 3, 2021

I have notified the upstream authors

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

No branches or pull requests

2 participants