Re: sys/msdosfs: possible kernel crash

2014-06-23 Thread Tobias Stoeckmann
And again... Could have saved myself time by checking FreeBSD in detail first. They fixed the issue by adding a simple check: According to FAT specs, the size of a cluster shall not exceed 64 KB. That is even a rare case, 32 KB shouldn't be crossed for compatibility reasons. Therefore, it's enou

sys/msdosfs: possible kernel crash

2014-06-20 Thread Tobias Stoeckmann
Hi, sys/msdosfs is vulnerable to a division by zero when certain FAT file systems are mounted. This happens due to an overflow of an unsigned 8 bit value (sectors per cluster). How to repeat (BEWARE, KERNEL WILL CRASH!!): # dd if=/dev/zero of=nuke.iso bs=1K count=100 # vnconfig vnd0c nuke.iso #