Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

/kline parses strange cidr masks as their upper limits instead of rejecting #123

Open
AbstractBeliefs opened this issue Nov 29, 2017 · 2 comments
Labels

Comments

@AbstractBeliefs
Copy link
Contributor

AbstractBeliefs commented Nov 29, 2017

See #111 and its fix, #112 .

We should probably reject these klines rather than the current safe-but-incorrect behaviour.

@AbstractBeliefs
Copy link
Contributor Author

As mentioned in #112, the main issue right now is that the parse_netmask() function used in src/hostmask.c returns only varying kinds of success, and has no way to indicate failure. Some work will need to go into updating the calling code of these functions to accept a failure value and do the right thing.

@ilbelkyr
Copy link
Contributor

Also, per #112 (comment),

There appears to be an integer underflow with large negative numbers (n-2^32).
Example: @1.2.3.4/-4294967296 (n=0) matches all IPv4 on testnet.

@ilbelkyr ilbelkyr added the bug label Jun 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants