]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r315685: tighten buffer bounds in imgact_binmisc_populate_interp
authoremaste <emaste@FreeBSD.org>
Mon, 15 May 2017 14:41:47 +0000 (14:41 +0000)
committeremaste <emaste@FreeBSD.org>
Mon, 15 May 2017 14:41:47 +0000 (14:41 +0000)
commit0cb6596133162e0cb090e434e03e02376fc66ec2
tree394d62e837d68b5a2aa358077770775904e17783
parent054f6b7d3a6ec9d195b41c4d19935754645d676a
MFC r315685: tighten buffer bounds in imgact_binmisc_populate_interp

We must ensure there's space for the terminating null in the temporary
buffer in imgact_binmisc_populate_interp().

Note that there's no buffer overflow here because xbe->xbe_interpreter's
length and null termination is checked in imgact_binmisc_add_entry()
before imgact_binmisc_populate_interp() is called. However, the latter
should correctly enforce its own bounds.

Sponsored by: The FreeBSD Foundation
sys/kern/imgact_binmisc.c