Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Aug 6, 2021

If the inputs size is unlimited, the target may consume unlimited memory, because the argsmanager stores the argument names. Limiting the size should fix this issue.

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36906

@maflcko
Copy link
Member Author

maflcko commented Aug 6, 2021

The macro idea is stolen from #22508

@practicalswift
Copy link
Contributor

practicalswift commented Aug 15, 2021

cr ACK fa77183

Two non-blocking explicitness nits for the LIMITED_WHILE macro if a touch up is made for other reasons:

  • Explicit unsigned int _count instead of equivalent but potentially confusing unsigned _count
  • Explicit _count != 0 instead of equivalent implicit int-to-bool conversion

:)

@maflcko maflcko merged commit 42b00a3 into bitcoin:master Aug 16, 2021
@maflcko maflcko deleted the 2108-fuzzSystemOOM branch August 16, 2021 15:15
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 20, 2021
fa77183 fuzz: Avoid OOM in system fuzz target (MarcoFalke)

Pull request description:

  If the inputs size is unlimited, the target may consume unlimited memory, because the argsmanager stores the argument names. Limiting the size should fix this issue.

  Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36906

ACKs for top commit:
  practicalswift:
    cr ACK fa77183

Tree-SHA512: 6edfcf324ee9d94e511038ee01340f02db50bcb233af3f1a1717c3602164c88528d9d987e971ec32f1a4593b868019bea0102c53c9b02bfefec3dfde959483cf
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
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