]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
imgact_elf: exclude invalid alignment requests
authorKonstantin Belousov <kib@FreeBSD.org>
Wed, 8 Dec 2021 09:33:57 +0000 (11:33 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Sun, 12 Dec 2021 14:28:38 +0000 (16:28 +0200)
commit714d6d09b57e9cf98a5c3f45f869c08be5454849
treee59863e43dca8ef53d00ebb095af0ab73dfd0b5c
parenta4007ae10c8ffdd89155b4e0b6665b721d7b0a6c
imgact_elf: exclude invalid alignment requests

Only accept at most superpage alignment, or if the arch does not have
superpages supported, artificially limit it to PAGE_SIZE * 1024.
This is somewhat arbitrary, and e.g. could change what binaries do
we accept between native i386 vs. amd64 ia32 with superpages disabled,
but I do not believe the difference there is affecting anybody with
real (useful) binaries.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33359
sys/kern/imgact_elf.c