8000 log: Mitigate disk filling attacks by globally rate limiting LogPrintf(…) by dergoegge · Pull Request #21706 · bitcoin/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

log: Mitigate disk filling attacks by globally rate limiting LogPrintf(…) #21706

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

Closed
wants to merge 2 commits into from

Conversation

dergoegge
Copy link
Member

This is an alternative to #21603 in an attempt to solve #21559.

Example for the approach in this PR: Location A logs excessively and logging gets suppressed for up to one hour. All logs from any other location will also be dropped during the suppression period. After ~one hour logging restarts and a message with a report on which locations have been suppressed is printed to the log.

The key difference to #21603 is that logging is suppressed globally instead of "per source location" when at least one source location is logging excessively.

Approach review is probably the best next step to determine which of the two PRs to move forward with.

@DrahtBot
Copy link
Contributor
DrahtBot commented Apr 16, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot
Copy link
Contributor
DrahtBot commented May 3, 2021

🕵️ @sipa has been requested to review this pull request as specified in the REVIEWERS file.

@maflcko
Copy link
Member
maflcko commented Jun 3, 2021

From ci: test/logging_tests.cpp(78): error: in "logging_tests/rate_limiting": check curr_log_file_size - prev_log_file_size == 1024 * 1024 has failed

@practicalswift
Copy link
Contributor

@dergoegge Thanks for working on this. Would you mind rebasing? I would like to review the updated version :)

@practicalswift
Copy link
Contributor

Concept ACK

While I have a slight preference for the approach taken in #21603 (rate-limiting per log location), but the approach in this PR (rate-limiting globally) works too. Concept ACK on both: the important thing is that we kill this bug class :)

@dergoegge
Copy link
Member Author

We will move forward with the other approach in #21603. See the PR description there for the reasoning.

@dergoegge dergoegge closed this Jun 17, 2021
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0