1. 18 Mar, 2015 1 commit
    • Ryusuke Konishi's avatar
      nilfs2: fix potential memory overrun on inode · ce084ba5
      Ryusuke Konishi authored
      commit 957ed60b
      
       upstream.
      
      Each inode of nilfs2 stores a root node of a b-tree, and it turned out to
      have a memory overrun issue:
      
      Each b-tree node of nilfs2 stores a set of key-value pairs and the number
      of them (in "bn_nchildren" member of nilfs_btree_node struct), as well as
      a few other "bn_*" members.
      
      Since the value of "bn_nchildren" is used for operations on the key-values
      within the b-tree node, it can cause memory access overrun if a large
      number is incorrectly set to "bn_nchildren".
      
      For instance, nilfs_btree_node_lookup() function determines the range of
      binary search with it, and too large "bn_nchildren" leads
      nilfs_btree_node_get_key() in that function to overrun.
      
      As for intermediate b-tree nodes, this is prevented by a sanity check
      performed when each node is read from a drive, however, no sanity check
      has been done for root nodes stored in inodes.
      
      This patch fixes the issue by adding missing sanity check against b-tree
      root nodes so that it's called when on-memory inodes are read from ifile,
      inode metadata file.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ce084ba5
  2. 11 Jun, 2011 2 commits
  3. 10 May, 2011 1 commit
  4. 08 Mar, 2011 1 commit
  5. 23 Jul, 2010 15 commits
  6. 10 May, 2010 3 commits
  7. 02 Apr, 2010 1 commit
  8. 28 Nov, 2009 1 commit
  9. 20 Nov, 2009 4 commits
  10. 14 Sep, 2009 3 commits
  11. 10 Jun, 2009 8 commits