xfsprogs: Fix possible unallocated memory access in fiemap
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20121212231245.GY16353@dastard
A message that is not in the archive (sent off-list or not yet received): alpine.LFD.2.00.1212131024460.17970@localhost
A message that is not in the archive (sent off-list or not yet received): 20121213230608.GI16353@dastard
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mark Tinguely
Reviewed-byQuoted 11 lines · Eric Sandeen
(Based on original patch by Lukas Czerner& comments by Dave Chinner)
Currently we could access unallocated memory in fiemap because we're using uninitialized variable 'fiemap' in
fiemap_f(). In fact this has been spotted on x390s machine wherexfs_iowould segfault.The problem happens in the for cycle which seems to be intended to compute the header item spacing. However at that point the fiemap structure has just been allocated and does not contain any extents yet, so it is entirely useless and it never actually worked.
Quoted 5 lines
This patch delays the format calculation until the first batch of extents has come in for analysis.
Signed-off-by Eric Sandeen<[email protected]>---
A working calculated format is a great improvement.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs