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

Harden edit log loader against malformed or malicious input


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 2.0.2-alpha
    • Component/s: namenode
    • Labels:
    • Hadoop Flags:


      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.001.patch
          5 kB
          Colin P. McCabe
        2. HDFS-3134.002.patch
          8 kB
          Colin P. McCabe
        3. HDFS-3134.003.patch
          3 kB
          Colin P. McCabe
        4. HDFS-3134.004.patch
          7 kB
          Colin P. McCabe
        5. HDFS-3134.005.patch
          4 kB
          Colin P. McCabe
        6. HDFS-3134.006.patch
          7 kB
          Colin P. McCabe
        7. HDFS-3134.007.patch
          4 kB
          Colin P. McCabe
        8. HDFS-3134.009.patch
          7 kB
          Colin P. McCabe

          Issue Links



              • Assignee:
                cmccabe Colin P. McCabe
                cmccabe Colin P. McCabe
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created: