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

Integer Overflow caused by out-of-range left shift in listfdb (master, libming 0.4.8 and earlier) #107

Closed
hlef opened this issue Jan 30, 2018 · 1 comment

Comments

@hlef
Copy link
Contributor

hlef commented Jan 30, 2018

The readUInt32 function (util/listfdb.c) in libming through 0.4.8 is vulnerable to an integer overflow caused by an out-of-range left shift. This issue also affects the master branch.

Reproduce:
$ listfdb out-of-range-left-shift-in-readUInt32-poc-1.fdb

Output:

Font Name: f
number of glyphs: 1

listfdb.c:160:95: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'

You can find the reproducer here.

@hlef
Copy link
Contributor Author

hlef commented Jan 30, 2018

Same as #106: This issue is identical to #98 because the code itself is identical (very likely to be duplicate code).

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

1 participant