- Fix bug in xfs_repair da_write() routine, which affects
filesystems where the data blocksize != naming blocksize
(see xfs_info output).
+ - Fix a use-after-free bug in xfs_repair code for checking
+ version 1 btree-format directories.
xfsprogs-2.0.5 (02 May 2002)
- size AGs so that they do not always start on the same
const int p_level)
{
xfs_da_intnode_t *node;
+ xfs_dahash_t hashval;
int bad = 0;
int entry;
int this_level = p_level + 1;
}
}
+ /*
+ * Note: squirrel hashval away _before_ releasing the
+ * buffer, preventing a use-after-free problem.
+ */
+ hashval = INT_GET(node->btree[entry].hashval, ARCH_CONVERT);
+
/*
* release/write buffer
*/
return(0);
}
/*
- * set hashvalue to correctl reflect the now-validated
+ * set hashvalue to correctly reflect the now-validated
* last entry in this block and continue upwards validation
*/
- cursor->level[this_level].hashval =
- INT_GET(node->btree[entry].hashval, ARCH_CONVERT);
+ cursor->level[this_level].hashval = hashval;
return(verify_final_da_path(mp, cursor, this_level));
}