linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Divide by Zero in Linux 2.4.31 and 2.6.14
@ 2005-11-03 13:03 Can Sar
  2005-11-03 18:08 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: Can Sar @ 2005-11-03 13:03 UTC (permalink / raw)
  To: linux-fsdevel

Hi,

My research group is working on a tool that automatically finds bugs  
in FS mounting code by mount a "symbolic" disk. Our approach  
carefully (automatically) looks at the checks the FS does on the disk  
and sees if certain checks that prevent potential errors are missing.

There is a bug in both ext2 and 3 that was fixed in 2.6.10 where if  
s_blocks_per_group (in the ext2_superblock) is 0 this will cause a  
division by zero. Unfortunately, this bug is still in 2.4.31.

Furthermore, there is another bug where if s_inodes_per_group is 0 we  
again get a division by 0. This bug exists in both 2.6.14 and 2.4.31.

Finally, it seems that in the current implementation the EXT2/3 error  
mode that is set in the superblock cannot be overriden by the mount  
option if it is set to panic. This would mean that mounting a disk  
image with s_errors = 3 (EXT2_ERRORS_PANIC) and some false values in  
the superblock that are checked after s_errors is read will again  
cause a kernel panic. This is definitely the case in 2.4, and seems  
to be the case in 2.6 kernels as well though I haven't gotten around  
to trying that particular test case yet.

I hope these bug reports help. We are still in the early stages of  
using our tool and hope to provide you with more bug reports in the  
future.

Regards,
Can Sar

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-03 18:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-03 13:03 Divide by Zero in Linux 2.4.31 and 2.6.14 Can Sar
2005-11-03 18:08 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).