Open ret2libc opened 2 years ago
Thank you for the suggestion. Two questions:
Thank you for the suggestion. Two questions:
- do you have any functioning sample with a sector size different from the standard 512 or 4096 bytes? Personally I have never seen any. So when parsing the header, other values could raise a DEFECT_FATAL error instead of DEFECT_INCORRECT.
Not functioning, but fuzzed files that reach the sect2array function and generate an exception there exists.
- if we accept non-standard sector sizes, wouldn't it be simpler to check that sector_shift is at least 2 when parsing the header? (since the function is parsing an array of 32 bit integers, the minimum sector size should be 4)
I agree, I can do the change.
This can happen for example if _raise_defects_level is DETECT_FATAL and sector_size is computed to be 1 (sector_shift==0).