[PATCH] vmcore: fix PT_NOTE n_namesz, n_descsz overflow issue

2014-12-14 Thread WANG Chao
When updating PT_NOTE header size (ie. p_memsz), an overflow issue happens with the following bogus note entry: n_namesz = 0x n_descsz = 0x0 n_type = 0x0 This kind of note entry should be dropped during updating p_memsz. But because n_namesz is 32bit, after (n_namesz + 3) & (~3), it's

[PATCH] vmcore: fix PT_NOTE n_namesz, n_descsz overflow issue

2014-12-14 Thread WANG Chao
When updating PT_NOTE header size (ie. p_memsz), an overflow issue happens with the following bogus note entry: n_namesz = 0x n_descsz = 0x0 n_type = 0x0 This kind of note entry should be dropped during updating p_memsz. But because n_namesz is 32bit, after (n_namesz + 3) (~3), it's