question about potential integer truncation in default_erasesize

PaX Team pageexec at freemail.hu
Sat Sep 26 06:18:08 PDT 2015


hi all,

drivers/mtd/chips/map_rom.c:default_erasesize can truncate map_info.size
from unsigned long to unsigned int on 64 bit archs and i'm wondering if
this is intentional or should/could map_info.size be turned into an unsigned
int field? FTR, this issue was detected with the upcoming version of the
size overflow plugin we have in PaX/grsecurity and there're a handful of
similar cases in the tree where potentially unwanted or unnecessary integer
truncations occur, this being one of these. any opinion/help is welcome!

cheers,
  PaX Team




More information about the linux-mtd mailing list