Module Name: src Committed By: maxv Date: Wed Jul 9 05:50:51 UTC 2014
Modified Files: src/sys/kern: subr_kobj.c Log Message: - limit the number of sections with ELF_MAXSHNUM - fix the (symstrindex > hdr->e_shnum) check: it should be >=, otherwise there's an off-by-one - fix the (symstrindex < 0) check: the value is unsigned, so it can't be <0. However, we should ensure that symstrindex!=0 (done with SHN_UNDEF) - set 'error' as appropriate - ensure that e_shstrndx < hdr->e_shnum, to prevent out-of-bound reads Fixes several crashes that could occur when loading a kernel module. Quick glance from martin@ To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/kern/subr_kobj.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.