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

Hashtable size in configuration is not checked #7

Open
constcast opened this issue Mar 12, 2012 · 1 comment
Open

Hashtable size in configuration is not checked #7

constcast opened this issue Mar 12, 2012 · 1 comment

Comments

@constcast
Copy link
Contributor

Hashtablesize is a uint32_t. No boundary checks are performed when reading hashBits from the configuration file. This will result in overflows and even segmentation faults (e.g. if hashbits == 63).

@nickbroon
Copy link
Contributor

This looks to be referring to several use of uint32_t hashBits:

src/modules/analysis/RBSWormDetectorCfg.cpp: hashBits = getInt("hashbits");
src/modules/analysis/TRWPortscanDetectorCfg.cpp: hashBits = getInt("hashbits");
src/modules/analysis/AutoFocusCfg.cpp: hashBits = getInt("hashbits");

The aggregator has a similar issue:

src/modules/ipfix/aggregator/AggregatorBaseCfg.cpp: htableBits = getInt("hashtableBits", HT_DEFAULT_BITSIZE);

as htableBits is a uint8_t.

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