Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Prevents a potential integer wraparound and heap overflow.#56

Closed
sgayou wants to merge 1 commit intogoogle:masterfrom
sgayou:master
Closed

Prevents a potential integer wraparound and heap overflow.#56
sgayou wants to merge 1 commit intogoogle:masterfrom
sgayou:master

Conversation

@sgayou
Copy link

@sgayou sgayou commented Aug 17, 2018

Attempts to address #54.

Before:

$ ./crash.py 
*** glibc detected *** /usr/bin/python: double free or corruption (!prev): 0x089c9b38 ***
Segmentation fault (core dumped)

After:

$ ./crash.py 
Traceback (most recent call last):
  File "./crash.py", line 3, in <module>
    subprocess._posixsubprocess.fork_exec("a",'a'*0x3FFFFFFF,"a",set(),"a","a",1,1,1,1,1,1,1,3,1,1,"a")
OverflowError

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@gpshead
Copy link
Contributor

gpshead commented Aug 17, 2018

While more pedantically technically correct, i'm just going to take the easier approach over in my other PR #55 of capping the number of args to an always within reason number.

@gpshead gpshead closed this Aug 17, 2018
@sgayou
Copy link
Author

sgayou commented Aug 17, 2018

Works for me. You're gonna miss out on support for exabytes worth of arguments though! (kidding)

@gpshead
Copy link
Contributor

gpshead commented Aug 17, 2018

I consider that a feature. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants