Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3134

Harden edit log loader against malformed or malicious input



    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.23.0
    • 2.0.2-alpha
    • namenode
    • None
    • Reviewed


      Currently, the edit log loader does not handle bad or malicious input sensibly.

      We can often cause OutOfMemory exceptions, null pointer exceptions, or other unchecked exceptions to be thrown by feeding the edit log loader bad input. In some environments, an out of memory error can cause the JVM process to be terminated.

      It's clear that we want these exceptions to be thrown as IOException instead of as unchecked exceptions. We also want to avoid out of memory situations.

      The main task here is to put a sensible upper limit on the lengths of arrays and strings we allocate on command. The other task is to try to avoid creating unchecked exceptions (by dereferencing potentially-NULL pointers, for example). Instead, we should verify ahead of time and give a more sensible error message that reflects the problem with the input.


        1. HDFS-3134.009.patch
          7 kB
          Colin McCabe
        2. HDFS-3134.007.patch
          4 kB
          Colin McCabe
        3. HDFS-3134.006.patch
          7 kB
          Colin McCabe
        4. HDFS-3134.005.patch
          4 kB
          Colin McCabe
        5. HDFS-3134.004.patch
          7 kB
          Colin McCabe
        6. HDFS-3134.003.patch
          3 kB
          Colin McCabe
        7. HDFS-3134.002.patch
          8 kB
          Colin McCabe
        8. HDFS-3134.001.patch
          5 kB
          Colin McCabe

        Issue Links



              cmccabe Colin McCabe
              cmccabe Colin McCabe
              0 Vote for this issue
              6 Start watching this issue