08 Oct, 2016

1 commit


06 Sep, 2013

2 commits

  • The dir_count and size fields when read from disk are sanity
    checked for correctness. However, the sanity checks only check the
    values are not greater than expected. As dir_count and size were
    incorrectly defined as signed ints, this can lead to corrupted values
    appearing as negative which are not trapped.

    Signed-off-by: Phillip Lougher

    Phillip Lougher
     
  • Patch "Squashfs: sanity check information from disk" from
    Dan Carpenter adds a missing check for corruption in the
    "size" field while reading the directory index from disk.

    It, however, sets err to -EINVAL, this value is not used later, and
    so setting it is completely redundant. So remove it.

    Errors in reading the index are deliberately non-fatal. If we
    get an error in reading the index we just return the part of the
    index we have managed to read - the index isn't essential,
    just quicker.

    Signed-off-by: Phillip Lougher

    Phillip Lougher
     

29 Aug, 2013

1 commit


14 Jul, 2012

1 commit

  • Just the flags; only NFS cares even about that, but there are
    legitimate uses for such argument. And getting rid of that
    completely would require splitting ->lookup() into a couple
    of methods (at least), so let's leave that alone for now...

    Signed-off-by: Al Viro

    Al Viro
     

10 Mar, 2012

2 commits


20 Jul, 2011

2 commits


26 May, 2011

1 commit


16 Mar, 2011

1 commit

  • Handle the rare case where a directory metadata block is uncompressed and
    corrupted, leading to a kernel oops in directory scanning (memcpy).
    Normally corruption is detected at the decompression stage and dealt with
    then, however, this will not happen if:

    - metadata isn't compressed (users can optionally request no metadata
    compression), or
    - the compressed metadata block was larger than the original, in which
    case the uncompressed version was used, or
    - the data was corrupt after decompression

    This patch fixes this by adding some sanity checks against known maximum
    values.

    Signed-off-by: Phillip Lougher

    Phillip Lougher
     

18 May, 2010

2 commits


21 Jan, 2010

1 commit


05 Jan, 2009

1 commit