Low severity DoS forcing printf/OutputDebugStringF to dump too much info #1385

issue SergioDemianLerner opened this issue on May 24, 2012
  1. SergioDemianLerner commented at 3:11 AM on May 24, 2012: contributor

    It is possible in many ways to force the application to dump to debug.log too much information for too little bytes sent. For example, sending a message header starting with an incorrect byte, and then sending a header containing an incorrect command padding we can force the application dump the following messages:

    \n\nPROCESSMESSAGE SKIPPED 1 BYTES\n\n \n\nPROCESSMESSAGE: ERRORS IN HEADER 1234567890\n\n\n

    That´s 85 bytes dumped for only 25 bytes sent by the wire. By sending the same chunk of bytes over and over, and assuming a connection with a bandwidth of 64 Kbytes/sec one can fill 18 Gb of victim´s hard disk in a day.

    The vulnerability is not severe since each time the application restarts the log file is shrank, but still if the application is left running headless the attacker can fill an entire 500 Gb HD in a month.

    There are other places in the code (such as in the processing of the command "getdata") where too much information is dumped with little data sent.

    On possible solution is to reduce some of the log messages sizes. Other possible solution is to generate a DoS forced disconnection if too much info is dumped by actions originated from a client node.

    Best regards! Sergio.

  2. gmaxwell commented at 3:15 AM on May 24, 2012: contributor

    The logs are rotated and won't grow over 1GB IIRC

  3. SergioDemianLerner commented at 12:24 PM on May 24, 2012: contributor

    They are, but only when the application starts. Correct me if I'm wrong.

  4. sipa commented at 12:53 PM on May 24, 2012: member

    @SergioDemianLerner is correct, I believe.

  5. laanwj commented at 7:12 AM on May 28, 2014: member

    The worst of these should be fixed with 0.9, as it divides the log messages into categories that are disabled by default.

  6. laanwj closed this on Jan 29, 2016

  7. lateminer referenced this in commit 52efe56209 on Jan 22, 2019
  8. lateminer referenced this in commit be05f52000 on May 6, 2020
  9. lateminer referenced this in commit 541a688bee on May 6, 2020
  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me